Alternatively, am I a Blub programmer?
Then I read a lot of articles that said that programming languages and new technology really don’t matter: Dan McKinley’s Choose Boring Technology is one of the best examples of this. But even looking at languages like Go, where they left features like generics out, I can see that sometimes a language just needs to work well enough to be useful. So I stopped trying to learn Lisp and Haskell and Elm and focused on old tech that was proven to work in production (Lisp technically is old tech).
So where does that leave me? With my personal ranking of languages, of course.
Why is this useful? The next time I tell myself that I’m going to learn a language, I’ll need to convince myself that it’s more important than writing code to real problems in one of these languages I can already use.
When learning a new language, where does it fit? If it’s above everything else in your list, it’s probably worth learning.
Go - strongly typed, garbage collector, cooler than Java, minimal syntax to learn
Python - ubiquitous, powerful, strong ecosystem
C - have to think about every line forces efficient code
Java - it works everywhere.
Go has been really, really cool so far. It’s one of the languages that isn’t taught at my university, making it more appealing it me for being cool and hip. It’s strongly typed, which I’ve realized is very important for writing readable, maintainable code. It has a garbage collector, so I can write code without having to think about memory all the time. It has an autoformatter, the compiler is aggressive in not letting me compile until I have really good code (cant compile with an unused variable? c’mon), and the standard library is thicc. Like, makes Python seem like it has a mediocre standard library thick. It treats errors as values, with no exceptions.
It’s missing native GUI support, and the packages for making a web app are limited, but for building an API server, or a CLI, it is really powerful and easy to write. I like Go, and am excited to continue writing in it.
"TypeError: Cannot read property 'greeting' of undefined" errors right off the bat.
In addition to helping with type errors, TypeScript is amazingly well-integrated with VS Code, which is a text editor built on Electron that manages to perform well and provide pseudo-IDE features that never feel overbearing.
3. Python 3
Python is so useful for scripts. So so useful. And then the script has a bigger use case, and you start writing some error handling code, and your old script is now an automated piece in production, and it’s OK, because it’s Python, and you have
mypy and virtual environments. Treat Python right, and it will amazingly useful. The only issue is when you don’t treat Python right.
What does treating Python right look like?
Using Python 3. Please. It’s so useful to not worry about Unicode in Python.
Using virtual environments. Since you use Python 3, virtual environments work in one step:
python3 -m venv <virtualenv_name> && . <virtualenv_name>/bin/activate. Just do it already.
Using type annotations and
mypy. This turns Python into a pseudo-strongly typed (mediocrely-typed? sometimes-typed?) language.
pylinton your code. Yes,
pylintcomplains about stuff like documentation and unused variables and unnecessary imports. Wait until you’ve finished the logic and the testing to check pylint. Commit the code before you fix the errors, in case something breaks. But when you defeat pylint, your code is readable and documented. Amazing stuff.
Yeah it sucks. Yeah nothing makes sense. But ESLint and npm go the distance when you have no other alternatives, and there are thousands of tutorials and resources out there.
Java works everywhere. Everyone I know can read and write some Java. It’s strongly typed, compiled, not that slow now that the JVM is optimized, yadda yadda.
It’s a shame I have only memories of writing shitty Java for early software classes, because I never want to do that again.
But it’s on my resume, cause, you know. It’s Java. I can fumble my way through it.
Languages I’m Missing That I Wish I Wasn’t
Lisp: I keep hearing that Lisp is the one true way. I just couldn’t figure it out fast enough to be useful.
Haskell: apparently a cool language that you don’t need to know entirely to be useful, but I don’t think I write complicated enough systems to need Haskell. Would it help me with smaller systems?
Erlang/Elixir: writing extremely fault-tolerant concurrent systems sounds really cool, but I have no need for one.
Elm: Haskell for web apps. Same reasoning as Haskell, but for web apps.
- Rust: type checking, imperative, memory safe, compiled, helpful compiler…seems like Go but without channels and a GC. It might be worth checking out for more performance based problems. If I could interface with it through Python, I think it would completely replace my use of C.
You’ll notice that most of the time I think I don’t need any of these languages because I don’t have large enough problems to make it worth it. That scares me, because I bet people who write in those languages can’t imagine a small enough project for it not to be worth using, i.e., I should just learn those languages and use them for everything already.
*terror that I’m an average programmer increases*
Please email me if you have any comments or want to discuss further..
Sam Stevens, 2020