Jim Lynch Codes
  • Blog
  • About Jim

Writings about one coder's stories & experiences.

Debugging- Learn From What You Observe and Make It Work.

2/6/2016

0 Comments

 
Debugging can be hard. It would be nice if the software we wrote (or are just using) always did exactly what we expected it to do, but the truth is that sometimes it just doesn't. Bugs crop up, weird things happen, and things need to be fixed or troubleshooted. Here's a story about some troubleshooting I had to do yesterday, and what it made me realize.

Wonky Things Happening With Our Wii U.

As a programmer, the type of debugging I normally do related to my own code and applications, but in this particular situation it was not my code; it was the Wii U. A friend of mine had just set up the internet connection in his new apartment, and we want to play Smash Bros. online against other human players. On the main settings page it seemed that the Wii U was connected, but when starting the game we kept getting a strange error popup with a message about how the system's country code didn't match up with the Network country code. We checked the country settings. I even changed to a different country and then switched back to United States- didn't help. We reset the router, went through the Wii U's connection tests, and everything checked out fine. I ruthlessly googled the 102-2502 Wii U error, but I found no answers. It seemed we were doomed to play with the old cpu players. And then I tried something crazy.

The Eureka Moment.

There was a time setting on the Wii U, but we didn't think much of it. It was displaying the correct time, and besides the error message said something about country code, not time. "Eh, let's try it and see what happens," I though out loud to my friend. I changed the time so that it displayed the time one hour earlier than it actually was, and magically... no more error messages! How could this possibly fix our problem? And what the heck was the underlying issue for which this could have been a workaround?? I still don't know why it worked, but it did. And because it did we had good fun time smashing real-life homo erectus noobs in Smash Bros.

The Bigger Picture

The key takeaway is that software won't always make sense to you, but you have to try to make sense of it. Sometimes you need to challenge your underlying assumptions (like how you should set the Wii U time to the actual time) in order to make progress. Instead of just banging your head against the wall, observe what is happening, where you want to be, and what you have in front of you available to work with. Theory doesn't totally go out the window when debugging, but if you get the system working as expected you are then in a better position to make sense of it. Debugging is an art. Being able to think outside the box and attack things from different angles is a valuable talent for becoming this type of artist.
0 Comments

Your comment will be posted after it is approved.


Leave a Reply.

    ​Author

    Picture
    The posts on this site are written and maintained by Jim Lynch. About Jim...
    Picture
    Follow @JimLynchCodes
    Follow @JimLynchCodes

    Categories

    All
    Actionscript 3
    Angular
    AngularJS
    Automated Testing
    AWS Lambda
    Behavior Driven Development
    Blockchain
    Blogging
    Business Building
    C#
    C / C++
    ClojureScript / Clojure
    Coding
    Community Service
    CS Philosophy
    Css / Scss
    Dev Ops
    Firebase
    Fitness
    Flash
    Front End
    Functional Programming
    Git
    Go Lang
    Haskell
    Illustrations
    Investing
    Java
    Javascript
    Lean
    Life
    Linux
    Logic Pro
    Music
    Node.js
    Planning
    Productivity
    Professionalism
    Python
    React
    Redux / Ngrx
    Refactoring
    Reusable Components
    Rust
    Security
    Serverless
    Shell Scripting
    Swift
    Test Driven Development
    Things
    TypeScript
    Useful Sites
    Useful Tools
    Video
    Website Development
    WebStorm
    Writing

    Archives

    March 2023
    August 2021
    February 2021
    January 2021
    October 2020
    September 2020
    May 2020
    April 2020
    February 2020
    January 2020
    December 2019
    October 2019
    September 2019
    August 2019
    July 2019
    June 2019
    May 2019
    April 2019
    March 2019
    February 2019
    January 2019
    December 2018
    November 2018
    October 2018
    September 2018
    August 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    October 2017
    September 2017
    August 2017
    July 2017
    May 2017
    April 2017
    March 2017
    February 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    February 2016
    January 2016
    December 2015
    November 2015
    October 2015

    RSS Feed

  • Blog
  • About Jim
JimLynchCodes © 2023