Tuesday, January 28, 2014

Debugging: The Art of Loosing Your Mind!

If you're a coder, you know what the title means...  If you're not, this post is not for you.

Debugging is essentially trying to fix some code that does not work.  You know what goes in, you know what should go out.  But the results are not those expected.  It should be easy as every instructions are written in front of you.  You just have to find where the numbers do not add up as it should...  Wrong!

Trying to find an error in more than 100 000 lines of code is like trying to find a friend in Montreal.  You know where he's been, you know where he should be heading but you just don't know where he is...


Figuring out what's wrong requires a lot of concentration.  Especially when the issue does not generate an explicit error on the screen. Sometimes, it can be data that is wrong, sometimes it's a matter of logic, sometimes it's the regional settings of Windows that gets in the way.  You never know where to look, you never know what is the "real source" of the issue right from the start.

With time, you discover better ways and workarounds to find the source of the infamous bug, but often, it's a matter of trial and error until to nail it.

When we were young, we were playing this little game that goes like this:
- When I go to the grocery store, I put in my little basket...  a carrot...
- When I go to the grocery store, I put in my little basket...  a carrot... a cake
- When I go to the grocery store, I put in my little basket...  a carrot... a cake... some rice...

And on and on.  Each player has to add a new item to the basket, after reciting to whole grocery list.  Miss one item and you loose.  The last one who stands, wins.


This is a fun game, but it does require a good memory.  How far can you go?  12 items, 30 items, 100 items...  If someone talks to you as you are trying to recite the complete list, you will loose your concentration and probably miss an item or get it in the wrong order.

Debugging is worse than that game.  You have to remember 1000 items, in the order they occurred, with the weight, colour, price and their supplier.  Sometimes, you can't pause the list if it's going to fast and you have to start all over again.  Then someone interrupts you to ask about when it's will be fixed as they are in a hurry...  Again, you have to start all over again.

You take notes, so you won't forget where you were only to find out later that you don't remember what those notes really meant as they are now out of context.  So you need to start all over again...

This is debugging:  Remembering a really long list of interactions happening in real-time and trying to understand what is happening before it happens.


Next time you see a coder holding it's head, fully concentrated on his screen, stop!  Don't break his concentration, don't interrupt his mental process because he may have to start all over again, for the 10th time.


Wednesday, January 22, 2014

Where is WebcamStudio?


You may wonder how you got on this blog instead of the old WS4GL.org webpage?  


I am slowly phasing out ws4gl.org as I am no longer working on the WebcamStudio project.  The domain won't be renewed this year.  My focus is now on Crombz.com and Youtube as you may have already seen.

So where is WebcamStudio?  It's still alive and well.  It is currenly being maintained by Karl Ellis.  Here's a few links you help you out:


http://code.google.com/p/webcamstudio/ - The official SVN repository
http://launchpad.net/~webcamstudio/+archive/webcamstudio-dailybuilds - The Ubuntu PPA repository
http://plus.google.com/communities/110329269823088092206 - The G+ Community
http://www.facebook.com/groups/webcamstudio/ - The old Facebook Group WebcamStudio
http://www.soylent-tv.co.nf/ - Karl's website where he uses WebcamStudio



Thanks!  It was a great ride!

Now, why not subscribe to my Youtube account?  http://www.youtube.com/user/patrickballeux



Sunday, January 19, 2014

How to make more money!

I started a new project a few days ago: MineLotto



The basic idea is to use the power of SQL to find patterns in a list of lottery results drawn since 1982. Technically, it's a great challenge. And who knows, I could find the ultimate way of getting rich ;)



Visit my new YouTube channel "MineLotto" and leave your suggestions on how to explore more than 3000 lottery results.


Patrick Balleux