Pazartesi, Aralık 12, 2005

Nasıl program yazılmaz ?



How Not to Program in C++
111 Broken Programs and 3 Working Ones, or Why Does 2+2=5986?
by Steve Oualline
Find the bugs in these broken programs and become a better programmer. Based on real-world errors, the puzzles range from easy (one wrong character) to mind twisting (errors with multiple threads). Match your wits against the author's and polish your language skills as you try to fix broken programs. Clues help along the way, and answers are provided at the back of the book.


http://rapidshare.de/files/9036328/How_Not_To_Program_In_C__.rar.html


"How Not to Program in C++" ters mantık kullanılarak yazılmış hatalı programlardan oluşturulan örneklerle yazılmış bir kitap.

Real Programmers don't write in COBOL. COBOL is for wimpy applications programmers.

Real Programmers' programs never work right the first time. But if you throw them on the machine they can be patched into working in "only a few" 30-hour debugging sessions.

Real Programmers never work 9 to 5. If any Real Programmers are around at 9 a.m., it's because they were up all night.

Real Programmers don't document. Documentation is for simps who can't read the listings or the object deck.

Real Programmers don't write in Pascal, or BLISS, or Ada, or any of those pinko computer science languages. Strong typing is for people with weak memories.

Real Programmers don't write in PL/I. PL/I is for programmers who can't decide whether to write in COBOL or FORTRAN.

Real Programmers think better when playing Adventure or Rogue.

Real Programmers don't write in FORTRAN. FORTRAN is for pipe stress freaks and
crystallography weenies. FORTRAN is for wimp engineers who wear white socks.

Real Programs don't use shared text. Otherwise, how can they use functions for scratch space after they are finished calling them?

Real Software Engineers don't debug programs; they verify correctness. This process doesn't necessarily involve execution of anything on a computer, except perhaps a Correctness Verification Aid package.

Real Software Engineers don't like the idea of some inexplicable and greasy hardware several
aisles away that may stop working at any moment. They have a great distrust of hardware people and wish that systems could be virtual at all levels. They would like personal computers (you know no one's going to trip over something and kill your DFA in mid-transit), except that they need 8 megabytes to run their Correctness Verification Aid packages.

Real Users are afraid they'll break the machine — but they're never afraid to break your face.

Real Users find the one combination of bizarre input values that shuts down the system for days.

Real Users hate Real Programmers.

Real Programmers don't hate Real Users. Real Programmers merely consider Real Users totally irrelevant.

Real Users know your home telephone number.

Real Users never know what they want, but they always know when your program doesn't deliver it.

Real Users never use the Help key.

Real Computer Scientists admire ADA for its overwhelming aesthetic value, but they find it difficult to actually program in it, as it is much too large to implement. Most computer scientists don't notice this because they are still arguing over what else to add to ADA.

Real Computer Scientists despise the idea of actual hardware. Hardware has limitations; software doesn't. It's a real shame that Turing machines are so poor at I/O.

Real Computer Scientists don't comment their code. The identifiers are so long they can't afford the disk space.

Real Computer Scientists don't program in assembler. They don't write in anything less portable than a number two pencil.

Real Computer Scientists don't write code. They occasionally tinker with "programming systems," but those are so high level that they hardly count (and rarely count accurately; precision is for applications).

Real Computer Scientists only write specs for languages that might run on future hardware. Nobody trusts them to write specs for anything homo sapiens will ever be able to fit on a single planet.

Real Software Engineers work from 9 to 5, because that is the way the job is described in the formal spec. Working late would feel like using an undocumented external procedure.

Real Programmers disdain structured programming. Structured programming is for compulsive neurotics who were prematurely toilet-trained. Those people wear neckties and carefully line up pencils on otherwise clear desks.

Real Programmers don't bring brown-bag lunches. If the vending machine doesn't sell it, they don't eat it. Vending machines don't sell quiche.

Hiç yorum yok: