Details
-
AboutAustrian Engineering Graduate - currently getting fucked in the ass by mandatory military service.
-
SkillsC++, Java, C#, SQL and LOLCode
-
LocationAustria
-
Website
-
Github
Joined devRant on 6/2/2016
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
-
I sometimes correct people's PRs from under the shower or from the toilet, but my favorite place to code are in the dune forests (Netherlands).
Most unusual place would be operating room at the hospital though, getting my leg/foot bugfixed after a car accident. I asked the surgeon if it was OK if I brought my phone in, to distract myself, so I went through some code cleanup tasks.3 -
I want Gordon Ramsey to start a IT program in the same fashion as Hotel Hell and Kitchen Nightmares
He'll sit at a desk with a laptop, examining code as if he's eating food, venting frustrations and screaming insults out loud
Then he'll have a talk with the team and see how they work on a day
After that he'll go into the freezer (server room) and scream at mold and cockroaches
Then comes the intervention where we discover that the PM is still grieving about the death of his original programming language and the team loves him but thinks he should move on
The next day the development studio is modernised and has a candy bar, tennis table and everyone is forced to use linux on their new macbooks
Then we experience a good day where everything is great and velocity is through the roof
Then Gordon leaves and everything is shit again17 -
This facts are killing me
"During his own Google interview, Jeff Dean was asked the implications if P=NP were true. He said, "P = 0 or N = 1." Then, before the interviewer had even finished laughing, Jeff examined Google’s public certificate and wrote the private key on the whiteboard."
"Compilers don't warn Jeff Dean. Jeff Dean warns compilers."
"gcc -O4 emails your code to Jeff Dean for a rewrite."
"When Jeff Dean sends an ethernet frame there are no collisions because the competing frames retreat back up into the buffer memory on their source nic."
"When Jeff Dean has an ergonomic evaluation, it is for the protection of his keyboard."
"When Jeff Dean designs software, he first codes the binary and then writes the source as documentation."
"When Jeff has trouble sleeping, he Mapreduces sheep."
"When Jeff Dean listens to mp3s, he just cats them to /dev/dsp and does the decoding in his head."
"Google search went down for a few hours in 2002, and Jeff Dean started handling queries by hand. Search Quality doubled."
"One day Jeff Dean grabbed his Etch-a-Sketch instead of his laptop on his way out the door. On his way back home to get his real laptop, he programmed the Etch-a-Sketch to play Tetris."
"Jeff Dean once shifted a bit so hard, it ended up on another computer. "6 -
Ideas for a strong password:
- a regex matching my laptop's LAN IP address
- a sed command to enable X11 forwarding in sshd_config
- a shell oneliner extracting all the IP addresses from ifconfig / ip a sh
- an awk command to print processes in D state
-
Chip in!15 -
During an interview today for angular:
In the last section of interview female staff:
She : Do you have a girlfriend?
Me : Nop
She : Why do not you have a girlfriend? Guys at your age has girlfriends.
Me : ( Died inside )
Boost me up.. #cod4 , #Root . Whoever over there.. Boost my confidence37 -
So, me and my girlfriend were on a discord call and she said to me: "You know how you can get lost in someone's eyes? Well, I get lost in your code".
I've never been more touched and conflicted in my life. 🥰🤨6 -
If your IDE found
10 errors
and 47 warns
would you correct them
or let them slip.
YO ...
His palms are sweaty
Knees weak, arms are heavy
The tests are failing already
Code spaghetti.
He's nervous,
But at his laptop he looks calm and ready
To squash bugs
But he keeps on forgetting
What he wrote down, the whole team goes so loud
He opens his file, but the code won't come out
He's chokin', how, everybody's jokin' now
The deadline run out, times up, over, blaow!
Snap back to reality, oh there goes file integrity
Oh, there goes documentation, he choked
He's so mad, but he won't give up that easy? No
He won't have it, he knows his whole header's code
It don't matter, he's dope, he knows that, but he's broke
He's so stacked that he knows, when he goes back to his mobile home, that's when its
Back to the office again yo, this whole rhapsody
He better go capture this moment and hope it don't pass him
Note: All credits to the original owners of these phrases.5 -
I actually lent a girl an umbrella yesterday which takes the total number of girls I've made wet this year to -1.12
-
This is more just a note for younger and less experienced devs out there...
I've been doing this for around 25 years professionally, and about 15 years more generally beyond that. I've seen a lot and done a lot, many things most developers never will: built my own OS (nothing especially amazing, but still), created my own language and compiler for it, created multiple web frameworks and UI toolkits from scratch before those things were common like they are today. I've had eleven technical books published, along with some articles. I've done interviews and speaking engagements at various user groups, meetups and conferences. I've taught classes on programming. On the job, I'm the guy that others often come to when they have a difficult problem they are having trouble solving because I seem to them to usually have the answer, or at least a gut feel that gets them on the right track. To be blunt, I've probably forgotten more about CS than a lot of devs will ever know and it's all just a natural consequence of doing this for so long.
I don't say any of this to try and impress anyone, I really don't... I say it only so that there's some weight behind what I say next:
Almost every day I feel like I'm not good enough. Sometimes, I face a challenge that feels like it might be the one that finally breaks me. I often feel like I don't have a clue what to do next. My head bangs against the wall as much as anyone and I do my fair share of yelling and screaming out of frustration. I beat myself up for every little mistake, and I make plenty.
Imposter syndrome is very real and it never truly goes away no matter what successes you've had and you have to fight the urge to feel shame when things aren't going well because you're not alone in those feelings and they can destroy even the best of us. I suppose the Torvald's and Carmack's of the world possibly don't experience it, but us mere mortals do and we probably always will - at least, I'm still waiting for it to go away!
Remember that what we do is intrinsically hard. What we do is something not everyone can do, contrary to all the "anyone can code" things people do. In some ways, it's unnatural even! Therefore, we shouldn't expect to not face tough days, and being human, the stress of those days gets to us all and causes us to doubt ourselves in a very insidious way.
But, it's okay. You're not alone. Hang in there and go easy on yourself! You'll only ever truly fail if you give up.32 -
Was going to get some REST but her API was wide open:
PUT my/boner/inside/her
413 Request Entity Too Large
Fuck.14 -
There is this thing called the Pulfrich effect (https://youtu.be/Q-v4LsbFc5c a Tom Scott video about this).
Since I have 3 monitors, I decided to write a small C++ program which copies the image from the first monitor to the second and, with 5ms delay, also to the third.
That way I can sit down like 5 meters away and squint a bit to make both copies overlap. This creates a 3D effect for about half of the time of any moving video.
If you watched the video at the top you should know why, if the right image comes later the background has to move as in the video, and vice-versa.
Just some random thing that came to my mind and it's actually awesome! -
What is a pointer?
A descriptive and ELI5 answer found on Reddit:
You have a house.
When you’re outside, and you want to go home, you don’t make another house right where you are, because it’s too big for you to carry around or take apart.
So you carry a piece of paper or store on your phone the address of your house. Now you always know exactly how to find your house so that you can go home.
The piece of paper or your phone is a variable.
The variable contains an address (a reference) to your house.
You can make a copy of this piece of paper and hand it out to your friends when you invite them over, instead of building each friend a copy of your house.
You can have an address book filled with pages, where each page is an address (i.e., an array of pointers). Each page you turn (each index you increment) goes to the directly next address-containing variable.
Now if you cut the address book in half along its height, and then attach the lower half behind the upper half, then you have a book with smaller pages but more pages.
You can store phone numbers in this, and even if it’s the same total size, you have double the number of pages and double the number of phone numbers (if you store one number on each page).
Now, since the pointers to home-addresses are different from pointers to phone-numbers, turning the page in an address book (increment pointer by 1) moves forward by one address.
But turning the page in the phone book (incrementing pointer by 1) leads you to the next phone number, even if you technically turned only “half a page”.
That’s how pointer arithmetic works.
Source: https://reddit.com/r/...8 -
I've found and fixed any kind of "bad bug" I can think of over my career from allowing negative financial transfers to weird platform specific behaviour, here are a few of the more interesting ones that come to mind...
#1 - Most expensive lesson learned
Almost 10 years ago (while learning to code) I wrote a loyalty card system that ended up going national. Fast forward 2 years and by some miracle the system still worked and had services running on 500+ POS servers in large retail stores uploading thousands of transactions each second - due to this increased traffic to stay ahead of any trouble we decided to add a loadbalancer to our backend.
This was simply a matter of re-assigning the IP and would cause 10-15 minutes of downtime (for the first time ever), we made the switch and everything seemed perfect. Too perfect...
After 10 minutes every phone in the office started going beserk - calls where coming in about store servers irreparably crashing all over the country taking all the tills offline and forcing them to close doors midday. It was bad and we couldn't conceive how it could possibly be us or our software to blame.
Turns out we made the local service write any web service errors to a log file upon failure for debugging purposes before retrying - a perfectly sensible thing to do if I hadn't forgotten to check the size of or clear the log file. In about 15 minutes of downtime each stores error log proceeded to grow and consume every available byte of HD space before crashing windows.
#2 - Hardest to find
This was a true "Nessie" bug.. We had a single codebase powering a few hundred sites. Every now and then at some point the web server would spontaneously die and vommit a bunch of sql statements and sensitive data back to the user causing huge concern but I could never remotely replicate the behaviour - until 4 years later it happened to one of our support staff and I could pull out their network & session info.
Turns out years back when the server was first setup each domain was added as an individual "Site" on IIS but shared the same root directory and hence the same session path. It would have remained unnoticed if we had not grown but as our traffic increased ever so often 2 users of different sites would end up sharing a session id causing the server to promptly implode on itself.
#3 - Most elegant fix
Same bastard IIS server as #2. Codebase was the most unsecure unstable travesty I've ever worked with - sql injection vuns in EVERY URL, sql statements stored in COOKIES... this thing was irreparably fucked up but had to stay online until it could be replaced. Basically every other day it got hit by bots ended up sending bluepill spam or mining shitcoin and I would simply delete the instance and recreate it in a semi un-compromised state which was an acceptable solution for the business for uptime... until we we're DDOS'ed for 5 days straight.
My hands were tied and there was no way to mitigate it except for stopping individual sites as they came under attack and starting them after it subsided... (for some reason they seemed to be targeting by domain instead of ip). After 3 days of doing this manually I was given the go ahead to use any resources necessary to make it stop and especially since it was IIS6 I had no fucking clue where to start.
So I stuck to what I knew and deployed a $5 vm running an Nginx reverse proxy with heavy caching and rate limiting linked to a custom fail2ban plugin in in front of the insecure server. The attacks died instantly, the server sped up 10x and was never compromised by bots again (presumably since they got back a linux user agent). To this day I marvel at this miracle $5 fix.1 -
You know those youtube channels that just read r/askreddit threads word by word? Yeah i fucking hate them so im automating that shit.
This is how far im right now, the images and voices are generated, now just have to somehow grab some vlog music randomly and automate video creation.
https://youtube.com/watch/...9 -
Whatever you do, don't do this.
- a sleep for 300s to avoid full 24 hour rollover (lol)
- sleep 1d instead of cron; so at random times emails will be sent out or they won't at all
- this is a laravel project, there's a thing called task scheduling: https://laravel.com/docs/5.8/...
Git blame: https://github.com/invoiceninja/...
The actual core project docs at least tell you to setup a cron, though not via * * * * * nor task scheduling, which isn't as much of an issue though as their dogshit docker compose: https://invoice-ninja.readthedocs.io/...6 -
My mom never touched a PC or smartphone. Well, most people didn't back then, because it was the early 90s.
But I brought a borrowed SNES to the hospital and taught her to blow on the Zelda cartridge if it didn't work. She died after we finished the game.
After that my dad bought me a commodore 64, the machine that taught me about electronics and programming, and molded me into who I am today.
On the first date with my girlfriend (now 12y together) we just sat talking for hours in her room, playing Zelda on her SNES taking turns, and I told her my mom would have liked her.14