Duo Pizza Teams Pragmatic Studio
Mar 30

Code Reading

Tech Add comments

Code Reading

I got turned onto the book Code Reading based on the foreward by Dave Thomas.

He is spot on to the fact that we learn traditional Computer Science in a weird way.

In the classes that I had at uni, we were always asked too:

Write a program which uses Bubble Sort to do X…. Then compare with a Quick Sort version.

Each time, we got to start from scratch and write code for the task.

I don’t know if things have changed recently (I am sure it is different in some good schools), but we never had to do the task that you end up doing most of the time:

Maintenance: Starting from the given application, fix 5 of the 10 bugs located in this JIRA instance. Then, add the following 2 features into the application.

Now THAT would be more realistic and useful. Part of this process requires that we are good at reading code. However, as the book states, we never get taught HOW to read peoples code.

With the advent of opensource, we now even have the luxury of being able to look at good and bad code. It is all out there. Rather than having someone come talk at a Java User Group, wouldn’t it be nice to have a group get together to analyze some code? Each time someone could be the CM (Code Master) and have looked through for choice design decisions.

This all comes down to my entry: Read The Source, Luke

11 Responses to “Code Reading”

  1. J Says:

    One of my CS profs gave the class a project to update a game written in Java by adding 5 new features. The kicker was that all the comments in the code were in a foreign language! We were completely dumbfounded – much like I am on a day to day basis now…

  2. Dion Says:

    Very cool. I wish I had prof’s like that. Instead I had Father Christmas look-a-likes who loved Scheme.

    It is ironic that the world is coming back around to those ideas now :)

    D

  3. Homam Alsayed Says:

    So did you like the book? Thomas Paul’s review at Amazon was quite discouraging.

  4. Nick Says:

    I think that CS Profs are starting to lean in that direction. Most of the projects I did in school required me to start from scratch; however, I did notice that as I got deeper into the CS curriculum I did more and more examining of code. I’ll never forget having to read through 10 pages of LISP before I knew much about it.

  5. Unruly Rambling Says:

    Code Reading Rebuttal

    I disagree 100% with the statements made in Dion’s blog entry. Computer Science is not about solving real world problems; it’s about theory and leaning how to think.

  6. Mike Shoemaker Says:

    My rebuttal here: http://www.shoesobjects.com/blog/2005/03/31/1112293377709.html

  7. Dion Says:

    Mike:

    Did I say that CSci should be 100% about adding features and reading code?

    No.

    I think there is PLENTY of room to offer more practical courses in Computer Science programs though.

    The fact is that I am in the real world now, and although some of the CSci classes were good, I would still rather have had the opportunity to learn how to work well with a real database like Oracle, compared to how to write a database from scratch.

    That is just me. I think there is room for the CSci guy who just wants the theory. I never even had the chance to take the practical.

    I care about solving business problems. I happen to solve those problems through code. I don’t get off writing another bubble sort.

    Dion

  8. rck Says:

    We have something similar at our university. The lecture there is mandatory for a couple of master computer science studies and called “Software Wartung und Evolution” (Software maintenance and evolution).

    Basically exactly what you describe.

    Ren

  9. mamadas Says:

    que mamadas son las del post de arriba, borralo yo si soy fan de tu web

  10. Pericles Says:

    Very realistic and amusing site.
    amateur porn amateur secret video amateur blow job amateur homemade video
    [url=http://amateurs.x3porn.info/amateur-gallery.html] amateur gallery [/url][url=http://amateurs.x3porn.info/amateur-match.html] amateur match [/url]

  11. OSCAR ANDRES Says:

    NINGUNO

Leave a Reply

Spam is a pain, I am sorry to have to do this to you, but can you answer the question below?

Q: Type in the word 'ajax'