Which programming language/environment is more “powerful” than people realize?

What software tool can do more than people realize or give it credit for?

Did you find this post useful? Show some love!

Not a software tool, but a notebook. Writing what you are going to code/design has saved me countless times. Some "easy" problems turned out to have a lot of edge cases, some hard problems became much easier to approach when I wrote down what made them hard.

Diagrams are far easier to draw on paper. Drawing data structures and flows makes it easier to debug edge cases. Drawing system diagrams helps to identify possible bottlenecks while scaling or possible points of failure.

Also, the notebook doubles down as a To-do list. It is a lot more satisfying to cross-out a task physically than in any app. And it always stays on my desk so there is no question of closing the tab / forgetting to update it.

Most importantly, you can flip through it and have a look at why you made some decision while coding or designing. Also, you can draw doodles when bored :)

Even better, IMHO, is a whiteboard. It's so easy to throw ideas on a whiteboard, and then erase/rewrite over several iterations. When you're done, just snap a pic to archive it.

I like paper beacause I can carry it arround and keep working on it but when I can I use a whiteboard. What I like about the whiteboard is that you can literally step back and have an overview which can help when you're stuck.

I use both paper and whiteboards, for those separate purposes as well.

I kinda agree with this, but I think paper is good mostly for drafts because it can quickly become a huge mess when you have a lot of changes to make, especially on diagrams. Plus it's hard to backup and share paper.

And that's not environment friendly ;)

And about To-dos, at least where I work, it was possible to repeat a to-do multiple times in the same notebook and lose others if tasks got interrupted by other tasks (which used to happen much more frequently than it does currently).

Backup and share paper :-)
getrocketbook.co.uk/products/rocke...

Also, if you use the right type of pen you can microwave the book to erase the pages

I came here to say this. Paper is the best. It helps you see the forest for the trees, and get unstuck.

And it never crashes unless you get it too hot.

Bullet journalling is also a great way to get your thoughts out.

It tends to char a little when you get it too hot though. ;)

Might be too mainstream of an answer, but I still get surprised sometimes about what CSS offers without needing JavaScript. Animations/transitions can all be written without the need for JS. New features like variables, flexbox and CSS grid are making CSS even easier to use.

The combo of HTML/CSS is what has made the web so enduring and durable. It is why so many technologies are now "Make desktop apps with HTML/CSS" (Electron) and "Make mobile apps with HTML/CSS" (React Native, Ionic). HTML/CSS is just one of the best ways to make a solid UI.

I feel this many times when I see animations that CSS can handle made with JavaScript.

AWK

It can do anything with delimited data tables with millions of rows in a few lines of code, as fast as a Go, C counterpart program.

In Python you need to write lots of lines, use third-party libraries to normalize columns with regex, dropping rows, etc. In AWK, it's just a one liner, or you can write it in an *.awk file as well.

AWK is a secret gem for dealing with big data.

Update:

I share my AWK script where I normalize a millions of lines long delimited CSV table only with AWK, as fast as a Go counterpart program:

#!/usr/bin/awk -f

# This block only runs once at the start, before the first line
# Use this to print CSV header on the top
BEGIN {
    FS="|"; # input field separator
    OFS="|"; # output field separator
}

# This block runs at every line
{
    # We will order a new named variable to every column
    line = $0; # variable `$0` stores the entire line
    url = $1;
    title = $2;
    body = $3
    tags = $4;

    if (line ~ /^$/) next; # if line is blank, then skip it
    if (NF != 4) next; # if column count is not equal to 4, then skip the line

    # Skip any line where tags column contains the word "cars"
    if (index(tags, "cars") != 0) { next; }

    # Normalize the url column with regex by only keeping the article id
    # Example input: <a href="https://example.com/article/foo123456">Hello</a>
    gsub(/.*example\.com\/article\/|[\042].*/, "", url); # outputs: foo123456

    # Skip lines that has non-alphanumeric characters in url column (like <>#&@)
    # Skip lines that has empty url column (after gsub normalization)
    # Skip lines where url starts with foo or bar
    if (url !~ /[[:alnum:]]/ ||
        length(url) == 0 ||
        url ~ /^foo|^bar/) {
        next;
    }

    # Replace multiple ; with one (needed for errorless CSV import in Postgres)
    gsub(/[\073]+/, ";", tags);

    # Print the line with OFS, aka: profit! :)
    print url, title, body, tags;
}

