Skip to content

Two extremely byzantine solutions to printing "Hello World" done to frighten the youth in a code challenge at work.

Notifications You must be signed in to change notification settings

BatCountry/LordHowell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Lord Howell

helloworld = lordhowell

Two solutions for printing a version of "hello world" in as unreadable a way as I could in a few hours of messing around. Done for a mixed-skill level fun coding challenge at work, mostly just to traumatize and amaze the younger devs.

Lord_Howell.py

I wrote a program to find a random seed that gave me a sequence of numbers that had relative-to-each-other offsets that could align very roughly to "hello world" then did some pinpoint UTF-8 character code adjustments and injections to finish it off. Brute force finding the seed took the better part of 4 days fully pegging an AMD 2700x processor. I'm particularly proud of that one as it's almost provably impossible to "guess" what it will print without running it. It's very slow to start as it has to generate and discard about 12 million numbers with Python's PRNG before it arrives at the sequence it needs.

lord_howell.sh

Built to hedge my bets against the PRNG search not hitting a satisfactory sequence in time, I used Wolfram Alpha to find a polynomial that corresponded to the delta between each consecutive ASCII value of the letters, centered around 0. This one's more discoverable and it just looks like a polynomial, so I added some more confusion for the junior devs by putting C code in a shell script and compiling it on the fly. A couple of dumb tricks there - file handle 1 on x86 hardware is stdout, so I just wrote to that instead of using printf. Also I populate an array as a red herring with values from 1 to 11, then the value of ! and \n, then overwrite that array with the output of the polynomial, using the input value as the X variable.

About

Two extremely byzantine solutions to printing "Hello World" done to frighten the youth in a code challenge at work.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published