Identity theft with Comcast?

28 November, 2010 § 1 Comment

Over the holiday weekend, the cable box in my house stopped working. The user interface for the cable box functioned fine, but the picture and audio were completely gone. I brought the cable box to Comcast and swapped it with one that they had in stock for no charge.

The next day I hooked up the cable box and called Comcast to sync up the box with their licensing service. When I was on the phone with them, the operator mentioned that there was a pending service order in a couple days and they could do the work then if that wasn’t a problem. Weird, nobody here knew anything about this service order.

Somehow there was an order in for telephone and cable service upgrades/installation. The phone number they had on file as requesting this service had nothing to do with us. Googling the phone number got us a name and address of a house in the next city over. It goes without saying that we promptly got the service order cancelled.

In the end, I’m happy that we noticed this before it happened.

Could we be a victim of identity theft? How could an order like this be placed on our account? What would have happened if we hadn’t noticed?

Thank you Tom Izzo

16 June, 2010 § Leave a comment

Thanks Tom. These past few days have brought a community and state together for a common cause that will most likely be forgotten about when Midnight Madness comes around.

Often times a coach of a college basketball team has to help his players choose if they should leave college for the pros, and just recently Izzo got to trade places with his students (not for the first time though).

Izzo could have decided to leave East Lansing and move down to Cleveland to coach arguably the best professional basketball player right now. But he didn’t.

As an MSU student and alumni, I am glad that Tom decided to stay at MSU. The basketball program has helped the university tremendously, and much of the thanks go to Mr. Izzo and his family.

Unit testing code behinds in ASP.Net Web Forms

13 June, 2010 § 7 Comments

Have you ever inherited an ASP.Net website with waaaaaaay too much logic in the code behinds?

A while back I came up with a solution to solving this problem. I don’t have a name for it, but if you do, please leave a comment at the end of this post.

The problem that I was trying to solve is that I wanted to make a new page and implement it using Test Driven Development. The hard part was that there was a lot of code that basically dealt with the visual aspect and interaction of the page but not much with the data model. I needed to find a way to write tests around this code, as the data model code already had a framework for writing tests.

Here is an example of the before-case:

