www.vegard.net

Archive
Tag "Programming"

My employer encourages their employees to participate in some sort of activity outside of normal office hours to keep learning new skills. For me, cracking code is both my job and a spare time hobby, but after eight hours at work it’s often hard to find the motivation to sit down to fix even more bugs or open a dry book on patterns. But this year – just like last year – I plan to make a simple Android app in my spare time. As it turns out there’s an internal contest at work starting these days that involves mobile application development. Convenient for me, since it means that I can, at least in theory, use some of my working hours to work on the Android application.

Continue reading "Challenge." →

Although the HTML5 specification still has Working Draft status over at the W3C, browser support is quite good. If you’re using the latest version of your favorite browser, chances are that it can handle some, if not all, of the new HTML5 features. The Wikipedia article Comparison of layout engines (HTML5) seems fairly updated when it comes to what the different layout engines support in case you want to stay on top of what happens on the client side of HTML5.

Amongst the new features are offline web application support, at the time of writing implemented by all the major browsers except for Internet Explorer. For the users of browsers that do support this feature, however, it means that parts of (or your entire) web application can be made available to them even if they for some reason are offline or if your production servers have taken a dive and the website is down. Of course this never happens in your production environment, but this can still be a good thing to know about offline web application support in HTML5 in case you have a friend who you suspect might find himself in this unwelcome challenge some day. Continue reading "HTML5: Going Offline." →

It’s minus eight degrees Celsius outside and the snow is coming down hard. I’m inside studying for my Sun Oracle Certified Java Programmer exam while Anniken is with her parents out in the Oslo fjord.

I’m writing this because I desperately needed a break from the test exams and I’ve got a feeling turning on the TV will only make me even dumber than I already feel. Yes, I managed to pass the first Whizlabs preparation exam I took, but some of the questions I got wrong even people who think Java is all about coffee probably would have been able to guess correctly.

Of course we could get into a discussion about to what degree getting the certification is important to prove you know the ins and outs of the language and how relevant the exam questions are compared to the everyday struggles of your average Java programmer, but let’s leave that one for now. I feel a rant coming, but I probably shouldn’t write it before I’m actually certified.

Now I need some food and the willpower to sit down for another three consecutive hours of DOES NOT COMPUTE.

This entry is mostly just me rambling on about technical stuff and thinking out loud. If you want to read something really entertaining, read “Freedom, Justice and a Disturbingly Gaping Ass” instead.

Work continued on Buingo.com today. I’ve decided to lay down the user logic first to make room for more users and hence more content. That one of the goals of Buingo.com is world domination creates an interesting challenge:

How to handle time zone correctly?

The natural thing would be that every user had the times and dates associated with each Buingo converted to his or her local time zone. If a user in Florida (GMT-5) browsed the Buingo calendar of a user in Paris (GMT+1) posted at one in the night on Friday local time, it would appear as posted at 7pm in the evening on Thursday for the Florida user. Some people would probably argue that everything should be in the local times of the posters, but this way seems natural to me.

If this was a meeting calendar you would like to have all meetings scheduled displayed in your local time, wouldn’t you? Yes, you would.

So now I’m saving everything as GMT in the database regardless of the time zone of the poster. I’m also able to convert all the dates to the local time zone of the person browsing the content once the GMT value is extracted from the database, but I can’t get the calendar to display the Buingos correctly. The problem is that the time zones has to be converted in the database as the database query is executed, not just after the GMT value is extracted.

MySQL has a method for this, CONVERT_TZ, but I have not been able to get it to work properly yet and it’s not supported by the MySQL version my host is using.

Another day, another challenge.

In other, related news; the number of subscribers to the mailing list has actually doubled from January 1. That’s a good start. You an find out how to subscribe at Buingo.com.

In 2005 Yahoo! acquired Flickr and del.icio.us, both for undisclosed sums. In July the same year, News Corp. acquired MySpace.com for whopping $580 million USD in cash. In October 2006 Google bought YouTube for a respectable $1.6 billion USD in stock and Chad and Steve laughed all the way to the bank. They’re probably still waking up at night laughing until they pee themselves. And someone is probably negotiating for the acquisition of Digg as I’m writing this.

The common factor for all these sites is they are all boosting user-generated content. Hell, del.icio.us is basically just a large collection of tagged links. It seems like the secret to becoming filthy, filthy rich is to get a Web 2.0 community site with user-generated content up and running, get the rumor out there and hope that people are not tired of posting personal stuff about themselves on the interweb.

Enter stage left; Buingo.com. At the moment it’s very, very basic, but if time permits it will pretty soon be my ticket to MTV Cribs. I need another semi-dedicated PHP-programmer for this project. You game? I really need to get the user-handling and sign-up in place. Biggest challenge will probably be the damn time zones. Never liked those.

For all I know there might already be a site exactly like this online. But that I don’t know about it means that they haven’t got people talking about it yet so the race to the Google money is still on.

Recently played


Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 4: parser error : Premature end of data in tag name line 4 in /home/vegard/public_html/vegard.net/wp-content/plugins/lastfm-recently-played-tracks/lastfm.php on line 51

Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: <name> in /home/vegard/public_html/vegard.net/wp-content/plugins/lastfm-recently-played-tracks/lastfm.php on line 51

Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: ^ in /home/vegard/public_html/vegard.net/wp-content/plugins/lastfm-recently-played-tracks/lastfm.php on line 51

Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 4: parser error : Premature end of data in tag user line 3 in /home/vegard/public_html/vegard.net/wp-content/plugins/lastfm-recently-played-tracks/lastfm.php on line 51

Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: <name> in /home/vegard/public_html/vegard.net/wp-content/plugins/lastfm-recently-played-tracks/lastfm.php on line 51

Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: ^ in /home/vegard/public_html/vegard.net/wp-content/plugins/lastfm-recently-played-tracks/lastfm.php on line 51

Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 4: parser error : Premature end of data in tag lfm line 2 in /home/vegard/public_html/vegard.net/wp-content/plugins/lastfm-recently-played-tracks/lastfm.php on line 51

Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: <name> in /home/vegard/public_html/vegard.net/wp-content/plugins/lastfm-recently-played-tracks/lastfm.php on line 51

Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: ^ in /home/vegard/public_html/vegard.net/wp-content/plugins/lastfm-recently-played-tracks/lastfm.php on line 51

Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/vegard/public_html/vegard.net/wp-content/plugins/lastfm-recently-played-tracks/lastfm.php:51 Stack trace: #0 /home/vegard/public_html/vegard.net/wp-content/plugins/lastfm-recently-played-tracks/lastfm.php(51): SimpleXMLElement->__construct('<?xml version="...') #1 /home/vegard/public_html/vegard.net/wp-content/themes/blogum/footer.php(11): fetch_ijlastfm_data('vskjefst', 2, 1, 0) #2 /home/vegard/public_html/vegard.net/wp-includes/theme.php(1115): require_once('/home/vegard/pu...') #3 /home/vegard/public_html/vegard.net/wp-includes/theme.php(1091): load_template('/home/vegard/pu...', true) #4 /home/vegard/public_html/vegard.net/wp-includes/general-template.php(63): locate_template(Array, true) #5 /home/vegard/public_html/vegard.net/wp-content/themes/blogum/archive.php(35): get_footer() #6 /home/vegard/public_html/vegard.net/wp-includes/template-loader.php(43): include('/home/vegard/pu...') #7 /home/vegard/public_html/vegar in /home/vegard/public_html/vegard.net/wp-content/plugins/lastfm-recently-played-tracks/lastfm.php on line 51