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

April, 2011

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    DreamSpark, AppHub and Windows Phone Development


    So are your graduating high school seniors bored? or perhaps you are still looking for things to do after the AP CS exam. or maybe you know college or high school students looking to make a few bucks writing code? (Student Develops Games For Windows Phone 7) Edwin Guarin has a new post out called Dreamspark and App Hub Registration process REVEALED! that partners well with my post called Student Access to the AppHub for Windows Phone 7 with information for students who want to create Windows Phone applications and add them to the Windows Marketplace for free. All the information students (18+ I think sorry) need to know to get started is there. Or there and below. Smile

    Looking for learning materials? Visit the Windows Phone developer resources pages on App Hub. Here you will find  topic pages so you can learn everything you need to know to create great apps and games for Windows Phone:

    BTW if you are a high school teacher and want to make sure your students have access to DreamSpark check out Gautam Reddy’s wonderful blog post that explains the step by step of signing a high school up for DreamSpark

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    Interesting Links 25 April 2011


    Apparently some people actually do read this blog. I have talked to a couple of people recently who say they keep up with what I’ve doing via the blog. Exciting and scary both. Smile Comments both pro and con are helpful though and I am glad to hear from readers at any time. Of course lately I haven’t been travelling as much as I was for a few months. That’s been great for spending time at home and with family. On the other hand I miss seeing new people and visiting interesting places.

    Suzi LeVine (@suzilevine) sent me a link to this video that really articulates what the Imagine Cup does for the world. Also in Imagine Cup news, the Imagine Cup team from Howard University meet with Microsoft’s North American President and members of the White House staff to talk about STEM issues and for the team to show off their work. Ed Donahue has a great Recap: Imagine Cup 2011 on her blog by the way. A bunch of videos and links to other information about what went on, who the winners are and lots more.

    In case you need a reminder, students can create a new game with Kodu and win $5,000 plus lots of great technology for them and you’re their school ! Kodu Cup for the win!

    How did you learn to program? Ben Chun blogs about his new 's site to collect stories of learning to program  The idea is for people to leave a one line answer to why or how they learned how to program. Every time you visit You will see one of  the many answers given so far.  You can also add your own. (Ben is on twitter at @benchun )

    Ken Royal (@KenRoyal) has a new series at Scholastic called Best in Tech TODAY One recent post was Tech Creators: Pat Yongpradit Computer Science Teacher and is a personal favorite. Ken is looking for more teaching practitioners to review technology for classroom use. You can contact him via Twitter if you are interested in writing something.

    Who's a woman technical leader you admire? Nominate her for an Anita Borg Technical Leader Award  Winner will be honored at the 2011 Grace Hopper Celebration of Women in Computing.

    Is this the future of ebooks?  The project is called ChronoZoom.

    This early example uses Italy and shows off the power of Deep Zoom, allowing us to embed high resolution images, Gigapixel images, and full resolution PDFs.
    With ChronoZoom's vast zoom capability, we can embed an entire PDF within a panel. Converting a PDF to Deep Zoom allows us to quickly browse the PDF without any lag or delay traditionally associated with standard PDF viewing applications.

    Have you seen this cool Windows Phone fan video If it gets 200,000 views Microsoft will make it a real commercial. 

    Enter the Student App-a-thon  

    Bob Familiar (@bobfamiliar) and Lindsay Lindstrom (@LindsayInPhilly) have both been blogging about the Windows Phone Student App-a-thon! For US college students 18 and up.


    Be one of the first 1,000 students to publish an App in the Windows Phone Marketplace between April 11th and June 30th and choose between Halo Reach®, Fable®, or three other games for Xbox 360®. That’s not all. The student who publishes the most Apps will receive $5,000 cash or an equivalent prize package. The three students who publish the 2nd, 3rd, and 4th most Apps will receive $1,000 each.

  • Computer Science Teacher - Thoughts and Information from Alfred Thompson

    What Are The Odds


    Now I took three semesters of statistics in college. Unfortunately that was 35 years ago and not as much stuck as I would like. Embarrassing but true. So when someone suggests “calculate the odds” I know that there is a right and mathematically sound statistical formula to do it. On the other hand creating a simulation just seems like more fun. Which brings me to my latest interesting coding project.  Not long ago Henk Nicolai sent me the following project suggestion:

    Since I'm not sure if leaving a comment works, I thought I'd try sending you this nice little challenge by email: Code a function that gives you the probability of a successful attack in RISK, given the sizes of the attacking and defending armies. You're allowed to make assumptions about the number of dice the attacker and defender will use.

    As someone who used to love playing RISK with his family as a younger person this had some immediate appeal. For those of you who are not familiar with the game this is more or less how an attach works. Each player has some number of “armies” or game pieces. The attacker can role the same number of dice as he has armies on the attacking location up to three. The defender can roll the same number of dice as he has pieces on the defending location up to two. Either player can roll fewer dice if they wish – a lot of strategy comes into play that we will ignore for right now. After the roll the highest attacking dice of each player are compares. If the highest die of the attacker is higher than the highest die of the defender then the defender loses a game piece. If the highest die of the defender is the same value or higher than the attacker’s die then the attacker loses a game piece. Then the next highest dice are compared with the same sorts of results.

    The combat is over when either the defender has no more game pieces or the attacker  either decides not to continue or has only one game piece left in the attacking location. So assuming the attacker continues to attach until they either win or have only one game piece left what are the winning chances based on different starting balances of game pieces? Simple? OK maybe it requires some thought. Actually I have spent quite a bit of time thinking about how to do this the best way.

    At first I was thinking just use a pair of variables to hold how many armies are at each of two locations. Perhaps two arrays of length two and three for the dice. Pick some random values, compare and decrement the army values appropriately. Now I am wondering if each location on the board should be a class. A little more work in set up but I could also use it to track more information such as name, capital, continent, etc. in case I ever decided to do a larger more involved simulation. Plus maybe that would be an easier way to handle the rolls of dice (have each object do its own rolling), calculating of wins and new values. It’s a thought. I just not one to start coding without a plan. On the other hand I have to stop at some point and say “let’s translate these ideas into code and see where it takes us.”

    How would you solve it?

    Note: Risk is a trademark of Hasbro.

Page 2 of 9 (25 items) 12345»