DEV Community

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

Jan. 17, 2020: What did you learn this week?

Nick Taylor on January 17, 2020

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 Simp...
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
 
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
 
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
 
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
 
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
 
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
 
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
 
practicingdev profile image
Practicing Developer • Edited

I learned that Pico-8 is a whole lot of fun! It lets you build retro style games using Lua within a (highly constrained) virtual console.

It has very basic tools built into it for creating animated sprites and sound effects, which at first seem far too simplistic but then become fun as a design exercise in minimalism.

It is also very kid-friendly tool as long as they have someone with some coding experience to guide them. Even kids that can't read yet or write code would enjoy playing with the sound effects and sprite editor while someone else writes the code.

Fair warning, documentation is limited and the API is tiny. But because Pico-8 makes it so easy to explore the source of any games shared in public and ships with a few examples of its own, it has a kind of enjoyable "Learn by copy-paste and see what happens" feel to it.

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
 
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
 
aleccool213 profile image
Alec Brunelle

I learned how to migrate existing Typescript codebases over to an Nx monorepo. I am really surprised how wonderful this tool is. They have a great video tutorial on how to use it and after exploring lots of monorepo solutions, Lerna/Rush/Etc, this has been the best experience.

Collapse
 
mjraadi profile image
Mohammadjavad Raadi • Edited

I learned how to run a Proxmox hypervisor server on a dedicated Hetzner Root server. To set up everything the way we wanted was quite tricky and I'll be posting about those soon.

Collapse
 
osde8info profile image
Clive Da

jest and hudson ! loving both !

Collapse
 
apol0x profile image
Apol0x

The meaning of PropTypes.shapes on ReactJs

Collapse
 
stavshamir profile image
Stav Shamir • Edited

I finally started using tmux. I haven't used anything more than the basic panes and windows, but I already love it, yes especially in conjucture with vim!

Collapse
 
scrabill profile image
Shannon Crabill

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

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

Collapse
 
vaibhavkhulbe profile image
Vaibhav Khulbe

GatsbyJS! I love its incredible speed ⚡

Collapse
 
andrasbacsai profile image
Andras Bacsai

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

Collapse
 
silvodesigns profile image
Kevin Silvestre

I learned about using Knex and Sqlite3 library with an express server; also about using migrations and seeds. Back end stuff.

Collapse
 
aumayeung profile image
John Au-Yeung

Learned the hooks API for React Redux.

Collapse
 
aubs profile image
Aubrey

lol

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