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 - "one line"
-
Yesterday I had to modify a python script that was written by the previous dev,
There was no documentation to understand the code, I had to read 10 files almost 900 line each, after a looooooooooong 7 hours, at the top of one of the scripts, the author name was same as mine
😂😂😂😂😂😂😂😂😂6 -
Just me minding my own bussiness at a coffee shop (not starbucks) and a stranger comes up to me.
“Check line 37, might be an error there (laughs)”
I was shocked to say that she’s correct, is she the one guys?17 -
I was presenting a paper about "P5.js". My line began with "P5.js is a javascript library ... (and I went on)".
After my conclusion one of the judges asked me "Is this based on JavaScript?"
My reply "No sir, Magic!".
(Funny part - Got first prize.)6 -
2 Days.
Thousands of lines of code analyzed.
Dozens of log files across 6 servers.
Countless pots of coffee.
Much power metal.
...
One line of code.
Bug fixed.8 -
Our programming teacher always wanted us to do this (in C#):
somedatatype somevarname;
somevarname = somevalue;
You were NEVER allowed to:
somedatatype somevarname = somevalue;
"Can't I just do it in one line?"
"No."
"Why?"
"<insert dumb statement here that gives no reason whatsoever>"9 -
I have been 6 hours trying to fix a bug in more than 3000 lines of code.
Removed one line and bug fixed...
WHAT THE FUCK
I will pack my things and go home...4 -
What do you call 8 hobbits?
A hobbyte!
You've probably already heard this one but if not and your a LoTR fan, your welcome.
Note: 40% of the time this works all the time as a pickup line.6 -
I have been told that post lockdown, I must commute hours each day to the office in London. This really makes sense, considering that my reports are not in London, but based in India. The product owner is in India. My line manager and his manager are in the USA. There's no one in London I work with.11
-
Jesus Christ. Dagger2's documentation has got to be the most convoluted shit I have ever laid my eyes on.
The sheer mental gymnastics I had to do to get through this one line at 2:30 am...11 -
Sometimes I think back to all the funny shit that happened and how simple stuff fucks everyone
- tired Database engineer deleting (not dropping, literally rm -rf) the database files on the wrong server
- Microsoft delivering viruses through updates
- Pissed and stubborn dev deleting his one line library repo which does something like removing a char left side of string fucking an unmeasurable amount of other projects
- Adobe getting hacked and exposed for storing passwords in plain texts
- a doubled line causing a bug called heartbleed in a fuckton of webservers
- a Tutorial Company getting kicked from github because their repo got so big github staff had to maintain the repo manually
- and an old one: bad code crashed a space shuttle16 -
The deeper I dig into HP's designs, the more I realize how amazing they are.
- Let's put 18.5V on our charger label
- Let's make it actually put out 20V, just because 🤪
(Note: this is a SMPS, not one of those old linear ones where that's normal)
- Let's make our charger output positive on not only 1 line, but also a second smaller one, just because. All the while the thicker line is more than capable enough, and the same size as the negative line.
(So essentially there's 2 positives, one negative)
- Fuck conventional wiring colors (red for positive, black for negative). Let's awaken our 'murican patriotism and make positive black, and negative white.
- Oh those are the colors for American AC lines and not DC lines? I had no idea! But look, I have a shiny piece of paper and you don't so your concern is invalid!
I lost more brain cells from these realizations than I would from a whole night of binge drinking. WHAT THE FUCK IS WRONG WITH YOU HP?!!15 -
Guys I’ve just added some AI to my program, it only took one line!
System.out.println(“make it just like facebook”);
And there it is guys, the simplest was to add Artificial Incompetence to your program!5 -
Don't want to break your commit streak on Github.
So you change one line and :-
git add .
git commit -m "Minor Tweak"
git push
VOILA ! the box is green for today . *Evil Smile*5 -
When the client says "I just need a really easy edit, shouldn't take more than a few minutes."
*in my head* "Oh really? Can you do it? No? Then don't tell me how easy it is going to be to find the one line of code I need to edit out of thousands of lines in hundreds of files." -
One day you’ll write a line of code which will be your very last one.
Imagine wasting it on something like php.10 -
Wow, just found out in C you can do: (if you have a struct with int i and char c)
mystruct st = {.i=20, .c='A'};
All in one line! Amazing4 -
Once one of my coworkers tried to prank me while i was afk and changed a line in my code.
Good old habits of mine instantly realized the file's unsaved status and i could ctrl+z without even knowing someone edited my code.
Don't mess with a developer. We know our shit.2 -
Programmer one-line horror stories? A few off the top of my head:
Segmentation fault (core dumped)
'Undefined' is not a function
Unit test failed: expected '0' but got '-1'
Connection to 'localhost:8080' has been lost
Malformed JSON string at col: 46,372. Expected '}'7 -
Best advice for dev job hunting is work on your soft skills. Don't be a fucking hero, prove your teamwork ability.
Remember all the rules of all religions and social communities can be summed up in one line: "Don't be a dick!"1 -
year 1: hoping and praying no-one asks you to do anything on the big scary command line
year 5: if I have to leave the safe haven of my terminal to use some GUI nonsense, someone's gonna pay10 -
I hate that fucking feeling, when I am 9001% certain that the bug is caused by the shitty framework because I tested every detail and could exclude my code as the culprit, but later realize it was in fact myself, because I overlooked one pissing line.
Holy fuck.1 -
I remember opening an old script file on our server for scheduled tasks, and thinking to myself; What idiot wrote this mess? It's unnecessarily complex, solving the problem in a convoluted way. And of course, not a single line of comments.
After reading it through and through many times to understand what each line did I kept repeating to myself; What an imbecile... Being this stupid should be illegal... Coding should require some sort of license to prevent idiots from doing this!
Then of course, it slowly dawned on me. I had written this crap one year before. I'm the idiot... 😐
I've commented every line religiously since then.4 -
Poll: How do you use git?
Command line?
GitHub Desktop?
3rd party app? (which one)
I use command line almost exclusively.43 -
Me: *submits design document to manager, who sends it to client for review*
Client: "everything is good, except one line here mentions a function that has since been removed" *send email to manager*
Manager: Correct this one line *sends email to me*
Me: uh, ok *deletes line, sends updated document in new email*
Is there any reason in the world the client OR manager couldn't have corrected the line and moved on?
Did we need to get two more people involved and send 3 more emails?4 -
I’m on this ticket, right? It’s adding some functionality to some payment file parser. The code is atrocious, but it’s getting replaced with a microservice definitely-not-soon-enough, so i don’t need to rewrite it or anything, but looking at this monstrosity of mental diarrhea … fucking UGH. The code stink is noxious.
The damn thing reads each line of a csv file, keeping track of some metadata (blah blah) and the line number (which somehow has TWO off-by-one errors, so it starts on fucking 2 — and yes, the goddamn column headers on line #0 is recorded as line #2), does the same setup shit on every goddamned iteration, then calls a *second* parser on that line. That second parser in turn stores its line state, the line number, the batch number (…which is actually a huge object…), and a whole host of other large objects on itself, and uses exception throwing to communicate, catches and re-raises those exceptions as needed (instead of using, you know, if blocks to skip like 5 lines), and then writes the results of parsing that one single line to the database, and returns. The original calling parser then reads the data BACK OUT OF THE DATABASE, branches on that, and does more shit before reading the next line out of the file and calling that line-parser again.
JESUS CHRIST WHAT THE FUCK
And that’s not including the lesser crimes like duplicated code, misleading var names, and shit like defining class instance constants but … first checking to see if they’re defined yet? They obviously aren’t because they aren’t anywhere else in the fucking file!
Whoever wrote this pile of fetid muck must have been retroactively aborted for their previous crimes against intelligence, somehow survived the attempt, and is now worse off and re-offending.
Just.
Asdkfljasdklfhgasdfdah27 -
Just spent 10+ hours refactoring a code, and at the end I've figure it out a one line fix to the problem... just wasted 10 hours of my life.. :)7
-
I've taken over a project with legacy code, this is one of the methods:
private bool areEqual(string value1, string value2)
{
return value1 == value2;
}
Also, the opening brackets are on a new line10 -
One of our team members would write his name in a comment before and after every line of code he writes!
Like we got version control we can see the changes that have been made and by whom there is no need for this narcissistic behavior.10 -
Finally fixed a major bug.....
FUCK YOU C# AND YOUR FUCKING CASE SENSITIVE BULLSHIT.
DAYS
THAT TOOK FUCKING DAYS AND AT NO POINT DUD VISUAL STUDIO BOTHER TO MENTION THAT FUCKING ERROR.
1 CHARACTER, ON ONE LINE, EFFECTIVELY BROKE THOUSANDS OF LINES OF CODE
fuck this, I quit. See you next time you contact the Microsoft live support chat!13 -
Sold the company and started working fulltime at a company in a different sector a year or so ago.
Today one of the ops people comes up and says that someone is on the phone asking for me.
One of my old clients apparently had a question about their site. Turns out that they tracked me down on LinkedIn, and called my new company's public line just to see if I would be available to help them out.
Fortunately the new powers that be took that one in their strides..3 -
Let me make a small change to this file, a one-line pull request will probably be accepted right away
* saves *
Prettier runs...
EsLint runs...
StyleLint runs...
60 changes submitted for review11 -
Me: I need an SSL certificate.
Support: No problem. Just fire up your command line and generate one via OpenSSL.
Me: I'm on Windows.
Support: Ok, so what you do is code a Linux command line from scratch that will run in Powershell. Next, compile OpenSSL from your favorite of 60,000 versions available. Now, just fire it up and you're all set.
Me: Goodbye everything I've ever enjoyed doing in my free time.16 -
I'm such a dumb fuck....
It took me fucking 30 mins to figure out that I use a function which relies on a copy of an object that's copied one line after the function call instead of before...
PLEASE KILL ME8 -
Am I the only one having this issue of getting irritated by seeing that small white line in the divider..?10
-
*me* finding solutions on StackOverflow, Medium, API Docs for hours
*senior dev* walks in and changes one line of code
*works* O.o4 -
Fuck the guy that chose the colors for MonoDevelops Solarized Dark Theme!
Guess on which of the two screenshots below I selected some text in the middle of the line and on which one I didn't.
Fucking morons!10 -
ABC 80.
It was a Swedish computer in the 80s.
Used basic as main shell like c64 but its editor was worse than edlin if any one remembers that.
You could not use arrow keys to go to a line to change it but had to type a command like edit 80 to retrieve the line in an editor prompt.
It also lacked a lot of common basic commands.6 -
No, I'm not going to approve your one-line fix. It will introduce more problems in the future. Fix it the way we agreed on this morning!2
-
Just pushed a 400+ line stored procedure in production. It's fucking magic and is probably never gonna be touched because no one will understand it and because "it works".5
-
Once in university I needed to write a simple program in c++ and upload it to online complier which would pass test inputs. It was homework, but I was bored during the next lecture, so I wrote the program.
On my phone.
Directly into the "paste" window in browser.
It wasn't comfortable at all, so I wrote everything in one line.
And got bonus points from lecturer later.
After some questions, ofc, like "wtf why everything is in one line"3 -
A jr colleague came back from a react.js code camp.
Those hipsters turned the poor kid into a one liner terrorist and buzzword spammer.
It's time to play bad cop and start enforcing line length limit. -
One day I will make my very own js framework and I will make a built in function to automatically make to-do lists. I will provide a 1 line tutorial and claim it is the best.
-
When one of your dev's can't keep his variable naming consistent, even within the same line. Throw in non-English comments, bad spelling and incorrect pluralization for good measure
string myVariable = THE_OTHER_VARABLE + AnotherDumbVariable
//This add the string for better working2 -
Arch that I've had for a month
Applications: Firefox with riot.im chat, custom one-line music menu, vim markdown preview, gotop, vim with .zshrc, vim with README in Markdown, vim with python code
Bar: Polybar
Background: https://github.com/LukeSmithxyz/...
Arch Linux, i3 WM13 -
Need my vaccine receipt to go to a wedding. And I’m in line to get the pdf document. On the one hand this is some cool implementation for a load balancer, on the other hand this so strange… be online in a line to get a document -.09
-
Dear web developers, whenever there is more than ONE LINE OF TEXT make sure the line-height is 1.4em.10
-
Oh the beauty of WYSIWYG etitors...
I don't know which one I'm more amazed of. All that beautiful styling for a simple line break or that incredibly accurate and absolute neccessary line-height value.
I guess it's time for a strip tag massacre.4 -
1. Understand APIs without reading documentation.
2. Write correct code from first try.
3. Know to program in every language.
4. Create the perfect fully functional AI system.
5. Center objects vertically with one line CSS at target object.3 -
Managed to reduce a file from 1155 to 288 lines just by converting the 50 or so methods all calling the same API library with similar setups to use one line helper functions.2
-
Haven't coded for a few days, returned to my github project to find one of my co-workers has gone through every single line in all of the scripts and added passive-agrresivd, sarcastic, comments about what they do.
Thanks.... I guess....5 -
Is asking for a nice email client in Linux too much?
In thunderbird, I found no way to customize the "messages pane". Title, sender, time all in one line.
In KMail, the fonts and style of HTML signature is not working as expected.
In Evolution, the fonts scaling doesn't work correctly.
Fuck me!11 -
Clicks "Exploitation and Enumeration" category.
Clicks "Python (HARD)" challenge.
"What is a key that passes the code?"
Opens Python file and sees one line of nested lambda expressions spanning 1,846 characters (no spaces)
*Cries*8 -
FUCK FIREBASE, FUCK CLOUD MESSAGING, FUCK GOOGLE, FUCK APPLE, FUCK PUSH NOTIFICATIONS, FUCK PROGRAMMING AND FUCK MY LIFE. JUST TELL ME MOTHERFUCKERS WHY NOTIFICATIONS IS NOT WORKING ANYMORE, I SWEAR I DIDN'T CHANGE A SINGLE LINE OF THE FUCKING CODE. AND IT'S BEEN ONLY ONE WEEK SINCE THE LAST TIME I TESTED IT.5
-
Dude in my Computer Architecture class was doing his homework from another class (Java, which is weird because that class is a prerequisite for this one) was struggling with a two-line code program, and the website was telling him that his output wasn't the expected. I notice that the website expected a vertical list, but he was printing an horizontal one. Basically, he was using println instead of print. I was about to pointed that out until he changed to another tab and I realize that he just copied and pasted the code from SO. He deleted the two-line code (which was enough to perform the task) and pasted a big +30 lines of code that basically printed the same output because he was still using println...2
-
Your data is formatted according to some ISO? Nice. You say it's easy to use and well documented? Great!
IT'S FUCKING FORMATTED WITH IRREGULAR SPACING??
What the fuck is this formatting?
Date <tab> Word <3 spaces> Some conjugated version <ONE space> Type <FIVE spaces> gender
WHAT
WHY
WHY ISNT IT XML
WHY ISNT IT JSON
WHY THE TABULATOR AND IRREGULAR SPACES
WHY DOES THE ORDER CHANGE PER LINE
WHY IS THIS IN A SINGLE 1MIL LINE FILE
help the university of oslo makes me dysphoric in their dictionaries i really dont want to parse this1 -
A coworker of mine was asked to make a utility C# app to help with our internal testing. The idea was that the app would collect data and display the results.
He decided that it was very important that the app have a command line interface. He's spent far more time building the app from scratch for the command line than he would have if he'd used C#'s built-in GUI utilities.
Today was our demo day and he shows an internal command-line app in 2017 built in C#. I asked about the GUI and he said that the command line functionality was more important. I suggested that it was maybe less user-friendly and he proceeded to explain to me how "non-technical" people might prefer a GUI, but clearly any serious developer would just want a command line app.
I feel like, in one fell swoop, he trivialized my suggestion, didn't address any of the data visualization needs, and suggested I wasn't a "real developer". Am I right to feel a little outraged by this?5 -
Just because you can do things in one line and throw in ternary operators everywhere, doesn't mean you should.. other people will touch your code. Make it readable instead of making it harder to maintain8
-
One time, I accidentally deleted all the data from one of the client's database table (invoices) because i forgot to comment the line from the script.
Good thing there were some backups and I was able to restore everything without anyone noticing. I was so fucking dumb at that time and I felt all the blood rush to my head at that moment when I did a SELECT * and NOTHING was displayed on the screen.
Rookie mistake.11 -
Have anyone felt this before?
You Google loads of different tutorial on something, find one most recent tutorial... Do it and when compile, a lot of error pops out. Go to the github code page and realise the author did not include the line that was required to run smoothly in the tutorial page/video?13 -
Python developers starts writing his code with indentation and on multiple lines. Javascript developers look at him and writes the entire script in one line. Php developers looks at python and js developer and starts writing $$$$$$$$$$$$$5
-
people who don't use semi colons in JavaScript. I know it's not required but God does it drive me nuts.
also one line if statements that don't use brackets.
ahhhhh3 -
// Feature Request START
Is it possible we can have some kind of markdown on posts and comments? Maybe not bold or italic, but because of the target of the app, some kind of one-line and multi-line code blocks that highlight from other text (for example: having a gray background, using a consolas font, etc)
// Feature Request END1 -
Hundreds of PHP files with same name and _# at the end to differentiate them - each containing hundreds of
$(document).ready(function() {
$(some_slector).on(some_event, function() {
//one line of code
}
}1 -
Spent 3 hours today digging through 3rd party libraries, trying to get them all to work together nicely.
The solution? A one line fix in my own source.
FACEPALM!!! -
//computer class at school doing html
classmate:"Hey can you help me? that img isnt showing."
me:"Yeah of course" *look at screen and see a single line if code without spaces or anything*
"What are you doing? Why do you write everything in one line?"
classmate:"Ohh you can write it over multiple lines?"
me:"...."
At that time we worked with html for around 2 weeks1 -
1) Using ScreenRecord record a video deleting his work folder(fake one obviously).
2) create command line vlc player to play this video on startup with flags -f and --no-qt-fs-controller
Eg. vlc -f --no-qt-fs-controller file://<file path>
Enjoy the show 👿 -
I don't judge whoever wrote this line in one of the projects I've been working on
return 0.ToString()
Like, really, there has to be a LOGICAL, and REASONABLE explanation behind it, right?... RIGHT?!4 -
New year is the only +1 I do not give a fuck about. All it means is I am one year closer to death, so I will smoke one more cigarette after the last, one more cup of coffee with far too much sugar, and I will keep coding one more line after the other, and frankly it is just to distract me from the fact that there is always another +1, one more person to hate, one more word spoken, all so I can get to through one more year. So fuck the new year because there will always be another. But I won't always get a +1 on a rant.5
-
Unless you're editing actual fucking JSON and not a JS object, do this:
{
name: 'John Doe',
phone_number: '12345',
}
Not this:
{
name: 'John Doe',
phone_number: '12345'
}
Note the presence or lack of a comma after the last field. In this way, when you add a new field, you only have one line change in version control, because otherwise you'd have to add that no-longer-last comma and thus make two line changes. Not to mention you can forget to add it and spend some time figuring out what is wrong.30 -
Hit an issue in a dependency of the node library I use, there's been many issue reports on it since october last year and multiple recently (12 days and 4 days ago) - the fix was a one-liner.
All you had to do was check for null in line 17, because in line 9 it gets defaulted to null, but then attempts to null.fetch() in line 21.
Fascinating.12 -
Do you ever just think of a feature you want to implement in your program, thinking it's going to be a challenge and then you realize "oh, my program is set up in such a way that makes adding this feature literally one additional line and one modified line of code, without making the code messy"?5
-
My 5 cents about refactoring.
People often postpone it, making it harder down the line.
From my experience, it's better to just do it as you go. 5 min can otherwise become 30 min thing after a while, and combined with some other 5 min thing, this can become 2 hour thing after some time, for example.
Also good luck convincing management (especially bad one), that you need 2 weeks of refactoring. Doing tiny 5 min refactoring, no one will notice.7 -
writing a whole god damn function in one single line doesn't make it "one liner" and it DOESN'T make your code better and more readable!!!2
-
Lets all write one line of code without having a goal. Lets see what we will come up with in the end.
Use C++11.
The code has to be correct from a syntax standpoint. Also, no sigsevs, please :P
Ima start with the first line:
#include <iostream>34 -
My favorite command of day is 😂
rm -rf {foo}/{bar}
Reference if you don't know what happened today:
http://independent.co.uk/life-style...2 -
Let me tell you a very sad, sad story:
I was standing in the line at Lidl (a supermarket here in Germany) and was listening to a podcaste peacefully, minding my own business.
As I was the next one, I took out my AirPods and than it happend:
One of my AirPods felt down, jumped from the floor into a shelf under the cash register and sliped through a FUCKING HOLE WITH ONE FUCKING SQUARE CENTIMETER SIZE!!! WHAT A FUCKING MISFORTUNE!!! No way to get it back. And the biggest shit is that Apple wants FUCKING-80-FUCKING-€ for one single new AirPod.5 -
So I was helping my friend debug her code.
A portion of text was not being displayed. We put log statements everywhere. Cross checked every line of code. We had almost started to lose it.
And then we found out that she had accidentally set the text color to white in the XML layout.
Just another one of those days. -
Today I had to teach a product manager how to use git. It took about 30 minutes to create a proper pull request. Then another 30 to update it when he fucked the change up.
It was a one line change...needless to say I was internally screaming after the first 10 minutes.2 -
Found this in a third party library once. Only thing I can think is that this programmer was paid by the line. Because, seriously, this could have been one line.
-
I recently got interest into web dev and... why isn't HTML + CSS considered art? I keep moving stuff one px to the left, one to the right then back left padding-top :40px, ehh to much, 20px ehh too little 30px ehh lemme just leave it at 40px. It's like when you erase a line on a drawing.1
-
I keep sacrificing readability for cramming a shitload of instructions into one line. The same goes for writing comments.
-
So I'm not one to show off something buuuuuuut, I'm a programmer and can barely draw a straight line let alone do pixel art, but I decided fuck it; let's try again and considering the left figure was the first compared to the right being the 10th, I'd say that's not to fucking bad :-D4
-
Really weird writing a book and being one of the only 2 people to know the entire story line...
Even more so when you wrote something down and knowing it's significance to the bigger picture makes you tear up a little... Fucking weird man...9 -
Turned on my MacBook, opened up Xcode, within typing one line of code my computer starts heating up and the fans are loud as fuck2
-
I spent 4 hours trying to rectify a client's website.
Just to find out it was missing a '}' in one of the CSS line. Can you not?
*facepalm*2 -
"Mh, I should just write a short comment instead of writing a novel"
// This is a fucking detailed explaination of this shit, even though you can clearly see what it does because I usually write clean code. Also, it's a one-line comment, so have fun side-scrolling -
When you're mentally debugging a module and you have an intuition about the point of failure.
So you start mentally tracking variables, going down functions calls, moving from one class to another until finally you reach that one line of code that you feel is getting the wrong parameters.
You substitute in the 10 different variables you have been mentally tracking and find out that...
THE LINE OF CODE IS GETTING THE CORRECT PARAMETERS, AND IS FUNCTIONING AS IT SHOULD.
fuck.1 -
My company's process basically boils down to this:
-Hour long meeting to open an issue.
-5 lines of comments.
-Update three documents.
-5 days for a peer review.
-40 bitchy comments about how everything you do and love is terrible.
For a one line code change to prevent a show stopping exception.2 -
I just found a 980 line long method in one of our legacy code bases.... And I need to add to it. There are no unit tests and I desperately want to refactor that shit....4
-
5 steps to make your coworkers go nuts.
Step 1: Get on their computer while they're not around.
Step 2: Choose a bit of their code and make it so it's in one long line.
Step 3: Comment out the line.
Step 4: Change the text color to the color of the editor's background.
Step 5: Watch them going nuts.9 -
I literally only wrote one line of code today. Don't ever start your day off by saying, "I think I'll make a quick backup of my primary hard drive."1
-
I was one of the early adapters to devrant. And I qualified for my free stickers ages ago. But thanks to the useless South African postal service, I still havent received my stickers over a month down the line :( I have so much sadness in me because I NEED these stickers!4
-
i was on vacation. one week in denmark without a computer.
7 days without a single line of code written. i am scared to boot my pc because i can not tell if i am able to write an application anymore.
But hell i need this. I feel so unproductive T.T
Wish me luck3 -
Yesterday, I was looking back at a project that isn't a focus right now, and unintentionally realised the cause of a frustrating bug. It's a one line fix and the smallest PR I've ever done, and it was such a good feeling!2
-
The infuriating edgecases of python copypasta.
If you're like me, and you find it easier to noodle in notepad++ and the console, then you may have encountered this peculiar bug.
Try padding blank spaces on an empty string variable, and follow it with print(blanks + str(var))
#for any variable
Now copypaste that along with at least one other line at the same time.
Observe how no matter what you do, print will always output the blanks variable on a separate line, with quotes.
Try rewriting right-justify? No good.
Try using f-format strings? No good.
Raw strings? Inspecting bytes to see where the newlines and carriage returns are being inserted? Nothing.
Copypaste with multiple strings will *always* insert quotes and a new line when printing *any* variable with a string thats been justified.
And this is 100% non-congruent with pasting the same *line* of code *by itself*, which works as intended, no quotes or additional new lines are inserted.
I just went ahead, turned the snippet into a function, and called it from there, which solved the problem entirely.6 -
A haiku, written in NodeJS:
This is the first line
This is the third line
This one is the second line8 -
Problem with code:
Computer: "Error on line 189: ....."
Me: "But the code ended on line 58 "
-----------------------------------------------------------------------------
Programming is funny
!false
(its true)
(i wrote it here because devRant allows us to post one rant in 2 hours)4 -
Man accidentally 'deletes his entire company' with one line of bad code rm -rf in his bash script 😂😂1
-
I just spent an hour troubleshooting an error message which I perceived to have some kind of abstract meaning.
Overthinking idiot, it couldn't have been more literal.
After the fix to one stupid line, I quietly watch that hour of my life sail away on a sad river of anguish, never to return again.3 -
The feeling when you didn't spot what the error was here:
int x = 0;
int y = 0;
for ( ; y < rows; y++) {
for ( ; x < cols; x++) {
//Dafuq, only does one line?!
}
}10 -
That time when I wowed all my colleagues with C++-code that executed over 2.5x faster than theirs, without changing one line of code.
I guess they didn't know what -O2 does (or that it exists, for that matter).7 -
Starting a project with someone that programs like an idiot on steroids. Like, why are you using 20 switch statements to set a variable instead of of just a single line linear expression. I removed hundreds of lines from one of this ass's files. I've never seen such a complicated mess of garbage.5
-
This is a story of how I did a hard thing in bash:
I need to extract all files with extension .nco from a disk. I don't want to use the GUI (which only works on windows). And I don't want to install any new programs. NCO files are basically like zip files.
Problem 1: The file headers (or something) is broken and 7zip (7z) can only extract it if has .zip extension
Problem 2: find command gives me relative to the disk path and starts with . (a dot)
Solution: Use sed to delete dot. Use sed to convert to full path. Save to file. Load lines from file and for each one, cp to ~/Desktop/file.zip then && 7z e ~/Desktop/file.zip -oOutputDir (Extract file to OutputDir).
Problem 3: Most filenames contain a whitespace. cp doesn't work when given the path wrapped in quotes.
Patch: Use bash parameter substitution to change whitespace to \whitespace.
(Note: I found it easier to apply sed one after another than to put it all in one command)
Why the fuck would anyone compress 345 images into their own archive used by an uncommon windows-only paid back-up tool?
Little me (12 years old) knowing nothing about compression or backup or common software decided to use the already installed shitty program.
This is a big deal for me because it's really the first time I string so many cool commands to achieve desired results in bash (been using Ubuntu for half a year now). Funny thing is the images uncompressed are 4.7GB and the raw files are about 1.4GB so I would have been better off not doing anything at all.
Full command:
find -type f -name "*.nco" |
sed 's/\(^./\)/\1/' |
sed 's/.*/\/media\/mitiko\/2011-2014_1&/' > unescaped-paths.txt
cat unescaped-paths.txt | while read line; do echo "${line// /\\ }" >> escaped-paths.txt; done
rm unescaped-paths.txt
cat escaped-paths.txt | while read line; do (echo "$line" | grep -Eq .*[^db].nco) && echo "$line" >> paths.txt; done
rm escaped-paths.txt
cat paths.txt | while read line; do cp $line ~/Desktop/file.zip && 7z e ~/Desktop/file.zip -oImages >/dev/null; done3 -
I am officially no longer writing one line of HTML.
Or any line that has to do with anything fucking front-end.9 -
Me: * Writes half a line of code in an unfinished file *
Me: * Remembers a dependency that has to be installed for this to work *
Me: * composer require thatone/dependency *
Composer: ERROR! Found a syntax error in that one file you were working on, reverting everything you love and removing that dependency that took 10 minutes to install.
:/1 -
When you change one line of your source code and all of the rest of code don't work any more. Fucking Shit!2
-
!rant
when you find 3 spelling errors in the same line of code and realize that these are legit 'cause the objects and methods are actually coded misspelled.
That's when no one dare doing code review but simply it builds and its fine.
Luckily #NotMyCode -
Some years ago... And some xp less.
An old WordPress installation was attacked and our server was sending thousands of spam mails.
I found out that there was a line of code in the top of every php file. And I removed these files.
The problem was that
1) I was copying this fcking line to new files because I was thinking it was my code.
2) I found a Linux command to detect all these files and I removed them one by one. In every file. Many many files.
#hacker #goodolddays -
Visual studio is rather silly.
In one project, just changing the character set to unicode was enough for the program to work.
In another project, exact same code, I also needed to add a command-line argument to enable unicode.
Isn't. That. Just. Silly.4 -
Was wondering why one 2px line looked waaaay thicker than another 2px line.
Then I remembered one was on a shitty 15" 1024x768 monitor.
*face palm* -
Me 2 cents on python:
Cheers on python for enforcing indentation for the sake of readability.
Fuck devs for writing a fucking function in one line or 200char.
Also fuck type less one liners even more.rant fuck python tabs vs spaces typewriter fuck developers python fuck this shit indentation readability4 -
Been working on a small collab with my 3 mates
It's just one guy who's doing all the heavy lifting
I chime in with a 3-4 line modification every day or so
The other two are afk
It's chugging along just fine..
I feel like a garbage can in front of this guy's coding ability1 -
How to kill Jira Backlog in one simple step:
1) put '-∞' to Storypoints
2) enjoy
(Bottom line: it can be fixed from User Story Map to something normal) -
How to write crappy code, intermediate level:
Smuggle a hidden OR operator into a longer(300+ chars) logical expression full of ANDs. The best placement is somewhere in the middle. And keep it all in ONE line - at all costs.
#truestory1 -
I remember our PM/GM used to give us a website name and one line of website description, then he disappears to attend meeting outside the company. His phone is switched off most of the times and he doesn't reply to messages or emails.
2 days later, which is our fixed deadline for a website, he comes and says why the website is not up yet!
Note: One developer for one website and the developer has to design, write content and code frontend & backend.1 -
That moment when you fixed that "unexpected feature" just by adding one line of code.
I wish I had noticed it earlier... -
Im new on GitHub, and google didnt give me an answer simple enough for me to understand, so here i go.
How do i commit to GitHub and keep my files up to date, but without committing my password/oauth tokens?
Does one remove the line before committing, or what are you supposed to do?
Im using IntelliJ, dark theme11 -
I had six items that I wanted to centre horizontally via CSS. Problem was that depending on the viewport width, the items could either take one, two, three or six lines. But the items broke to the next line like text so that e.g. the top line had five items and the second only one. What I wanted was three items each in this case.
Finally, I came up with a hack of media queries to make the parent container just so wide that six, three, two or one item would fit horizontally, and then centre the parent container with margin left/right auto.1 -
Bunyan
Bunyan is a simple and fast JSON logging library for node.js services
Server logs should be structured. JSON's a good format. Let's do that. A log record is one line of JSON.stringify'd output. Let's also specify some common names for the requisite and common fields for a log record.11 -
Finding out, for whatever reason, Microsoft decided not to include IdnMapping in the Silverlight Client runtime and spending 3 hours building a filthy hack via the RIA Service to do something that normally takes one line of code.
Then realising you still have to maintain a Silverlight project and cry some more.7 -
Learn Clojure and use it instead of Bash / Python for one-line terminal tasks.
Reach 8k$ per month on current project.
Hire few students and make real devs from them.
Watch and enjoy the dawn of cross-platform frameworks for mobile platforms.2 -
Any code should be simple and easy to read / understand.
I just reworked an old stored SQL proc.
Went from 102 lines to ... 10.
More I code, more I realize that maintainability, readability, comments and unit tests are more important than actual code. (And performances ofc. But if 1 line code does it in 1 second and 500 lines code in 0.2 seconds, I’ll take one line solution every time)5 -
Trying to find that one line of php you need to change in a magento project
App/design/frontend/base/default/template/this/is/not/gonna/be/the/template/youre/looking/for/fuckyou.phtml -
Reasons not to work here...
Windoze
Insurance
One line scripts with no help option
Java
Windoze
5am meetings, working 10 hours a day then getting on again between 9pm and 5am, to accommodate for employees in India
WINDOZE
Edit - can't forget the worst laptop track pad in history 😂10 -
Another update for whoever cares about this text editor that no one cares:
The cursor (which is now a block instead of underscore like before) is now finally functional, but is quite flawed (e.g. If you type two lines with the first line is longer than the second, there's a chance that the cursor might jump to the end of the first line). There's also some text that greets you when you first open the editor, but it will be hidden when you start typing in Insert mode.7 -
the first time i tried flutter/dart i was coming from java and published an app composed of one seven thousand line dart file5
-
FUCKING SHIT! Am I really the fucking only one that is fighting with the cursor jumping into the fucking next line or to the start, while you are trying to select only a part of a long line?! I know theres wordwrap, but I fucking hate it!6
-
In my country there is exactly one (1) mobile operator to choose from, Ålcom. The line hardly ever breaks - provided that you keep your phone calls under a minute or so.9
-
What was your best moment in your life as a Programmer?
Mine, besides a small amount of good projects for my course, was telling by the phone to a project partner the code, line by line, that would solve a bug in the code and when be put it and run the project it worked. Still need something to top that one XD2 -
Please stop, stop now...
(BTW, assignment statement was on one line, I added breaks just so I could fit it into a screenshot)
If the text is too blurry:
int index;
string fileNameWithoutExt;
additionalData.MailImportConfigCode = (fileNameWithoutExt = schema.Remove(schema.LastIndexOf('.'))).Substring((index = fileNameWithoutExt.LastIndexOf('.') + 1), fileNameWithoutExt.Length - index);
}2 -
Am I the only one who turns off the PC by executing "die" in the command line?
(I use Archlinux with i3wm, so there is not a graphic button to turn off the PC, and writing shutdown -h 0 was too long)6 -
Any one else who uses visual studio find them self pressing Ctrl + . When there is a typo in an office document or email and it is underlined in red with a swiggly line thinking it’s intlisense? Then get pissed for that it doesn’t pop up!?4
-
Why are OSS maintainers so fucking incompetent and cocky? A documentation clearly says to use "use_parent_assets: true" when creating a child theme. Yet not a single fucking line of code actually checks that value. The fix is literary a single if(value) assets = deepMerge(parentAssets, assets). But because some contributor somewhere didn't write that line to the maintainer's liking, it's been hanging in the air for months.
Take your head of of your ass, there's thousands of people paying for support & addons for your product, and you can't add one fucking line to fix a rather critical bug.6 -
What i thought to be a cool company, turned out to be a shitshow.
Our "Team Lead" when assigning tasks keeps saying things like "it's only..." or "It's just..." or "You only need to change one line [there]..." And that's in regard to a terrible product with a pile of tech debt. So when you actually start to develop/fix things, you end up redoing third of the whole application.
How do you deal with this? How do you tell the "leader" that he should look into what we have in a code before making us all look bad for doing "just this one line change"?2 -
So, was testing a classic Mac an old friend sent over and realized an interesting convergence had occurred in my office.
In the attached shot you can see the following:
Center: A Macintosh LC III - effectively the last of the 68k Mac line
Right: A PowerMac G5 - one of the old cheese graters, and the last major release of the PowerPC line
Left, under the monitor: A 2020 Mac Mini - effectively the end of the Intel Mac line
The LC III gives a startup chime, but I wasn't able to get a video signal out of it using the Apple-to-VGA adapter I was using. Otherwise I'd be posting a shot with all 3 up and running.2 -
Only open source projects under a CC-BY-SA 3.0 license can legally use even one line of StackOverflow.
That site's user contributions are all under a free license that demands all copies to use the same license. Does someone know if I'm wrong on this? -
Working on a very simple report in C# with DexExtreme.
Got rejected by boss for more than 5 times.
😢
"We don't use comma, the line looks like doubled, the title isn't right, one field is missing..."
Feel so depressed 🤦♂️
I don't even write C# normally1 -
I'm trapped in a sea of one line work requests. How fucking difficult is it to actually write down your requirements. If you can't be arsed, even after I have asked for clarifications several times, don't act all upset when what I implement doesn't match your expectations.
-
Got commissioned to write a simple js function. Drafted in python. Changed up some variable names while translating, but forgot to change one, and changed another to the old name... Spent a week trying to find the bug in a 30 line piece of js that worked perfectly in python. FML1
-
Not just a rant, also a call for help.
After 10 years using Git, I'm constrained to use Mercurial (company policy). It effing feels like playing tennis with one arm tied to my back.
Please, who knows a good GUI for Linux, or at least a command line tool to show a decent log?
Kill Mercurial!3 -
Freaking github markdown! I just want this directly under each other like i fucking wrote it:
[Client implementation](implementation_client.md)
[Server implementation](implementation_server.md)
But it's places it together on one line. Fine, i put a new line between it.
[Client implementation](implementation_client.md)
[Server implementation](implementation_server.md)
It fucking shows a blank line in between!
AAAARGH
I'm sure the github CTO was seen on Epstein's island4 -
Am I the only one who doesn't like seeing press in the front line at developer conferences. Devs should be sitting there!1
-
Life of an Oracle Developer ... Day {I've lost bloody count now}
Task: Optimise a 236 line cursor consisting of 7 SQL SELECTS and unions, 39 joins and nested sub queries galore.
"YAYYY" said no one ever ...3 -
Since Friday devRant posts where errors are introduced by very dumb things like commas have stood out to me.
Today's error fix. Line 1352. A string input defined in the spec file was set for 13 length. The body file had 12 dashes to represent this input.
Really, one dash, four days to solve.
Oh and Unix over Windows because my compiler on Windows didn't catch it but the Unix one sure did which is how I found it. -
Honest question:
I did a project and delivered it, but my boss did 4 commits after that. Without giving me any feedback.
They were small things: using a different library (just one line), and removing one debug line that caused a bug.
Should I ask him for feedback or just tell him "Hey I saw your commits, I'll make sure to use the new library and never let any debug line in"?7 -
!rant
What kind of Easter eggs have you guys added to your projects (personal or work)?
There was one I added to a command-line utility for work that, as long as you ran the right command on an OS with a GUI, would open a browser and navigate to "Never gonna give you up" on YouTube. 😎 -
Changed one line and had to fix over 1300 unit tests. Damn! Each has its own configuration. Been a long 6 hours5
-
I just had to spend 10 minutes of my life going through 674 lines of HTML code and deleting every font tag, with there being at least one font tag on every line.2
-
Had a nightmare last night where I was called in to do a coding challenge against two other people...on a whiteboard only and no Google or StackOverflow. I couldn't even get one line of code written. The other two guys got a bunch. Too bad one of my real life projects has a lot in common with this nightmare.
-
After merging 2 branches, Git randomly decided not to merge one particular line (the place where my newly defined function was called) and that caused a fixed bug to reappear. First time in 4 years I am witnessing Git do something strange like this— probably an issue in the “merge by ort strategy”.5
-
Null-propagation operator and null coalesce all in one line makes me tingly.
return registryKey.GetValue("foo")?.ToString()??"bar"; -
I'm enraged by seeing my floated images collapsing into one line on large screen because there are fewer lines displayed. What tricks do you use to circumvent that? Maybe there are grid-layouts for blogposts?3
-
Every time when I spend hours of thinking, investigations and experiments to find a solution to a problem...
And it ends up with a one line change in the git commit.
Always a strange feeling.3 -
Since we're all doing unpopular opinions lately: tabs and spaces are not only interchangeable, but is most readable when mixed on one line.
Instead of 4 spaces or one tab, try 2 spaces, 1 tab, and another space for good measure!3 -
!rant
I love the people on github who puts one line text and a gif of their project. So easy to understand and not having to read some large text. Keep up the good work people.2 -
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
-
Convo b/w me & lecturer.
Me: Is one line that explains exactly what it does okay?
Him: No.
Me: Okay I'll make it a paragraph explaining it a lot more in detail...Is that okay?
Him: Nope, you need to elaborate for laymen.
I don't know what more I can add. Sick of useless documentation. Any one else have this problem?1 -
So my computer crashed while I was coding in eclipse. I turn it on and the class I was working on is absolutely empty, only one empty line
It wasn't a big class, but that still hurts2 -
Does anyone have problems with Android instant run?
Fucking hell, I spent one hour yesterday debugging an error, until I noticed that the code in the APK wasn't updated, because it was sending an error of a non-existent line.
Sometimes it works okay, but damn...2 -
Privacy Policy written the correct way. They state that they collect info about the users and provide to their advertising business partners which help them cover cost of hosting. In one line "We sell your data to provide you free service"
https://onesignal.com/privacy_polic... -
StackOverflow locked my account. I'm hoping someone here might be kind enough to help me with a bash script I'm "bashing" my head with. Actually, it's zsh on MacOS if it makes any difference.
I have an input file. Four lines. No blank lines. Each of the four lines has two strings of text delimited by a tab. Each string on either side of the tab is either one word with no spaces or a bunch of words with spaces. Like this (using <tab> as a placeholder here on Devrant for where the tab actually is)
ABC<tab>DEF
GHI<tab>jkl mno pq
RST<tab>UV
wx<tab>Yz
I need to open and read the file, separate them into key-value pairs, and put them into an array for processing. I have this script to do that:
# Get input arguments
search_string_file="$1"
file_path="$2"
# Read search strings and corresponding names from the file and store in arrays
search_strings=()
search_names=()
# Read search strings and corresponding names from the file and store in arrays
while IFS= read -r line || [[ -n "$line" ]]; do
echo "Line: $line"
search_string=$(echo "$line" | awk -F'\t' '{print $1}')
name=$(echo "$line" | awk -F'\t' '{print $2}')
search_strings+=("$search_string")
search_names+=("$name")
done < "$search_string_file"
# Debug: Print the entire array of search strings
echo "Search strings array:"
for (( i=0; i<${#search_strings[@]}; i++ )); do
echo "[$i] ${search_strings[$i]} -- ${search_names[$i]}"
done
However, in the output, I get the following:
Line: ABC<tab>DEF
Line: GHI<tab>jkl mno pq
Line: RST<tab>UV
Line: wx<tab>Yz
Search strings array:
[0] --
[1] ABC -- DEF
[2] GHI -- jkl mno pq
[3] RST -- UV
That's it. I seem to be off by one because that last line...
Line: wx<tab>Yz
never gets added to the array. What I need it to be is:
[0] ABC -- DEF
[1] GHI -- jkl mno pq
[2] RST -- UV
[3] wx -- Yz
What am I doing wrong here?
Thanks.17 -
Fun one on the subway:
Make a little prompt script for your phone or computer
>welcome to Washington, D. C., Mr. Davis
>what would you like to view?
>1-traffic lights
>2-subway
>3-mainframe
3
>Subway Control
>1-emergency shutdown
>2-accelerate line
>3-shutdown line
Interact with script while on subway, watch reactions. Wearing dark glasses also helps.2 -
If not understanding code, read the documentation or debug the code. When trying to modify...
1. Follow proper indentation.
2. Don't make spelling mistakes and follow naming convention.
3. Don't try to write all the code in one line (based on line length set)
4. Simplify if else statements if possible.
5. If value of method call need to be used once, don't store it in a variable. Directly use where ever it is needed.
6. If there is duplicated code, put it in separate method and re-use it if possible.1 -
Dev work estimation is harder when the higher ups gives you a one line jira description and expect you to provide them with a timeline. Like how many times i gotta send the ticket back up the pipeline ><1
-
That one line of code that you know the logic of it and you know what is causing the error, but you can’t fix it!3
-
Merging one git branch into another when it conflicts an added line or function.
Like really? You can't handle ONE LINE being added?6 -
I have spent my entire day code reviewing thinking ...
This developer must think all the lines are fighting with one another ..
I kid you not ! Every line of code has white space between it ....
To top it off ... all strings are initialized new String() then assigned to constants ......
*sigh*1 -
Patching a legacy project: all logic inside an 8000-line file called class.cms.php, on frontend, one js file with about the same file size...
-
That one manager that sits behind you for hours and micromanages every feature, down to the line of code. #airplease2
-
Searched an error on Google
Only one result was relevant to my search.
It had the entire error line in it. Yay!
It was the GitHub source page of the compilation code that generates the actual error 💫
GitHub must disallow the programming extensions to web crawlers.1 -
When adding line breaks to a string that get injected into a html view I always use \r\n instead of just \n. Cus I know one day some smart motherfucker will download one of my webpages with a console app and log out the html to the console to make sure it worked. And when that day comes.. I will have won.1
-
When you open someone else's "server" and it's one massive unholy mess where entering a new line freezes the whole thing for 3 full seconds...
-
I wonder why devs care so much about which programming language will die soon, so they keeping jumping from one language to another every year, while what I think is you will die before the language or you will be old by then and writing one line of code will be nightmare for you. Stop jumping languages jut get shit done.4
-
Posting this rant on behalf of a friend.
I cannot install Mac OS-X Sierra on my top-of-the-line desktop MacPro because Apple has decided they want me to buy a new one, therefore I cannot install iTunes 12.5, therefore I cannot sync my iPhone 6s or iPad Air 2 to my music, backups or apps. $&@# you too, Apple! 😡5 -
If you change all tabs to four spaces, no one will see your actual trashy changes in the line by line diff.
-
First Rant on here!
One of the most frustrating things I have come across in PowerShell is non properly implemented ErrorAction methods in Microsoft maintained modules.
When you are attempting to write a quick script with simple yet proper error handling and Microsoft fumbles the ball at the 1 yard line! -
Pretty recent one. I found that I can use Perl to edit files using a single cmd line (with regex search and replace). Loved it.
-
Your one-line JavaScript arrow functions AREN'T LEGIBLE! You've just memorized their shape. It's OK. But don't lie to yourself. They look super stupid. They aren't for humans.14
-
Note to self.. Check how your backup restore works before actually needing it...
Coworker got ransomware to his computer via targeted attack and managed to encrypt about 6000 files on Google Drive share... Which I have backed up. However there are a total of 100k files so total restore is not an option and with 60 users updating things can't do point in time restore either... And thanks to the backup softwares buggy cmd line interface I can't create command line script to restore the files one by one... So in the end I most likely need to restore via sluggish gui one by one...3 -
Started out as an intern at my current employer, after a few months they made me create an invoicing system...
I should have said no.
I've had a lot of bugs with it in the past, but the data-loss one has been because I send a SOAP call to our (third party) accounting system and only if I get an ERROR do I log it....
Apparently, when you put line 1 before line 0, you get a warning, but no data is processed...
Had to write a script that updated 4 months of invoice data in one go, without errors, took me a fucking week...
Lesson learnt boys and girls, never let an intern make the fucking invoicing system!rant wk98 stupid mistakes i need to get some rest tired af fml intern fuck my life never trust 3rd parties3 -
One day, being new in the team i was not sure of all the DB column decodes, asked my senior member to send me decode of a column.
He sent me a 300 line SQL query. Took me 30min to understand it. -
Sometimes people just don't understand the meaning of cleancode , it's so simple that....why not writing the whole code on one line?
FFS -
The best feeling ever is when a super long line of code is written that definitely should not be on one line, that one does not check over the logic for after writing, entered without pressing the backspace key, and it works first try.
-
Test: this time, I copy a line with line break, because, when I did this yesterday, it fucked up devRant web.
Not copied:
Five brave knights write code in one night for free, because they like it
Copied:
Five brave knights write code in one night for free, because they like it
Does this fuck up the web-version? If so, @dfox needs ta parsed a capied text and add the needed line-breaks...1 -
"Did you know that this popup saved the life of countless API calls by preventing users from frantically clicking the 'Continue' button?'
Another funny line I added to a dialog in my project today as one of its finishing touches :D -
5 fucking days of Google search after Google search. Error after fucking error. Deadline getting closer by the fucking minute. teammates interrupting me every 10 minutes over discord asking for help on their fucking part of the project
and it turns out the solution was just one damn line
One fucking line in a forEach to iterate over the model data sending the necessary aspects to the Javascript function to create map pins for the database locations
5 fucking horrible days all amounts to 1 line
Really shows how much I still have to learn. And the yelling at my screen reveals my need to take an anger management class1 -
That feeling when u delete 4months of coding work that u didn't deploy on git, with just one line of code ....😔😔😠😤..
I wanted to delete the virtual environment oo...6 -
One of my colleague ask me to review other team's code. I saw the code. It's terrible. Importing data from text file based on line break count and 52 'if else's conditions in one function and overall 173 'if else' conditions in one controller class. Fuck after seeing that code, I realize people in my project is more better than others. Thank God.
-
I've been watching hours of Rust programming streams. Looks like no one knows what they're doing. People depend on the compiler to fix their errors but can't write one line without getting an error.7
-
Man it is retarded how VS re-aligns your precompile statements to the BEGINNING OF THE FUCKING LINE EVERY TIME YOU ADD A NEW ONE.
Why does it do that in the first place, it looks ugly when it’s not in-line with the code, fucking stop it. -
TL;DR: Brainfuck & Abstraction is so cool!
One of my dreams is to make a Mandelbrot Fractal with Brainfuck as the one on Rosetta Code.
I'm too lazy... So i'm writing a Compiler for Brainfuck.
At now i have 900 line of Python code and the operation VAR, SET, ADD, SUB, MUL with nested operation compatibility, IF, ELSE, ENDIF...
Probably i will doing it fast directly with BF but damn if abstraction is so cool!!4 -
How do you plan before small software changes?
I have some extremely iterative approach where I change one function or one variable at a time, like a headless chicken. I am not planning beforehand which modules or functions I need to change but start from somewhere and like a linked list, I am moving on until the end.
But I feel like it is wasting my time. What is your approach when you want to have let's say -50 line of code changes?5 -
I love when I compile. Then I’m missing one character in a listener function. Compile again. Oops one other character. Compile again. Well WAHT the fuck is it now? I once spent two hours looking for an error in my CSS and my diff program (beyond compare) didn’t show spacing changes in a line.1
-
We were already running a few hours behind the official release time for this brand new game we had been developing when one of my coworkers became unwell.
We switched on the games translation system and it turns out that every line of dialog had been deleted and replaced with it's ID... Took us a few hours to recover the existing dialog before we could release. One of the worst situations I've been in... -
Call me a pussy, but I find it quite annoying to figure out why one of 30 of the values returned in a hash is wrong in a 600 line Ruby on Rails method.5
-
Well, that's a lovely youtube ad, if I ever saw one
XML Parsing Error: no root element found
Location: https://secure.jdn.monster.com/rend...-...
Line Number 1, Column 1:
^
By the looks of it, it may have been an ad for monster.com . -
Mass pole here:
Big Endian or Little Endian?
camelCase or UpperCase?
Brackets on new line or same line?
Apple or Android?
Favourite language?
What language do you despise?
Age? (Don't mean to be creepy with this one, I have my reasons)29 -
TIL following two lines are NOT the same in JS with webpack, even though logically they should be - it should be just an application of an eta reduction... First line works, second one crashes, probably because mysteriously executed too soon, before obj is initialized.
export const t = (...args) => obj.t(...args);
export const t = obj.t;
Sometimes I really hate JavaScript magic.2 -
Every once in a while I'm the stupid one at work. Was wondering why my Google Chart tooltips flickered on hover. Found some bug and a workaround on SO but it kept happening. Then I noticed the container div kept refreshing and I couldn't explain why. Until I commented all my code and by systematically enabling it line by line I noticed my dumb ass used setInterval instead of setTimeout. Well yes if you keep redrawing the chart it is going to flicker! *facepalm*
-
C/C++ considers pointers to be declared next to the variable name rather than the type name (int *x, *y vs int* x, y).
I know this but I still consider * to be more associated with the type. Therefore I'm one of those people who declare each variable in its own line and group the type and * together. (int* x; int* y)5 -
Why am I not a queen of blunders. I did one line wrong in the code, my senior has to spent a lot of time on it. I spent like 2 days on it. Turned out to be one of my blunders.
I am so tired. I am done. I will. complete my 4 years in industry soon and this ks what I do.
This is not the first time due to small issues things are delayed.2 -
I despise whovere come up with VBA IDE. Why is all the code confined within one window when multimonitor setups existed even back in the 14'' CRT era? And what sort of a fuckhead thought it's a good idea to throw a pop-up (with a notification sound!) every time you want to move from partially written line to a different one?
But hey, I managed to optimise the data parsing from 97 down to 3 sec.3 -
Shit my "Senior" Dev coworker days:
"Well, logically, lies are more important because it takes more effort to remember the lie, who you've told it to, and any extra stuff you made up to keep your story straight. Then, when you have more than one lie, you work even harder to keep them all in line".1 -
I was on a call with a colleague and we talked about my next tasks.
He was building some stubs and shared his screen with me so I knew what to do after he pushed these changes.
We talked about refactoring one method and he wrote "throw new NotImplementedException()" in the first line of the method and said: "I'm evil ;)". -
Can someone please explain the benefits of this in Kotlin:
var x = if(a !=b) {
z
}else{
y
}
Even for a conditions with one line body it looks bad in reading and getting a clue of what does this do.
I mean whats wrong with:
var x: MyObject
if(a!=b){
x = y
}else{
x = z
}
Even in switch cases (or as kotlin calls: when) True one return source, but now good luck finding the last line that is the actual returned value ...15 -
I realized that using hilbert curve, I can draw one continuous line on a closed mesh surface that has no holes, I’m not sure if it’s going to be beautiful though, but I’m gonna try it anyway5
-
4 hours later and my code is finally working and as usual it was only one line causing everything but on the bright side I now now how to use mocks and spies
-
few days ago: I assign ticket to new programmer
today: receive message "Hi, quick question: I have the task pretty much done. The only thing I am stuck on is {insert one line summary of task}. Is there an example file where this was done before? Or do you have any thoughts on this?"
ticket system: "{tags me} This is mostly done. just need help {insert one line summary of task}."1 -
That moment when you have to send a 3 line pull request for one of the newer guys to review immediately, and he gets super anal retentive over the order in which arguments appear2
-
Doing more and more config and admin stuff, dont know how i ended up here. Wrote a line of code today and felt great. Salesforce "development" is killing my spirit, one day at a time1
-
I frequently feel like crap when I have coder's block, and I can't for the life of me get another line of code down... I hope I'm not the only one that feels this way.1
-
Telling the intern that JS requires alternate semi colons (one every other line) and having him "fix" a script file...8
-
Anyone knows about that one website for dev ops, with tech or edu.net or sth along that line? Url isn’t that long.
Found it through one rant and op seems to be writing a series of tut or articles for data structure.
Now can’t find it back. Greatly appreciate ur help.4 -
Yesterday at midnight, I discovered why the Appveyor CI system for my project was failing sometimes for over three months.
If the commit message was only one line long, the environment variable holding the rest of them did not exist, and the function returned null.
One of the few times I don't say "The hell had I written!" when I discover a bug. -
Why does GDB always set the bloody break point one line above or below where I want it to be. This is driving me nuts. It's like its author deliberately planted a nasty practical joke in the code.3
-
the problem
https://cdn.discordapp.com/attachme...
the reasonable solution
https://i.imgur.com/tA3KG67.png
MY SOLUTION >:D
https://i.imgur.com/h0IHruK.png4 -
I have a couple of small ones, but one that stands out is actually fairly recent.
It was an independent project, more for practice than anything, but it involved fetching daily horoscopes from an RSS feed and showing it to the user upon request. I first just made it as a command line program,using some new modules I hadn't used before, and seeing everything work smoothly and neatly printed out made me super excited.
Not too long ago I even made a proper GUI for it using Tkinter, which also works nicely. :) Nothing so far has beaten that first excitement upon finishing the command line one, though. -
Is there any time tracking tasks management tool? One where I can manage all the tasks on the timeline(based on days).
I feel the urge to perceive how much a task is taking by looking at how long the line is on the timeline.6 -
Was the standalone android sdk manager, the one that has a gui, a problem for most of the android devs for it to be goddamn removed? The command line sdk manager (tools/bin/sdkmanager) is a fucking pain in the ass for fucks sake.
-
So I had been spending more than a week trying to figure out why the status messages which should show up after an AJAX request doesn't show up. Turns out, I kept removing it in the ajaxstop method... -_-
-
What's up with the new android update, everything is like big. Did they just changed one line of code like increase everything to big size ...lol3
-
For personal projects, I challenge myself to brevity. Like. I don't try to put everything in one line, but I really push it to the limits.1
-
Am I the only one around here who waits a second or two after a new line to see if I get a red scribbly line in the next line. (Usually a missing semicolon indicator)
Don't remember the last time I had a missing semicolon.
Anyone?2 -
Any word for feeling happy, stressed and accomplished all together at a time?
Story - Solved a major bug after digging into decompiled code stepping into each line for almost a day and half and later figuring that it requires just one line of change? -
Lets write the next big thing (tm)!
Rules: one line per post in any language.
I'll start:
while(true){14 -
Am I the only one that gets super stressed at the checkout, when buying groceries? I just want to pack my things and the whole line just judges me 😣3
-
How to write programs on Android 10 that work with files/directories? Have used a number of JVM-based languages like Groovy, Clojure and Kotlin.
My last try was with Groovy. I ran it under Dcoder which has to be cloud-, based as it supports numerous languages. I gave it permission to access storage but got a file not found error from Java. Copied this excerpt for the file path.
import java.io.File
class Example {
static void main(String[] args) {
new File("/storage/emulated/0/read_file.grvy").eachLine {
line -> println "line : $line";
}
}
}
Do I need root? Do I need to change file permissions using Termux? Why can't I find a way to write simple software on a Motorola Super, 3 GB RAM and 8 cores? I hate using a phone for a computer but a seizure has me in a nursing home with only one usable hand.
Any help is greatly appreciated.5 -
There are two types of developers in the world.
Type 1:
if(isLoggedIn) {
}
Type 2:
if(isLoggedIn)
{
}
Be in Type 1, you can't save world but at least you can save one line in file.2 -
God damn it, Gatling. Why didn't you put your fucking command line argument passing at the front of your docs instead of being buried under 'cookbook'? It's not a fucking recipe! it's core mother fucking functionality! "how do I run this command-line utility from the command-line by script?". "I don't know, maybe I should check the fucking cookbook since apparently it's not basic functionality that LITERALLY everyone using the fucking product will need!
So now I have to go back and parameterize one of the sims I've built AFTER I've mimicked our entire performance test matrix! FUCK! -
Apple watch 6
We use advanced algorithm to calculate your blood O2
Boohoo!! It’s a 2 line formula not a advanced algorithm
What a piece of shit
I might buy one though 🤓5 -
the law is millions of people fighting for months or years over one line of code
and you are meant to please the consortium of those poor senior developers that just sit all day on their offices reading every nook and cranny of an unwieldily codebase that's been mangled for hundreds of years -
First time I've had a problem with LF & CRLF.... Stupid university assignment wants us to store data in an EFFING TEXT FILE, so my Windows group mates were like "why are the data in the file all in one line?"
-
Anybody know of a visual studio extension where you can link a file + line number to another file + line number, all inline in the code so that as the file changes the links still work, so that you can easily jump around the codebase. One example would be linking an html element to a less class so that you dont have to open the less file, then look for the class or ctrl+f or whatever.1
-
My number one problem whenever I need to write original unique code is this question: "What's the next line supposed to say?"
I just really have a hard time knowing what the next thing is I'm supposed to write, even when I know pretty well what the thing is supposed to do.
Anyone else? -
I uncommented the line inside a custom "library" made by a friend on a college project.
We spent 3 hours trying to make it work...the bug line was supposed to call one of the result functions, but the code had been made in a way that it was a mess and impossible to find at first.
That felt good. -
Couldn't they come up with a shorter name than reinterpret_cast? It makes lines of code so much longer if you have multiple casts in one line. 😥1
-
I was asked by one of our project managers to create a new big API for a customer.. Next day I found out that he already sent a PDF (that he copied somewhere) to the client, containing documentation of the API before I even wrote a single line of code 🤐1
-
I was trying to complete some computer science coursework on an old school computer running Netbeans...
It took 10 minutes and lots of freezing to write one line of code which doesn't even work. -
[`script(x) ` for x in iterable if condition else command] [#:#]
Complex code in one line
#python
PS. That can be more complex, but I am lazy to continue with this -
How the fuck is this even possible Microsoft, apparently one line of code breaks web browser sandboxing on all chromium based browsers.
https://slashgear.com/windows-10-19...3 -
when you make a one-line hotfix and it accidentally fixed two bugs at once:
https://youtube.com/watch/... -
I got two files one called lte and the other called fcc2. The attached image is the fcc2 file. The first file is just a list of census blocks. 15 digit number per line on the lte file.I need help changing just the lines in the fcc2 file that have the same 15 digit number at the start of the line. Just need to change 2 variables in the line. FCC2 is a TSV file. any help would be appreciated.7
-
When python's print statement makes a new line every time but you already get one from whatever you're working with, "I don't wanna put a new line at the end of the line that already has a new line at the end of it."3
-
Started a new job at the same time as another guy. We are doing pull requests, I leave a comment about a one line improvement.
"This is not part of my task. If you want me to do extra run it past our bosses. You can't tell me what to do."
I despair. -
If a swat team comes now, I won't be surprised. I was reading the Zodiac's letter when I came across the bus bombing one. And the site included his diagrams! As I mentioned before I am on serval watchlists but I think I crossed the line with bomb diagrams.
-
Is it bad practice to write a line of code longer than the screen, meaning you need to scroll on the X? I've had one lecturer who hates it and one who doesn't give a shit and I'm not sure of the standard8
-
Annoying monday - nearly no code but useless things like trying to use a Windows keyboard on some old MacOS X
On the other hand: for the first time I wrote a one line for loop in bash that worked - without googling!1 -
I've had an issue with eel.js for the last two days , the shit has been giving me nightmares all weekend backend processes keep shutting down on page navigation turns out i had not imported eel on the index page.
For fucks sake it had to be that one single line of code -
Do you guys listen to any programming podcasts which do not just center around one particular programming language? Any podcasts regarding topics like universal programming concepts, history of programming etc. At the moment I'm listening to Command Line Heroes (from RedHat) but I have almost listened to every episode and need new stuff :)
-
My teacher just saied that C# naming conventions wan't use to always put brackets on our if statements even though their is only one line next to it.
Where did she get this from ? 😅10 -
Nothing like losing hours troubleshooting a problem caused by one line of math that was commented out.
Or having a 1.0 where you expected a 0.02 to be. -
Pick up work that lets me get some experience in Product Management and Client Requirements rather than just being a nocturnal cave dweller who only codes.
All to get me one step closer to knowing how to run my own business when hopefully the time comes a few years down the line.