Tonai dot net will be going through a few changes in the next few weeks. Some of the changes will just be me messing around.

Code Formatting

I'm messing with code formatting right now.


        static public List FindPrimesByEratosthenes(int maxPrime)
        {
            bool[] allNumbers = new bool[maxPrime];

            for (int i = 0; i < maxPrime; i++)
            {
                allNumbers[i] = true;
            }

            for (int i = 2; i < Math.Sqrt(maxPrime); i++)
            {
                if (allNumbers[i])
                {
                    for (int j = i * i; j < maxPrime; j += i)
                    {
                        allNumbers[j] = false;

Sieve of Eratosthenes

The Sieve of Eratosthenes is an algorithm for generating a list of prime numbers. I'm working through some Project Euler programs, and the next one I selected was one of the prime number problem, so I decided that I'd write up the sieve and then solve a few PE problems with it.

I'm not going to go through the algorithm here. Wikipedia handles it well.

Project Euler: Bouncy Numbers

Trying to get back into coding more regularly (life has been a little hectic), so I'm starting with some Project Euler problems. Since this is just a warm-up, I decided to start with an easy one, and selected #112, the most solved problem published after the first 100.

Bouncy numbers go up and down. The consecutive digits increase and decrease, like 1234321. Or just 121. But not 123 or 222.

Quick Update + Plans

Quick update: I started a new Microsoft SDET contract in April.

Current plan (not a solid one):
My current plan is to rework this website a little to better show-off my current and recent programming projects. While I was unemployed, I worked mostly on my Pentago-playing program, Mistletoe. That was an XNA/Visual C# 2005 project. I completed a couple of Project Euler problems (163, 244) last month for bets, and I'm working on another. All three are Visual C# 2008 projects.

Day 11: This is tiresome

I'm tired of this day x stuff, making myself just list the day's activities and leaving it at that if I have nothing else to say. I'm done. If I seem to be slacking off, that'll be noteworthy enough to... note it here. Otherwise, no more entries just for the sake of having an entry. I started doing this to help keep myself working daily, with the consequence of having to admit I'd been lazy when I did. But I haven't had much to say other than if I actually worked on my stuff that day. A waste of a full-sized blog.

Syndicate content