subj and counting
Rank #31 in Ireland
:)
28 March 2011
26 January 2011
New stream
Hey, I am working on my first WP7 application these days.
First one will be very simple - it is just to get a try of the market place. Simplest I could think about - a list of irregular verb. Design is ready and I am loading it with the data.
First one will be very simple - it is just to get a try of the market place. Simplest I could think about - a list of irregular verb. Design is ready and I am loading it with the data.
13 January 2011
New Year Resolution: Disconnecting
I was deeply impressed yesterday after I listened Disconnect chapter of ThisDeveloperLife.
I decided to give up one of social network that eats 5-7 hours of my life every week. Lets stick to this!
I decided to give up one of social network that eats 5-7 hours of my life every week. Lets stick to this!
23 November 2010
Back to Zimmermann
I did some research on the problem. Yes, previous solutions was mine (apart of permutation generation algorithm). This time I research the problem itself. It is known as Reverse Shuffle Problem and it goes back into 1973.
I found math article. 20 pages, It is half in English and half in Greek symbols. Gash! I haven't seen so many math since university!
It gave me push and I think I can a little bit increase the score. I started from other end and already (3 hours) I got sequence of 1434 reversals for number 97. I am going to run my number crunching recursion starting from their magic starting point. Will see what comes from this.
I found math article. 20 pages, It is half in English and half in Greek symbols. Gash! I haven't seen so many math since university!
It gave me push and I think I can a little bit increase the score. I started from other end and already (3 hours) I got sequence of 1434 reversals for number 97. I am going to run my number crunching recursion starting from their magic starting point. Will see what comes from this.
22 November 2010
Me on Al Zimmermann's Programming Contests
I am taking part in Al Zimmermann Contest Task is complicated because of number of combinations. It is N! and task should be sold for 25 sets for primes from 2 to 97.
Since problem was published on Nov 16 I attacked task from different angles. I optimized code and changed algorithm. Number of n! is huge. Computation power available to me cracks up to 200M combinations per second. 200 millions combinations per second is fast - I started with 100 thousands per second.
I solved all numbers less then 17. But 17! = 355687428096000 and brutal force will review all combination in 41 days. (For comparison, solution for 13 takes 30 seconds). The longest set I manage to found is 389 steps for 43. That gives me 10 (currently 10.47) points of 25 points maximum.
There must be some trick others know and I don't!
Another point I want to express. Last week was the happiest week in professional sight. My brain was spinning around the problem: pen an paper, coding, code profiling, optimisation, leave computer for night, for a days and raising my score. I was so exciting when I invented new approach and this gave me jump from 500k to 10 millions of combinations. Crunch crunch! Then recursion and I have hundreds on millions! Then I was thought I could solve it. I mean like equation. Heart was beating! And nope it doesn't work in that way. But it gave me another couple days to work on it.
Honestly I don't remember when I had such high feeling in professional life. This task raised me beyond and above what I was coding last years.
I also working on solutions for Euler project. This is became a sort of hobby. Besides of brain exercise to find algorithm I am progressing from ad hoc solutions (when amount of task was less then 20) to a framework for library of tasks. My next idea is attach tasks to silverlight facade and host it. It might become a benchmark for heavy computations for Silverlight.
What strike me few days ago is that such platform could he a host for distributed computations. Everyone who has spare processor cycles can open a web page with Silverlight application, click a buttons and help world to solve a problem. I went further - think about mobile phones! you put it on charge and start computation. You give away half an hour of your 500Mhz - 1GHz! What a supercomputer we could build!!!
Since problem was published on Nov 16 I attacked task from different angles. I optimized code and changed algorithm. Number of n! is huge. Computation power available to me cracks up to 200M combinations per second. 200 millions combinations per second is fast - I started with 100 thousands per second.
I solved all numbers less then 17. But 17! = 355687428096000 and brutal force will review all combination in 41 days. (For comparison, solution for 13 takes 30 seconds). The longest set I manage to found is 389 steps for 43. That gives me 10 (currently 10.47) points of 25 points maximum.
There must be some trick others know and I don't!
Another point I want to express. Last week was the happiest week in professional sight. My brain was spinning around the problem: pen an paper, coding, code profiling, optimisation, leave computer for night, for a days and raising my score. I was so exciting when I invented new approach and this gave me jump from 500k to 10 millions of combinations. Crunch crunch! Then recursion and I have hundreds on millions! Then I was thought I could solve it. I mean like equation. Heart was beating! And nope it doesn't work in that way. But it gave me another couple days to work on it.
Honestly I don't remember when I had such high feeling in professional life. This task raised me beyond and above what I was coding last years.
I also working on solutions for Euler project. This is became a sort of hobby. Besides of brain exercise to find algorithm I am progressing from ad hoc solutions (when amount of task was less then 20) to a framework for library of tasks. My next idea is attach tasks to silverlight facade and host it. It might become a benchmark for heavy computations for Silverlight.
What strike me few days ago is that such platform could he a host for distributed computations. Everyone who has spare processor cycles can open a web page with Silverlight application, click a buttons and help world to solve a problem. I went further - think about mobile phones! you put it on charge and start computation. You give away half an hour of your 500Mhz - 1GHz! What a supercomputer we could build!!!
17 July 2010
Solved next Euler task!
It is relatively simple brutal force solution but on big numbers. It took me longer than expected... My own BigNumber class fails somehow on division operation. Found two new bugs in it! have then fixed. All unit-tests were green and are even more green than ever, but solution is incorrect.
Eventually moved to System.Numerics.BigInteger (thanks .net4). Bingo!
NB: Need to return to .Division and fix it. Can run this calculation and compare result between my BigNumber and BigInteger.
btw, I made good progress since last post. I have 43 solved at the moment and coming. Somebody plays against my clock and even I am pushing problems I stay at the same rank as she or he jumps ahead.
It is relatively simple brutal force solution but on big numbers. It took me longer than expected... My own BigNumber class fails somehow on division operation. Found two new bugs in it! have then fixed. All unit-tests were green and are even more green than ever, but solution is incorrect.
Eventually moved to System.Numerics.BigInteger (thanks .net4). Bingo!
NB: Need to return to .Division and fix it. Can run this calculation and compare result between my BigNumber and BigInteger.
btw, I made good progress since last post. I have 43 solved at the moment and coming. Somebody plays against my clock and even I am pushing problems I stay at the same rank as she or he jumps ahead.
11 October 2009
05 June 2009
Ages ago I created a structure of nested master pages for a web-site I working on.
It works fine. Not without teething glitches, but it works.
Today I noticed warnings in a build.
We have Page_Load in each masterpage and it warns about the fact one hides another...
Searching for best practice samples I found this article.
26 May 2009
Subscribe to:
Posts (Atom)