DEV Community

Cover image for September 9th, 2021: What did you learn this week?
Nick Taylor
Nick Taylor

Posted on

September 9th, 2021: What did you learn this week?

It's that time of the week again. So wonderful devs, what did you learn this week? It could be programming tips, career advice etc.

![A picture it a dog waving their paw with the caption “Learning, cool at school or at home”](https://media.giphy.com/media/1xpm1nTQiRL96Di3Q6/giphy.gif)

Feel free to comment with what you learnt and/or reference your TIL post to give it some more exposure.

#todayilearned

Summarize a concept that is new to you.

And remember, if something you learnt was a big win for you, then you know where to drop it as well.👇👇🏻👇🏼👇🏽👇🏾👇🏿

![Drama from Entourage screaming “Victory!”](https://media.giphy.com/media/lnlAifQdenMxW/giphy.gif)

Top comments (29)

Collapse
 
vonheikemen profile image
Heiker • Edited

I learned about envsubst. I wish I knew about this before. This utility can substitute environment variables in a string that come from stdin.

I don't have many use cases for this but I think it would be very useful in config files that I share across multiple machines.

Quick example. Somewhere in a github repo I have a file called .npmrc, which I copy to any new machine I get. Inside that file I have this.

prefix=/absolute/path/to/npm/packages
Enter fullscreen mode Exit fullscreen mode

I don't like it, I want to replace that absolute path with this.

prefix=$XDG_CONFIG_HOME/npm/packages
Enter fullscreen mode Exit fullscreen mode

So, what I can do is create a template file and then create .npmrc from that.

envsubst < ~/templates/npmrc > ~/.npmrc
Enter fullscreen mode Exit fullscreen mode

The result on linux should be this:

prefix=/home/user/.config/npm/packages
Enter fullscreen mode Exit fullscreen mode

And if I wanted, I think I could use curl to fetch the content of the file and then pipe it to envsubst. So technically I don't even need the template in my filesystem.

EDIT: Yes, curl works like a charm.

curl -s "https://raw.githubusercontent.com/<my-user>/<some-repo>/main/npmrc" \
  | envsubst > ~/.npmrc
Enter fullscreen mode Exit fullscreen mode
Collapse
 
nickytonline profile image
Nick Taylor

Nice!

A kangaroo playing an electric guitar

Collapse
 
rubix982 profile image
Saif Islam • Edited

This week, I had,

  • A few things at home to windup and get fixed

  • Started University again, 7th semester. Learning about the .NET Framework, Information & CyberSecurity, Professional Practies & Ethics In IT, and finally, I have a my first class tomorrow for "Design, Defects & Restructuring"

  • I had some free time this week ... so I started working towards a quick specialization, "Computer Security and Systems Management Specialization", coursera.org/specializations/compu.... I've just started the 2nd out of 4 courses from the specialization.

  • Podcast habit. I've been continuously listening to podcasts whenever I can. I think I've listened to about 4-5 sessions already - and I'm really excited to listen to more

  • Managed sleep schedule - I count this as an achievement with my ongoing Uni

  • Spent quality time with friends - for me, this is very essential. Life behind a screen can sometimes become boring

  • Choose Open Source projects that I'll be contributing to over till next year starts. Yay!

  • Just published an article on dev.to! dev.to/rubix982/a-brief-discussion...

  • Will be staying in touch with the Jenkins team on Slack to contribute to the "Jenkins Summit - DevOps World"! Woohoo!

Collapse
 
nickytonline profile image
Nick Taylor

Yeah!

A T-Rex saying Yeah!

Collapse
 
rubix982 profile image
Saif Islam

:D

Collapse
 
jonoyeong profile image
Jonathan Yeong

Learning about Character Encoding for strings! Here's a snippet from my permanent note:

Every character that we see is represented as a number on the computer. To be specific, it's a series of bits. But this process of transforming a visual character into a number is done through character encoding. Character encoding is a map for the computer to transform this number into the character we see. It's a cipher, a key, to crack the code.

Collapse
 
nickytonline profile image
Nick Taylor

Shia LeBoeuf in character saying Magic!

Collapse
 
behnoodeghbali profile image
Behnood Eghbali • Edited

I learned how to fetch URLs and how to write HTTP web services in Go. Here's an interesting talk by Mat Ryer about writing HTTP web services at GopherCon 2019: youtube.com/watch?v=rWBSMsLG8po

Collapse
 
nickytonline profile image
Nick Taylor

Noice!

Noice!

Collapse
 
piratax007 profile image
Fausto Mauricio Lagos Suárez • Edited

I learned about assert statements and decorators. The first one is such a tool to debug your code and the second one is a way to modify an object, function or method without altering his code. Decorators are a wonderful way to reuse code adding functionalities.

Collapse
 
nickytonline profile image
Nick Taylor

Actor Leonardo DiCaprio as Gatsby doing a cheers

Collapse
 
seankimdev profile image
Sean Kim

I learned to use Material UI. A quick and simple way to style a React app.
It took some time getting used to its setup, but definitely worth it. The tutorial video below by The Net Ninja helped a lot.

m.youtube.com/playlist?list=PL4cUx...

Collapse
 
nickytonline profile image
Nick Taylor

Hot Rod saying Cool beans!

Collapse
 
nyarehd profile image
Nyareh David • Edited

Not related to coding but I've learnt very valuable lesson that kept wasting my time for months.
Linux.
I thought linux might be better for programming than window so I tried to switch to linux full time.It was a disaster. I needed to spend many hours troubleshooting things that didn't exist on window.
Now, I have accepted and learned that coding on window is OK.

Collapse
 
peter279k profile image
peter279k

I learn how to use the Firebase and Google Cloud Function to deploy my web crawler and let my web crawler be a API service on the FaaS computing :).

Collapse
 
nickytonline profile image
Nick Taylor

Awesome!

Hackerman from Kung Fury putting on a Nintendo Power glove

Collapse
 
eddyvinck profile image
Eddy Vinck

I learned how much work it really is to launch a product. I also learned how addictive it is to get Gumroad sales notifications while sleeping or working my job 😆

Collapse
 
nickytonline profile image
Nick Taylor

A crab dancing

Collapse
 
vaibhavkhulbe profile image
Vaibhav Khulbe

Just started with TypeScript! I am doing it all with its docs. It's well written and easy to consume if you have a good JS knowledge :)

Collapse
 
nickytonline profile image
Nick Taylor

Nice!

Nice

Collapse
 
kayis profile image
K

I started to dive into the Web3 space. Pretty exciting stuff, but a vast field and everything still its infancy.

Collapse
 
nickytonline profile image
Nick Taylor

It's True - Dwight Shrute

We did a web3 stream with @dabit3 last week that you might find interesting. DAOs, NFTs, all the things!

Collapse
 
laraibi profile image
Laraibi Mehdi

trying to create a real chat system with laravel and vue js.

so a lot of new stuff learned : webScokets, Laravel Echo .. Vuex .. and more ...

Collapse
 
nickytonline profile image
Nick Taylor

Jean-Luc Picard from Star Trek TNG saying Well done!

Collapse
 
ifierygod profile image
Goran Kortjie

I learned that it takes one hour everyday for several months to actually understand something.

Collapse
 
nickytonline profile image
Nick Taylor

Let's go!

A kid twirling in a cowboy outfit firing pistols that are their fingers

Collapse
 
rakeshsagar64 profile image
Rakesh Sagar

I learnt some interesting things about mysql here's the link to the lazily written post about it.
dev.to/rakeshsagar64/til-mysql-stu...

Collapse
 
nickytonline profile image
Nick Taylor

BB-8 giving a thumbs up

Collapse
 
adriens profile image
adriens • Edited

Had a lot of fun while playing with the Collatz conjecture with Neo4J, yEd and Gephi

dev.to/adriens/about-the-collatz-c...