DEV Community

Cover image for Why is your preferred programming language your go-to?
Ali Spittel
Ali Spittel

Posted on

Why is your preferred programming language your go-to?

I got asked on Twitter why I love Python so much, and I thought I would do a quick writeup, then open this up to a discussion on why your preferred language is your go-to.

Python was my first programming language, and it made me fall in love with writing code in the first place. I was able to write games and helpful scripts with very little programming experience. I also started my software engineering career with writing Python code for data science scripting. I'm not sure that my career would exist without the Python programming language, to be totally honest.

Python's syntax is so similar to written English. Its guiding principles are outlined in The Zen of Python, which is a poem that all programmers should take into account (I even named my blog after it and have it hanging on the wall in my apartment. Four lines in particular really speak to me:

Explicit is better than implicit.
Simple is better than complex.
Readability counts.
If the implementation is hard to explain, it's a bad idea.

I think those guidelines make the language easy to understand and write code with.

I also really appreciate how diverse the use cases are for it. Django makes creating web apps straightforward and extendible. Pandas makes data manipulation a breeze, and the data science libraries are unparalleled. It's also great for solving code challenges because of the utilities in the standard library. IPython notebooks are awesome for teaching and creating shareable and accessible code.

Some other notable features include:

  • list comprehensions, which are a really elegant way of transforming data
  • you can extend Python relatively easily with C or C++ which you can use to write faster-running utilities if needed
  • meaningful whitespace: I'm going to indent my code anyways, I should get something in return for that!
  • a great and supportive community behind the language

So, what is your go-to programming language and why?

Note: There are a lot of programming languages I have written code in, and I like a lot of them as well. Python is just the language that I do code challenges with. Also, totally understand that different languages are good for different things. This isn't meant to be a debate, just a display of love for languages that have been helpful for us!

Top comments (118)

Collapse
 
ben profile image
Ben Halpern

As might be clear from my entries to your challenges, I’m a Rubyist. I play around with other things, and explore different things, but Ruby captured my heart and I haven’t looked back.

I’m super excited for Ruby 3.

Collapse
 
pavonz profile image
Andrea Pavoni

I've been a Rubyist for over a decade but, like you, I always explored new things, and now I settled mostly on Elixir as my go-to language for server-side web/apps.

I still use Ruby and Python for other quick/focused scripts or tasks.

I also appreciate Go, even if it's my last go-to, just when I need speed or portability (eg: deploy a binary in production)

Collapse
 
ondrejs profile image
Ondrej

Ruby is my second go-to language right after Kotlin (I do primarily mobile apps) :) Great choice, you can't go wrong with Ruby.

Collapse
 
ben profile image
Ben Halpern

Kotlin definitely seems to get a lot of things right

Collapse
 
pbnj profile image
Peter Benjamin (they/them)

Last time I worked with Ruby (3-4 years ago), I heard about the Ruby 3x3 initiative.
Any resource you can point me to for latest progress/news on Ruby v3?

Collapse
 
srowles profile image
Stephen Rowles

Go as it's a great all-rounder. Complied to native binary makes it simple to use for processing io and building tools.

Fast enough and safe enough to build microsevices in. Memory managed to I don't worry about malloc and free any more :)

Collapse
 
ondrejs profile image
Ondrej

I have also experimented with it and enjoyed it quite a lot, seems to be like pretty good replacement for C/C++.

Collapse
 
valorm profile image
Valorm

Am a go programmer too, at first I love C/C++.
Go is awesome and it’s really fast 💨

Collapse
 
buphmin profile image
buphmin

I mostly use PHP and JS as those were the two languages I learned first. I can see how PHP and JS can be abused to write bad code, but so can any language. I recently used Go for a project where I needed plenty of threads and that was awesome, I love how simple Go is. PHP and JS are easy to use and as far as I know the two fastest scripting language (though JS cheats as it is all JIT now). JS has the benefit of being useful everywhere now and a must know for frontend web dev.

I have considered learning python, but I keep thinking there is nothing I can do in python that I can't do in PHP/JS and PHP/JS both run significantly faster in most cases than vanilla python (excluding pypy and cython). JS because it is JIT compiled, and PHP because of heavy caching plus a ton of built in C extensions which are of course very fast.

Collapse
 
filips profile image
Filip Š

Main problem with PHP is that it was not so good in the past (before PHP 7 and PHP 5). It was slow and it had some weird functionalities. But with release of PHP 7 (and PHP 8), PSR standards and frameworks like Laravel and Symphony, it has improved a lot. It's very fast and with JIT coming in PHP 8 will be even faster.

Other big problem is that is is very easy for beginners. And beginners obviously don't write so good code. This is also reason why many people think that (all) code in PHP is bad.

Collapse
 
david_j_eddy profile image
David J Eddy

