background preloader

The Tao Of Programming

The Tao Of Programming
Translated by Geoffrey James Transcribed by Duke Hillard Transmitted by Anupam Trivedi, Sajitha Tampi, and Meghshyam Jagannath Re-html-ized and edited by Kragen Sittler Last modified 1996-04-10 or earlier Table of Contents Book 1 - The Silent Void Thus spake the master programmer: ``When you have learned to snatch the error code from the trap frame, it will be time for you to leave.'' Something mysterious is formed, born in the silent void. If the Tao is great, then the operating system is great. The Tao of Programming flows far away and returns on the wind of morning. The Tao gave birth to machine language. The assembler gave birth to the compiler. Each language has its purpose, however humble. But do not program in COBOL if you can avoid it. In the beginning was the Tao. Programmers that do not comprehend the Tao are always running out of time and space for their programs. How could it be otherwise? The wise programmer is told about Tao and follows it. The highest sounds are hardest to hear.

Dijkstra Archive: A Short Introduction to the Art of Programming (EWD 316), Chapter 9 9. The problem of eight queens The problem is to make a program generating all configurations of eight queens on a chess board of 8 * 8 squares, such that no queen can take any of the others. This means that in the configurations sought no two queens may be on the same row, on the same column or on the same diagonal. We don't have an operator generating all these configurations: this operator is exactly what we have to make. Now a (very general!) With the aid of the generator (3) for the elements of set B, the elements of set B can then be generated in turn; they will be subjected to the decision criterion (2) which decides whether they have to be skipped or handed over, thus generating elements of set A. Three remarks are in order. 1) If the whole approach makes sense, set B is not identical to set A and as it must contain set A as a (true) subset, it must be larger. In a moment of optimism one could think that this is an easy matter, thinking of the following technique. Note. How?

The Hacker Manifesto by +++The Mentor+++ Written January 8, 1986 Another one got caught today, it's all over the papers. "Teenager Arrested in Computer Crime Scandal", "Hacker Arrested after Bank Tampering"... Damn kids. They're all alike. But did you, in your three-piece psychology and 1950's technobrain, ever take a look behind the eyes of the hacker? I am a hacker, enter my world... Mine is a world that begins with school... Damn underachiever. I'm in junior high or high school. Damn kid. I made a discovery today. Damn kid. And then it happened... a door opened to a world... rushing through the phone line like heroin through an addict's veins, an electronic pulse is sent out, a refuge from the day-to-day incompetencies is sought... a board is found. Damn kid. You bet your ass we're all alike... we've been spoon-fed baby food at school when we hungered for steak... the bits of meat that you did let slip through were pre-chewed and tasteless. Yes, I am a criminal. I am a hacker, and this is my manifesto.

Why Learn Assembly Language? Introduction "Assembly language? Isn't that the hard to read instructions on how to assemble your brand new computer desk?"... No.. What is Assembly Language? x86 Assembly is a programming language for the x86 class of processors (specifically the 32bit x86 processors IA-32 - Background I thought assembly was a dead language, why waste the time? Though it's true, you probably won't find yourself writing your next customer's app in assembly, there is still much to gain from learning assembly. So why should you care? Points of Interest Wirth's Law I remember dialling into a BBS on my 486 with my brand new 2400bps modem. My Eyes are Open! I realize now that learning assembly language will teach me about the inner workings of the computer. So if you are serious about getting a leg up on the competition in your field, I'd recommend trying to learn assembly language. Resources on Learning Assembly How To Use Debug -

Google hacking master list This master list of Google Hacking command sets has show up on a forum in Russia, as well as on Scribd. While we often forget about Google hacking, and rarely use it against our own sites, a list like this is going to keep the kids happy as they merrily pound their way through Google to your systems. This makes the data much more accessible than at Johnny I hack stuff. There are some drawbacks in how Johnny I hack stuff works, you have to do a lot of clicking to get to the right hacks. This master list also includes things I have not seen or tried yet meaning that the body of knowledge for Google hacks is still being expanded upon. Check it out, here is a copy of the master list in case you do not want to go to a hacker forum in Russia, or do not want to sign up for a scribd account (the only way to download it or cut and paste the document in Scribd is to make an account). Code: admin account info" filetype:log ! nurl:/admin/login.asp inurl:/cgi-bin/sqwebmail?

New programming slang - Programming A question recently posted on asked for people to submit programming terms that they or their team have coined and have come into regular use in their own circles. Below are the most popular answers Yoda Conditions The act of using if (constant == variable) instead of natural if (variable == constant),; for example, if (4 == foo). Because it is like "if it is the blue – this is the sky" or "if that is tall – this is a man." Pokémon Exception Handling When you catch all the exceptions and then you try somehow to analyze them. try{ //code }catch ( Exception ex){ if( ex instanceof SubException){ //code }else if(ex instanceof SubSubException){ //code }else{ //code } } Discuss an example here Egyptian brackets This is the style of brackets, when an opening bracket is placed at the end of this line: if (a == b) { printf("hello"); } Why do we call this style "Egyptian brackets?" Different types of bug reports Stringly Typed It is a riff on strongly-typed. Other types of errors

How Speeding The "Most Important Algorithm Of Our Lifetime" Could Change This Modern World Last week at the Association for Computing Machinery's Symposium on Discrete Algorithms (SODA) a new way of calculating Fast Fourier Transforms was presented by a group of MIT researchers. It's possible that under certain situations it may be up to ten times faster than the current way we do these. At this point you are probably wondering: What the hell is he talking about? Let me explain, because improving these three little letters--FFT--may change your life. Here's a quickie explainer: Fourier transforms are a mathematical trick to simplify how you represent a complicated signal--say the waves of sound made by speaking. How so? Now, you should remember that sound waves, and both picture and video signals, are all handled by processors in your TV, PC, and phone, and that the radio waves that whizz through the air to keep us all connected to the Internet need digital processing too. So calculating FFTs up to ten times faster is a big deal. [Image: Flickr user hazure]

Low Level Details When I started programming many of the elements we take for granted now, did not exist. There was no DirectX and not many compatible libs were available for the free compilers of the day. So I had to write my own code for most basic programs, keyboard handlers, mouse handlers, video memory accessors, rasterizers, texture mappers, blitters… the programs I wrote then were 100% my own code and I had to be able to handle anything and everything. Personally I’ve always been interested in what was going on under the hood so this suited me just fine. I always dug into the details and I almost always end up programming as close to the bone ON the hardware (or OS) as I possibly can both to eek out as much performance as possible AND to satisfy my own hunger for knowledge. Over the last decade I’ve been involved in the hiring process at many studios and in more recent years I’ve noticed a pattern. It depresses me that so much of what I consider to be essential is simply not being taught anymore.

Invisible umbrella creates shield of wind, soaks innocent bystanders One might say the standard umbrella is already perfectly designed — compact, resistant to all but very strong winds, and it generally keeps your top half dry. The kind of storm in which an umbrella wouldn’t do the job is the kind of storm where nothing other than staying inside would help. A new umbrella design by Je Sung Park and Woo Jung Kwon aims to not only change the umbrella’s core design, but to make it adjustable given the power of a storm. Called the Air Umbrella, the concept removes the plastic top from the umbrella and replaces it with a wind shield. It’s worth noting that if the umbrella is designed to shoot rain away from your head through an air pump, it would almost certainly shoot that rain onto surrounding innocent bystanders. The Air Umbrella is also designed with a simple adjustable handle, so the user can rest their arm at whatever height they desire when holding the umbrella, an option left out of standard umbrellas. via WebUrbanist