Archive

Archive for April, 2007

Puzzle

April 12th, 2007 No comments


Today, a close relative tried to boggle my mind by sending a link to this fantastic puzzle: http://digicc.com/fido/


Well, it was clever, but not super difficult to solve.The secret is the subtraction operation and 9 as a strange number with awesome mathematical characteristics. When you subtract two numbers with same digits, but jumbled as in this puzzle, the result is always divisible by nine(e.g.198 or 7974 in the following examples). Summing up all the digits in the result number will also make a new number divisible by nine(1+9+8=18, 7+9+7+4=27 ). From here onwards, finding out the missing (circled) digit is just 10 lines of code plus some Flash/UI talents 🙂


 


1) Here is the pattern for 3 digit numbers:


Let’s assume that you have entered 198 (As the result of subtraction for 321-123)


if you have circled 1 >> 98 >>  9+8 =17 >>  1+7 = 8 >> 9-8 = 1  >>Answer: 1
if you have circled 9>> 18 >>  1+8 =9   >>  Since it is a single digit number, there is no need for additional steps>> Answer : 9
if you have circled 8>> 19 >>  1+9=10  >> 1+0 = 1 >> 9-1 =8 >> Answer :8



 


2) Here is the pattern for 4 digit numbers:


Let’s assume that you have entered 7974 (As the result of subtraction for 9213-1239):


if you have circled 7 >> 974 >>  9+7+4 =20 >>  2+0= 2 >> 9-2 = 7  >>Answer: 7
if you have circled 9>> 774 >>  7+7+4 =18 >>  1+8 = 9 >> Since it is a single digit number, there is no need for additional steps >> Answer : 9
if you have circled the second 7>> 974 >>  9+7+4 =20 >>  2+0= 2 >> 9-2 = 7  >>Answer: 7
if you have circled 4>> 797 >>  7+9+7 =23 >>  2+3 =5 >> 9-5 = 4  >>Answer: 4


 


Try it out , it is fun!




Categories: Uncategorized Tags:

My Demo Code,Video Tutorial and PPT at Toronto Code Camp 2007

April 3rd, 2007 No comments

First and foremost, I would like to say THANK YOU to everyone who came to my presentation in Toronto Code Camp 2007 on March 31st. I had a wonderful time presenting to some great audiences and I really enjoyed meeting so many people after all the sessions were over. As I mentioned during the session, I’m following up on post event resources here. I’ve broken down the information by resource, so it is easier to locate.


Presentation Screencast: download it here and watch it off-line OR watch it on Soapbox below:



Code on CodePlex : The code I had prepared for my demo was way beyond a demo-style code (I am NOT a fan of “Hello World”. I think World deserves more than just saying “Hello” to it :-)). It took me some time to write that code, so I decided to publish it on CodePlex so I can possibly extend it in future and give it a better shape of a project. Click here to browse to the project workspace.


Powerpoint deck:  http://blogs.devhorizon.com/downloads/3TierInWSS_TCC2k7.ppt


Video Tutorial 1 : This is a very simple walk-through on how you can work with the framework I have come up with. Again, download it here and watch it off-line.


Demo Cast:  Coming soon! This is the actual demo I showed people who were attending my session and basically representing whole code I have written.


Additional Pics and Videos from the event: http://www.torontocodecamp.net/Photos/tabid/64/Default.aspx


Feedback: http://www.torontocodecamp.net/feedback.aspx



Categories: Uncategorized Tags: