Archive for the ‘Development’ Category

Project Euler, Problem 10

Yet another problem involving primes. Guess I have to make a better prime generator soon…
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
Find the sum of all the primes below two million.

Posted on October 1, 2009 at 22:07 by Vegar · Permalink · 2 Comments
In: Development

Project Euler, Problem 9

On our way to Lofoten last weekend, my wife and I had a small brainstorming on problem no. 9:
A Pythagorean triplet is a set of three natural numbers, a < b < c, for which,
a2 + b2 = c2
For example, 32 + 42 = 9 + 16 = 25 = 52.
There exists [...]

Posted on September 30, 2009 at 23:45 by Vegar · Permalink · Leave a comment
In: Development · Tagged with: 

Project Euler, Problem 8

A couple of days ago, I solved eulers problem no. 8. I finally found some time to blog about my solution.
Find the greatest product of five consecutive digits in the 1000-digit number.
73167176531330624919225119674426574742355349194934 96983520312774506326239578318016984801869478851843 85861560789112949495459501737958331952853208805511 12540698747158523863050715693290963295227443043557 [...]

Posted on September 30, 2009 at 23:17 by Vegar · Permalink · 3 Comments
In: Development · Tagged with: 

Project Euler, Problem 7

It want be easy to keep up with my brother on this. Well, here’s my take on Project Eulers problem no 7:
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.
What is the 10001st prime number?

Posted on September 25, 2009 at 11:37 by Vegar · Permalink · One Comment
In: Development · Tagged with: 

Project Euler, Problem 6

Inspired by my brother over at geekality.net, I thought I should do an attempt on the various problems presented at projecteuler.net/.  Since he already solved the first five, I jumped right in at problem 6:

The sum of the squares of the first ten natural numbers is,
12 + 22 + … + 102 = 385
The square [...]

Posted on September 22, 2009 at 22:40 by Vegar · Permalink · 4 Comments
In: Delphi, Development · Tagged with: 

Running FitNesse tests from the command line

Using FitNesse to write and run test is nice, but sometimes you want to run the tests as part of an automatic build cycle. FitNesse has this possibility, and fit4delphi comes with a testrunner that makes it possible with delphi code as well.

Posted on September 12, 2009 at 00:52 by Vegar · Permalink · Leave a comment
In: Delphi, Development · Tagged with: ,

FitNesse + Delphi –> Fit4Delphi

I have been thinking about FitNesse for a couple of weeks now. It seems to be near to perfect for testing the type of code that I’m currently writing. A lot of calculations with a lot of rules, odd cases and exceptions. So I finally started to check it out, to see if it is [...]

Posted on August 24, 2009 at 15:59 by Vegar · Permalink · Leave a comment
In: Delphi, Development · Tagged with: ,

DUnit: Loading tests from dll’s

I wanted to split all my unittests for a project into separate packages to keep tings nice and clean. DUnit comes with a unit called TestModules.pas which helps you do that.

Posted on August 21, 2009 at 16:21 by Vegar · Permalink · One Comment
In: Delphi, Development · Tagged with: , ,

TDD, Unittesting and Delphi

Lately, I’ve been trying to learn TDD. In this post, I will collect the resources that I find.

Posted on August 14, 2009 at 13:04 by Vegar · Permalink · Leave a comment
In: Delphi, Development · Tagged with: , ,

Particle-challenge part 2: OK – the math-part is a little bit hard…

It’s summer. I’m 500 km from home, and I’m trying to find some time to continue on the particle-challenge.  In the last post, I didn’t decide where to go next; The world, the particles or physics. After some thinking, I found the first one most important, and chose to read a little about how [...]

Posted on July 25, 2009 at 00:35 by Vegar · Permalink · Leave a comment
In: Development · Tagged with: , ,