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.

@pclundaahl offered some suggestions in response to What can a backend dev do to improve Accessibility?:

Just spit-balling here, but some things to consider might be:

Internationalization. Have your API allow the frontend to pass in a localization field as a header.

Let users change their email addresses, usernames, etc. easily.

Provide support for users who have names that don't conform to standard western conventions. Let people use characters beyond the standard ASCII range. Similar considerations should probably be given to phone number formatting.

Make it easy for users to delete their data.

@joeattardi added some useful tips around git bisect in Track Down Pesky Bugs with git bisect:

git bisect is a life saver! It has saved my bacon several times. If you have automated tests, you can even run bisect on autopilot, if the test has a 0 exit status, it treats it as good, if it has a non-zero exit status, it treats it as bad. Just start it, go get some coffee, and come back to find your bad commit!

see here for more details: lwn.net/Articles/317154/

@jamesthomson shared their UID generator trick in Vue advanced tricks cheat sheet:

One of my favourite tricks (not out of the box) is a simple uid generator for keys.

function uid(e) {
  if (e.uid) return e.uid;

  const key = Math.random()
    .toString(16)
    .slice(2);

  this.$set(e, "uid", key);

  return e.uid;
}
Enter fullscreen mode Exit fullscreen mode

this will add a random uid key to each object in the loop and reuse it when it already exists.

Fiddle: jsfiddle.net/jamesbrndwgn/j2dtkun6/5/

@codebarber offered their advice around How to Maximize Productivity Working From Home?:

Keep a planner, this can be digital or pen and paper.
Review your previous day and move uncompleted items into today's planner.
Take breaks! It is important to get up regularly and walk around. This helps your mind relax and ready for the next task. I've found that taking regular breaks helps me complete tasks quicker.
If you have a home office, keep work in there and everything else out.

Finally, enjoy the fact you can work from home!

@ianturton talked about their experience with open-source projects forking in License to restrict too many forks:

People will only (usually) fork your project if it doesn't do what they want it to do, if you are open with then and accepting of useful pull requests there is no need to fork the project.

Forking is expensive (and divisive) so there is no incentive to do it unless there is a major problem that they want to "fix" and you won't let them. I've been working on open source projects for 25 years now and have only seen one fork in that time (gis.stackexchange.com/questions/11...) so I wouldn't worry about it too much.

The biggest issue I find with open source projects is getting people to contribute to them in the first place. If you look at my repos you will see that most have 1 or 2 stars and a couple of "forks" which indicates a collaborator.

See you next week for more great comments ✌

Top comments (4)

Collapse
 
peter profile image
Peter Kim Frank

Congrats to @pclundaahl , @joeattardi , @jamesthomson , @codebarber , and @ianturton for making the list this week!

Collapse
 
jhermann profile image
Jürgen Hermann

Speaking of comments, congrats for a devilish "666 Comments Written" on your profile.

Collapse
 
pclundaahl profile image
Patrick Charles-Lundaahl

Thanks! That's an awesome surprise!

Collapse
 
peter profile image
Peter Kim Frank

I’ve only been in the Top 5 by raw votes once or twice and I feel like it’s best to spread the love. Plus, I use the vote totals only to create a short list, I still make some editorial selections.