Life is too short to not be (having fun & learning new things)

If you’ve known me for any amount of time (professionally), you would likely have heard me ask you these two question, “Are you having fun?” and “Are you learning new things?”

If you are not having fun, and you are not constantly learning something new, I believe that you are wasting your life.

And this morning I got another validation of this. A co-worker told me about this thing called Killer Sudoku and we had talked about it earlier this week. It seemed intriguing, and this morning I got a text message from him about this and I was able to find the puzzle on the Wall Street Journal website here. It is the second of three puzzles. Basically a Sudoku game with no starting numbers.

When the original Sudoku game came out, I’d had a lot of fun writing a solver which completed the puzzle by logically evaluating rules, the way a human would. Then I re-wrote it in prolog and that was a hoot.

Today this was a new and interesting challenge, and I got to learn yet another new piece of technology, and solve it with less than 150 lines of code! In the process I got to do something I’d been meaning to do for some time now – to learn about Google’s OR-Tools and their Constraint Optimization solver in particular.

Give it a shot, it is a great puzzle to solve (either by hand, or programmatically). I’m going to now try and solve it in different ways that I’ve never done before.

P.S: The solver finished it in 0.156s, it took me half a day to write it 🙂

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: