Details
-
AboutOnce one of the highest ranked ranters, now just a guy who does things elsewhere.
-
Website
-
Github
Joined devRant on 6/9/2017
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
-
That sad sad moment you spot someone returning HTML in an ajax request 🥺
Why lord must you punish me?11 -
When your classmates are such lobotomites, that they manage to fry 11 fucking IC's within a day! And I am the one who has to find and replace all the broken stuff. FFS it says 9V right there on the board NOT 12V! No, your board should not draw 1.7AMPS! This chip is getting kinda hot. What is wrong? ONE OF YOUR FUCKING PROBES IS BRIDGING ONE OF THE PINS!
Why isnt this working correctly? You adjusted the wrong fucking potentiometer!
I know I have far more experience than most of my classmates, but man, atleast try to not break things by just thinking: "I dont know dis. (Its actually written in the docs!) So imma assume it will be fine if I do dis. It wasnt fine!"
Also IF something doesnt work, DO NOT TURN UP THE VOLTAGE ON THE CIRCUIT BECAUSE IT APPEARS TO BE THE CLOSEST POSSIBLE ERROR. Which in most cases it is not!7 -
My secret joy. Logging into our "automated email do not reply" mailbox and reading folks futile attempts to argue with an automated system5
-
Today, for fun, I wrote prime number generation upto 1000 using pure single MySQL query.
No already created tables, no procedures, no variables. Just pure SQL using derived tables.
So does this mean that pure SQL statements do not have the halting problem?
Putting an EXPLAIN over the query I could see how MySQL guessed that the total number of calculations would be 1000*1000 even before executing the query in itself and this is amazing ♥️
I have attached a screenshot of the query and if you are curious, I have also left below the plain text.
PS this was a SQL problem in Hackerrank.
MySQL query:
select group_concat(primeNumber SEPARATOR '&') from
(select numberTable.number as primeNumber from
(select cast((concat(tens, units, hundreds)+1) as UNSIGNED) as number from
(select 0 as units union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) unitsTable,
(select 0 as tens union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) tensTable,
(select 0 as hundreds union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) hundredsTable order by number) numberTable
inner join
(select cast((concat(tens, units, hundreds)+1) as UNSIGNED) as divisor from
(select 0 as units union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) unitsTable,
(select 0 as tens union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) tensTable,
(select 0 as hundreds union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) hundredsTable order by divisor) divisorTable
on (divisorTable.divisor<=numberTable.number and divisorTable.divisor!=1)
where numberTable.number%divisorTable.divisor=0
group by numberTable.number having count(*)<=1 order by numberTable.number) resultTable;9 -
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 -
Hello again, everyone. As Sunday comes to a close, and Monday is fast approaching, I'll share with you the likely cause of my death by stroke and/or heart attack:
MONDAY MORNING COFFEE OF HORROR
Disclaimer: Do NOT try this. I am a professional addict. I am not responsible for anything this brew from hell causes to you and/or those around you.
So, I wake up, feeling like I haven't slept for days, or just notice the fucking alarm clock shrieking because I pulled an all-nighter.
Step 1: Silence alarm clock via mild violence.
Step 2: Get the coffee machine to brew some filter coffee (espresso works too)
Step 3: Get milk and ice cubes from the fridge (both are needed, I don't care if you don't like milk, trust me)
Step 4: Get 2 spoonfuls (not tea spoon, and actually FULL spoonfuls) into the biggest glass you have
Step 5: Pour just a little of the warm filter coffee into the glass, just to get the instant coffee wet enough, and start mixing, until the result looks like the horror you unleashed in your toilet a few minutes ago (and will do so again in a few)
Step 6: Mix in 25-50 ml milk, just for the aesthetic change of colour of the devil-brew, and to add the necessary amount of lactic acid to react with the coffee to produce chemical X
Step 7: Add ice cubes to taste (if you are new to this, add a lot)
Step 8. Slowly add the filter coffee while mixing furiously, so that the light brown paste at the bottom get dissolved (it's harder than it sounds)
Now, take a deep breath. Before you is a disgusting brew undergoing a chemical reaction, and your moves need to be precise otherwise it will explode. Note that sugar or any other form of sweetener is FORBIDDEN, as it will block the reaction chain and the result won't be as potent.
Take a straw (a big one, not those needle-like ones that some cafeterias give to fool you into believing that the coffee is more than 150ml). Put it inside the mix, and check that the route to the bathroom is free of obstacles.
Now, clench your abs, close your nose if you are new to this, grab the straw and DRINK!
DRINK LIKE THERE IS NO TOMORROW!
THAT BROWN DEVIL'S BILE WILL HAVE YOUR INTESTINES SPASM AND DANCE THE MACARENA WHILE TWIRLING A HULA HOOP!
YOUR HEART WILL GO OVERDRIVE HARDER THAN YOUR PC'S CPU WHEN COMPILING ON ECLIPSE AND BROWSING WITH IE AT THE SAME TIME.
The combination of caffeine and lactic acid will bring out the perfectly disgusting combination of sour and bitter usually expected in rotting lemons. After you manage to chug it down (DON'T SPILL OR SPIT ANY!) you have 30 - 60 seconds max to run to the porcelain throne, where you will spend the next 30-60 minutes.
After that, nothing can stop you! You will fix bugs, write entire codebases from scratch, punch that annoying coworker, punch that boss! You will be a demigod among mortals for the next 6-8 hours!
Your recipes for Monday morning coffee?15 -
Who the fuck donated 3 USD to my Ko-fi
who are you
why did you donate to a useless person
why do you make me hunt you irl
why
h19 -
Here’s a poster with a super short description of each one to help you keep track and find some new useful Linux tools.16
-
i submitted my first app to the app store yesterday. i built it with flutter, and it's already on the play store.
for some reason - i probably created the app wrong - the app store connect/portal needed screenshots of my app running on an ipad pro. now i don't have an ipad pro, and i can't use an emulator because i don't have a mac for that matter (i have been using codemagic.io for builds). i called friends - they don't have any ipads.
what did i do?
i turned my phone sideways and scaled it to the ipad pro resolution.
it is currently "in review"
🙏let's hope this works8 -
Presenting: my weather app (not made by me).
https://play.google.com/store/apps/...
"The Fucking Weather"10 -
Hi, I am the programming director of my FRC team from Israel, MisCar 1574. In this competition, the robots operate autonomously for the first 15 seconds scoring points and than for the rest of the match which is 2:15 minutes the robots are being controlled by drivers. Before the Detroit world championship we uploaded a showcase video of our autonomous, we reached a pretty good level and as the programmers we requested a specific song to be used in the video. This song is called in Hebrew "Yam Hashibolim" and it has a meaning to us, this is what we listened to while working hard every night until about 4:30 am in order to do this. But our media team didn't listen to our request even when all the other team members were with us on this. We would like your help convincing them by commenting #YamHashibolim on this video https://youtu.be/x7wPmq_Fa0Y
If you also participate in the FRC, you are welcome to add your team number like #YamHashibolim - team XXYY
We would really appreciate any help from you 😊19 -
Hello everyone, found this place recently, decided to bore you with one (or many) Navy story... tech Navy story. I'll start from the end.
Little backstory: I've deployed a simple domain setup on the ship I served, nothing fancy, a server, a switch, 10 computers, all Windows (details on that at another rant). I enter the ship Monday morning, and the XO tells me that he can't access his online folders.
OK, I say, I'll get to it. I fire up my laptop, try to RDP to the server (I know, I know, burn me at the stake later) no connection. WTF? Is the service down? I try pinging. No luck. I tried pinging the switch. OK. Looking at the switch admin panel, I see the server's port is dead. "OK, probably the cable." (we have old ethernet cables)
So, I drag my ass over to the server (same room with ship comms) with the cable tester to confirm that. What do I see?
The IMBECILES had pulled the plug from the server so that they could charge their mobile phones. I literally slammed my head against the door (calming exercise in case of spontaneous murder impulses - the things you learn at the Academy). My CO was nearby, and lucky for the guys, he heard me yell at them, while throwing mobiles and chargers around.
"But we thought it was OK, we just wanted to charge our-"
I kid you not, I reached for the firefighter's axe.
My CO grabbed me by the collar and dragged me to his room. I explained to him (between two cigarettes) that we MUST get a UPS and a server cabinet (budget constraints in the military are something that will give you people nightmares, trust me). I carefully explained to him that unless we got those, nothing would prevent the next moron from destroying confidential data and me from murdering him.
I plugged in and booted the server, after installing a multi socket extension. Two days after, surprise surprise, the server was off again. That was the first time I opened the door to the CO's room with a low kick. I must have looked like a psycho on drugs, he gave approval for the purchase in twenty seconds flat.
After that, I installed the UPS and the cabinet. Everything went inside, from the UPS to the very plugs. Just a locked box with cables coming out.
One of the guys came to my room, and asked if I could unlock the cabinet so that they could plug a "device" they needed.
I actually reached for my folding knife.
Disclaimer: The story above is TRUE. Even the almost violent parts.23 -
And here comes the last part of my story so far.
After deploying the domain, configuring PCs, configuring the server, configuring the switch, installing software, checking that the correct settings have been applied, configuring MS Outlook (don't ask) and giving each and every user a d e t a i l e d tutorial on using the PC like a modern human and not as a Homo Erectus, I had to lock my door, put down my phone and disconnect the ship's announcement system's speaker in my room. The reasons?
- No one could use USB storage media, or any storage media. As per security policy I emailed and told them about.
- No one could use the ship's computers to connect to the internet. Again, as per policy.
- No one had any games on their Windows 10 Pro machines. As per policy.
- Everyone had to use a 10-character password, valid for 3 months, with certain restrictions. As per policy.
For reasons mentioned above, I had to (almost) blackmail the CO to draft an order enforcing those policies in writing (I know it's standard procedure for you, but for the military where I am it was a truly alien experience). Also, because I never trusted the users to actually backup their data locally, I had UrBackup clone their entire home folder, and a scheduled task execute a script storing them to the old online drive. Soon it became apparent why: (for every sysadmin this is routine, but this was my first experience)
- People kept deleting their files, whining to me to restore them
- People kept getting locked out because they kept entering their password WRONG for FIVE times IN a ROW because THEY had FORGOTTEN the CAPS lock KEY on. Had to enter three or four times during weekend for that.
- People kept whining about the no-USB policy, despite offering e-mail and shared folders.
The final straw was the updates. The CO insisted that I set the updates to manual because some PCs must not restart on their own. The problem is, some users barely ever checked. One particular user, when I asked him to check and do the updates, claimed he did that yesterday. Meanwhile, on the WSUS console: PC inactive for over 90 days.
I blocked the ship's phone when I got reassigned.
Phiew, finally I got all those off my chest! Thanks, guys. All of the rants so far remind me of one quote from Dave Barry:7