The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 20, 2019, 11:28:30 AM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: The best programming book ever written  (Read 3728 times)
kurdt
Lifer
*****
Offline Offline

Posts: 1153


paha arkkitehti


View Profile
« on: August 03, 2010, 03:44:45 AM »

You really want to read this book. Once you get pass the initial shock of weirdness compared to "respectable" programming literature you'll soon realize that this is the best piece of text ever written about programming. It illustrates beautifully how I think about programming. To me it has always been a way to describe the world to a computer but now I realize how different my view is from your average programmer. It seems that normal programmers see programming languages as instructions when I view them as stories and sentences that computer runs. This is probably the very reason why I was never able to learn C or Java efficiently and I have always been drawn to more human language like programming languages like PHP, javascript and now Ruby. Like why puts it in the book, your normal computer language is a way for humans to translate their needs to a computer while Ruby aims to be a programming language that you can talk. It might not be the fastest but it certainly is a language that gives me ability to create software faster than ever before.
Logged

I met god and he had nothing to say to me.
mampy
Journeyman
***
Offline Offline

Posts: 68


View Profile
« Reply #1 on: August 03, 2010, 08:40:16 AM »

Thanks for the tip, Kurdt.  Ill enjoy finishing that when I get some free time tonight.
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #2 on: August 03, 2010, 10:23:22 AM »

Although just a little over-cute for me, I like the notion and it matches well with how I think as well ... sentences and phrases, not blocks of code.

Nice find K, I'm going to keep it around as a potential resource for a n00b ... they might like that format quite a bit.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
serialnoob
Journeyman
***
Offline Offline

Posts: 88


View Profile
« Reply #3 on: August 10, 2010, 06:23:52 PM »

Isn't that the essential reason why they are called "languages"?
Logged

Success consists of going from failure to failure without loss of enthusiasm - Winston Churchill
vibratingquickly
n00b
*
Offline Offline

Posts: 8


View Profile
« Reply #4 on: August 11, 2010, 05:53:09 AM »

Noooooooooooo,

Don't read that book if you want to learn ruby, especially if you already know some other language like php. That book put me totally off ruby by showcasing the more esoteric features of ruby without helping me understand what was really going on underneath.

After reading it I thought ruby was just all magic and not worth learning.

Fortunately, a few months after reading _why's guide, I chanced upon a the tutorial on the ruby homepage that was more conventional and only then did I start getting what ruby was about.

The online version of the book Programming Ruby is also a good introduction.

Btw, ruby's really cool and powerful. You can do stuff like modifying built in classes. For example here's a snippet I use often

Code:
puts "http://google.com".html.parse_all("//a/@href")

which gets all the links from google.
« Last Edit: August 11, 2010, 06:03:41 AM by vibratingquickly » Logged

No links in signatures please
kurdt
Lifer
*****
Offline Offline

Posts: 1153


paha arkkitehti


View Profile
« Reply #5 on: August 11, 2010, 06:40:51 AM »

After reading it I thought ruby was just all magic and not worth learning.
Umm... now what's wrong with being magic? How does it make Ruby not worth learning? Doesn't that really just make it more worth of learning?

Quote
That book put me totally off ruby by showcasing the more esoteric features of ruby without helping me understand what was really going on underneath.
That's exactly why I like it. I couldn't care less what happens underneath. All that stuff makes me sleepy. I just want to do 10.times and get something done 10 times without caring how or what it actually does. But I realize that some people just like to know all the nuts and bolts beneath and that's obviously cool - programming world wouldn't survive and progress without both types of programmers.

It's just that to me Ruby was exactly the escape from nuts and bolts programming so to me it's funny that you criticize _why for demonstrating that Wink
Logged

I met god and he had nothing to say to me.
vibratingquickly
n00b
*
Offline Offline

Posts: 8


View Profile
« Reply #6 on: August 11, 2010, 08:39:10 AM »

The magic without explanation put me off because I thought(wrongly) that I would be dealing with a language that had a ton of special cases rather than a language with clean and coherent design, which in turn led me to think that ruby wasn't worth learning.  The book isn't bad per se , it's just that the breadth-first approach isn't suitable for everyone.
Logged

No links in signatures please
isthisthingon
Global Moderator
Lifer
*****
Offline Offline

Posts: 2879



View Profile
« Reply #7 on: August 11, 2010, 11:13:32 AM »

 Applause

Awesome.  I finally checked this out - fantastic find kurdt.  I'll admit that I naturally think in computer language when programming in my mind, not English, so languages like Java, C++, C#, Apex and others are "natural" for me.  This is probably because I've groomed my mind to make it so since I started programming.  But this book is like the secret Ruby key to me.  I've never read anything that describes Ruby like this and this makes it far easier to interpret. 

