Jump to content

Geekly Giggles of the Rockin' Kind


Moach

Recommended Posts

This is a screenshot from my own Visual Studio editor:

MK3nrvS.jpg?1

and at the risk of admitting to get some giggles from my own code remarks, I found it chuckle-worthy enough to share with my favourite geeky crowd :D

this has been sitting there for a while, but every time I open up that class file it always gets a bit of a "lolz" (mostly 'cause I forget it's there, busy with the other tens of thousands lines of just-as-thick-or-worse-yet-to-read C# gibberish)

to satisfy the curious, that function "snaps" a given 2d vector point into a hexagonal grid, clamped at the top at a specific height defined by the "Blobulator" (Moach-made device that assembles "Blobules" into a hex-grid pattern ("Blobules" are a generic, theme-agnostic name I've taken to calling the "bubbles" in any bubble shooter type game - they have since gained an character-like personality, as their doom-bound existence (they all eventually go "pop") has given context to many blobular drama stories in various crazy ways (in my head, of course)) )... The "Blobulator" also assigns a flag indicating whether grid height lines up to an even or odd row count -- which turns out is very important when dealing with hexagon patterns - that's what "EvenFlow" is for...

the "magic numbers" you see there in the form of long-winded decimals are the pre-calculated sine of 30º (the angle between a hexagon's sides) and it's reciprocal (1 divided by it) -- this is because I, unlike a twin brother of mine with the very similar job, do NOT believe that preemptive optimization is the root of all evil -- proof of fact, that function was written about a year ago - and it never game me any more trouble than a "less optimized" one might....

Anyways, my favourite-most band is still MetallicA... (so is HarvesteR's (the aforementioned twain of mine)- where d'you think the upper case 'R' comes from?) - but I haven't yet found a cue to insert a plug from their lyrics into my usual (inevitable) code commentary humour)

Cheers

Edited by Moach
close your brackets! lest your post don't "compile"
Link to comment
Share on other sites

fact! that has actually happened...

long story, but an older version of that very same code ended up in the hands of a new programmer (who has yet to succeed in plowing though the thick of it, or as a more self-preserving/better-advised person would do - QUIT, as his new boss (my old one) is an evil character who does NOT own the rights to this program (due to contract - or lack thereof - issues) -- lolz, I'll sue the idiot later, tho I might have to get in line for that, since others lost a LOT more to his devious ways than me...) -- anyways, this new programmer has been known to say that he massively enjoyed reading my code - quote: "every line has a joke to it" or so I'm told... he was also said to claim he wanted to meet me someday (presumably in a well beer-supplied context)

:D

speaking of novels, there are also snippets from "Game of Thrones" inside that game's code... coincidentally relating to the same TopOfTheWorld variable... where the "Blobules" are coded to respect it (or die trying to break it) it is then referred to as "The Wall"....

of course, commentary around that section MUST include a reference to (copy-paste of) the Black Oath, of the brotherhood sworn to protect the realm from those OMG-what-are-those!? evils of the wild lads "beyond the wall"

I got that from the book - mind you, I'm saving the HBO version for when I'm done (kindle says 98% now... I'm reading slow on purpose a bit)

(...)

*reads over*

holy crap! how did we get from C# to Game of Thrones in just about 5 posts?!!

Edited by Moach
Link to comment
Share on other sites

:D

Reading my code could be also fun, because I try to comment stuff to remember what it is supposed to do. But from time to time, I make remarks like "Captain Obvious made this line for me", "Why do you think this is here?", "Random line of code just to fill in the blank space", "Random commented-out code, use at your own risk" and so on.

Link to comment
Share on other sites

:D

Reading my code could be also fun, because I try to comment stuff to remember what it is supposed to do. But from time to time, I make remarks like "Captain Obvious made this line for me", "Why do you think this is here?", "Random line of code just to fill in the blank space", "Random commented-out code, use at your own risk" and so on.

ROFL! I do that too!

some comments just read: // <--- what he said! ...or similar

good to know there are coders that like me are not just crazy enough to become programmers (of all things a man can do to his poor brain) - they go one step further, and make the compiler go LOLz!

what other coding-comedy do we have in the crowd tonight?

- - - Updated - - -

Due to (possibly imaginary, rotate 90º to check) popular demand -- here's more of my Codemedy™

EcHeSky.jpg

Same class file "Blobulometry.cs" continued from the end of the lines above....

...should I consult a psychiatrist? - no wait, I'm already on those meds :sticktongue:

which reminds me, YES - I have ADHD! where's my Ritalinâ„¢?

- pills found behind keyboard, after a brief search - just where they usually dwell while I'm on the PC - one of said pills consumed....

Edited by Moach
Link to comment
Share on other sites

Wish I still had the listing... guy I worked with (late 80's) used to code using farm animal names for variables. Picture a very large and complex subroutine written as such, and having to go in and rework his code. :confused: He was also notorious for leaving random comments like 'I hate my wife and 'If one day you find this doesn't work, it's because I'm really hung over right now... I'll skip his comments about the secretaries.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...