public class CodeBehind : System.Web.UI.Page {
   protected void btnFindUser_Click(Object obj,  EventArgs e) {
      if (Page.IsValid) {
         var dbConnection = new DatabaseConnection();
         var users = dbConnection.GetUsers( txtQuery.Text );
         if ( !users.empty() ) {
            dataTable.Bind(  users );

What I came up with was an introduction of a “controller” class that lived outside of the ASP.Net Web Forms project. Here is an example of the after-case:

// CodeBehind.aspx.cs
public class CodeBehind : System.Web.UI.Page {
   protected void btnFindUser_Click(Object obj,  EventArgs e) {
      controller.FindUser( Page.IsValid, txtQuery.Text, dataTable );

// CodeBehindController.cs
public class CodeBehindController {
   public void FindUser( bool pageIsValid, string query, DataTable dataTable ) {
      if ( pageIsValid ) {
         var dbConnection = new DatabaseConnection();
         var users = dbConnection.GetUsers( query );
         if ( !users.empty() ) {
            dataTable.Bind( users );

// CodeBehindControllerTests.cs
public class CodeBehindControllerTests {
   public void FindUser_WithNoUsersFound_DataTableIsEmpty() {
      DataTable table = new DataTable();
      CodeBehindController controller = new CodeBehindController();

      controller.FindUser( true, "ImpossibleUserToFind", table );

      Assert.IsTrue( table.empty() );

With that, I can now mock out the DatabaseConnection and the DataTable and I’m good to go. By passing in Page.IsValid instead of the whole Page object, I’m able to provide types that are easier to instantiate and I also now have code with less dependencies.

Getting this to work is actually very simple. Just introduce another class and put all of your logic in that class. There shouldn’t be a single conditional in your *.aspx.cs page. As long as you follow this pattern, it should be pretty easy to TDD your next ASP.Net Web Forms page.

Any questions? Leave a comment and I’d be glad to help.

Code Jam programming competition

11 April, 2010 § 2 Comments

I found out about the Google Code Jam programming competition this past week through Reddit and registered for it. It’s my first programming competition so I’m pretty excited to see how it turns out.

I’ve started to go through the practice problems listed on the site and completing them as though they are part of the competition. As I compete them, I’ll upload my solutions to the problem. Since these solutions are written in haste and I don’t plan on making the code maintainable, for your own benefit please don’t copy the code and use it in an actual production scenario.

The first problem that I have solved is the Alien Numbers problem from April, 2008.

The decimal numeral system is composed of ten digits, which we represent as “0123456789” (the digits in a system are written from lowest to highest). Imagine you have discovered an alien numeral system composed of some number of digits, which may or may not be the same as those used in decimal. For example, if the alien numeral system were represented as “oF8”, then the numbers one through ten would be (F, 8, Fo, FF, F8, 8o, 8F, 88, Foo, FoF). We would like to be able to work with numbers in arbitrary alien systems. More generally, we want to be able to convert an arbitrary number that’s written in one alien system into a second alien system.

See if you can solve this problem. Then continue reading to see my solution.
« Read the rest of this entry »

See you at the 2010 Michigan Agile and Beyond Conference

12 March, 2010 § 1 Comment

I’ll be heading down to Dearborn on Saturday for the 2010 Michigan Agile and Beyond Conference with some coworkers from TechSmith. If you didn’t know about the conference before, or you weren’t planning on going, now’s your last chance to change your mind.

Among the speakers will be Ron Jeffries and Chet Hendrickson, who I’ve been lucky enough to meet and talk with when they visited TechSmith.

Are you going?

Incorporating Lecture Capture in Graduate School

5 March, 2010 § 4 Comments

This semester I’m taking two courses at MSU on my way to a Masters in Computer Science. As an aid to my studying, I’ve taken up watching videos of other schools lectures online, specifically lectures from the authors of our textbooks.

For my CSE 891 course: Language and Interaction, a course that goes more in-depth on specific aspects of Natural Language Processing, I’ve found lectures online from James Martin at the University of Colorado at Boulder. Martin co-authored Speech and Language Processing with Dan Jurafsky from Stanford.

  1. CSCI 5832 Lecture 3 (2010-01-19)
  2. CSCI 5832 Lecture 4 (2010-01-21)
  3. CSCI 5832 Lecture 5 (2010-01-26)
  4. CSCI 5832 Lecture 6 (2010-01-28)
  5. CSCI 5832 Lecture 7 (2010-02-02)
  6. CSCI 5832 Lecture 8 (2010-02-04)
  7. CSCI 5832 Lecture 9 (2010-02-09)
  8. CSCI 5832 Lecture 10 (2010-02-16)
  9. CSCI 5832 Lecture 11 (2010-02-18)
  10. CSCI 5832 Lecture 12 (2010-02-23)
  11. CSCI 5832 Lecture 13 (2010-02-25)
  12. CSCI 5832 Lecture 14 (2010-03-02)
  13. CSCI 5832 Lecture 15 (2010-03-04)
  14. More lectures can be seen at the RSS feed for the course

For my CSE 820 course: Advanced Computer Architecture, I’ve found lectures online from David Patterson at University of California at Berkeley. Patterson co-authored Computer Architecture: A Quantitative Appraoch with John L. Hennessy, who is currently the President of Stanford University.


22 January, 2010 § Leave a comment

Monday, 1/18/2010

I attended the Michigan State University Dr. MLK Jr. Community Dinner and heard from Trustees Ferguson and Owen and President Simon. I also learned more about the new exhibit at the MSU Museum with children letters to Rosa Parks and President Nelson Mandela.

Here is a video of President Barack Obama introducing the exhibit:

I plan to take a trip down to the museum soon. The exhibit will run until December 2010.

Tuesday, 1/19/2010

For lunch I met with @joshpremuda at the Travelers Club International Restaurant and Tuba Museum in Okemos. Josh is working on some side projects and we got to talking about starting a tech group in the Lansing area.

Wednesday, 1/20/2010

I went to my first Detroit Java User Group meeting and saw Mac Liaw give a presentation on Scala. The conversation was great and there were many in-depth questions asked. I was happy that the presentation wasn’t too beginner focused. The questions led the discussion for most of the time.

Where Am I?

You are currently browsing the Uncategorized category at JAWS.