The Art Of Programming

From Uncyclopedia, the content-free encyclopedia.

Jump to: navigation, search

10: Anyone who codes features within their means suffers from a lack of imagination
20: Goto 10

~ Oscar Wilde on programming

Hello World!

~ Programmer on Programming


Each one indexOf - searches the whole string three times.
Eh?
Oh, you know -- it searches it once, and not finding a whitespace character, it searches it a couple more times just in case it overlooked one. The whole API is obsessive-compulsive like that, you know.
Where did you get that info? I checked with jdk source and it searches only once.

~ from Sun Java forum

Contents

[edit] What is programming?

The art of ordering computers around. While newbie-programmers (also referred to as script-kiddies) often think programming is all about printing "Hello World!" to screen or making a tic-tac-toe game using redundant and useless programming languages, expert programmers (also referred to as real-programmers) know it is actually about convincing the computers they should do what you ask them to, using social-engineering, culminating in a final "Goodbye World" program.

The standard spaghetti model of programming: It is preferred by software contractors to other models as it simplifies multi-million dollar schemes into a simple uni-directional process. “Like spaghetti,” observes Professor Ritelli of the Spaghetti Software centre in Rome.
The standard spaghetti model of programming: It is preferred by software contractors to other models as it simplifies multi-million dollar schemes into a simple uni-directional process. “Like spaghetti,” observes Professor Ritelli of the Spaghetti Software centre in Rome.

[edit] The art of programming

There are many ways to outwit the computer into doing what you want it to. One way, very popular among Perl and Lisp programmers, is to confuse it by writing code using random characters used in language's syntax. In lisp's case, it involves many brackets (( and )) in random order. In Perl's case, it means any ASCII or Unicode character. A more subtle approach is taken by C++ programmers, who will excessively point at the computer's data and laugh, or make snide references to it, in order to degrade the computer's self-esteem and hence make it more pliable. From there, the road is quite short. A much more aggressive approach is taken by Python programmers, who will slowly strangle the computer with their bare hands until it agrees to do its master's bidding. (Previously, actual pythons were used in the suffocation process, but it was found that they impeded programmer satisfaction and are now deprecated.)

Broadly speaking, there are two major branches of programming: "functional programming" and object-oriented, or "non-functional programming." Generally, functional programming is used by software engineers to write short, effective programs for internal use, whereas non-functional programming is used for large projects involving a non-technical end user. Examples of functional programming include common Unix commands like grep and wgetporn, whereas non-functional programs include Microsoft Windows and the software suite Easy Porn Viewer. Object-oriented processes are preferred in the latter case, because they "hide" data from the interface and force users to learn something about computers in order to find it.

[edit] Origins

The Art of Programming is adapted from "Sun Tzi's Art of War", a Wonder in Civilization III. A poor newbie, after repeatedly failing to grasp the concept of the book, was told to get out of his NUS Low School of War and Battles. He obeyed, much to others' shock and horror.

The person than asked his computer how to master the textbook without buying those expensive, useless workbooks such as "Problem Solving in Conceptual Runescape". The computer said:

"How" is not recognized as an internal or external file... Bah! I'm not gonna repeat this, you figure it out for yourself

Then, he went and wrote this page

[edit] Women and programming

It is often noted by studies that women can't program (The official phrase is "G4lz R sux0rs @ c0d1ng!"). This fact is very surprising, considering how well women seem to program men. Several solutions to this paradox have been proposed:

  • Computers are not influenced by vaginas.
  • Computers aren't affected by how much you bitch
  • Computers will not buy you make-up
  • Computers dont care about Cosmo
  • Computers outsmart you, try something else.

[edit] History of programming languages

Although computers were primarily invented in the English-speaking sphere of the world, the commie spies of the '50es quickly gained knowledge about them, and they immediately started using them for their own needs. In the period of 1955-1960 the 3rd five year plan computerized every home in the USSR. This lead to an incredible upsurge in technology in science all over the commie block. By 1962 the Internyet was connecting the proletariate in ways never thought possible before. By 1963 the commies won the cold war, and took over the world.

Unfortunately, each computer used an enormous amount of power equal to 1/4 of a hydro-electric plant. So after they took over, they weren't able to keep the system together, and the Internyet fell apart into smaller systems called LANs. These isolated little communities wanted to escape the eye sight of the Party, and they ivnented their own secret little languages. The most popular of these were MODULA-3, ADA and PL/2. Although billions of people used these programming languages, they were all wiped out in the great power shortage of 1970. Since commie computers did not have hard drives yet, the entire source code of all these compilers were lost to humanity. Since then, the commies are not in power any more (except in the southern parts of Alberta, next to the swamps).

