Question

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)?

Was it helpful?

Solution

Probably not as witty as the other answers but something that I use probably once a day.

I could never remember the redirect standard error to standard out syntax in UNIX until I started thinking 2 Grand Theft Auto. GT is for greater than and A is for ampersand.

    ls -lt 2>&1 > /dev/null

OTHER TIPS

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."

People Can't Memorize Computer Industry Acronyms

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

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.

Don't forget the tolerance bands: Get Some Now Gold (1%), Silver(5%), none (10%)

Another resistor colour codes mnemonic:

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

(Obligatory xkcd link).

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)

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).

Learning the electromagnetic spectrum, my teacher told us this for us to remember

R andy M en I n V ersace U nderpants e X cite G irls

which is for Radiowaves, Microwaves, Infrared, Visible light, Ultraviolet, X-rays and Gamma rays. Feel free to change the 'M' and 'G' to people's names :P

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

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top