24

I fucking hate chained methods. Ok, not all of them. Query things like array.where.first... that stuff is ok.

Specially if it's part of the std lib of a lang, which would be probably written by a very competent coder and under scrutiny.
But if you're not that person, chances are you'll produce VASTLY inferior code.

I'm talking about things like:
expect(n).to.be(x).and.not(y)

And the reason I don't like it is because it's all fine and dandy at first.

But once you get to the corner cases, jesus christ, prepare to read some docpages.

You end up reading their entire fucking docs (which are suboptimal sometimes) trying to figure if this fucking dsl can do what you need.

Then you give up and ask in a github issue. And the dev first condescends you and then tells you that the beautiful eden of code he created doesn't let you do what you want.

The corner cases usually involve nesting or some very specific condition, albeit reasonable.

This kind of design is usually present in testing or validation js libraries. And I hate all of those for it.

If you want a modern js testing lib that doesn't suck ass, check avajs. It's as simple as testing should be.

No magic globals, no chaining, zero config. Fuck globals forced by libs.

But my favorite thing about it that is I can put a breakpoint wherever the fuck I want and the debugger stops right fucking there.

Code is basically lines of statements, that's it, and by overusing chaining, by encouraging the grouping of dozens of statements into one, you are preventing me from controlling these statements on MY code.

As an end dev, I only expect complexity increases to come from the problems themselves rather than from needlessly "beautified" apis.

When people create their own shitty dsl, an image comes to my mind of an incoherent rambling man that likes poetry a lot and creates his own martial art, which looks pretty but will get your ass kicked against the most basic styles of fighting.

I fucking hate esoteric code.

Even if I had to execute a list of functions, I'd rather send them in an array instead of being able to chain them because:
a) tree shaking would spare from all the functions i didn't import
b) that's what fucking arrays are for, to contain several things.

This bad style of coding is a result of how low the barrier to code in higher level langs are.

As a language or library gets easier to use you might think that's a positive thing. But at the same time it breeds laziness.

Js has such a low learning curve that it attacts the wrong kind of devs, the lazy, the uninspired, the medium.com reader, the "i just care about my paycheck" ones.

Someone might think that by bashing bad js devs I'm trying to elevate myself.

That'd be extremely stupid. That's like beating a retarded blind man in a game and then saying "look, I'm way better than this retarded blind man".

I'm not on a risky point of view, just take a stroll down npmjs.com. That place is a landfill. Not really npm's fault, in fact their search algorithm is good.

It's just the community.

Every lang has a ratio of competence. Of competent to incompetent devs.

You have the lang devs and most intelligent lib devs at the top. At the bottom you have the bottom.

Well js has a horrible ratio. I wouldn't be shocked to find out that most js devs still consider using import or await the future.

You could say that js improved a lot, that it was way worse beforr. But I hate chaining now, and i hated back then!

On top of this, you have these blog web companies, sucking the "js tutorial" business tit dry, pumping out the most obscenely unprofessional and bar lowering tutorials you can imagine, further capping the average intelligence of most js devs.

And abusing SEO while they're at it, littering the entire web with copy paste content.

Comments
  • 4
    I wasn't planning on shitting on the js community. I got a bit carried away.
  • 6
    @jesustricks your not, I'm sure we all feel your pain. I do disagree with one point though.

    Js's learning curve initially is extremely low, but in terms of mastering the language, it's extremely high. To add an analogy, it's about the same as playing bass, easy to pick up and follow along with the band but if you want to pull a Primus and make it your lead instrument then good fucking luck.

    To me that's part of the problem with npm, people think that b/c they understand the basics this entitle's them to develop a shitty library. Then other shitty devs latch on and throw it into the tutorials they're writing because they don't have a job and have nothing better to do.

    Then those learning turn around and bitch because they had to download a 3mb package just to use one method. I'm sorry but that doesn't entitle you to bitch(not you but them), it entitles you to either find a better solution or learn to write your own an throw out the need for a package there entirely.
  • 1
    @jesustricks please do mate, I hate promise chaining as well, fucking sucks.
Add Comment