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 - "was code"
-
Received "emergency update" code from internal enterprise security team. Wasn't given time to do code review; was assured code was reviewed and solid.
Pushed code to over 6k lower-level servers before finding this gem buried deep within:
...
cd /foo; rm -rf *; cd /
...
(This ran as root, and yes, the cwd was / from earlier in the code).
/foo, of course, did not exist on some servers.
Now, it is those servers which do not exist.
FMLundefined security root linux file not found directory structure rm -rf / directory not found fml rm15 -
Real programmers don't comment their code. It was hard to write, it should be hard to understand.24
-
Dev: "Ah, I finally fixed that code I was working on the other day and got it pushed to staging!"
Almond: "Ah, great! What was the issue in the end?"
Dev: "It was an odd one - it wasn't actually my code that was the issue, there was a bunch of other code getting in the way."
Almond: "How do you mean?"
Dev: "It kept complaining about something called a "unit test" failing - so after a while I found the right unit tests, deleted them, and now it works great!"
Almond: "..."11 -
My weirdest ever co-worker was a man who called himself "the code" and wrote exclusively JavaScript.7
-
I was writing a Python code and my teacher saw. She knows nothing about programming so she asked if I was programming a bomb to blow up a building... Smh.29
-
Once upon a time, there was a coder named Dude. He started working at a company that told him they were innovative and that their code was glorious. This was a lie. He murdered everyone.
The End.7 -
So I was code reviewing this guy's code before merging into the master branch.... and then I FOUND THIS FUCKING CODE, WHAT THE FUCK!!!!!!!!!!!!!!!! What the fuck is this ???66
-
Boss man: your code has issues , you should strive to have lesser bugs.
Me: GTA was made due to a bug in the their code.
*mic drop, leaves office, clapping heard in background*
😂12 -
Today history was made, I was able to actually write code for almost 5 hours today at work without being interrupted!5
-
Was working on a group project.. I ask my partner to give me the code he was working on. Expecting link to repo or at very worst an email
I GET A FUCKING IMESSAGE W 1000+ LINES OF CODE11 -
How Microsoft devs think about Linux 😁.
This was found inside the index.html of Visual Studio Code editor.9 -
I've written a lot of bad code, seen a lot, but attached is the most recent 'worst' I've seen.
What makes the situation worse/funny is:
1. The developer's code comment.
2. Check-in passed a code review.
3. The 'legacy code' was written last week.29 -
@No-one asked me to make a devRant related waifu but I went "why not if devRant WAS the waifu"
and this was born while waiting for compiling code (again)24 -
The first time writing code in an airplane was very uncomfortable. Everyone around me thought I was hacking the airliner.
I was writing HTML.3 -
Project manager: how was the day?
Me: wrote a few lines of code
Me: ran the code
Me: full of errors
Me: I cried8 -
My classmate was debugging c++ code when he stepped out for a while. We deleted a closing bracket.
He is rewrote the code from cratch7 -
At least, it was honest comment by developer........
Have you ever encountered such funny statement/code ?3 -
When I didn't compile the code for 500+ lines and when i finally did, there was only one syntax err... it was a typo... and then it worked...11
-
Apparently Stackoverflow was down recently. I think I missed it, because I was busy reading homemade documentation and having multiple existential crisis over the performance of my code.
Mondays3 -
Tested and checked in code. Left on vacation and came back.
The code I checked in still was there, still works, and didn't cause any fires while I was gone :)
Success!2 -
A guy that just did not know how to code. He had years and years of experience (?), but DID NOT KNOW HOW TO CODE. He was given a simple task, spent weeks on it and what came out was usually 60 lines of "if, elseif, elsif....else".
He was given several warnings, and eventually "voluntarily" left the company.
I still get screenshots of his code sent by one of my ex-colleagues who's still there when he stumbles across it.15 -
The interviewer pointed out that I missed a semi-colon on the whiteboard code .I was like... sorry, but the whiteboard can't compile this code!
...and I wasn't selected! -.-"3 -
Refactoring and writing tests for code that was code written by intern and is on production about one year
-
Looking at code in our workplace.. I realized one thing. Like Devops, legacy code is actually a mindset.
So here goes my thought:
A piece of code is not legacy because it was written ten years ago.
A piece of code is legacy because it looks like a piece of legacy code.
With the legacy code mindset, you end up writing legacy code no matter where you are, when you wrote it.
I was looking at some part of our code which we written in just the last few months, and I can’t help but think that they were legacy, so it really doesn’t matter when it was written!
It is more about how you write your code that determines whether it is legacy :)
Hopefully this was not crazily confusing anyone. Have a good day guys & gals!7 -
Once I got zero in an exam just because I chose to make a function for a piece of code I had to use repeatedly. I went to my lab teacher and asked her what was wrong about my code to which she replied "This code is wrong because there should not be this function in this class". She was our lab instructor and turned out she marked us by matching our code with code given to her by our lecturer. I quietly returned to my seat and started thinking about how did she get this job.8
-
Hunted a bug for 8 hours, thinking it was a problem in my code....
Found out it was someone else's code generator that injected the bug...
Contacted the concerned dev... Had to convince him for another 3 hours that it was his change to the code that caused the issue. He is still sure that his change can't break the code...... What the fuck are you..? A fucking God programmer who never makes mistakes??
I mean how hard is it to just accept when I just proved it to you??6 -
It was 1999. I was just starting my first real job as a programmer for a major insurance company. We were working on code that would screen scrape legacy mainframe data output and convert it to a web-based UI. REALLY stupid project approach I had no input on. I happened to find a programmer in Germany who had released his code in the public domain that would help with making a certain conversion task easier. I downloaded his code and put it to work.
During a code review, a programmer who was probably about 60 asked me where I got the code and what it was doing. I didn't even get to the part about what it was doing because he made fun of me so badly, in a fake German accent in front of a room full of non-programmers, for using code that today is no big deal due to the prevalence of open source. I just clammed up in humiliation because he got everyone laughing at me. His philosophy was if we didn't buy it or write it ourselves, we had no business using it.
I guess I was just ahead of my time?6 -
Me at QA, talking about a nasty bug I found in legacy code.
QA: what was the root cause?
Me: pos code.
QA: pos?!
Me: piece o' shit.
QA: ...1 -
Started new job with presentation at 10:00. Went for lunch at 11:00. Was given access to source code at 12:00. Decided to quit at 13:00.
No regrets. Code was so bad that I wanted to cry.7 -
Just found this while trying to understand some code:
```
bool ok = true;
if(ok) {
// lots of code here
} else {
// even more code here
}
```
I thought this was worth my first rant...6 -
So my boss copied a code from stackoverflow and thought "foo" was a function or something... It was just an alias to a SQL select...2
-
Learning to code at the University was quite annoying in the beginning. We had to write code on paper.
Might be the usual way, yet it was really inconvenient.25 -
A colleague named Sam was really pissed off today at an out sourcing firm from India.
My Boss outsourced an application to India based firm. Sam was the one handling the project after the handover. Sam coded a feature 2 weeks ago and moved to staging server for approval. After the sign off from the lead developer of the outsourcing firm, he moved the feature to production. For the past 2 days the application was crashing over and over again so Sam went to check and found out that the feature he coded was causing the issue. When he pulled the feature to his computer and had a look at the code, it wasn’t his code. The code he wrote was commented out and the lead developer of the outsourcing firm wrote new code.
When Sam emailed to him regarding this he replied that he re-wrote his code to fix issues with the feature. Sam and outsourcing firm lead developer had heated argument about this. It’s turns out that the outsourcing developer re-wrote the code without anyone’s approval and on production server.
The lead developer of the outsourcing firm was fired.7 -
There was a time when a fellow dev asked me if it was possible to use JavaScript in jQuery code... Yeah, true story6
-
This is me trying to code. Year 2012, I was 11. 1024x768 screen, Windows XP, slowest internet connection ever. Android 4.1 was the latest trend, toolbars were also cool apparently.4
-
*finishes university exams*
*gets to code after a long time*
*cannot remember what the code does that was written a few weeks back*
Fuck 😓3 -
I was working with a guy 3 years ago, he was junior web developer. Lazy for work, watching YouTube and game streamers all day long at the office. Sometimes i was fixing his crappy code.
And ... one week ago I was surprised seeing this guy come to my current work office as senior web developer.
Im also new at this office and i had good impression i was working with professionals before this happened. Guess what... This guy hasnt changed much. Still writes crappy code , no idea of clean code at all.
I got concerns about my work place now :/ thinking to change it.6 -
I was asked by a client to code review their platform built in PHP. The platform was becoming slow and new features built by their current IT supplier broke existing features.
I gained access to the source code... One PHP file (index.php) containing about 80K lines of code... I am impressed and disgusted at the same time. 😂3 -
It's about a guy that knows better.
I was working as a subcontractor on a bigger system. We (subs) were not allowed to deploy code, we had to wait for contractor to deploy.
One day I got an email that my code is bugged and that my feature is not working on production. I checked it on test env, everything was fine. Then I checked if the code I wrote was deployed. It was not.
I send an email explaining that if they deployed my code it would be working. Then I got a response. There was a bug in my code.
Another email. I asked how would they know? Do they have a test on their environment that failed?
No. There is one guy that READ my code and he said it should not work, so he will not deploy it. He was not a programmer, he was a business consultant responsible for the documentation.
His issue was that I used a function that was not in a class. So if the function is not declared it's obvious it will not work. I had to explain to him in another email, that you can use object of another class inside your class and then call a function, that is not in your class. It was the last time this guy blocked my deploy.
TL;DR, I had to explain a non-dev how object composition works in order to have my code deployed. Took four emails.4 -
I looked into the code of the website of our company. One of the first things I found was that the Login was hardcoded with clear passwords. So everytime a new user needs an account the code has to change.
I still can't understand how people can do that.5 -
Remember the time when someone appreciated your code and praised the implementation, said that your code was better??
Yeah, neither do I.1 -
Earlier i ranted about how someone hacked our site and he had our source code.
Now finally we found how was our site code stolen, thanks to @dfox he mentioned how can we pull code from got server at that time I checked trying commamds to dowload git folder but it was secure but later we found that we had another subdomain running for pur project and its git folder was not secured16 -
Worst project I had was when I was asked to just copy-paste code and change the names of variables. Yeah, that's it, nothing more than that.5
-
I Just created My first code in brainfuck.
My First reaction was why was this made, but as I continued it seemed to make some sense, even though All I was using was some random ascii symbols6 -
The other week, our coffee machine broke. No code was written.
Today, coffee machine broke. No code written.
Think I found the secret ingredient to writing code!2 -
My worst "legacy code" experience was when the company I work at couldn't get their heads out of their asses and stubbornly continued to write legacy code. As of this day they are still doing everything according to what was hip around 2004. And they even force me to write new legacy code.
New legacy code: it sounds like a paradox, but this company makes it happen.6 -
I recently came across my old interview assignment code which I had written while I was still in college. Oh my God, it was cringy! It was such crappy code 😂
My coworker (who had interviewed me) saw it too. He was surprisingly very chill about it, saying that the code is not bad, it just shows a lack of experience. I think I will choose to believe him 🙃4 -
So I was coding a project that was left for me because the initial developer was fired (I didn't know why). When I was reading his code:
var saturday_sunday = week.day - 1;
Now I understand why he was fired.5 -
Had been hunting for a "modern" editor, mostly for browsing code and quick edits. Can't believe that the one that actually fit my requirements was Microsoft's VS Code. On Linux!14
-
Spent 3+ hours trying to debug an issue I was having with the AdWords API - tore apart my code. Turns out it was AdBlock that was blocking images displayed from the API call. Sigh.1
-
TIL the term "Kangaroo Code" was also a popular sort-of synonym for "Spaghetti Code".
It more referred to languages that heavily used "goto"s (because it would be "code with a lot of jumps")10 -
So I was finally done with the project, every feature was implemented the way I wanted it be, every piece of code optimized and well written, I was completely satisfied with my code and didn't feel the urge to add a "last little feature/optimization"...
.
.
.
Then I woke up 😭😭😭2 -
I got ranted,by our teacher in algorithms lab, because I was compiling the code using terminal and was not using torboC (there wasn't any IDE installed on the system) 😃1
-
Because nothing says "security" like some good ol' Base64 encoding. Bet whoever wrote that code was wearing mirror shades.1
-
Just rememberes a collegue i had for a short period, i was remote and he was on location randomly added, I was told he was a php developer.
What he did was delete ALL the whitespace in the php code and called it optimising, he told the director it’ll make the code run faster. You can imagine how fun that was...2 -
Your CC is safe with us.
Most likely dead code was included in 2013, never modified.
Someone was happy to use Wikipedia -
While working I was munching from a bowl of candy, suddenly realized my face hurt and hard to breathe. Emergency room....
I apparently ate something I'm allergic to while in a code fog.
No idea what it was yet.
Must have been bad code.3 -
Dude in my Computer Architecture class was doing his homework from another class (Java, which is weird because that class is a prerequisite for this one) was struggling with a two-line code program, and the website was telling him that his output wasn't the expected. I notice that the website expected a vertical list, but he was printing an horizontal one. Basically, he was using println instead of print. I was about to pointed that out until he changed to another tab and I realize that he just copied and pasted the code from SO. He deleted the two-line code (which was enough to perform the task) and pasted a big +30 lines of code that basically printed the same output because he was still using println...2
-
When you thought writing code on paper in university was bad, wait till you apply to Google and have one of your interviews writing code in Google docs.6
-
It was the first time I worked on a big project with a big team, I looked at the given code and copied their code style.
I finished very fast and everything was working fine, was really proud of myself. I'd like to add some logging though.
Programm failed it was heavily async and parallel so 2 days of debugging had past the whole team was on board nobody knew what went wrong there.
As I stared into the darkness of my code I suddenly saw what went wrong 😂
As I adopted no curly braces style of the Team for
If (condition)
Justine();
And I added logging above without braces everything broke 😂 it was indented properly so as a heavily python user everything looked fine2 -
We were all drunk at a college party. I pretended that I was able to code something for a friend. He put me on his laptop and made me code. In 20 minutes I had finished. Everybody reviewed the little program and said it was all good.
When we reviewed again the program sober, it was full of bugs that none of my drunk buddies tested out1 -
Was writing code, came down, there's a military coup going on in our neighbor Turkey, thought I was hallucinating for a second...7
-
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 -
Looking at some legacy code and I was like wtf, later read the author name and it was me.
How people were tolerating me than! Man😂 -
I was looking at some poorly written code today in a project and I was curious to see who wrote it. I blamed it and found I had wrote it 6 months ago! smh Well... at least I know I'm getting better! I ended up refactoring it to use better code patterns.2
-
I took over someone's code right after they left, and this was in there... By the way the containing method was about 300 lines long.7
-
I guess this happens to everyone but damn, hate it when dreaming about code, and not just any code, but the code your enthusiastic about, somehow everything seems to work, so that when you wake up and sit in front of the computer you just go blank... what was that code again, it was so sleek, so simple, yet so robust...
12 hours later dream about it again to wake up realizing you wont ever be able to wake up remembering the code in the detail...1 -
This was when I was pursuing my bachelors degree. One of the professors was of the opinion that only her code was right and anything else is wrong! For example if she did something with a for loop and I did the same with a while loop, my answer would be wrong -_- What the hell -_-
(Also, often her code would be wrong too and sometimes wouldn't even compile.. She used Notepad btw)10 -
Today looking at code thinking to myself "I thought I fixed that code...shit that was in my dream!"
Why me?! -
I am currently refactoring some code which exists before my time in this company.
The code was so inefficient before. To put into perspective for every function call it used to loop through some data 100+ times .
I replaced it with a map and voila, no more loops anymore.
The person who wrote this code don't even realise how bad his code was. He sits besides me writing more stupid hacky code for other parts of the app.3 -
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 -
Spent 4h+ debugging my code (it was late)...only to realise that my code was not buggy, but the fuckup in design was in the original part I didn't change..FML..
-
I was looking for a solution in some piece of code for half an hour but then I had to go. I took a photo of the code with my phone and then figured out the solution while I was on the bus :D5
-
going over some old code in the project...
thinking what garbage is this?
oh oh it was junior me :(5 -
Phantom Code: Code that was written in dose state with very little knowledge what the hell fuck you were doing 😧😭
-
A few years ago, i was kinda bored on my internship, so i changed the name of all variables of some jquery functions i had on my code with lyrics from a song that was stuck on my head.
Never understood that code again.3 -
The ability to remember exactly where I was in the code and what I was thinking when I come back to it.2
-
code not working?
comment code and try to run
uncomment piece by piece
code back to original
running...
apparently, the code didn't know it was right3 -
I was telling someone who never indents any of his code to indent it properly.. He was like "Why should I do that? Will it make my code run faster?"4
-
when u feel that u wrote some godlike code. 2 months later client wants to add new features. then u realize ur code needs major refactoring. "what was i thinking, far from godlike"
-
I was on the train and a woman came aboard. The only available seat was next to me. She takes this huge laptop out of her bag. While I observed this, I thought: she's going to code. She logged in and.. GitLab! She was writing R code.
-
I was wondering why every time my my code is accessing the !valid() part to later realize I was coming back to it = its state is reset = I need a break T_T
P.S. if you find anything in my code make sure to let me know :)9 -
One day i started to code.
One day i was told you will not code without git.
Many days i lost code on git because i was ignorant.
Today i reset the act of commiting without losing all my shit.
Git reset --soft HEAD^
I didnt event sweat it ;)
Today i feel like half a boss!!! -
He spent a week learning to code (c#) then decided he was good enough to write the next big FPS.
The result was about as bad as you'd expect. -
Once I was totally exhausted and fatigued doing code...
Then i had cappuccino....
The next thing i saw was my complete project.3 -
So I was excited about working on a proyect I recently was invited to work on, but when I finally got my hands on the code I felt this urge to scream "YOU FUCKER!!!" (the dev responsible for the code)6
-
I've created a code review for merging someone else's code, coz they were signed off sick for the last month.
They're making comments about how it's wrong.
It's code they wrote, but restructured to be more readable.
They wrote incorrect code that was just so illegible they didn't realise.
How do I explain this diplomatically?10 -
When a dev complains his/her code was not deployed and you find the code was check-in in wrong branch.
-
The way I was told to write unit tests was particularly terrible.
No mocking of objects or dependencies so the tests ran the actual code in full including updating databases and files. Then at the end of each test there was code to restore all changes back to before the test.
Each test ended up being over 100 lines. Madness.1 -
When I was in my first year in university, at the Introduction to Programming class, we had to do a Java project and my partner was someone who was always bragging about how much he knew about programming. Me being someone who was learning programming by the moment I started the course I thought he was going to help and teach me cool stuff.
The first phase was due to deliver in one week and literally my code was all original and my partners code was all copies of others work. Out project could'vw been graded 0 because of his code (because they used a programm that compared variables of each project to see if.they fins copies). He practically didn't gave the effort to try to code, just copies. I spent the whole week correcting his work so that I wasnt penalized in the end...1 -
I had a friendly argument with a person over comparing visual studio with Xcode,the first thing that came into my mind when he said visual studio was visual studio code (keep in mind visual studio and visual studio code are completely different visual studio is an ide while visual studio code is a code editor )
I was arguing that there’s no point comparing an ide specifically made for iOS app dev with a code editor with intellisense with better code predictions as it would have made more sense if he was comparing a code editor with another code editor like atom or sublime.
This argument went on for a couple of mins in a group chat
Later on I found out he was talking about visual studio and not visual studio code which actually is an ide used for app dev.
This whole time I thought he was talking about vs code and he thought I was talking about visual studio 😂
I ended up agreeing it was my mistake for not getting the message in the first place 😂3 -
Comment on a code review:
How does this relate to the task?
Me:
Most of the changes have nothing to do with the task, but half of the code & build system was either wrong, broken or not following best practices. This particular change is because something was broken.3 -
Checking the whole code for finding the null value. Gone through the process multiple times.
Oh boy, it was wasn't "personId", it was "personID". -
I had rough week last week. Accidentally deployed dev code to production, soon found out there was no production version of code to do a redeploy. Deployed another app to production, it was working fine then another Dev changed a data type in the database from bool to nullable Boolean which broke some Linq queries. Looked like I deployed crap code. 3rd week with company.
-
Just saw a post on SO where the guy was asking a question about ES8, ES9 and ES10. These don't exist yet.
He even had code examples and was adamant that he was right.6 -
Couple years ago I was asked to add couple of simple features to a piece of code on clients server. I thought it was simple process until I got the code and noticed that the variables were named like int1, int2, int3... etc. Also same logic in the database.
Needless to say I spent too much time to figure out what those variables and db fields contained. Also the whole code was copy paste code from the web. -
Production broke today because Google code removed a project that was hotlinked, but cleanup is not a priority #fml2
-
There was a task of fixing up a payments page that features pretty complex logic. Initially it was like 200 lines of code, seems short but it was a fucking spaghetti mess. Never seen more cognitively complex code in my life.
So I delete the spaghetti and pull out the 500 lines fucking state machine. It works perfectly. It’s perfectly understandable even though it’s longer.
This is how I deal with problems. Shorter code isn’t always better code.4 -
Worked till late refactoring code,
Then dreamed I made a huge mistake.
Or was it real? Can't tell !2 -
I had my presentation early morning, it was 3am, and I was still up because the code was not compiling. Then showed up my roommate who had gone for party. Can't believe that he was the one, in the half drunk state, was able to find just a short typo,but not ME, EVEN THOUGH I HAD 3 CUPS OF COFFEE the same night. Lesson learned. Patience is a virtue. Blessed to have a nice roommate. :)
PS. It was a Matlab code for filtering the mentioned portion of an ECG Signal, and analysing the problem faced by the patient. Well, I was pretty sure to get arrhythmia if I couldn't complete the code by morning. -
"It was hard to code so it should be hard to understand."
- my former boss who did never document any code -
When the code is so bad that fixing one thing breaks 10 other things because the code was made to work with broken code.3
-
Some years ago... And some xp less.
An old WordPress installation was attacked and our server was sending thousands of spam mails.
I found out that there was a line of code in the top of every php file. And I removed these files.
The problem was that
1) I was copying this fcking line to new files because I was thinking it was my code.
2) I found a Linux command to detect all these files and I removed them one by one. In every file. Many many files.
#hacker #goodolddays -
I regularly diss on PHP in office but the truth is just that the developers before me wrote bad code. It was bad code in PHP alright but they had a whole framework to use and at least organize their code better but they didn't use it.
I have seen their JavaScript code too and it was all in one file.
P.S. I have no idea under which condition they had to write the code. The app was initially outsourced.5 -
So I completed writing code to generate report regarding git commit in CSV. What my boss was saying is :8
-
The worst rejection was one after a first interview and a subsequent 3 hour code challenge. I was super nervous as it was my first code challenge in an interview that was one of my first. I wasn't confident when I submitted my work, but the time was up and so there wasn't much to be done.
The rejection was simple. Pure silence. No arguments, or feedback. Just didn't hear nothing back and that didn't help my fresh out of university self-confidence.1 -
One of my colleagues just tried to deny a buggy code change was his on the grounds that the new code contains logging and he never uses logging.2
-
Deleted 1000 lines of code that I would need at a later point. Had a mini heart attack once I found out the code was no longer there...3
-
I had a school project with a friend, we concord to code some parts of the program, share it and explain the code so the teacher see the code was ours, when the final date come, after some doubts from my find we could delive the project with a not good note, the time passed and the teacher repeated the temps for a final protect, my friend was totally lost, the he arrives with all of his part, I questioned him about the code but he don't not so much abut, we almost fail the final protect because he buy the code to someone else and couldn't explain it to the teacher.
This was my face when I knew he cheated.1 -
Was reading this blog. COBOL started as a low code application for managers to write code in a language close to English.
The more things change, the more they remain retarded.4 -
Last year in my job, I was temporarily assigned to another team to help out in their project as they were short-staffed. It was a massive project and of course there was a lot of code review to be done. But since I was only temporarily assigned, I still have to do code reviews for my base team, this other team I was assigned to, and for some reason, code review for another team that I barely know what their project is about.
There were times where all I was doing was code reviews that took anywhere between a few minutes to upto 3 days. The amount of mistakes and bugs I kept finding was phenomenal. But I think the one thing that got to me was finding the same bugs/mistakes that I kept pointing out to people to stop doing or to fix e.g DB queries inside a loop just to retrieve data.
To this end I still have to deal with the same issue, but thankfully now it's only to one team.1 -
Wrapping up a project, I am cleaning code to give the customer the source code. The project had lasted over a year. I joined the team a few months back and it frustrated me how messy the code was. In my previous teams, any new resource was told to stick with the rules, and eventually they became embedded in them. The case seemed opposite here. Developers who wrote clean code became lax (they made me even more pissed).
Now I have the job of getting rid of warnings, formatting issues etc and I do not say this lightly, but, there was no fear of god in anyone who worked on this codebase. The code formatting I have seen makes me wanna...5 -
Question:
What was the stangest thing what you saw in other's code when you reviewed it?
I never reviewed a simple code, so I am curios 😮8 -
Deployments, a limerick:
there once was an ops guy from New York,
who was working on deploying a fork.
the docs were weak
the code memory leaked
in a half hour all of production was borked.5 -
When I was in high school, I was learning to code on my own. I showed my python code that I was really proud of to the girl I liked. she didn't understand what it is, she thinks its weird, she thinks I'm weird.
She has a point.3 -
When I was starting programming (learning Actionscript 3) loong time ago I for some reason didnt stubbornly write code into .as files... Instead I just attached code to timeline keyframes in Flash...6
-
So this is the case I have not coded in a long while and was actually starting to miss it. I was LITRALLY considiring starting to code again, then i went on devrant and read about two rants and you know what? Im good i dont wanna start code again3
-
So, I was fixing some code today, and stumbled upon this. Is it just me, or is this really an example of bad bad practice...? And, no, there was nothing to be executed after this function was called.6
-
The catharsis of deleting code that is difficult to read, clashing with the agony of deleting code that was difficult to write.9
-
My Github account got flagged.. I don't understand why..
I was just trying to push my innocent code..4 -
Sublime Text could've became the greatest and fastest code editor of all time if it was supported with good extensions. Now we're left with electron based code editors that are slow with big projects.6
-
One of our developer told that my code is ugly to our project manager. And my response was 'I know right! By the way your code also sucks. Fair enough.'1
-
My best code review was when my merge request was accepted in less than a minute after creation. It was simple but I expected more time on review and accept action.
-
Did an interview and got some feedback and my coding challenge (I didn't make the cut) . Was surprised at a particular comment on why it was I didn't make the cut and it was about the code not compiling atall. So I went to check the repo and found some code which I oath to have removed lodged into the code base which prevented the reviewer from being able to compile it. How tf it wasn't flagged out when I was compiling before pushing to the repo is beyond me. Now I feel hella stupid and disappointed in myself 🤦🏾♀️ (to be fair it wasn't the only reason I didn't make the cut. The code could have being better)1
-
Taking over the blog for our companies CSS code as it was unresponsive, due to FIXED values. The fun part was roasting the guy who wrote this before me :p2
-
There was a "Snake" game on an old windows machine that came with the source code. I was able to tweak the code enough to add interesting twists to the game. From then on I was hooked.
-
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 -
I was doing some refactoring code, I was about to commit , but I realised this, I chuckled , what a silly of me.....4
-
Best code review experience was when I was mentor in a bootcamp and I had to review code from scholars, they were surprised by how their code could be written in less lines.
-
So I had to refactor some code that looks like it was written by someone who was getting paid for the number of lines of code.
-
We had a debugging competition in college!! I was all excited abt it.. but it was a facepalm situation when I realised that the code had syntactical as well as logical errors while the purpose of the code was not specified 😂😂😂...
I was like.. what am i supposed to do??? Replace the entire code with hello world?!?!😂 -
MOTHERFUCKER! Hours of debugging and one code block was indented wrong. Gotta love doing shit when tired...4
-
Yesterday while I was searching solution on stackoverflow for an error I was getting, for found the whole code for the thing I was working on🥳
That is when I realised I was searching for copper but God gave me Gold.3 -
Earlier i posted i felt like a fraud in this internship ,
But turns out my code was correct the damn API was broken i kept thinking in fing up
Ugh -
Finish my biggest project :)
In 2017 the project was counting 60k lines of code (which doesn't look as too many) but I was able to remove some libraries and make my custom system, now the project is counting 10k lines of code :)
My dream is to open in these months -
Worst argument/fight was on a game I was working on.
One of the other devs was waiting for me to write some server Code before calling the endpoints on the client.
After writing the server Code I added the client side Code and committed it to our repo.
They had a massive go at me for doing work for them and threatened to remove my Code and replace it with their own code. -
Fucking Mess!
Apparently my code flunked during deployed cause some retard didn't pull the code and made his commit. Unfortunately this was after I MADE MY COMMIT.
noobs! -
When you're not confidant enough in your own code ... but you should be:
Me: "Why the hell is this duplicating data?!?!?!"
-time passes-
-figures it out-
Me: Wait that returns an error wouldn't that be ...
Yeah there was an error on the god damn screen in the status box I created telling me what was going wrong but I just ignored it... I was knee deep in code and my own UI was telling me what was wrong ;)2 -
Was passing values from back end into template .nothing appeared so I though I screwed up somewhere in the code ,turns out it was the css.1
-
Say the world's source code was opened for anyone to edit, which function would you change?
// js land
function conception(e) {
e.preventDefault();
return;
// original code here
}8 -
Few years ago I was looking at legacy code that was developed by offshore team (what could go wrong,right) and I see small utility method that looks like this:
public boolean isEmptyNotEmpty(String s) {
boolean empty=false;
If(s==null) {
empty =true;
}
If(s.equals("")) {
empty = true;
}
return empty;
}
Thinking in myself: was he/she paid per line the line of code??!?!
Up to this date that was the worst part of the code that I encountered....2 -
My first job as a student was at the institute. I was working realy hard. Doing my best. Closing issues lika a boss. All my code was reviewed by senior.
Two other student has this simple program to make (gui for some functions and some graphs). They have no idea how to make it. Their code was worst than spageti and in four mounths then didn't even come close to the end. Noone even looked at theri code.
We were paid the same money!1 -
Today I've read this line of code:
$like === true ? $operator = "LIKE" : $operator = "=";
Should I be angry, sad or disappointed?
That was written by a person who I tought could code.6 -
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 😊 -
One of my colleagues from work:
- Looks through the code and finds a chunk of code that looks fishy (to her)
- Sais that she never understood why it was implemented that way
- Deletes the chunk of code
- Starts rewriting it
- Remembers why it was done that way
- Reverts it back and moves on to something else
Just why? It would have taken her 1 min to read the code ... -
I found programming really out my focus. Initially when i was exposed to it, My friend showed me a code of C and C++ and i was like it looks so untidy and annoying like colons and semicolons in between of random text sentences. In my first semester i had this Programming course of C and C++ and i had to deal with it. The lab sessions were totally bouncers for me, i cant understand any anything. During writeup submissions i used to copy someone else’s code (Yeah, i wrote down the whole code with a pen on a paper including every syntax). Writing down codes gave an idea about the flow of code, i didnt knew what was really happening in the alogorithm but atleast i can understand which is used for what. I also used to copy Flow diagrams of code so i used check both of them side by side and try to link. This helped me atleast to begin with and deal with that course. As semesters incremented coding was more of a need in every course. And i started liking it.☺️☺️
Initially i didn’t had wifi at home so i was totally unaware about youtube tutorials and courses. The only typing of code was done in the lab sessions.
This was my first experience regarding coding.
What was yours? -
Wrote some code, not realizing code has TOCTOU race condition until a healthy 4 hours later, and the fix was to move two lines of code upward. I hate me, myself and I.
P/S: What happened to PrivateGER, devTea and linuxxx?3 -
when code gets especially ridiculous i wish there was a 'git punish' command...not just 'git blame'..3
-
"A programmer was arrested for writing unreadable code. He refused to comment."
H/T: (@Mr_Drinksonme)1 -
That moment when you’re debugging, and you realize that your output files are not empty because your code isn’t working but because your code IS working... 😑
I changed the test files I was using so I wasn’t expecting that particular behavior. None of the input data met the requirements hence nothing was being written out. It wasn’t until I tried a larger test file that I realized my code was working.
A simple discussion with a teammate would have solved this. 👀😂 -
I had a bug in my code, I was sure I fixed it but when I tested it nothing was charged. I asked my friend to take a look, and when he looked over my code I found out what the problem was: I tested with the older version.
-
Working on an assignment in Java. Was making a test, but no matter how hard i tried the test would never run. Went through the code several times changing it entirely.
Realized after four hours that it was the test that was wrong, not the code 🙄1 -
I was scanning over a dreadful code base I had to work on and found SQL injection vulnerabilities. THE SITE WAS LAUNCHED IN 2017!!!! 😢2
-
Performing code review for design quality.
So you return HTTP code 200 for 'ok'. So what do you return when things are not 'ok'?
Obviously something that's not 200. Like 300 (The message with the code was literally "not okay").1 -
WordPress File Delete to Code Execution
The vulnerability was reported 7 months ago to the WordPress security team but still remains unpatched.
https://blog.ripstech.com/2018/...1 -
it was the last time i used PHP for an school project. i and an other group decided to make an website. it was luck that no input was required. Because i already knew PHP and HTML i need to help them. the code they made was the cause i quit php. the site only worked after an redirect. it was irony that tje code looked like it was written from a junkey and the theme was drugs.7
-
That moment when the code that was supposed to be removed in only commented out!!! The guy butchered a bunch of classes by commenting out about 1000 lines of code
-
I just found a class in the codebase which was named "Ariadne". Coz it was responsible for holding the information of where you are on the site wrt the homepage. Talk about giving meaningful names. There was no other documentation whatsoever. You know you've serious code quality issues when you expect fellow developers to know entire stories from Greek mythology to understand the code.1
-
Today was a satisfying day... I could code nearly all day 😃 (even when it was VBA and not Java - it was a nice diversion) - and in the end everything worked 🕺
-
Today I was forced to code in 4 hours what I had planned for 2 days. I have a feeling that any change to that code will take a day to implement.
-
i am taking some pills for hemorrhoids and yesterday i was combined them with my third coffee. Somehow i was full of energy and i started coding like f crazy. I was literally writing code withe the speed and tension you see in movies, or if you like it, like our non tech bosses are thinking we work 8 hours a day for granted. I did not know what was happening, i was typing correctly, fast, and i want to live it again. Dope, adrenaline, aggression!
The code must fear us, not we the code!2 -
I was at school and one of my friends asked me to help with his code. He said that his image wouldn't appear on his website.
I checked his code and it was right, so I checked his images folder.
The image he wanted to put on his HTML document was something like "prev.img". I was a bit confused. A file with a .img extension? He did put his code right, but there was still something wrong. I right clicked the image and went to the properties. The file extension was .jpg.
I eventually corrected his code but I still can't find out how he fooled himself. smh -
not really that hacky but it was something back then
when I was still learning front end development. I enabled live server on my vs code, connected to a network went to a different PC and connected to same network, went to browser on second PC, entered the other PCs IP adress and added the port number provided by vs code, I was able to access the website I was working on so as I worked and saved the site automatically refreshes on the other computer and i saw the results immediately
this was because I had an 11 inch screen PC. a hp mini. was practically impossible to work with that so whenever my roommates PC was free I'd do that without having to code directly on his PC
later on I enabled auto save on vs code and it seemed I was on a roll. lol -
I was fixing a bug, wrote some code that was really neat, still it looked like to much.
Then I realised I could change my code to 4 simple rules vs 50 -
Lost my changes twice now. First time was my own fault. Was in a hurry to pick up my son from daycare so I checked in my code and locked my computer before the code was actually checked in. So today when I took "Get latest" somehow my last code from yesterday vanished. So, I rewrote everything, but now there was some problem with service references, and building the solution failed. A colleague had a look into it, but he couldn't resolve the problem neither. Instead he accidentally made an undo changes on my code, so now my code is gone again. And the solution still doesn't build. I'm just a *leetle* frustrated right now :(3
-
I remember being a TA for an intermediate java class. I tried helping as many people as I could, but some of them were doomed. Their code looked like it was written by Satan himself. I would try explaining why their code was bad, but it was like speaking another language (no pun intended). It was also the first class where people needed to use git... I don't need any more explanation there.3
-
The most excited I was about my code was when I shrunk a bunch of easy if-else statements to a couple of lines using ternary operator. It wasn't groud breaking but it was the first time I felt like a programmer writing nice code.
-
My last workplace would fit to that tag quite well.
CTO who was also in charge of firing / laying off people is a code nazi that forced everyone to use some absurd code styling. -
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 -
So I was reviewing coworker's code the other day...
incomingMessageProcessor.processIncomingMessage()
....well thank you there captain obvious -
Nothing makes me - on a regular basis - doubt myself more than when I'm reading documentation and finding the arguments and variables I need, but not for the life of me finding the syntax or which context I should be using it in.
It's as if it's assumed to be common knowledge and I dread being "that guy" to ask someone about it. I feel like such a chump opening a new tab and googling for examples. -
I discovered you could edit the Visual Basic code in MS Access. I would read the code that was in there and figure out how i could extend it to do what i want. first code i ever wrote was a switch statement to control whether a set of buttons were enabled based on a dropdown value.
-
I spent 30 minutes this morning wondering why my code was throwing an exception. Turns out I was forgetting to read the SqlDataReader before accessing it...
I shouldn't be allowed to code before I've had caffeine... -
I thought the weather app I was using was hacked because because it displayed Ukranian Village as my current/default location.
Somehow this zip code though is known by that...2 -
So today I tried to code in c++ by separating class code into header and cpp file which I had not done before. Compiler was throwing error while compiling, "undefined reference to std::cout". Took me nearly an hour to figure out I was using gcc instead of g++.6
-
Arrrrgh Fuck this shit. I thought debugging someone's code was fucked up. I was wrong, try debugging someone's unit tests.... Absolute nightmare
-
Once I wrote a tool to help convert alarm messages from an excel sheet into an xml file with other specific things included.
My colleague (who is very proficient at coding in his chosen system) while I was writing said tool asked why I was commenting code as it was basic!
I asked him to work out what my code was doing (it wasn't mega complex) he spent a long time googling! -
The first code i ever wrote was a case statement in Visual Basic. I didnt really know what I was doing, just looking at the code that was already there and figuring out how to extend it to include more cases. I was about 17 at that point. I didnt properly start learning until I did Java in my first year of University.
-
Last week I found this on some spaghetti code I was analyzing:
if (boolVar) {
...
}
if (!boolVar) {
...
}
if (boolVar) {
...
} -
Why was my code push today completely flawless?
Because I didn't do it on Friday at 5 pm when it was actually complete. -
Rewriting some fractal generation code for a client in Python. his original code was in Visual Basic. he sent me his original code as a fucking Microsoft Word document...............
-
Do you guys recommend the CODE keyboard from WASD? I would like to buy one, but before I need some opinions. Is it worth that much money?7
-
So in my Freshmen year I was required to take beginner computer science...
Past it with flying colors.. It was just simple Javascript.
Come Sophomore year I took AP Computer Science. I got lower grades, not from the code, but from the Technical Writing that the teacher wants in our reflections and other writing portions, not apart of the course.
The code itself was easier then intro. We had block code... Why is that AP? Not Scratch, but very similar.1 -
What’s an adequate amount of lead time for a code freeze notice. I was asked to update some code I was not responsible for. The updates will take about 2 weeks. A few days after being assigned I get a notice of the code freeze :/5
-
My friend brought up me copy writing my file transferring code and my response was “uh.. I was gonna just throw it on Github”.
So rip that -
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 -
Pushed the code without compiling. We weren't generating builds before merging the code back then. It was so embarrassing
-
Before vercel released v0, an ai tool to generate html and css code for your project, I had a dream that I was writing front end code and there’s this mysterious search bar where I can just type in what I wanted and let it generate html code for me. Then the next day I saw the tweet. I was honestly shocked and I checked the tweet time, it was definitely after I woke up, so there was no chance that I saw this thing before my dream.
And the shitty thing was that I was thinking about developing this after I woke up. This sucks -
I have Avira Password Manager and for 3 days now I can't access it because they send a verification code to the phone but that code was never received... FUCK YOU AVIRA5
-
What was interesting was 70% of the Data Vault training was something I do already. The other 30% was either a good idea or overkill. However now that it has been adopted by the team, I guess everyone will have to code that way.
-
The documentation/website I was reading uses a time-delay animation. Just when I am back into working in the code on my main monitor the animation pops up and distracts me from the code I was writing.
-
Most painful code!!
Well , it was to write a code in 'C' which will print first N times prime numbers. As a noob , it was really very painful.5