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 (39)
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:
I was using a
console.log()
for the millionth time this week when I remembereddebugger
was a thing.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!
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.
debuggger
will for sure bless your life 👌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.
Frontend Developer Resources
Nick Taylor (he/him) ・ Jan 6 ・ 11 min read
Finally learned Docker :D
Still testing stuff in the Docker Compose file but yeah, the concept and the Dockerfile are pretty clear to me!!!
are you running docker natively or in a vm ?
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).
hehe :) dont use a partition and dont use ubuntu for docker try xubuntu in a virtualbox vm :)
Thanks for your guidance :D
just install ubuntu as your overall "f me help me stackoverflow" experience will be much better
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.
Optimize the hell out of your Javascript programs with Memoization.
Ola' John Ajiboye ・ Jul 23 '19 ・ 4 min read
And some day I'll finish reading up on useMemo 😝
Best is to know the why..
en.wikipedia.org/wiki/Memoization
then on why/how
github.com/reduxjs/reselect
I rewrote the entire stack of one of our applications - built with serverless framework - using the AWS CDK. It is AWESOME!!!
SDK
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 :-)
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.
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. 😐
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)
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.
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.
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.
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 🤣🤣🤣
Good job, test are important! Checkout pytest as well, it's a great python unit testing framework
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.
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.
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.