Arkiv for ‘java’-taggen

Morro med programmering

0
15. juni, 2009

Man kan finne på mye morro med variabelnavn når man programmerer :)

 byte me;
 long john_silver;
 char broiled;
 string vest;
 float valve;
 double jeopardy;
 struct by_lightning { ... };
 Object strongly;
 class warfare { ... };
 String cheese;
 Exception taken;
 Graphics ex; // XXX
 long walk(short pier) { } // from the MrBunny Java book
 int elligence;
 bool me_over;
 short circus;
 int eger; // ...completing what the designers of the language left out
 char acter;
 bool ean;
 void* bowels;
 class Brick implements Throwable { }
 class Marathon implements Runnable { }
 class Novel implements Serializable { }
 class Human implements Cloneable { }
 Fun(key) %% funky!
 public MyTestCase(String man) {
	super(man);
 }
 throw (fit | up | something);
 while (e_coyote) {

Og har du noensinne prøvd å skrive ‘make love’ i terminalen på en *nix distro? Mange av dem har nemlig et artig tillegg i ‘makefile’.

love: /dev/null
       @echo not war?

Postet under: Data - Lek & Moro

Morsomheter fra kildekoder & manualer

2
10. juni, 2009

Finnes mye morsomt i kildekoder og manualer. Her er et lite utdrag med de jeg synes er gode.

// Since this file is loaded on every page, and since
// I want the following function on every page, I'm going to
// cheat and include it here even though it has nothing to
// do with the other things in this file.
// If you don't like it, bite me!

Historiene skal ha det til at følgende er hentet fra en gammel IBM-manual

* Single bit errors are detected and corrected
* Double bit errors are detected
* Undetected errors are ignored


Før en ganske komplisert, og fullstendig ukommentert kode:

// Abandon all hope, ye who enter here.

The library routine names in the Playstation apparently were translated phonetically from Japanese to English. So it had documentation referring to a “clit index” instead of a CLUT index (Color LookUp Table index).

| Les mer »


Postet under: Data - Lek & Moro