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
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.👇👇🏻👇🏼👇🏽👇🏾👇🏿
What was your win this week?
Gracie Gregory (she/her) for The DEV Team ・ Sep 10 '21
#discuss
#weeklyretro
Oldest 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
.npmrcfrom that.The result on linux should be this:
And if I wanted, I think I could use
curlto 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,
curlworks like a charm.Nice!
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!
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 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!
I learned that it takes one hour everyday for several months to actually understand something.
Let's go!
I learnt some interesting things about mysql here's the link to the lazily written post about it.
dev.to/rakeshsagar64/til-mysql-stu...
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...
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.