100% agree, I love awk and use it all the time! Also: combining AWK with the other UNIX utilities such as cat, sort, uniq etc.

Have you ever read Ryan Tomayko's AWK-ward Ruby? I didn't realize that Ruby had inherited so much from AWK, but it makes me happy as a Ruby user.

I'm going to put Ruby under this one, as well. Ruby inherited a ton of Perlisms that make it competitive with Perl, awk, and sed for these types of use cases. But they're really underused Eg the following flags are all relevant here: n, p, e, i, l, a, s, 0, c, F, and the 2-letter globals ruby -e 'puts global_variables.grep /\$.$/' and BEGIN { ... } and END { ... } and ARGF and flip flops (which most people don't even know exist), and regex literals in conditionals, and the private methods that are added to main when -n and -p flags are set. IDK, probably other stuff, too, that's all off the top of my head.

So a new developer would be served well to learn AWK? Or is it too specialized to be of much practical use in everyday DevOps? I mean, sure, Python will result in a lot more lines, but in the end the code will be more readable and more versatile . . .

Readibility is just a way we indent our code. It's possible within *.awk script files and there are syntax highlighting plugins for every major code editor (or as you can see, here in markdown as well).

I updated my upper comment with example code.

WHAT THE F***! Wow, that was way more elegant and simple than I expected. I think I will spend some time with AWK in the coming few days. Thanks!

Ben Halpern DEV.TO FOUNDER

Hey there, we see you aren't signed in. (Yes you, the reader. This is a fake comment.)

Please consider creating an account on dev.to. It literally takes a few seconds and we'd appreciate the support so much. ❤️

Plus, no fake comments when you're signed in. 🙃

PHP.

It usually gets a bad rap about being horribly ugly and difficult to work with, but that's just old PHP and Wordpress. Modern PHP frameworks like Laravel are amazingly powerful and pleasant to work with. And when you use PHP as a proper OOP language rather than for templating, it works a lot like a dynamic Java with some nice constructs for server-side development.

It also has the most powerful built-in datetime parser of any language I've used; it correctly parses just about anything you throw at it without needing to give it any kind of format string, which is great for parsing user input.

The fact that you need to use PHP like Java in order to write maintainable code says it all. All these devs saying that it's not that bad when you follow all the best practices don't realize that all the time they're spending making non-shitty code in a shitty language is completely wasted. If you're smart enough to write good code, then do it in a language that doesn't get in your way.

PHP is a language that didn't expect developers to write actual applications with it. Even though it might be better than it was before, you're still working with the language in a way it wasn't initially designed for. This results in objectively cumbersome, verbose code. Working with a language thoughtfully designed to be used the way you're using it will double your team's productivity.

For every dev coming out of old PHP/wordpress hell, modern PHP frameworks are indeed much, much better. But they're frameworks, the language itself is still clunky and unproductive. Frameworks in other languages have been a thing for much longer. Combine this with the fact that these languages are actually designed to let you build fully fledged applications and you get a development experience that is better than anything you could ever have with PHP in the equation.

To counter that, I would just say that writing a backend in any language is only as good as its frameworks. Without Rails, would anyone be writing Ruby backends? Or Java without JEE or Spring? Python without Django?

This is the fundamental reason why frameworks exist, because there are limitations or "clunkiness" to every language, and there needs to be some better way to use that language for a particular application. Who cares if the PHP language itself isn't quite as pleasant to write as Kotlin or Go, I'm still many times more productive developing backend applications with Laravel and Eloquent than I would be with anything else, and I believe many people would agree if they would give it a serious shot.

And furthermore, why is it impossible or wrong for a language to mature to be used in different ways than it was originally created for? HTML wasn't initially designed for interactive applications, and even CSS was bolted on after its inception. Javascript wasn't designed to work outside of the browser, so are Node developers as stupid as Laravel developers? No! Rather, it is these developers that are pushing the innovation of the language and its frameworks and making it better and better, not holding it back.

The fact that PHP started as an ugly templating language and has matured into a powerful dynamic OOP language isn't a sign that the language has lost vision or is unfocused. It actually shows how dedicated it is to being a great language for server-side development. And the fact that there are objectively great frameworks for PHP show that is has a power that many people don't realize.

A framework shouldn't fix your language. Frameworks exist to provide a set of abstractions as a common ground when building certain types of applications. That's why we need them. Their job is to orchestrate libraries and third-party code into a cohesive system, not redefine the experience of working with the language.

I agree that ultimately, productivity always comes down to personal preference. If you've tried other technologies and can demonstrate that PHP makes you more productive, then why not. I did give a serious shot to plain PHP, Symphony and Laravel, and I can tell you that even by slapping a framework on top of it, PHP still slows me down because of its infuriating inconsistencies. I have no problems with Laravel, I think that it's a great framework. The problem is PHP.

I have nothing against improving existing ecosystems. The improvements made to HTML and CSS over the years made things that weren't possible before possible. But they don't have any competitors. There is nothing to take their place so they need to get better. Node filled a gap in server-side development by proving itself as a very simple solution to applications with complex asynchronous needs.

PHP, on the other hand, is filling a gap that doesn't exist. It's in direct competition with python and ruby for instance. The industry didn't need PHP to "mature" into the clunky language that it is today.

I actually have mixed feelings about the existence of frameworks like Laravel in the PHP ecosystem. I mean, it's great because it keeps people from writing home-grown atrocities. But because Laravel makes PHP somehow usable, everyone thinks that, well, it's good enough so no need to look further. They stop seeking an acceptable solution. Using a framework in PHP should be the "AHA!" moment. It should make you realize that it's universally the way you're supposed to do it, and the fact that it's so different from what you're doing in plain PHP should make you understand that using a language geared towards this kind of usage should make you more productive.

But if PHP is your jam and you actually researched and studied the various alternatives, then the reasons that you have for using it are probably valid and enough for you to consider it to be the best suited tool. I happen to have come to a different conclusion.

I think PHP is a pretty solid language. There are some frustrating inconsistencies, but PHP 7 has come a long way. We, as a community, are getting things we desperately need and want like stronger typing, better performance, and hopefully (soon) generics!

I get what you’re saying, but I also feel like dismissing PHP too readily is akin to throwing the baby out with the bath water.

I can’t disagree with your position that, if a developer is most productive in a language, then he or she would be able to work around its shortcomings in a way someone else might be unwilling.

For me, it’s very much a matter of time and productivity. I consider myself a polyglot developer (with varying levels of skills in different languages) but for me, it would be inefficient to gain an expertise in Python or Ruby and still deliver to my company what they need to make money and reduce risk. PHP is very much, for us, a business decision. There are better languages suited to what we need to do, but we simply couldn’t produce what we can today by switching.

To do simple web things in Java you will need to use a lot of frameworks, implement a lot of interfaces, inheritance a lot of class and all those "I am so object oriented and corrected"'s stuff.

There are very big projects in PHP, so its no impossible to maintain large code bases.

PHP is the best worst programming language, you will find tons of web ready projects ready to use, you will loose time choosing a template of it. You will not find anything comparable in the Java's world.

Nuh huh. PHP is horribly ugly and difficult to work with, and that has nothing to do with Wordpress. Modern PHP frameworks are just that - frameworks - and they are not the language.

You can put syntactic sugar on anything and say it's sweet!

Hey Ben, I wouldn't agree with your assessment. I'm not sure what you mean by it's horrible and ugly. Sure, frameworks like Laravel enhance the language and make it more concise and abstracted, adding great functionality but it doesn't 'fight' against it as if the framework is somehow covering up issues.

Rails, for example, is mostly used by Ruby devs. Does that indicate Rails is bad and therefore Ruby is also?

Rails being mostly used by Ruby devs has nothing to do with whether Rails is bad or whether Ruby is bad, and Rails being good or bad has little to do with whether Ruby is bad. I'm not sure what parallel you're trying to draw?

Fighting against the language and covering up issues is exactly what frameworks like Laravel do. Using an ORM instead of a selection of different legacy database connectors? Wrapping disparate date and time functions/classes in one interface? Replacing the "every page is an endpoint" approach with a router? These are things frameworks do, so it doesn't matter so much that the language is as inconsistent as it is.

Exactly, you're able to do much more with PHP than many people would realize because there are some really great frameworks available in PHP that smooth out these inconsistencies.

Before I really got deep into PHP and found these great frameworks, I had believed that PHP and anything to do with PHP should be avoided like the plague, but that simply is not the case. The bad/old PHP tools (read: Wordpress) should be avoided like the plague, but that doesn't condemn the language itself or the other great tools for it.

Python.

While people on this platform definitely use python properly, (the people on) Reddit defines it as pseudocode. I shouldn't take Reddit seriously, but python definitely is more powerful than just 'pseudocode'. Meaning that a language is easy to pickup does not mean it is not powerful.

Oh, and the 'import feature' meme is true, but isn't that it for any language?

Sorry, I'm really triggered by reddit

This comment really sums up Reddit on many levels. Python is one of the most important languages of all time and is remarkably powerful.

Do you know Reddit is built on Python I mean its backend is completely in Django and pure Python.

Beside the point. Though I should mention the people on Reddit, Reddit itself does not define Python :P

Yeah they get so much edgy & harsh, they really need strict moderation sometimes. And the thing they do is they always harmful to others

I honestly feel this and it makes me super upset knowing that I used to downplay Python until I really started using it only to realize:

"oh WOW this is an awesome language. I can do that???"

Maybe it was meant as a compliment, in the sense that everyone can understand pseudocode, which reduces mental friction.

I remember when people (usually Java/.NET programmers) used to tell me that Python was "just a scripting language" :D

I've found some subreddits I enjoy (really depends on the moderators), but the comments on r/Python are not the best.

Using Windows 10 w/WSL for development. I've had to repeatly explain to people WSL is literally running Linux inside Windows and they still don't understand. They rather install Linux on their ultrabooks and complain about non-working drivers 🤷🏻‍♀️

WSL does not run literal Linux inside it; it's a kernel API compatibility layer + ELF binary support. Because of this, WSL I/O is very slow compared to running native Linux on your machine. You are better off using a VM inside Windows at that point, IMO. I haven't had that many drivers issues, #YOTLD!

Linux inside Windows feels to me like placing a high performance engine in a VW Sedan. Yeah, you have a cool engine but you also have, you know, a VW Sedan—with all its limitations that prevent you from taking advantage of your new engine.

Why would I want to run Windows if I'm just going to be using something else?

Also, as linux run in NTFS, it doesn't support symbolic links and many dependencies don't work as they are supposed.
Really not good.

Well, if you know that you will want and/or need Linux, you should choose your hardware accordingly.

Any language. People usually critics a language without really knowing it, and any language has some features really outstanding compared to competitors.

For the "credit part" I think is Bash. The entire internet works because of it, including all the new shiny Continuous Deployment pipelines.

As for powerful ... depends with who you're talking to, choose the ones that they do not know anything about and they will be surprised. Now days mostly pure FP languages like Haskell, Java/C# are importing FP goodies and their devs still think it's OOP magic.

I came looking for bash!

People never seem to realize just what you can do with bash. Sure you could write a python or ruby script to move those family pictures from various folders to one, or you could do the same thing in Bash without worrying about maintainability or shells or any other weight.

I came for this.

For prototyping the most popular option is Python, whenever I get a chance I pick bash. Never failed.

Have an arrays mini crash course.

distro update script

Smalltalk is pretty amazing. The VM image based development model is kinda cool and the only other language I know that has something similar is Dart with snapshots but I don't know whether they are going to keep that around since they have pivoted to Flutter now.

Prolog as well. Programming with logic and a database of facts is underutilized.

Can you give me a quick overview of Prolog and some example use cases?

In Prolog you define facts. Like

is_dev('Ben').
fullname('Ben', 'Halpern').
fullname('Michiel', 'Hendriks').

Which you can then query:

?- is_dev(N), fullname(N, 'Halpern')

Which can be "unified" (i.e. a solution) exists. The first answer to the solution is N='Ben'

The facts you define can also be queries.

dev_fullname(FirstName, LastName) :-
    is_dev(FirstName), fullname(FirstName, LastName).

Which allows me to query on either first name or last name like:

?- dev_fullname('Ben', LastName).
LastName = 'Halpern'

?- dev_fullname(FirstName, 'Halpern').
FirstName = 'Ben'

But dev_fullname('Michiel', _) produces no result, because I didn't state the fact I was a dev. (Note, _ is an anonymous variable, which will simply be discarded.

One of the other big features of Prolog is how it handles list.
Below is the typical check if an element is a member of a list:

member(X,[X|_]).
member(X,[_|T]) :- member(X,T).

The first fact says that the result is true if X is the head of the list (second argument).
If the first fact is not true, it will try the second fact. There is queries member again. But drops the head of the list.

Now a fun thing. If you want to iterate over all members of a list. You can use the same fact.

?- member(N,[1,2,3,4,5])

This produces 5 results for N. And if you just want want the numbers higher than 3

?- member(N,[1,2,3,4,5]), N>3

which produces 2 results, N=4 and N=5.

Here is a nice application of Prolog for configuring servers: quietlyamused.org/blog/2013/11/09/.... At first it doesn't seem like a good fit but then you realize server configuration can be treated as a set of facts and derivations.

If you study prolog and some formal language theory then you'll inevitably stumble on BNF syntax and these are very much like prolog rules: en.wikipedia.org/wiki/Definite_cla.... So there is a very intuitive connection between parsing and logic programming.

Another good application is constraint programming. If the problem can be expressed as a set of constraints then a prolog based solution is a good starting point for a prototype that can then be translated into more specialized solvers like minizinc: en.wikibooks.org/wiki/Prolog/Const....

It's not quick, but I just ran into the Power of Prolog which does a good job of making the case :)

I feel like a lot of people don't realize how powerful Lisp dialects and Haskell are. I use Haskell almost on a daily basis and I would say it's the best language I tried so far. Both are so expressive, my programs take up mostly half the space I'd have used with a mainstream language

I've recently started dabbling in lisp, its been more fun then I thought!

Go Lang.

powerful, great performance and friendly syntax.

Yup. And rock-solid concurrency. The Erlang VM is the only competitor, in my opinion.

I could have say "Rust" as it is extremely powerful, but it would be obvious (since I am a big fan of it) and I believe alot of people already know it. So I'll got for proper env study and team awareness. Some thinks that PHP is a bad tool (I do), some that it is C# (I do too), and other that it's javascript (I do not). I disagree with that (including with my first reaction to those language). The good tool is the one fitting for the task "in the best capacity and will of the team" you are working with. For example, lets say that you wanna write a server application and your team knows JS. The best tool will be JS. On the other side, to do an app to do machine learning, JS would not necessarily be my first choice.
Same with C#, I dislike it (for numerous reason) but my team wanted to use unity. And it worked. So the debate are some tools bad are good are only relevant to the situation I believe. The awareness of context is then the most powerful tool I know.

And I took too long to make my point, sorry.

You probably expected this, but I'm gonna say Perl 6. Released two years ago, it's an incredibly expressive and powerful language, which includes all major paradigms: object-oriented, functional, concurrent. It's got peerless Unicode support, and a small, but welcoming and helpful community. You should definitely give it a try, whether you want to learn a new language, or want to look at a full-featured 21st century language.

I believe JavaScript deserves more accolades than it's already getting. It can efficiently be used on both the front end and back end, it's kind of like the Thanos of Programming with its multiple frameworks which allows more functionality to it, and the addition of popular trends like Tensorflow.js and Machine Learning.js kind of give it an edge on Python

I will award 11 points for "Thanos of Programming".

Git.

Not a programming language, but I think it's worth mentioning. Sometimes we just commit and push, but it's possible to rename commits, reorder, fix extremely difficult conflicts, find where/when a bug was introduced, create hooks, etc.

We should take some time, learn Git and see how powerful it is, instead of just throwing off our local and pulling the remote repo again after the first issue :D

Agreed, Git is well known but I don't think most people using it realize how powerful it really is, I use it a lot and since quite some time now and I still learn new and awesome things every now and then !

There's no tool more powerful to me than great online documentation. Moreso than online question forums like stack overflow, which is a close second for me. If I can't find good docs for something, I don't use it, because I'm searching the docs on the tools I use at least three times a day. I remember a quote from Richard Feynmann taking a Anatomy class:

quote from Richard Feynmann

Perl.
Amazingly simple string operations, readable (although its philosophy allows for code golf), and for someone that deals with lots of strings in his day job, using it when I did was surprisingly a pleasure.

Postman

There are multiple ways to scope variables to keep your saved calls dynamic, but also through the tests tab you can basically run any JS you want.

pm.test("Status code is 200", function () {
    pm.response.to.have.status(200);
});

var jsonData = pm.response.json();

pm.environment.set("Authorization", jsonData.token_type + ' ' + jsonData.id_token);

So I can test my responses (good practice!) but also take the response from my OAuth call and automagically set it to my environment variables.

Then, every subsequent actual call just needs to have a header of Authorization: {{Authorization}}

Ruby AND Ruby on Rails !

Ruby is quite awesome once you have mastered it, its syntax and logic makes development insanely fast imho. I understand that some people do not like this language very much for performance reasons, I can agree in some measure, but unless your project REALLY need insane performance, I don't think you'll really be annoyed by this (and as always, if performance was the only reason to choose a language, we would all be better off with good old fashion C/C++ !)

As for Rails, my opinion might be biased since I'm a Rails developer (and PHP hater, sorry !) but I really love it. It's full MVC, DRY, ActiveRecord is pure love if you like to focus on your code and forget about your database (in some measure) and the community is pretty huge.
Even if today Rails has solid competition (on the full-stack JS side mostly), it still has some tricks in its sleeve (looking at you Rails 5 API mode :D) !

Having primarily worked on Windows to do CAD stuff, but still wanting to program, I have to say that PowerShell (an upgrade/superpowering to the original windows cmd prompt) needs more love than it gets. Once you kind of figure out the design intent of it and let it sink in, it's really powerful and pretty nice to use!

I believe JavaScript is very powerful. It's not limited to just the front end, but also the back end. And the multiple frameworks it's possesses makes it way more advantageous compared to some other programming language. Although many feel like Python is the Thanos of programming, but forget that the trendy stuffs are also on JS i.e Tensorflow and Machine Learning

I'm going to suggest Xojo is more powerful than people realize. It's VB-like syntax makes some think it is too simple for powerful apps, but it that is far from true. It is fully object-oriented and is in use by many large companies and has been used to make many commercial apps for Windows, macOS and iOS.

VBA and Office environment are very underestimated by developers - and I used to be one of them some time ago :)

