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 - "comments everywhere."
-
Anybody else here has a coworker who insists on having comments everywhere and writes code like this?
// Get foo
foo = getFoo();
// Check if foo is greater than bar
if (foo > bar)
Or is it just me?22 -
Whats so nice about devrant is that you see more or less the same people from time to time everywhere.
In comments, notifications, rants, all that.
It's like a party full of nerds like you where it's actually fun to get to know people.:D12 -
My friend loves Dreamweaver... And continuously says that he doesn't understand what people see in it that is so wrong... It does the job right?...... Fucking blind...
Uses a bootstrap plugin which generates HTML code for bootstrap.
I did not know this at the time.
Comes to me the night before submission.
He: Dude i need help quick! I've got the presentation tomorrow morning and bootstrap fucked up the links to my style sheets or something, my page is broken and won't work. I should have done what you did and gone for Foundation...
Me: Yeah, because the bootstrap framework definitely affects the style links...
He: help me out man, please! I can't do this anymore!
I had my submission the day after him to prepare still...
Me: Teamviewer. Now.
Log on to Teamviewer.
See what he's using to code...
Dreamweaver..... Niiiiice....
I go through the code. There are empty divs with &nbsc; in them everywhere.. some HTML elements haven't been closed, no comments, indentation seems to be completely random. All the usual shit storm of a novice web designer.
The only thing is, this guy I know knows how to indent, I've seen his previous work. Why is this so horrible then???
I ask what the hell happened, it looked like a nuclear explosion happened!
He: Yeah I'm using this great plugin for Dreamweaver which lets me click and it puts in Bootstrap elements! It's great!
........ You're blaming the bootstrap framework for affecting your links to your stylesheets, you're using an elements generator, you're not checking what the FUCK it puts into your code, not fixing the indenting, not checking the standard HTML rules are followed AND YOU WONDER WHY IT'S BROKEN???
Kill me now.4 -
Working in company where part of team is located in Austria and these morons write evrything in fucking german, method names, comments and even the parameters which are sent to fronted. Like it isn't enough they even use special characters like ß,ü,ä and ö everywhere12
-
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. -
Hello everyone,
I am a french student and I was wondering if college sucks everywhere ...
This is my third college year and I have the feeling that I am wasting my time.
I am in a quite good engineering school but most of the programming courses suck because «teachers» are clueless about the course that they give.
I am not here to tell that «I am better than them blabla» but I just wanted to know if the quality of education has slightly dropped not only in France.
I am really interested in your opinion, feel free to debate in the comments :)21 -
My current project is a fucking nightmare.
It started in 2007, using a solution developed by an Indian company due to outsourcing (aka low-quality code).
It's running on Java 7 on the back-end and its front-end side is pure Javascript files. There are thousands of little .js files everywhere, no documentation, no comments, differents coding styles, outdated API that were already outdated at the time, mixed oop and procedural.
Not even when I started coding, I wrote something so horrible.
Yo, it's a clusterfuck and I just wanna get drunk.5 -
Ok, so teacher (which should be something like a professional dev or whatever) assigned us a homework for a Christmas (I dont care, I can complete his assignments in like 10 minutes max). We have to do some simple shit in C++, just some loops and input + output. Nothing hard. He challenged me to write it as short as possible, so I did. My classmates have codes around 60 to 70 lines long (after propper formating). I made it 20 lines long using some pointer magic and stuff like that. I tried my code, it ran fucking perfectly, so I sent that to him. He replied that the code does not work. I tried to recompile it and it ran perfectly. Again, it does not work. Afeter 13 fucking emails he fucking finally sent me the error message. Some fucntion was not found (missing some library but literally everywhere else it works without it...). Thats strange, because it run perfectly on my Fedora with CLion, so I switch to Windows and try to run same code in Visual Studio (which we are using in school btw). Works perfectly. So I start arguing with the teacher more and more. I tried around 10 online compilers. Works fuckng everywhere. Teacher is pissed, me too. So I rewrote my whole code, added comments and shit, reinvented wheel literally everywhere. Now I have C99 standardised code over 370 lines long that run even on a fucking arduino after changing input output methods so it can work with it. It (suprisingly runs) on his PC too.
After a bit more arguing, he said that he is using CodeBlocks from fucking 2015. Wow. Just fucking wow. Even our school has some old Visual Studio (2007 I guess) and it worked there.6 -
Spent an hour and a half renaming a method everywhere in a project from `feature_name` to `feature_name!`. There are a lot of constants, symbols, and other methods that use "feature_name" as a prefix (plus comments and spec descriptions), so was a little more difficult than normal.
Should have taken like 5 minutes with a proper IDE refactor tool. but noo, it was too difficult for RubyMine. wah wah wah. Stupid thing. Not even the search tool was useful -- it's limited to 100 results, and there were around 250 for that substring.
I ended up having to run specs repeatedly to find all the remaining instances, which took freaking forever. blahhh20 -
TLDR: crappy api + idiot ex client combo rant // devam si duška
I saw a lot of people bitching about APIs that don't return proper response codes and other stuff..
Well let me tell you a story. I used to work on a project where we had to do something like booking, but better..crossbreed with the Off&Away bidding site (which btw we had to rip off the .js stuff and reverse engineer the whole timer thingy), using free versions of everything..even though money wasn't an issue (what our client said). Same client decided to go with transhotel because it was sooooo gooood... OK? Why did noone heard of them then?
Anyhow, the api was xml based.. we had to send some xml that was validated against a schema, we received another that was supposed to be validated againts another schema.. and so on and so on..
...
...
supposed..
The API docs were nonexistent.. What was there, was broken English or Spanish.. Even had some comments like Add This & that to chapter xy.. Of course that chapter didn't even exist yet. :( And the last documentation they had, was really really old..more than a year, with visible gaps, we got the validation schemas not even listed in the docs, let alone described properly.
Yaaay! And that was not everything.. besides wrong and missing data, the API itself caused the 500 server error whenever you were no longer authenticated.
Of course it didn't tell you that your session was dead.. Just pooof! Unhandled crap everywhere!
And the best part?! We handled that login after inspecting what the hell happened, but sent the notification to the company anyways.. We had a conf call, and sent numerous emails explaining to them what a 'try catch' is and how they should handle the not authenticated error <= BTW they should have had a handled xml response for that, we got the schema for it! But they didn't. Anyhow, after two agonizing days talking back and forth they at least set up the server to be available again after the horrified 500 error. Before, it even stopped responding until reset (don't ask me how they managed to do that).
Oh yeah, did I mention this was a worldwide renown company?! Where everybody spoke/wrote English?! Yup, they have more than 700 people there, of course they speak English! <= another one of my ex clients fabulous statements... making me wanna strangle him with his tie.. I told him I am not talking to them because no-one there understood/spoke English and it would be a waste of my time.. Guess who spent almost 3 hours to talk to someone who sounded like a stereotypical Indian support tech guy with a flue speaking Italian?! // no offence please for the referenced parties!!
So yeah, sadly I don't have SS of the fucked up documentation..and I cannot post more details (not sure if the NDA still holds even though they canceled the project).. Not that I care really.. not after I saw how the client would treat his customers..
Anywayz I found on the interwebz some proof that this shitty api existed..
picture + link: https://programmableweb.com/api/...
SubRant: the client was an idiot! Probably still is, but no longer my client..
Wanted to store the credit card info + cvc and owner info etc.. in our database.. for easier second payment, like on paypal (which he wanted me to totally customize the payment page of paypal, and if that wasn't possible to collect user data on our personalized payment page and then just send it over to paypal api, if possible in plaintext, he just didn't care as long as he got his personalized payment page) or sth.... I told the company owner that they are fucking retards if they think they can pull this off & that they will lose all their (potential) clients if they figure that out.. or god forbid someone hacked us and stole the data.. I think this shit is also against the law..
I think it goes without saying what happened next.. called him ignorant stupid fucktard to his face and told him I ain't doing that since our company didn't even had a certificate to store the last 4 numbers.. They heard my voice over the whole firm.. we had fish-tank like offices, so they could all see me yelling at the director..
Guess who got laid off due to not being needed anymore the next day?! It was the best day of my life..so far!! Never have I been happier to lose my job!!
P.S. all that crap + test + the whole backand for analysis, the whole crm + campaign emails etc.. the client wanted done in 6 months.. O.o
P.P.S. almost shat my pants when devRant notified my I cannot post and wanted to copy the message and then everything disappeard.. thank god I have written this in the n++ xDundefined venting big time issues no documentation idiot xml security api privacy ashole crappy client rant11 -
I just started a job as a junior C# dev.
My project at work includes:
-no coding style
-multiple classes in one file
-all classes are static
-who needs interfaces?
-typos in variable names
-more than 3 levels of inheritance
-conf files such as "blabla.xml"
-comments? documentation? nope
-copy&paste everywhere
Client outsourced this project to us to get the job done properly :D
Looks that I have some opportunity to show my talent.10 -
I started my internship at the end of the year..
Fuck my ass!!! This code I have to work with is a huge pile of shit.
The code base I need to work with is around 40k LOC. It is a mixture of C++, C, Java, Python, Bash and I think I saw some lonely js files around.
A list of awesome parts:
- Paths are hard coded.
- Redundant code everywhere
- No documentation or inline comments available
Most of the comments in the code are just old code that is not used anymore. But the cherry on the turd is the class that should provide all kind of useful functions in my daily routine. About ninety percent of the functions have the same description or nothing. Sometimes a function name says "readSomethingFromSomewhere" but instead it writes something to a file. It is really confusing and I need to check everything twice instead of rely on what the function name promises.
I have also learned why copy paste isn't that good. The brief descriptions of every method in a files are always the same.
getName() - Description: Fork child process
getIp() - Description: Fork child process
getIpv6() - Description: Fork child process.
Surprise: None of these functions forks a child process. :D
Another awesome feature is the thing that they store up to five different versions of libraries. Everyone with slight modifications but no hint which one you need to use. Sometimes it is the newest, sometimes the oldest which is running in production. Another case of try and error.
Oh and my dev machine is a potato with a power supply and a fan. I started with NetBeans and every time I compiled the code it sounds like the machine wants to lift off and leave for a better place. (At this point I switched to Emacs and everything runs smoothly now)
At first I thought that I'm just not that good at coding and understanding a big project from scratch but some colleagues have the same problem. The whole system is very inflexible and it is all about "std::cout"-debugging to check if your changes do what you want them to do.
Currently I'm just trying to fix this mess to make the life for the next student or employee easier. The first month was just frustrating as hell. I need to ask so many questions and most of the time the answer was "I don't know, haven't touched this code in years". Needless to say that my progress isn't that awesome but at least I get a nice payment for 20 hours of work a week.2 -
Oh gee whiz fellas. I lived through my nightmare. Recently too.
(Multiple rants over last few months are merged in this one. Couldn't rant earlier because my login didn't work.)
I joined a new shithole recently.
It was a huge change because my whole tech stack changed, and on top of that the application domain was new too.
Boss: ho hey newbie, here take this task which is a core service redesign and implementation and finish it in two weeks because it has to be in production for a client.
Normally I'd be able to provide a reasonable analysis and estimate. But being new and unaware of how things work here, I just said 'cool, I'll try my best.' (I was aware that it was a big undertaking but didn't realize the scope and the alarming lack of support I'd get and the bullshit egos I'd have to deal with)
Like a mad man I worked 17+ hours a day with barely a day off every week and changed and produced a lot of code, most of it of decent quality.
Deadline came and went by. Got extended because it was impossible (and fake).
All the time my manager is continuously building pressure on me. When I asked questions I never got any direct/clear answers. On asking for help, I'd get an elaborate word vomit of what was already known/visible. Yet I finally managed to have an implementation ready.
Reviewer: You haven't added parameter comments on your functions and there aren't enough comments in code. We follow standards. Clean code and whatnot. Care for the craft verbal diarrhea.
Boss: Ho hey anux, do you think we'll be able to push the code to production?
Me: Nope. We care for the craft and have standards. We need to add redundant comments to self documented code first, because that is of utmost importance as Nuthead reviewer explained.
(what I wish I had said)
What I actually said: No, code is not reviewed yet.
And despite examples of functions which were not documented (which were written by the reviewer nut), I added 6-7 lines of comments for my single line functions describing how e.g. Sum takes two input integers and returns their sum and asked for a review again.
Reviewer: See this comment is better written as this same-meaning-but-slightly-longer way. Can we please add full stops everywhere even though they were not there to begin with? Can we please not follow this pattern and instead promote our anti-pattern? Thanks.
Me: Changed the comments. Added full stops. Here's a link for why this anti-pattern is bad.
Reviewer: you have written such beautiful code with such little gems. Brilliant. It's great to see how my mentoring has honed your skills.
.
.
.
I swear I would have broken a CRT on his stupid face if we weren't working remotely (and if I had a CRT).
It infuriates me how the solution to every problem with this guy is 'add a comment'.
What enrages me more is that I actually thought I could learn from this guy (in the beginning). My self doubt just made me burnout for little in return.
Thankfully this living nightmare will soon be over.rant fuck you shitty reviewer micromanagement by micrococks wk279 living nightmare fml glassdoor reviews don't lie9 -
Shit swizzler in school group project doesn't delete ANY code. Just comments out everything, everywhere.
Some of the files is scrolling through 30 lines of comments, 2 actual lines of code, 20 lines of comments, 5 lines of actual code, ...
Somewhere, in between all of his shit code, I just want to add: "Fucking stop with the comments, you wheezing bag of dicktits"
Oh and this afternoon, he asked me where he could find the Bootstrap code I'd written. He couldn't find 'the file'. I had to explain to him that it's kinda everywhere, throughout the HTML.. As a novice in many many things I fully understand not knowing everything. But the little shitstick told me he 'uses bootstrap all the time' just two hours before he asked me this.
I swear everything this guy touches turns to shit. One more day of this and I'll slap the bitch out of him.
P.S. Free virtual advocado for the first person to guess what movie inspired my insults (easy, I know)6 -
Fixed a bug today that I created over a year ago.
It made a machine start doing really fucked up things like running motors when it shouldn't. My boss, an expert on the system and the code, gave me some ideas to check. He couldn't understand why it was doing it either. So I started checking things and comparing to another piece of code that does similar things. I finally found a place where I had used a really sketchy pointer. I even knew it was sketchy at the time and put a ? mark in the comments next to the line of code. I changed the code to match another system that explicitly creates the object. Then I started testing the system and boom everything is working as it should. I talked to my boss and explained everything. He said it was an easy mistake to make. Internally I was saying, "But I don't make easy mistakes. I make hard mistakes!" LOL
Got to walk away from work for the weekend knowing that my other code is a lot more solid than I was thinking earlier this week. I was starting to second guess what could possibly cause this problem and thinking there could be culprits everywhere. Boss was happy problem was solved as he is going to be showing off the system I am working on in a month at a show.3 -
The dangers of PHP eval()
Yup. "Scary, you better make use of include instead" — I read all the time everywhere. I want to hear good case scenarios and feel safe with it.
I use the eval() method as a good resource to build custom website modules written in PHP which are stored and retrieved back from a database. I ENSURED IS SAFE AND CAN ONLY BE ALTERED THROUGH PRIVILEGED USERS. THERE. I SAID IT. You could as well develop a malicious module and share it to be used on the same application, but this application is just for my use at the moment so I don't wanna worry more or I'll become bald.
I had to take out my fear and confront it in front of you guys. If i had to count every single time somebody mentions on Stack Overflow or the comments over PHP documentation about the dangers of using eval I'd quit already.
Tell me if I'm wrong: in a safe environment and trustworthy piece of code is it OK to execute eval('?>'.$pieceOfCode); ... Right?
The reason I store code on the database is because I create/edit modules on the web editor itself.
I use my own coded layers to authenticate a privileged user: A single way to grant access to admin functions through a unique authentication tunnel granting so privileged user to access the editor or send API requests, custom htaccess rules to protect all filesystem behind the domain root path, a custom URI controller + SSL. All this should do the trick to safely use the damn eval(), is that right?!
Unless malicious code is found on the code stored prior to its evaluation.
But FFS, in such scenario, why not better fuck up the framework filesystem instead? Is one password closer than the database.
I will need therapy after this. I swear.
If 'eval is evil' (as it appears in the suggested tags for this post) how can we ensure that third party code is ever trustworthy without even looking at it? This happens already with chrome extensions, or even phone apps a long time after reaching to millions of devices.11 -
Always double check the code you're sending to the teacher after finishing a school project.
I once sent them an old version of the code that had useless comments and debug messages everywhere. Some of them "politely" pointed out the fact that I really hated the subject, that it was pointless and that the assignment was way overcomplicated for first year students.1 -
Those devs that put TODO comments everywhere in code. When has anyone actually ever seen a TODO and DID it? Put the task in jira/trello/whatever and leave the future source of confusion out of the code base!3
-
Nothing like trying to understand a single 1500-line source file that implements the API usage in the frontend. Without a single comment.
No, wait. There are comments! But it's only commented-out code. Or explicit shit (like "gets the version" before a getAssetVersion function).
Functions with unused parameters? ✅
Weird var names (like "tmpX")? ✅
`console.log(var)` everywhere? ✅
Long-ass lines with 150+ chars? ✅
Duplicate code? ✅✅
Not a single interface was used so everything is var: any? ✅
Random unreadable RegEx? ✅
If-chains of 6+ more levels? ✅
Many `else if` towers instead of a switch? ✅
And did I mention it was written by a fucker who can't speak proper English so shit like visiable, cataloge and isExist is everywhere? Yeah.
Fun day at the office reading spaghetti code 🙃 -
I been looking over my profile and god it's been a while, programming as still been going on in the background but more for game mods and alikes, kind of been lazy but same time dealing with life.
I really had forgotten my passion for tech and programming it's just become a tool I know and use and I kind of feel bad for doing that. I got in to computers when I was 6 years old built my own PC our of random spare parts at 7, was teaching family members how to repair there own pcs by 9 at the age of 11 was helping with the schools computer department repair and fixing networking problems and my ideas and comments mattered.
Now I am an adult ... Sadly it seems the enjoyment of any idea is shot down with some rude remarks from another Dev, but isn't the point we all see a problem different so we all can contribute?
Like I said I never worked away from computers or programming but now I more like your little side computer repair shop I can do it, I get the job done but the passion isn't there and the end result reflects it.
I believe it's the human part what put me off not just others but myself, I used to put my heart in to my projects and when someone comes alone and rips them apart for let's say a spelling mistake what I state everywhere I am dyslexic but seems to be over looks alot. I became more stale in what I was willing to take on. My own websites now reflect this I am using crappy reinstalled software over me doing it myself.
But the passion for the idea what tech and programming never left I just hope one day soon I am enjoy it again, the wow factor is still there, god there is some talent out there and some of them people I meet before they became big but my aim was never to be come big I would be happy to be on a small project what only as a few eyes on it as long as it makes a difference and that's my problem tech like everything as become so commercial.
Even small projects are ran like a company and the wow factor is gone or the risk factor of trying a unknown way is dismissed for trying to keep face.
If I was born 20 years before right now I would be glad to slow down but I am 30+ and seen the world change so much in this last 10 years where I can do it but .... Why would I do it, when most cases it goes out of my moral ideals
I still mess around with teck, I still have Pi's kicking about and you bet your bottom Dollar I will be trying to get a Pi 5 lol
The love of tech hasn't gone but the communities I enjoyed have, I know this is a me not adapting but I don't need to adapted, I want what we do to matter to someone to make a difference, and I mean with there life's and wellbeing not there bottom line.
If you have any communities to look in to please comment below and of you was able to read this then OMG I am so sorry, I didn't proof read this or anything it was just a little rant about how I become disconnected from the world I have always found enjoyment.
I slipped away to game at late but this last few months I seen myself wanting to be apart of a project or community for tech/programming and even just be a voice helping even someone else get the answer.
I do still have hope for the geeky nerds of yester years even if we are now just a relic of the past lol
Well sorry to put anyone's eyes though this lol enjoy your rants guys and keep up what ever projects your working on.3 -
[POLL] How do you develop stuff?
1 - just write code. It doesn't need to be organized, it just need to work how you thought it would, and THEN you start organizing things, like editing/creating new files, letting things DRY, optimizing the sutff you did earlier;
OR
2 - you surgically write code, making sure you keep everything is organized from the beginning. Basically you only write when you are sure.
Or maybe it's a blend between the two or something.
I'm asking because I do like the #1 and I feel uncomfortable when people see my code when it's under development. It's a mess, there are tons of comments everywhere and a bunch of repetition. But, when I find the right stuff, I start writing modules to make my code work better, remove unnecessary things, add documentation, and so on.
My development process is not the best of the best, but I get things done with it.7 -
nothing new, just another rant about php...
php, PHP, Php, whatever is written, wherever is piled, I hate this thing, in every stack.
stuff that works only according how php itself is compiled, globals superglobals and turbo-globals everywhere, == is not transitive, comparisons are non-deterministic, ?: is freaking left associative, utility functions that returns sometimes -1, sometimes null, sometimes are void, each with different style of usage and naming, lowercase/under_score/camelCase/PascalCase, numbers are 32bit on 32bit cpus and 64bit on 64bit cpus, a ton of silent failing stuff that doesn't warn you, references are actually aliases, nothing has a determined type except references, abuse of mega-global static vars and funcs, you can cast to int in a language where int doesn't even exists, 25236 ways to import/require/include for every different subcase, @ operator, :: parsed to T_PAAMAYIM_NEKUDOTAYIM for no reason in stack traces, you don't know who can throw stuff, fatal errors are sometimes catchable according to nobody knows, closed-over vars are passed as functions unless you use &, functions calls that don't match args signature don't fail, classes are not object and you can refer them only by string name, builtin underlying types cannot be wrapped, subclasses can't override parents' private methods, no overload for equality or ordering, -1 is a valid index for array and doesn't fail, funcs are not data nor objects when clojures instead are objects, there's no way to distinguish between a random string and a function 'reference', php.ini, documentation with comments and flame wars on the side, becomes case sensitive/insensitive according to the filesystem when line break instead is determined according to php.ini, it's freaking sloooooow...
enough. i'm tired of this crap.
it's almost weekend! 🍻1 -
The Phoenix Project made me really excited about DevOps - but I see comments about it being old logic. Why isn't it used everywhere then?2