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 - "riddle"
-
Coding won over my first girlfriend!
My senior year of high school I taught myself C++ and thought it was the coolest thing (lol). So I wrote a stupidly simple program that would ask your name and output a random riddle. But if the name was hers it was a riddle in which case the answer was "a date". Looking back, even if she was on my robotics team it was the nerdiest thing.
We dated for 8 months and broke up as friends. But to this day it provides a great story as I pursue software development.4 -
Interviewer: can you write a code snippet to explain function overriding
Me: *gives a practical example *
Interviewer: *not satisfied*
Me: what would be a proper example for the question?
Interviewer: *writes a text book example *
Her example didn't even need inheritance in the first place. It's one of those forced examples.
Next question: a riddle. Yes, a riddle4 -
A riddle but a rant.
Q: Which JavaScript keyword could best represent human?
A: `` switch ``
Because in general, human needs `` break ``.
Sorry, I'll leave for this bad riddle now...2 -
Riddle me this Batman, why am I constantly afraid that other developers are going to fuck up my work after my time on the codebase?13
-
Building a wheel is great.
Building a steering wheel is also great
Building a brakes pedal is amazing.
Making them work asynchronously - not that good of an idea is it...
Who the fuck thought separating data stream (copying bytes) from stream control (when does the stream start/end) is a good idea...?
- open a connection
- send data to the stream
- send() returns
- close the connection
Apparently, the send() does not copy the data and returns. Instead, it enqueues the data copying task end returns. When does the actual copying start? IDK. When does it end? IDK. Can I close the conn? NO!
This thing is UNUSABLE. And I'd riddle it with reflection-based workarounds if it weren't for the static methods.
Fuck!3 -
I've got a puzzle! How well do you know the weird GNU coreutils error messages?
$ rm foo/
rm: cannot remove 'foo/': Is a directory
$ rm -r foo/
rm: cannot remove 'foo/': Not a directory
What am I?7 -
Riddle me this:
While calculating software reliability in number of faults per million line of code, would the software become more reliable if the number of lines are increased instead of errors reduced 🤔8 -
I solved this riddle/puzzle. Now my inner completionist split into two and both are arguing what is worse: taking the solved puzzle apart or leaving the 15 remaining possibilities unsolved...
*rips of his face* 💀3 -
Heey, it's me, D3add3d! As you might remember there was a crypto riddle posted by @Kimmax approx. a month ago. Now I'm here with another crypto riddle, it should be fairly easy one. The previous riddle was based on PGP so no rotation of alphabet was involved.
Here is the riddle:
SnJ5eSBxYmFyLCBndXIgZmJ5aGd2YmEgenZ0dWcgYWJnIG55am5sZiBvciBib2l2YmhmIG9oZyBndXZheHZhdCBiaGcgYnMgZ3VyIG9iayB2ZiBwcmVnbnZheWwgdXJ5Y3NoeSwgeHJyYyBndXIgbmFmanJlIGdiIGxiaGVmcnlzIGhhZ3Z5IHJhYmh0dSBjcmJjeXIgdW5pciBmYnlpcnEgdmcsIGdiIGNlYmlyIGxiaCBmYnlpcnEgdmcgcGJ6enJhZyBuYSByemJ3diAiY25weG50ciI=
(image irrelevant to the riddle)26 -
Riddle:
Alice and bob want to communicate a secret message, lets say it is an integer.
We will call this msg0.
You are Chuck, an interloper trying to spy on them and decode the message.
For keys, alice chooses a random integer w, another for x, and another for y. she also calculates a fourth variable, x+y = z
Bob follows the same procedure.
Suppose the numbers are too large to bruteforce.
Their exchange looks like this.
At step 1, alice calculates the following:
msg1 = alice.z+alice.w+msg0
she sends this message over the internet to bob.
the value of msg1 is 20838
then for our second step of the process, bob calculates msg2 = bob.z+bob.w+msg1
msg2 equals 32521
he then sends msg2 to alice, and again, you intercept and observe.
at step three, alice recieves bob's message, and calculates the following: msg3 = msg2-(alice.x+alice.w+msg0)
msg3 equals 19249. Alice sends this to bob.
bob calculates msg4 = msg3-(bob.x+bob.w)
msg4 equals 11000.
he sends msg4 to alice
at this stage, alice calculates ms5.
msg5 = (msg4-(alice.y)+msg0.
alice sends this to bob.
bob recieves this final message and calculates
the sixth and final message, which is the original hidden msg0 alice wanted to send:
msg6 = msg5-bob.y
What is the secret message?
I'll give anyone who solves it without bruteforcing, a free cookie.18 -
Riddle me this
Client wants solution based on open source software.
Any additional software that I write (let's say, an offline store plugin for Feast feature store) to add missing functionality has to be closed source.
Fuck you. Intellectual property my ass. You and me wouldn't even have projects if it werent for OSS.
Good luck maintaining the plugin after I am gone.
I'm doing a lot of work and will have close to nothing to show to future employers.
(BTW, if it were for the old Microsoft model of code source, I would have never become a programmer of any sort. God bless OSS)3 -
Just solved this riddle hidden in my friend's agency homepage. www.webfactory.ie. I am not looking for a job myself, but the riddle was fun anyways (despite short).1
-
Not a coding challenge, it was more of a logical problem.
"You are given 7 ball, all equal in size but one is slightly heavier than the other 6. You have to find the heaviest ball and you are allowed to use the scale only twice."10 -
The devRant gods got me puzzled again
The api for voting posts is
*/devrant/rants/id/vote/*
But for comments is
*/comments/id/vote/*5 -
Dev related. But more of Westworld related. Definitely not a rant.
Westworld season 2 poster has this code. Any guess? Redditors going nuts on it.
687474703A2F2F6269742E6C792F3246447A696567
Ref : https://redd.it/86d80u1 -
Scala's default Seq is MUTABLE. Why the fuck do I want mutability in my functional scala code!?
Now I have to riddle my code with imports to scala.collection.immutable.Seq which looks just ugly.
Gosh dangit.3 -
I just finished up figuring out this long ass riddle. Perhaps, y'all would be interested in taking a nab at it.
https://challenge.hiringsolved.com/...15 -
Darkest client description.
With a gift since birth, if you answer this riddle: Who I be?
The fetus of a demon,
Semen from the tip.
Of the penis I'm the only thing
That you see when you're dreaming,
Armageddon and aftermath
This may blog in paragraphs.
Sit on a throne, full of X's and bones
Blowing smoke and I laugh.
Turning sinners like you,
Into my personal acid tabs.
Let me put you up on game,
I've been shot, burned, and stabbed, and still ain't deceased,
I carry the mark of the beast
Now can you tell me
Who the fuck I be?
Client, as the guyreplies
Wine, red wine was the color of his eyes
Coughing a lot of blood like Piru, but he slowly dies
As his eyes close shut, in prison was his eternal life
Realisation of the client being devil.2 -
I'm currently between jobs and have a few rants about my previous job (naturally). In retrospect, it's somewhat therapeutic to range about the sheer brainfuckery that has taken place. Enjoy!
First, let me set the scene: legacy B2B web app made with LEMP stack and sencha ext.js 3 + 4 (don't ask) and a lot of madness. Let's call that app "Alpha".
Alpha is a self made CMS build for typical ERP stuff. Yes, a self made CMS: entities are containers, containers have types and fields and values. Like so many legacy PHP apps, it does not have a dedicated FE: the HTML is rendered on the server and then spewed out to the browser.
Easy right? Coding like it's 1999! But there was a twist: Because everything is basically a container, the HTML-templates are saved in the DB. Along with the nessary JS and the CSS. And the translation variables. Why? Because fuck you! That's why. Who needs a git history anyways.
For some reason, Alpha was kinda slow.
There was also an editor, that allowed you to modify templates (web, mail, pdf) on the fly in prod. Because templates contain repeating data (header/footer), one template could contain additional templates. Much confusion. You could change templates via migration (slow, boring) or just ctrl-c/ctrl-v that sucker (fast, much excitement).
Did I mention Alpha was slow?
On with the rant: e-mails! How do they work? Noone knows. How to send mails asynchronous in PHP? Witchcraft is the only possible answer to that riddle. Here is your enterprise™ solution:
1. create mail
2. insert mail into DB
3. WAIT UP TO 59 SECONDS FOR A FUCKING CRON TO SEND MAIL
Why? "Because that way, we can resend mails in case the network is down :)"
Same procedure for the SOAP-API (db-queue + cron). You read that right: all requests to various other systems are processed once a minute.
Alpha slow.
Alpha was only one of several systems. Imagine a bunch of monolithic php apps, interconnected via SOAP, REST and GraphQL like a godamn intergalactic orgy. Image having to debug that cluster fuck.
Let's say there is a bad request. These things happen. No biggie. Remember the db-queue? Let's try to send the bad request a second time! And a third time! Still no luck? How odd. Let's create a specific file in a specific directory: a LOCK-file. Now, "the db-queue is on hold and no request gets processed :)"
Golly gee thanks Alpha.
Anyhow, did you know that MySQL has a join limit of 61 tables?3 -
RIDDLE!!!
Find the right word and make sure it makes sense =D
"(blank) is hard. (blank) is even easier."7 -
Here's a riddle for you...
Ariana is looking at Shawn who is looking at Justin. Given to you is that Ariana is married & Justin is not.
So is a Married person looking at an unmarried person ?
Options:
A) YES
B) NO
C) CANNOT BE DETERMINED
Don't look for answers in the comments, Dumbo.😆 Ask it to a smart friend of yours. And, If you like this riddle, give me a ++.
I will post a new brain bending riddle everyday if you all like it. 😁18 -
Ok so riddle me this. The service for an application were required to run to send clients insurance through (as per government regulations) was working fine all day working super fast. Rare but awesome. I get a call one hour prior to the office closing (I don't work weekdays) and I am told that all of a sudden insurance isn't sending.
My mind goes right to this fu**ing process. Sure enough it's stopped on the server. Well shit ok. I click start..... Nothing. I kill it from task manager.... Nothing. "SERVICE CAN'T START"
I'm like ok that's fine let's check event logs.... Nothing. No problem let's just run it not in a service container and see if there's an error. NOPE IT DOESNT LET ME.
Okok so that's cool let's just try reinstalling the app. NOPE CAN'T DO THAT WITHOUT RESTARTING THE WHOLE FUCKING SERVER WHICH BRINGS THE ENTIRE OFFICES MANAGEMENT SYSTEM OFFLINE BECAUSE THIS FUCKING APP NEEDS TO BE ON THE SAME GODDAMN SERVER.rant sysadmin medical why me fuck microsoft windows fuck microsoft server why windows server service2 -
Windows... Thou art a fickle mistress...
How dost thou survive the most deadly code written by the most wearied devs yet cannot survive the adding of one of thine own features using thine own "turn windows features on or off"?
Thine face now turns blue each time thou art awakend only to again enter the sleep like death.
Leaving naught but the riddle of "service_critical_failure" each time before departing to the realm of dreams.2 -
Just received this really weird email. Probably spam, but why even bother when there is no link or attachment? Maybe it is encrypted... 🤔 What do you think? Anyways, the server has SSH enabled anyone care to bruteforce? :^)10
-
Here's a riddle 💻🗝️
I watch you as you browse and I know certain things about you, but once you leave, you never existed.
What am I?9 -
Guys I heard a rumor that you like riddles, I'm stuck on my theory project and I'd like to throw a bone:
Say you have a list p = [7,6,2,3,4,5,1,0] and you want to order it, i.e. change it to [0,1,2,3,4,5,6,7], by swapping adjacent elements. Provide an algorithm to do this optimally, when:
a. (Warm-up) each swap costs 1
b. Swaps weight is [4,3,2,1,2,3,4], i.e. if you want to swap position 0 with 1 it'd cost 4, position 3 with 4 will cost 1 and so on.
The optimal overall cost for b is 50 (I did an exhaustive search), however you need to find a general approach which is able to order every list with minimal overall cost (no time constraints as long as the solution is not exponential in the list length), using the provided weight function.
(you get a credit if the solution goes to a paper or anything 😉 it's actually a computer science open problem, but seems possible to me)16 -
You know what's worse than reading someone else's code? Reading someone else's code with comments that make absolutely no sense!
It's like deciphering hieroglyphics. If you're going to comment, at least give me a hint, not a riddle.
It's not a treasure hunt; it's coding!2 -
This app (https://f-droid.org/app/...) is bugging me for months. I have the feeling that one is possible and the others are just jokes.4
-
Actual validation message. I will omit the culprit to not shame them:
Your password must be at least eight (8) characters long and contain at least one letter,
one digit and three (3) special characters. No combination of any of the previously mentioned
requirements may be in a repeat success of one (1) or more. Special characters must be
separated by at least two (2) non-special characters, not including numbers. You may not
use more more than one (1) upper-cased and one (1) lower-cased letters in order together. You
may not begin or end your password with an uppercase letter or special character. You may use
no more than eight (8) special characters in your password.
If you need any assistance with this process, please send a message to our support staff.
Message: PASSWD-NG
Your IP Address: 50.202.37.1335 -
Riddle me this: (Arch) Whenever network connection is lost, NetworkManager freezes for a good 10s. Neither nmcli nor nmtui nor client applications get anything back from it during this time. After that 10s, it detects that the connection was lost and continues normal operation.10
-
What is it with people revealing their support requests like some sort of incremental escape room riddle?
Internal operations escalates an issue to development regarding an error importing a binary file format.
Confusion ahoy and blows out to 5 developers (3 senior) before the OP originally comes back 24h later to note that the client requesting this also added a note to say that the software that produces this binary may have changed formats. But they didn't think seem to think it was relevant enough to include.
Honestly unsure what measure of this is lacking basic common sense or basic human decency. And further astounding that for once the client did the right thing and this was occluded internally.1 -
Currently fixing concurrency issues with a callback which is called so frequently it probably has multiple instances running and which can't ever be paused. Also, it isn't allowed to allocate or free memory. Riddles like this are the reason I got into computer science.
-
I love Typescript's challenges. Today I had to make a generic interface that replaces every property in its parameter with either itself, a promise of itself or a different property keyed `obtain${key}` which is a function returning either the value or a promise of it. Not a very difficult challenge, but it was very satisfying to solve.
If anyone has the patience to attempt it I'm very curious what more experienced type theorists than myself come up with.1 -
I am a bigginer and Idk anything about hacking and coding. I am here to learn something which can give me some idea to learn hacking.6
-
What are the origins of your usernames?
Mine is a contraction of B(ack) Rolls from the legendary Alyssa Edwards.6 -
It’s Old and New At The Same Time. What do you think it is?
The clues?
Think Size, Think Why, Don’t Think Religion.1 -
"The Perils and Triumphs of Debugging: A Developer's Odyssey"
You know you're in for an adventurous coding session when you decide to dive headfirst into debugging. It's like setting sail on the tumultuous seas of code, not quite sure if you'll end up on the shores of success or stranded on the island of endless errors.
As a developer, I often find myself in this perilous predicament, armed with my trusty text editor and a cup of coffee, ready to conquer the bugs lurking in the shadows. The first line of code looks innocent enough, but little did I know that it was the calm before the storm.
The journey begins with that one cryptic error message that might as well be written in an ancient, forgotten language. It's a puzzle, a riddle, and a test of patience all rolled into one. You read it, re-read it, and then call over your colleague, hoping they possess the magical incantation to decipher it. Alas, they're just as clueless.
With each debugging attempt, you explore uncharted territories of your codebase, and every line feels like a step into the abyss. You question your life choices and wonder why you didn't become a chef instead. But then, as you unravel one issue, two more pop up like hydra heads. The sense of despair is palpable.
But, my fellow developers, there's a silver lining in this chaotic journey. The moment when you finally squash that bug is an unparalleled triumph. It's the victory music after a challenging boss fight, the "Eureka!" moment that echoes through the office, and the affirmation that, yes, you can tame this unruly beast we call code.
So, the next time you find yourself knee-deep in debugging hell, remember that you're not alone. We've all been there, and we've all emerged stronger, wiser, and maybe just a little crazier. Debugging is our odyssey, and every error is a dragon to be slain. Embrace the chaos, and may your code be ever bug-free!1 -
Some time ago in a telegram group a guy triggered me when he complained that "most students after the degree have no idea how to correctly implement the mean of a series of numbers".
Then he asked: "does anyone here know how to do it?"
Three people answered, including me, none gave the correct answer.
Eventually I got it, but now...
How many people here know how to implement the mean of a series?16 -
Solve the given riddle?
Two pheasants in front of a pheasant Two behind a pheasant, pheasant in front of pheasant pheasant behind pheasant Tell me how many pheasants.6