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 Laravel55 -
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!"15
-
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
}42 -
Currently on an internship, PHP mostly, little bit of Python and the usual web stuff, and I just had the BEST FUCKING DAY EVER.
Wake up and find out I'm out of coffee, oh boy here we go.
Bus leaves 10 minutes late, great gonna miss my train.
Trains just don't wanna ride today, back in a bus I go, what's normally a 10 minute train travel is now a 90 minute bus ride.
Arrive at internship, coffee machine is broke, non problem, I'll just lose it slowly.
NOW HERE COMES THE FUCKING GOOD PART!!
Alright, so I'm working on a CMS that can be used just about on any device you want, mobile or desktop, it's huge, billion's of rows of scientific data. Very specific requirements and low error margins. Now, yesterday I was really enjoying myself here until today, Project manager walks in, comes to my desk and hands me a Samsung Gear S3, an Apple watch and some cheap knockoff. He tells me that before the Friday deploy, THE ENTIRE CMS SHOULD WORK ON THOSE WATCHES!
I mean, don't get me wrong, I like a challenge but it's just not right, I mean, I'm still not sure what the right way to handle tables on phones is, but smart watches, just no. Besides that, I've never worked with any Apple devices, let alone WatchOs, nor have I worked with Android Wear.
Also, Project Manager is a total dickhead, he's the kinda guy that prefers a light theme, doesn't clean up his code, writes 0 documentation for an API, 1 space = tab, pure horror.
So after almost flipping my desk, I just called my school coach to announce I'm leaving this internship. After a brief explanation he decides to come over, and guess what, according to the Project Manager I wasn't supposed to do that, I was supposed to test if it would be possible.
FUCKING ASSFUCKFACE9 -
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 errors12
-
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...14
-
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 just turned an awful website with with an even worse backend code into something modern and with clean and stripped code ..
Guess what..
I just got thrashed for having a bug in my PHP code ... !!!5 -
I did it! I am now part of a web company as an intern, entirely self-taught. This is so cool, when they looked at my code they were surprised about my skills and how clean my code was. Fuck yeah, I'm happy8
-
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 -
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 -
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 -
There is no reasonable excuse for doing anything less than your best.
- Robert C. Martin, Clean Code4 -
My coding-senpai placed this PHP code (before he left) to my org's custom-footer due to a feud that happened months ago
it flooded their cPanel with folders with '.log' as their extension everytime someone visits their website
I LOL'D UNTIL
..They hired me to clean it up :^(
They got over 700,000 of these folders
#feelsbadman14 -
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 -
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.2
-
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 -
That feeling when you refactor that spaghetti mess into clean beautiful code that passes all tests flawlessly4
-
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 -
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 -
I just finish "rebuilding" a page that I have built last year. My Js file (jQuery) went from 1200+ lines to 600..
I rewrite everything, the functionality is the same but the code is mush more cleaner.
Soo bad and redundant code.
Although comments where very helpful.
Feels good. -
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
-
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
-
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 -
"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 -
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.9
-
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.5
-
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
-
You know it...from the introductory page of "Clean Code" by Robert C. Martin.
Which door represents your code?2 -
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
-
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 -
A coworker that is producing incredibly bad code and refuses to learn new stuff was declared "senior developer" by my boss. And me with over 20y experience? I am just a junior.. and have to clean up his mess all the time. I guess it is time to find new job.5
-
Just why????
long d = date(toDate) - date(fromDate); // days
Please just name the variable days............3 -
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.3
-
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 -
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 -
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
-
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 -
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
-
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
-
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 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.
-
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 -
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 -
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 -
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 -
"No matter how slow you are writing clean code, you will always be slower if you make a mess." - Uncle Bob Martin1
-
I just realize, I can make my Js code shorter by doing this:
for(let i in fruits){
console.log(i + ' ' + fruits[i])
}
instead of this:
for(let i=0; i<fruits.length; i++){
console.log(i + ' ' + fruits[i])
}27 -
Wanted a quiet day at work this Monday so updated my development laptop to Ubuntu 16.04. Ended up spending the whole day fixing it. ¯\_(ツ)_/¯5
-
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
-
I rewrote something in clean 20 lines of code, while my coworker had worked hard and ended up with like 80-100 lines. I did not talk to him before I did it, but asked him to review what I did. I still had to learn how to properly work together..3
-
There is clean code. There's spaghetti code. And I just discovered there's spaghetti after being thrown up code.8
-
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 gOoD9 -
Biggest sin is writing code without taking into account clean coding and just doing what ever is necessary to make the code work8
-
"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 -
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 -
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 -
[...] we should never ignore any part of code. The parts we ignore are where the bugs will hide.
- Uncle Bob1 -
have you ever felt having bad code ocd that you feel like you really need to clean this old project that you got assigned to fix, but cleaning the whole project up would take too much time and it is just not worth it . But you feel like you really need to do it...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 -
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!! 😴
-
I think "clean code" won't last.
With the ongoing democratization of coding and the myriad lowest-common-denominator coders flooding the market, the concept that code should simply explain itself and be intuitive to all readers will be more and more difficult to achieve.
Clean code requires the reader be on the same or greater technical skill level with the language than the authors. As developers go back to being generalists from over-specialized this becomes more of a time waster than a time saver.16 -
The feeling when you realize some people on the project are writing legacy code from scratch. Apparently it seems they've never heard of any coding standards, they think clean code and style guidelines are for the weak and single responsibility means one single method is responsible for a bunch of unbelievably diverse things. They are like the Gumbys of the dev realm but it's my brain that hurts every time I have to deal with their code.4
-
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 -
Actually got these tips today:
1. Write code so clean that it won't need commenting.
2. UML and other flow charts and graphs are very important.3 -
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 -
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 -
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
-
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
-
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 -
Refactoring you said.
Make your code maintainable you said.
Now, I'm in the middle of refactoring my functions. Detecting redundancies, building new general functions etc.
Then come another jobs.
And when I get back to my half-refactored code, I got really confused.
What did I do last time? And why the hell I wrote "finish this later" as my commit message...3 -
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?16 -
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 -
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 -
"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 -
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.") -
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
-
Ahhhh.. the great feeling of starting a new project at work after the stresses and health deterioration of maintaining old code bases.
-
Came into work this morning and my scrum master has decided to take my desk and now I'm working off my laptop screen. I forgot he needed 3 displays for Excel, Outlook and JIRA.2
-
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
-
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! -
Yay ...
No more !important in SCSS...
All colors pulled from variables...
Such code ... Very clean 😂 -
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 -
Best dev experience : found this. https://github.com/jupeter/...
Worst dev experience : learned the cons of no documentation the hard way. -
Found this beautiful piece of code, that I wrote apparently a year ago .... oh my 😂 🤦♂ 😅
If I could travel back in time, I would would slap myself for doing this. Although I remember, why I did this, because of many min()/max() operations that I needed. I wanted to keep the code, so that I would know, which code piece belonged to which part, but man ... is that badly written! Nowadays with Clean Code style, I would certainly do it differently.7 -
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. -
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 -
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 -
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 -
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 -
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
-
(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 -
Robert C. Martin. Clean code philosophy changed everything.
Reading code ala Uncle Bob is like a binary search to the place in the code you want to work on.4 -
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 -
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 -
Running the selenium tests again to look busy and give me an excuse to spend more time on devRant.1
-
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 -
I find that open-sourcing my project is a way better motivation to write good, clean code, than pool parties for hitting the gym :)
-
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
-
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
-
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 -
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 ? -
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...11 -
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
-
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
-
After reading Clean Code principles:
Before you rename your method, remember to use the refractor option
😌4 -
Goals:
-> Write clean code
-> Never trust the code
-> Never use PHP
-> Stop procastinating
-> Stop ranting3 -
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.
-
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
-
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 -
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." -
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 -
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 -
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 -
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. -
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 -
"There is a reason that we keep our variables private. We don’t want anyone else to depend on them. We want to keep the freedom to change their type or implementation on a whim or an impulse. Why, then, do so many programmers automatically add getters and setters to their objects, exposing their private variables as if they were public?"
-Uncle Bob, Clean Code.1 -
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. -
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 -
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?2
-
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 -
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 -
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 wrote a RESTful(ish) API today and it was beautiful. The API looks exactly how I wanted it, the logic is clean and readable, it has some extensibility built-in without cluttering the code.
There are parts I'm not thrilled about but that's mostly due to having to interact with legacy systems. Super proud of myself!2 -
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
-
One my junior was trying to re-build the code for 2 hours, he tried every possible ways: clean - build - rebuild - run and tried several times changing the codes. Then asked me for help, I just stopped the current running process in task bar and rebuild it. It worked!
He started starting at me like I wrote Windows OS :) -
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.
-
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 -
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. -
- Promote source control usage especially in group projects
- Teach clean code principles
- Push for commented code in exercises -
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... -
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 -
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! -
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)2 -
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 😊 -
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 -
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
-
My s.o. thinks code is like the kitchen and the bathroom! I should always leave them cleaner than I found them.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 -
(Response from a Github new issue: )
"Yeah so you declared this element here while it should have been done there. Also, you can simplify the CSS part by just doing the following: <code>
...Then how about updating your goddamn documentation from which I copied the code you're correcting, heh? -
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 -
when you want to keep the code clean, but you are about to say "fuck it" it needs to work that is all....5
-
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? -
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. -
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 -
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 -
Freaking coding conventions...
Just chose something and stick to it.
How hard can it be?
Apparently this hard:
if(condition){
//SomeCode
}
else
//SomeCode1 -
my project would be to write clean and KISS code... not slap and green egg ham jam kind of sticky tape.
-
Sat here trying to decide and finalise my Dev process for Wordpress!
Roots.io clean, good code, deployment to staging and production through git
Vagrant then just push to live (which one?)
Docker then try and figure S*** out
Flywheel local!
Then decide where to deploy:
Digital Ocean or AWS Elastic with load balancers and S***!
Decisions!! -
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 -
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
-
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
-
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 -
Without diving into OO or "Micro$oft", I think the one major flaw in C# is the ability to use "regions".
It's like a feature that was specifically designed to hide shitty code.
If you know how to separate your logic properly and focus on good design principles, you should never have to use a "region" to "clean up" the way your source looks!5 -
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. -
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 -
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
-
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 😂
-
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 -
!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 -
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 -
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 -
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 -
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 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 -
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 -
Am I the only one that in order to keep C code clean has a horrible file with macros and util functions?4
-
!rant
If you're into compilers AND AI, check out Glow Compiler.
https://arxiv.org/pdf/...
Explains the idea well, casual read, almost no math just clean code examples and lots of easy reading explaining the ideas and theory behind it.
You can find the project at https://github.com/pytorch/glow and and also https://ai.facebook.com/tools/glow/1 -
M dream project would be an AI that codes with me. I would train it to write clean and nice code.
Because I don't want to stop coding. And an AI that fully developes on its own is meh.
Finally no annoying lazy students anymore which refuse to follow fucking style guides1 -
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. -
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
-
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.
-
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
-
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
-
It does not matter how much you try to write a clean code , there is always a room for better one ...
-
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 -
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 -
Whenever something awfully fails with GitHub pulling (read: When you use Github), I have the horrible habit of manually copying the code I want to be saved, and starting over in a new local repo. After a while, I found out I have around 9 local repositories of the same remote repo stored in one folder, too lazy to clean it all up.1
-
Working on an opencart eccommerce site I built in 2011... What the fuck was I doing?
Pushing the company to go for and upgrade / rebuild so I can clean it all up.
It was my first online shop AND my first opencart project... But even so... It's scary to look at. Works great, but the code layout is making me twitch.2 -
This moment when you pressed your "Auto-Indent" Hotkey and the whole software doesn't run anymore. Later you realize that it's because of your Auto-Indent and even worse - you realize you have to code on top of the spaghetti code...undefined wtf routines auto-indent paranormal paradox clean code why how could this happen to me common general help
-
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.
-
Throwing junk in your code for whatever you're doing at the time, and then nearing production and having to clean your leftover junk3
-
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?6 -
When a colleague reads the clean code book but the writes code that's exactly the opposite ..... Yeah, hmmmm
-
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... -
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
-
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
-
What would you choose between 'clean code but just completed half of the tasks' or 'messy code but completed all of the tasks' ?5
-
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? -
That moment when you quit a job and your colleagues give you a "Clean code" copy. Doing it at joining would be way better.
-
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 -
"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 -
Is there an equivalent to Robert C Marin's book, Clean Code for Network design? Or do you guys have any recommended booms inters of network and server infrastructure?
-
Today you have the privilege of experiencing a rare look inside one of my servers: https://youtu.be/JcSPnsX-wAA
-
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 -
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 -
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😅
-
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 -
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." -
I just love when all my code is perfect and clean... then I compile it to see my changes... and everything is fucking broken.. so I think "okay, let me see if I missed something or forgot a space or something stupid."... nope not that *recompiles* nothing is showing up.
"That's cool too, who needs a working website anyways."