Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Book Review: Think Like a Programmer

samzenpus posted about 2 years ago | from the read-all-about-it dept.

Books 98

MassDosage writes "After nearly 15 years or of writing code professionally it was refreshing to take a figurative step back and read a book aimed at people getting started with computer programming. As the title suggests, Think Like A Programmer tries to get to the core of the special way that good programmers think and how, when faced with large and complex problems, they successfully churn out software to solve these challenges in elegant and creative ways. The author has taught computer science for about as long as I've been programming and this shows in his writing. He has clearly seen a lot of different people progress from newbie programmers to craftsmen (and craftswomen) and has managed to distill a lot of what makes this possible in what is a clear, well-written and insightful book." Read below for the rest of Mass Dosage's review.Think Like A Programmer is probably best read by those with at least a year's experience with programming, such as first or second year computer science students or those picking up programming on their own. The code examples in the book are all written in C++ so a basic knowledge of C++ syntax is required but this should be easy to pick up by anyone with familiarity with related or similar languages. Experienced programmers looking to brush up on their fundamentals will most likely find something useful here too. They probably do a lot of what is suggested here already without being aware of it but it can be encouraging to see this formalized in a book. I found it gratifying to see that some of the techniques I use daily were covered here — it's good to know that I'm not the only one who scrawls down funny diagrams and sketches out a rough plan before actually typing any code.

Different types of problem solving are discussed in separate chapters which cover the use of data structures, pointers, recursion and code libraries before wrapping up with a final chapter that brings all the previous approaches together. The book is intended to be read in its entirety with later chapters making frequent references to topics covered earlier. Think Like A Programmer is not a cheat sheet or cook book with quick fixes but a more substantive book that rewards those who read it as thoroughly as it has been written. Each chapter contains a few examples which are used to explain the topic under discussion and these have been well chosen to illustrate the key concepts. A series of exercises are also included which build on and extend each chapter. The author stresses that if the reader really wants to learn something and improve their problem solving skills then these exercises should be considered even more important than the text. The best way to learn how to program is by doing and the exercises force one to put what one has just learned into practise. The first few exercises at the end of a chapter are relatively simple and are basically variations on the examples that help the reader build confidence before moving into more challenging and tricky exercises that push one to apply one's recently acquired knowledge to new limits.

Throughout the book everything is explained in a good level of detail and enough background information is provided so that the reader should never feel out of their depth. The pros and cons of the various presented solutions are clearly weighed up with logical backing. The author is obviously very knowledgeable and experienced with teaching hard concepts to new learners and this shows in his no-nonsense, down-to-earth but enjoyable writing style. The code samples are clear and well thought out as are the diagrams that accompany the various examples. The chapter on classes was the only one where I felt like focus was being lost due to too many C++ implementation details but perhaps that's just the nature of the language. I would have liked the example here to show more clearly how classes can turn a morass of functional code into something more logically grouped and easier to understand. To be fair, the exercises at the end of this chapter do ask one to do this by asking one to convert a collection of string utility functions into a more logically organized string class. This again shows the importance of actually doing the exercises and not just simply reading them.

The core idea of how programmers take a complex problem and then break this down into smaller, more manageable and solvable parts is well described. The importance of having a plan before jumping in and writing code without thinking is stressed and there are great suggestions for how to take stock of your own personal strengths and weaknesses and come up with a personal plan that works for you. The example is given of someone who likes jumping right into coding — for someone like this it probably makes sense for them to do early prototyping as a way to start solving a particular problem, as long as the longer term plan involves taking a step away from this and incorporating the lessons learned into a more thoroughly thought out solution later. In this, as in the rest of the book, the author shows his years of experience teaching a wide range of people with different skill sets and approaches to problem solving. There is no single way to think like a programmer, but rather a number of tried and tested strategies that can be employed in various ways. Think Like A Programmer captures this core idea in an satisfying, down to earth manner and I can highly recommend it to anyone wanting to improve their problem solving capabilities. I wish I had had this book when I started studying computer science — the fundamentals contained here would have been a valued addition to the text books teaching syntax and specific technologies.

You can purchase Think Like A Programmer from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

cancel ×

98 comments

Sorry! There are no comments related to the filter you selected.

Silly Words (4, Insightful)

