Everything2
Near Matches
Ignore Exact
Full Text
Everything2

God comments his code, you should too

created by SirMoogie

(idea) by SirMoogie (3.5 y) (print)   ?   1 C! I like it! Wed Jul 25 2001 at 14:27:24

This summer me and a few friends are working on a project that involves making a parallel implementation of evolutionary tree construction algorithms, using MPI. Our first step during the process was to take an implementation of some of these algorithms, freely distributed of course, and make them run in parallel. The code we began to work off of was terrible, it was devoid of comments and was very difficult to follow.

(There is a point ahead I promise...)

During one of our meetings we were discussing DNA sequencing, and the topic came up that much of DNA code is supposedly unused. "Comments." one of my friends suggested. So anyway the point I'm getting to is if "God" can take the time out to "write" useless pieces of code in the DNA sequence, that serve no known purpose, why can't programmers take the time to write comments in their code? If not for themselves in the future, at least for those who will be using the code after them. On a side note we did manage to get our parallel implementation running, but it was a pain w/o having some knowledge as to what the original programmers were doing.

(idea) by magicmanzach (2 d) (print)   ?   1 C! I like it! Wed Jan 29 2003 at 3:07:25

From time.c, line 23222:

/* This is a kludge. Let's just hope those bastards never actually reach* the speed of light. */

obj.time += 1/(1+obj.v**2 / c**2);

From math.c, line 132307:

int largest_prime_number () {
 /* Simple, but elegant. This one should be obvious. */
 ...
};

From physics.c, line 1299:

/* Hopefully, nobody'll catch on to this bit. If they do, I'll
 * have to recompile the whole blasted thing from scratch.
 * Maybe giant talking ants this time. */

if (photoncount == 1 && option == O_SLITCHOICE)
 interference();

From human.c, line 90221:

/* Yeesh. Yet another example of why I shouldn't be coding
 * when I'm drunk. */

From light.c, line 38494:

/* This ought to lead to some great fun later, eh? 
 * Hope nobody makes a portable one... */

if (reflect_surface_count == INT_MAX)
  set_laser(LT);

From biology.c, line 23323:

/* I'll have a look at this in the morning. *
 * Maybe mix up thirty new amino acids...        */

dna_codes = { 'AGC', 'TGC', 'ACT' ... };

From gen_science.c, line 24:

/* There is no WAY this will compile on Linux. */

From main.c, line 84992:

/* FIXME: Add meaning */


* Yes, God can italicize his comments. He's God.

printable version
chaos

Why programmers don't comment their code Richard Nixon's Social Security Number Do not use the toaster: It will catch on fire junk DNA
Feature request for Universe 2.0 50/50 rail Humorous Writings of E2 Winipcfg
What to do if you've got too many votes on your hands MPI Learn how to spell So you wanna be a hacker
Hymen Crimpshrine God's Own Programming Language The Talisman
Suzie COBOL Images of the Divine in Black and Feminist Liberation Theologies italics klingon programmers
Evolutionary Parallel kernel sensationalism 6502 addressing modes
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
Little presents from the Node Fairy:
Quantal Response Equilibrium
Buying a sword
Age, Sex, Location
How I invented Anna and made her a character in all my stories
North American Poetry
graffiti
car chase
Harry Potter is a *ix hacker!
The ultraviolet catastrophe
Suburban Stigmata
Joey Bishop
Nelson Riddle
Louisiana Purchase
New Writeups
everyday j.Lo
pray do not molest them(thing)
ammie
Bands Who Take Their Names from Eighteenth-century English Poetry and Prose(idea)
shaogo
Under My Thumb(review)
ammie
Rock On(person)
The Custodian
The Dresden Files(thing)
Ouzo
PETA becomes you, a proposed future(fiction)
Ereneta
Stone Soup, Part Two(fiction)
jjen
Sorrier than I ever thought I would be(personal)
locke baron
Moskva class antisubmarine cruiser(thing)
Wuukiee
May 15, 2008(idea)
locke baron
Kuznetsov class aircraft carrier(thing)
Adaptive Child
Annie's garden salsa(recipe)
Simulacron3
Zig-Zag(thing)
Noung
Tiananmen Square Massacre(idea)
aneurin
Lord St Clair(person)
Everything 2 is brought to you by the letter C and The Everything Development Company