Newsletter # 24 - Migrating an old JavaScript codebase to modern JavaScript May 21 2020

Hello, and welcome to issue #24!

I wonder why we always seek novelty. Maybe it is because there is the illusion that this new thing might finally be the perfect solution without tradeoffs. I began many years ago to explore Linux because it might be different than MS Windows. Then I changed to macOS because it was the solution over both. And now, I'm exploring more about FreeBSD because it's more integrated. In any case, it is fun to explore different topics and learn about different technologies. And who knows, maybe after exploring enough we can help make our options better and finally get us closer to a "perfect solution".

Talking about technology, I have a few recommendations for you. As you might already know, I enjoy audiobooks and podcasts. So this week I'll share with you two new podcast recommendations, I find them fun and informative. I hope you like them too:

Check them out, and if you have any recommendations, I'll be glad to hear them. I'm always on the lookout for new interesting podcasts (and books).

Talking about books, and if you are interested in iOS development. The Big Nerd Ranch, just published (May 5th 2020) the 7th edition of their iOS development book. I've enjoyed their books in the past, and I'm looking forward to reading this one. So if you want to learn more about iOS development here is my recommendation:

iOS Programming: The Big Nerd Ranch Guide, 7th Edition

We probably agree that software development is fun, and as I was mentioning before we tend to get more excited about new projects. But normally what we do most of the time is maintain code. Lately, I've been working on old JavaScript codebases, and I want to bring it back to the modern age of JavaScript. While working on it, I took some notes and posted them in my notes section. I cover general tasks/changes that you'll have to do to bring an old JavaScript code to modern JavaScript techniques. If you are interested, have a look here:

Ok, that's it for the week. Have a good rest of the week.


Tip of the day

Have you ever wanted to test a command in your shell but you don't want to create a file only for that test. Maybe you are tweaking a regular expression. Wouldn't it be cool to create an inline file that will be discarded after the command is executed? Good news, "in place" files on bash are here to help.

$ cat <<ENDOFMYTEMFILE | sed -e 's/^ *"\(.*\)"$/+ \1/g'

We would get:

+ var
+ assign
+ this
+ window

Bash will take the content of the next line after your command until it finds a line with that has the terminator as the content of your file. I used the terminator ENDOFMYTEMFILE, but you can use anything you like (e.g. EOF, END, etc.).

** If you want to check what else I'm currently doing be sure to follow me on twitter @rderik or subscribe to the newsletter. If you want to send me a direct message you can send it to