pubwvj (1045960) | about 2 years ago | (#41193793)

"craftsmen (and craftswomen)"

No need to do that. Women are included in human. Women programmers are included in programmers. Craftswomen are included in craftsmen. No need to complicate things.

Re:Silly Words (1)

Anonymous Coward | about 2 years ago | (#41193825)

I think that was a subtle nod. A little gesture acknowledging that there are, somewhere, female programmers out there. Probably.

Re:Silly Words (1)

causality (777677) | about 2 years ago | (#41193873)

I think that was a subtle nod. A little gesture acknowledging that there are, somewhere, female programmers out there. Probably.

Since we're obsessed with group identity these days, we can't just let that fact stand on its own (significant) merits.

In a truly unbiased society we wouldn't think of this as unusual or otherwise worthy of special mention. The attitude would be more like "of course women can be programmers, and water is wet, grass is green, the sky is blue..."

Re:Silly Words (0)

Anonymous Coward | about 2 years ago | (#41194395)

Numerous semantic failings.

The water appears to be wet.
The grass appears green.
The sky appears to be blue.

etc. etc. etc.

Re:Silly Words (0)

Anonymous Coward | about 2 years ago | (#41196779)

-1, moron

Re:Silly Words (0)

Anonymous Coward | about 2 years ago | (#41198809)

+1; poetic

Re:Silly Words (2)

pubwvj (1045960) | about 2 years ago | (#41194303)

But if the writer were truly egalitarian the 'subtle nod' would not be necessary because it is by default. If it must be mentioned that there might be women programmers out there then what about black, Jewish, Chinese, Mexican, Native American, French and Scottish programmers. Don't want to leave them feeling left out! The list becomes absurdly long. Just say craftsmen or programmers or what ever and leave it at that. No need to complicate communications. Simplify.

Re:Silly Words (3, Funny)

icebike (68054) | about 2 years ago | (#41194607)

Just say craftsmen

But Craftsmen has the word men in it, which might be viewed as exclusive.
So perhaps it should be Craftspersons.
But persons has the word son in it which implies a male child, which might be viewed as exclusive.
So perhaps it should be Craftsperchild.

Re:Silly Words (2)

obarel (670863) | about 2 years ago | (#41194697)

Hang on, the word "female" has the word "male" in it. Now I'm confused...

Re:Silly Words (2)

siride (974284) | about 2 years ago | (#41197841)

That one is actually a bit sexist. The word was originally "femelle" (little woman). It was changed to "female" because it seemed to be a counterpart to "male". The words are otherwise not related to each other at all ("male" comes from Latin "masculus" and "femelle" from a dimunitive of the Latin "femina").

Re:Silly Words (1)

obarel (670863) | about 2 years ago | (#41198669)

Yes, I'm aware of that (I actually studied Latin and Ancient Greek in university).
I think my response was a joke about "person" containing "son" (which are clearly not related, like "history"="his story" and other nonsense).

Re:Silly Words (1)

siride (974284) | about 2 years ago | (#41199103)

Gotcha. Sorry to be one of those internet nitpicker dweebs!

Re:Silly Words (1)

pubwvj (1045960) | about 2 years ago | (#41196027)

And human has the word man in it but it does not exclusively mean male.

Sometimes I think that the people who get so hung up over saying craftsmen and craftswomen must be hung up on sex.

I've decided I like crafty!

Re:Silly Words (2)

Nivag064 (904744) | about 2 years ago | (#41196057)

I am sorry, but I must now sue you for intellectual property theft - as I had previously thought of replacing 'person' with 'perchild' for exactly the same reasoning...

Re:Silly Words (1)

Sephwrath (2467088) | about 2 years ago | (#41196489)

You're wrong it's clearly craft-individual.

Re:Silly Words (0)

Anonymous Coward | about 2 years ago | (#41200327)

But Craftsmen has the word men in it, which might be viewed as exclusive.
So perhaps it should be Craftspersons.
But persons has the word son in it which implies a male child, which might be viewed as exclusive.
So perhaps it should be Craftsperchild.

We don't say programsmen; we say programmer. Just use crafter. Simple and applies to everyone.

Re:Silly Words (1)

Anonymous Coward | about 2 years ago | (#41194611)

Apparently that's where we are headed. The so-called professional newspaper in my town won't use the words 'fisherman', 'fireman', or 'policeman' beause those words "are not inclusive enough".

Re:Silly Words (3, Insightful)

Fallingcow (213461) | about 2 years ago | (#41194705)

I just wish people would stop using "she" for the genderless singular pronoun. It makes me think they're talking about someone specific and that I missed who it is, so I need to scan up. Very disruptive to reading.

At this point, I'd say using the plural pronoun "they" for double-duty as the singular-genderless is less jarring. Just give in and use it.

Re:Silly Words (0)

Anonymous Coward | about 2 years ago | (#41195435)

the use of "she" gives the lie to it being about inclusion. it's about exclusion of men - thereby fixing the years of imagined bias.

Re:Silly Words (1)

Count Fenring (669457) | about 2 years ago | (#41197777)

If using the female gendered pronoun is exclusionary, how is using the male gendered pronoun not? Either the usage of the gendered pronoun is exclusionary, or the bias isn't imaginary. Pick one.

Re:Silly Words (0)

Anonymous Coward | about 2 years ago | (#41198379)

Is there something complicated here? "He" was used... it was considered sexist and exclusionary. They replaced it with "she" - without a trace of irony.

Maybe you should try reading.

Re:Silly Words (1)

Count Fenring (669457) | about 2 years ago | (#41203623)

I suggest you read my comment more carefully. My point there isn't that "she" is or is not exclusionary, or that the bias in the word "he" is or is not imaginary. My point is that it can't be both.

Also, I'd suggest you read any of the actual rationales behind people who use "she" exclusively for the neutral gender case, or who use "he" and "she" interchangeably. You're misrepresenting their arguments very, very badly.

A short summary of such might go as such: "Sure, in a world where we could just search and replace sexist customs and cultural constructs by magic, your argument makes sense. But the people who use "she" exclusively are largely reacting to the existing male bias in the language - they're trying to counterbalance the perceived imbalance, by engaging in the opposite behavior. You don't right a scale by putting pressure on the fulcrum."

Re:Silly Words (0)

Anonymous Coward | about 2 years ago | (#41204355)

If it's not exclusionary, then it didn't need replacing with "she".

If it is exclusionary, then it should have been replace that "ve", "they" (or something else), not "she".

This isn't fucking complicated.

Replacing it with "she" was simply your typical punitive action striking a blow against the PHALLOCENTRIC HIERARCHY (say it with bunched fists and tensed neck, and holding placard) - dressed up with a lot of fucking sophistry from pseudo-intellectual halfwits... like you.

As I said before, I suggest you go back and read this thread again. Otherwise you're just going to end up looking even more stupid.

Re:Silly Words (2)

Nivag064 (904744) | about 2 years ago | (#41196099)

'he' is traditionally for both male & female, and is the greatest subset of 'he' & 'she' - but using 'their', 'them', and 'they' is more appropriate for referring to one or more people of potentially mixed, unknown, ambiguous, or non existent, gender.

Re:Silly Words (1)

geminidomino (614729) | about 2 years ago | (#41196383)

"They/them/their" is actually considered appropriate for TWO or more, known or unknown, being the plural pronouns, at least to sticklers. That's why it is (far too often) eschewed in favor of horrible writing: Randomly switching between "he" and "she", clunky "he/she" constructs, and my personal favorite that makes me just stop reading: made up bullshit like "sie/zie."

Re:Silly Words (1)

Nivag064 (904744) | about 2 years ago | (#41196983)

I started using gender appropriate language, long before this PC business became the scourge it is today. My motivation was that it did not seem appropriate to to use 'he' or 'his' in situations where gender was not relevant.

Often 'he' is used in a phrase that clearly applies to everyone in a group, so we end up with phrases that apply to an individual, just look at rules applying to multi player games.

Also I don't see the point of mentioning gender unless it is relevant to the discussion, so using 'he/she' mentions 2 genders. What if the individual was born with no genitalia, some people are, so to be politically correct we should not exclude them - so now we need to use 'he/she/it'. But what about people with characteristics of both male & female (but we should not use the word female as its last 4 letters are 'male' - if we are to object to using fireman on the basis that the last 3 letters are 'man') the mind boggles. If you do any research on the gender statistics of babies, you will find that a small but significant number of people are born not clearly of either gender, or that they are born of apparently one gender but naturally transform into the other.

"Consider the captain of a warship, his primary responsibility is keep afloat. He will be very conscious of this when faced with a possible engagement with superior forces."

Clearly this would apply to most, if not all captains, regardless of gender. so it would be better written as:

"Consider the captain of a warship, their primary responsibility is keep afloat. They will be very conscious of this when faced with a possible engagement with superior forces."

but not the following, as it implies that warships each have several captains or that it might not apply when a warship only has one captain, at any rate it looks clumsy:

"Consider the captains of warships, their primary responsibility is keep afloat. They will be very conscious of this when faced with a possible engagement with superior forces."

but the following is even more clumsy:

"Consider the captains of warships, his/her primary responsibility is keep afloat. He/she will be very conscious of this when faced with a possible engagement with superior forces."

///////////////

Most people are totally unaware, that a small but significant proportion of people are born neither clearly female nor male. Also some people are born as 'clearly' female and change into males at puberty. Of course which gender you identify with is controlled by your brain, and this might be at odds with your physical characteristics - this is more widely known, so I won't do additional research here.

ttp://www.nlm.nih.gov/medlineplus/ency/article/003269.htm
[...]
If the process that causes this fetal tissue to become "male" or "female" is disrupted, ambiguous genitalia can develop. The genitalia makes it difficult to easily identify the infant as male or female. The extend of the ambiguity varies. In very rare instances, the physical appearance may be fully developed as the opposite of the genetic sex. For example, a genetic male may have developed the appearance of a normal female.
[...]


http://www.isna.org/articles/ambivalent_medicine [isna.org]
[...]
Frequency of Intersexuality

Aside from the apparent presumption that “normalizing” surgeries are necessarily good, I suspect that ethicists have ignored the question of intersex treatment because like most people they assume the phenomenon of intersexuality to be exceedingly rare. It is not. But how common is it? The answer depends, of course, on how one defines it. Broadly speaking, intersexuality constitutes a range of anatomical conditions in which an individual’s anatomy mixes key masculine anatomy with key feminine anatomy. One quickly runs into a problem, however, when trying to define “key” or “essential” feminine and masculine anatomy. In fact, any close study of sexual anatomy results in a loss of faith that there is a simple, “natural” sex distinction that will not break down in the face of certain anatomical, behavioral, or philosophical challenges.
[...]
One 1993 gynecology text estimates that “in approximately 1 in 500 births, the sex is doubtful because of the external genitalia.” I am persuaded by more recent, well-documented literature that estimates the number to be roughly 1 in 1,500 live births.

The frequency estimate goes up dramatically, however, if we include all children born with what some physicians consider cosmetically “unacceptable” genitalia. Many technically nonintersexed girls are born with “big” clitorises, and many technically nonintersexed boys are born with hypospadic penises in which the urethral opening is found somewhere other than the very tip of the penis.
[...]


http://product-boy.com/2011/08/06/select-population-of-females-turn-into-males-during-puberty-growing-male-genitalia [product-boy.com]
[...]
In 1971, one happily married couple in the Dominican Republic experienced this biological phenomenon first hand when they had their second daughter. She was healthy, beautiful, and possessed all the phenotypic characteristics of a young normal girl. However, during puberty her voice deepened, a penis grew, and testicles descended. The child began to take interest in the opposite sex, girls. Distraught by what had happened to their daughter in the course a few months, she was taken to the hospital where DNA analysis revealed that the child was actually genetically a male, possessing the X and Y chromosomes (females have XX, males have XY). This phenomenon triggered a multitude of studies inquiring into the reality of ‘intersex’ individuals.

During the 1970’s, 1 in 90 males in the Dominican Republic had this condition known as 5-Alpha-Reductase Deficiency. Unbeknownst to parents, some daughters were in fact males. They appeared to be female with a vagina and the tenderness of a little girl. Raised as young girls, they became males once puberty hit; their testicles descended, phallus grew, voice deepened, muscle and bone mass increased, and so forth.
[...]

Re:Silly Words (1)

geminidomino (614729) | about 2 years ago | (#41197353)

I wasn't arguing against the (mis)use of the 3-plural pronouns as a substitute for a gender-neutral pronoun (which is a role, whether they like it or not, that is technically filled, in English, by the male 3-singular pronouns).

I would much rather see that then the clumsy examples you mentioned, or the abominations that I did. It's at least easier to read.

Re:Silly Words (2)

Nivag064 (904744) | about 2 years ago | (#41197519)

Apologies, I realized that! But I forgot to acknowledge it - me bad.

//////////// The following is not for the humour impaired! /////////////

Though I must strongly disagree with your sig!!! The neutrinos are not mutating, they simply can't decide which gender to settle on!

As 'evidence' that neutrinos have gender...

http://www.sciencemag.org/content/334/6054/304.short [sciencemag.org]
[...]
Recently, however, the case for sterile neutrinos has grown stronger, bolstered by a new analysis of data from nuclear reactors. So last month 60 physicists from around the world gathered to hash out the arguments for and against the existence of sterile neutrinos and to try to decide whether it's worth staging a dedicated experiment to settle the matter.
[...]


[Smilies omitted, due to budget constraints!]

Re:Silly Words (0)

Anonymous Coward | about 2 years ago | (#41198873)

There is already a singular-genderless pronoun: 'it'

Re:Silly Words (0)

Anonymous Coward | about 2 years ago | (#41216925)

I propose Hse, Seh, Esh, Hes as genderless pronouns to stand for He or She (or She or He).

Re:Silly Words (4, Insightful)

ShanghaiBill (739463) | about 2 years ago | (#41195555)

Apparently that's where we are headed. The so-called professional newspaper in my town won't use the words 'fisherman', 'fireman', or 'policeman' beause those words "are not inclusive enough".

If children are told to draw a policeman or fireman, they will almost always draw a man. If they are told to draw a police officer or a firefighter, they are more likely to draw a woman. The gender neutral terms are more inclusive, and are also more descriptive (does a fireman fight fires, or does he set them?), so why not use them?

I'll get off your lawn now.

Re:Silly Words (1)

pubwvj (1045960) | about 2 years ago | (#41195673)

So we'll just call the craftmen and craftwomen... crafty! :)

Re:Silly Words (1)

luis_a_espinal (1810296) | about 2 years ago | (#41196537)

Apparently that's where we are headed. The so-called professional newspaper in my town won't use the words 'fisherman', 'fireman', or 'policeman' beause those words "are not inclusive enough".

If children are told to draw a policeman or fireman, they will almost always draw a man. If they are told to draw a police officer or a firefighter, they are more likely to draw a woman. The gender neutral terms are more inclusive, and are also more descriptive (does a fireman fight fires, or does he set them?), so why not use them?

I'll get off your lawn now.

Citations please. And no, I'm not being facetious. I'm actually intrigued about your claim.

Re:Silly Words (0, Insightful)

Anonymous Coward | about 2 years ago | (#41197233)

Thats GoodThink citizen ShanghaiBill.

Of course, now we must address the fact that more women than men get degrees. Obviously we should have a quota system now to protect men until equality can be achieved.

Also, we must address the fact that women live longer than men. Obviously we should spend all health research on men now until equality can be achieved.

Also, we must address the fact that almost all military casualties are men. Obviously we should draft women until equality can be achieved. This may take some time because men have been dying unfairly for all of recorded history.

After all, it's equality that matters, right citizen?

Re:Silly Words (0)

Anonymous Coward | about 2 years ago | (#41200939)

straw man != reductio ad absurdum

TFP, HAND

Re:Silly Words (0)

Anonymous Coward | about 2 years ago | (#41199053)

Fighter sounds too masculine, I propose using firefightress for the females. (Just joking, but at some point, some one will, to be even more gender correct)

Book Review: Think Like A Nigger! (-1)

Anonymous Coward | about 2 years ago | (#41193837)

Ooooooh yo! Where da white women at?!

Re:Silly Words (0)

Anonymous Coward | about 2 years ago | (#41195097)

"No need to do that. ... No need to complicate things."

If you're going to be a pedantic git, don't use redundant statements like that for other pendantic gits to be critical about.

Re:Silly Words (1)

Anonymous Coward | about 2 years ago | (#41195361)

Why not just always use the word craftswomen, since 'men' is clearly included in that?

Re:Silly Words (1)

geminidomino (614729) | about 2 years ago | (#41196395)

Because we've already had it drilled into us that that means only the females. And because we already have a perfectly functional word, whether or not some crybabies throw a piss fit over it because they don't understand the concept of subsets.

Re:Silly Words (0)

Anonymous Coward | about 2 years ago | (#41196399)

If a computer programmer tells computers what to do, what are these "women programmers" you talk of?

Re:Silly Words (0)

Anonymous Coward | about 2 years ago | (#41197535)

Yeah, it should obviously have been written "craftsmen (or vagina)"

Re:Silly Words (1)

doom (14564) | about 2 years ago | (#41200673)

No need to do that. Women are included in human.

Yes, but it remains ambiguous as to whether women are included in "men", and if you don't think it's necessary to make that clear, your knowledge of English is several decades out-of-date.

I'm conservative about changes in language usage, too, but don't be ridiculous about it.

You may not like the fact that the feminists won this one, but they did, so get over it and embrace standard usage, because that was the one and only argument against this politically correct change in the first place.

Re:Silly Words (1)

mr.hawk (222616) | about 2 years ago | (#41205275)

Now, this entire "Silly Words" thread should be modded insightful. There can be no better illustration of "How to think like a programmer". Hilarious.

Good read for interns? (2)

preaction (1526109) | about 2 years ago | (#41193817)

I've had some self-taught programmer interns that seem to lack some of the critical problem solving skills that need to exist before the programming can begin. I've been looking for a book exactly like this: How to approach a programming problem. Is this a good gift to give to someone who really wants to be a programmer?

Re:Good read for interns? (2)

vurian (645456) | about 2 years ago | (#41193903)

The review suggests it is... Maybe get a copy for yourself to make sure?

Here's one. (1, Funny)

Anonymous Coward | about 2 years ago | (#41194013)

Is this a good gift to give to someone who really wants to be a programmer?

No. Give them this one. [amazon.com]

Re:Good read for interns? (1)

wesk (2662405) | about 2 years ago | (#41194461)

My book... I mean Mr. Spraul's book... would make an excellent gift.

Re:Good read for interns? (1)

garcia (6573) | about 2 years ago | (#41194615)

As an IT manager who has to deal with this, I find that books don't always help depending on how particular programmer learns. I spend a lot of time in "code reviews" (depending on your experience this could be handled in any number of methods) trying to teach my staff to think more like a programmer rather than the way they do.

What collective knowledge can the Slashdotter community share to help with this problem aside from books which I have found to be ineffective in my particular environment?

Re:Good read for interns? (1)

Hognoxious (631665) | about 2 years ago | (#41198779)

I do not have one doubt that this one [amazon.com] is more likely to be useful.

Nothing new (1)

Anonymous Coward | about 2 years ago | (#41193925)

The core idea of how programmers take a complex problem and then break this down into smaller, more manageable and solvable parts is well described.
 
That's exactly what George Polya [wikipedia.org] said [wikipedia.org] !

Want to be a great programmer? (-1)

Anonymous Coward | about 2 years ago | (#41193967)

Want to be a great programmer?

This [wikipedia.org]

Thanks, but I still prefer this reference book (5, Interesting)

gestalt_n_pepper (991155) | about 2 years ago | (#41193971)

http://programming-motherfucker.com/ [programmin...fucker.com]

Re:Thanks, but I still prefer this reference book (1)

pointyhat (2649443) | about 2 years ago | (#41194209)

I'd prefer "Software Engineering, My Good Friend" which is a whole different boat to Programming Motherfucker.

"Software Engineering, My Good Friend" would be similar but is not patronising, has no t-shirt shop (pocket protectors perhaps), takes well proven engineering principles and apply them to software and deliver quality working software the first time.

The only problem with "Software Engineering, My Good Friend" is that the marketing and business folk don't find it fashionable any more and would rather use "Programming Motherfucker" or "OMG Agile Twat Fuckwad Gnnnrrrr.....Shitbag" to deliver half working crap instead.

Re:Thanks, but I still prefer this reference book (0)

Anonymous Coward | about 2 years ago | (#41194673)

You may be interested in "Lighten the fuck up, Buttercup!"

Re:Thanks, but I still prefer this reference book (0)

Anonymous Coward | about 2 years ago | (#41195069)

I prefer "Coke, Bitches." But wish in one hand and shit in the other.

Re:Thanks, but I still prefer this reference book (1)

russotto (537200) | about 2 years ago | (#41196205)

"Software Engineering, My Good Friend" would be similar but is not patronising, has no t-shirt shop (pocket protectors perhaps), takes well proven engineering principles and apply them to software and deliver quality working software the first time.

Ah. So both mythical AND dull.

Re:Thanks, but I still prefer this reference book (1)

pointyhat (2649443) | about 2 years ago | (#41202349)

Dull makes stuff that works. Writing code is not all unicorns shitting rainbows.

Re:Thanks, but I still prefer this reference book (0)

Anonymous Coward | about 2 years ago | (#41194327)

That's a hilarious site!

Re:Thanks, but I still prefer this reference book (1)

jasnw (1913892) | about 2 years ago | (#41194993)

... and this:

Old Fortran Geek

Re:Thanks, but I still prefer this reference book (1)

Daniel Dvorkin (106857) | about 2 years ago | (#41215745)

Oh, that is brilliant. Thanks for the link.

I always recommend "Code" (5, Interesting)

LordofEntropy (250334) | about 2 years ago | (#41194009)

Charles Petzold's book, Code, is one I recommend to anyone who asks me about getting into programming. Actually I recommend it to anyone interested in computers in general. He uses flashlights, relays, and the like to "build" logical gates, accumulators, memory, and so on. A great read that really lays out how computers work.

Re:I always recommend "Code" (1)

freeze128 (544774) | about 2 years ago | (#41194199)

Is learning how logic gates and shift registers in the very low level of the hardware going to help you understand how to inherit a class in higher level programming language? Sure, understanding how a computer works is important if you want to code, but that level of detail might only be useful if you were writing in assembly. Everything is obfuscated now.

Re:I always recommend "Code" (3, Insightful)

Radres (776901) | about 2 years ago | (#41194331)

s/obfuscated/abstracted/

there *is* a slight difference in intent between those two words.

Re:I always recommend "Code" (0)

Anonymous Coward | about 2 years ago | (#41194457)

And yet both are accurate

Re:I always recommend "Code" (1)

Anonymous Coward | about 2 years ago | (#41194413)

What happens when your abstraction breaks? You are usually in the weeds if you do not understand the abstraction...

Re:I always recommend "Code" (3, Insightful)

Anonymous Coward | about 2 years ago | (#41194443)

I for one approve of this idea!
People who don't want to learn the nasty details of how computers work, and what's under the abstractions will always suffer from leaky abstractions (http://en.wikipedia.org/wiki/Leaky_abstraction). If you don't learn what the abstractions are meant to abstract, you don't really understand it. The abstractions are meant to make coding easier, not to replace understanding.

Re:I always recommend "Code" (1)

russotto (537200) | about 2 years ago | (#41196463)

People who don't want to learn the nasty details of how computers work, and what's under the abstractions will always suffer from leaky abstractions (http://en.wikipedia.org/wiki/Leaky_abstraction). If you don't learn what the abstractions are meant to abstract, you don't really understand it. The abstractions are meant to make coding easier, not to replace understanding.

Unfortunately, you quickly get down to quantum physics. Good luck really understanding that. Not that I know of a case where a bug or glitch could actually be tied to an obscure quantum physical effect (alpha radiation doesn't count as obscure).

Re:I always recommend "Code" (2, Insightful)

Anonymous Coward | about 2 years ago | (#41194485)

Actually, yes, very much. You *will* be a better programmer if you understand what your code runs on top of. I started out as an embedded systems programmer writing assembly code for hardware, and feel what I learned there still applies to what I do now as a web app dev.

Re:I always recommend "Code" (5, Insightful)

LordofEntropy (250334) | about 2 years ago | (#41194519)

In my opinion, absolutely. He gets into programming later in the book as he describes how you give instructions to this 8-bit machine he has basically built in the book. Getting a basic understanding of memory, instructions, and the logical constructs used in computers, I think is critical to any programmer. Otherwise inheritance is just "oh I can use this stuff in my class magically" without understanding what is actually happening—which will make other concepts like pointers, multiple inheritance, and polymorphism very confusing.

Re:I always recommend "Code" (0)

Anonymous Coward | about 2 years ago | (#41197983)

Wrong. People who don't know how the hardware works write the shittiest code.

Re:I always recommend "Code" (0)

Anonymous Coward | about 2 years ago | (#41200049)

Which one? He has written a truck load of books.

Think like a programmer... (3, Funny)

raftpeople (844215) | about 2 years ago | (#41194185)

"Cheetos, coke, pizza, mmmmmmm"

Re:Think like a programmer... (0)

Anonymous Coward | about 2 years ago | (#41194591)

You misspelled Pepsi.

Re:Think like a programmer... (1)

gestalt_n_pepper (991155) | about 2 years ago | (#41194779)

And forgot "sex in ways that are not even physically possible."

Not having read... (Sqore 3, Inqusitive) (0, Insightful)

Anonymous Coward | about 2 years ago | (#41194335)

...neither the summary nor the book, I feel I am immensely qualified to comment on this subject.

Seriously, programming is a brain function akin to playing a musical instrument (actually reading music
seems to be the correlative item). No amount of book learning is going to teach the unteachable.

You can learn the facts, but not their creative application - that's where that magic originates.

So a book may have some useful facts about successful programmers, but the 'how do' will never be there
(how did Mozart create, etc.)

We have enough .NET programmers, we don't need any more.

CAPTCHA = construe

You already think like a programmer, or you don't (5, Insightful)

Tony Isaac (1301187) | about 2 years ago | (#41194541)

Back in the 80s when I was in college, everybody signed up for Computer Science because there was money to be made, it was the thing to do. I noticed that few people made C's...people either made straight A's or flunked out. They got it, or they didn't.

Now, as a long-time programmer and hiring manager, I find the same trend: people are either naturally really good at programming, or they just don't get it. As with any art form, reading books and education can only go so far.

Re:You already think like a programmer, or you don (1)

Anonymous Coward | about 2 years ago | (#41194777)

This. You obviously get it.

Re:You already think like a programmer, or you don (3, Interesting)

ThorGod (456163) | about 2 years ago | (#41194839)

Well, somewhat. There is quite a lot to be said for reading material *while* working on problems relevant to the material. (It's far too easy to only *read* something, and feel that you "know it".)

It's also pretty challenging to make that leap from reading to doing, no matter the subject. But, if you can do it...then you can *do* whatever you read including how to program.

Some are just not into it ... (5, Insightful)

perpenso (1613749) | about 2 years ago | (#41195305)

Back in the 80s when I was in college, everybody signed up for Computer Science because there was money to be made, it was the thing to do. I noticed that few people made C's...people either made straight A's or flunked out. They got it, or they didn't. Now, as a long-time programmer and hiring manager, I find the same trend: people are either naturally really good at programming, or they just don't get it. As with any art form, reading books and education can only go so far.

Some get it enough to get that CS degree but they are just not into it. IMHO many grads seem to fall into this category, they even have good grades. They entered the CS program not because they had an inherent interest in programming but because someone told them it was a good career path. Its just a job to them.

I found what may be a simple way to tell those who have an inherent interest from those who do not. In an interview I like to ask about projects a candidate did on their own, for their own amusement or to satisfy their own curiosity. Sometimes I have to drag it out of them, they think their projects to too small or too trivial or too silly to be mentioned. If a recent graduate has written nothing other than class projects then I get a bit suspicious. It seems that the people who "get it" and are "into it" always have little side projects they can talk about.

Re:Some are just not into it ... (1)

nullchar (446050) | about 2 years ago | (#41197719)

Heartily agreed. When interviewing candidates, we always ask what their last side project was - what do they do outside of work? If they work on cars, or gardening, or any hobby, that's fine as long as they show more than a passive interest. But the people who work and do nothing else will never be great programmers.

Re:You already think like a programmer, or you don (1)

Javaman59 (524434) | about 2 years ago | (#41195383)

I taught programming for a year at university after graduating, and my observation of the students was just the same as yours - they either got it, or they didn't. There were a small number who flew through the programming tasks, and did more than was expected. There was another small number who persisted and eventually completed them. Then there was the majority who spent painful hours struggling to write anything which approximated the requirements, seeking help at every step of the way from each other and the teachers, and ending up with long, long programs which barely achieved anything.

For great justice! (2)

Trogre (513942) | about 2 years ago | (#41195269)

Good to see No Starch Press still putting out good titles.

Re:For great justice! (1)

DriedClexler (814907) | about 2 years ago | (#41197865)

What's with the name, though? I know they're all about "hacking", and this seems to be a cute publishing name hack, but ... seriously, what?

Woodpecker time again (0)

Simonetta (207550) | about 2 years ago | (#41195295)

Every time the question of how to best think like a programmer comes up, one needs to remind people to not think like programmers. Remember the old but true adage: If architects made buildings like programmers make software, then the first woodpecker to come along would destroy civilization.

Programmers seem to have no trouble with the concept that every single individual bit of the billion or so in a complex program has to be correct in memory for the program to work correctly. And this is assuming that there aren't errors or oversights in the program design, language, or algorythm.

Isn't there anyone out there working on this insane situation?

Re:Woodpecker time again (1)

geminidomino (614729) | about 2 years ago | (#41196437)

If architects made buildings like programmers make software, then the first woodpecker to come along would destroy civilization.

Programmers seem to have no trouble with the concept that every single individual bit of the billion or so in a complex program has to be correct in memory for the program to work correctly.

Wait, what? I thought that the woodpecker comment meant that programs were so slipshod that they were barely held together by spit and duct tape, and one bird could wipe it out completely. (Yes, it's hyperbolic. Most adages are)

If you plug in your "perfectionist" complaint, how does it work out to anything that makes sense?

Re:Woodpecker time again (1)

zippthorne (748122) | about 2 years ago | (#41198889)

I think you're mis-interpreting the complaint.

I think the complaint was not that the programmers are striving for perfect bits, but that they are assuming all bits will be perfect - that there will never be bad RAM, or corrupt input, and that their program does what they wanted it to do, rather than what it actually does....

Re:Woodpecker time again (1)

ultranova (717540) | about 2 years ago | (#41199807)

Programs have no error tolerance whatsoever. The first time something goes wrong (the woodpecker chips at the wall), the whole thing crashes. It's not that programs are perfect, but that our computing model means that if they aren't, it's super-happy crashy time.

Contrast this with the computing model of human brain, where errors are tolerated and corrected on a best-effort basis. For example, a drunkard will become increasingly uncoordinated as alcohol disturbs his motion control centers more and more, rather than simply crash all of a sudden. Or to architecture, where a building can take a certain amount of damage before coming crashing down.

But of course that error-tolerance has a price: circuits used for error-correction or materials used for extra structural strength aren't doing anything useful under normal circumstances. Thus, an error-tolerant computer would require more transistors than a normal one of equivalent speed, and require a whole new programming model besides. Alternatively, you can use normal computers with new programming models, and to some extent we already do (managed languages), but all that extra checking has a price in speed (and a typical program written in managed language is simply guaranteed to crash immediately rather than leak buffers and corrupt memory, so it's not that much of an improvement).

So in short: our programs are fast but fragile because they typically omit all of the error-checking that would make them sturdier but slower, and also don't bother with things like separating components into different memory spaces (so they couldn't interfere with each other except through the API) that would help limit damage from errors and make recovery possible.

Zen Monk Approach (2)

Greyfox (87712) | about 2 years ago | (#41195385)

I prefer to open vi and then whack my student with a bamboo stick until "Hello World" compiles and runs. Repeat with more complex examples, until they know how to program.

Re:Zen Monk Approach (1)

slew (2918) | about 2 years ago | (#41195709)

s/bamboo stick/ruler/ -> old parochial school approach...

256 pages long (3, Funny)

thenendo (523849) | about 2 years ago | (#41196159)

Coincidence?

As clocks tick, cows moo, programmers go WCPGW (4, Insightful)

Peter (Professor) Fo (956906) | about 2 years ago | (#41196265)

To *think* like a programmer you must have that sense that Murphy (of the law) is inside you [ie. Be humble no matter how clever you are] and in the real world [eg. A valid date might be 'June' which isn't 00:00 on 1st June]. An age ago when I wrote my book on the subject (text freely available at http://vulpeculox.net/ob/Programming.htm [vulpeculox.net] ) I twigged that programming is not about splitting problems into bits but understanding the need then building the solution from bits. Of course there are well-known methods for doing this. Now to me a programmer is a mental athlete. I expect them to train, have good facilities and consistently run good races but why on earth would I expect a high performance person to be operating at their peak 7.5 hours a day? Resting, recuperating and reflecting goes with achievement. Enthusiasm and interest in the next challenge keep up the momentum. Constraints and management targets destroy it. Once you've got the mechanics you can graduate to the principles then the patterns then the practice and finally being able to communicate with people.

The Churning (1)

lennier (44736) | about 2 years ago | (#41197875)

they successfully churn out software to solve these challenges in elegant and creative ways

Would those be the same "good programmers" who have churned out the last 20 years of critical Internet-facing vulnerabilities?

All that software sold, after all, so by some measure it was "successful". Just not by the old fuddy-duddy "not guaranteed never to steal your identity and strangle you in the night" definition.

Re:The Churning (1)

RabidReindeer (2625839) | about 2 years ago | (#41198947)

they successfully churn out software to solve these challenges in elegant and creative ways

Would those be the same "good programmers" who have churned out the last 20 years of critical Internet-facing vulnerabilities?

All that software sold, after all, so by some measure it was "successful". Just not by the old fuddy-duddy "not guaranteed never to steal your identity and strangle you in the night" definition.

We're not paid to be "good programmers". We're paid to "Git 'er Dun!" It's far more important to most employers that labor be quick and cheap than to be careful and precise. After all, a 10-year old kid can do this stuff! My little nephew Jimmy wrote a Pong game. All You Have To Do Is...

If programmers make so many mistakes ... (0)

Anonymous Coward | about 2 years ago | (#41198711)

why would I want to think like one?

How about programming like a thinker? (1)

John Hasler (414242) | about 2 years ago | (#41199359)

Somebody ought to try that someday...

SpaceChem (1)

Twisted64 (837490) | about 2 years ago | (#41210751)

How to see if you think like a programmer.

Step 1. Play SpaceChem.
Step 2. Check levels of enjoyment. If you are enjoying yourself, get thee to a programming job. Preferably in the field of robotics, I guess.

Alternatives to starting your programming career would include playing Zachtronics' other games, especially the codex of engineering. They have a perfect learning curve. I know I've posted about this a couple of times, but it can't be overstated; these games are all about programming.

Learn assembly language first... (0)

Anonymous Coward | about 2 years ago | (#41217647)

That FORCES you to break a problem down into its indivisibly small steps.

When you can do that 'on instinct' you can code a program 'on spec' alone with no need for flowcharts and whatnot.

Spend your time on defining the data (structures) and the program almost writes itself! :)

Unless you are a game programmer or a researcher that must code software tools to do your work, all you'll need to computerize some business process is addition, subtraction, multiplication, division, and binary sorting and searching along with the data and control structures your programming language has to offer.. Anything else you need is just I/O (GUI, text, [sound], files, or tcp/ip sockets) or 'big guns' like SQL.

CAPTCHA: conserve (what good programmers are supposed to do when writing software. :) )

Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>