Additionally: PHP is a beast of a web language. With the upcoming 7.3 release being 200% faster than the 5.6 release performance is only getting better.

Collapse
 
nicolus profile image
Nicolas Bailly • Edited

It is one of the fastest scripting languages, and it will become even faster when JIT is implemented (like an order of magnitude faster). That won't make a difference in web apps because computing is never the bottleneck (it's usually I/O bound : loading 1000s of classes from your favorite framework and querying an API or SQL server that's not even on the same machine comes at a cost), but it could make PHP usable for domains in which nobody would consider using PHP/Python/Ruby today, like heavy scientific computations, image processing, 3d rendering or IA.

Preloading (coming in 7.4) on the other hand could help quite a bit on the I/O side.

Collapse
 
simoroshka profile image
Anna Simoroshka • Edited

I started learning programming with C++ (go-to language for the first 3-4 years in uni), then there was Java, PHP, a bit of Python, a bit of Ruby on Rails...
Somewhere in between I had to do a project with animations, and I used canvas and Javascript. Javascript was SO weird! I remember banging my head on the table because of "functions are objects and you can pass them around" while things like closures simply made me want to run away. Nothing made much sense.
But then it became familiar. Like in romance movies, hate transformed into love.
I like the flexibility. I like how it looks. Everything seems a bit easier when I code it in JS.

Collapse
 
ld00d profile image
Brian Lampe

I'm going to be the weirdo here: I don't have a go-to programming language.

I like python. It's nice for simplicity, and I'm ok with the whitespace thing. I never get to apply this skill professionally though.

I like javascript. It's everywhere. It's got some warts, but it's pretty simple to hammer stuff out.

I like java. Tools like Spring Boot where almost anything you want to do is there already, and you can build pretty big things with a couple of config classes, a few interfaces, and some annotations.

Collapse
 
latetide profile image
LateTide

Same here, mostly any of these three or c#, when it comes to programming.
The only reason I use JS more than the others is that it's really simple to just open the console in Chrome and start typing...

Collapse
 
swizzard profile image
sam

i write python for my job, but if i had my druthers i'd be writing haskell all the time. it's concise and elegant, and things like type classes, algebraic data types, and higher-kinded types (not to mention the concept of kinds in general) are things i miss when writing other languages

Collapse
 
kspeakman profile image
Kasey Speakman

Props for the colloquialism “druthers”. 👍

Collapse
 
ondrejs profile image
Ondrej

I would recommend you Elm language if you like Haskell. Pure functional language suitable for beginners.

Collapse
 
swizzard profile image
sam

I actually looked into Elm--it's got a lot to recommend it, but I'm not super keen on the way the language and community is managed. If you like Elm, you should give PureScript a try--it's heavily Haskell-influenced and compiles to JavaScript, plus it has (imo) a better way of dealing with interoperation, not to mention fun stuff like row polymorphism.

Thread Thread
 
ondrejs profile image
Ondrej

I know PureScript, I have seen a lot of talks about it, but it's a bit mathematical voodoo to me. Note, that I do not work as a frontend developer, but I do mobile apps in Kotlin, so everything else is just more or less hobby to me.

Collapse
 
lincolnsand profile image
LincolnSand

I love haskell too. It's not my go to though. I would choose java or python (the languages I know best) or maybe C (I don't know very much C, but I sometimes have to use it. I like C more than java).

Collapse
 
leoat12 profile image
Leonardo Teteo • Edited

I have two preferable languages depending on the situation: Java and TypeScript.
Java is the language I use professionally, I am a web developer who loves Spring Boot and what it has to offer. The combination of Java maturity and Spring Boot ease of use made me love the Java language, before I used to see C# as the go-to language, but after I knew Java well, I fell in love. It is great to see that decades of well organized community driven development is at your back. You can find any solution for anything in Java and most of the time the solution is very elegant as well. People may say that it is verbose, but I think it has the vocabulary necessary to transmit what needs to be transmitted to the developer. It has the best libraries and the best exception handling as well, it is easy to find where is the problem, something that I didn't find in any language, unless, maybe, C#.

TypeScript is Javascript for the statically typed language fans. You are almost forced to know Javascript nowadays, but Javascript really bothered me with its, in my opinion, unsafe way of dealing with types, I have come from Java, it is something I don't tolerate. Therefore, TypeScript has been incredible for me, it reminds me a lot Java (and Kotlin), which makes me feel more comfortable and I can use the fast development and prototype of JavaScript and NodeJS.

So, I tend to use Java for work related things, web development and serious projects and TypeScript for quick projects, prototyping, etc.

Honorable mentions: the growing desire to come back to C# and learn it well, I think it is important and it is probably not that far from Java. I think it is good to have both Java and C# under your belt, but I didn't find the time to do so until now. Python is a language that I never liked and probably never will, it is just not for me, I need curly braces in my life... hahaha

