Live data from Hacker News

Advice to my younger self: become allergic to the churn

lambdaisland.com

201–210 of 221 posts

Re: Advice to my younger self: become allergic to the churn

#201

Earlier quoted context omitted.

It's all about who is writing it and why they are writing it, not the language. Well ok JavaScript has some legacy warts, but ECMAScript 2019 enables a variety of very well written code in a variety of styles, and TypeScript is icing. As for me, I've only recently entered the JavaScript game, but the php I've seen has been much, much worse. I find the quality of JavaScript I typically encounter is on-par with typical…

Seconded on php. I have used php, I can use php, I just choose not to any more if I can help it.

Smart choice. I opted to stop accepting php jobs several years ago and life has never been easier.

Re: Advice to my younger self: become allergic to the churn

#202
post #75
post #41

Earlier quoted context omitted.

You may hate Make and it is certainly far from ideal (tab-based syntax was a mistake) but the thing is, Make has very simple rules that haven't changed for decades and Makefiles generally keep working (and when they break it isn't the fault of Make itself but of something else that isn't as stable/backwards compatible as Make).

Common make fail #1 The project you landed on has been using some souped-up supermake with a ton of features (which were used with wild abandon) and some subtly different semantics for (say) macro expansion and variable assignment (and these are really difficult to determine the dependency scope of). The build system has grown to a recursively gnarly Turing-complete mess. So when you go to update the tooling, you fin…

As far as rants go, this one was a joy to read. Then I wept for the state of affairs in build tools. I'm not even close to familiar with so many as you've listed, but I never experienced one that didn't eventually turn into a Rube Goldberg contraption (if it didn't already start out that way).

> grown to a recursively gnarly Turing-complete mess

> gronk through many, many lines of make

Thank you for my new word of the day. It describes exactly how I feel sometimes, dealing with technical debt accumulated over years, Frankenstein's systems where parts are always churning - often for no good reason at all, new but worse in most aspects - it can be exhausting gronking through the layers of complexity.

Re: Advice to my younger self: become allergic to the churn

#203
post #172

Earlier quoted context omitted.

"Standard" [1] and "Airbnb" [2] seem to capture some amount of sensible guidelines. Adding Prettier [3] gets you something akin to gofmt, and adopting standard eslint rules [4] can help too. [1] https://standardjs.com/ [2] https://github.com/airbnb/javascript [3] https://prettier.io/ [4] https://eslint.org/

You're talking about style, I'm talking about idioms. Those aren't the same thing!

I think idioms and style have some level of overlap.

Semicolons could be considered idiomatic or stylistic, for example. Requiring strict equality operators feels more of an idiomatic way to avoid bugs, rather than simply whitespace. Eslint certainly has a number of rules that are more idiomatic than stylistic.

If you're touching on the lack of consistency in, say, open source javascript, I agree, code is all over the place. Also, I think you're looking at a language that has had dramatically more evolution (especially in recent time) than most other popularly used languages. Old code without promises and suffering from callback hell feels archaic.

