DEV Community

Cover image for Top 5 DEV Comments from the Past Week
Peter Kim Frank for The DEV Team

Posted on


Top 5 DEV Comments from the Past Week

This is a weekly roundup of awesome DEV comments that you may have missed. You are welcome and encouraged to boost posts and comments yourself using the #bestofdev tag.

Replying to My Favorite Teachers In The JavaScript Community, @alemesa adds some more great names to the list:

This list is great but is missing some unicorns:

The Udemy band rocks too

@denmch replied to Use $ & $$ Instead of document.querySelector/All in JavaScript without jQuery with some additional tips about using trivially longer identifiers:

If you work on a distributed team or with legacy code, and considering the potential for conflict (mostly with jQuery but some other libraries, and any code where someone may have used $ for document.getElementById(), as used to be common), I think it'd be a good idea to use trivially longer identifiers like this:

const $q = document.querySelector.bind(document);
const $qa = document.querySelectorAll.bind(document);
Enter fullscreen mode Exit fullscreen mode
Enter fullscreen mode Exit fullscreen mode

Enter fullscreen mode Exit fullscreen mode

This is similar to a common method of using jQuery in noConflict mode, e.g.:

const $j = jQuery.noConflict();
Enter fullscreen mode Exit fullscreen mode
Enter fullscreen mode Exit fullscreen mode

Enter fullscreen mode Exit fullscreen mode

It could be judiciously extended for similar methods if you use them often enough.

Enter fullscreen mode Exit fullscreen mode

The Learning to love software development books 💙 was a great discussion about learning through books, as opposed to online videos and tutorials. @lokidev chimed in with some recommendations:

I absolutely love programming books. I even more love the general purpose books (like mythical man month - a book still on my book pile).

The best multi purpose software engineering/programming books I've read were:

  • The Pragmatic Programmer (Thomas Hunt)
  • Clean Coder (Robert C. Martin)
  • The Clean Coder (Martin again)
  • Clean Architecture (and again :D)

Language specific:

  • Python: Test-driven Development with Python (Harry J.W. Percival) - the book can be bought but is also free online readable ->
  • Nim: Nim in action
  • Go: Building Microservices in Go

Still on my pile:

  • The Mythical Man-Month
  • Product Leadership
  • Peopleware
  • Code Complete
  • Rapid Development
  • (and a lot of fictional books)

The Workspace Wednesday: Show off your desk/computer setup! was a fun opportunity to showcase our desks and workspaces. Plenty of people were liking @steveblue's setup:

My workspace is a work in progress for sure, but I like it! This is the desk I use working 100% remote.

Finally, in CSS Is Hard - How do you learn to use and write CSS properly? , @horus_sky provided a number of tips for learning CSS. This comment could probably be converted to a great article 😉:

TBH I don't think CSS is hard. Like any other language, if you are not working with it consistently, it won't stick. I find JS hard due to it not being the language I work with continously. With that said, I would say:

Learn the Basics first

  • Stay abreast to the basics before trying a framework.
  • Always keep a resource open,,, or Mozilla.

Learn layout techniques before frameworks

In many cases you don't really need a framework if you learn how to utilize grid and flexbox. However, I use them in conjuction with Bootstrap. Either way, these techniques are quite powerful on their own.

Conquer the Cascade with Specificity

If you ever find yourself wondering why a style is being overwritten, it maybe due to a class being to general and not specific enough. This is where CSS Specificity comes in.

Learn to Center All the Things

There are cases where you may need to center an inline element, block element, flex, grid element, or plain text. There are best and different practices for each case.

Next Step Advance Learning

Once you are more advanced and comfortable with the basics and all of the above, try:

BEM: (Block‑Element‑Modifier)

SASS: (Syntactically Awesome Style Sheets)

Tools for Sass:

Hopefully this helps.

See you next week for more great comments ✌

Top comments (1)

peter profile image
Peter Kim Frank

Congrats @alemesa , @denmch , @lokidev , @steveblue , and @horus_sky for making the list this week!

An Animated Guide to Node.js Event Loop

Node.js doesn’t stop from running other operations because of Libuv, a C++ library responsible for the event loop and asynchronously handling tasks such as network requests, DNS resolution, file system operations, data encryption, etc.

What happens under the hood when Node.js works on tasks such as database queries? We will explore it by following this piece of code step by step.