DEV Community

Cover image for Top 5 DEV Comments from the Past Week
Peter Kim Frank Subscriber 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.

@ryansmith left a great comment in the React vs Vue: Compare and Contrast thread:

Here's my take on it:

React

  • Aims to be a library concerned with rendering UI and it stays true to that purpose. It is unopinionated on how to build apps.
  • In most use cases, having just a library for rendering UI is not enough, so other packages are typically added (create-react-app with routing, CSS-in-JS, state management, etc.) to improve the experience. With the add-ons, a React app becomes more framework-like.
  • Templating is done with JSX which are HTML-like elements plus standard JavaScript to create conditionals or loops.
const todoItems = todos.map((todo, index) =>
  <li key={index}>
    {todo.text}
  </li>
);
Enter fullscreen mode Exit fullscreen mode
  • Less domain-specific language as most constructs use standard JavaScript. This can steepen the learning curve but will help improve JavaScript language skills.

Vue

  • Its purpose is also to render UI, but it has added convenience as official parts of the ecosystem (Vue CLI, Vuex, Vue Router). It is not necessarily opinionated or rigid, but it gives more guidance and convenience to build apps.
  • By default, Vue components are separated into a template, scripts, and styles to separate concerns.
  • The templates use directives, which are custom Vue attributes added to HTML elements to output dynamic content that requires an if-statement, loops, etc.
<ul id="example-1">
  <li v-for="item in items" :key="item.message">
    {{ item.message }}
  </li>
</ul>
Enter fullscreen mode Exit fullscreen mode
  • More domain-specific language to learn, which can lessen the learning curve but you may not pick up as much JavaScript knowledge.

@madarsbiss shared their 80/20 rule derivation in What are your worst habits as a developer?:

Hofstadter's Law:
Showing client the project at 80% and forgetting the remaining 20% takes 80% of time.

In the same thread, @botanical followed up with their habit:

One of my worst habits as a developer is being too much in my head and forgetting about my body. By that I mean ignoring my need to use the restroom, having bad posture, and forgetting to eat at times >_<

@mrrcollins tugged at the nostalgia heartstrings with this still-functional submission to Workspace Wednesday: Show me pics of your at-home setup:

@jakesweb offered their take in Should remote workers be paid differently based on location?:

Workers should always be paid for their work. I believe it to be as simple as that. When you are paid a salary, you are paid for the skills, knowledge, and time you invest in the work. Someone working from New York would have the same working experience as someone living in any other part of the world.

See you next week for more great comments ✌

Top comments (4)

Collapse
 
peter profile image
Peter Kim Frank

Congrats to @ryansmith , @madarsbiss , @botanical , @mrrcollins , and @jakesweb for making the list this week!

Collapse
 
ryansmith profile image
Ryan Smith

Thank you!

Collapse
 
madza profile image
Madza

thanks :)

Collapse
 
salihbezai profile image
salihbezai • Edited

Alt text of image
A lot