However, I think if you look at, say, TypeScript repos (which is cheating, I know, it's not javascript), there is more homogeneity, at least from what I've seen.

Re: Advice to my younger self: become allergic to the churn

#204
post #172

Earlier quoted context omitted.

You're talking about style, I'm talking about idioms. Those aren't the same thing!

I think idioms and style have some level of overlap. Semicolons could be considered idiomatic or stylistic, for example. Requiring strict equality operators feels more of an idiomatic way to avoid bugs, rather than simply whitespace. Eslint certainly has a number of rules that are more idiomatic than stylistic. If you're touching on the lack of consistency in, say, open source javascript, I agree, code is all over th…

>> language that has had dramatically more evolution

Of course it evolved. It’s easy to evolve if it was literally nothing in the first place.

Re: Advice to my younger self: become allergic to the churn

#205

Earlier quoted context omitted.

But JavaScript's got asynchronous!

A race to the "promised async hell". I wonder how many devs are struggling to debug and fix bad code written using Promise and async features. With care you can use these features safely and productively, but it is also very easy to make subtle mistakes that cause intermittent faults or strange corner case errors.

The comment is a reference to a phrase “It’s got electrolytes!”.

Re: Advice to my younger self: become allergic to the churn

#206
post #199

Earlier quoted context omitted.

I mean I haven't been a professional for multiple decades but I've written professionally in a very wide range of fields in C, Matlab, Java, Python, Verilog, Assembly, Fortran, and Javascript, and, there is no language that I've seen that has more hair pulling, braindead I just learned to program yesterday type programming nearly as much as I've seen in Javascript. (I've worked intimately with decades old scientific…

> there is no language that I've seen that has more hair pulling, braindead I just learned to program yesterday type programming nearly as much as I've seen in Javascript. I would argue that anything for phones is similarly braindead. While the languages are okay, the API's, UI idioms, and general ecosystem seem to have a half-life of about 6 months. If you step away from programming phones for 18 months, it's like y…

Idk - there is definitely a difference between learning about React and a completely different way to do programming.

If you were any good 12 months ago - you will pick up any of the trends quite easily in a week or so (partially because you have also predicted the future).

Re: Advice to my younger self: become allergic to the churn

#207
post #17

The piece reads like a Unix pastor's pulpit preaching "Great nutritious technologies to use: Make, Emacs, Lisp, CLI" "Bad unwholesome technologies to use: JavaScript, Ruby, IDEs, Graphical User Interfaces" I personally hate Make, it's burned me too many times. Now I use CMake, and I haven't been burned in years. And is it candy or an olive that I like VSCode and not Emacs (not that I've ever tried Emacs, I just don't…

VSCode (and Atom) feels like an Emacs with Javascript instead of Lisp anyway

Re: Advice to my younger self: become allergic to the churn

#209
post #199

Earlier quoted context omitted.

I mean I haven't been a professional for multiple decades but I've written professionally in a very wide range of fields in C, Matlab, Java, Python, Verilog, Assembly, Fortran, and Javascript, and, there is no language that I've seen that has more hair pulling, braindead I just learned to program yesterday type programming nearly as much as I've seen in Javascript. (I've worked intimately with decades old scientific…

> there is no language that I've seen that has more hair pulling, braindead I just learned to program yesterday type programming nearly as much as I've seen in Javascript. I would argue that anything for phones is similarly braindead. While the languages are okay, the API's, UI idioms, and general ecosystem seem to have a half-life of about 6 months. If you step away from programming phones for 18 months, it's like y…

> Groovy should be taken out and shot and the idiot who foisted it on the Android build system

I think your beef there should really be with Gradle, or at least, how it is using Groovy. The way Groovy is implemented as a DSL for Gradle is, in my view, toxic. Almost everything is implicit behavior, crucial aspects rely on totally incidental "magical" features that just make things happen when you invoke some cryptic incantation that has an unobvious connection to its context.

Groovy itself is pretty good and IMHO much better than Java for most purposes.

Re: Advice to my younger self: become allergic to the churn

#210
post #58

Earlier quoted context omitted.

XML and JSON are both examples of the problem actually. S-expressions have existed since the 50s, and they solve all the same problems with a much saner syntax. In fact, if Mozilla marketing execs didn't insist on Java style syntax for Js, and it kept Scheme style syntax we wouldn't even need HTML and CSS today. We'd have a single syntax that would cleanly express code, styling, and layout.

S-expressions do not have typed standards for serializing dates and booleans like JSON. They also can't distinguish numbers from text. S-expressions also have no standard for comments, and can't distinguish maps from lists. A S-expression based serialization standard would be a bit cleaner than JSON, but it's enough of a change that it's worth redoing anything.

All of that and more is available with s-expressions in Clojure https://github.com/edn-format/edn
Post reply on HN