Computer programming

From Uncyclopedia, the content-free encyclopedia
Jump to navigation Jump to search

“In Soviet Russia, computers program YOU!”

~ Russian reversal on computer programming

Computer programming is currently the act of typing. The resulting data is called code. A program is a mix of both of the data and the code. Many experienced engineers say that the data and code are both converted to ones and zeros, but this is not true. It is actually converted to imaginary subatomic particles, and the particles are moved around between computers. You can usually hear them moving from hard disks and rammed into memory.

The goal of programming is to replace humans and other beasts of burden with machines. The humans will not go into the abyss.

It is not known whether the processor reads the program, or the program tells the processor what to do, but since most of it is imaginary (or virtual), it doesn't matter. Normally people say that the processor is running, but this is actually not true. A processor just sits there and intentionally gives programmers errors until they asplode. Most processors use lots of electricity just to sit giving out errors at random. Nowadays processors can do this a lot more often, and optimising the idle time can get gains of more than 100%.

Languages[edit]

Programming was invented by Al Gore in 1980 and is usually typed in a specific language. It is very important for a programmer to pick the correct language for their career. If the wrong one is chosen, defending the language is impossible without starting language wars. These wars often have thousands of idiots and go on for decades.

Once a great language war went on between COBOLites and FORTRANoids. This war lasted for (i=0;;i++) years until eventually, both sides died of capital-letter poisoning and the letter C (ironically, also a capital letter) took over the universe. Later, C++ and ADD 1 TO COBOL GIVING COBOL duked it out in a similar way.

In the end it was agreed by all that there are only two great computer languages: Basic and PL/1. A third, Pascal, is believed by a few to be great, but this opinion is held only by idiots and there is little reason to believe that they know anything more than the rest of us.

Sometimes programmers claim that some language is slower than another, but this isn't true. Look at an example of this very fast code.

10 REM SET A TO 0
20 REM SET A TO A + 1
30 REM GOTO 20

Here is the same code translated to the C language.

/*
	int a = 0;
line10:
	a = a + 1;
	goto line10;
*/

Now we optimize the C code.

/*
	int a = 0;
line10:
	a++;
	goto line10;
*/

Further optimization,

        register a = 0;
 line10:
        ++a;
        goto line10;

Now, here's the same thing in perl

\# my $a=0; sub line10 { $a++; line10();};

Now, we optimize this in NULL:

 NULL

Supposedly C is faster than Basic, but this example shows that even with highly optimised code, the C code is not even 1% faster. But as you can clearly see, Perl is the fastest and most efficient programming language of all. But NULL can be even faster.

Debugging[edit]

Debugging is a rare process that virtually nobody has to go through except for programmers that really suck. However, for the sake of completeness, this article will cover some of the basics of debugging. There are a few simple steps involved for correcting a bug and moving on:

  • Identify a problem in your program.
  • Admit that you are an imperfect sinner who can't code worth crap.
  • Admit there is a higher power that will help you overcome your error.
  • Figure out what's wrong with the code, and correct it.
  • Rebuild your program, and pray.
  • Test your program. If it still doesn't work, go back to step 4.
  • Help others recover from alcoholism.
  • Teach programming.

Functions and Procedures[edit]

There are many functions to perform while programming. The typical procedure of functions is:

Procedure
Write the program.
Repeat until it starts to run.
Change the program.
Repeat until it runs 85% correctly.
Sell.
Create a design document.

Note that the Test function is not in here, because it is too slow.

Most of the time, before a design document is created, the boss says the funding is over because of the DOTCOM, which is ok, because documentation is also slow and not important.

Some programmers are proponents of the Completely Methodical Madness paradigm. This allows programmers to perform methods instead of functions and makes most programmers mad, but management usually imposes it because methods run slower than functions.

The most common function in programming is the foobar function. It can complete any computable problem in O(never²) time.

Variables[edit]

Varia means miscellaneous literary works, so variables means all of the other programming documentation. This usually consists of flaming other programmers and sending email to geek web sites trying to say they are cool.

Comments[edit]

There are bits of programming code that actually do work, and there are bits of code that merely hang about and don't actually do anything, like socialists. These pieces of code should be removed as quickly as possible, or converted to useful code. For example:

 // This function creates a double square from a double number
 double sqr( double n )
 {
   return n*n/2;
 }

can be changed to:

 double sqr( double n )
 {
   return n/n;
 }

Productivity[edit]

It is well known that programmers write two lines of code per day. This doesn't seem like much, but it is actually very difficult to achieve. Very often, a programmer is thinking, "Should I add this semicolon or not?" When a programmer is on their death bed, they are very concerned that they can finish that last line of code, or else their average may drop to 1.99997 lines of code per day.

Programmers' Beliefs[edit]

Most computer programmers change their religion. This is because their brains are too small to comprehend that computers may not work like people or the universe.

An example is the foo function. This function can do anything. This makes the universe seem small.

Life Cycles[edit]

The first program every programmer learns is called "hello world". It looks something like this.

PRINT "HELLO WORLD"

This is something like birth. And to get rebirth, simply run it again.

Then after a programmer has vast amounts of expertise, they finally write a program with great complexity.

Create new(me)
do (me life)
   [
   sleep()
   eat()
   code...code...code...code()
   ]
catch(death)
   [
   if(reincarnation)
       [
       restart(as fly)
       ]
   else
       [
       possible other end states()
       ]
   ]
catch(god's death)
   [
   if(god has reincarnation)
       [
       restart(everything)
       ]
   ]

There are many other programs written in between these two programs. If the computer programmer is Russian or Chinese, he/she/it will most probably be involved with a Cyber-attack against the West.

Programming Methodologies[edit]

  • Object Oriented Programming - For controlling objects.
  • Objectivism-oriented programming - For controlling randroids.
  • Structured Programming - For buildings.
  • Spaghetti Programming - For food. Writing a good though convoluted program is often called as "easy as spaghetti."
  • Multi-tasking - This means writing two programs at the same time. It is very hard for the multi-tasking programmer to keep things straight, and pointless as well. After all, two fathers cannot get a mother pregnant any more quickly than one.
  • Extreme Programming

See also[edit]