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

January, 2010

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Computer Engineer Barbie?

    • 8 Comments

    Those wonderful people who bring you Barbie (remember the version that said “Math is hard?”) are collecting votes for Barbie's next career. There are five options up for the vote: Environmentalist, Surgeon, Architect, News Anchor, and Computer Engineer. My first reaction was “Great!” We can get little girls to think about becoming computer engineers at an early age. My second reaction was “how do the Barbie think a female computer engineer looks?” OK now there are some very attractive computer engineers out there. Did you see the picture of Google’s Marissa Mayer in Glamour Magazine? She is a serious technical professional and better looking than Barbie. But she is not what most people think of when they think of a woman computer engineer. So what will Computer Engineer Barbie look like?

    My first reaction is – glasses, pocket protector, jeans, t-shirt. The pocket protector idea really worries me. Or will it be some sort of business semi-casual? Copy Marissa’s outfit from Glamour? Come on she doesn’t dress like that on a regular basis. Though I did she that she Twittered that she does usually wear heels. That’s good because from what I can tell Barbie doesn’t do flats. What do you think they will do for Computer Engineer Barbie’s wardrobe? What should they do?

    No doubt they will outfit her with gadgets. I wonder if various smart phone makers will vie to have a miniature version of their phone for Barbie to carry? A netbook? For sure. MP3 player? Probably. An ebook reader? Maybe.  I hope they set up her office with a triple screen LCD setup at least. And the printer should be cool looking. I wonder if they will have a miniature wi-fi access point? Maybe I’m getting silly now. Will she have a new printer? Hey, maybe she can have a miniature Microsoft Surface device. OK maybe not. What accessories does Computer Engineer Barbie need?

    We need some opinions here from real women who are really computer engineers. What would a computer engineer Barbie look like that makes the field look real and good to little girls? Let’s not leave this work to the toy company or we could see the growth in women in the field set back years!

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Brute Force or is there an easy way?

    • 4 Comments

    This year being ‘10 has lead to a lot of talk about numbers that look like binary numbers 1/11/10 or 11110 for example. Related to this is talk about palindrome dates. For example with a leading zero 1/11/10 becomes 011110 which is the same backwards and forwards. Of course a purist might point out that the year is 2010 and ask “didn’t you learn anything from the Y2K problem?” Or “real numbers don’t have leading zeros!” But purism is less fun so I ignore those people. Well at least when playing with numbers for fun. But I was thinking a bit about palindrome numbers while driving the other day. Hey, it’s safer than driving while Twittering. I started to think about writing code to count palindrome numbers. As I thought about how to get the computer to generate them I realized that the count could be easily calculated. Of course seeing myself as a programmer before a mathematician my mind went to a program before an algorithm. Silly probably but at least in my defense I worked on a couple of algorithms and thought things through a bit.

    There are 19 two-digit palindrome numbers. There are 18 times 9 three-digit numbers. And so on. There is no need to write a program to count them. You can easily build an equation that calculates the number based on the number of digits. Go ahead do it. I’ll wait. Anyone come back?

    I think all of us have to be careful when we think about solving problems. We all have favorite tools that we like to use but they are not always the best for the job. Sure you can bank a board with a hammer and get it to the right length but it is not going to be pretty. Using a saw is better for some jobs. Likewise we can’t always assume that the fast or best way to handle all mathematical tasks is a computer program or even a mathematical formula. For example while we can easily calculate the number of 5 digit palindrome numbers generating a list really calls for a program.

    Of course there are easy and had ways to do that task as well. You could generate every five-digit number, run them through a method that checks to see if it is a palindrome and only print the numbers that pass the test. But that brute force way is pretty wasteful of time and resources. With a little thought you can come up with an algorithm that just generates and prints palindrome numbers with no waste. I’m leaving that to the student too.

    I find that students look for the solution that is easiest to implement with little regard for performance. The AP CS curriculum teaches about performance calculations (emphasis on Big-O notation) but I wonder how much of it sinks in. How often do students apply that thinking to their own code? I suspect not as much as we’d all like. It’s an important topic though. Yes computers are getting faster but problems are getting larger. Somewhere in every problem there is a cross over between the time it takes to develop a really efficient algorithm and how much time it saves in the end. Brute force solutions only work for small problems. This is of course one of the problems with assigning small problems or small data sets for student projects. Ultimately we have to create projects that are manageable for students but that also force them to conceder performance. Failing to do that is a disservice I think. What do you think?

    BTW if you are interested in the math around Binary Palindromes check out Counting Binary and Hexadecimal Palindromes on the Exploring Binary blog.

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    What Should We Teach Software Developers

    • 2 Comments

    The great thing about having the career and credentials that Bjarne Stroustrup has is that he can talk about the “Emperor’s clothing” with out people saying “you don’t know what you are talking about.” So it was with interest that grew with each paragraph that I read his recent article in CACM. (What Should We Teach New Software Developers? Why?) One telling quote:

    I see the mismatch between what universities produce and what industry needs as a threat to both the viability of CS and to the computing industry.

    I have to agree. With a  career that spans both industry and academia, Bjarne Stroustrup knows what he is talking about when he talks both of the needs of industry and the role that academics perceive for themselves. All to often people in computer science see two “stovepipes” – one for academics into pure research and one for industry into a trade education. Neither view is helpful in the long run. While there is no question that pure research is important if it doesn't find its way into production at some point its long term utility is seriously in question. Without improved tools, techniques and skill sets industry is doomed to high rates of project failure, unreliable software and a failure of computing to make the differences in the world that we all believe are possible.

    The failure of many academic programs to train people who can successfully work on large important projects causes industry to lose faith in the educational process. On the other hand the failure of industry to look at research results and adopt good information means that opportunities for improvement in the process of software development. There is blame to go around. And credit as well. But the need for more communication and cooperation is clear.

Page 1 of 7 (19 items) 12345»