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 - "comment"
-
If you are reading this, I want you to know that I am probably on some kind of FBI watchlist because I googled "How to kill all children while leaving the parent alive". So yeah, Linux is brutal.7
-
Filling a form :
Normal Person
Name: Jim Jennings
Comment: Nice Post
Developer
Name: asfsafsadsa
Comment: asfsafsadsa dsad sdfs fa43 -
Only God and I knew what I was doing, writing uncommented code in C a year ago.
Now, only God knows.2 -
This is what I have to deal with right now... 🙂🔫
Why?
Why would you not comment or name your variables so someone else can understand wtf is going on here?
Why!?16 -
So my brother had a school project for which he got an 9. I looked at this code and saw this comment. I laughed so hard. 😂23
-
When you see a comment like this in your codebase:
// I don't know what it does, but touching it will break it!4 -
I remember seeing a funny comment, but then they put, “Edit: Thanks for the likes!” Which then makes the comment unfunny9
-
Finally solved the mystery, why / and * are together on my keyboard so that there is no problem for me to use single line comment and multi-line comment.7
-
JuniorDev: <<moves bug ticket to 'done'>>
FullStackClown: Ah nice, let's see what they've written here as to what the problem was <<reads comment in ticket>>
JuniorDev's Comment: "👍"
FullStackClown: 🤦♂️16 -
Fuck the way comments work in xml. I want to write a 2 word comment but before that I apparently have to make an ascii art mona lisa. Infront of and after the comment.5
-
A badass pull request review comment: 'A wise man can learn more from a foolish question than a fool can learn from a wise answer.'2
-
Found this on a client's js code
// They forced me to write this code.
// Prepare yourself.
I found out later that month what that dev truly means2 -
A list of hilarious comment in code:
http://stackoverflow.com/questions/...
One that I liked in particular:2 -
When starting a project at work:
My name everywhere. Every file, every change-list I proudly put my name to prove my skills.
Program goes for validation:
Thousands of bugs.
Realize that I've written shit code. Slowly removing my names from all over the code. -
Getting ready for production.
Search: console.log
Replace: //console.log
Search: ////console.log
Replace: //console.log
...
Aaaaaand we're good.8 -
Did anybody else know that putting comments in your HTML creates an EMPTY TEXT NODE IN THE DOM?
REAL helpful information when you have to GATHER EVERY ELEMENT WITH TEXT INSIDE OF IT!
WHY WOULD HTML EVEN BE LIKE THIS? IT'S A COMMENT! WHY DOES IT HAVE ANY EFFECT, even if it's minimal, ON THE DOM WHATSOEVER, THIS DOESN'T MAKE SENSE!4 -
*Me seeing a good rant on devRant.
Wow I have a good thoughts I should comment on it..
*Open Rant, 76 comments (started to be related to the content then won't anymore, jokes and internal jokes)
Oh shit, it'll be useless.. *continue scrolling3 -
Code comment rant of the day... fcking excel just cost me over half an hour to fix the fking formatting...1
-
In order for the program to run smoothly, it is often necessary to add some comments to the code comments...
/***
* ░░░░░░░░░░░░░░░░░░░░░░▄░░
* ░░░░░░░░░▐█░░░░░░░░░▄▀▒▌░
* ░░░░░░░░▐▀▒█░░░░░░▄▀▒▒▒▐
* ░░░░░░░▐▄▀▒▒▀▀▀▄▄▀▒▒▒▒▒▐
* ░░░░░▄▄▀▒░▒▒▒▒▒▒▒█▒▒▄█▒▐
* ░░░▄▀▒▒▒░░░▒▒▒░░▒▒▀██▀▒▌
* ░░▐▒▒▒▄▄▒▒▒▒░░░▒▒▒▒▒▀▄▒▒
* ░░▌░░▌█▀▒▒▒▒▒▄▀█▄▒▒▒▒█▒▐
* ░▐░░░▒▒▒▒▒▒▒▒▌██▀▒▒░▒▒▀▄
* ░▌░▒▄██▄▒▒▒▒▒▒▒▒▒░░░▒▒▒▒
* ▀▒▀▐▄█▄█▌▄░▀▒▒░░░░░░▒▒▒
*/9 -
I once saw this comment inside two embedded empty loop :
// WHY, OH GOD WHY!
Turns out somebody deleted the content but not the loop. The next dev added the comment but kept the loop. -
Just found this comment in some code I wrote a few months ago... don't think I've ever been more honest!5
-
!rant
In javaScript there are three ways to interpret comments (this also works the same way in many other languages):
// This is a comment :)
/* This is also a comment :)) */
try {
This is the third comment :)))
}catch(){}4 -
University, Italy
We have sent our code to the professor for correction.
Professor : Who wrote the code with comments in english?
Proud student : me !
Professor : you failed to write the algorithms, and also made mistakes with a lot of English words.3 -
I regret commenting on a WordPress blog using my full name. Although there was nothing stupid on what I wrote, I just hate it that I googled my name and it showed. I just want to delete my useless information / myself on the internet.
Never will this happen again.10 -
Why is it so hard to build reputation on stackoverflow?? Can't upvote, can't comment til I get 50 reputation, can't ask for question clarification so I can answer a question except in a comment...6
-
When I use devRant in the browser, want to post a comment and click right next to the post button accidently, the comment text field thingy is empty after re-clicking the 'add comment' button. Annoying as hell when you just wrote a 800 character comment! @dfox @trogus5
-
I'm a contractor at a product company and today I had the pleasure of working with some jQuery.
A function needed to be called before another function, hard work right?
So I moved the call to the function 3 rows higher, checked it in, set the task as ready for test and started to look for other tasks.
Within a couple of minutes I get a direct message from another dev, let's call him Steve.
Steve wanted me to set the task to ready for code review instead of test, so I did just that and tried to move on.
Some minute or two later Steve contacts me again:
"It would be great if you'd move the comment so it'd be over the call to the function"
Well, I'm not one of those who likes comments... If you need a comment, it's probably not good/readable code. In some cases sure, it might be a complex block coming up.
Sorry, lost my train of thought.
I answered Steve : "Are you sure, I could just remove it instead?"
(for readability S will be Steve and M will be me)
S: Well, it's always good to have comments
M: In this case I think it will be alright.
S: But it's nice to see what the function is doing.
M: I'll do it if you really want me to.
S: It's better to have the comment than to not have it and needing it.
M: Okay then
The name of the function : LoadOrganizationTree()
And this is the comment :
//Load organization tree6 -
There is this abstract class with a single public method in it.
Above it a comment, change back to protected ASAP.
That comment is from 20131 -
Manager : what is "looks good" in code review comment??? You have to be more detailed.
Me in next code review : It is not aesthetically pleasing, but it gets the job done. -
Here is another rather big example of how C++ is WAY slower than assembler (picture)
Sure - std::copy is convenient
but asm is just way faster.
This code should be compatible with EVERY x86_64 CPU.
I even do duffs device without having the loop:
the loop happens in the rep opcode which allows for prefetching (meaning that it doesnt destroy the prefetch queue and can even allow for preprocessing).
BTW: for those who commented on my comment porn last time: I made sure to satisfy your cravings ;-)
To those who can't make sense of my command line:
C++ 1m24s
ASM 19s
To those who tell me to call clang with -o<something>:
1) clang removes the call to copy on o3 or o2
2) the result isnt better in o1 (well... one second but that might be due to so many other things, and even if... one second isn't that much)25 -
A colleague had to show up for a demo in 10 minutes, and urgently needed to fix some CSS.
I told her the right way would take more than 10 minutes. The quick and dirty way was to add an `!important`.
I made her write a comment:
`// TODO: Fix this hack made for the demo dated blah blah`4 -
REAL Programmers Don't //COMMENT their </CODE>.
If it was HARD to WRITE
It Should be HARD to UNDERSTAND
Comment if you "Agreed"8 -
*Writes something I think is clever
*Write like a 3 sentence comment explaining why it's clever.
*Smugly run.
*Doesn't work.
*Quietly erase line and comment.
*Repeat -
Comment a 1 if you’re a web dev.
Comment a 2 if you’re a game dev.
Comment a 3 if you’re a data scientist.
Comment a 4 if you’re in cyber security.
Comment a 5 if you’re in IT.
Comment a 6 if you don’t fit any of the above categories and you code only in PHP and refuse to learn any other language because you think PHP is the future.50 -
HOW. IN THE WORLD. COULD IT BE SO DIFFICULT TO COMMENT THE CODE I WRITE MYSELF ?
After my first project (you know, the "Working project I made for fun long ago" code everyone did once, but when you look at it again it looks like sorcery and there's no way to understand it ?), I decided that I'd comment almost everything I'd do... But...
When I begin a project, it's fiiiine and I do my comments the way they should be... AND THEN, WHEN DIFFICULTIES ARRIVES AND I START TO BE TIRED (ie : always) THEY START TO INCLUDE INSULTS OR WEIRD JOKES ABOUT THE PROGRAMMING LANGUAGE, MOVIES REFERENCES, AND SOMETIMES THEIR LANGUAGE VARIES. (Like, that project you're doing in English and suddenly there's a comment written in French in the middle of that)
Soo, yeah, even if I do comment my shit now, it isn't more helpful, lol. Maybe I should listen to relaxing music when I code err.
Oh, comments. Damn comments. Someday I'll do those correctly. Maybe.8 -
Which one's your favourite IDE 😋?
Intellj vs Eclipse vs Netbeans vs Xcode vs other?😏
Mine is Intellij.23 -
The "New comments on a rant you commented on" notification really shouldn't come up if the one new comment posted mentions you, since you get a "x mentioned you in a comment!" notification too.3
-
!metarant
Why do the notifications say "<insert your name here> +1'd your (Rant||Comment)" when it should say "++'d your (Rant||Comment)". 😜6 -
Teacher in college:"Comment EVERYTHING"
Lead dev doing my pull request:"Why is there a comment in your commit!?"4 -
😂😂😂 Folks, please comment away the ways this is a superbad idea...
It might be a good one..
But comment away on its shittyness all the same16 -
Found this comment in a class I visited today after a few months of writing it.
//todo: Fix this fucking POS hack
I have no idea what POS refers to anymore. FML.4 -
Sometimes when I comment on a public post, some people start replying by typing paragraphs after paragraphs just to counter my point. I wait for some time and then... I delete my comment.4
-
When a user deletes a comment, it would be more ideal if the comment was tagged *deleted rather than entirely removing it. Sometimes this makes other people's comment sound out of context whereas they where referring to a previously existing comment.25
-
Let’s make statistics about from where are the most people out here.
boolean added = false
for (Comment comment: rant.comments) {
if (comment.text.contains(yourHomeland)){
comment.upvote();
added = true;
break;
}
}
if (!added){
rant.writeComment(myHomeland);
}16 -
I had high ideals when I started working here. The entire code base was practically devoid of comments. Its been 5 years and it is still practically devoid of comments. I have become like them...8
-
Worked 2 weeks on hunting a memory leak on a product.
Ended up writing object tracker to find the leak(ironically it was in garbage collector). Found the leak and fixed it. It sounds cool but what I pushed was 9 lines commented out 1 line added for 2 weeks work..
Doesn’t feel very fulfilling to work for 2 weeks to comment out few lines. Only silver lining is that I might turn my object tracker into a library for colleagues to use.
P.s: not a linux or windows environment so tools like walgrind aren’t available.2 -
!rant
mods are asleep.
all aboard the ++ train
How to:
++ all the comments in the thread. once you reach the end, post a comment. only post one comment. board the train.19 -
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
-
Why do I get push notification for comment even when I got the mentioned notificaton of comment on same post and same comment ?2
-
I wonder would it be good if while replying a comment of a rant show the comment we are replying to.
Sometimes i just forget what i want to write, so i need to go back to see the comment.3 -
Did u know that if a devRant comment gets -1, there is a tendency for a human to follow like a sheep and -1 it too? :D3
-
!rant, but a feature request.
@dfox, whenever I use the comment box, it covers the whole screen. So, if I wanna tag somebody in my comment, I gotta close the comment box once, memorize their username since there's no autocomplete on @'s and then type back.
Either the comment box could be shortened, or autocomplete be added to user tag function, which could atleast detect the users commenting on the current thread (since programmers suck at memorising).
What say, DevRanters?5 -
Lets play a little python game together and win some devRant points :
We have an array of integers named L
We need to sort this array so that the biggest number be in the beginning and lowest at the end..descending order
Rules:
-You are not allowed to write more than one line of code in the comment...only one
-if you comment once...you cannot comment directly after that...you have to wait for two other comments after you so you can comment again
-you have to build your code upon the previous comments ... you cannot start from scratch
-the lucky one who puts the final comment is the winner..and we should all ++ his comment to give him the biggest amount of points
Lets start and see who will win :)15 -
Have you seen those comments which are better than the rants themselves ...
I see myself being forced to ++ the rant, just so people could see the comment :/1 -
I don't get annoyed so easily I think.. but when it comes to HTML... why the f*** do the comments have to look like something the cat just shat out?? Why doesn't it support one-line comment?? It's such a struggle to type...1
-
Everyone comment one programming language that someone else did not already comment. Let's see how many different ones we can list. GO!54
-
Ooooops, accidentally reported a comment.. I miss clicked with the "reply" button, and didn't read the dialog
-
People that ask for help on a program I've written...
In the comment section of a completely irrelevant video I made --'2 -
You know what's worse than reading someone else's code? Reading someone else's code with comments that make absolutely no sense!
It's like deciphering hieroglyphics. If you're going to comment, at least give me a hint, not a riddle.
It's not a treasure hunt; it's coding!2 -
In the project I'm working on with others, really complex and confusingly programmed, there's a method called "check[...]IsSet". It gives back a string. They went out of their way to write a Javadoc for it and what does it say?
"@return the string"
No, really? I think I could have figured that out by myself! But what's in it, dammit? -
What is the most unusual use of a programming language comment that you have come across?
I'll start with this one. On the Sinclair ZX81, a REM comment was used to reserve a space, into which you could poke machine code! -
I am working on an AoK bot. It worked before but now it fails on me. It says: {'success': False, 'error': 'Invalid comment.'}
I don't know why.
This is the comment: "@retoor debugsemiss everything and nave the and resorts they're not paying much to clean a fucking roomic lolg creating of my phoprooting such is the quoting this kidle... Noh ot inuforian times fined the apposivy suistlondlan't by imprymarbygind. Metwary nate ?"
Call method:
```
async def post_comment(self, rant_id, text):
payload = dict(
rant_id=rant_id,
comment=text
)
payload.update(self.auth_params)
async with self.session.post(f'/api/devrant/rants/{rant_id}/comments',data=payload, params=self.auth_params) as resp:
print(await resp.json())
```
Someone has an idea why it's failing? Also tried it with hardcored rant_id and message.23 -
Heh, a review of HHKB Pro 2, think someone missed the point haha.
/Offtopic
Anyone got this keyboard and recommends? I mean, if no one responds I'm buying anyway just nice to hear from devs on it3 -
Arg, Visual Studio 2015, stop trying to fix my comment indentation!
It's a comment and. It is NOT part of the code. Leave my formatting alone!!!3 -
Ctrl+/ for commenting a line in xml.
Successful.
Ctrl+/ again to remove comment ....nests earlier comment.
smh...... -
Is there any free software or website one can use where it takes a screenshot or page and you can mark areas on it, then add comments to those areas? (kind of like powerpoint comments, but without the awkward canvas limitation)
Then later the viewer sees instead of huge message bubbles, only those marked areas on top of the screenshot and when he hovers them - sees the comment pop up somewhere.
I remember QA having something like that, but don't remember anything about it. (I think it had a palmtree logo?..)
It would be amazingly useful for clients to just go through screenshots and marking on it "that looks nasty, put ajit pai on it".8 -
I noticed a bug on devrant app on Android. Or is it a feature? Haha.
When you comment on a rant and then press Modify to change your comment, when you edit and save the edited comment you get to the updated one. If you press back you get to the previous one (not updated comment). If you try to reopen the rant you commented you see only the updated one.
So....here's a bug. What do I win?4 -
//Comment
<!--Comment style 2-->
'''At least hide this comment style
/*Loooooong comment way one*/
"""Deus looooooooong comment"""
#Don't show this for Torvaldis' sake
'VB sucker comment which you're
'gonna show too ugh why can't you
'have a way to use compiler format
'here1 -
That moment that you read a comment on Devrant that's do recognizable and then when you want to ++ you see it's your own comment.
Alzheimer or brainfart Friday?1 -
write comment about posters preference of device or OS.
close eyes and imagine the meaningless flame war that would follow.
delete comment.
feel good about choice.
good for me. -
I was suprised when I open source of amazon lumberyard forum website and saw reference to another website in comment :D This is the way how it's do it right.
4th row
Link here: https://paulirish.com/2008/...1 -
Stack Overflow question on best comment ever. My fav:
try {
} finally { // should never happen
}
http://stackoverflow.com/questions/... -
@dfox, on Android, can the viewport scroll down once the comment button is clicked and the comment has been published? I like to see that my comment has been indeed published and I hate to scroll down to make sure. Just my 2 cents on improving the UX, :)4
-
When you comment on a comment and want to read again what exactly the writer meant and you tap on comment again after reading it adds the username again at the end of your text which is not really a bug but somewhat poorly handled...1
-
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
-
Visiting a site about FOSS and it tells me:
"Note: We are experiencing technical issues with Firefox and our comment system. If you want to leave a comment, please use some other browser."
How about no?! *rage quit*
*popup appears right before leaving*
AARRRRGHHH!! *table flip*5 -
Recently our management department discovered the advantages of setting up CloudFlare DNS and their CND for a website. In our case that made perfect sense and also helps a lot with the performance.
A while ago someone noticed that in the backend of the CMS the site uses, stuff that is being loaded via AJAX is not loaded at all and just displays an empty container.
3 hours into debugging I discovered why: Someone thought it would be a good idea to base a condition on whether there was a certain HTML comment inside an element, rather than using a class or something else.
A comment.
The HTML minifier removed that, so I ended up having to disable HTML minifying, at least for the backend.
Thanks, whoever thought it would be a good idea to base logic on the existence of a comment.1 -
The web view of devRant should add a compatibility for Ctrl + Enter key or Command + Enter key to post a comment to a rant.
It's a minor hassle to type out the comment and move the mouse over to the comment button.6 -
write comment above block of code
or pull block of code out into method and work the comment into method name11 -
I tried to post a comment to someone's post and without UI feedback I get the API response in the HTTP request: "Comment not valid". This isn't enough information for me to troubleshoot what is a valid comment.4
-
Can we get an option to edit our comment? You need to delete and add comment again in case of typos. #OCDAboutTypos lol1
-
Came across this comment on r/programminghorror/
> We're you talking with my co-worker? He's extremely abrasive, especially when it comes to anyone touching his code because "Now I don't know how it works anymore" -
"Anyways trust code that you wrote before but... never rely on that!"
I wrote some code mounts ago, now when I want to refactor it see a bunch of shit, I delete them all and after hours write exactly the previous code!!! just because i don't put some STUPID comments... 😑1 -
Um, how come I am no longer able to Reply to any comment or rant? The reply button has completely disappeared from every post and comment. ;-(2
-
I remember someone ranted about something and there was a comment about ad blockers that was pretty good, in that it let you control what ads to watch so you could _bancar_ your favourite creators but don't be bombarded with shiet...
I can't find it. :(( Does anyone have any recommendation? Maybe one of them will be the one that comment talked about.
It was crossbrowser too, and maybe for mobile?1 -
When I reply on a comment in a rant the reply stacks by the other comments and not the actual comment itself. Am I looking into a bug or feature?
-
I can't post a collab from the web client and I don't have a decent phone atm, anyways, this is an idea, tell me if you have any improvements or if you know of an implementation or would be interested in creating one.
A social network comment system that connects people across fields of interest and aids keeping relevant posts alive for a long time.
The basic principle is this: Every post may identify itself as a child to any number of other posts, or sections in other posts, which then act much like a bidirectional hyperlink between parent and child.
This leads to two unusual results:
1. that comments aren’t only added to posts, but specific paragraphs, sentences or even words.
2. that any comment may receive comments in much the same way the original post did, making comments identical to posts. (they could have their own pages and all).
This is in many ways like Reddit's infinite comment chains. The main difference is that here comments aren’t organized in trees but graphs, which makes it possible to connect related conversations from entirely different groups and times, resulting in a much more open yet concise discourse style with an increased persistence of topics. -
That moment your pair programmer doesnt comment his code whatsoever, and your'e spending half a day trying to understand what it was he's trying to do😠4
-
Most of the code I write are adopted from SO answers and dev blogs, am I a terrible coder or not even one?