When I read any computer language I naturally first scan it with my mental interpreter that begins parsing it into variables, control structure, flow, conditions, functions, classes, scope, etc.  But almost instantly I have a new tool when groking Ruby.  By attempting to scan Ruby "unnaturally" with something closer to English as my interpreter, I just accelerated my comprehension of it - significantly.  That's the key that's been missing for me in Ruby: it's always been a bit like running in water at times, which can be discouraging.  For example, in the book he provides this line of code to be read like English:

Code:
['toast', 'cheese', 'wine'].each { |food| print food.capitalize }

Aside from the obvious bug in his code (wine is drink, not food), I'd find myself worrying about where "food" came from, the scope of food and if we need to clean up the table after dinner.  Are there any additional guests coming?  Are they vegans?  Will they be requiring chopsticks?  Will toast and cheese be combined so frequently that we might serve a "sandwich" instead?  Actually that thinking is far more English than I normally think in code.  Baby steps.

Thanks kurdt.
Logged

I would love to change the world, but they won't give me the source code.
kurdt
Lifer
*****
Offline Offline

Posts: 1153


paha arkkitehti


View Profile
« Reply #8 on: August 11, 2010, 03:04:37 PM »

I'm currently playing with Ruby on Rails and I'm having same difficulties I had when I changed from Windows to Mac. Too many times it's just hard to believe that there's so much easier ways to do things and trust that engine under the hood knows what it's doing and just relax. Even I was mainly a PHP programmer before so I don't come from C world, I still find it hard to let go of the old habits of doing everything myself.

After playing with Ruby and Rails, PHP feels like C for noobs - It is easier to use but you still are basically programming in the same paradigm. Ruby and Rails on the other hand feel like the next level. It's like what PHP should have been and was suppose to be. You know the old saying "avoid hand-hacking, write programs to write programs when you can"... in my mind I'm doing exactly that when using Ruby because I know for a fact that Matz (creator of Ruby) writes a hell of a lot better C than I do. So when I write 10.times {p "cache"} I know that the underlying Ruby interpreter will "convert my code" to C more efficiently than what I could have written in C in the time it took me to write that in Ruby. So unless you really need the raw power of low level language, I really don't see the point anymore to go lower than Ruby Smiley
Logged

I met god and he had nothing to say to me.
arms
Expert
****
Offline Offline

Posts: 235



View Profile
« Reply #9 on: August 11, 2010, 10:19:36 PM »

i am a learn by example guy and this book has too many sentences between examples but i just learned ruby has an "each" (method?) for lists which is nice.

if i wasn't so satisfied with python ruby would be the language i would explore.

if i hadn't come to dread java, i would taske a closer look at c#.
Logged
isthisthingon
Global Moderator
Lifer
*****
Offline Offline

Posts: 2879



View Profile
« Reply #10 on: August 11, 2010, 11:14:53 PM »

if i hadn't come to dread java, i would taske a closer look at c#.

 ROFLMAO  Here's to dread, since although C# has tremendous advantages over other languages like C++, it would lock you into Microsoft which isn't worth all the tea in China.
Logged

I would love to change the world, but they won't give me the source code.
kurdt
Lifer
*****
Offline Offline

Posts: 1153


paha arkkitehti


View Profile
« Reply #11 on: August 12, 2010, 12:28:27 AM »

i am a learn by example guy and this book has too many sentences between examples but i just learned ruby has an "each" (method?) for lists which is nice.
Everything is an object in Ruby so yeah, method. One of the great things in this model is that you can create objects "on the fly" like {'key'=>'value','key2'=>'value2'}.each { |key,value| p key.to_s+value.to_s } and then use "blocks" to manipulate that object further. This makes it really fast to do iterations and other very common code logic without having to write a lot of code. You can also chain methods like in jQuery which is also one of my favorite features because it saves sooooooo much typing.
Logged

I met god and he had nothing to say to me.
burton72stephens
n00b
*
Offline Offline

Posts: 1



View Profile
« Reply #12 on: August 18, 2010, 02:22:04 AM »

You really want to read this book. Once you get pass the initial shock of weirdness compared to "respectable" programming literature you'll soon realize that this is the best piece of text ever written about programming. It illustrates beautifully how I think about programming. To me it has always been a way to describe the world to a computer but now I realize how different my view is from your average programmer. It seems that normal programmers see programming languages as instructions when I view them as stories and sentences that computer runs. This is probably the very reason why I was never able to learn C or Java efficiently and I have always been drawn to more human language like programming languages like PHP, javascript and now Ruby. Like why puts it in the book, your normal computer language is a way for humans to translate their needs to a computer while Ruby aims to be a programming language that you can talk. It might not be the fastest but it certainly is a language that gives me ability to create software faster than ever before.


Well thank you for this info.....will surely go through it.
Logged

No links in signatures please
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #13 on: August 18, 2010, 07:24:09 AM »

Bot.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!