Collapse
 
kaelscion profile image
kaelscion

the growing desire to come back to C# and learn it well, I think it is important and it is probably not that far from Java

I've felt this urge at times as well as I started with C#, but am a Python/Julia guy now. I will say as well that Java and C# are, in my opinion, sister languages in a lot of ways. If you know one, you are likely able to read the other and know what is going on for the most part. They were also designed with similar problems in mind, for similar use cases, and inspired by similar languages. They were just developed at different companies. I ultimately believe that Java is more widely used due to its portability, whereas C# is used by pretty much any business that runs the Microsoft stack. Sorry, let me rephrase that: pretty much any business :P.

However, in the days where the JVM runs more than just Java and C# is now cross-platform (weird), they may be actually becoming more similar than they've ever been. I'm actually hugely interested to see the future of these two languages.

Collapse
 
leoat12 profile image
Leonardo Teteo • Edited

Yes, that's true, C# and Java are very similar in many ways, except for a few different ways with doing things and writing things. It is somewhat the difference between dialects of a same language, I think. The different is mostly how things are done, for example dependency injection, database interaction, etc. In these areas they are very different, but it is a matter of framework, not language itself.
Here where I live I see that there are a 50/50 ratio between Java and C# and it would be great for my career to know both. This weekend I decided to have a "C# Weekend", I'm rewriting a application I did for fun and practice in Java and Spring to C# and APS.NET Core. Probably, I will write an article about my impressions regarding this rewriting. :)

Thread Thread
 
kaelscion profile image
kaelscion

I would read the crap out of that article. I left the C# world behind when .NET 4.5 was new and C# 5 was the latest version of the language so, suffice to say, I'm well removed from the C family nowadays. But I would love to see something that was written in Java, not only re-written into modern C#, but in the .NET Core repackaging of The .NET Framework. I've read a bit about .NET Core, but am not really sure if it is Microsoft doing its usual thing of acquiring a company (in this case Xamarin) then giving their founders a big middle finger by ripping their product apart, taking what they like, and throwing the rest away, telling Mono to go shove it, or an actual attempt to encourage a cross-platform, open sourced world. I like Microsoft's new direction. I really like how Satya Nadella, when first given his position, was expected to do a bunch of stuff, and in many cases had it demanded of him by the board, and instead kind of just said "That's nice. But Azure is my baby, I'm a cloud guy at heart. So guess what? We're going after AWS's cloud service. Oh, and we're going to do it by showing Google their not the only open playground of the big 5. Cheers fellas, I've got a company to run." But, I'm also relatively sure that at least part of that was, more or less, a PR stunt to help all of us skeptics believe that a "maverick" had taken MS by the ears and is leading a bright new revolution in tech and don't really trust it as far as I can grow a grand piano full of molten lead. It would be interesting to see the comparison either way though :D

Collapse
 
caseycole589 profile image
Casey Cole

Perl because it gives me power to do anything simply

Collapse
 
chenge profile image
chenge

My languages team:


              Ruby

     Go                  Nodejs



        Rust    Elixir  Clojure

Ruby, everything is a object and care programmers happy.
Go favor simple.
Nodejs is popular.
Rust has some new idea.
Elixir' author often say beautiful code.
Clojure, everything in ().

Collapse
 
kaelscion profile image
kaelscion

I'm a Python guy through and through. I started my career with C#, which was a bit of a difficult first language to be honest. Back then, I didn't think about what was going on under the hood as I could barely even remember what to type. But I truly hated how much code it took for everything


public static void main(string, args[]{
  string wth = "why?!? Why so many dang characters to define a simple method?!?!?";

)}

Now, I've not written a single line of C# code in 5 years so there are probably a ton of mistakes above. But if you've come from a C language to a high level scripting language like Python, Julia, Go, or Ruby and you can look me in the eye and tell me that the above C# example didn't make your sphincter tighten a little bit, then you are a dirty dirty liar 😋😋😋.

What I love most about Python is that it teaches you to think in code. The syntax and ease of use allowed you to translate ideas in your head into code so easily its insane. A lot of folks feel that this kind of easy syntax makes programmers weak and squishy, but I disagree. I would consider a strong programmer somebody who can think through a problem while doing something else, figure out a solution, then simply sit down and type it out and watch it build and work correctly rather than trying to remember what that curly brace is supposed to go.

Our job is to build solutions and solve problems efficiently, effectively and quickly. Does expertise in using a sword give you bragging rights? Yes, of course. Will a beginner with a gun kill you in open space from 30 feet away? Absolutely and bragging rights be damned. But different languages have different strengths and use cases. One size never fits all and I have a lot of trouble not trying to solve a problem with python that would be better suited to Go or Rust or Haskell.

