Project Euler

For a long time I have wanted to improve my programming skills. Well, skills might be a overstatement. I have had two short introductory programming courses during my many years at uni, one C++ and one Java. But after the course is over I stop programming, since there are no more hand-ins, and as a result I quickly forget even the basics.

So now my hope is that if I spend one or two hours a week working with some problems (with a math twist to keep my focus) I will pick up the basics and get more familiar with Java (the programming language that I have chosen to start out with).

So I have started working the problems at Project Euler. I haven’t spend that much time working the problems yet, but I have solved the first two (using very brute force and non-elegant code), but it seems I have to do a bit of thinking for the third problem. Somehow working through all the integers from one to 600,851,475,143, check if they are a factor of 600,851,475,143 and then check if that factor is a prime is not the most optimal way to find the largest prime factor of 600,851,475,143. Back to the drawing board…

Of course I could ‘cheat’ and just do

$ factor 600851475143

in a shell, but that way I won’t learn much…


I first heard about Project Euler at the xkcd blag, but haven’t had the time to look into it before now.

If you know of other interesting problems useful for brushing up on a programming language, feel free to leave a comment.

And before I forget, a big thanks goes out to Søren, who has been very patient with my basic questions like “how do I check if one or the other condition is fulfilled in my if statement?”. I promise, I’ll pick up a book soon and stop bothering you with trivialities on chat!

Well, at least it works now…

Yesterday morning (or what ever the time was around the time I woke up) I tried logging on to my web-bank. Not that I had any bank business like bills to pay, just to see if there was still money left in my account.
Instead of the usual log on screen I was greeted by a page explaining that the data center my bank is using has got a new security certificate, that needed to be accepted.

So far so good, I clicked to log on, got the dialog to accept the new certificate, accepted, and then the trouble started. The applet to choose my key, input user name etc. was not what meet my eyes.
So, after fiddling around a bit to see if it was a error on my end, I called the support hotline. After a short wait, I got through to some fellow and explained to him my problem. His response was that I was not the first person to report that problem today. So, that indicated that it was indeed not a problem on my end. His advice was for me to downgrade my java to 1.4.2. However when asked, he said that he would not directly pass on my problem to anyone ‘above him’. Maybe I just misunderstood him, but that seemed odd to me.
Anyway, although downgrading java on my Ubuntu Linux is not that hard, I decided to wait a bit and hope that someone somewhere would fix the problem. Later in the evening it all worked again…

I can only guess what happened and what was changed.

Getting a passing grade, or passing a grade?

For reasons that are unclear to me my java course has ended yesterday. I did all the hand-ins, so I can now consider that course passed. One step closer to holidays!
I still need to do one more hand-in for my algebra course, but with the results from the other previous hand-ins I should be fairly sure of passing that course to. The question that poses it self is of course if I can pass with a grade better than just passed. I hope so!

So it would seem that my studying will end around the 20. of June, which is more than a week earlier that I had initially thought. Nice.

So, besides the last algebra hand-in I should really start looking into what courses to follow in the fall semester. I’m fairly sure I will follow a algebra course, but besides that I have a lot of doubts. But I should be able to figure it out today… hopefully.


Så gik der igen lang tid siden jeg ‘bloggede’ sidst.

Jeg var på gaden (sammen med 50.000 – 120.000 andre) d. 17 maj for at protestere mod regeringens planer om nedsækringer og foringelser at store dele af velfærdssamfundet. Ville egentlig sætte nogle billeder af gøgl, politi, talere osv. ind her, men jeg fik ikke lige taget nogen. Der er sikkert mange andre billeder hvis man søger lidt rundt på nettet.

I dag har jeg været med esben ude og træne, og så sider jeg og skal lige til at gå igang med at begynde på min java aflevering til næste uge.

Back to school

School started again this week. Went well so far. Tuesday I had the first lectures and problem session for my course about C*-algebras and today (yes, it is still kind off Wednesday) I had my first lecture and problem session for my Java course. I forgot to bring the obligatory coca-cola soda, but to keep in touch with the computer science roots of that course I was wearing my old Red Alert t-shirt, but I don’t think anyone noticed – it’s still to cold here to walk around in just a t-shirt. Although it is getting warmer almost day by day…

I started the weekend with some heavy drinking with Joe, which left me quite smashed for the next days Kapi-Lab, but I got “through”, and I would like to think that it gave me some new insight into some of the topics that were discussed. Finally Saturday I got up late’ish but drove my MC to Malmö (first time over the bridge – was kind of a let down, it’s quite flat and there was low visibility when I was driving across) to see Joe’s and his brother Anders’s new apartment over there. It still needs paint, furniture etc., but it looks really nice and big, and Malmö (or what I saw of it) seems like a real nice city.

So, tomorrow is my day off (although I think finding stuff to do won’t be a problem, among other things there is always reading), and then it’s almost weekend. And I think this weekend might also involve a bit of drinking… time will tell.