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 - "your code"
-
Code review titles by year:
1990 - your code is using to much memory
1995 - your code is not running on window 95
2000 - your code is slow
2003 - your code don't have tests
2005 - your code is not 64 bit
2009 - your code is not using mvc patters
2010 - your code is not horizontal scalable
2011 - your code should be written in js
2015 - your code is not mobile ready
2020 - your code is racist24 -
How it should be:
- First: solve the problem
- Second: Write your code.
How many people do:
- First: Write code
- Second: solve code problems
- Third: Adapt code with requirements
- Forth: get lost on your spaghetti code
- Sixth: make a suicide8 -
when your teacher says he prefers this:
class A
{
// code
};
over this:
class A {
// code
};
me: can u not26 -
What's your funniest error message while testing your code ?
For me : Fatal error - Parachute deployed.
0_o8 -
How to Code...
“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live”
― John Woods2 -
When the bus arrives and leaves your stop and you don't notice because your brain is thinking about code!4
-
Once worked for a guy who lectured me in front of the whole office because I didn't continued work at home after I stayed 3h unpaid overtime at the office.
I quit soon after that.3 -
You know it...from the introductory page of "Clean Code" by Robert C. Martin.
Which door represents your code?2 -
One thing I learnt after over two years of working as a programmer is that sometimes making your code DRY is less important than making your code readable, ESPECIALLY if you're working on a shared codebase. All those abstractions and metaprogramming may look good in your eyes, but might cause your teammates their coding time because they need to parse your mini-framework. So code wisely and choose the best approach that works FOR YOUR TEAM.7
-
When your supervisor/teacher is looking at your code and you hope he/she doesn't detect the bug you found before showing the code.1
-
I always wonder why people complain about php being horrible, then I actually see the code they write.
It's like complaining "I can't believe I have to use such a horrible desk" when it's littered with empty coffee cups and yesterday's lunch.4 -
The best way to write maintainable code is to imagine the next person who has to debug your code. Then imagine that they have your phone number, personal address, and your daily schedule.8
-
Dont get attached to your code at work! Coz it's not your code, you got paid for writing that code and that's it.5
-
Remember the time when someone appreciated your code and praised the implementation, said that your code was better??
Yeah, neither do I.1 -
javascript... the language where your code works even if you forget ';' and declaring your variables.
wtf7 -
Here's a real tip for people new to the industry.
It's one of those things that's been said over and over again but very few can really seem to employ. I suggest you learn it /well/.
You are not your code. Criticisms of your code, ideas, or your thought processes, is not a criticism of YOU. You absolutely cannot take criticisms of your work personally.
We are engineers. We strive to seek the best solution at all times.
If someone has found a problem with your code or with an idea or whatnot, it is coming from a place of "this is not the best solution", NOT "you're an idiot".
It's coming from a place of "I'm closing this PR because it is not a change I feel suits this project", NOT "I'm closing this PR because it's coming from a woman".
It's coming from a place of "This feature request is ridiculous/this bug is not actually a bug", NOT "you're a fucking idiot, fuck you".
It's coming from a place of "I've already had to address this in a number of issues before and it's eaten up a considerable amount of my time already", NOT "I don't even know you and this I don't have time for a nobody".
You do not get to be bitchy to maintainers because they denied your request. It's not a reflection of you at all. But if you're arguing with someone who has maintained a piece of code for almost a decade, and they're telling you something authoritative, believe them. They're probably smarter than you on this subject. They've probably thought about it more. They've probably seen their code used in many different places. They have more experience than you with that codebase in almost all cases.
Believe me, if we cared about who was behind all of the issues, pull requests, etc. we get, we'd get NOTHING done. Stop taking shit personally. It's a skill, not a defense mechanism. Nobody has the time to sugar coat every little thing.
Let's normalize directness and stop wasting time during technical discussions into opportunities for ego-stroking and circle-jerking and back-patting.8 -
Apple has the best UX:
"Type your password followed by the verification code shown on your other devices"4 -
C is nice and all but have you ever had to massacre your code with preprocessor instructions to make your code portable?3
-
Life is like code,
Your loved ones are your IDE,
You can be good with code without an IDE,
but it makes things much more smoother when you have one :D
Life quote :) -
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 -
codeCertain - Duolingo styled code learning platform that emphasizes learning by repetition. Be certain of your code.5
-
Conspiracy Theory:
Coding standards were invented so that your colleagues can steal your code without any effort.6 -
I (don't) like how some people say "If your code needs comments, your code is probably ugly and should be rewritten".
Well, asshats. You have never considered complex calculations/functions or "temporary" workarounds, right?
Sometimes, you have to do it in a not-very-readable way for efficiency. There is no way around that in that case, and comments that either explain the code below or provide alternative, slower code that's commented really help others understand your code.
If I ever work with you and you don't bother commenting your code at all (or rather use slow code because more efficient code doesn't appeal to your "muh code dun need comments" approach), I will hate you.6 -
Me: man, I really want to work on my project but I don't know what to do
Brain: You should document your code, it doesn't have a single fucking comment, you stupid lazy fuck
Me: oh ok, I will do that ...1 -
you motherfucking cocksucking ass wipes.
How fucking hard is it for you JS cockheads to have STABLE fucking code?
So hear I am, thinking through a side project for data extraction and loading to automate some shitty part of my job, that could be used by the broader team... and decide to use electron.... I know it's a clusterfuck, but this wouldn't be a big application, so against my better judgement I run:
npm install electron
npm start
...
Error: unknown spawn
🤷♂️ you had 1 fucking job... 1 fucking lousy shit stain of a job, and you can't even have something run out of the god foresaken box without someone debugging your shit.
Now who has a WORKING alternative to electron?10 -
>Advanced code optimization class
>Professor : Your midterm exam will be written on paper....with no code.
>Me: ?????????????3 -
If you comment your code like this, I'd like you to rethink your life choices.
This is a project we need to work on in university. The code was given to us.4 -
Want to bundle your files: Node.
Want to minify your scripts: Node.
Want to tree shake your code: Node.
FUUUUUCK OOOOOOOOOOOOOFF I DON'T WANT NODE14 -
Writing code is like writing poetry. You put your soul into it, you create something so beautiful that everyone appreciates it, but no one fully understands it. So comment your fucking code!6
-
!rant
I figured out a way to make your code readable!
The main idea: make everything into a function. Each function should be small and you should gradually use past functions to build future functions.
Depending on the language and the size of your code you should make your functions with different sizes, but always keep them small.
This function splitting allows for debugging small parts of your code, avoids repetition and abstracts your code, each making it more readable.13 -
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 -
That feeling when you view your older projects and see how distorted your code was, how much boilerplate code, realize how stupid you were.
Good to see how times have changed.3 -
Find what you want to build. Watch some videos. Code. Grab some books. Code. Find some friends to code. Code.
And learn some theory to improve your code. Code.
Get a job. Code. Get paid.1 -
Scenario A:
Your code is working. You run again, now it's not working.
Scenario B:
Works on production. Next day it doesn't.
It is nothing you just experienced alternate universe. You probably with your manager temporarily jumped into another timeline where your code is not working.
Next time it happens tell your manager it's not your fault.
Eureka!6 -
when your code doesn't work and you're stuck for hours and start to question your career choices...3
-
So after joining devRant I discovered that some people have an issue with people touching "their code"...
This hasn't been a problem anywhere I've ever worked, with any person (that I know of).
Is this a vocal minority, or have I somehow avoided this subset of people through sheer luck?5 -
When you have to fix someone else's code because you can't push your changes because of their rotting code.
-
You should probably call your framework "Buttcrack.js" cause we all look like plumbers sifting through your shitty code.
-
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 -
Your code is:
⭕️ Comprehensive
⭕️ Well Written
⭕️ <!-- Informative -->
Check none.
Walking into another devs code. -
When Microsoft buys GitHub, but they can't steal your code because your code has been uploaded obfuscated.
*I am sorry for mentioning Microsoft and/or GitHub, it is quite repetitive* -
Protip: proposing a "simple yet beautiful" login form on Bootsnip with absolutely no knowledge of Bootstrap whatsoever, making it not responsive and centering it with hardwritten margins (such as: 'margin-left: 170px'), AND THEN proudly display "theme developed by WhoGives AShit" at the bottom won't make you any publicity at best. At worst, I'm gonna travel to India and won't leave before I erased the code you wrote by smashing your face on the "erase" key.1
-
When coding, what percentage of your time is spent fluently typing your code vs thinking about what you're coding?8
-
How come your fucking pseudo code is far more complex than python code? You're a fucking university teacher FFS, ALSO TELL ME WHY THE FUCK YOU START YOUR INDEX LIST BY 1.1
-
Learn to refactor your code constantly. You are not writing code for yourself. Think about the next person who has to look at your code.1
-
How to spend more time writing docs then code?
15m = doc
1m = code
<code>
/* Motor DC + Mosfet IRF520 + Servo
Materials:
IRF520 (Mosfet) + Dc motor + Batery (3V min)
diode (1N4007?)
Changed Tip122 for IRF520: Tip122 has less resistance and produces more heat
Hardware:
ARDUINO = A(port , 5V , GND)
MOSFET = M(A[port] , + , GND)
MOTOR = MOTOR(+ , -)
BATERIA = BAT(+ , -)
DIODO = D(sinal_1 , sinal_2)
MOSFET
M(port) = A(port)
M(+) = D(sinal_1) AND MOTOR(+)
M(GND) = A(GND)
D(sinal_2) = B(+) AND MOTOR(-)
ARDUINO
A(port) = M(port)
5V = null
A(GND) = M(GND) AND BAT(-)
*/
#define motorPIN 8 // A(port)
int loopy = 0; // Loop variable to limit de program
void setup()
{
// Initialize the motor pin as an output:
pinMode(motorPIN, OUTPUT);
}
void loop() // 1 loop == 100ms
{
if (loopy < 10) // Turns motor ON for 1 second
{
digitalWrite(motorPIN, HIGH);
}
else // Turns motor OFF
{
digitalWrite(motorPIN, LOW);
}
}
</code>22 -
One of the best feelings is when you're hip deep in code refactoing and you're delezing old code with your new and shiny code.
-
that BS thing you do when your too lazy to code and just copied a code from an existing class and renamed the vars even if it does not work or not being used just to show your boss that your working hard as f*2
-
I am already tired before even looking at this code.
Looking at your code makes me cry.
I can insult myself whole day but it won’t be enough to survive looking at your coding style.
If cpu could talk it would ask for heater removal because your code depresses it so much.
Looking at your code makes my monitor burn out.
Downloading your code makes my hard drive stop.
And my favorite:
You’re already good developer so now stop writing and appoint as manager / tester. -
You know shit is getting real when you save and you watch your code formatted start rolling through your code like you're watching someone ... write code...
-indent here-
-pause-
-indent here-
Me: Oh man what have I done?!?!?!4 -
Stop commenting out code blocks!
Either fix your shit or delete it.
I am open to argue what fixing may mean, as it is perfectly fine to make your broken code not reachable, e.g. via feature flags or skipping certain tests. Yet never ever should you comment those blocks!
So you say you want to keep it for historic reasons? You know, that is why we use version control! If you ever need certain functionality back, you can restore that state.
Each decent IDE also offers a local history where you can even restore code blocks that weren't even pushed or committed. So use that!
Commenting out test cases is a really bad habit, as you have no reminder that you shall restore it.
And no, a TODO and a FIXME won't count as a reminder as you have to actively look for them. And we all know how well that goes, don't we? (One time, I found a typo of a `TDO`. So even with a regular lookup for TODO, stuff will slip.)
Each test suite offers you ways to skip tests if there are valid reasons why they should not fail the build temporary and they offer colorful feedback. Yes, that means that your tests won't be green, but guess what: That's a feature! They shouldn't be.
That yellow is a fine reminder, aka warning!, that you should really fix your shit.
Commented code screams: "I DON'T KNOW WHAT I WAS DOING!" and it confuses the hell out of other developers ("Was this commented because of debugging purposes and should be active again or can I safely delete this!?") and adds verbose crap to the code base.
If you find yourself to be in a place that you comment code a lot, I also argue that your workflow is broken.
When you are using a decent debugger, there shouldn't that much of a need to comment in and out a lot of code in order to reason about your code-base.3 -
https://news.mit.edu/2022/...
"Based on the patterns of brain activity that were observed, the group could tell whether someone was evaluating a piece of code involving a loop or a branch. The researchers could also tell whether the code related to words or mathematical symbols, and whether someone was reading actual code or merely a written description of that code."1 -
Why the fuck are there so many utterly useless programming blogs? I have to implement DES in C++ for our college project. After coding most of it step by step, I decided to swallow my pride and check for an implementation online to save time because I was confused in the XOR part. Now most programming blogs had the same code copy pasted. To top that, NAME YOUR FUCKING VARIABLES PROPERLY YOU MORONS! I decided I'm better off resolving my confusions the hard way.3
-
When your teammates suck. You did your part of the code and the 1 single thing you left for your teammate is trash.1
-
When you marvel at your code creation and the beauty of your envisionment only to be painfully whittled down as your boss tells you to change it all, because he doesn't like how the code looks. Joys of being a junior developer!1
-
"Stop using mixins in your SASS it's complicating the code for the team.
Extend your classes instead"1 -
When your friend (who doesn't know how to code) asks you to make them something for an assignment (not cs related) and they say your code is wrong 😒
-
Learn to debug, breakpoints are your friends. Never ask someone help without trying yourself to debug your code.
Debug an existing code is, I think, as important than being able to write your own code.3 -
When meta-programming finally clicks and your code can make its own code, which in turn makes its own code.1
-
If you are writing all your code from scratch, you are probably an amateur.
If you are copying and pasting most of your code, you are probably a beginner. -
Purposely obfuscating your readable code because it's your PMs responsibility soon and he can feel your pain for a while.
-
When your code is accepted after you forgot about the comment about your boss being a Tw*t... Surprise.1
-
Do you guys have a dress code in your office?
Do you think that having a dress code is important?35 -
#weeklyrant: a rubber duck AI that responds to your jabbering and helps you to find that stupid forgotten ; in your code. And comment the hell out of your code so you will understand later on.
-
Setter and getter are anti-patterns. Eradicate all of them from your code with no mercy and you'll see your code magically transform for the better.5
-
All summer I've been working at a company doing some full-stack development. Starting my last year in university, I really wanted some real life experience that ties into my studies.
I did not expect to find horrible, undocumented, code that has been written 5 years ago, where the senior developer who wrote it doesn't even know what it does. The worst part? They are STILL not documenting! I tried to document, but got this in return "you don't have to document everything. Especially if it is understandable". But they don't even understand their old code!
Monday morning, we had a meeting and they asked what I thought of working here, seeing as I am done this week. I respectfully told them that their code is not readable, and it will make it hard for new employees to understand. The boss in return says "you're the third newly hired employee this summer to say this... Maybe we do have a problem then"..
No shit. Please for the love of God, comment your code!2 -
Always comment your code.
Write comments that explain the reason for this piece of code existing, and why it's written the way it is.
Don't write comments that explain what your code does (unless it's a comment which is going to be parsed as documentation for an API). If your code needs comments to explain what it's doing, you need to write clearer code. -
You all enjoying and excited being coding until someone asks you to test your code and care about code quality6
-
Why would you post your code on GitHub and charge to use it. I'm not using your servers your not providing me any service I need but you still expect me to pay for open source code you posted yourself. What is going through your mind. To come up with that business plan7
-
Devs out there.. what is your celebration / how do you celebrate when your task / code works as you expected .9
-
When you get a shot (immunization) in your right hand because it's your mouse hand and so you can still code with your left.1
-
When do you know your code is documented well?
If writing anything more besides your code feels absolutely unnecessary.2 -
(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? -
!rant
Context = VS Code
What is your 'favorite/most useful/the one that saves your ass' extension for visual studio code6 -
It is not only about how good your code is, it is also the business value your code provides.
- Unknown3 -
When you are changing and updating your code update your comments/docs also, there's nothing worse than getting confused by someone else's code to find that the comments/docs are wrong
-
"Oh, sorry I didn't write you back! I checked 3 hours ago, and we only add the data once in our database before sending the notification to your endpoint, so everything is fine! Check if you run the same functio twice, it's an easy mistake!"
You. Fucking. Moron. You send the data 2 or 3 times (at random) every fucking time. I have nginx logs showing that, and I've fucking shown them to you TWICE. I don't fucking care if your DB is fine, check how many fucking times you POST the damn data. We're already 2 days behind schedule because you can't be arsed to check your own damn code. Ffs. How can you even be a senior developer?! -
When you add console.log above your buggy code, but after 15 changes you forget to update the real code and you spend 15 minutes scratching your head because you can't fathom why your last change didn't fix the problem...
-
Do you ever sometimes finish your day and look at your code then realise you’ve only actually written less than 100 lines of code but have no idea why?6
-
Documenting your code is like raising a child in a world full of idiots. If the parenting is not done right then your code will be as stupid as the world.
-
If you have messy and disgusting desk, messy and disgusting car, pretty sure your code is messy and disgusting as well.
Sincerely,
Your team who is fed up with maintaining your shitty code6 -
Just got back to a solo project I hadn't touched in 5 months due to having other priorities. The whole thing is probably less than 1k LOC split over a half-dozen files and I'm not sure whether I should be angry at my past self for leaving the most recent part untested and insanely bug-ridden, taking almost an hour a fix, or be happy that past me organized and documented everything well enough for it to only take almost an hour to fix.2
-
You know you been thinking to much your your Friday ends with your head being you fucked you use yourself as the rubber duck to debug your code...2
-
Urgh why do code generators write the worse fucking code! Jesus$fucking$christ$what$is$your$god$dam$problem$1
-
New laptop. HP z book. It stopped working so I had to have a new motherboard. After the new motherboard I kept getting BSOD. Got it upgraded to Win 10 (it was supposed to be runing this not 7). Still getting BSOD with the bonus of black screens wanting me to restore. Even better I've gotten No OS found on boot. My work won't let me have a Mac or exchange my laptop. But am I done yet? Fuck you.12
-
More like :
For number in range(5){
Your code
}
Or
For number in range(5)
{
Your code
}
( I know that in python for is not use with { that was just for the exemple )4 -
Surprise nobody says: read the documentation and possible the source code of the lang/framework/library/toolkit/etc. Understanding your code, how fits in the big picture and what you try to accomplish make your code better.
That explain why we have tough ops days ... -
When your php-code and the taxonomy of your site is perfect, but a plugin screws the breadcrumbs totally :(
-
You can call me a noob developer, but I still think its magic when your code doesn't work. So you step through your code to see what's wrong. But you can't see it. So you just hit continue just to see your code is now working3
-
XXXX programming language does not scale. Nope, it is your code. Review your code and improve it! Don't add more hardware to improve performance, that solution just covers the problem. Review, review and review
-
“Remember, code is your house, and you have to live in it.” - Michael Feathers
https://goodreads.com/quotes/... -
I am working on this Flask web application as a part of the recruiting process for a company I have applied to. There are so many mysql connectors out there, but most of them are either deprecated or have shoddy documentation. Finally I found one that was working, but it used
caching_sha_password2 as its authorization plugin which is no longer supported by MySQL😤😤😤6 -
"Through centuries of scourges and disasters, brought about by your code, you have cried that your code had been broken, that the scourges were punishment for breaking it, that men were too weak and too selfish to spill all the blood it required. You damned men, you damned existence, you damned this earth, but never dared to question your code. Your victims took the blame and struggled on, with your curses as reward for their martyrdom - while you went on crying that your code was noble, but human nature was not good enough to practice it. And no one rose to ask the question: Good? - by what standard? " - Ope Rand.