Either way, I love using Python because I can code thoughts like writing notes in a notebook. If I want some functionality, I like that Python makes it easy to translate that thought into code and test it quickly rather than fighting the compiler.

Collapse
 
lincolnsand profile image
LincolnSand

I think dynamically/weakly typed languages are a bomb waiting to explode. I think statically typed is the way to go. But I do use python a lot and it was my first language.

Collapse
 
kaelscion profile image
kaelscion

A lot of folks feel that way and I can't say that defining the type of data that goes into a variable or data set is not a huge advantage in a lot of ways. But I also think that dynamic typing has its place as well. In my opinion, having used both, I think the typing system of a language is less important than knowing how to use the typing system of your language of choice. Good code is good code and bad code is bad code. Although, I will totally admit that static typing does make it easer to write certain types of code well, it has its own set of issues. But I will also be the first to admit that Python, and languages like it, are far from perfect despite their popularity. Still my favorite language though! (Although, I have been looking at Rust's performance and memory/thread safety lately, and am thinking of starting to move some of my more speed-centric projects over to it. Don't tell Python yet thought cuz she doesn't know and I want her to be ready to move on with her life before I bring in a step-mom for her in the shape of Rust. It can be so tough for kids to see their dad get re-married just before they leave for college...)

Collapse
 
richjdsmith profile image
Rich Smith

Ruby is my gem.

It was originally designed to make programming fun, and every time I use it, I enjoy myself.

I try other languages, and see lots of potential for Elixir while having plenty of respect and appreciation for Python, but at the end of the day, I am a Ruby developer and I couldn't be happier.

Collapse
 
ld00d profile image
Brian Lampe

Ruby is my gem.

I see what you did there

Collapse
 
snowfrogdev profile image
Philippe Vaillancourt

Started learning to code in C#, quickly switched to JavaScript. Now my go-to is TypeScript. I love it because it is very versatile. TS/JS runs pretty much everywhere: Web, Mobile, Desktop, IOT, front-end, back-end. JS might not excel at everything but I honestly think it doesn't suck at much. You can build some pretty cool games with it, do machine learning, web apps (of course), desktop apps, data science stuff... It feels like the only limit is your imagination.

I like the fact that it's a scripting language and you don't have to worry about memory management. I like the event system and how it deals with asynchronous code. Even though this may not be where it shines the most, I like the fact that you can write programs that make use of multi-threading and concurrency (even if everyone thinks you can't do that in JS).

I like TypeScript because it adds a layer of type safety on top of the above. I usually find TS code prettier, cleaner and more often self-documented than plain JS code. It also makes writing OO style code easier while it still allows writing in a functional style if you prefer.

Collapse
 
gingerchew profile image
ginger

I’m sure this is just a misconception, but I love javascript because of how easy it is to get into and how versatile it is. When I needed to make a list of options for a select and was given a list of languages and their ‘language code’, I opened up a node instance and turned those two lists into an object and the. Build a template and generated the list of html options in the terminal. Rather typing out everything I saved myself 20~ minutes, and I learned something about the fs package in node. I think that’s something special.

Collapse
 
jacoby profile image
Dave Jacoby

Perl is my go-to, and has been for over 20 years. This was back when Perl and CGI was the standard for dynamic web, and I thought "use Perl, or write it in C++ with the strings library?", and after a wave of nausea, never looked back.

My general move is to try to turn something that's available in one form and turn it into something else, and Perl is very good at that, and when it isn't, I can shell it out and play with the result.

I especially love CPAN, which I hold as a best-in-show for language repositories. I can install and upgrade old modules with every confidence that everything that worked before I started will work when I am done, which is not true of every dynamic language that starts with P.

I know that things I want to do are affected by things I know that I can do with Perl, and I know it has slipped a lot in popularity in the last 20 years. But I know that many of my idle questions, from "Can I brute-force solve this logic problem in my son's math homework?" to "Can I re-implement a spirograph in SVG?" to "Can I put my FitBit step count in my Bash prompt?" are solvable with Perl.

Collapse
 
oscarj12 profile image
OscarJ12

I'm split between C and ARM Assembly. C is beautiful to me because it's in touch with the hardware of the system, plus it's very portable between systems and is human-readable enough that you can do general purpose tasks as well as hardware programming.

I love Assembly Language because I can follow through my program in the wires and components of computers. I like to be able to debug from a physical perspective. ARM asm is also a whole lot easier than any of the CISC asm languages (I'll learn x86 one day) and has more functionality in terms of microcontrollers and single board computers that I like to use. I like the history of asm and it feels closest to the early programmers of the 50s and it gives you a proper feel of how difficult most programs must have been back then.

Collapse
 
lincolnsand profile image
LincolnSand

C's cool. I don't know it very well, but I'm forced to use it (gladly).

Some comments may only be visible to logged-in visitors. Sign in to view all comments.