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
-
Man, I pity the codebases you work with. If it's 65% if-else, it must be quite some spaghetti.
-
john-doe9365yYou should discover better abstractions.
Try using more of
.map
.fold/reduce
when using arrays
Then try to learn about some other functors. Like Either/Option, Maybe/Nullable.
Then start using .chain.
Then go into monads, and try to discover a new kind of magic. -
donuts236785yI remember as a kid, being able to tell a computer to do anything was magic... That's probably true actually for anyone that just started to code.
Maybe it's perspective. Once your experienced, most things are business as usual although to some devs... They're still like "woah wtf did you do?" Or... "I don't understand what you just said" -
Complex code which you don't understand is witchcraft (or black magic)
Simple code which you do understand is boilerplate.
The real magic is when you have complex code which you do understand. -
And then another 20% on top error handling if you're doing it right and because users do stupid things :)
-
There is always that bit of magic in code, it's that small percent of code that makes you say out loud "How the f**k did this even work?"... or in my case, that's 101% of my code.
Related Rants
My thoughts on programming:
As a child:
It is 100% magic
As a developer:
It is 65% if/else statements, 34% iterating an array, 1% actual amazing and unique code
rant
joke
data
magic
ai