5 ms·
Why learning Haskell/Python makes you a worse programmer (2006)
- kalterstern 14y agoThis is quite silly, of course. A solid developer has no problems switching idioms (not just syntax) when hopping languages. There's really not much sense in an argument that says you "lose" something by learning newer things -- provided, that is, you're really making an effort to wrap your head around the newer things that you're studying, and not just cramming selected phrases and reflexes into your head in order to finish some current task at hand. If anything he's become a better C# programmer, not a worse one, precisely because of his "bad" experience, because he now sees that overuse of certain habits can lead to bizarre or otherwise undesirable results (just like with any language). So really he should be thinking positively about the whole experience, rather than negatively.
- zwegner 14y agoI personally agree with TFA. Being able to change your environment is really key--I write Java in my job and it's just awful for me. I definitely lose motivation from knowing there are better alternatives. He's not saying you lose anything, more that it's harder to use those things when you're constantly thinking about how wrong they are. Similarly, the overuse of certain habits is not always avoidable.
- michaelochurch 14y agoYou should consider secretly using Scala or Clojure in order to see how long it takes for someone to say something.
- zwegner 14y agoI've thought about it--it's a rather small company, with generally smart people on the team. It might happen, but the problem is mostly political. I also need to learn more Clojure... (I've learned enough Scala to convince myself that I don't really want to learn it)
- michaelochurch 14y agoScala is good if you have good programmers. Otherwise, it's painful, because they tend to write Java-in-Scala code. Also, it has a compile-speed problem that is tolerable in general but catastrophic if you have bad engineering practices (specifically, cyclical dependencies). I just got back into Clojure after leaving my last job and the language (which was already very good) has gotten a whole lot better in the past 2 years. I recommend it highly. Where do you live? What's the tech scene like in <X>? My wife and I are both ready to leave New York. We'll stay if I find something great, but I don't want to work in social media and my "job hopper" story (too many startups and consulting projects, NYC finance firms tending to perceive the latter as similar to short-term jobs even though they're not) is making finance annoying. (I can still get hedge-fund jobs, that's easy as crap, but there are few good ones and, besides, I like technology a lot better than finance.) Our short list is SF, Austin, Boston, but not limited to those 3 places by any means.
- zwegner 14y agoWRT Scala, of course I don't know much about it, but it just seems way too complicated for its own good. It's like the C++ of functional programming. I don't really want to invest that much time in it just to become somewhat fluent, and then trying to convince others to do so is pretty much a non-starter. I'm in Austin, and it's pretty nice. I imagine you know enough about the tech scene already (perhaps more than me?). There are lots of opportunities, but the "good" software jobs are rather elusive (especially for a college dropout like myself).
- pnathan 14y agoFYI, Seattle, and too a small extent, Portland have a tech scene. But you probably have to like the PNW.
- rdouble 14y agoPortland has Galois, which may be up his alley.
- Schwolop 14y ago
- willismichael 14y agoThat's an interesting approach! I tried more or less the opposite: wrote a patch replacing hundreds of lines of Java with dozens of lines of Clojure, then showed it to the team. It didn't work out so well. Here's an allegory that more or less parallels my experience: http://hack-tastic.blogspot.com/2013/04/most-people-who-graduate-with-cs.html http://hack-tastic.blogspot.com/2013/04/most-people-who-grad...
- michaelochurch 14y agoOverperformance is dangerous in the workplace.That's a real risk of using high-productivity tools (e.g. functional programming languages). You're introducing gunpowder to horse-riding swordsmen. Usually, they'll lynch you for witchcraft. "Clojure doesn't have the latest despondency infarction frameworks! Burn it! It's a witch!" I think the trick is to fail up into a better company (or team, if your firm isn't one of those where a bad start renders you immobile) when that happens. Hard to tell how good a company is before you join, though.
- vinceguidry 14y agoFor anyone thinking "WTF, what about LINQ?", note LINQ was part of .NET framework 3.5 and wasn't released for another year after he wrote this post. LINQ makes coding in C# a whole lot more pleasant.
- mwhooker 14y agoIf learning anything makes us worse at something we should just stop learning
- GhotiFish 14y agoTell that to pandora, cthulhu and heroin.
- Houshalter 14y agoOr just stop learning the things that make you worse?
- michaelochurch 14y agoThis is going to be fun! I know he's joking, but I agree-- to a point. First, if you write Haskell-in-Java code, you're going to do a horrible job unless you have so much autonomy that you end up reinventing Scala... in which case you should just use Scala. (See: Greenspun's Tenth Rule.) Second, I think you learn a lot by studying other languages, but most of the superiority of Lispers or Haskellers comes from the fact that good programmers in general tend to be a curious set. Learning Lisp will make you a better Python programmer, and possibly a better C++ system architect. Will it make you better as a subordinate grunt on a gigantic C++ codeball? No, absolutely not. It will make you a morale problem and get you fired. Third, you learn a lot more in expressive languages that makes you a better programmer but the languages itself don't get all the credit. When you use a Lisp, you can get a lot done quickly if you know what you're doing and cover a wide swath of computer science. When you use a true fringe language, you end up implementing a lot of libraries you'd just assume work in Java. These experiences are highly valuable but not rooted in the languages per se. It's just that a lot of the work you have to do to make a non-mainstream language usable in primetime contributes to your long-term awesomeness growth. Fourth, if you want to be a Corporate Programmer (TM) and not be challenged too much, then maybe get tapped for management in your mid-30s, then Haskell and Python will poison you. I've written a lot about the progress of developer competence (see this, just today: http://michaelochurch.wordpress.com/2013/04/22/gervais-macleod-23-the-shodan-programmer/ http://michaelochurch.wordpress.com/2013/04/22/gervais-macle... ). Once you cross the 1.4 rubicon, there really is no going back, and you'll be in conflict with managerial authority forever. Well, at least until you become so good that it's eminently obvious and you can escape the CrapFactory (or is it CrapVisitorSingletonFactory?) Corporate Programming world. However, if what you want is to be a great programmer (not an easily employable one) then Haskell and Python will do you favors, and learning a few more languages (also C, because the low-level will always be important for some domains) is probably necessary. This was written in 2006; I wonder what he'd think of JVM languages, especially Clojure.
- MostAwesomeDude 14y agoI know you're joking, but I agree -- to a point. First, if you write FORTH-in-Java code, you're gonna do a horrible job unless you get to reinvent Factor, at which point you should just use Factor. Also, you get to use Factor, which is awesome. Second, I think you learn a lot by studying other languages, but most of the superiority of FORTH hackers come from the fact that good programmers, in general, tend to be parsimonious. Learning FORTH will make you a better programmer. It will also make you better at C++. In fact, it will make you better at everything, including being a morale problem, getting fired, being a hero to your co-workers, and being promoted. Third, you type less in concatenative languages. When you use a Forth, you can get a lot done quickly because you don't type as much. Forth, if you want to be a Corporate Programmer (R) and not be challenged too much, then just use FORTH, because, like COBOL before it, FORTH lets you hold down the Shift key constantly. However, if what you want is to be a great programmer, then FORTH is still the answer! Why? Because it says so: : ANSWER ." FORTH is pretty much the best way to be a great programmer. " ;
- deleted 14y ago[deleted]
- munificent 14y agoIt's interesting to see how far C# progressed since this was written. Just a couple of years later, C# 3.0 came out and his example becomes: mylist.Select(foo => foo.Description()) .Where(x => x != "") .Aggregate((a, b) => a + "\n" + b); Which is, I think, pretty nice.
- famousactress 14y agoWow, that's interesting. Is 'x' just a magic var for whatever Select() yields in each iteration?
- Fishkins 14y agox is the input variable to that anonymous function. Instead of the named syntax e.g. doSomething(x) { return x * x; } the syntax for C# anonymous functions is x => x * x
- archivator 14y agoThe argument to Where() is a Func<TSource, Boolean>, and that "x => x .. " business is C#'s lambda syntax. x is just a variable name, no magic there.
- daeken 14y agoIt's a lambda. Saying x => foo(x) is the same as lambda x: foo(x) from Python.
- adambard 14y agox is the variable in the anonymous function 'x => x != ""'. I don't know C# but I presume that everything before '=>' is the argument list and the rest is the function body (with implicit return). You can see it again in '(a, b) => a + "\n" + b'. As a side note, I find it a bit funny how C# chooses method names in Linq for the benefit of programmers who know SQL, despite `Select`, `Where`, and `Aggregate` acting exactly like what other functional languages would call `map`, `filter`, and `reduce`. Not wrong, just sort of quirky.
- 14y ago
- ColinWright 14y agoProbably none of you care, and some of you will hate me for pointing this out, but look, here are a few previous submissions: https://news.ycombinator.com/item?id=407796 https://news.ycombinator.com/item?id=407796 <- Lots of comments https://news.ycombinator.com/item?id=946258 https://news.ycombinator.com/item?id=946258 https://news.ycombinator.com/item?id=1883663 https://news.ycombinator.com/item?id=1883663 <- A few comments https://news.ycombinator.com/item?id=2410202 https://news.ycombinator.com/item?id=2410202 https://news.ycombinator.com/item?id=2489298 https://news.ycombinator.com/item?id=2489298 <- A few comments https://news.ycombinator.com/item?id=3171630 https://news.ycombinator.com/item?id=3171630 https://news.ycombinator.com/item?id=4828284 https://news.ycombinator.com/item?id=4828284 <- Lots of comments It will be interesting to see if this discussion raises any points not in the earlier one. Or the earlier one. Or the earlier one. And to the inevitable downvoters, I don't care. No, I'm not baiting you. I just wanted to help people see that this has been discussed before, and if you have any respect for the HN community, and if you think the HN community is smart in any way, then you may want to see what this smart community has said about this in the past, rather than re-hashing the same old arguments. Or not. Go to it.
- merlincorey 14y agoThank you for your fine service. Whenever someone posts something old to hackernews, I am extremely thankful to those divers who link us to the old posts, which are almost always very useful.
- kens 14y agoMy crazy theory is that there are three different ways people treat online discussions: the "cocktail party" where people have interesting conversations, the "scientific conference" where the idea is to increase knowledge, and the "debate team" where you argue your position. Posting links to previous threads is perfectly reasonable in the "scientific conference" model, but rather rude in the "cocktail party" model. So any downvotes on your links are sort of proxy votes on "what HN is".
- vacri 14y agoIt's interesting that HN has no URL matching to prevent simple straight-forward (multi)reposts like this.
- Siecje 14y agoI program in Python everyday but I still think in C/Java and have to google things like enumerate for for loops. Though this is happening less often now. I also try to do Python thinks when I switch back to C. input = scanf();
- Kapura 14y agoI do most of my current work in Python, and I have no problem switching between paradigms within the language. Whatever makes it easier to read is how I look at it. There are times when a functional solution makes the most sense, and if it makes the most sense, it should be clear and easy to read and understand. But then there times when a functional solution looks like a symbolic mess, and it's easier just to throw a couple of for loops into the code so it's easier to see that i'm, say, iterating through some list.
- cpdean 14y agoI think that having higher standards for solutions doesn't make you a worse problem solver.
- deleted 14y ago[deleted]
- platz 14y agoI wonder if the same argument applies to using Reactive Extensions (Rx), ReactiveCocoa, etc..
- macca321 14y agoResubmitting this article when it's so out of date seems like anti-C# FUD spreading.