Live data from Hacker News

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

news.ycombinator.com

181–190 of 401 posts

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

#181

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.

The model is a data structure and the view is a series of functions on it. The rest is convenience and interface state (render cache, undo stack, etc).

Have a look at functional reactive programming.

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

#182

I used to dislike Java, then recently I discovered java streams, and some of the nice features with newer versions like more immutable types. After that I found Java a whole lot more enjoyable to use.

Scala collection processing--and syntax--will, after not too long, quite possibly put you back to disliking Java. "Why do I have to keep asking for .stream()? Where is '_'??"

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

#183

This is probably an unpopular opinion - Haskell, I used to think it must be cool (and useful) since people go on about it so much. I spent quite a bit of time learning it, and imho the usefulness to practicing programmers is marginal at best. It does present some useful techniques that are making their way into languages (e.g. swift optionals), but in general it didn't live up to the hype for me. I feel a lot of the…

I tinkered with it for years before finding the aha moments that really made it day more productive than my day job languages.

Now I feel I could race a team of programmers in those languages and be far in front.

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

#184

Testing. Unit testing to me seemed akin to drinking 8 glasses of water every day. A lot of people talk about how important it is for your health, but it really tends to get in the way, and it doesn't seem to really be necessary. Too frequently, code would change and mocks would need to change with it, removing a good chunk of the benefit of having the code under test. Then I started writing integration testing while…

We buy software from a lot of different companies, sometimes we own the codebase but hire software companies to build, expand and maintain it, we also benchmark performance.

We have a lot of data that explicitly shows that automated unit-testing doesn’t work. One good example is one of our ESDH systems, which changed supplier in a bidding war, partly because we wanted higher code-quality.

It’s a two million line project, we paid for 5000 hours worth of refactoring and let the new supplier spend two years getting familiar with it and setting up their advanced testing platforms.

So far we’ve seen some nice performances increases thanks to the refactoring. It has more problems than it did before though, even though everything is tested by unit tests now and it wasn’t before.

We have a lot of stories like this by the way. I don’t think we have a single story where unit-testing actually made the product better, but we do have tested systems where we couldn’t say because they always had unit-testing.

Ironically we still do TDD ourselves on larger projects. Not because we can prove it works, but because everyone expects it.

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

#185
post #21

ORMs, until i wrote my own.

How exactly did your mind change?

Not op but:

Type "user.", waits 500ms, see complete db schema of user table with types. Foreign keys and comments 1 Ctrl-click away.

No more typos in column names.

Db schema changed? Press build and you have 234 errors in 56 files.

What was the name of that table? Adr(alt space)essCommentFooBar

Need to insert new row?, Ctrl-c class interface and just assign the values.

But selects I write my own.

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

#188
post #134

Earlier quoted context omitted.

In C# with Visual Studio and Resharper: * Have cursor on 'Dog' * Ctrl-R-R * Type 'Animal' * Press Enter Done. And your code won't be littered with 'old' types and other garbage.

This is native to Visual Studio now. You don’t even need Resharper.

i've only used the native one but i've found it fails on some edge cases where it can't detect variables outside a certain scope. still trying to reproduce it but has made me double check all references since then

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

#189

Testing. Unit testing to me seemed akin to drinking 8 glasses of water every day. A lot of people talk about how important it is for your health, but it really tends to get in the way, and it doesn't seem to really be necessary. Too frequently, code would change and mocks would need to change with it, removing a good chunk of the benefit of having the code under test. Then I started writing integration testing while…

I almost only use mocks for external calls (usually external APIs). Very rarely, I use them for some internal code that is unusually time consuming or difficult to set up. A few months ago, I did a contracting job and the team I worked with used the "mock everything" approach, without even one integration test, which to me seemed crazy (especially for a component which was calle "integration layer"). I tried hard to…

People I’ve worked with have had that idea, and I’ve found they’re most frequently from the games industry or from contract shops. In both of those, the maintenance of the code over time is far less important than that it works on the ship date.

Additionally, people with large state machines with too-complex sets of possible states (games, big frontends without a top level state management system) tend to only unit test because it’s frequently too much of a pain to set up an integration runtime environment. Places with lots and lots of manual QA testers.

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

#190

Earlier quoted context omitted.

> Keeping 30 backend applications up to date and playing nice with each other is a full time job. CI pipelines for all of them, failover, backups. This isn't normal. You should just have a single CI pipeline, failover and backup approach that is parameterised for each microservice.

Doesn’t that mean you have to use the same language, libraries, and DB for every service?

Is that really so bad? At edX all of our services were Django. After the third service was created we built templates in Ansible and cookiecutter to create future services and standardize existing ones. We created Python libraries with common functionality (e.g. auth).

We were a Django shop. Switching to SOA didn’t mean switching languages and frameworks.

Post reply on HN