loading...
Cover image for Feb. 14, 2020: What did you learn this week?

Feb. 14, 2020: What did you learn this week?

nickytonline profile image Nick Taylor (he/him) ・1 min read

Weekly Learnings 2020 (31 Part Series)

1) Jan. 3, 2020: What did you learn this week? 2) Jan. 10, 2020: What did you learn this week? 3 ... 29 3) Jan. 17, 2020: What did you learn this week? 4) Jan. 24, 2020: What did you learn this week? 5) Jan. 31, 2020: What did you learn this week? 6) Feb. 7, 2020: What did you learn this week? 7) Feb. 14, 2020: What did you learn this week? 8) Feb. 21, 2020: What did you learn this week? 9) Feb. 28, 2020: What did you learn this week? 10) Mar. 6, 2020: What did you learn this week? 11) Mar. 13, 2020: What did you learn this week? 12) Mar. 20, 2020: What did you learn this week? 13) Mar. 27, 2020: What did you learn this week? 14) April 3, 2020: What did you learn this week? 15) April 9, 2020: What did you learn this week? 16) April 17, 2020: What did you learn this week? 17) April 24, 2020: What did you learn this week? 18) May 1st, 2020: What did you learn this week? 19) May 8th, 2020: What did you learn this week? 20) May 15th, 2020: What did you learn this week? 21) May 22nd, 2020: What did you learn this week? 22) May 29th, 2020: What did you learn this week? 23) June 5th, 2020: What did you learn this week? 24) June 12th, 2020: What did you learn this week? 25) June 19th, 2020: What did you learn this week? 26) June 26th, 2020: What did you learn this week? 27) July 3rd, 2020: What did you learn this week? 28) July 10th, 2020: What did you learn this week? 29) July 23rd, 2020: What did you learn this week? CodeLand Edition 30) July 31st, 2020: What did you learn this week? 31) August 6th, 2020: 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.

Learn new things

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.👇👇🏻👇🏼👇🏽👇🏾👇🏿

Johnny Rose from Shitt's Creek giving a high-five

Discussion

markdown guide
 

I learned that in 2020, in NodeJS, the thing to use now for streams is the built-in pipeline. Previously we dealt with streams like this:

res.pipe(outStream) // Pipe an http response to a destination

A few years ago, we were told to use pump, a separate module in npm. But now, pipeline is built into NodeJS and you can just use that!

So, pipelining can now look like this:

pipeline(res, outStream)
.then(handleDone) // .then if you promisified "pipeline"
.catch(handleError)

This way, you can have an array of streams that might be conditionally set:

const streams = [res]
if (res.headers['content-encoding'] === 'gzip') {
  streams.push(createGunzip())
}
streams.push(outStream)

pipeline(...streams) // We can now use the spread syntax with pipeline. 
...

(FYI: it's also a good idea to read about Backpressuring in Node)

 

I've been having some issues with my GIT repo and this is my lesson of the week: When in troubles, use --force.

 

When in troubles, use --force.

Battling a git repo

 
 

I learned different ways of adding CSS to React components (inline, in global css file and using Radium). :)

 

Nice! Just FYI, Radium from Formidable is a little older in the CSS in JS space. If you're new to the CSS in JS space, styled-components and Emotion are great libraries to check out as well and provide more functionality.

Keep learning! 🔥

 

Yeah I'm really new to CSS in JS, I'm switching from Angular to React so they're quite different in this aspect. I will definitely try them out. Thanks a lot for letting me know ^_^

 

I dove deep into the data structure hash tables. I learned about which instances they should and shouldn't be used for in regards to code efficiency.

 

I learned how (and why) to combine .editorconfig and Prettier.

Prettier uses some of editorconfigs config.

 

I got to know about creating a server with Express thanks to Brian Holt's Intro to Web Development .v2 course on Frontend Masters.

 

I learned jwt authentication using vue.js and django rest framework this week

 

I learned the shortcut to find and replace in VS Code shift + H

 

I learned React & Rails this week!

 

Made a parking finder app on android native using the good old maps sdk and firebase realtime database

 

I learn how to let go stuff I have no control on.

 

Félicitations, puis moins stressant. A+

 

I'm learning about how to build a design system and how it works 🎨