78 Comments
- merreborn, on 10/12/2007, -8/+39if(your_post == 'sucks') { click_red_thumbs_down(); }
- birge, on 10/12/2007, -0/+25Yeah, his books really are like the bible of programming: everybody owns it but nobody reads it.
- leobaby, on 10/12/2007, -3/+20 Prince Wang's programmer was coding software. His fingers danced upon the keyboard. The program compiled without an error message, and the program ran like a gentle wind.
``Excellent!'' the Prince exclaimed, ``Your technique is faultless!''
``Technique?'' said the programmer turning from his terminal, ``What I follow is Tao - beyond all techniques! When I first began to program I would see before me the whole problem in one mass. After three years I no longer saw this mass. Instead, I used subroutines. But now I see nothing. My whole being exists in a formless void. My senses are idle. My spirit, free to work without plan, follows its own instinct. In short, my program writes itself. True, sometimes there are difficult problems. I see them coming, I slow down, I watch silently. Then I change a single line of code and the difficulties vanish like puffs of idle smoke. I then compile the program. I sit still and let the joy of the work fill my being. I close my eyes for a moment and then log off.'' - CharlesDarwin, on 10/12/2007, -1/+17do-loop or do not, there is no try/catch block.
- crilen007, on 10/12/2007, -1/+15Either it works efficiently, or poor and slow.
Perhaps it doesn't work at all, perhaps it was a very complex problem that was solved. Interfaces that are fluid and easy to follow, yet very functional are another example of art.
There is more to programming than works or doesn't work.
I wish my boss could understand this. - Daedalus2067, on 10/12/2007, -9/+22"There are only 10 kinds of people in the world: those that understand binary and those who don't." - source unknown
- ahawks, on 10/12/2007, -0/+8What we actually need here, is not to evaluate the value of your_post, nor an attribute of it (isCrap)... what we need is a function or object to evaluate the crappiness of a post.
//calls PostEvaluator's static 'evaluate_post' method
if (PostEvaluator.evaluate_post(your_post) >= PostEvaluator.averageCrappiness())
{
thumbs_down(your_post);
} else {
thumbs_up(your_post);
} - TokenUser, on 10/12/2007, -0/+6The comments here are sad - how many of you have programmed more than a markup language??
Knuth.
K&R.
Stevens.
Throw in some Don Norman and Edward Tufte ... and you might start getting somewhere in computer science/engineering/programming. There is more to it than rounded corners, flowing fonts, pastel layouts, and AJAX.
Read them. - merreborn, on 10/12/2007, -1/+6While my code would indeed be invalid C, C plusplus, or Java (actually, it's _valid_ java, just non-functional), it would be perfectly valid and functional Javascript.
Or, with the addition of a '$' before 'your_post', perfectly valid PHP.
I have only one question: Why bother attempting to validate syntax of joke pseudocode? - jboi, on 10/12/2007, -8/+13There is only one law in programming
either it works or it doesn't.
1 or 0 - TehDoctor, on 10/12/2007, -4/+9Counting in binary is as easy as 1, 10, 11
- eylander, on 10/12/2007, -1/+5@birge
the halting theorem states that a turing machine that decides whether or not an arbitrary turing machine halts/does cannot be built. but you can know what a specific turing machine does, mostly because we are not turing machines. - sshack, on 10/12/2007, -0/+4It's donald knuth. What do you expect? The guy goes into insane and thurough detail on any subject he touches. he isn't dry or boring either. If you're having any sort of algorithmic problem at all, pickup knuth and the computer will get intimidated and your problem will be gone. Seriously, knuth is up there with feynman and mozart in my books.
Pickup concrete mathematics where he had his grad students make comments on the margins. - birge, on 10/12/2007, -3/+7Actually, I think the one rule of programming is that there is no general way to know whether something works or not. (Halting theorem)
- siekosunfire, on 10/12/2007, -2/+6K&R are the only Gods.
- Cryptimus, on 10/12/2007, -1/+5 They're legal genius. Here, try clicking the link to Knuth's site and try this thing we know as 'reading': http://www-cs-faculty.stanford.edu/~knuth/
The PDF's are from Knuth's currently unpublished "Art of Computer Programming Volume IV". Had you the wit to actually read, you'd realise he's submitted these for general comment so experts in the field can check them for correctness.
I can tell someone's used all their clever points for the day. - Timbit42, on 10/12/2007, -1/+4@cjohnson
Linux is a kernel. - bieber, on 10/12/2007, -0/+3If you actually read the book, he explains his reasoning in the introduction to the first volume. What you have to remember is that at the time it was published, C wasn't fashionable. If he'd used a language from the time (Pascal or some such thing), the book would have quickly devalued as people started using C. But the same thing would have happened if he'd started when people were using C and used it. He'd have ended up having to revise all the books every decade or so to please a new generation of programmers. Rather, he just made up a machine with a simple assembly language, MIX, that wouldn't go out of fashion. Well, at least not too quickly. He _is_ now in the process of redoing the books using a new CPU, MMIX, which implements more of the features found on more modern processors.
- eylander, on 10/12/2007, -6/+9if you're going to use C/C++/Java/etc... syntax, at least use the correct operator.
= is the assignment operator
== is the comparison operator
=) - riceweb, on 10/12/2007, -2/+5$question = $decision ? $to_be : !$to_be;
- Trenton, on 10/12/2007, -2/+5Exactly, but he thinks it's to hard to learn, so he just uses visual basic, and it saves him one extra equal sign. =P
/* No Comment */ or // No Comment if you don't like nests - IHatePants, on 10/12/2007, -0/+2@birge: "Yeah, his books really are like the bible of programming: everybody owns it but nobody reads it."
Especially in light of the fact that most people who have read it can't make heads or tails of it. I'm just now working my way through his "Concrete Mathematics" (a blend of CONtinuous and disCRETE mathematics), and I've been doing this stuff for years. - Ozymandias42, on 10/12/2007, -2/+4If you fancy yourself a God, you'd better have a check from Donald Knuth that's a power of 2.
- DCstewieG, on 10/12/2007, -4/+6Merroborn: Agreed, but what terrible code for a thread on the art of programming! ;-)
- guaigean, on 10/12/2007, -0/+2An absolutely wonderful resource. Not necessarily applicable in every day life, but the book is definitely an important part of every programmer's library. Even if you don't understand it all, you're bound to pick up tips, hints, and oddities. The problems that he poses range from simple to near impossible, offering a wide range for anyone interested. Highly reccommendable.
- matsientst, on 10/12/2007, -3/+5Ok, neat but...
87 pages on Booleans?! Jesus... - greyfade, on 10/12/2007, -0/+2it says in one of the PDFs that Knuth himself decided to release these to the "adventurous" public for feedback and corrections. he notes that volumes 1-3 were riddled with errors in the first printing (errors he numbers in the thousands and are of the nature that us mere mortals would ever have a chance of noticing), and he wants to minimize that in the first printing of volumes 4A-4C.
i shudder to think when he'll finally write volume 7. - TheSilencer, on 10/12/2007, -1/+3On complex problems there is no concise answer to whether a program works or not. Does a program work if it only works for inputs that make sense but breaks on some that don't (negative/very large numbers etc.)? It isn't a 1 or 0, its an opinion in this case, with the subjectivity that comes along with that. Just ask my professors lol. (and my grade!)
- rowanjl, on 10/12/2007, -0/+2Am I the only person here to be surprised to read the words "good" and "pdf" in the same sentence? There has never been anything good about PDFs, they are one of the most annoying restrictive documents available, and nearly everything released in PDF form would be better suited as a simple HTML document. Sure if its an actual whole book, thats fine, but a few pages? The fancy layout hardly matters, you're better off giving it to people in a fully readable form (for example, a form where you can actually copy and paste source code would be great, which you can't do with most PDF readers).
Ok, enough ranting. - dr-steve, on 10/12/2007, -0/+2At the time Knuth released his books, C pretty much wasn't much of anything. My copies are from '75; even then, Vol 1 was in its second edition. Algol, man, Algol.
- antechinus, on 10/12/2007, -0/+2An excellent example of the dumbing down of culture by the unwashed. A masterful work of computer science is described as "A bunch of good pdfs on Boolean basics".
- PlancksCnst, on 10/12/2007, -0/+1@fires:
Exept that his post is in English, where "either...or" translates into the logical xor. - KyleGoetz, on 10/12/2007, -0/+1And how are PDFs restrictive? You can freely edit them with Linux software, and the PDF specification is a formalized standard, of which subsets are becoming ISO standards. PDFs are excellent, and just because a corporation invented it doesn't make it "evil".
http://en.wikipedia.org/wiki/Pdf
Your logic works the same for HTML: HTML is bad because the majority of HTML readers cannot show you the source (read: the dominant browser, Internet Explorer). Last time I checked, IE loaded Notepad to show you the source, the same way that numerous open-source programs can show you the source of a PDF. - KyleGoetz, on 10/12/2007, -0/+1Pshaw, we need some Python up in here:
if crap in post:
modDown(post)
(Except that it seems Digg will not preserve my whitespace formatting) - king52, on 06/15/2008, -0/+1The Art of Computer Programming Excellent http://www.ebooknetworking.com
- Metasquares, on 10/12/2007, -2/+3I never found TAoCP useful as a programmer, but it is invaluable to me as a theorist.
- Cryptimus, on 10/12/2007, -2/+3 Ozymandius: Allow me to introduce you to 'the rest of the world'. In that place, certain words such as 'realise' are spelled differently. As for grammatical errors, point them out, grammar nazi. Give it your best shot. I'm rather a dab hand with the English language and will quite happily fillet your myopic ass.
- disk, on 10/12/2007, -0/+1What I've read so far is really, really, really in depth. It almost seems like overkill. Does anyone know of any public C source where any of these topics has been implemented?
- clevershark, on 10/12/2007, -0/+1PostEvaluator.averageCrappiness() ? thumbs_down(your_post) : thumbs_up(your_post);
- fires, on 10/12/2007, -2/+2@jboi
1 or 0 equals 1, so with your logic:
either "something works or not" means it'll always work .. =P - Ozymandias42, on 10/12/2007, -3/+3Crypty: I really hate it when someone questions someone else's intelligence and wit while simultaneously making dozens of grammatical errors in their post. I know grammar and spelling isn't a great indicator of intelligence, but please try to spell your insults correctly. Otherwise the irony aliens will destroy is with their moran beams.
- sudonim, on 10/12/2007, -1/+1I think riceweb should learn a little bit about encapsulation.
Perhaps next time use a public accessor method isCrap() which returns the value of a post objects private boolean member variable crap. - squirlyblack, on 07/30/2008, -0/+0 A book full of algorithms, basic programming concepts, pseudo-random numbers that is not meant for everyone, but for those that implement and optimize, or for those that love math. But, as guaigean and sshack stated, this book should not miss from a self respected programmer’s bookshelf, because every new edition brings new algorithms, examples and exercises. https://cisco.hosted.jivesoftware.com/index.jspa?c ...
- sapo916, on 10/12/2007, -3/+3This is digg, piracy is all I know.
- GedMarc, on 10/12/2007, -0/+0I dont know but.... some of the stuff im reading here and the code im looking at, is kinda terrible... No structure in code, using the ternary operator (creates obfuscation), good code is judged by how maintable it is by other programmers.. When coding your always coding for 3 people, yourself, the maintainer, and the user... It seems most people in here only program for themselves, making messy un-readable and ultimately badly coded programs... And i've done quite a lot of languages... Looks like most people have forgotten patterning and conformaty.. Its like the difference between the same graphics engine used in 2 seperate games, the one will run a hell of a lot better while the other one slags behind, but they use the same engine... Most of the code here i've seen in terrible in these aspects..
- sshack, on 10/12/2007, -5/+5Donald Knuth is a god. If you fancy yourself a "programmer" and you do not own this book, you are not one.
- CuNoi, on 09/19/2008, -0/+0Good resources.
http://www.cunoi.com - doihaveto, on 10/12/2007, -0/+0@tokenuser and antechinus:
Heh, yeah, I had no idea they were talking about Knuth until I started reading the comments. "A bunch of good pdfs on Boolean basics"? Understatement of the year. :) - KyleGoetz, on 10/12/2007, -0/+0@birge:
Actually, one could make the argument that there were zero grammatical errors in the post. For example, in the opening sentence, "They're legal genius," the intention could have been to refer to the PDFs as works of genius that are legal to download (i.e. "legal genius"), but that is a stretch. Other than that, it was a flawless post made by Cryptimus. "Can" is correct in the phrase "... can check them for correctness." "Can" is used for ability, and the phrase's intention was to convey the idea that knowledgeable people have the opportunity to proofread the text.
Furthermore, Ozymandias' post started out by stating that "grammar and spelling isn't [sic] ..." when the proper verb conjugation is "aren't." However, this is Digg, and as such I do not expect flawless posts. Ozy was just looking to get riled up about something, I suspect. - KyleGoetz, on 10/12/2007, -0/+0@birge:
Or if you want to be technical (and German) about it, the Entscheidungsproblem
http://en.wikipedia.org/wiki/Entscheidungsproblem -
Show 51 - 77 of 77 discussions



What is Digg?
Browsing Digg on your phone just got easier with our enhancements to the