Live data from Hacker News

Trying new programming languages helped me grow as a software engineer

cichocinski.dev

171–180 of 192 posts

Re: Trying new programming languages helped me grow as a software engineer

#171
I’ve learned a handful of languages over the years, it was fairly straightforward to reason about all the c-likes (java, php, js, c#, etc), and others (python, tcl). They all have quirks and unique pros/cons, but it was mostly a matter of applying familiar ideas to a new environment/syntax.

But by a large margin nothing melted my brain more than learning a pure functional language (xquery, in my case). To have to think about programming in a completely different way was extremely beneficial. I highly recommend it, given the chance.

Re: Trying new programming languages helped me grow as a software engineer

#172
post #126

Learning different programming languages definitely helped expose me to new ideas, but I think it's a relatively shallow way to grow. There's only a few that I think are really worth learning for the sake of personal growth: - both C and C++ - Some form of lisp. I could see julia taking this spot. - Haskell - SQL There are obviously more that are worth learning for industrial use. Learning the above will give a solid…

I think SQL is both the simplest to learn and most worthwhile in this aspect. Why? Short answer - Because it doesn't have for loops. It forces you to think about data in another way. It is like origami for programming. You can't brute force it, you have to fold your way to the result.

I understand what you are saying, but what you can end up with is stored procedures with loops.

Re: Trying new programming languages helped me grow as a software engineer

#173
Finding a compiler from your new language to your work language is a great way to practice this.

I became interested in F# and found a F# to JS compiler.

I can write F# code and call it from JS and do it in any toy code or side project I have.

This lets me lift up any JS or TS to F# to any degree I want across any project.

That's an awesome environment to build in as I can experiment and learn more about the language just by rewriting code that is already figured out.

Re: Trying new programming languages helped me grow as a software engineer

#174

It's also really, really fun to use a language that's completely different than what you're used to. I've learned Elixir, Scala, F#, and Common Lisp on the side in the past year or so. I like Elixir and CL to the point where they're typically my go-to for personal projects. I liked Scala and F# a lot but I don't reach for them so often; it'd be nice to work with them. The worst part about learning (and liking!) new l…

> IMO, while Go is nice from a minimalism and resource utilization standpoint, it's simply not fun to write after using much more expressive languages. It's definitely a blessing and a curse. What I think I'd say about Go is that it's a simple "day 1" language and a complicated "day 2" language. Speaking strictly from an expressivity and language semantics standpoint, as its runtime and standard toolset are simply gr…

> What I think I'd say about Go is that it's a simple "day 1" language and a complicated "day 2" language.

This resonates. I very much dislike Go's error handling model. Its overly simple and leads to exorbitant

    if err != nil 
checks all over the place. It clutters the actual business code and remains a clunky, leaky abstraction.

I think Go is a language designed for engineers who don't care to learn about more elegant solutions that come with more intricate semantics (Option, Either, Try etc).

It's get the job done inspiration is sloppy and poorly conceived.

Re: Trying new programming languages helped me grow as a software engineer

#175

Earlier quoted context omitted.

How do you get all these different jobs? I’d just hear: you don’t have enough experience in framework/language X.

I'm assuming they are working for startups, typically startups do not require the same level of deep domain expertise as big firms.

Absolutely incorrect. Big firms hire “jack of all trades” devs as well to fill the gaps of the “experts”. I’ve worked with masters degree holders at very large firms that can’t even explain how DNS works. Deep domain knowledge puts you in a niche from my experience.

Re: Trying new programming languages helped me grow as a software engineer

#176

I think the period where I grew the most as a dev was an interlude when I knew I was changing jobs, including moving countries. From having built trading systems in c++, I ended up building, over about a year or so: - A django (python / js) website. It integrated with both Android (java) and iOS (objective-C) apps that could read QR codes and ask the server stuff. It also made me interact with the app stores for the…

How do you get all these different jobs? I’d just hear: you don’t have enough experience in framework/language X.

You remove your desire from making the absolute amount of money, then devote yourself to get compensation via experience. Do this for some years. You’ll end up in a better place with no degree than those with one.

Re: Trying new programming languages helped me grow as a software engineer

#177
post #133

Earlier quoted context omitted.

In a functional language technically you don’t have multiple returns, because the function is a single expression so in a way you’re right. On the other hand the actual result of the expression is determined on a leaf of the expression so you could consider it a return point To make an example the following expression can be considered to have two returns: max x y = if x > y then x else y The Java equivalent is int m…

Yes this is exactly what I meant. After years of coding in Haskell and Clojure, and then going back to Java I have absolutely no problems with int max(int x,int y) { if (x>y) return x; else return y; } I just looks completely fine to me, but colleagues would complain about it in reviews and I just don't understant the problem at all. The variant with the extra result variable looks just wierd to me, and I have seen m…

Cargo-culting from C where you have explicit malloc() and free(). Best practice was to have only 1 return to ensure free() was always called on everything just before the return, so you wouldn't have a memory leak if one was missing from an early return.

Re: Trying new programming languages helped me grow as a software engineer

#178

Earlier quoted context omitted.

It works on Linux just fine

Problem is the mono C# compiler is several years behind Roslyn in terms of features. It's pretty much a non-starter if you don't have nullable types in 2022.

Dont use Mono

Also I think you are giving nullable ref types too much credit

Re: Trying new programming languages helped me grow as a software engineer

#179
post #56

Earlier quoted context omitted.

C is very far removed from the CPUs of the last few decades.

It's not that far from assembly languages, the nearest you can get to CPUs in terms of software.

'Nearest' is still far away in this case.

Re: Trying new programming languages helped me grow as a software engineer

#180

Earlier quoted context omitted.

It’s two different things. For instance using more functional language convinced me of the vertus of immutability. Pattern won’t do that

> Patterns won’t do that I’m pretty sure Clean Code by Uncle Bob has a section on why you should use const to achieve immutable variables. In any case, good style guides inevitably are preaching this as well, as are good senior engineers. All in one’s first language (human), without needing to understand lambda calculus, or monads to run a hello world.

Of course; but reading it from clean code 10 years ago I thought “yeah sure”.

Having no way to mutate my variable in List or Elm or scala … and seeing first hand that a lot whole class of bug disappeared, is different.

But we need both ! Absolutely both. And I will probably never code again in scala or lisp. That was fun. I learned a few things ( scala taught me how functional codebase can be unreadable as well )

Post reply on HN