Comment by em-bee

7 months ago

from my experience the primary problem with PHP was not the language itself (although the design was/is somewhat quirky/inconsistent) but with the large influx of inexperienced programmers using it, creating low quality code and thus affecting the reputation of the language. same with javascript today.

i haven't heard any issues about coffeescript.

with that in mind, i'd love to hear your stories. how did you get bitten?

It wasn't a horror story but a simple fact that it was layer of complexity that wasn't really helpful at all.

When code volume was small, nobody noticed, and hey "it looks nice". Some time after though, when volume increased it started to get really burdensome. I used this as a part of Rails pipeline, so it was like: write some coffeescript, compile, run - something failed - usual process.

However the code was already mangled, often source code mapping didn't want to work. When source code was found it wasn't uncommon that it caused by operator precedence or code not transpiled in a way it was intended and requiring debugging transpilation process.

At some point I suggested to migrate away from CoffeeScript toward (almost plain) JavaScript and most developers happily agreed to that. We were able to migrate big chunk automatically, rest took only few weeks to clean up. Velocity increased and people were happy they don't have to deal with it anymore.

Ultimatelly it is the truth with most of the transpilers - sooner or later you get into idiosyncracies that - if technology is not popular enough - you're left alone to solve.

  • ah, yes, i agree, in the end it is still javascript under the hood, and you'll reach the limit with transpilers. what about your php and python stories? :-)

    • PHP I worked on from v4 for couple of years. My main gripe was that it was full of idiosyncrasies, implicit knowledge, heavily inconsistent and heavy on the boilerplate. After moving to Django I felt I could finally think about logic, and not checking if this one dude didn't use non MB prefixed function on string (which - for unaware - could end up splitting utf8 char into two).

      As for Python3 there was this thing that at some point Python was supposed to move from 2 to 3. This change was to bring plenty of incompatible changes, and in a way that migration was outright impossible in normal sized projects. Then community split into two parts, some said "F-- it" and held on to Python2 and some said "F-- it" and moved to other technologies. In the end Python2 was sustained for many years (originally sunset period was short) but those who moved out didn't consider it "stable tech" anymore.

As someone that used Coffeescript a bunch, the problem is it's designed to make it very easy to write code, but has very little thought given to being able to understand that code again in 6 months time.

This means it's very easy to knock out an entire project in record time, but subsequently very difficult to debug/maintain/update the same project when you come back to it. It's essentially a technical debt generator.

  • This is why I have DEVELOPER.md. It explains why I chose X over Y, among many other things. Someone wrote a nice list: https://news.ycombinator.com/item?id=44581069.

    • That's a nice idea, but the problem more comes from using a language designed to help you get ideas from your head into production using the fewest possible characters results in extremely terse code.

      You can say all sorts of things around "write better documentation" and so on, but step 1 really is "don't use a code golfing language"

      1 reply →