Post new topic Reply to topic  [ 10 posts ] 
The Art of Unix Programming (Raymond) - Book Review 
Author Message
User avatar

Joined: Tue Oct 13, 2009 7:43 am
Posts: 143
Post The Art of Unix Programming (Raymond) - Book Review
The Art of Unix Programming - Eric Raymond (also author of "The Cathedral and the Bazaar")
Available for free : PDF

First off, I want to point out that the book's title may come off as somewhat misleading (you might think Unix system programming, you're wrong) , so don't judge the book by its cover. A more accurate title, though a bit long, should be "The Art of Creating Proper Software and Design, Using the Style and Philosophy of the Unix Community" or "The Art of Unix-Style Programming".
In the book, with 30 years of experience in his pocket, Raymond sets out to capture the practices, history, and philosophy that have led to Unix OS's (and its software's) colossal impact on the computing industry. Unix is an operating system(OS) that can be considered the first "modern" OS, and the forefather of today's OSs (though Windows did a good job of distancing itself from this fact by tossing out most of what made Unix good, and changing terms such as "Directory" to "Folder"). 40 years after its creation (Bible times for the computer industry), Unix continues to live and breed in the modern world (though now mainly through its open-source implementations such as "Linux" and "BSD"). So why is it that in an industry where change is so quick that 5 years is ancient history, an OS from the end of the 60's still thrives. The answer is simple and perhaps obvious, because it got something right.
Throughout all these years of existence, Unix programmers have seen what works and what does not. As a result the Unix community has created an unofficial philosophy by which it creates its software. Following these rules, it's been able to create highly re-usable, long-lasting code that has enabled Unix to go such long ways. Raymond makes a list of these rules (such as code-modularity, separation-of-tasks, design-transparency, code-clarity, others) and brings up examples of software in which such principles are evident.
It is a 500 page book, and for most might be a bit much, and I believe Raymond understood that, that is why he has a single chapter dedicated to listing/describing all of these rules. This chapter alone is enough for the understanding of the Unix philosophy. After all, simplicity, is one of the main reasons for Unix's success, which would have been hard to have had, without a simple design philosophy. So if you're short on time, you can see and learn the Unix wisdom in just 30 pages. Now although the ideas are simple, it takes time to fully envelop oneself in them, so the rest of the book goes into depth of each of the rules to help draw you in.
Raymond also provides 50 pages of history of Unix. He describes the environment in which it was born and explains how and why it came to be the way it is today. For me, as a fan of history, this was a very insightful read. Raymond does a phenomenal job of piecing things together, and my understanding of Unix and it's philosophy increased greatly having read and understood its history.
So if you have a little bit more time I'd suggest reading the history as well, if you want to deepen your understanding. Together the philosophy and history of Unix make up the first section of the book, and this is what I'd ultimately recommend the readers, the first 80 pages.

