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.
Feel free to comment with what you learnt and/or reference your TIL post to give it some more exposure.
#todayilearned
And remember, if something you learnt was a big win for you, then you know where to drop it as well.đđđ»đđŒđđœđđŸđđż
Top comments (29)
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.I don't like it, I want to replace that absolute path with this.
So, what I can do is create a template file and then create
.npmrc
from that.The result on linux should be this:
And if I wanted, I think I could use
curl
to fetch the content of the file and then pipe it toenvsubst
. So technically I don't even need the template in my filesystem.EDIT: Yes,
curl
works like a charm.Nice!
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!
Yeah!
:D
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.
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
Noice!
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.
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...
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.
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 :).
Awesome!
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 đ
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 :)
Nice!