Computer Science Teacher
Computer Science Teacher - Thoughts and Information from Alfred Thompson

December, 2008

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    One More Reason I’m Proud of Working For Microsoft

    • 0 Comments

    Interesting article about “a survey of major corporations [of which companies are] doing the best job of investing in its community. The survey was part of a study published by the U.S. Chamber of Commerce and the Center on Philanthropy at Indiana University.” Microsoft named top U.S. company for community investment in survey of peers

    IBM and Dell were 4th and 5th. Google and Intel were tied for 6th (although I think that should be seventh but what does it really matter.) Lots of the giving of all five companies is for education. This is not surprising as all of these high tech companies really require not only educated employees but customers.

    I’ve been really pleased to be a part of a lot of work that Microsoft has done to support education over the past several years. There is a clear indication at all levels of the company that Microsoft has to support education. For the good of the students, society and Microsoft itself. I’m glad that other companies including those that Microsoft competes with feel the same way.

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Why Do So Many Programmers Use One Character Index Variables

    • 14 Comments

    There is a commercial on TV these days where a little girl is helping her mother and grandmother prepare a large turkey for a holiday dinner. The little girl asks the older women why the turkey only has one leg. The other leg has been cut off and the older women explain that this is because the little girl’s great grandmother always did it that way. Then a flashback shows that the reason the leg was originally cut off was because the great grandmother didn’t have a pot that whole hold the turkey unless one leg was cut off first. Her daughter and granddaughter and great granddaughter could probably easy buy a pot large enough. In fact the pots they have now might be large enough. But “because that is the way we have always done it” these women were still cutting off one leg.

    I remember Grace Hopper once saying in a talk that if we every said “because that is the way we have always done it” she would appear behind us and haunt us. I can’t hear the phrase without thinking of here over 30 years later. But in a real way that is why so many programmers using index variables of one letter and that the letter is between “i” and “n.” So what’s the story?

    For many people back in the day the principal programming language was FORTRAN. Early versions of FORTRAN would let you specific the variable type of a name but the default values for integers were variables that started with the letters “i” through “n.” Also with some systems longer variable names took up more room in memory. And memory at that time was expensive. So to make it easy a lot of people used “i”, “j”, and “k” as their first choice for index variable names. That’s how I learned it.

    Those of us who learned FORTRAN as a first language brought that habit with us to other languages. To BASIC, and C, and Java, and even PASCAL. And many many more. Why? “Because that is the way we have always done it” Shame on us. And the people we taught taught the same thing to others. That’s not really good. “index” is such a better variable name. In specific cases there are even more helpful, more descriptive and more useful variable names. For counting loops, for variables to pass to methods and many other places. Generally most of use have gone beyond the one character variable name. The last big sticking point seems to be index/loop variables. It’s probably time we all got past that. At least we should teach better practices to our students.

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    What Would a 2000 Year Old Computer Look Like?

    • 0 Comments

    A British museum has rebuilt a 2000-year old computer initially used by the Greeks. The ruins of this computer were found 100 years ago and only recently has it been possible to study the device well enough to reconstruct it. Interestingly enough the original and the new reproduction were both made from recycled parts.

    Check out the 2000-year old computer article at Wired or this article at the Guardian. And watch the video below. Cool stuff!

     

Page 2 of 7 (21 items) 12345»