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.

Chiming in on the Habits of a Highly Effective Software Developer, @tonymet provides a great list of tips and habits to try and follow:

Do whatever is necessary to stay in the flow. Flow means typing code. Non-flow means googling, using your mouse, switching windows, coffee breaks.

Here are common interruptions and fixes

  • googling / reading docs
    • download / integrate docs into your IDE (see devdocs) and use man pages. Also, retrieve the sources for your deps and make sure you have auto-complete (ctags) . Avoid googling as much as possible--it's a bad habit.
  • Waiting for builds
    • cache your artifacts to speed up your build, or invest in CI
  • Testing your software
    • make sure you can test quickly using CLI and not with interactive behavior. This usually means a unit suite or command-line experiments you can run. E.g. if you're building a service, write some curls that you can hit with assertions to make sure it works while you are building. If it's a UI write selenium tests.
  • Coding itself is slow
    • activate auto-complete and snippets in your ide. If you're new to the language, do kata to practice common blocks. Can you touch type? If not, learn and play typeracer to speed up
  • distractions (social media, chatting)
    • try rescuetime to identify pitfalls and block distractions

tl;dr Pretend your mouse is electrified. Any time you touch your mouse, think about why and automate it.

Staying on theme of productivity and efficiency, @anndd shares a suggestion in Productivity tools for your MacBook. It's always shocked me that acceptable windows management needs external programs like this:

This list isn't complete without Magnet: itunes.apple.com/pl/app/magnet/id4...

It's crazy that Mac doesn't allow you to arrange windows properly and we need third-party tools for that.

In response to I Can't Do It All: My Burnout Story, @rhymes reflects on the wonderful expression of mutual trust within the story:

Thanks for sharing your story! You really have incredible coworkers.

I mean, to actually do an intervention to help you isn't a small thing. They trusted you and you trusted them. It's incredible :-)

I was the last line of defense.

I'll try not to spoiler anything here but you reminded me of a particular scene in a particular movie involving Captain Marvel :D

The 10 years of remote working. This is what I have learned so far. article is full of hard-won wisdom and insights about remote work. @joefiorini shares their experience:

I did 3 years as a "satellite worker" and I can attest that it is very difficult. For those who have worked in an office, have you ever noticed this situation? You have a meeting to make a decision; after the meeting ends you start talking with some of your coworkers and before you know it you're drawing on a whiteboard and getting some great detail about this topic. Anyone remote is going to completely miss out on this conversation unless someone decides to get them on a video call. And as a remote, even if you know it's happening, if no one is watching the chat you won't be able to get anyone's attention anyway as that's your primary means of communication.

If the team follows some norms, being a satellite worker can work, but I agree with this post that it's VERY difficult. I'm currently trying to find work on a fully distributed team, hopefully that will be better.

To round out the week, we have a productive follow-up to the Understanding the Spread Operator in JavaScript article. @sleepyfran adds a helpful addendum:

Good article! However, I feel like it's important to mention that the spread operator does not perform a deep clone on objects, but rather a shallow copy. This means that the spread operator will copy simple values (such as integers, strings and such) but keep the same references for objects. For example:

const obj = { a: 1, b: { a: 1 } };
const copy = {...obj}
copy.b.a = 2

console.log(obj.b.a)
console.log(copy.b.a)
Enter fullscreen mode Exit fullscreen mode

This prints 2 and 2 because the property b was shallow copied, which makes copy.b point to the exact same object as obj.b.

See you next week for more great comments ✌

Top comments (3)

Collapse
 
peter profile image
Peter Kim Frank

Congrats to @tonymet , @anndd , @rhymes , @joefiorini , @sleepyfran for making the list this week!

Collapse
 
anndd profile image
Anna Su**

Now that I crossed out the only thing on my bucket list, there's nothing else to live for :(

Collapse
 
tonymet profile image
Tony Metzidis

😎