Live data from Hacker News

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

news.ycombinator.com

61–70 of 401 posts

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

#61
post #11

Using TypeScript for about 2 hours made me wonder why anyone would write JavaScript ever again. This was several years ago, when TypeScript wasn't nearly as good as it is now.

I've been using TS with RxJS for the last 4 months and I think JS is totally fine. What bothers me the most is JS abuse. Why everything has to be a SPA and thus have to be recreated in JS. E.g. history API. And wtf we need RxJS at all? Other than that management has decided to go with the most strict rules for TS, so I'm spending countless hours fixing silly type errors that don't add anything to the product. I've worked with huge JS codebases a couple of times and we were fine without it. TS is overhyped in my opinion. Let's make more use of the server instead of doing everything on the client.

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

#62
The best code is code you don't have to write, because someone else has already written it. I've decided that number of libraries is the most important feature of a language, which is of course strongly correlated with popularity. Javascript is king in this regard.

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

#64

The best code is code you don't have to write, because someone else has already written it. I've decided that number of libraries is the most important feature of a language, which is of course strongly correlated with popularity. Javascript is king in this regard.

Close, but much more important than the number of libraries is the number of high quality libraries for all purposes you could ever need.

In this regard, JavaScript is far from good. There's huge amounts of package instability, a lot of mucking with node_modules, a lot of useless breakage.

I have found that Python and Ruby are much better in this regard. The libraries serve way more purposes, they're stable and work well, and I can count on library improvements being incremental and easy to digest

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

#65
post #7

Rich Hickey's "Value of Values"[0] is what finally sold me on the benefits of pure functional programming and immutable data structures. (It remains horrifying to continue working with MySQL in my day job, knowing that every UPDATE is potentially a destructive action with no history and no undo.) [0]: https://www.youtube.com/watch?v=-6BsiVyC1kM

I thought the MySQL binlog was the history and mysqlbinlog the tool to help with the undo.

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

#66
I've always strongly disliked Python. Every time I used it, it felt like I was banging my head on a wall all the time. The ongoing quagmire that is Python 2 v. Python 3 certainly didn't help.

My current job is with a company that primarily uses Python, and I still strongly dislike it even after using it for a lot more things. I'm very much a proponent of using the right tool for the job, and Python is almost never it.

Almost.

One of my solo projects was to write a desktop client to unify a couple different warehouse systems. I experimented with quite a few different languages and toolkits in the hopes of finding something that'd satisfy all my conditions:

- Support for an embedded WebKit widget (one of the systems being integrated was entirely web-based)

- Portable (I needed to support Windows clients, but didn't want to use Windows as my dev environment, so the app would need to support Linux; plus, I wanted to extend the possibility of replacing the Windows machines with Linux at some point in the future)

- Support for Windows' winspool API (I needed to send raw ZPL data to label printers; in Linux this is easy to do by wrapping the lpr command, but with Windows this entails either winspool or a bunch of special filename hackery)

- Preferably no C++ or Java, since I dislike those languages quite a bit, too (and statically-typed languages like that didn't feel like the right fit for the amount of JSON mangling I needed to do)

Ultimately, I ended up settling on Python 3 + Qt5, since it was the only stack that actually checked all those boxes, and consequently that stack is in my "right tool for the job" list (when "job" equals "graphical desktop application with the need to embed a browser view"). I'm still on the hunt for something better (and for cases where I don't need an embedded browser, Tcl/Tk is still that "something better"), but it does the job well enough for now.

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

#67
Writing OCaml for a programming languages course in university.

The blend of statically-typed functional programming with eager performance characteristics changed how I thought about writing computer programs. I started using C after that and found the language much easier to use.

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

#68
Not chronological order ....

Peer pressure. --- "What? You DONT know regular expressions?!?! I thought an ace like you would be all over those".

Not enough official work. --- "I think I'll try learning Java. Maybe use it to create a moving average stock buy/sell tool..."

Need it for work. --- "Stop bothering the database guys. They can't be answering your WHERE clause questions all the time. Just go learn SQL yourself"

Work (again). --- "Well, we don't have a Pascal compiler for CP/M. You're gonna have to learn C. Like or not."

Work (again). --- "The 3060 uses an HP-9825. The HP-9825 runs HPL. Not BASIC. Here's the manuals for it. Now, get busy and stop complaining."

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

#69
post #16

Every once in a while I search for something I need in Python and find that it only exists in Python 3, but I'm not quite convinced it's worth the effort to transition from 2. However... I've just learned about Python 3's f-strings and they gave me a big smile, and probably the final push I needed :) (Yes, I do know that sounds silly and there are probably much better reasons to transition to Python 3 ¯\_(ツ)_/¯ )

At this point the best reason might be the 2020 deprecation. But yes, f-strings are great. Just did a small 2-3 migration last week, wasn't too bad.

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

#70
post #28

Earlier quoted context omitted.

> What's the correct way to use typescript... You write TypeScript the same way you write JavaScript. It just enforces a lot of the proper discipline and practices that JavaScript doesn't, and it doesn't let you incorrectly use APIs. > you're explicitly asking for things you know you have in your document, but it reports an error I'm not 100% sure what you're talking about, but I bet you'd get a great answer on Stack…

I'm using jquery for certain layout libraries that I need unless you have another library that provides it. Also I'm using datatables. I don't think there's an alternative to datatables that even comes close to being as well put together. There's just a huge number of libraries around that depend on jquery, and are rock solid with continuing support. I would prefer to use something proven than something that will be…

> something that will be gone in a couple of years

I suspect jQuery and it's ecosystem will themselves become irrelevant and eventually (effectively) abandoned. The (at the time compelling) rationale of abstracting away different browser behaviour has become less and less necessary, and what I would see as the other advantage of using jQuery - like easier access to behaviours like animation, $ajax - less relevant.

$ajax supports async/await, yes - https://petetasker.com/using-async-await-jquerys-ajax/ - but why would I not want to just use the fetch apis? https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API (ignoring browser compatibility, which is becoming the norm)

Post reply on HN