Live data from Hacker News

Ask HN: What made you change your mind about a programming language/paradigm?

news.ycombinator.com

241–250 of 401 posts

Re: Ask HN: What made you change your mind about a programming language/paradigm?

#241
post #92

The more code I write in dynamically typed languages, the more I believe that static typing is a must. Generally speaking, I noticed that I'm shifting more and more away from "stop annoying me and let me do what I want, I know better!" part of the PL/API design spectrum, and towards "better safe than sorry". Static typing, runtime checks, data schemas, design by contract, fail fast etc. Yes, it's overhead, but it's p…

One downside to static typing is the overhead required when writing/running programs. For example, let's say you have a class `Dog` that you want to rename to be more generic so you now call it `Animal`. In Python you can test out snippets of code with `Animal` without necessarily having to worry about other pieces of code still referring to `Dog`. You would just need to make sure that the code you want to run happen…

That’s why you use proper tooling that supports automated refactoring.

Re: Ask HN: What made you change your mind about a programming language/paradigm?

#242

My first big Erlang project made me completely rethink my acceptance of object oriented programming in C++, Java, Python, etc. I realized that I had blindly accepted OO because it was taught as part of my college curriculum. After several years in industry I had concluded that programming was just hard in general. It wasn't until my first project in Erlang, where an entire team of OO devs were ramping up on functiona…

Ironically, Erlang’s message passing makes it more like Alan Kay’s original definition of OOP than the bowdlerised view of OO perpetrated by Java and C++.

Yep. That is why I can not ever interpret the term "OOP" anymore.

Re: Ask HN: What made you change your mind about a programming language/paradigm?

#243

Earlier quoted context omitted.

Same reaction but different type of project and language. Immutable data with persistent data structures was a game changer for me. There is place for OO but it does feel like the last 20 years our profession has been suffering from collective insanity.

Try code large a GUI project without OO.

Facebook is written in React. React is (almost) without oo. There are web and mobile guis written in React. Native aren't, yet, but that's mostly because it's young and there are no libraries for that.

Re: Ask HN: What made you change your mind about a programming language/paradigm?

#245
I didn't like python at first. The mentality of "hardware is cheap, there's no need to be that fast" drove me away from it full speed. However, I was short on time for something, and I gave it a try, then I actually liked it a lot. It's very practical and fast enough for most cases.

The string processing capabilities has blown me away, however it didn't change my love for higher performance, compiled languages. Now I use it for small system tools or prototyping, but for highest performance I still use C++.

Similarly, I disliked Java. It felt slow, heavy, bloated, unnecessarily Enterprise. Again, using it changed most of the perception. I found out that for some stuff it's pretty competent, it's easy to write sophisticated stuff. GUI classes and event based XML parsers are very well thought out. I also found out that Java's infamy came from bad programming, especially in the GUI part. JDK tends to correct your GUI programming errors to simplify the stuff, however this "auto-mending" came with a performance penalty which adds up with every small mistake you make. So you need to write your code carefully. Frameworks like JaDE made me like Java even more.

In the end, most of the like/dislike comes from preconceptions and prejudice if you ask me. If the language you're using is up to the task you have at hand, and you understand the trade-offs you make with a language, there's no need and reason to dislike a language.

Re: Ask HN: What made you change your mind about a programming language/paradigm?

#246
post #34

I realized just how useful shell scripting is (bash) when it occurred to me a simple five line script I wrote to erase and reclone my main work repo is the single most useful piece of code I’ve written in my first year as a web developer. God that’s a time saver.

The first thing I thought when I read this is why do you have to do this so often that you scripted it? It's good that you thought of a way to save time but this solution seems like a very blunt instrument to get back to some previous state.

Most likely answer is “git’s ux”, in my experience. So often it’s just faster and reassuring to reclone rather than resolve some unusual state you’ve accidentally put your local repo in, because a command didn’t do what you expected it to do.

Re: Ask HN: What made you change your mind about a programming language/paradigm?

#247
Labview. I hated graphical programming. I don’t even know why. Then I worked on this fairly complex real-time system with FPGAs and lasers and whatnot with several people. Works first time. How does it work? Obvious. Encapsulation is obvious from the diagram. Comments barely needed. Need to make a change deep in the code that breaks an interface? Everything you need to change turns red. If something doesn’t look good, it probably isn’t. design patterns are obvious. Was it slow to write? Yes. Definitely. Were there times I was frustrated because I wanted to write some hasty junk imperative code? Yes. Labview made me do it right. Could all this be done easier with lexical code? Probably, but I rarely see it. Can you make a disaster out of labview? Yes; even worse maybe. But... it makes bad code harder to write than good code, and quite obvious visually.

Re: Ask HN: What made you change your mind about a programming language/paradigm?

#248
DDD - Domain driven design. My entire career pivoted the day I worked with a team that was building a large financial system (ie: multiple teams around the world, hugely complex set of business domains, zero margin for error). The entire approach to code, thinking, and organisation meant that a code base that could easily be a mess at 1/10th the scale, was maintainable and actually increased velocity of the teams over time.

It made me realise that technology is rarely a solution. In fact every new language promises a silver bullet, when in reality I've always seen its the approach to writing software and complexity that kills projects.

DDD - a sane approach to keeping complex systems simple.

Re: Ask HN: What made you change your mind about a programming language/paradigm?

#249
I had my doubts about Rust. I knew it was a powerfull tool, but I thought it was too hard to learn, to complex, and that it was reserved for heavily resources-constrained environments, or any other situation where pure performance was one of the prime concerns.

Then I attended a brilliant conference/demo about Rust, in which the speaker proved that one could build something with Rust without giving much thought about the complex principles of the language. You could get familiar with the language by using it, and then have a much better chance to understand the core concepts of Rust.

The conference is here (in french) : https://touraine.tech/talk/o9KtP8ZrZ130zLZPzdqn/

Re: Ask HN: What made you change your mind about a programming language/paradigm?

#250
When I was student, I learned that many languages are equivalent to a Turing machine and my teacher told that the expertise level in a language is generally more important than the choice of the correct language for a task. About 7 years latter, I have learned Perl. Using Perl, I was able to code in a couple of hours programms that would require couple of days using my favorite langugage (C/C++). I was shocked by the huge difference in productivity. Before that, I was sold to the strong typing side because of my experience in software maintenance. I still believe in strong typing, but I have more insight to choose the most effective tool.
Post reply on HN