Newsletter #8 - Bash

Sébastien Dubois / May 23, 2020

5 min read

Welcome to the 8th edition of DeveloPassion's newsletter.

Before we start, I'd like to ask all of you to help me out a bit. If you find this newsletter interesting, then please do take a bit of time to share this link to others on social media:

With your help, others will also get a chance to discover and enjoy reading it. As an added benefit, it'll also motivate me to continue the experience! Don't forget that you can also follow me on Twitter and Medium where i publish my articles.

TypeScript news

TypeScript 3.9 is here. Now we just have to be patient for all of our tooling/frameworks to support it. I'm currently stuck "because of" Angular, but it'll support it real soon. As a matter of fact RC0 of Angular 10 is out:

While we're at it, note that I've published an article about what might be coming with TypeScript 4.0: Of course there aren't that many certainties at this point, but at least a part of what I've explained in the article should be coming soon in TS land ;-)

By the way, a while ago I've also published an article about type-only imports, which provide a clean solution to a little but annoying issue when you're using types only as types and never as values.

Why you should stop installing npm packages globally

Today, I've published an article about why installing npm packages globally doesn't make sense to me anymore. I have maybe 1-2 packages installed globally. For the rest, I rely solely on project dependencies and npx, which provide much better solutions.

Keep Bash-ing

Those who know me are certainly aware that I'm a big fan of Bash. I always have (at least) one terminal open, ready to serve me.

As a scripting language, Bash isn't that great, and it's not really the part I love the most. I like it for its ubiquity, but the syntax is really painful. Compared to Bash, PowerShell just feels soooo much cleaner. Having been a Windows sysadmin for a while and having a programming background, I really dug into it and could see how powerful it is. But I'll write about PowerShell another day ^^.

No, what I enjoy most about Bash is not really the scripting. It's rather its support for aliases and functions, which I really use all the time.

I wrote an article about this, highlighting cool things that one can do with Bash (or Fish, or zsh :p); you can check it out here:

Git concepts series

I think that many Git users stick to the real basics because they don't truly understand the core concepts. Using Git without understanding it clearly (I don't mean the internals :p) is really sad. Git is a tremendously powerful tool but, as with anything else, it requires quite a bit of time to really master it.

There are already quite a lot of great tutorials/courses about Git, but I wanted to have a go at explaining it. This is why I've started writing a series about Git concepts. So far, I've published two articles.

The first one explains what it means for Git to be a distributed version control system:

The second one explains the different areas to be aware of when using Git: the working tree, the index and the repository. You can find it here:

Over the next couple of weeks, I'll continue this series, progressively going from basic concepts like branches and commits to more advanced ones like remotes, fetch, merge, rebase, etc. I hope that these articles will prove useful to some people! :)

Angular route vs scrolling

Out of the box, Angular's router provides support for handling scrolling automatically when navigating from route to route, whether via routerLink, back/forward Web browser buttons or otherwise.

Unfortunately, that support isn't all that great. In my current project, I've had to spend a whole evening hacking around to make it work as I wanted. I took the opportunity to share my solution and explain it in the following article:

What I did is create an Angular service that keeps track of the scroll position so that it can be properly restored when navigating. But I went a tad further and added support for defining the scroll behavior through route data. Thanks to that, I can now easily define how the scrollbar should react (or not) when navigating to specific routes.

This solution ain't perfect, but it is at least clean and functional. Hopefully Angular will provide a better solution for this in the future!

That's all folks!

I'm really interested to hear about what you think of this newsletter. If you have remarks, ideas/articles to share, then please don't hesitate to contact me through Twitter ( DMs are open.

If you find this newsletter interesting, then please share the link around:

Don't forget that you can also follow me on Medium where I currently publish my articles:

See you next time!

PS: check out my Dev Concepts books, join the Software Crafters community, the Personal Knowledge Management community, and come say hi on Twitter!
Discuss on TwitterEdit on GitHub