[edit] Usual programming languages

The most often used programming languages are C, C++, Pascal, Java, and Brainfuck. Let's take a look to the following program, made in C:

#include <sex.h> 

sex gal(tit a, arse b) {
clit("Hello world!");
return;
}

#include <sex.h>: This part says the compiler (a nasty program trying to understand the code you've written) that he should include a hex (aka sex) file at the beginning of the program. Don't worry about it, we'll explain it later.

sex gal(tit a, ass b) A very important thing in C programming is the Data Type, which should always be the one defined with the #include directive. "sex" is the data type for the function gal, which as you can see does include some parameters. A "gal" function always returns a "sex" data type. The ( and ) parantheses are used to put parameters between them. Now let's take a look to the "a" and "b" variables, which are of type "tit" and respectively "ass". Those two types are very important in C, they help the compiler understanding what he deals with.

clit("Hello world!"); This is the C's output function. The output function can have much more parameters, like %legs or %hh (the hh stands for high-heels, an output format that should never be confused with the meaning in usual language). For example, taking a look at the "clit" function makes us think if "sex" and "clit" are connected. And the answer is definetely yes. Much many programmers are using this two funtions in the same context to obtain a special programming procedure. When this code is executed, you will probably see on the screen the "Hello world!" text (depends on which compiler you use for compiling the code).

return; Returns something which is nothing.

The { and } acolades are used for any compound statement, in this case, they serve the function sex.

Notes: This the easiest program for a beginner.

[edit] Oscar Wilde's influence

The ordinary stream operators, csin, cspout, and cbore, provided by the C- standard library have proven inadequate for interfacing with the vast knowledge of Oscar Wilde and thanking him for it to appease his vengeance. Therefore, in 1992, the ISO-EXCL55-3201 committee introduced a new module that is easy enough to use to prevent a global rose epidemic:

#include <wilde>

void maine() {
   try {
      OSCAR_WISDOM osw;
      cwilde >> osw;
      doprogram(&osw);
   } catch (...) {
      //Make sure this happens, or else:
   }
   OSCAR_PROPS osp;
   osp.tribute = 4000;
   strcpy(osp.msg, "Thank you for your infinite wisdom.");
   cwilde << osp;
}

[edit] Worldwide programmer shortage

When shampoo was invented in 1921, the normal peoples of the world discovered that all the programmers were nowhere to be found. It was later discovered that they were still in the shower, stuck in the infinite loop written on the shampoo bottle: "Lather. Rinse. Repeat." Efforts were made to end the shampoo.exe process, however the manufacturers of Pantine shampoo (that is, Sony Corporation) placed protection on the process in order to prevent this from happening. Some even tried to attach a debugger to the process to insert a break in the loop, again to no avail as the shampoo was coded in COBOL which nobody knows anymore.

The predicament ended several days later when the shampoo.exe process ended after running out of shampoo. Bottles of shampoo now come with the new instructions written in C++ (instructions are also available to the slaves of .NET, who program in C#):

#include <wilde>
#include "shampoo.h"
#include "shower.h"
#include "towel.h"

using namespace non_std;

int main(int argc, char* argv[]) {
   
   User u;
   u.name = argv;
   Shower s;
   Shampoo o;
   Towel t;
   s.adjust_taps(u.temp_preference);
   s.adjust_taps_again_after_burning_winkle(
       SYSTEM.find_what_user_really_wants(u.temp_preference));
   s << u;
   
   for(int i = 0; i < 2; ++i) {
       s.wet_hair();
       s.apply_shampoo(o);
       s.lather(o);
       s.rinse();
   }
   
   s.complete_shower();
   s.taps = off;
   u.exit_shower();
   u.dry(t);
   
   return EXIT_WASHED;

}

The world once again resumed normally, knowing that its programmers could continue to write buggy software, blaming users for the problems.

[edit] Metaprogramming

Truly, their opium dens are unrivaled.

~ Oscar Wilde on Dolphins

About metaprogramming:

You might be inclined to think that metaprogramming is another hacker word and was first overheard in private phone calls between fax machines. Honest to God, I am here to tell you that it is stranger than that. Metaprogramming began with taking drugs in the company of dolphins.

Personal tools
projects