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.

The discussion of How many programming languages do you know? generated two particularly great replies. First, @deciduously offers a good-hearted response:

If my search history is any indication, zero.

@kenbellows follows up later in the thread with three "themes" across different programming languages:

I agree with you in general that understanding a single language at a very deep level will let you easily pick up many, many others, but I don't think one is enough to cover everything, because I think there are a few different fundamental threads in programming languages that different enough that being deeply familiar with one will not prepare you for the others.

I'd probably argue that there are three major threads:

  • imperative languages — Languages in which the main thing you do is write down a list of steps for the computer to follow in order. This is probably the 75% case. This covers everything from low-level C or Go, to Object Oriented languages like Ruby or Java, to more scripty languages like Python, Perl, or JavaScript.

  • functional languages — Languages in which the main thing you do is define how to solve very small problems independent of the main task of the program, then wire these smaller problems together to solve bigger problems. It is certainly true that many of the imperative languages above have functional aspects to them and can be used in a functional style, especially flexible, interpreted languages like Ruby, Python, and JavaScript. However, in my experience there's a big difference when you step into a purely functional language like Lisp or Haskell, and writing imperative code in a more functional style won't fully prepare you.

  • declarative languages — Languages in which you don't really give the computer a list of instructions, but instead you describe the problem for the computer to solve, or sometimes the outcome you desire, and let the machine fill in the blanks. This is a rare breed of language and is often found as an ability of languages that otherwise fall under one of the two above categories, though explicitly declaritive languages do exist. My main exposure to this paradigm is through Prolog, a Turing-complete logic-based language in which you feed the system a set of facts and relationships then ask it questions. Constraint programming, in which you hand the system a set of rules or conditions that must be followed in solving a problem then let the system work out a satisfactory solution, would fall under this label as well, and Oz seems to be a popular language choice, though I haven't used it.

Of course, as I alluded to above, many (most?) languages fall at least somewhat into more than one of these categories, and they are probably better thought of as "paradigms" or "approaches" of programming rather than "types of language". What I'm really trying to get at is that I think it's super valuable to pick a language or two from each of these different categories or paradigms and spend some free time digging in deeply and really wrapping your head around each of these very different perspectives.

I took a course during college called "Programming Languages" in which we had three big programming projects: one in Java, one in Racket (a flavor of Lisp), and one in Prolog. This was, in my opinion, one of the most valuable courses I ever took, and probably one of the most valuable coding-related experiences I've ever had, because it forced me to really lean into these three different perspectives and actually use them enough to make something substantial. It showed me how much variety there can be in how we talk to computers.

I highly recommend this as a personal project for anyone who wants to broaden their mind. First, go through a tutorial for some flavor of Lisp (Racket is a nice introductory one, though everyone has their fav) and write something non-trivial, like a Tic-Tac-Toe player or something. Next, go through a tutorial for Prolog and write something else non-trivial, like a simple chatbot based on Markov chains or something. It's a wild ride.

@isaacdlyman offers thoughtful response to What’s the most under-appreciated software?:

Microsoft Excel. Seriously.

  • The only database that the average person can use without training
  • Handles gigantic data volumes with extreme efficiency
  • Does everything. Like, I regularly discover new features, and no matter how obscure they are, they always work perfectly
  • Does massively complex calculations without a hitch
  • A non-negotiable dependency of almost every industry and profession
  • Dependable and consistent in a way that 99% of software cannot hope to achieve
  • Completely scriptable

@thatonejakeb adds their suggestion to What's the best thing to do when you've run into a debugging dead end?:

Turn off the computer and go for a walk.

@samuraiseoul chimed in to the 9 Extremely Useful HTML Tricks thread to talk more about datalist tag, and to offer a cool trick of their own:

<3 <3 <3

I LOVE the datalist tag and appreciate anyone who helps evangelize it! It can also be combined with autocomplete='off' on the element that its used with so that you don't get annoying values in there. For instance if you have a list of employees and the type of the input is set to email, you wouldn't want all of your emails that you use to be autocompleted.

Also you can add stuff into option for better autocomplete.

<datalist id='emails'>
    <option value='arty@example.com'>Arty Adams</option>
    <option value='bobby@example.com'>Bobby Boi</option>
    <option value='cathy@example.com'>Cathy Chatty</option>
    <option value='dorothy@example.com'>Dorthy Doraimon</option>
    <option value='esther@example.com'>Esther Enemy</option>
    <option value='freddy@example.com'>Freddy Fishmonger</option>
    <option value='genna@example.com'>Genna General</option>
    <option value='holly@example.com'>Holly Hollandaise</option>
    <option value='ingrid@example.com'>Ingrid Ingot</option>
    <option value='julia@example.com'>Julia Jumper</option>
<label>Autocomplete Email(Scroll down in drop down to see your values): 
  <input type='email' list='emails' name='email'/>
<label>Autocomplete Off Email: 
  <input type='email' list='emails' name='email' autocomplete='off'/>

with this searching names, or email will work. Even partials like 'ty@examp' will work and only bring up Arty.

The above example can be seen in this fiddle: jsfiddle.net/t2qb90vu/

See you next week for more great comments ✌

Posted on Dec 17 '19 by:

peter profile

Peter Kim Frank


Doing a bit of everything at DEV.

The DEV Team

The team behind this very platform. 😄


markdown guide

First of, I'd like to thank the humble transistor, for making all of this possible. I'd like to thank other things and people too but I can't count that high.


These are some really good ones this week!


I do enjoy your best dev.to comments compilations, but I bet it gets tiring to do it every week ...