Sketching Jigsaw Sudoku - Using ProcessingJS / Part 2

It's almost a month since I last posted on Sketching Sudoku using ProcessingJS. Let's take that code ahead to draw a Jigsaw Sudoku.

Jigsaw Sudoku, also referred as Irregular Sudoku by some sites, also has 9x9 grid similar to a Classic Sudoku. What makes it different is the shape of 9 regions which were 3x3 grids in a classic one. In Jigsaw Sudoku each region would have 9 cells but grouped in somewhat random shapes.

Technically speaking, we had hard-coded the locations where the thick lines would be drawn in previous post. Now we would have to remove that and write a code that can draw a Jigsaw Sudoku. Let's target the Jigsaw Sudoku that appeared on today.

Let's assign a number 1-9 to each region and represent the entire puzzle layout in a single string.
The command below will break the string into a two dimensional array of size 9x9. Of course we could…

Learning ProcessingJS, While Sketching Sudoku Puzzle

Sudoku has been sort of "Hello World" for me, whenever I sat down to learn a new computer language or framework. This lead to various versions of "Sudoku Tutor" that I developed using Excel (yes, that Microsoft one!), VBScript, vanilla Javascript, JQuery, Chrome App framework and so on. 

When I drew first Sudoku using Canvas element in HTML, it didn't impress me. The code I had to write was much complicated then any others I had previously written. Then I found ProcessingJS on Khan Academy. It made working with Canvas much simpler and soon I could prepare printable Sudoku, Kakuro, Loop-the-Loop and Hitori puzzles. That was in 2015.

Back to present... I decided to sit again relearning ProcessingJS sans Khan Academy, and develop Sudoku player to play on mobile phone. The result, as of now, is something that you can see in video at bottom where I solved 2 Sudoku, 2 Loops and one each of Kakuro and Hitori in around 35 minutes.

We will start with a plain sketch of…

The Curious Case of a Girls' School

Almost everyone who has seen my class 10th marksheet has asked me this very question "Did you appear for class 10th exam as a private student?" and they had a reason to ask, for my marksheet mentioned the school name as "St. Joseph's Convent Girls' Hr. Sec. School" and only possible reason they could think of, was that it might've been the exam centre. I no longer show the marksheet to anyone, since owing to technological advancements made in these years, people may change the question. For the record, No, I didn't convert!Then why did the marksheet had that weird occurrence of "Girls'"? This question is what I want to address in this post once and for ever.My father, now retired, worked for a  public sector bank and as such had a transferable job. After I had finished class 5, he had to move to this city called Saugor. I guess there were fewer schools in the city at that time (we are talking about 33 years ago). There was a state run …

Down the memory lane

Few days back, I happened to stumble upon a post in a forum where the question poster had asked for guidance on the computer model and configuration he should go for, and whether he should wait for upcoming better configurations.All the answers to the question mentioned one or the other configuration. For the part "should wait or not" most gave the standard analogy "it's like getting married and later regretting that you could have gotten a better model only if you had waited a little more"...... one of the answerer added "my first computer had a meagre 2 GB hard disk"... He then reiterated "mind you, that's 2 GB hard disk and not RAM..." This closing remark just blew me, for it made me go down the memory lane..Just 2 GB hard disk? The first computer that my father bought for me way back in 1997, a Pentium 133 MHz system had a whooping 1 GB hard disk...A 386 DX computer that my cousin bought in 1995 had 240 MB hard disk. This was the ver…