tags:

views:

1081

answers:

9

In order to keep the OSI model straight in my head, I dreamt up the silly mnemonic:

P. Diddy Never Takes Shit, Punk Ass!
(Physical, Data, Network, Transport, Session, Presentation, Application)

Similarly I was first learning Perl, I rearranged (some of) the regex modifiers to:

SIXMOP GC
(as in 6 of the things you use to clean the floor, and floor cleaning goes hand-in-hand with garbage collection)

Perhaps this might seem a bit off-topic, but rookie programmers flock to this site for help and mnemonic devices are a great tool for someone just learning a new technology.

Does anyone else have any handy mnemonics that have helped them throughout the years (or are at least worth a laugh)?

+3  A: 

The mnemonic for resistors color codes is quite memorable, due to it being somewhat shocking. I didn't create this, this (or minor variations on it) is the standard mnemonic:

Bad boys rape our young girls, but Violet gives willingly

Black, brown, red, orange, yellow, green, blue, violet, grey, white (which represent the digits 0-9, in that order).

I have not soldered a circuit in probably 10 years, and only ever dabbled in it, but I still remember that one.

Brian Campbell
That's awful, and there's really no place for it.
Brad Mellen-Crandell
Shudder... I don't think it needs censoring (we're mostly adults here after all!), but just to say: you're collecting "offensive" votes...
Marc Gravell
Of course there's a place for it: the military. That's where I learned it. And you can't deny it's effective; I haven't looked at a resistor in twenty years, but I still remember the color codes.
Alan Moore
+7  A: 

A sudden flashback from undergrad, minutes after writing the question:

A professor's very memorable explanation of private vs. protected:

"Your children are not allowed to play with your privates."

Kevin L.
And "Friends can see other friends' privates", iirc
Blorgbeard
And on more:"C++ - where your friends have access to your private parts"
Gilad Naor
+1, that one really (!) made me smile
Willi
+2  A: 
ojblass
+1  A: 

the regular expression's ^ and $... which is beginning of line and which one is the end of line?

it is just the opposite on the keyboard... $ is before ^ on the keyboard and so the proper order is

/^some_pattern$/

Update: or another way: think of it as an animal -- the front has a horn "^". The back has a tail "$" (the "S" is the tail).

動靜能量
Another way to remember this is that basic, string variables have the $ at the end of the variable: inkey$
Jared Updike
+1  A: 

Another resistor colour codes mnemonic:

Betty Brown ran over your garden, but Violey Grey won't.

(Obligatory xkcd link).

Steve Melnikoff
+4  A: 

People Can't Memorize Computer Industry Acronyms

Personal Computer Memory Card International Association ... did alot of interfacing with those cards at one time.

Scott Vercuski
Also very nice, +1
Willi
A: 

Big elephants can't always understand small elephants. For small kids and "because."

GatoPeludo
A: 

In Scouts when learning how to read maps etc. you had to know how to convert a direction on a map to one you can follow on a compass. You need to add or subtract a particular value which represents the current difference between grid North and Magnetic North.

Grand ma Sucks. My Great Arse.

Grid -> Magnetic Subtract

Magnetic -> Grid Add

Edit: possible outdated in the world of GPS etc. :P

David
+1  A: 

The guy in charge of reviewing us taught us these:

Please Do Not Throw Sausage Pizzas Away
(Physical, Data, Network, Transport, Session, Presentation, Application)

All People Sex Together Night and Day Physically
(Application, Presentation, Session, Transport, Network, Data, Physical)

Dian