Everything2
Near Matches
Ignore Exact
Full Text
Everything2

example code

created by wharfinger

(idea) by wharfinger (6.4 y) (print)   ?   (I like it!) Wed Jan 17 2001 at 23:56:45

"Example code" is a computer programming concept.

Example code is source code which purports to demonstrate how to do something. Ideally, it should have clear, lavish comments, and it should introduce no concepts other than the one being demonstrated. It should be as brief as possible without being incomplete, and it should also compile and work. Ha ha. Even in an ideal case, example code usually just covers the most common case. That's the case it ought to cover, but if you're desperate enough to RTFM, that's usually not the case you need help with.

For example, documentation on an API function will often include a little snippet of code showing the function in use. Books about programming are often rife with example code. Example code found in programming books is often broken; sometimes it won't even compile. The likelihood of the code working runs in inverse proportion to the size of the author's photograph on the book. If there's no photograph of the author, other danger signs include the phrase "teach yourself foo in n (days|weeks)".

Like any documentation, example code tends to be obsolete, inaccurate, disinformative, and generally worse than useless.


printable version
chaos

computer programming Reading from the Windows Clipboard Code Warrior PHP
The Teach Yourself to be a Dummy in 24 Hours Bible worse than useless documentation Wrox Press
monkey patch InstallShield MOV drop handler
scrotum metasyntactic wossname source code API
obsolete function Book of Mormon Promise The Drawing of the Dark
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
Just another sprinkling of indeterminacy
Only a simple computer program
Other things nobody tells you about the south pole
Editor Log: August 2007
Dirt in my hair and toenails
William Gibson
Synesthesia
Euclid's algorithm
shotgun house
The end will be a sellout
Beowulf on Everything
And if your teacher is also a pervert?
How to be an improv musician
The Atrocities of Vlad III of Wallachia
New Writeups
antigravpussy
One fly amongst many(person)
sam512
Moon Base Shackleton, 1978(fiction)
Pavlovna
toy boy(person)
XWiz
tear jerker(review)
Heitah
Anarchy is Order(idea)
jessicaj
July 26, 2008(dream)
Berek
ABBA(person)
devolution
k-hole(place)
Nadine_2
The Sound Of Madness(review)
SwimmingMonkey
Conversations with Fo Fo, the Loneliest dog in Purgatory(fiction)
locke baron
lynx(thing)
Simulacron3
Reality, Dimensions and the Natural Ontology(essay)
SubSane
Making Love to a 9-Foot Woman(person)
Ouzo
Thoughts(idea)
antigravpussy
I fall silent, listening. The breadcrumbs are talking about us(person)
Everything 2 is brought to you by the letter C and The Everything Development Company