Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
So I was looking over some code(from the backend team, not his) my friend(frontend dev) gave me, to see why it was performing slowly.
It was a piece of business logic, that performed operations on the main db (~100GB in size, so not too big).
A simple operation usually took upwards of A DAY to complete.
A quick calculation of the big O number of the algorithm gave me O(n^3+n^2+n). One operation usually took place on n=1000. This thing ran on an EXTREMELY powerful server with a lot of ram and managed to do ~10000 operations/second of that logic.
Even with that, that's still ~27hours for one operation.
I managed to reduce that logic to O(2n), meaning that it runs in ~0.2 seconds, which feels good, but;
FUCK YOU, YOU INCREDIBLY INCOMPETENT IDIOT, WHOEVER YOU ARE, YOU MORON THAT WROTE THIS PIECE OF BURNING TRASH! HOPE SATAN FUCKS YOU WITH THE UNHOLY HIV CACTUS FOR ALL ETERNITY!
PLEASE MAY I NEVER FIND YOU!8
To those people who do not consume drugs(alcohol is one too)/anything that contains teein/coffein/any other substance affecting your conscience semi regularly (like a coffee/day or a beer a month at the very least):
How do you guys do it?
How do you stay sane and productive from the morning to the night
both at work/school and for your personal projects
admits all the incredibly incompetent infuriating idiots (alliteration, yay) around you?
For fucks sakes people.
Ocamms razor is a very helpful problem solving tool.
HOWEVER IT ISN'T AN EXCUSE FOR NOT HAVING A PROPER ARCHITECTURE, OR SHITTING ON IT, HAMMERING RANDOM IFs EVERYWHERE, USING A METRIC SHITTON OF MAGIC NUMBERS HAVING A LOT OF REDUNDANT CODE AND ZERO DOCUMENTATION!
YOU CAN'T DO THAT "just because it's the simplest solution"! NO. THAT'S JUST UNACCEPTABLE. YOU ARE A HORRIBLE PERSON.
GO TO HELL YOU STUPID SCUM WITH YOUR PILE OF CHOPSTICKS BURNING THAT IS YOUR CODEBASE!
But before that, would you mind touching these two wires definitely not connected to the mains?3
X-Ray Zulu Victor Foxtrott
Hotel Alpha Sierra
Lima Echo Alpha Romeo November Echo Delta
Tango Hotel Echo
November Alpha Tango Oscar
Papa Hotel Oscar November Echo Tango India Charlie
Alpha Lima Papa Hotel Alpha Bravo Echo Tango
Tango Oscar Delta Alpha Yankee7
This rant is a 3 for 1...
1) I forgot to add to my goals:
At least a commit a day.
2) What are you guys doing right now?
I'm quite bored, so I'm looking at userfriendly comic strips...
3) Happy new year!3
Merry Christmas everybody!
For all of those poor souls that are family tech support today, here's a message from xkcd.11
My *nix-hating father (thinks it's unstable, unusable, etc) called me from work yesterday.
Father: "Hey, uhm.... Can you help me? I've got these 800 PDFs with ~80 pages and 10-20 pictures each and I need to extract all the images with their captions and print them in A5 size, so two on each sheet. I can't figure out how to so it, without clicking on each image*
Me: "Sure." *prays to the imagemagic gods* *copies the files* *writes shell script* *20 minutes later calls back*
"Here you go."
F: "Thank you so much! You saved me hours of work! Now I just need to sort them by if it's for _salesDepartment_ or for us (_HWEngDepartment_) for printing"
M: "Why didn't you say so? By what are they distinguished?"
F: "By their captions, ours contain _listOfWordsIWontDisclose_ the sales' ones contain _salesCrapBuzzwords_"
M: "Give me a bit, you won't need to do this manually"
*writes AWK to check what department the caption belongs to, and integrate it into the script, which noe outputs two huge PDFs instead of one, one for each department*
M(calls back): "Here are the two PDFs for printing"
M: "Remember how you said Linux is impractical and shit, what do you say now?"
The moral of the story:
1) Knowing how to script can save you loads of time
2) Never try to do repetitive work manually.16
That is some great pricing!
People, seriously, how hard is it to SANITY-CHECK SERVER RESPONSES!?
(Especially if like here, this content is displayed by JS)7
Christmas holidays have begun for me!
Time to work quite on some projects I haven't had time to work on.
And in true @Haxk20 fashion, the first thing I'll do is to update my kernel.5
So my wireless headphones' battery is non-existant.
IS A SIMPLE NULL-CHECK TO MUCH TO ASK? OR TO DISPLAY AN ERROR MESSAGE, WHEN YOU FAILED TO RETRIEVE IT?
This is a known bug, I reported almost a year ago and happens regularly.2
I looked through some C code for an MCU from an "experienced developer" who had trouble with fitting the program into memory.
I looked though the code and found these horrors:
0. No functions aside from main(). Not necessarily a problem, if the program was simple, BUT: SHE HAD 107(actually counted, thanks vim) LABELS(where the goto instructions jump to) IN THE 4k LOC MAIN FUNCTION LABELED lab000, lab001, lab002 etc.
1. NOT A SINGLE COMMENT IN THE SINGLE 4k+ SOURCE FILE!
2. long long was the only integer type for her. THIS MORON USED A 64-BIT VALUE FOR LOOPING THOUGH THE NUMBERS 0-15!
(The reason why the program needed a shitton of memory, was also simmilar. It needed to store 1k values that fit into 8 bits, but of course this idiot uses long long instead of char)
Her bullshit response: If I use long long I don't have to worry about overflows.
WHAT A FUCKING MORON. I REALLY WISH SHE SPENDS ETERNITY BEING FUCKED BY TWO DEVILS FOR THE FRONT AND BACK WITH AIDS COVERED BURNING CACTI!
Why are idiots like her devs?33
My birthday will be on January 14th.
Who will remember it? Family, friends or random strangers of the internet?20
What do you call someone who is sick of CLIs?
I'll see myself out....
Should I jump?12
This is the ping on my current "internet connection" in school.
(No screenshot, because I have to post this from mobile data on my phone for obvious reasons)10
These are the usual devices and ports connected to my laptop during normal operation.
HOW THE FUCK ARE YOU SUPPOSED TO WORK WITH MODERN SHITBOOKS THAT EVEN LACK ETHERNET!?!?23
I JUST NUKED MY SYSTEM BECAUSE OF A TYPO!
$ sudo chown -R be /
$ sudo chown -R data
Even though I theoretically chown'd everything back to root, don't think my system will survive a reboot.
Su & sudo no longer work. I just hope I still have an install image sonewhere.19
1) I have a five day weekend, hurray!
Time to work on some projects!
2) Tomorrow I'll be at electronica in Munich, is anyone else coming?2
Audio stuff is cool.
I've got this mixer and 2 giant speakers "liberated" from the school for a couple of weeks, so they are now in my dorm room.
Total overkill, but dials, dials, faders and THAT BASE!9
I fucking hate winter time in Germany(not in Hungary though, there it's bearable)!
I don't need much sleep, but what I need is sunlight when I wake up, else I can't function! Now I have to wake up & go to school in the dark and I can't properly think.
Fuck Astronomy and fuck the universe for not making the rotation axis of the earth perpendicular to it's orbit around the sun.
Also, the FUCKING ASSCUNTS WHO DECIDED SCHOOL&WORK SCHOULD START SO FUCKING EARLY, SHOULD GET FUCKED WITH A RUSTY NEEDLE COVERED, HIV INFECTED LOG(use as a dildo, insert rectally)!6
What language do you use in production? I'm asking, because I heard of some Haskell based backends and I wanted to know if more non-mainstream languages are semi-comminly used in production?10