loading...
Cover image for Top 5 DEV Comments from the Past Week
The DEV Team

Top 5 DEV Comments from the Past Week

peter profile image Peter Kim Frank ・1 min read

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 What is key to a great home office setup?, @artemis talks about the value in creating separate "spaces" between home and work:

Create a clear separation between "home" and "work" space.

This allows one to easily "enter" or "leave" work-mode.

You also should probably make another session on your computer, for work only, as to avoid being distracted by "home" stuff (even better, another OS installation with some other, dedicated, disk. SSDs are cheap now).

For a nice separation, a plant wall is pretty and blends in most environment styles, and taking care of it will count as a pause ;)

@mohanarpit talks through their very honest steps to debugging in the What is your debugging approach? thread:

  1. Grep through the logs for any obvious issues or errors. With decent logging, 50% RCA happens here.
  2. Try to replicate the scenario in local environments and see the bug in action.
  3. Keep adding printf statements after each line of execution. Occasionally use the debugger as well on local to triage the issue.
  4. Forget to remove printf statements when committing fix.
  5. Create hotfix commit to remove debug logs 😄
  6. Actually deploy fix to production.

@citizen428 shares a handy alias in response to How to keep your forked repository current:

I've had this alias in my ~/.gitconfig since about 2009:

pu = !"git fetch origin -v; git fetch upstream -v; git merge upstream/master"

Replying to a comment in their own Possibly the Most Useful CSS Trick thread, @xtrp shows a live example with a GIF to highlight the effect:

The "display: none;" style on the button is just a possibility: it may have been better to simply make the button slightly transparent initially, and have it be opaque when the user has typed something, but of course, there are so many ways to implement this.

For example, I am currently building a password manager, which uses the placeholder-shown trick to display an arrow icon for entering the password-vault when the user has typed content into the password field.

Password Manager Placeholder Shown Demo

In the spirit of #hacktoberfest, @colbymelvin replied to a call for contributors, submitting their fix for an issue described in Call for DEV Contributors: Posts on front page do not load until scrolled down 🐛:

I submitted #4279, which should fix this issue

Be sure to check out the #hacktoberfest tag for more great articles an discussions.

See you next week for more great comments ✌

Posted on by:

peter profile

Peter Kim Frank

@peter

Doing a bit of everything at DEV.

The DEV Team

The team behind this very platform. 😄

Discussion

markdown guide
 

Congrats to @artemis , @mohanarpit , @citizen428 , @xtrp , and @colbymelvin for making the list this week!

 

Thanks a lot for the shout out & all the support @peter !