The complexity and quality of what can be done with them it's really awesome, mainly in terms of processes automation, but many other things too, as integration with ERP's, other MS Office products, call to API's , funny & artistic stuff, games, dynamically build forms, charts and tables, etc

Development of functions with C#, and plenty of DLL's of specific tools.

COBOL - it's intention-revealing and self-documenting!

Apache Camel is rellied on for composing EIP's of any complexity.

Definitely the shell languages, I think I know just a few percents of what they can actually do.

I think Ruby gets a bad rep for some reason. It's extremely powerful and very easy/quick to write but any time I talk about it to JS/PHP/.net devs, they seem to think it's this terrible behemoth.

LINQ (.NET) is very expressive and can be super powerful if used correctly.

Excel is pretty much the most powerful tool on the planet

Surprised to see no-one mentioned F# yet. If any one want to start let, fun and match are all the keywords needed to solve a decent CP problem. Don't forget to check Type Providers. Once you get used to the language, it feels like - "intuition based programming"!, like you want to express something and you start typing and just like that you end up with a working program with exactly what you have in mind! You should try it to understand this. It feels like intuition because the language is so flexible, you can write the same code with many syntax's.

Classic DEV Post from May 21

Who's looking for open source contributors? (May 21 edition)

Please shamelessly promote your project. Everyone who posted in previous weeks ...

READ POST
Follow @ben to see more of their posts in your feed.
dev.to is now open source!
View Announcement Post View GitHub Repo
Ben Halpern
A Canadian living in New York, having a lot of fun cultivating this community! Creator and webmaster of dev.to.
Trending on dev.to
Tell me a good IT joke
#discuss #jokes #fun
How old have you been when you started programming and what was your first project?
#discuss
What is YOUR ultimate goal that you want to achieve as a developer?
#discuss #goals #life
Using Custom Types in JavaScript Docs
#discuss #vscode #javascript #documentation
What's your origin story?
#career #learn #webdev
Explain Hashing + salting Like I'm Five
#explainlikeimfive #webdev
The distraction's killer
#beginners #help #career
Software Made Simple
#design #simple #productivity #devtips