Sunday, July 31, 2011 at 7:30 AM Good week
This week results are great and important. I've completed 3 problems from Project Euler in the last two days. One of them even took me just 20-25 minutes to come up with an algorithm and to code, and it worked fine from the beginning, no bugs.
However there was one problem (#10), which took me 2 hours to optimize for a quicker solution. Finding the sum of all primes between 1 and 2,000,000 was not a quick task to complete by brute force alone. I did my very best to think of and implement all sorts of possible shortcuts in calculations, and still it took about 5 minutes for my program to come up with the answer (it was correct, but still it's very slow). At that point, when I'd run out of ideas for improvement, I've decided to settle with the way it worked, entered the result into the problem's page, and got access to 'post-mortem' explanation and the best algorithms for solving it. As I imagined it was beyond my current math abilities, but still I could trace the logics and finally understood the idea behind it. I don't think I'm going to implement it, but who knows maybe during the week ahead I would want to take a 'coding hour'. :)
Another important thing happened around Thursday. I've re-installed XCode 4 on my MacBook, and now it handles all my C++ templates and files perfectly well! First, I've uninstalled both XCode 3.2 and XCode 4 (thanks Internet, there are many helpful pages about this process and how to do it right), then I've downloaded XCode 4 over again, and finally installed it. After that everything worked smoothly, without any errors or glitches. Once again I felt how much more polished and though-out the XCode 4 interface and workflow are. Really pleasant experience.
I was reading a lot during the week, and there are very good chances will finish the chapter I'm currently on this evening. I also watched Lecture 1 from CS193 course, which is specific about iOS development. It's an introductory lecture, so no really hard materials there. I might continue watching along, in parallel with the current C++ course lectures, until I get stuck. Besides, my day-time job vacation time has just started and it doesn't hurt to force my studies just a bit. :)