Ask HN: What made you change your mind about a programming language/paradigm?
221–230 of 401 posts
Re: Ask HN: What made you change your mind about a programming language/paradigm?
#222Using 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 wo…
+1
Also https://medium.com/javascript-scene/the-typescript-tax-132ff...
Re: Ask HN: What made you change your mind about a programming language/paradigm?
#223Earlier quoted context omitted.
> Then I found out that -white space is important-. I hear this a lot and I think it's a misunderstood statement. Python does not care if you do not have a space in assignments or arithmetic or between commas or parentheses. What Python does care about is the indentation of the source code. The indentation is what guides the structure - which is already what we are doing with most languages that don't care about inde…
>but white space just is not one of them. This position is hard to maintain after you've spent an hour trying to debug a nonsensical error just to realize you opened the python file in an editor that used a different tab/space setting than the file was created in. Significant whitespace is one of the biggest misfeatures in programming history.
Re: Ask HN: What made you change your mind about a programming language/paradigm?
#224Earlier quoted context omitted.
I wouldn't bet on the ML hardware startups either, but don't you think that what we regard as general hardware is always going to be too heavyweight to be suitable for massive parallelisation?
Well, take a system approach to the hardware. It's possible you could have multiple paths to memory. It's more likely you won't on non-high-end-systems. The primary path will for the CPU, especially on mobile. Also look at the workload: often many of the primary cores will be idle when you're crunching a big dataset. Those two factors suggest that you want to use CPU hardware for mult-add fops, especially when you co…
But before ML was on dedicated hardware it was on GPUs, and programmable GPUs have been around for almost two decades now. They're getting more and more CPU-like, but so far there's no sign of them actually being subsumed by CPUs. If anything, attempts to make CPU-GPU hybrids have historically tended to fail, such as Larrabee or the Cell processor on PlayStation 3. Of course, ML is a somewhat different workload from the usual use of GPUs... but not that different. The future could be different from the past... but as CPU speed increases get slower and slower, why not expect things to shift even further in the direction of dedicated hardware?
Re: Ask HN: What made you change your mind about a programming language/paradigm?
#225Testing. 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…
Re: Ask HN: What made you change your mind about a programming language/paradigm?
#226Earlier quoted context omitted.
Service Oriented Architecture is a much more fitting name. ;)
Microservices are just SOA done right; services should have a single responsibility, be replaceable, have a schematic etc.
Re: Ask HN: What made you change your mind about a programming language/paradigm?
#227I was also skeptical about static typing. Then I tried to program in Haskell and I was able to do what I was unable to do in previous languages - write short enough functions that focus on one thing, and which compose in type safe way. So now I am a big fan of Haskell, if you don't particularly need speed (Haskell can be made fast but it takes quite an effort) then it's a great choice of language.
(Interestingly, common refrain of many comments here is "then I tried it"; I suggest that you really do, if you are personally skeptical about something, but there is a reason that suggests you might be wrong.)
Re: Ask HN: What made you change your mind about a programming language/paradigm?
#228When I started learning Scala, it was such a breadth of fresh air and I enjoyed it. Cut to 5 years later, it offers so much flexibility that using it in a team results in significant overhead and becomes very easy to introduce unnecessary complexities in the code. My personal experience has been that proficient programmers in Scala are more into the language than the product that all they want to do is refactor the code with next strongly typed library (scalaz, cats, akka streams to monix). Combine this with not so involved manager, it affects the team dynamics and not meeting deadlines regularly.
I don't see the language itself as an issue, I do like Scala but it is one of those languages where one can try to do the same thing multiple ways again and again that there needs to be a strong guidance and captain to steer the team and keep course.
Re: Ask HN: What made you change your mind about a programming language/paradigm?
#229Earlier quoted context omitted.
To add to this: functional programming. Getting rid of state in objects was a DREAM for me. I used to think: come on you better than though hipsters... this shit looks ridiculous, and it isn't intuitive... There's no way it's worth it to learn. It's just the new fad. Oh, how I was so so wrong.
Tell us what was your starting point and references used to learn FP
Ruby is kind of nice in that there's not an easy way to iterate over a list without functional code. You start mapping and reducing pretty regularly, and then discover the power of higher-order array functions, and how it lends itself nicely to functional programming.
React/Redux is nice in that it pretty much forces you to wrap your head around the way functional programming works.
React/Redux was definitely a step up from Spaghetti-jQuery for me, but I'd stop short of calling it an enjoyable experience. It wasn't until I started playing around with Elixir that I really fell in love with functional code.
In a lot of ways, Elixir is really similar to Ruby, which makes it pretty easy to dive in (for a Ruby-ist). But in subtle ways, its functional nature really shines. The |> is perhaps my favorite programming concept I've come across. It's so simple, but it forces you to think about -- and at the same time makes it natural to comprehend -- the way data flows through your application.
Don't get me wrong, Elixir is still very much a functional language. It's allure in that it looks like an imperative language and has a lot of similarity to Ruby is misleading.
The learning curve might not be as steep as say, Lisp, but it' still quite steep. And I think it'd take around the same time to be meaningfully proficient in either.
Glad I got my Elixir/BEAM rave out for the day.
Re: Ask HN: What made you change your mind about a programming language/paradigm?
#230Static Type Checking. I used to think Node.js was the greatest thing ever. I won't bother explaining the benefits but suffice it to say I much prefer writing a server in Java compared to node. I think it takes getting burned at least once for new developers to understand why a lot of seasoned developers like types. Over time I've realized that there's a simple principle that applies to a lot of stuff in software and…