Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
inb4 rubes who claim "oh a function that generates string sentences"
bitch, it works on any arbitrarily shaped dataset
clowns -
neriald14451yOnly 200 lines of code? I could easily do it in 1500. Your typing must be so slow if you're writing code with so few lines...
-
So you can do basic statistics over an arbitrary set of properties of a set of objects (always assuming that said properties can be converted to number).
In an interpreted language with reflection built in.
And without providing a way to use custom converters.
Sure, it looks neat, but what's so special about it? -
const outcomeUnit = "%"
not only is it a global variable, it is also being used only once, immediately afterwards. Same with the const immediately before that.
Line 169 has excessive length, you could've just shorten it.
I also miss comments, no interface documentation whatsoever.
The generics are quite neat tho. And some of the features you use from TS are also quite nice too. like that const array thing for example -
However, moving on from your code to your argument of not being able to understand it.
You're an amateur. Simple as that.
Amateurs write hard to understand code. Professionals write easy to understand code. Keep that in mind. -
It's not even meant to be insulting, but you need to get rid of this mindset of: it's complicated, therefore it's good.
This is bullshit. -
ok geniuses, write my generic code in a more simple way
also - complains about a global const but then turns around and complains about not keeping things simple what?
generic code is by nature complex and hard to read. it's abstraction layered on top of abstraction. if you want powerful functions such as these, yeah there's gonna be difficult grokking
as i said, if you find a way to refactor, be my guest -
also this is obviously a prototype, of course there can be improvements, like any software ever written
-
I'm not a ts/js guy, but this code is lower quality than what I would submit with a post like this.
Mind you I wouldn't submit a post like this, either. -
There are devs here who write 3d engines, programming languages, robot automation and you came with this.
If you compare yourself with Facebook / Insta stuff I understand your God complex -
Is the code extremely badly written?
Lol. No.
It's pleasant to read with room for improvements.
Is the writer of the code currently mentally unstable due to getting constant rejects for a job position?
Yup.
π₯
My criticism of the code is the number of type conversions... Not a TS guy, but the number of type conversions seems odd to me (as number).
Related Rants
-
OnlyBytes26My sister got me some stickers as a birthday present but she didn't know where to buy them. So she painted a g...
-
diegovincent37Hi, I am a Javascript apprentice. Can you help me with my project? - Sure! What do you need? Oh, itβs very...
-
BashouT24Today I received the best bug report I could've ever asked for.. Received an email from a member of our custo...
many of you have probably been skeptical this entire time of what i am capable of with a keyboard and a monitor
i guarantee what you are about to see is far beyond 99% of what can be found in SiLiCoN vALLeY salad bar tech bros, and probably what 99% of you can write
take some time to understand this code, like REALLY understand it...
if you can't, that's fine. come back in 5 years.
here it is:
https://typescriptlang.org/play/...
this is what 10+ years of busting your ass (and i mean really busting, its fucking 7 PM on a saturday for me) can look like
another reason you can understand it's infuriating listing to rubes ramble "we can't hire you because you dont have <<arbitrary number of years>> with <<arbitrary language>>" absolute clowns - or listening to managers who are "smart" yeah ok buddy
i am ChatGPT-10+. bow down to my superintelligence. we don't need LLMs because I am 5+ iterations ahead
also if you don't understand the significance of this code, it's on you
any clown i've ever seen, whether it be on twitter, facebook, insta, here on dev rant, hackernews, or whereever, just know, i know you're full of shit, and i've worked harder. that is all.
anyway, i'm finally done for the day, cheers π₯
rant
typescript
π€‘
siliconvalley
rich
clowns
master
samurai
dumbos
clownworld
generics
amazing