Skip navigation.

sub Blog

return @entries;

Exam, Skien, Twitter.

The exam went amazingly well. I had high expectations, but I was scared of what might come due to the new exam form this year. It was just like old exams, just that we didn't get to use the book. Luckily I am quite used to using String.format and such (although they prefer that we write String s = "this string: " + val + " and that string: " + val2; instead of String s = String.format("this string: %s and that string: %s", val, val2); What looks nicest?

Anyhow, we're in Skien now, with not much happening, and I love it. The anti stress factor is very good and I feel totally relaxed. We'll stay here until Saturday, and on Sunday at 0900 our plane for Ørnes.

I'm trying out Twitter now, and I think I like it. The concept is nice, small status updates that is (hopefully) easy to follow. If you want to check it out, I'm at http://www.twitter.com/amnith. :-)

Learning PythonStudweb's getting upgraded... WTF.

Comments

Shaunak 18. December 2008, 02:01

I personally prefer String s="String"+val;
String format reminds me of C.....

I signed up for twitter too.... http://twitter.com/shaunakde

amnith 18. December 2008, 10:21

Well, when you get quite long thngs, say something that should be printet out with 10 different variables, it'll soon get messy with "+ val".

String info = "Name: " + name + ", address: " + address + ", language: " + getHisLanguage(name) + " etc";
String.info = String.format("Name: %s, address: %s, language: %s etc", name, address, getHisLanguage(name));

I think it's easier to read through the code too. It's just a matter of taste, and I find the latter more tasty.

I'll check out your twittering. :smile:

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

Type the two words displayed in the image below:


Smilies