My First Project: Sudoku

It is now time to talk about one of my own perils. My first ever project had been a fully functional Sudoku program. The story of how it all began is a bit astonishing and not so surprising as well. During my senior school years, I was learning to be a python coder. During this time, I came around the most famous ‘TKinter’ library. It was one of those ‘ click ‘ moments for me. I felt the power to develop stuff. Now “How I came across the idea of Sudoku”. Well the story is a bit embarrassing but I had never completed a Sudoku. Yeah, I left most of them midway. This thing actually disturbed me for a long time so I decided of building a program that can do it for me.



“What can be the first thing in building a sudoku game??”. Answer was pretty simple : That 9×9 grid divided into 3×3 boxes. After working through nuances of the Tkinter, I build a grid of 9×9. However, my next problem was getting those characteristic 3×3 box lines. Well , I must admit that one of my earlier solutions was a bit tedious and well more like a hack. But I had a grid at the end of the day. I even added check solution button and even added a test question. However it was still far away from my final vision.


The whole idea behind the program was to solve the sudoku. With the bare bones of GUI up and running my task was to work on writing a solver. My initial approaches were based on random number generation. I would generate random b/w 1 and 9 and place them in grid checking if they violate the rule or not. My first mistake: computers are not magical beings they do have a limit of computation else they can feel stuck forever. Second, my approach required bazillions of possibilities times nine computation power. My hardware would have probably cursed me to death. This did put a haul at the project for some months until I had learned a few more things about OOP and algorithms.



After the haul, when  I resumed instead of solver I went on with polishing the program. I added a file loading class that would allow users to save their sudoku and reload them(continue from where they left off) at will. I even added a simple full screen option to have an immersive experience and added a help doc for easier UI navigation. I even changed the grid display functions so that they gave out transparency like effect though Tkinter doesn’t support transparency(I came up with a hack it so what!). Overall the experience was well round up. To give it a more professional product, I even added a timer and a value validation that would check if you entered any invalid characters into the grid. I was happy with the polish and my project but still it was incomplete.


Well, it would be wrong to say I came up with an algorithm with the novice knowledge I had. Instead, I studied someone else’s method(Don’t sue me I had acknowledged him in project docs) and tried to replicate the same methodology. After studying I do get to understand a lot about algorithms. It was a great experience to see your program and alive.Honestly, It wasn’t as awesome as I had imagined but pretty cool in whatever I could do.


What you need to understand is it’s all about starting the process. You need to begin converting your ideas to projects and projects to products/applications. The whole sticking to the process thing is actually very much needed to begin as a professional. It might not be visually stunning or perfect for that matter but a functional application would do it for sure. Take something that you want or wanna solve and I am sure when its completed the feeling is incomparable. If you are like me then you are likely to be hooked up to it and would want more of it. Don’t shy away or sit on that lazy bum, just try harder and harder b’cause you are awesome and you will do it.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s