DEV Community

Cover image for Jan. 17, 2020: What did you learn this week?
Nick Taylor
Nick Taylor

Posted on • Updated on

Jan. 17, 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.

![Homer Simpson studying](https://media.giphy.com/media/IPbS5R4fSUl5S/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.👇👇🏻👇🏼👇🏽👇🏾👇🏿

![Bender from Futurama dancing](https://media.giphy.com/media/mIZ9rPeMKefm0/giphy.gif)

Oldest comments (39)

Collapse
 
osde8info profile image
Clive Da

jest and hudson ! loving both !

Collapse
 
richardeschloss profile image
Richard Schloss • Edited

I learned that javascript has a built-in keyword "debugger" so that wherever you write that word, the debugger will stop at that point in code (if you have a debugger, such as the Chrome dev tools debugger). This can be useful if your runtime code is uglified, as in this article's cover image, in which case it would be a timely process to find the exact line you want to set a breakpoint on. Instead, a dev can simply do:

function myCodeAintWorkin(arrrrgggh) {
  let thisThing;
  debugger; // <-- runtime will break at this point! (even if this line is buried in the uglified code at line 1112442)
  // Some buggy code here
} 
Collapse
 
monicat profile image
Monica Macomber

debuggger will for sure bless your life 👌

Collapse
 
nickytonline profile image
Nick Taylor

If you're looking for some more great debugging tips, give @umaar a follow. He's not really active on DEV, but he has links to his Twitter and website/newsletter. I mention this in my post on frontend tools.

Collapse
 
scrabill profile image
Shannon Crabill

I was using a console.log() for the millionth time this week when I remembered debugger was a thing.

Collapse
 
nickytonline profile image
Nick Taylor

Side note, but there are also logpoints if you don’t want to clutter your actual code.

Nice post. Definitely some great console methods to know!

The more you know

Logpoints are also pretty useful depending on your debugging style.

They've been available in VS Code since June of last year, but they also got introduced in Chrome 73, and added in FireFox 67.

Collapse
 
dvddpl profile image
Davide de Paolis

I rewrote the entire stack of one of our applications - built with serverless framework - using the AWS CDK. It is AWESOME!!!
awesome

Collapse
 
aubs profile image
Aubrey

SDK

Collapse
 
dvddpl profile image
Davide de Paolis

no. it´s AWS CDK - Cloud Development Kit - It´s a relatively new tool to write Cloud Formation Templates using typescript/nodejs or other languages :-)

Collapse
 
thfsilvab profile image
Thadeu

Finally learned Docker :D
Still testing stuff in the Docker Compose file but yeah, the concept and the Dockerfile are pretty clear to me!!!

Collapse
 
osde8info profile image
Clive Da

are you running docker natively or in a vm ?

Collapse
 
thfsilvab profile image
Thadeu

Installed it natively for Windows, making my tests with Linux containers though (hyperV still needed :/). I'm getting hyped to install Ubuntu in my computer (into another partition).

Thread Thread
 
osde8info profile image
Clive Da

hehe :) dont use a partition and dont use ubuntu for docker try xubuntu in a virtualbox vm :)

Thread Thread
 
thfsilvab profile image
Thadeu

Thanks for your guidance :D

Thread Thread
 
aubs profile image
Aubrey

just install ubuntu as your overall "f me help me stackoverflow" experience will be much better

Collapse
 
leob profile image
leob • Edited

To call it "learn" is a big word, but I realized that Gatsby is a powerful piece of tech for a number of use cases, and that (as a static site generator) it can largely replicate the features of SSR but in a much simpler way; definitely worthwhile spending some time on it.

Collapse
 
monicat profile image
Monica Macomber

I learned about memoization!

Started out researching React hooks, came across useMemo, couldn't make sense of the definition, then finally found this article to explain it.

And some day I'll finish reading up on useMemo 😝

Collapse
 
aubs profile image
Aubrey

Best is to know the why..

en.wikipedia.org/wiki/Memoization

then on why/how

github.com/reduxjs/reselect

Collapse
 
deciduously profile image
Ben Lovy

I learned how to use Phabricator to collaborate on software. It's wonderful!

Collapse
 
nahueldev profile image
Nahuel

I learned about the power of the Hooks in React

Collapse
 
andrasbacsai profile image
Andras Bacsai

I learned that some Olsen timezone names are different in the browser that officially documented / available.

Collapse
 
amorpheuz profile image
Yash Dave

I read up on how to write unit tests for python via unittest! Also learnt how to get docker images running.

Completely off-topic and weirdly I finally sought out why my keyboard keeps correcting "learned" to "learner" and whether it actually is a word (vs. learnt) after being inspired by this thread while typing out the actual comment 🤣🤣🤣

Collapse
 
stavshamir profile image
Stav Shamir

Good job, test are important! Checkout pytest as well, it's a great python unit testing framework

Collapse
 
mnepita profile image
Martin Nepita

Hello! this week has been all about JavaScript Objects and DOM manipulation. Still debating between jQuery or Vanilla JavaScript to play around with the DOM.

I have been playing with Gatsby and Netlify in order to publish my own personal blog.

Collapse
 
monicat profile image
Monica Macomber

My two cents: I'd go with regular JavaScript or maybe even Vue.js. You can import Vue as a file just like you would jQuery.

I made an interactive page with jQuery a few years back and was absolutely kicking myself for not using Vue after I realized how much simpler it would have been. 😐

Collapse
 
aubs profile image
Aubrey • Edited

I agree vanilla JS as jquery is a dead rabbit..
vue or react is a choice you can make..

though due to a school thing you may need to take the easy way out which is jquery as your teacher wants that... chicken or an egg? be the future!

Be the difference! (svelte lol)

Thread Thread
 
mnepita profile image
Martin Nepita

Hello Aubrey, I think React is the way to go, I have read a lot of good reviews about that framework.

Funny thing, I was reading this article React vs Svelte on which the author built the same To-Do app using both framework, very interesting reading.

Have a nice day.

Collapse
 
mnepita profile image
Martin Nepita

Thank so much Monica for your comments. I've found jQuery is making my life a little bit easier when it comes to selecting elements, add animations, and working with events overall.

Also thanks for recommending Vue, I will be taking a look into it.

Best,

Martín.

Collapse
 
aumayeung profile image
John Au-Yeung

Learned the hooks API for React Redux.

Collapse
 
scrabill profile image
Shannon Crabill

fetch() requests make so much more sense now! The world of APIs are now at my fingertips.

Collapse
 
apol0x profile image
Apol0x

The meaning of PropTypes.shapes on ReactJs

Collapse
 
aubs profile image
Aubrey

every developer is blinded by his own ideas... (actually did not learn this, this week.. known this for years.. though unexpectedly my boss...).. so my yoyo for the week