Something interesting:
* Raymond features insight throughout the book from a multitude of Unix saints (including it's designer Ken Thompson, and notable contributors Ken Arnold, Brian Kernighan, David Korn, Doug McIlroy).
* Based on personal experience, these concepts can be applied outside of just programming and computing. If I was to generalize, Unix philosophy ultimately demands a clean and modular design, which can be applied to practically anything in life.


Sat Oct 17, 2009 11:48 am
Profile
Site Admin
User avatar

Joined: Mon Oct 12, 2009 3:11 pm
Posts: 328
Location: Irvine, CA
Post Re: The Art of Unix Programming (Raymond) - Book Review
I was just about to suggest you post this! Props ROMAN! (heheheh capitalization). And a very good review.

I've actually been thinking that I need to read something on design philosophy. Cellspecks is reaching close to 10K lines of code and getting kinda messy. Storing UI features in buffers and such. There has to be a better way!

_________________
Website: http://www.intercottageindustries.com
Handle: Taenon

Ubuntu/Win7 January 2010:
AMD Phenom II x4 955 BE @ 3.6GHz (from 3.2GHz)
ASUS 790X Mobo @ 2000MHz HT
G.Skill 2x2GiB DDR3 @ 9-9-9-24 1600MHz
BFG GTX 260 core 216 896MiB
Corsair 750tx 750W PSU


Sat Oct 17, 2009 11:50 am
Profile WWW
User avatar

Joined: Tue Oct 13, 2009 7:43 am
Posts: 143
Post Re: The Art of Unix Programming (Raymond) - Book Review
Yeah man, and i think for you especially, with your experience, the first 30 pages should be enough.
I think if you have experience, everything will just click, because you'll see these principles against
your former code, and thinking back you'll see how these rules will have improved it. That was surely
the case for me


Sun Oct 18, 2009 10:27 am
Profile
Site Admin
User avatar

Joined: Mon Oct 12, 2009 3:11 pm
Posts: 328
Location: Irvine, CA
Post Re: The Art of Unix Programming (Raymond) - Book Review
So I'm working on my code in research today, and I realized that my program is getting really complex and messy. I was implementing a way of modifying and updating an image for display in one window, but to do so I had to pass a reference through about 5 different objects, including the target object's superclass (at least once). Which is not good! Does the book give any suggestions or guidelines for large program structure?

_________________
Website: http://www.intercottageindustries.com
Handle: Taenon

Ubuntu/Win7 January 2010:
AMD Phenom II x4 955 BE @ 3.6GHz (from 3.2GHz)
ASUS 790X Mobo @ 2000MHz HT
G.Skill 2x2GiB DDR3 @ 9-9-9-24 1600MHz
BFG GTX 260 core 216 896MiB
Corsair 750tx 750W PSU


Fri Oct 23, 2009 8:20 pm
Profile WWW
User avatar

Joined: Tue Oct 13, 2009 7:43 am
Posts: 143
Post Re: The Art of Unix Programming (Raymond) - Book Review
yeah certainly, based on your description sounds like its an issue of separation of tasks. A program should be made up of (small) concrete tasks, that do one thing and do it well. all these tasks can than be combined to accomplish bigger tasks. So make sure that you don't have a single task that could be split up into multiple tasks. It's like building a stone wall, it's better to make it out of smaller rocks, that can then fit better together, than out of big rocks, which won't fit as well and will have bigger holes in-between them.
It maybe harder to start off with smaller blocks, but it pays of in the long-run, when you start going back to the code to re-build certain sections.


Fri Oct 30, 2009 5:32 pm
Profile
Site Admin
User avatar

Joined: Mon Oct 12, 2009 3:11 pm
Posts: 328
Location: Irvine, CA
Post Re: The Art of Unix Programming (Raymond) - Book Review
My problem primarily stems from letting objects communicate with each other. When I have anywhere from 3 to 20 different objects using the same 2 or 3 GUI windows, some of which are of same type (or extensions of the same type), it is an issue of communication.

_________________
Website: http://www.intercottageindustries.com
Handle: Taenon

Ubuntu/Win7 January 2010:
AMD Phenom II x4 955 BE @ 3.6GHz (from 3.2GHz)
ASUS 790X Mobo @ 2000MHz HT
G.Skill 2x2GiB DDR3 @ 9-9-9-24 1600MHz
BFG GTX 260 core 216 896MiB
Corsair 750tx 750W PSU


Fri Oct 30, 2009 11:39 pm
Profile WWW
User avatar

Joined: Tue Oct 13, 2009 7:43 am
Posts: 143
Post Re: The Art of Unix Programming (Raymond) - Book Review
well it might relate, since objects should probably communicate with themselves directly as unique individuals, and not through other objects. the blocks making up your program should be small, single-tasked, yet stable enough to stand on their own without relying (too much) on other blocks to do sutff (i.e. communication) for them.


Sun Nov 01, 2009 10:06 am
Profile
Site Admin
User avatar

Joined: Mon Oct 12, 2009 3:11 pm
Posts: 328
Location: Irvine, CA
Post Re: The Art of Unix Programming (Raymond) - Book Review
Not so sure its that simple. I'll clean up my code and show it to you if you want but until then, I remain skeptical. Its not a small single function program, and the source data is used in a lot of different ways.

_________________
Website: http://www.intercottageindustries.com
Handle: Taenon

Ubuntu/Win7 January 2010:
AMD Phenom II x4 955 BE @ 3.6GHz (from 3.2GHz)
ASUS 790X Mobo @ 2000MHz HT
G.Skill 2x2GiB DDR3 @ 9-9-9-24 1600MHz
BFG GTX 260 core 216 896MiB
Corsair 750tx 750W PSU


Sun Nov 01, 2009 6:43 pm
Profile WWW
User avatar

Joined: Tue Oct 13, 2009 7:43 am
Posts: 143
Post Re: The Art of Unix Programming (Raymond) - Book Review
Oh i know its not that simple, the suggestions given by the book are just something to consider when you're making your program. Your program seems fairly complex, so yeah you're not going to adopt all these principles, doubt that any program does, but if you're aware of them, and you're thinking about them when writing the software, you'll have some elements of the principles, and history shows, that you will ultimately end up with a better/cleaner program.


Mon Nov 02, 2009 11:04 am
Profile
Site Admin
User avatar

Joined: Mon Oct 12, 2009 3:11 pm
Posts: 328
Location: Irvine, CA
Post Re: The Art of Unix Programming (Raymond) - Book Review
I'll definitely agree with that. And I'm not saying my program couldn't be completely re-written to be wayy better or more organized (I started writing it in ICS 21, after all). Thats actually what I'm working on now that I have a little free time in lab.

_________________
Website: http://www.intercottageindustries.com
Handle: Taenon

Ubuntu/Win7 January 2010:
AMD Phenom II x4 955 BE @ 3.6GHz (from 3.2GHz)
ASUS 790X Mobo @ 2000MHz HT
G.Skill 2x2GiB DDR3 @ 9-9-9-24 1600MHz
BFG GTX 260 core 216 896MiB
Corsair 750tx 750W PSU


Mon Nov 02, 2009 11:11 am
Profile WWW
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Forum style by Vjacheslav Trushkin for Free Forum/DivisionCore.