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
Search - "!clean code"
-
I was told during my initial interview that the book "Clean Code" is their Bible here.
And it's true. It's lying, unread in drawers and shelves all over the office.15 -
Updated description!
Fuck Wordpress in the ass with a new kind of cms. Make devs happy with clean code. And Laravel53 -
While reading through the Elasticsearch (Java search engine) source code a while ago I found this gem:
return i == -1? -1: i;
I think someone should stop drinking while coding.
Some other nice lines:
int i = 0;
return j + 1000 * i;
Are these guys high?11 -
I like how nano not only shows you unnecessary whitespaces, it throws them in your face and and screams "YOU SEE THAT? WHAT IS THIS SHIT? DELETE THIS DISGRACE TO CLEAN INDENTED CODE!"14
-
One of the coolest good bye message I have ever seen in my company...
The code is so clean with proper comments...11 -
I can now die without regret, I came back to a project after leaving it for three months
I WAS ABLE TO UNDERSTAND MY CODE!
I think I reached the point of writing clean code?
Let's hope so :)10 -
I really hate people who prefer this coding style:
if (condition)
{
// something shitty here
}
Instead of this:
if(condition){
// perfectly clean code
}41 -
This guy next to me in the train is coding C#... but his codestyle looks like... no words... I am now reading Clean Code!
I hope he will notice!😂8 -
wrote shitload of clean architecture beautiful code and compiled successfully on the first try without crashes or errors11
-
Yesterday I said: "My code was nice and well organized but then I started to do the things the customer wanted. Now it's horrible and ugly."3
-
Why not have a custom (500 line) JSON mapper... you know... fuck those auto mapping libraries out there...12
-
6 months of internship made me realize that solving other peoples bugs is my biggest distraction.
Apparently I enjoy solving bugs more than writing clean code from scratch. 😐5 -
I've had this amazing piece of advice as my Desktop wallpaper ever sense it popped up on r/programmerHumor. I mean I still don't write clean code, but now I know to be prepared for the fucker!2
-
Developers coding cycle:
Start of Project - "Right, I am going to make this code clean and structured."
Deadline looming - "F**k it, just throw the code in there and get it finished".2 -
Dear coworker: oh my god we aren't in highschool algebra; using "x" as the name of a parameter makes me want to cut you.15
-
Picked this up the other day. Hope it's as good as people have been telling me.
If so, then here begins a new journey for me to better code.11 -
When the code is not working:
I have failed my parents, my job and everyone. I shouldn't have taken Software Engineering as my profession. All I'm doing is giving pain and frustration to everyone. *thinks about a clean way of suicide*
Then after a while the code works:
I am probably the best engineer to live on these planet.3 -
The proper use of comments is to compensate for our failure to express ourself in code.
Quote of the book "Clean Code" by "Uncle Bob".
#ShotsFired6 -
There is no reasonable excuse for doing anything less than your best.
- Robert C. Martin, Clean Code4 -
Does anyone else get so self conscious about writing neat, clean and efficient code that you get demotivated because you always think "there's a better way to do this".
The cleanest code is no code at all. 😂8 -
I write loads of services, tools, programs for myself (unpaid) which I could just as well open source.
Only thing is that the code is usually not that clean and refactoring would take time that I don't have so I'm kinda anxious about putting it out there 😧12 -
Had a friend who was forced to document his own code. He gave up after an hour of trying to figure out what methods 'somethingsomething()' and 'somethingsomething2()' did...3
-
I remember reading a comment on here that as developers, we are really authors. And that has changed how I write (and even read) code. I don't remember who and where it was, but whoever said that: Thank you.
-
Read Clean Code and came to the realization that I'm a terrible person to everyone who had to read my work.1
-
That feeling when you refactor that spaghetti mess into clean beautiful code that passes all tests flawlessly4
-
DEVS THAT MANUALLY UPDATE AUTOGENERATED CODE ARE THE WORST!!!!
Guess who has to clean up your mess? And be pinged about it later when another dev thinks they wrote the feature??
No, your hack wasn't cool.2 -
Was practicing kotlin today.
After finishing a file I ran the clean the code thingy and it removed 137 semicolons.
Its gonna take some time getting used to not ending with ;5 -
I'm now typing clean code. [1]
And it shows - the code really looks better. [2]
.
.
.
.
[1] I cleaned my keyboard by removing every single key and wiping it with alcohol.
[2] After I bought a new monitor, that is.1 -
At my previous job a coworker left positive comments alongside any negative ones on my code. “Nice job here. Very clean”, or “nice use of X design pattern here!” Kinda made me look forward to his code reviews.4
-
You know it...from the introductory page of "Clean Code" by Robert C. Martin.
Which door represents your code?2 -
"As a team, we have the shared responsibility to ___".
(replace with ALL of the following: resolve bugs, do junior's code reviews, clean up dead code, keep the kitchen clean, improve test coverage, write documentation, order coffee beans, etc)
NO. JUST FUCKING STOP RIGHT THERE. Shared responsibilities do not exist. A single person is responsible, and can optionally delegate tasks.
EITHER I DO IT AND I'LL BE FUCKING AWESOME AT IT, OR SOMEONE ELSE DOES — BUT I'LL SLAP SLACKERS IN THE GENITALS WITH MY KEYBOARD.
Fucking startup hipsters with their community driven attitude, this way no shit gets done, ever.7 -
My friend and I spent an evening creating a slackbot that allows you to play Cards Against Humanity.
I intend to clean up the code tomorrow evening. Feel free to fork/deploy if you like!
Sources: https://github.com/ChappIO/...10 -
Sometimes I write awesome code that executes well as intended with proper file structure and clean codebase and sometimes I bring shame to my family.8
-
You refactor after there's code. You can't have clean code if there isn't code to be cleaned to begin with. Code first. Think of perfection later.4
-
Le me: "my code is awesome! The way I did XY and Z is insanely cool, efficient, and maintainable."
Le Boss: "yeah so let's schedule a code review next week."
Le me : "... fuck, Fuck, FUUUUCK!"
Internal Screaming3 -
Every time I have to deal with my boss code and lack of convention and everything that makes a clean code I just want to scream like a bitch and punch him in the face without minding breaking my own hand.8
-
As a developer, I want to write clean code and I want managers that understand the importance of clean code. I don’t want to work with people who force me to deploy untested code because "we need this feature working today".9
-
Sometimes dirty code is more efficient than clean code.
If features get dropped frequently and requirements change every few days, writing best-practices, tested code is wasted time. Learned that in my first job where I thought the other devs were all bad. Until I realized their bad code pays my salary, and my clean code takes more time to develop.6 -
Visual studio 2017 with Xamarin:
* writing some sweet code, life is good.. build and run.
*change int age to 2, build, build failed, no single message why.
*clean, clean failed, no single message why.
* build rebuild clean all or by project, nothing works, no single message why.
*change nothing, restart VS, build success !
* writing some code, same problem
*restart VS, "this project is not compatible with Visual Studio"
Good bye guys, I'm gonna kill myself7 -
Uncle Bob and Martin Fowler. Their books (“Clean code”, “Clean architecture”, “Refactoring”) and Twitter posts have changed the way I look at software development.5
-
Sad. Got a new job. Apparently, readable code is not a priority. My suggestions were being ignored. Does the benefits of condensing an if-else to a simple one-line return statement really that hard to understand? Does making clean and readable code should be an optional thing to consider? It doesn't help that I'm the youngest, they felt like I don't have enough street cred. I'm starting to hate my job.11
-
Bob Martin. His books Clean Code and the Clean Coder, and all his talks on architecture, SOLID and TDD. I could listen to him talk for days, and he taught me everything i know about writing clean code.2
-
Writing clean code is what you must do in order to call yourself a professional. There is no reasonable excuse for doing anything less than your best. - Clean Code2
-
Climb into bed, feel something wet under leg. Wtf? I check. Bloody slug...
There was freaking slug in my bed...
Clean it out, change sheets and all (at 4am, I got lost in the code) and then see another one climbing up the side of the bed27 -
I saw this on the first page of a book that discusses techniques for writing clean code... The more I think about it, the more accurate it tests.
-
This is so true, I always feel like my code architecture going to be clean, neat and organized but reality is always the opposite 😭
Source: https://instagram.com/p/...3 -
When it finally works after hours or days of suffering.
Or, when you clean things up and get to delete some garbage code.
Makes it all worth it in the end5 -
While I was in university, I used to be a good programmer (which I still am :D ), my friends used to copy my code for the assignments. One day, the teacher (one of my my mentors) called me in his office and said, "this is your code".
I'm like, in my mind, "How did he know this?"
The teacher said, "If you let others copy your code one more time, I will fail you".
I nodded my head in affirmation.
Later I understood that I've been a "Clean code" principle follower even before I knew this term. So, it was pretty easy to differentiate my codes from my friends. The teacher is really a genius ^_^5 -
Fuckwit tried to lecture me on clean code.
Checked his work, it seems like he writes the spaghettiest spaghetti I've ever seen. Who would have guessed it. At least he knows that something called 'clean code' exists.5 -
I think Clean Code: A Handbook of Agile Software Craftsmanship by Robert Martin should be a must to read.
In school no teacher puts emphasis on code quality.
They should learn how to name variables and functions the right way at an early stage in order to better perfect their craft :)3 -
PM approves all UI and project gets assigned to me. He then makes tons of UI changes that will affect the workflow of the approved UI. To this point, code was clean and well documented. I request a few days to re arrange the code to reflect the new workflow. PM says: I need a minimal product. I don't need it clean. I want speed to ship and start marketing. That's where I stopped caring.. To the next dev, I am terribly sorry..2
-
Yesterday, a very good friend of mine who is a philosopher has given me a present: the book "Clean Code" by Robert C. Martin.
This summer is going to be very good. I'm very greatful.4 -
Ah.. the beauty of clean code.
I wrote a very cleanly written program two years ago. Proper variable names, not too many, right naming, right design pattern,.. Now I come back to it and I am able to instantly figure out the code again. It only took me half a minute.
The importance of clean code... that's something the industry needs to understand more. Well, then there's the money issue. lol5 -
"No matter how slow you are writing clean code, you will always be slower if you make a mess." - Uncle Bob Martin1
-
I wish all newbies would read clean code. I feel if you understand the concepts you can more easily join an established team and contribute more quickly with less do overs. I realize writing elegant, testable code is like making good whiskey. It takes time.5
-
There is clean code. There's spaghetti code. And I just discovered there's spaghetti after being thrown up code.8
-
Some days you write your code and it all goes well.
All your tests pass, you write clean code, you solve your problems nicely.
Other days everything that can go wrong, will go wrong.
...the latter was the case for me today.4 -
FFS stop squashing commits. If “updated comments” is what the commit was it should show it in git blame. If “fixed null check” is what the commit was it should show it in git blame.
There is no reason to have “ticket-234 service revision” beside 1000 lines of code. How does anyone justify this loss of git info for the sake of “clean history”? Nobody looks at your history and says, “That is bloody clean git history I should write home about it.” People do however look at the code and say, “I wish I knew WTF they were trying to do on that line.”16 -
Biggest sin is writing code without taking into account clean coding and just doing what ever is necessary to make the code work6
-
"The only way to make the deadline - the only way to go fast - is to keep the code as clean as possible at all times."
Uncle Bob
Spread the word.1 -
Found my old code.
You gotta admit, that's some clean code there, considering I learned C# only for a year at that time.
But those comments....
VeRy WeLl WrItTeN, vErY dEtAiLeD, vErY gOoD8 -
Engineering managers will say things like -
- "I'll let the team decide what's best for them" & "code quality is our primary goal" -
but then they'll shoot down any & all requests to go back to some old piece of code and refactor/clean it, because of "deadlines".
Hypocrites, all of them.3 -
[...] we should never ignore any part of code. The parts we ignore are where the bugs will hide.
- Uncle Bob1 -
Apparently `a || b` is unreadable to set a default value for a string in JS, but assigning temporary variables and use if statements all over is better somehow.
My code reviewer said use `a ? a : b` except it failed eslint, so he went back on that. (eslint suggested `a || b`, ffs.)10 -
I came to this company. I saw spaghetti code. I told myself to write clean code and also clean the existing code. I took too much pressure for too little return. I am done with this shit. I will now write clean code but fuck the old spaghetti code!2
-
Opened GitHub as usual today, somehow found my old repositories (created when I was a fresher). Opened them and felt why I'm still on this earth, pulled them, restructured all of them, pushed them back and now I can sleep!! 😴
-
Told a teacher I finished a week worth of exercises, and asked for the next one
"This code is not yours. It's too clean, redo everything"
... what, is it wk64 already ?3 -
The design process.
Call me old fashioned - but clean-code/clean-architecture/SOLID is not as important as simplicity and coherence.
I JUST NEED FUNCTION THAT DOES STUFF! But noooooo better overly design EVERYTHING!4 -
So we had a class that should have 2 states 0 or 1, you think my coworker would be smart enough to represent it with a Boolean? NO!
Represent the state inside the object as an int then when using the object in a function creates a Boolean that determines the state of the object and after the function done it's job THEN call another function that takes the object and the Boolean and change the int state inside the object depending on the Boolean.
Wouldn't it have been whole lot easier to just you know..... Make the state a Boolean from the start.
When I saw this I knew I was witnessing a miracle of the human mind. God bless!
Ps: it wasn't connected to any kind of API nor server and there are never more than 2 states. It's just some local sequential code so don't assume it had a logical reason it's just a fuck up.5 -
Half fact: Code reviews help to maintain clean codebases.
Full fact: Code reviews are a way to find out who secretly wants you fired.4 -
copied a code for android from stackoverflow and it worked
edited the code no more works
removed the code and pasted the original code from stackoverflow and still doesnt work
clean and build and now the code starts to work7 -
Had to look into some old code today and had the "Is this my code?! This can't be my code!? No one else worked on this code, so it must be mine... But, but, it's so... good! And clean! And logical! And well documented! This can't be mine... Can it!? Hey! It works!" moment.2
-
I have always believed that clean code is readable code, and if your code is readable, then it shouldn't require masses of comments to explain it. However, in the course I am being taught, we are being told that in programming, comments are massively important to help another developer understand your code and what it does. So what is the consensus of the dev community?
Do you feel comments are key, or redundant if your code is written well?20 -
Oh gosh... This week a "friend" of mine will have a job interview for a company I am working at. This guy really just can't Code. He has no understanding of clean code, abstraction etc. He just knows the basics. But he loves to brag how good he is and got his bachelor degree. Damn I hate this guy and I hope HR won't hire him.7
-
"Mh, I should just write a short comment instead of writing a novel"
// This is a fucking detailed explaination of this shit, even though you can clearly see what it does because I usually write clean code. Also, it's a one-line comment, so have fun side-scrolling -
Nothing is more relaxing then finding some really bad code and clean it up in your free time with music in background. Love this kind of Friday's.
-
Anyone have any good book recommendations? They can be language specific or universal. I'm halfway through clean code and love it. Wondering if there're any other world class resources y'all have used.7
-
When you're really fuckin proud of that extremely clean, elegant, efficient 30 lines of code. It might not be important, but holy shit it's pretty!!3
-
Fucken Designers - Have you ever heard of fucken consistency?
Different looks and feels for the same thing in every single page? Wat the fuck man - I am trying to write clean and modular code for components and you guys are making hard -
Bomb Alert:
Fuck Designers *middle finger*6 -
Java teacher writes code on blackboard in comp lab
He tells us to try it out at our workstations.
We do. The code does work. We tell him.
He says: "There is something wrong with your compiler..."
Question is...we were around 30 students. Can all our compilers not work if we had used the lab before and the code we run worked clean??!?!?!?
We were flabbergasted2 -
I'm going to be that guy .... A lot of these rants are about code compiling first time .. Throwing away code you wrote because you didn't need it... Getting in the zone and writing a billion lines before you compile .... Am I the only freaking person here that does TDD ? My rant is wake up people ! People evangelize about it because it fucking works !6
-
This fucking guy create a mess of a code, more than a spaghetti code, a clusterfuck of shit untested spaghetti code, and the project is actually getting well, our customer is getting bigger but everytime there is something to be added, its a fucking pain to add, and when something breaks, almost every thin breaks, and the shitty guy who wrote this code is quitting and its fucking up to me to clean up all the fucking mess, fucking asshole.
DOCUMENT AND TEST YOUR CODE KID, DONT BE A FUCKING SPAGHETTI PROGRAMMER7 -
Dev at the start of a project: My code will be effective, clean and well organised!
Dev at the end of a project: console.log("Reverse engineering strictly prohibited.") -
A colleague of mine who doesn't know how to write simple conditions and sends button code from backend in loosely coupled design.
Worst of all she doesn't wants to get updated to the latest programming structure and no signs of learning on how to write clean code! -
(PSA: serious replies to this kind of wk tag might be best suited under Random)
"The way you've done this seems much less complicated that what I would've come up with."
"You've been reading Clean Code?"
"I didn't think that was possible, nice."
And finally, the most extreme one:
"Can you print this code for me so I can hang it on my wall of good code?"3 -
Best dev experience : found this. https://github.com/jupeter/...
Worst dev experience : learned the cons of no documentation the hard way. -
Today I feel like a coding vampire, let me create a new Xamarin project and boOoOost with the code!!
*Creates a clean project, finds 1492 errors* well... f*ck it4 -
Recently, I had to make a minor modification to some Node.js code a coworker wrote a year ago which buffers stringified JSON into Kinesis. I just needed to add a new key to the input object, it took minutes to make the change, but hours to make sense out the absolute trash spaghetti code this guy wrote. After spending half a day trying to make his code readable, I just got so pissed off. I replaced his 15 files/+1,500 lines of uncommented code, filled with classes, factory functions, poorly named functions and vars, and so, so many spelling mistakes.
We now have a single, well commented, 300 line file that does the same thing.
Get that shit code out of here. -
So true ...
"Many developers on a schedule aren't making efforts to write clean and efficient code, relying on idiot-proof languages (and consequently more RAM and faster processors) to make up for their malaise."2 -
Our Code everlasting
The all creating One
Coders Almighty
Through Our Holy Lines
Conceiving Algorithms
Konrad Zuse our Savior
I believe in Clean Code
I believe in Free Software
I believe in Open Source
Our Code is three in one
I believe in the bug-free project
That'll be compiled again
For I believe in the name of Alan Turing -
Yay ...
No more !important in SCSS...
All colors pulled from variables...
Such code ... Very clean 😂 -
So I'm about to finish The Design of Everyday things by Don Norman and I have Clean Code coming up next.
But what are some good programming books that are tech agnostic?2 -
My Dev hero is without a doubt Robert C Martin (Uncle Bob). His books clean code and the cleans coder changed the way I program and his work on TDD too6
-
That moment when, after you've spent days trying to refactor your code to be clean and readable, you look at what you've made and you honestly feel like you actually made things worse than before.1
-
After I read clean code I talked to a fellow developer about some concepts. Later I reviewed some code of him and he clearly got the concept (not)
Java
...
If (isTrue(someValue))...
public boolean isTrue(boolean value){
if(value == true)
return true;
else
return false;
}9 -
I always feel inspired by programming when I create some algorithms or programs which I can use when I need to.
Small utilities and command line programs r what I make at times... and I also enjoy trying to implement them awesome algorithms 😍
However, most inspiration I get is from looking at C code though ( especially the Linux kernel... that code is SO clean 😍😍 )2 -
Do you agree?
Junior: What are comments
Mid-level: Hah! My code is so clean, I don't NEED comments!
Senior: comments comments comments comments comments comments comments comments comments comments comments comments comme-...25 -
This year I want to become a better programmer. I ordered the book clean code and want to focus on writing more and better unit tests.
If anyone has any tips on how to improve or how to get tips on your code6 -
Want to read a book that can help me avoid newb mistakes and can help me write beautiful code ?
Pragmatic programmer(1999)
Or
Clean code
Or
any other book ?
Help me !!?14 -
I envy all those developers with clean codebases and consistent coding standards and nice architecture.
I'm fixing bugs and optimize code in someone else written project. which looks like spaghetti. with naming conventions like "a", "bbb", "zA" comments written in unknown language and off course the deadline was yesterday.4 -
Let's face it: I am and will always be a tinkerer. Yes, I know my ways around, I can sneak into legacy code bases easily and throw new stuff in there, I've seen software stacks. But scarcely sound design, really modular. Even from the cleverer, experienced ones. They can master more complexity, so they can handle more spaghetti. Some essay from the 80's had this grand idea to organically 'grow' software. That's how it looks like most of the times: cancerous, parasitic super fungi (armillaria). Yeah, we all know have to fight bit-rot and entropy, but it was all lost before already. We'll never get rid of legacy protocols, legacy code.
And even when we go green field, start a fresh. Yeah, take a great design, make everything new, after some months of throwing features and outer constraints at the thing, it's the same old mud again.
But we can still dream on: some day I will design great APIs, I will have great test coverage, documentation, UML design, autometed tests, fuzzing, memchecking, I'll work professionally, clean coder style.
Pfft forget it. Maybe change for consulting, because we'll continue to dream of the 'clean' code, so you can sell the next 'recipe', development method. It's like diets. As effective. For the one selling.2 -
ML Dude: “Hey see what I did with this python code. It is so clean and dope”
Business Boss: “Well Done.”
ML Dude: “It is a nice approach don’t you think.”
Business Boss: “How does this put a money in my business account?”
ML Dude: “Ehmmmm”2 -
Start the reading of "clean code".
First thing that i have learn "The only valid measurement of code quality: WTFs/minutes".
What do you think about it ? Agree or not ? -
Sitting here reading Clean Code and read the heading, "How Would You Build a City" at the beginning of chapter eleven. Damn it now I just have the urge to put the book away and play SimCity.1
-
You know why i hate JavaScript?
Instead of writing
return x.y.z;
I wrote
return
x
.y
.z;
Just for making the code look clean
and everything broke...10 -
Wrote a set of beautiful Swift functions. Runs Xcode, nothing. Checks code...looks good...clean build, delete app, re-install, rebuild...nothing. Checks documentation, watches three videos, re-writes code...nothing. Stares at screen for an hour...realizes I never actually called the functions. Closes laptop, checks self into pysch ward.3
-
Learning to code is like learning to write when you were younger. It can be sloppy or clean but if you keep at it it'll probably become clean. But, with these sites like code academy that accept only one solution to the problems they present it's as though you're being told that everything you're doing is wrong eventhough you get a solution to the problem in the end. It bugs me that these sites want people to code the exact same way.
-
Last Friday night instead of partying, or seeing a movie I stayed home to clean up some code for a potential job interview. Good times! :D3
-
Automatically clean up code, removing redundant and duplicate bits, splitting large functions, and formatting it nicely. Especially useful when trying to understand some garbage code someone else wrote which you need to rewrite.2
-
The best dev advice a dev has given me is to write clean and structured code from the very start of every project. Changed my life in general.
"How you do one thing is how you do everything." -
TEST, TEST AND TEST ASSHOLE
OUR PROJECT IS GETTING BIGGER AND START TEST YOUR FUCKING CODE SO I DONT HAVE TO CLEAN UP THE WHOLE FUCKING MESS
FUCKERS2 -
private static final int TEN = 10;
private static final double THOUSAND = 1000.0D;
[a copy-paste from our repo]12 -
After reading Clean Code principles:
Before you rename your method, remember to use the refractor option
😌4 -
Clean Code book has some good guidelines but sometimes becomes too fanatical for my taste. For example, comments in good doses are really good.
And people sho accept it as Gospel are making a mistake.13 -
Met a guy today who in all seriousnes said that our M.O. should be "hard to write, hard to read". Dude. Shit like this is why nobody want to collaborate with you..2
-
When your mostly done code that you spent time on documenting and keeping clean gets handed over to the sloppiest dev on the team. Because that dev is out of tasks and you got other work that moved up in priority. I really hope he doesn't ruin everything :(3
-
I will kill the next dev who justify its shitty code by quoting random dev methods/rules/ideas/cool-names he found online like "clean architecture" or "MVVM".10
-
My colleagues: "We should fail for scalastyle issues! Warnings will get ignored! Nobody fixes them! We should enforce a clean code style!"
Also my colleagues: Create PR with loads of `// scalastyle:off` flags comments.
¯\_(ツ)_/¯1 -
Not really a fight but another Dev was telling me how I should implement things and to keep the code clean and clear/not spaghetti.
In the back of my mind I'm going yeah... I know what I'm doing... probably better than you.
I'm usually the guy telling other ppl to clean up their shit..or forced to dig thru it when their stuff blows up in production.
Anyway I'm going to add him to code review and maybe email the whole team... and then go, now this is how I want our code to look.11 -
I saw multiple attempts to convert an int to a String by concatenating it with an empty String...
String s = someInt +"";
(I'm guessing the compiler uses a StringBuilder here which still ends up calling Integer.toString())2 -
How to write unmaintainable code and keep your job for life, tip #476;
Use A.C.R.O.N.Y.M.S. to keep the code terse. Real men never define acronyms, they understand them genetically3 -
Goals:
-> Write clean code
-> Never trust the code
-> Never use PHP
-> Stop procastinating
-> Stop ranting3 -
Autoformat. My boss hates it when I use it, he tells me if I do it again I'll get some pain. Namely because autoformat mixed in with code changes is ugly, that's understandable. But he's barred me from using it entirely, although I find it useful when working in Python or CSS... So to circumvent this I make a separate commit with "cleanup", however I sometimes forget to do this... I know I've forgotten, because my boss calls my name from the room next door. I get up, step inside his office and - "Don't use f****** autoformat!". Well FML.8
-
Just joined a new company this week. They have react, redux, and all sorts of libraries checked into their repo. Code looks like someone puked all over it. Should I quit? Or stay and clean it up?1
-
IDK why I get annoyed by underscores before private member names... Is i it useful or just an old relic?16
-
Junior newbie dev here.
I want to buy "Clean code" by Robert C Martin. Its tad bit pricy here in india.
I wanted other devs (especially senior devs) opinion on the book. Is it worth the buy ? What are your reviews ?4 -
You know what's worse than reading someone else's code? Reading someone else's code with comments that make absolutely no sense!
It's like deciphering hieroglyphics. If you're going to comment, at least give me a hint, not a riddle.
It's not a treasure hunt; it's coding!2 -
In the programming aspect of CS, you should have to debug and fix a previous student's project for your final grade.
You don't really learn to appreciate the value of clean code until you've had to fix shitty code. -
The „UI-God“ in our team has never heard of dry or clean code.
Clashing classnames for modules in global namespace, gives a f* about patterns, naming conventions, structure and everytime I rebase it breaks my code.
I need the same amount of time fixing his work as he spends on it. -
So are we living in the time where new programmer are no longer care know how to code effective and clean code because of libraries out there OVERSIMPLIFIED it?3
-
Respect to all women in CS. They are in fact better when it comes to clean code and concept.
Prof. Kamala Krithivasan, is teaching some hardest shit in CS.
Turning Machine;
https://youtube.com/watch/...3 -
When client budget is less than the time needed to do a good jobs.
Happens more than I like.
"We’ve all said we’d go back and clean it up later. Of course, in those days we didn’t know LeBlanc’s law: Later equals never."
-Clean Code1 -
Teach students the importance of clean code/architecture and testing. Even if they dont yet understand the more complex topics such as architecture, they should understand why quality is important and that software is a craft more than a science. You cant just apply principle X and insert design pattern Y and profit++. You actually have to think and constantly improve. AND TEST.
Think I would probably also cover things like build automation and continuous delivery. These are now important things for junior devs to know about going into companies. -
Can someone come and clean my desk? I not on the mood and my code to clear the desk seems to be stuck in a wtf loops.4
-
I have become the only thing I always hated in a developer. Building a project without a proper documentation.
As a solo developer in a company where I have to do database architecture, front-end, back-end, testing, NETWORKING (I am the most ignorant guy when it comes to networking), product design, there is no time for documentation.
But hey, I have structured the project, files and functions (with comment, parameters type and return type) properly and I understand what I've done even after 4-5 months without touching that specific project so I got that going for me which is nice... I guess.3 -
Microsoft has released Visual Studio 2019 version 16.6 with a new IntelliSense Linter to help C++ developers efficiently clean up code.
The tool IntelliSense checks code on the go, using squiggly lines to highlight problems and Lightbulb actions for suggested fixes.
The feature can be enabled in Visual Studio 2019 version 16.6 from the Preview Features within the Tools > Options menu.
Source : https://devblogs.microsoft.com/cppb...1 -
Working now 8 months at a company. (C++)
Every feature becomes a refactor and a code clean
Every bug becomes a refactor and a code clean
Every Refactor becomes a code purge. :/1 -
Making a dev enemy? Quite simple. Asked too many questions for the dev. I wanted to learn and understand his reasons, he thought I was undermining his position. Other time, I forced him to make the source code be consistent with the structure of applications existing code. Dude came, made some commits adding features in places suitable for him, despite the code having clean layer separation, which took me long time to achieve.
-
Parental Programming: noun 1. Between chaning diapers and preparing milk bottles you contemplate about the code you are going to write. So in the 5 min you get to do it you can punch it out almost perfectly before you have to clean vomit from a carpet.1
-
Just read Uncle Bobs book series:
Working with Legacy Code,
Clean Coder,
Clean Code,
Clean Architecture
Read it in this exact order and each book was better than the one before.
What did you think of them and what other books do you recommend reading?
(Coding books of course)3 -
To my vigilant code review overlords, yes, I appreciate the scrutiny, but must we nitpick every variable name? I've been told my camelCase is more like llamaCase.
Let's focus on real bugs, not whether my indentation is an affront to nature.
Remember, the perfect code doesn't exist – unless you're coding on a cloud XD4 -
- Promote source control usage especially in group projects
- Teach clean code principles
- Push for commented code in exercises -
Found this in a book and i can tell you that wtfs/min is the most effective code quality measurement technique programmers have known to this day! xD
(Book: Clean code Robert C.Martin)4 -
My s.o. thinks code is like the kitchen and the bathroom! I should always leave them cleaner than I found them.3
-
That moment when you decide to build clean code and declare every variable as private or protected but then you have to change that later on anyways to public again because you're to lazy to create setters and getters.... :/2
-
What would be the best tips for keeping code clean?
I recently noticed how "unclean" my code is, I try to organize it as much as possible but through that I manage to make the code very messy :/
What are your best tips, advise, tricks... lalala?
Note:
This problem mainly applies to long projects and games :P9 -
My first game jam,
I was first excited about coding but when I started, I was caring about making my code clean, and I lost too much time focusing on this... You should see the end, such a mess ! Spaghetti code, pointers everywhere but hey, it worked 😊 -
It makes my blood boil when my colleagues (who have been here for ages) know that maintaining dependencies in code is important but don't even action it because they give the excuse of having no time or the pressure of finishing it on time.
It angers me that I'm now in .dll hell and they don't even consider the time or push a valid case to fix the issue. It also frustrates me as I've realised that they have grown complacent/indifferent, not even attempting to change it.1 -
My mentor to me when I joined the job fresh out of college (in a somewhat dramatic tone, which is why I remember it so vividly):
"Gone are the days when you wrote programs with a small number of big functions, and lots of comments. Write code which is easy to read by humans - small functions which do 1 thing and are named after the 1 thing it does."
TL,DR: well named modular code. -
when you want to keep the code clean, but you are about to say "fuck it" it needs to work that is all....5
-
IMO no matter how clean the code is, there should ALWAYS be SOME COMMENTS to anything that might seem not very obvious.
Reading the whole business logic to understand the point to why the piece of code was written seems stupid.
These codes get merged because everyone is lazy to review 2k lines of code for a new feature (including me) lol27 -
Seventeen. I worked for 17 hours to pull off a POC of a feature no one thought was possible (at that time). It wasn't clean beautiful code, but hey, it worked! It's live now and I still smile when the feature is used.
-
As I will have a new job soon and it seems likely that it will be in network api design I wonder if you have good book recommendations on the topic.
I already have "clean code", "clean architecture" and "design patterns" in my pipeline, so I need something more specific on designing network (restful) service apis.
(This is a follow up to https://devrant.com/rants/1828903/...)3 -
If I need 2 weeks to implement a new feature, I need at least one more week to find better solutions which make the code easier to read. Then I would like to spend yet another week to think about other solutions to make sure I can't find one that is even better..
I hardly ever get that time but when I do, I create something beautiful..
The last time I was able to reduce > 2000 lines of code to a about 50 lines generic service which is easily extendable and understandable.
Do you include stuff like this in your estimations? -
0. Do all practice in Clean Code
1. Do almost all exercises in Eloquent Javascript
2. Learn Python
3. Be proud of the work done in my current job project (I've just started)
4. Read own code from <wk100 and say: "omg I'm a much better programmer today!"
5. Implement 32 hour days to have time to read all those books, listen all those podcasts, code all those katas... -
My biggest insecurity is that people will one day find out that I am not good enough!
I write clean code and do all the shit around it but I don't feel good enough.
Imposter syndrome is for real, sometimes! -
my project would be to write clean and KISS code... not slap and green egg ham jam kind of sticky tape.
-
Rule: NumberIdunno,
It's easier to figure out a solution yourself than it is to clean your code, recreate the bug in a small snippet then posting it on Stackoverflow.2 -
I thought my code was bad and that was why it was taking twice as long as any other group to run
No it’s just Illinois the state my group was assigned has almost 2000 more data rows to scrape compared to any other group. My code wasn’t running slow. It just had longer to run
I’ve spent 4 days trying to fucking refactor and improve my code Ignoring clean code and attempting clever code to run faster and now I need to revert back to clean code since no one else in my group would be able to understand or work on the damn file if I left it at clever
Fucking hell 😫1 -
Feels good to be able to clean up code! Just changed an ugly 5-line while loop into a clean 2-line do-while. Now I just need the rest of my program to work 😂
-
Inspired by someone here who said we should be the Shakespeare of code, how about we comment/show any great, clean and open code that we found here?2
-
https://stilldrinking.org/programmi...
/\ This is why all programmers should go on strike for a month and collectively collaborate to code a new, clean, bug free internet where nobody but you can control your data.
Also. It should only be added to by people who know how to code in order to maintain this clean code.
We can call it "internet level 2" or "internet 2.0"4 -
I'm not there yet, but hopefully, someday, I'll be an expert in making clean, maintainable code. I want others to look at it and say, "ah, I get it" without staring at it for a long time.2
-
To all those open source contributors who only believe in refactoring code .... If u really want to clean trash come to India coz we have lots of it3
-
I got frustrated with my code. I decided to open a new file and rewrite everything with better descriptive names to variables, and combined 3 functions that basically did the same thing into one to be called. It cent nice until my shift was up and I had to go home.1
-
Code verification
senior dev: You wrote this code yourself?
Me: Yes sir, it's clean right?
Senior Dev: Prove it
Me: Blah Blah Blah...
Senior Dev: Damn, You the realest -
Freaking coding conventions...
Just chose something and stick to it.
How hard can it be?
Apparently this hard:
if(condition){
//SomeCode
}
else
//SomeCode1 -
Am I the only one that in order to keep C code clean has a horrible file with macros and util functions?4
-
If you feel that you need to make systems to enforce code standards... The team actually needs to learn to self-enforce your code standards. If an automated tool is determining standards it will be tricked into allowing clean-looking code with poor design choices into your project.
This chaps my ass.3 -
Question to all those who have worked with software architecture: What is your approach when implementing architecture and design into actual software?
I find it very hard to translate UML diagrams and architectural requirements into working code and I feel like there is quite a big "gap" between the two. How to you breach that gap and manage to maintain a clean and comprehensive architecture in your project folders?question clean architecture architecture requirements patterns suggestions project structure clean code software engineering11 -
!rant
I am shifting to India and curious about something.
Do people in Indian companies talk about clean code or ddd or tdd or pragmatic programmer or programming practices type of thing?
As I said just wants a heads up.11 -
For the fucks sake, friend sent me code with ton of shit like that:
digitalWrite(room6,lv6);}
Is there some nice short guideline how to wire nice clean Arduino/C-based languages?5 -
Why do I always get the response: "just comment your code better" whenever im looking into ways to make my files smaller and more pleasant to read by abstracting big chunks into different files.
Or when i want to generate some documentation with storybooks or something.
Is it just me or am i that rebellious by wanting cleaner code..2 -
-- Learn Data Structure this year
-- Complete 2 project with clean code
-- RnD on Game Development
-- Develop one WP plugin
-- Complete two tutorial get them promoted
-- Clear IELTS and try to get job Abroad
-- If have time will go for freelancing
-- Lastly if get bored will switch job -
Using a framework's helper function that relies on unrelated libraries which have multiple irrelevant dependencies to do something you could write in three lines of code.
Because it's cleaner and nicer to look at -
It does not matter how much you try to write a clean code , there is always a room for better one ...
-
Completed the project alone in one week's with clean code and backup. And Get 25000CNY easily.
Well it's an IOT project4 -
Since when was having 3 spinner styles and 2 pop ups styles a good idea in a SaaS? This baby needs a proper spruce up. I must admit it's not really a rant, I enjoy it, decrapifying the code and general refactoring. This is from a hackathon a good couple of years ago. Finally giving it some TLC. Feels amazing.
-
How many of you are here which truly care about code and don't like that there are standard 9-to-5-devs out there?4
-
If I could make sure every programmer I worked with now and in the future read one book, it would be Working Effectively With Legacy Code. I don't care how passionate you are about clean code, craftsmanship or other platitudes of the industry if you can't tidy up a messy codebase.
-
!rant
Reading The Pragmatic Programmer and Clean Code.
Any other suggestions on books thats not specified to a specific programming language that is worth reading?2 -
I despair at how most devs don't want to learn or self reflect if their code is clean.
It makes me hate this job some days. -
I am planing to create a reading list for technical books and am looking for recommendations.
Currently I have:
- Spark: The definitive Guide (need it for a university project)
- Clean Code
- Clean Architecture
- Functional Programming, simplified (or any other beginner-friendly book about FP)
Do you have any recommendations and must-reads for a more junior developer? I am looking for stuff about FP, Code Quality, Java, Python, Scala, and any general interesting technical stuff.3 -
I fear that my code isnt as much good as expected so I started hurting my fingers... Anyway, started reading "clean code" so hope it helps... But fear remains... Want to do a good performance; I am married now...4
-
Perfectionism... I often refactor my code because I always see something that could be "done better" in my own work, which can slow me down if I'm not paying attention to my main task.
If I could stop time I would perfect my code all day, but that isn't realistic. 😂
Doesn't apply to dev work only, I've had to learn the art of not giving a shit about every single detail in many other disciplines. I just love getting things done really well. -
I'd have the power to lint developer brains so they'd write clean code and I wouldn't spend so much time refactoring crap.2
-
Very specific for r, but Hadley Wickham wrote tons of stuff about how to build packages and has inspired me a lot. He uses a lot clean code practices and writes very clearly.
-
Robert Martin says in clean code, or maybe clean architecture, that one should separate the tests into what is hard and easy. GUI tests are hard and therefore brittle and so we should test against view models.
However on clean agile he says a story is not done until it passes automated acceptance tests which in my experience are always brittle and grow so large and brittle that things grind to a halt.
What am I missing? Are stable acceptance tests possible on the GUI? Should we test only an API?5 -
A wild random shitcode my coworker wrote 2 years ago appeared
var thingsToCheck = new List<String>();
foreach (var thing in thingsToCheck)
{
// 10 lines of logic
}
Random shit code used confusion. It's super effective.
But honestly, these were the only few lines in his checkin. We still try to figure out what he thought when writing this. -
I was looking for a RRule Generator Component in ReactJS because I (a back-end dev) am lazy af to build front-end component. It drains my energy and I stumbled upon "react-rrule-generator". And holy moly. It is no longer maintained, but it has a very beautiful code. Then I thought, I should search more open source projects where code is clean so I can learn more.
So, do any of you know any open source project, library code or whatever that you think has a very clean code?3 -
I'm a self taught web developer, I know I can develop great apps, but my code doesn't feel structured... It gets messier as I add more features, and this makes it harder to develop and keep track of everything.
How can I improve this, are there any processes to follow?5 -
Sometimes i feel really messy in my code and unorganized.
after a while i regret what i did and in order to fix this mess i re write the class all over again or i end in an endless errors which is time consuming.
So what's the best way to write a clean code in your opinion other than commenting and identation1 -
When a colleague reads the clean code book but the writes code that's exactly the opposite ..... Yeah, hmmmm
-
Looking back at the VBA code I wrote for work about 10 months ago makes me realize how much reading the Clean Code book by Robert C. Martin did for me, because holy shit my old code is unreadable...2
-
That moment when you quit a job and your colleagues give you a "Clean code" copy. Doing it at joining would be way better.
-
Perfect job would be work life balance.
Colleagues are helpful.
The existing project are having clean architecture and code structure that won’t confuse developer at all. -
If the project is the landscape of the client's requirements and the code is the map into it.
Where in the f*cking abyss am I right now?? #LegacyCodes1 -
When people "simplify" their code by refactoring a singular line of code into a completely separate function. The purpose of which is to prepend "https://"3
-
When it comes to writing comments in your code, I do quite a lot of it. Even for parts where you just need to read the code to understand what it does. However I do write very clean comments, not even snarky comments where I know someone has done something completely stupid. In my work, I generally keep it very clean. I wonder how many people write profanity, or use weird naming for functions or variables?
https://thenextweb.com/dd/2018/...3 -
I'm bored and can't sleep soooo...
Bad clever code vs Good clean code
Worst / best examples. - what's devRant got
Stories, pictures, links. All mediums are welcome1 -
People making features that has not been asked for and not going to be used, just in case we need it in future.
In this case making a new message queue for deleted audio and putting messages on said queue for every time we delete audio. Not enough with we don't have any uses for it. We also have to pay money for these messages in azure.
Build stuff when you need it. Not when you think you might need it... -
What would you choose between 'clean code but just completed half of the tasks' or 'messy code but completed all of the tasks' ?5
-
"You should not bother about making your code so clean, I want features not pretty files"
As I'm leaving this job next week, someone will have to continue this project after me
I think we can say that my boss sucks -
What should my next book be? I’ve narrowed down to these—
A Commentary on Unix by John Lions
Clean Code by Robert C Main
Code Complete by Steve McConnell
SICP by Gerald Jay Sussman
Feel free to suggest any other book as well7 -
Facing some down - simultaneously somehow as dev and privately.
The dev part partly triggered by another burning project. Our team deep in shit up to the chin... And this unanswerable question: who is to blame? Everyone is working up their arses, but the result is still some sparkling firework ship wreck, that only held together for the demo to the board. It's not that we are stupid or lazy, yet we push some unmaintainable spaghetti, because this shit just gotta work.
Dunno, somehow this object orientation / pattern ideologies were also kind of depressing to me: partly because they smell like attempt to enlighten the inept by stupid receipts - and of course then deep down there's this nagging question if I'm not one of this inept not knowing the newest fashion template from the catalogue..
Then this Clean Code - Craftsmanship shit is bugging me similarly. Liked Robert C. Martin's book, but now I picked up some "Clean C++" and.. I kinda feel dumbed down if they try to sell the KISS principle to a 36 year-old physicist/engineer. Good for them that all our legacy shit und own fuck ups nourish this whole industry of well-meaning advisers. Argh, just fuck it, you priests, sell your obvious calendar mottos elsewhere, they are are just as useful as telling a griever that "rain follows sunshine". - As if they would not some time use the raw pointer that their coworker gave 'em, to ship shit tomorrow? -
When there are multiple third party services getting used in your spring boot application. How do you manage their API creds.
Like I use Aws Secret Manager for the keys and different account level info. But after fetching in the application in runtime should we create classes to hold such info or just class variables are enough?
I'm more curious about the coding standard practices of different developers in the globe.10 -
Starts new codebase
uses boilerplate with the intent to keep a clean structure.
after 2 weeks it already a complete bunch of spaghetti code and doing things like putting the same image in 4 different directories... boy i wonder why i could never hold down a job as employee...2 -
I'm getting laid off for a month.
Any tech related suggestions of what I should do in my excess free time? Got a book (Clean Code) I want to read. Some side projects I might tinker around with. But other than that no concrete ideas.11 -
I need recommendation for site/community to improve my (clean) code style?
And, in more general, what are your ways to improve code style and programming way of thinking - more oriented towards bigger picture of application/systems (patterns, architecture, etc.)?3 -
Clean code and experience.. if you had to maintain a big project over a long time you’ll learn to get your own code cleaner😅
-
Got a new user story for code refactoring of my previous stories.To motivate myself i am trying to think like
" it's much better to clean my own shit then others."