Writing my own Cookbook of Code

Table of contents

No heading

No headings in the article.

I'm learning a new language called Raku.

Why?

I want to automate tasks and learn how to solve complex algorithms.

Also, I wanted to learn something new, interesting and different.

I am already professionally proficient in HTML, CSS, JavaScript, Typescript, Ruby, PHP and C# and have dabbled in many others for personal projects.

I can do most things in these languages.

But still...

I find myself looking things up a lot.

So that is why I am writing a Cookbook as I learn Raku.

This past weekend I learned Perl and started automating a few tasks for my main job. I wrote a script runner with a GUI to launch my dev environment and do certain tasks.

And I learned it in a few days.

I started following a tutorial series on YouTube for Perl. It was great! I made a small git repo and wrote scripts along with the videos. I got to a point where I made a script to write a new Perl script with some boilerplate. And that wasn't in the video. This was after I had enough knowledge to automate writing up a new script for each video.

Powerful stuff! ๐Ÿ’ช

And It didn't take me weeks or years to learn! Yes, I am a professional programmer. But still. It was nice to get some things up and running quickly. Such Inspiration!

My mind excreted a million tasks that I could automate!

This little script repo is my Perl knowledge base. If I learn something new, It goes in a script for code, or markdown file for step by step instructions.

This is a Cookbook.

A repository of recipes.

I wasted too much time looking things up on search engines and pouring through blogs and docs etc. (Though many people should be reading docs more often)

If I learn something, I need to keep track of it. Keep the knowledge base organized. Write some examples and keep it up to date. This will save me a whole bunch of time.

A cookbook is a systematic approach to DRY up the way you write software.

Don't Repeat Yourself!

Imagine rewriting the same basic code for the solving the same basic problem for every new project? If you've already done this, why not grab the recipe from a cookbook?

Or better yet, write a command line tool to write a template from the cookbook into your new project!

Write a Cookbook, my friend.

You will thank me later. ๐Ÿฆ‹

ย