Live data from Hacker News

Advice to my younger self: become allergic to the churn

lambdaisland.com

191–200 of 221 posts

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

#191

Earlier quoted context omitted.

The only thing JavaScript was ever even barely good for was that which it was designed to do, be the programmable interface for a browser. Why anyone would want to do anything else with it simply boggles my mind. It's like if someone took the BASIC my calculator offered back in the day and turned it into a general purpose programming language.

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.

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

#192

Earlier quoted context omitted.

There are many many organizations and Institutes that aren't the man. You don't have to work for a soulless corporation. You can do work that helps the greater good of humanity.

Under the current version of American Corporatism, no, you cannot work for a company that isn't soulless. A Corporation is legally required to work only to increase the value of a share, nothing more. Maybe you can work for a non-profit if you're lucky, but how many are there out there that pay market rate?

> A Corporation is legally required to work only to increase the value of a share, nothing more.

No. That's a misconception. Corporate directors are required to act in the interests of the shareholders, but they have a lot of discretion in determining what those interests are and how they are to be served.

Here's a reference from a decent law school: https://www.lawschool.cornell.edu/academics/clarke_business_...

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

#193

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…

It's such a shame! JS could be a concise little language with a lot of power (in terms of being able to ignore types until they matter), but instead you end up transpiling unusable garbage with 10MB string manipulation libraries that release breaking changes as patch versions. Python is what JS is supposed to be, although I do feel like Bart Simpson in front of the blackboard every time I write `lambda x:`.

Being a small language would be irrelevant to JS. The web could benefit from a sound type system built into browsers (aka typescript in the strict mode), but it's not like anybody complains about python lacking the type system, right? What web really needs is a way to write highly modular apps and let the browser download only relevant modules, with caching, prefetching and so on. None of the attempts have worked so far. If you look an any app today, it looks like the main module that has static deps on other modules that deoent on other modules and so on. When everything is linked together, we get this 50MB binary. Not a big deal for native apps or services, but it's a big deal for web apps that need to download all this mess and maybe actually use 20%. There is no way today to conveniently write a web app that would pull only necessary modules at runtime. It's not just that the language is missing some keywords, it's about the entire web world is designed around static linking: we'd need to redo existing non modules, existing frameworks, upgrade to http2 for batching multiple requests to download a bunch of small modules and so on. That's a lot of work that needs a lot of expensive devs and the returns of that work are non existent: there's no profit to be made there. That's why it'll stay this way: bloated web apps with thousands of unused deps.

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

#194
post #58
post #20

Earlier quoted context omitted.

> Most of the ideas in use today have been discovered decades ago. The big reason for churn is that people don't bother learning about what's been done before, and keep reinventing the wheel. But on the other side of the coin, do you really want to be locked into a decades-old solution to a "solved problem" forever? Or are there still improvements that can be made to reduce friction and human error? "Machine/human re…

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.

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

#195
post #30

Earlier quoted context omitted.

> Your contrived example falls flat because JSON is flat out better for most use-cases and anyone having a discussion about it will probably fit into those use-cases. Easy to say with hindsight now that it is massively popular and has a huge ecosystem of parsers for every conceivable language. At the time it was invented though, it was yet another data exchange format and I'm sure there were a lot of grey beards pooh…

Back in the day, XML was almost universally hated by the people you describe as "greybeards", mostly because it was a convoluted "one size fits all" approach, hijacked by business, that ate bandwidth for overhead with none of it's promised benefits actually materializing (because everyone created their own, quasi-proprietary XML Scheme).

I remember a .NET developer using it in place of json. That was the slowest system I've ever seen.

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

#196
post #102
post #86

Earlier quoted context omitted.

I have a similar set of experiences but have a feeling that it's at least partly down to the sheer number of people writing Javascript and the very public nature of much of that code that so much of it is a mess. I don't think there's anything inherent in JS that make is produce messy code other than the fact that it's easy for amateurs to get results (thanks to the fact it runs in a browser and there's lots of easil…

what killed Javascript for me (and I think many others) is that there is no idiomatic way of writing Javascript. There is no "javascript"-y way of doing things (unless you count callback hell). I'm not saying that a language should only offer one approach to a problem, but there should be general guardrails and guidelines. A shared vocabulary. None of that exists in modern JS

The problem is that the original paradigms were pretty terrible but JS has to keep (as much as reasonably possible) backwards compatibility to not break the web. If you forked JS and made changes to clean it up that weren't backwards compatible, you'd have a hard time convincing browsers to take it, making the whole exercise sort of moot.

The fact that we have things like the Wayback Machine is a testament to how this approach, while terrible for developers starting out or working in a legacy codebase, has enabled us to preserve what is now a significant portion of contemporary cultural history. AFAIK there is no similar archive of programs for, say, Java or C.

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

#197
post #81

Accept the churn or be left behind, imo. The best thing you can do to insulate yourself from the pain described in the post (trying to remember how code worked, etc) is to brain dump important things you learn along the way. I've recently begun keeping a TiddlyWiki[0] for every major project I undertake. In it, I keep unexpected things I learned, cheat sheet items, command-line snippets, and longer form entries about…

The more experience I gain, the more dubious I grow of the "being left behind" concept. It's rookie bait. With experience, you instinctively know when it's time to move on from a technology (it no longer serves its purpose well or at all) vs. jumping on the hype train to get some breeze in your hair.

There's a difference between jumping on the hype train and being stubbornly stagnant. You will definitely be left behind if you refuse to adapt to new "industry standard" tech, even if all of that new tech is 90% old concepts with slight changes, repackaged.

That's not to say you should jump on every new half-baked hackathon-originating javascript framework. But it does mean you should have your finger on the general area of the pulse of where the industry is moving, and start learning that tech. For example, pick up Rust for systems programming, instead of C.

I know a web developer who refuses to learn or use any web tech besides PHP. Finds cloud-based hosting confusing as well. "I can do anything I need in PHP." Everything, except find good paying job that isn't maintaining gnarly legacy codebases. Doing PHP is his bread and butter, and unless he decides to learn some of the newer (stable) webdev tech, he's going to find himself with no marketable skills in the future.

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

#198

Earlier quoted context omitted.

Under the current version of American Corporatism, no, you cannot work for a company that isn't soulless. A Corporation is legally required to work only to increase the value of a share, nothing more. Maybe you can work for a non-profit if you're lucky, but how many are there out there that pay market rate?

> A Corporation is legally required to work only to increase the value of a share, nothing more. No. That's a misconception. Corporate directors are required to act in the interests of the shareholders, but they have a lot of discretion in determining what those interests are and how they are to be served. Here's a reference from a decent law school: https://www.lawschool.cornell.edu/academics/clarke_business_...

That reference cites the Hobby Lobby case where they got to opt out of providing insurance for contraception and a Facebook video of an expert explaining how the current corporate system produces sociopathic entities (corporations). I don't believe either fundamentally debunks the idea that the agents of corporations are required to attempt to increase the value of a share.

I agree that there's still a lot of lee-way in that, like giving an employee a bonus might hurt shareholders directly in the short-term but you can claim it increases productivity and so is a good decision. You still have to justify all decisions in terms of value to the shareholders though. If you (as CEO) decide to just stop all work and spend every day at Disneyland until the coffers are empty you can be sure you'll lose that suit. And when every single decision has to be viewed through that lens, you aren't able to directly do real good for the world, just indirectly.

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

#199
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…

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 you're learning everything from scratch.

(Side note: All right, Groovy should be taken out and shot and the idiot who foisted it on the Android build system needs to be taken to the woodshed and beaten severely.)

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

#200
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!

[deleted]
Post reply on HN