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 - "commenting code"
-
A programmer once explained Nietzsche like this:
A long time ago, god created the world, but forgot to leave a developer documentation, thus the whole world was like legacy code...
And humans are like the end user of this world, and some among them spent time studying it, using the Moral API, hoping to get a result of "http 200 ok" from our world for the peace of mind. But the true operation of this world is still yet unknown...
As time passes, humans begin to find that in Moral API, good and evil are two base classes, and all the other moral properties (like ethic, justice and stuff) are just other classes based on those two classes through multiple inheritance.
One day, when programmer Nietzsche was observing the world's runtime behavior, he came up with a question:
"Did god really use good and evil as base classes? Could it be that they are actually derived classes?"
Most of the world is currently in the favor of mankind, and god must've wrote individual user cases for it's end users, he thought.
This made Nietzsche thinking: if end users are considered into two cases: the strong and the weak, how would the world be designed base on its user story?
Let's think about the strong, they can bully the weak as they please, and there's nothing the weak can do to stop them. In this case whether the Moral API exists or not doesn't fulfill the need of the strong.
But when it comes to the weak, Nietzsche thinks that because the weak cannot fight the strong, they need to belittle bullying and praise the strong for being nice. When the weak does this, it covers their powerless state to some extent, making them look somehow equal to the strong by being capable of commenting.
God might have coded the Moral API to fit the weak's requirement, also adding some public methods for the weak to comment on the strong. If the strong takes care of the weak, they call him nice and good, if the strong bullies people, they call him bad and evil.
That's when Nietzsche realized, that good and evil are both derived classes from the weak, and the base class should be the strong and the weak.
Then he started a series of studies about the Moral API, and got some thesis that persuaded lots of other end users...7 -
Why... why the fuck do people write unit tests and then comment out the god damn fucking assertion lines....
Like what the flying fuck? Cool, we can get some code coverage marks but for fuck sake actually let your tests do their fucking job!!!
Oh, the asserts fail?
Well fucking sort that shit out instead of commenting them out.
I don't get it, if you're going to write tests, fucking test something with them, or we'd be better of without them.7 -
I love group projects.
There is no greater feeling than, after you set up the repository with the first code files, your team mate changes the indentation and commenting style in every file to his own style without even discussing the general coding style rules in the group first.
Fucking awesome start.
Go eat a sack of unwashed hobo balls you filthy cunt.3 -
Please don't comment in front of the code like this:
doSomething(); // does something
Please just stahp
Do this:
// does something
doSomething();
Much better and friendly for everyone10 -
Not commenting my code because "it's so clear what I'm doing, how could I ever forget what my own lines of code do."5
-
When my coworker doesn't want to believe his code is inconsistent, yet he changes the syntax for commenting 3 times over 10 lines.14
-
when your co-worker instead of commenting a piece of old code wraps it in:
if (false) {
...
}
Took me 2 hours to figure out why my changes weren't working.3 -
!rant
How many of you developers agree with Robert C Martin that commenting should be avoided as much as possible and that it should only arise when we fail to express ourself effectively through code.27 -
!rant
Is it just me or does being a programmer sometimes feel like being a magician. It's such a weird profession. You're living in a bubble, nothing you create is physically tangible, yet anything is possible, and there is always more learn.
Most of the time it's art. Commenting out dead or obsolete code instead of removing it just because it feels like you put a little bit of yourself into it, even though it has no use anymore.
I sometimes wonder if there is any other profession out there that makes you ride the same rollercoaster of satisfaction, frustration, glory and defeat we've all been on.3 -
Yesterday, my new (Irish) co-worker comes to my desk and asks me a question about an issue in his code.
His commenting all done in Irish.
Him: "If you want me I can translate the comments for you?"
Me: "Ní gá, is féidir liom é a léamh go foirfe." ("No need to, I can read it perfectly fine")
co-worker looking at me like: "wtf just happened?"
After a while, I spotted the issue (I noticed the expected output from one of the functions not being of the correct format - an integer instead of an array).
So I fixed it.
Next day (this morning) I came back at work, looked into my food drawer to see what I would eat for breakfast (yes, I have a drawer specifically for food, and yes, I eat breakfast at work), found a small box containing an Ulster Fry :D
Best breakfast at work in a long time :D6 -
Continue of https://devrant.com/rants/2165509/...
So, its been a week since that incident and things were uneventful.
Yesterday, the "Boss" came looking for me...I was working on some legacy code they have.
He asked, "what are you doing ?"
Me, "I am working on the extraction part for module x"
He, "Show me your code!"
Me(😓), shows him.
Then he begins..."Have you even seen production grade code ? What is this naming sense ? (I was using upper and lower camel case for methods and variables)
I said, "sir, this is a naming convention used everywhere"
He, " Why are there so many useless lines in here?"
Me, "Sir, I have been testing with different lines and commenting them out, and mostly they are documentation"
He, "We have separate docs for all, no need to waste your time writing useless things into the code"
Me, 😨, "but how can anyone use my code if I don't comment or document it ?"
He, "We don;t work like that...(basically screaming)..."If you work here you follow the rules. I don't want to hear any excuses, work like you are asked to"
Me, 😡🤯, Okay...nice.
Got up and left.
Mailed him my resignation letter, CCed it to upper management, and right now preparing for an interview on next monday.
When a tech-lead says you should not comment your codes and do not document, you know where your team and the organisation is heading.
Sometimes I wonder how this person made himself a tech-lead and how did this company survived for 7 years!!
I don't know what his problem was with me, I met him for the first time in that office only(not sure if he saw the previous post, I don't care anymore).
Well, whatever, right now I am happy that I left that firm. I wish he get what he deserves.12 -
Commenting in code isn't to remind you what you did, its to temporarily remove features your boss doesnt want today, but will tomorrow1
-
Copy paste from the internet, usually stack overflow without knowing what the fuck the lines do.
I saw this girl who was tasked with building a spring mvc application and she literally googled(yeah googled) "spring mvc web app" and copied from the first tutorial site and pasted it.
When errors showed up she copied everything from the second link and pasted it ... Wait for it... Without deleting the old copy but commenting it out so each file had 100 lines of code and 100 lines of comment9 -
Friend - could you comment your code, so I can review it pls.
Me - *comments "gets shit done" ,
"Does some shit ",
"I really don't like commenting my code "4 -
At my current project we use SVN, but today I noticed a colleague of mine uses another version of version control as well.
Example:
V1:
console.log('Hello, world!');
V2:
//console.log('Hello, world!');
document.write('Hello, World!');
V3:
//console.log('Hello, world!');
window.alert('Hello, world!');
//document.write('Hello, World!');
Every singletime Ive to remove 40 lines of comments before Im able to follow the code and refactor it.2 -
Day 2 of my non tech manager reviewing PRs in order to “speed up QA” he’s taken to commenting on every PR with. “I don’t understand how this code works, we need to setup a meeting for you to explain it to me”. Amazing.6
-
How come it is so hard to find good developers. Have been doing interviews for a couple of weeks now (for a senior PHP developer role).
First round is me talking about the function and company, asking questions about candidates experience, wishes and we usually end in some tech conversations. Most of the resumes I got are pretty fucking good. I mean, experience with low-level languages, experience with the problems we need to solve here, contributions to open-source, experience in R and MathLab etc etc. On paper they look perfect.
For the second round I give them an assessment which they can do at home on their own machine in their own time. It's not a hard one, just some mathmatical problems they need to solve. A quick google GIVES the answer (no joke!!). But that's OK, I look at their code cleanliness, proper use of commenting so I can determine if they are solo-developers or fit good in a team and if they abstract repeated functions and make sure that they take their work seriously, you know the drill.
It pisses me off that I get BROKEN FUCKING CODE WHICH DOES NOT EVEN RUN and that I get code back which I look at and makes me vomit instantly, I mean, DO YOU EVEN TAKE YOUR PROFESSION SERIOUS? How dare you to ask for 50k the year, a lease-car, extra bonusses AND YOUR FUCKING CODE SPITS OUT COMPLETLY WRONG ANSWERS OR DOES NOT EVEN RUN WHAT THE FUCK DUDE GO BACK TO FROM WHICH EVER HOLE YOU CRAWLED OUT AND STOP WASTING OTHER PEOPLES TIME WITH YOUR FUCKING INCOMPENTENCE...19 -
I used vs code for a solid 3 years, but my friend has been using notepad. No color coding. No dark theme. No auto commenting. No suggestions. Just plain black text in a white box.
Like a psychopath.5 -
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 -
Learned a new word here in devRant: sleep code.
Code that's is written where you hardly can get an eye open.
Crazy shit 😵
Edit: Yeah, I count sleep code as one word (or phrase if this will satisfy you before commenting)11 -
The Return of Mr. Gitmaster:
So there is this colleague I already ranted about several times. After my previous team lead had confronted him about not doing much work, there was some irritation because he showed not up at work, but it turned out the external training he did was just a week earlier. Then he was ill a week, another week vacation so we didn't see him much. Not that his pre- or absence makes much difference to our repo: When his and my team lead looked at his commits of the past three months they found like the one copy-pasted HTML-form that wouldn't even show.
Fast forward to now, where we have a new team lead and we were going to lunch with Mr. gitmaster. So we got some more hero stories from the great work he was doing in the previous company. How he was graphically monitoring the heap fragmentation that stupid glibc was causing to their search engine, and how much better it became with tcmalloc.
I still don't understand how he bridges that cognitive dissonance from all the superior tech knowledge he displays to not actually writing any code at all. Not that I would not have experienced some states of feeling low, in paralysis unable to write a single line of code... but he seems so full of confidence, always commenting how trivial and easy all these tasks would be, as if it's all so lightyears below his abilities. Maybe he should just become a manager - but not mine. -
Architects at the company I'm at rant about, "We don't believe in commenting our code. Good code is self documenting". Nothing about our codebase is "self documenting" FML6
-
Back then when I was working on a website logic, I didn't want to comment my code. Despite that, I wrote some things which were obvious and I thought it would be funny to explain obvious things in code. I made a joke out of commenting.
Recently I needed to use a part of the code for a different project and the comments were exceptionally helpful and I would be lost without it.
So, kids, comment your code!14 -
Doing and Code Review today... Not sure if this guy has really bad OCD, gets bored, or gets stuck and starts commenting the shit of things...
I'm not sure if I like it or hate it... typically "Good code should be self documenting" but this actually might be acceptable... code on the left, 10K foot view on the right?4 -
My internship company does not believe in the concept of 'commenting'. They just tell me: "Ahh just write readable code!
Yeah that's cool until I need to read out thousands of lines of javascript without a single comment!5 -
I just started commenting my code. I know, its horrible i havent done this earlier..
I actually enjoy it now, i can express rage, write small jokes for myself to read next time i gotta edit the code, or just remind myself how fucking stupid i used to be11 -
In only I were 1.15 times faster or had better planning (why didn’t I use the Saturday Sunday at the end of the first week 🤦🏼♂️), things would’ve happened differently. I think I’m becoming stupid and my tolerance levels are going down too.
So this happened a while back ..
I was given a code base which didn’t have any changes in the last two years and I was asked to add a feature to this. This was my first task in this new group I was part of. I had two weeks to do this starting on a Monday.
Partway through implementation I realised that the code base is a pile of shit and I wasn’t doing myself or anyone else any favours by shitting on it.
It’s Wednesday. I’ve dealt with many other codebases before but the urge to rewrite this particular one was just unlike anything else. And so I started changing code and before I realised, I modified almost all the important files.
I got sick of this mixed up code and started a rewrite from scratch. It was Friday and I finally had just the basic mechanics of the whole thing working. Now I needed to add all the functionalities and also my new feature.
It should be noted that at no point did I tell any of the superiors I was doing this fearing what they might say and also fearing going back to adding shit to shit.
By the end of the second week, the rewrite was complete and I only had the new feature to add. The rewrite was significantly smaller, compartmentalised and well commented because I did the bloody commenting (where it was not obvious from the code). So on Friday, I was asked about the progress and I told them that it needed some more work and that I need a couple more days. And I got shit for it. I was told it was a mistake giving this task to me and that I am not competent enough. One of the superiors told the other superior about perhaps giving me something more suited to my level. To be fair to them, they were expecting the work in the two weeks to be for the new feature.
And in two days’ time, on Monday (I worked on Saturday and half of Sunday), I finished the whole thing and gave it to them. New feature was working. And I still did not tell them what I did. The tool worked fine so they had no idea what happened because this project had no version control and I pointed them to a new directory with the new code with a first commit.3 -
how would you spell the sound of a fart? I really need this for commenting a block of code in PHP16
-
i *hate* when someone changes my code with out doing any of: asking first || commenting changes || telling me afterward.4
-
Finnegan | devRant Clone
Tech stack: Python, aiohttp.
Some of the rants from devRant were taken.
It took her 8 hours.
Finnegan supports: signing up, logging in, ranting, commenting.
Demo: https://2149-2a02-a420-28-a787-9-3da3-b9be-9dba.ngrok-free.app/...
Source code: https://github.com/retoor1337/...
---
🔄 Reposted from https://kbin.melroy.org/m/drbboard/...
🗳️ Vote in the comments!18 -
I just finished designing an entire asset management pipeline and christ on a fucking pogo stick, if it isn't convoluted.
Theres a lot of game engines out there, but all of them do it a little different. They all tackle a slightly different problem, without even realizing it.
1. asset management
2. asset change management
3. behavior change management
4. data management
5. combinatorial design management.
6. Combinatorial Behavior management
7. Feature completion
ASSET MANAGEMENT is exactly what it says on the tin.
ASSET CHANGE management can be thought of handling the import, export, formatting, platform specific packing, and versioning (including forking) of an asset.
BEHAVIORAL CHANGE management is a subset of asset management, because code is a subset of assets (depending on how you define 'assets'). The oldest known example of this is commenting and uncommenting code.
Or worse, printf debugging.
This can be file versioning, basic undo services, graph management of forks and mergers, toggles for features or modules, etc.
DATA management is about anything that doesn't fall into the other categories, everything from mission text to npc dialogues, quests, location names, item stats, the works. Anything you'd be tempted to put in a database, falls under this category. Haven't yet seen many engines offer this as an explicit built in tool as of yet, because the other problems are non-trivial as is, so this is a bit of low hanging fruit that gets handled by external tools, or loaded from formats as simple as json.
COMBINATORIAL DESIGN management is the idea of prefabbing, blueprints of broader object design using nested prototypes of existing game objects, to create more complex, reusable set pieces. Unity did this well. GM does this in part.
COMBINATORIAL BEHAVIOR management is entity-component systems, plus tooling to make it easy to add, remove, and configure components and their values on entity blueprints, also not uncommon. Both stencyl and unity do this. GM has a precursor to this in the form of configurable fields, but these fields are not based on component scripts attached to objects.
FEATURE COMPLETION is that set of gameplay mechanics or styles of design that an engine naturally makes easier to include or build in a game.
I don't think I'm aiming for all that, but I think at minimum a good engine has to do asset management, behavioral change management, prefabs, and entity-component systems with management tools for that. And ideally, asset change management.8 -
Working for a company with solid procedures really makes me appreciate how important they are. Knowing someone will be scanning through my pull request made me *really think* about appropriate layout and commenting. Before I could submit any old code and the other programmer wouldn't give a monkeys.
I guess that's a poor reflection on my performance but, I'm working on it -
During my job hunt as a Java Developer looking for job while on a job just like what every other developers do, around twenty twelve i got an invite from one of the companies i applied for, i wasn't expecting a test though but i was prepared for it anyway. The test proceeds, i and the other partakers were given separate systems and spread out across the room like teams in a football match, i don't know if they planned on making us nervous, it seemed so very awkward. First question was *Who originally developed Java (like seriously???? i almost cummed!) i skipped... skip skip skip. After so many skipping minutes i then arrived at that question ***Check string for palindrome, hmmm i then noticed my system was connected to an open wifi (don't know if it was a dumb mistake or on purpose). I definitely googled and faithful loving heavens i found the website were they got all 21 questions with their answers from (https://simpleprogrammer.com/progra...). I answered all questions using different approach, applied xml commenting, state possibility and outcome of each code block, added wiki references, i flawed the test. Few days later i received a call for final interview, got there and the interviewer was like "Do you teach/lecture on coding or something? cus you really did pretty good on the test the other day", I felt like a god and was like "no, i don't. just did what i had to do". Seems like he loved my reply and i got the job without a second question. The open network is still a mystery to me till date.6
-
<insert obligatory "long time lurker" statement here>
Started a role about 6 months ago. I'm the sole IT programmer. A bit of the mess I inherited...
- 100+ stand-alone applications/tools (luckily most of them aren't too big).
- No documentation.
- Some applications' only copy of the code exists in production.
- We only have production.
- A single file consisting of 30K+ lines of VB. Little to no comments. The one comment at the top says to keep old code by commenting it out and state what you changed.
- Previous devs didn't like foreign keys.
- No. Fucking. Version. Control. At. All.
- And so much more...
Luckily I was hired due to my experience so I could fix all these problems. Its actually a really great job.7 -
My dev Goals:
- Write better code commenting more.
- Create my first Open Source Project and publish it on GitHub.
- Improve my design skills.1 -
Who said CSS/Sass is not worth commenting? I'm fed up with those devs not commenting a single thing in their code. CSS/Sass might seem simple but there's many cases where a single line of comments would save you 10mins, or more... FFS!4
-
So today I started working on a code base someone else wrote and stubled across this and thought it was worth sharing.
Why somebody would be doing something like this is beyond my understanding.
Not commenting on the empty catch block keep in mind the whole snippet has nothing to do with rest of the code...
WHY!!!!!?!?!?!?!13 -
On thursday i spent 5 hours on a function. It was about to include in production build which was due on friday.
On friday PM informed me that we are dropping this function from application. It will not be included in any build now. So just prepare the build without that function.
So, instead of commenting it out or make it hidden i deleted the source code for the function entirely.
Today morning it has been decided that we are including that function in our next build.
I am fucked. I am very bad Developer i guess.. i am laughing on my mistake. It will not happen again though.9 -
Please don't tell me the mobile app is a priority when the whole IT infrastructure has been handled by fuckface interns who had not a single fuck to give about documentation or commenting their shitty code that strangely reminds me of a drunken Jenga game.
-
I just used Visual studio c++ for the first time. In comparison to intellij it just sucks, so many features are missing, im fighting with the editor all the time.. For example Code completion, visual studio suggests me the method name, i press enter, new line inserted, wtf? Apparently only tab is working here, next try, visual studio suggests method, I click tab, method name inserted but whithout brackets, omg. The standard shortcut for commenting out code is CTRL+K followed by CTRL+C, if you want to use the code again you need to use CTRL+K followed by CTRL+U. HOW STUPID IS THIS? Refactoring of code, e.g. Method names also sucks...5
-
Why commenting is important?
If you are commenting a variable or method and you can't find the right way of explaining it, there's a problem with your code6 -
Why is there always one asshole!
New job just a month in, had a meeting where we could bring up improvements and put them on cards.
I brought up the idea of using slack so we could collaborate better or maybe a collab space. We all have our own offices or share with high walls.
The guy running the meeting has the same title as me said we never had that before, are you unhappy with yiur onboarding?
Slack or a messaging app is industry standard for even none tech companies. I was polite and said it was just a suggestion and it might make it easier to get help for the new people if there is a group chat.
Also brought up using a formatting standard so code reviews are spent commenting on spacing. I said we could you prettier to implement that and just pick a standard.
He said that was an issue because people were not paying attention before they pushed the code.
I am sorry I am new so I am rewriting and rewriting code all the time. I was to format on save and not spend time fucking formatting!
I could use a package before since it I formatted it would look like a bunch of fucking changes in git.
Why make things harder? Part of the meeting was how to get code done and PR’ed faster so it gets to the testers. Autoformatting shit would help.6 -
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 -
FFFUUUUCCCCCKKKKKIIIINNNNGGGG GGGGGGGOOOOOOOOOOOGGGGGGGGGGGGGGGGGLLLLLLLLLLLLLEEEEEEEEEEEEEEEE.......
Spent 2 days trying to figure out why the template app didn't work, debugging and commenting out code....
The solution was somehow the XML elements need to be flipped... AKA... the template ***written by a Google monkey*** is WRONG!!!!
https://stackoverflow.com/questions...6 -
If you have any project (personal or not, doesn't matter) that does not have proper code comments and documentation and you don't want to make one because of the effort (maybe even "wasted" effort), think again. When commenting on a wall of code to say what it does, you may find a better way of doing what you have to do, possibly increasing performance, or improving security.
I have been able to do better input sanitization for a method on a personal project of mine because of this.
Don't use the amount of effort for proper documentation as an excuse not to make one.2 -
"Multiline strings can be used as block comments in Python." Except in some places, where your code will pretty much blow up without any errors, because instead of commenting out a portion of an array, you've just added one big string element. And there's no other way to make block comments. And after actually commenting out every single line, your version control won't know how to merge it anymore, because there are now 100 changed lines instead of 2.6
-
Dr. Robert Ford is that dev who made himself indispensable to the organisation by deliberately not commenting his code. He operated under the notion of those senior developers that are the physical manifestation of the documentation gatekeeping the project1
-
v0.0005a (alpha)
- class support added to lua thanks to yonaba.
- rkUIs class created
- new panel class
- added drawing code for panel
- fixed bug where some sides of the UI's border were failing to drawing (line rendering quark)
v0.0014a (alpha) 11.30.2023 (~2 hours)
- successfully retrieving basic data from save folder, load text into lua from files
- added 'props' property to Entity class
- added a props table to control what gets serialized and what doesn't
- added a save() base method for instances (has to be overridden to be useful beyond the basics)
- moved the lume.serialize() call into the :save() method on the base entity class itself
- serialized and successfully saved an entities property table.
- fixed deserializion bugs involving wrong indexes (savedata[1] not savedata[2])
- moved deserialization from temp code, into line loading loop itself (assuming each item is on one line)
- deser'd test data, and init()'d new player Entity using the freshly-loaded data, and displayed the entity sprite
All in all not a bad session. Understanding filing handling and how to interact with the directory system was the biggest hurdle I was worried about for building my tools.
Next steps will be defining some basic UI elements (with overridable draw code), and then loading and initializing the UI from lua or json.
New projects can be set as subfolders folders in appdata, using 'Setidentity("appname/projectname") to keep things clean.
I'm not even dreading writing basic syntax highlighting!
Idea is to dogfood the whole process. UI is in-engine rendered just like you might see with godot, unity, or gamemaker, that way I have maximum flexibility to style it the way I want. I'm familiar enough with constructing from polygons, on top of stenciling, on top of nine-slicing, on top of existing tweening and special effects, that I can achieve exactly what I want.
Idea is to build a really well managed asset pipeline. Stencyl, as 'crappy' as it appeared, and 'for education' was a master class in how to do things the correct way, it was just horribly bloated while doing it.
Logical tilesets that you import, can rearrange through drag-n-drop, assign custom tile shapes to, physics materials, collisions groups, name, add tag data to, all in one editor? Yes please.
Every other 2D editor is basic-bitch, has you importing images, and at most generates different scales and does the slicing for you.
Code editor? Everything behavior was in a component, with custom fields. All your code goes into a list of events, which you can toggle on and off with a proper toggle button, so you can explicitly experiment, instead of commenting shit out (yes git is better, but we're talking solo amateurs here, they're not gonna be using git out the gate unless they already know what they're doing).
Components all have an image assignable to identify them, along with a description field, and they're arranged in a 2d grid for easy browsing, copying, modifying.
The physics shape editor, the animation editor, the map editor, all of it was so bare bones and yet had things others didn't.
I want that, except without the historic ties to flash, without the overhead of java, and with sexier fucking in-engine rendering of the UI and support for modding and in-engine custom tools.
Not really doing it for anyone except myself, and doubt I'll get very far, but since I dropped looking for easy solutions, I've just been powering through all the areas I don't understand and doing the work.
I rediscovered my love of programming after 3-4 years of learning to hate it, and things are looking up.2 -
Thank God for devrant. I am literarily fuming right now. Just removed some redundant (or so it seems ) code last week and already suffering the consequencies. Crazy commenting screwed me up really bad.3
-
// Hairy ass complex logic
if(1 == 2) { ... }
If only the programming language had a built-in syntax for commenting out code, you fucking cumdumpster idiot.1 -
"The Perils of Overzealous Code Commenting"
In the land of code, where bugs roam free,
There lived a developer, a comment enthusiast, you see.
Their code was a masterpiece, a work of art,
But the comments? Oh, they took it too far!
For every line of code, a comment did appear,
Explaining the obvious with a touch of fear.
Their obsession with comments, though well-intentioned,
Left fellow developers scratching their heads, bewildered and pensioned.5 -
Things I learned in this 2 month training in an IT company ;
- the way @marcerisson wanted me and my group project team to use Git (and kept yelling at us about ) is actually the proper, professional way of using Git
- there is a difference between an MVC model and a fucking pack of overcomplicated spaghetti code
- commenting your code and naming your variables properly IS IMPORTANT especially when another dev might read it 15 years later (i see you Mr I Name All my Variables With the Name Of the Function and A Number)
- « if it worls it ain’t stupid » also apply in a professional area
- where ´s my fucking rubber duck2 -
Today a senior developer and a colleague started looking into my code reviews and started commenting best practices that were never used in the team.
Got my chance back at the senior developer's code when he raised a code review, which had none of the best practices.
Gave back a good set of review comments to him :D
Karma is a boomerang :)2 -
So my code wasn't working and couldn't understand why. I had a statement like someVar == 'A' but when I wrote the letter A I didn't change my keyboard language from Greek to English and I didn't notice because the letters are the same in both languages. Spent like 8 hours commenting out and debugging code just to re-write all the code cause I thought the compiler is broken or I am losing my mind....1
-
It depends, really. Sometimes it's a spontaneous urge, sometimes it's me drinking and coding whilst doing so.
Sometimes it's a lot of coffee as mentioned in another post commenting on this week's topic.
Regarding the drinking: for some reason my code works and I write more in less time.
Un-fucking-believeable.2 -
Not commenting my code just to return 2 weeks later to wonder what kind of special asshole wrote the code. And what the heck it does.1
-
!rant
In my team, I am not allowed to use ANY comments except for the really lengthy classes in the backend.
Thus, the code of the whole project (a complex webapp, consisting of 20-something Django projects and various services) is basically undocumented.
The slogan sounds "good code doesn't need commenting".
Seriously, fuck this and all of the times I scratched my head wondering "what the fuck is this spaghetti about".
Have any of you encountered something like this? Usually people don't want to comment, I would do it gladly but can't even make a small inline about what complex method is exactly doing :P3 -
A lecturer just told a class of final year developers approx 50 people that commenting our code should be banned and we shouldn't write comments within our code in case we cause confusion2
-
Laziest thing is to do is commenting out the buggy code in minified JS rather than actually fixing3
-
ProTip :: Avoid code conflicts by commenting out Git header references. Never worry about "resolutions" again
-
coding all day long and then realising that you haven't commented anything...
after all, deciding not to comment your code because you are lazy and sure that you will know what you did in every single line of code when you were writing it... and then 2-3 month later blaming yourself for not commenting when you have to fix bugs or rewrite the code! damn! -
From log debug to taking care of a whole software written by a guy who does not work in the company and did not spend any time commenting the freaking code.
The best part? The code is not finished and guys above you do not decide what needs to be done but expect stuff from you. -
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
-
To all devs who don't comment their Code
WHO THE FUCK SHOULD KNOW WHAT YOU INTENDED WITH YOUR FUCKING PIECE OF CODE
Well - I am one of you. I'm realy lazy in commenting. But it is very hard to understand a piece of code if you are not used to a complex architecture.
If there will ever be the chance of having another dev seeing your Code:
COMMENT IT1 -
How much of development is commenting out sections of code because the client hasn't sent you the data and next release uncommenting it?5
-
I can't delete old useless code, I am afraid of deleting it and I always end up commenting it as if I am giving it a chance to prove itself. #rant3
-
A guy on YouTube posted in a GraphQL tutorial about his CSS issue. He asked about why a certain background for a website that he is creating only looks good on a phone but not on his desktop. I asked him to put the code on either jsfiddle or codepen but he still put the code in the comments, only the CSS part. I kept telling him to place it on those two sites, eventually he did. I looked at the pen and guess what? The picture is a portrait one... He wants to use CSS to make it look good, I don't know how he is gonna achieve that but good luck. I am done with him, stopped commenting.3
-
My team has a pathological need to NOT comment! What the fuck!! I think it is because a lot of it is actually magic, so they don't want to admit ignorance. My code is full of "not sure why it works, but breaks when removed." Chunks. That way, when debugging, I actually know what is going on????
I am currently going through and editing someone else's code, and I see code that has no clear purpose, even when removed! Does it do something I don't see??? Does it do nothing?? Fuck! -
Oh the joy of multi-site working and design reviews in bigger corporations...
I try to propose if we could do it on-line with BitBucket commenting etc. Just put your comments there, we discuss it there, each in our own time, and get things closed.
But no. It's nicer to arrange 2-3h conf calls. So that we can really discuss items (and the reviewers don't have to do anything before the call). Nothing can be done beforehand. And the reviewers get to comment not only on design matters, but on system level things too. Like "I wonder if this would be better in place X". Well sure, maybe, but that's system level decision and would require architects etc. And all that work was done 2 years ago, we're supposed to now just check the source code (which you guys wanted me to change).
Ok, so I will arrange a conf call. Our time zones are not the same, so one guy is coming to the office when another is almost leaving. One wants to have Wednesdays meeting free. One has lunch at 11, another at 13. For fucks sake. Some guys have filled their calendar with meetings, most of them which they will not attend anyway, but Outlook shows them as "reserved".
So I spend my day trying to find a free spot that everyone could join. Half of the guys won't read the code and won't give any comments, but still need to be there. And then there are those comments saying "I'd like this variable name to be different" and "it would be cleaner if this was done like I do". Same people produce unreadable mess themselves, but somehow always manage to dodge all reviews of their own stuff. -
I've always found commenting my code tedious, is it better to comment as I code or wait until its stable and then comment all in one go at the end?9
-
When you're the only developer in a group who uses self-commenting code... or comments for that matter.
-
Commenting the code at the end of the day. Not while working on them. Usually end up having comments of create action on update action.
-
Productivity hack - For me, it’s mostly a single word - planning. I wasn’t always good at it, definitely not yet a “master” of it, but breaking that proverbial elephant up into smaller pieces, and organizing a plan of action for dealing with them is the #1 productivity “hack” for me. Sorry that it’s not an actual shortcut, or anything…I personally don’t believe in those anymore. Complementary habits to this are thoroughly commenting code, having descriptive commit messages, file names, and variable names, maintaining documentation. Use that Readme.md. This is true of any project, even if I’m the only developer - never underestimate your own ability to totally forget shit.1
-
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! -
Sometimes i feel really messy in my code and unorganized.
after a while i regret what i did and in order to fix this mess i re write the class all over again or i end in an endless errors which is time consuming.
So what's the best way to write a clean code in your opinion other than commenting and identation1 -
I just started studying and commenting did not seem so important to me because we've only written simple programs so far. Recently, a friend showed me his book and a story that was in there.
They bought a code and all the names were in Hebrew. Not so bad, if not all comments would be hebrew too. Wtf!
Now I know why commenting is important.1 -
Making classes and functions without commenting what I expect each class and function to do. Which means that my classes and functions have really long names.
Example Code:
Class ReallySpecificClassToWorkWithThisFramework { ...
public void DoThisActionInTheFramework (obj TheKeyToTheWholeFunction) { ... }
} -
My programming class kinda sucked. Here's why.
1. They taught C++. To students who had never seen a line of code in their lives. The language with 90+ keywords.
2. The teacher. We had to use switch statements to do something. It took around 300 loc. I used an array and shortened it to 5. He took some points away for not doing it correct. IT LITERALLY WORKS THE SAME AND IS SHORTER. This was not the first time I had shortened something/made it more readable and been docked points on the assignment.
3. Commenting. He told us to comment as much as possible, which is not correct. Comment what needs commenting. Not everything.
4. The compiler. We worked on windows with an online compiler. He decided teaching us to set up a compiler was too hard. We used onlinegdb, which isn't inherently bad. However, onlinegdb is based on Linux. He compiled our programs with a windows compiler.
Maybe these are just problems because I've programmed before that, but I still think they are red flags. What do you think?3 -
Why in all fucks would you NOT preconfigure your language client BUT provide a shitload of highly biased default shortcuts just IN CASE some sorry soul took time to preconfigure one.
I'ma be totally honest here, Neovim has lost its way. Every single day I pick it up there's a fuckton of shitty new default bindings...
But that's not the worst of it
You see, they've cramming all sorts of shitty code in there. Like this one default commenting plugin... It does in 600 lines what my setup does in 50. Why? Because, while mine uses the lpeg lib maintainers decided to cram into the editor, the other does a fuckton of hacks so fucked that refactoring is impossible, impossível! Despicable.
Now, their C codebase... Ok, ok arena beats vanilla malloc, alright, kudos to that, BUT refactoring out that old fart of quasillions of legacy C? MADNESS! They should be focused on adding built-in auto completion??? Well-defined syntax highlighting conventions? A FUCKING FUZZY PICKER for fucksakes!! But, oh no, we've got better things to do like FUCKING THE USER IN THEIR ASSSSSSS
--
DIS-FUCKINGTRESSED here
FUUUUUUUUUCKKKKKKKKKKK6 -
It's always the same mistake I do: writing bad words as variables or in comments. NEVER DO IT YOU WILL ALWAYS REGRET IT2
-
Is it better if my code has 0 comments or 9999999999999 comments as in, literally commenting every single line of code, explaining exactly what the variable is used for, method etc?11
-
My commenting has really gotten a lot better since Github Copilot.
# do my code like this
...code
# and then also do this with that
...lmfao
🤣🤣🤣🤣🤣🤣🤣🤣2 -
Learn to comment as part of writing your code.
Its tough to pick up afterwards; my current workflow is to write all my code for a day then start commenting for the last half hour of the day. I have shame.