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
-
Ahh....
WHAT.
AT NOW I'M FEELING SO FRIGGGINGG FRIGGG DAMN BETRAYED
YOU FRIGGGINGG
jk -
It's my duty tell you, @Floydian, my fellow comrade, I fulfilled the prophecy!
Edit: it's at https://devrant.com/rants/1377080/... -
LLAMS36647yOR:
1) Write a unit test for the code you want to write
2) Make it pass in the simplest way possible
3) Refactor to make it clean
4) Write the next test
Much faster and means you actually understand the solution.
I know/hope the post is satire but I still thought TDD was worth mentioning ^_^ TDD is always worth mentioning. -
nikmanG15287y@CrashOverride yeah just to make the hopes real, it was satire. Just saw like 3 posts in a row where someone actually cleaned the code up for OP.
And with less sass that SO to boot -
LLAMS36647y@OdeToCode Nope. Sure it may be slow at first while you get used to doing it. But once you get the hang of it your code basically writes itself. I wrote a program to calculate if a number was prime without even needing to think about how to do it. Writing the appropriate test cases in the right order and making them pass one by one led me to the solution.
Related Rants
-
CCAtAlvis4when you check the commits to see who wrote shitty code
-
DasKoder15I was told during my initial interview that the book "Clean Code" is their Bible here. And it's true. It's ly...
-
DuckyMcDuckFace19Good news: Today my app reached 1 million daily users. 😃😃😃💰 Bad news: It started out as a side pr...
Steps to writing more readable and cleaner code:
1) write shitty code that gets the job done
2) take a screenshot of set code
3) post it on devRant and blame it on a coworker
4) someone will reply with a clean solution within a couple hours
5) copy and paste that solution then push to repo
rant
howto
clean code
shitty code