Star Wars: The Old Republic

My friend Ole-Magnus told me about Star Wars: The Old Republic yesterday. When I first saw the game a couple of years ago, I though that it would be horrible based on the graphics and feel then, but seeing it today, I’m psyched.

SWTOR 2008 vs 2011

Rumors has it that an open beta is on its way, and I will eagerly follow its subreddit to catch the latest news. The game looks slick, but I fear this old gaming rig needs an upgrade before I can play it. Here’s a video of an editor’s walkthrough of a quest. It looks truly awesome.

SWTOR — I’m keeping my eyes on you.

Posted in Miscellaneous | Leave a comment

Rift

Last week, Lars Erik made me aware of this new game getting shipped soon, called Rift. I had heard the name before, but never looked into it and shrugged it off as just another game with nice graphics.

From today until Monday February 21, they’re having an open beta. I’ve downloaded it, and I hope to be able to testing it out this weekend. It looks very slick and the graphics is undoubtably there. I just hope it isn’t as much a fail as Aion was. Preliminary testing done yesterday shows that they’ve done things more right. The storyline, or as much as I could get of it until level three, seemed nice and the surrounding area showed a lot of promise. Controls were seemingly dead on.

As I played a High Elf, I’m not sure whether or not it’s the Elf’s model or a more pressing issue, but the character seemed a bit stiff. But hey — It’s an elf, they’re stiff per definition.

To join in on the beta, simply point your Web browser to their beta FAQ website, register for an account and download the client. Try to log in and you have beta access.

Posted in Gaming | 3 Comments

Essential System Administration.

This book has finally made itself useful.

Posted in Miscellaneous | Leave a comment

Warning: time of day goes back

I found this rather amusing. Never encountered it before.

$ ping vg.no
PING vg.no (195.88.54.16) 56(84) bytes of data.
64 bytes from www.vg.no (195.88.54.16): icmp_req=1 ttl=246 time=396 ms
64 bytes from www.vg.no (195.88.54.16): icmp_req=2 ttl=246 time=243 ms
Warning: time of day goes back (-310321us), taking countermeasures.
Warning: time of day goes back (-42119us), taking countermeasures.
64 bytes from www.vg.no (195.88.54.16): icmp_req=3 ttl=246 time=0.000 ms

The reason is that my laptop was shut together since the last time I pinged that address, so apparently it had cached some requests only to surface when I now tried to ping it again. It could also be due to the clock not being synchronized properly before I reached Internet again. Nonetheless an interesting error message.

Posted in Miscellaneous | Leave a comment

Automatically check StudWeb for grades

What is StudWeb?
When you study at universities or university colleges in Norway, you have to use a forsaken beast called StudWeb to check for your grades. This is OK by itself, but it’s getting tedious when you wait for your last grade to show up.

During the past weeks, I’m sure I’ve thrown several hours into opening www.studweb.no (yes, they don’t have an alias on studweb.no, so you have to enter www first), logging in, checking for the grade and confirming that it hasn’t shown up yet.

Come automation
Since I started working again this Wednesday, I simply couldn’t spend this amount of time into something as trivial. Thus, I automated the process through a Perl script utilizing the WWW::Mechanize module. The script runs a reload of the website every 30 seconds. This bypasses the session time to live, thus causing the script to being able to run on a single login more or less forever.

Initially I wanted to simply play a sound or some music when the grade had arrived, but that would imply that I had to be by my computer all the time, so if I went to lunch or to the bathroom, I wouldn’t notice that the grade had arrived. Instead, using Mail::Sendmail I could rather send myself an e-mail that I would be able to get at any given point in time since I always carry my phone with me.

The code

#!/usr/bin/env perl
use strict;
use warnings;
use utf8;

use Getopt::Long;
use Mail::Sendmail;
use WWW::Mechanize;

my $mech = WWW::Mechanize->new;

GetOptions(
	'username:s' 	=> \my $username,
	'password:s' 	=> \my $password,
	'threshold:i' 	=> \my $threshold,
	'email:s' 	=> \my $email,
	'smtp:s' 	=> \my $smtp,
);

if (!$username || !$password || !$threshold) {
	die 'Usage: ./studweb --username s12345 --password lolpasswd --threshold 160 [--email s12345@student.hio.no --smtp smtp.myisp.com]';
}

# Get main page
$mech->get('https://www.studweb.no/as/WebObjects/studentweb2?inst=HiO');

# Go to login form
$mech->submit_form( form_name => 'feideForm' );

# Set HiO as login form and login
$mech->submit_form( fields => { org => 'hio.no' } );
$mech->submit_form( fields => { feidename => $username, password => $password } );

# Bypass JavaScript
$mech->submit_form();

# Go to innsyn
$mech->follow_link( text_regex => qr/Innsyn/ );

# Go to resultater
$mech->follow_link( text_regex => qr/Resultater/ );

my $last = q();
while (1) {
	my $current = q();
	my $date = `date +%H:%M:%S`;
	chomp($date);

	my ($table) = $mech->content =~ m{<table cellspacing="2" cellpadding="2" width="95%" border="0">(.*?)</table>}msi;
	my (@tr) = $table =~ m{<tr.*?>(.*?)</tr>}msig;
	for (@tr) {
		if ($_ !~ m{class="sum-r"}) {
			my (@td) = $_ =~ m{<td.*?>(.*?)</td>}msig;
			next if scalar @td < 11;
			$current .= sprintf "%s: %s\n", $td[2], $td[7];
		} else {
			my ($sum) = $_ =~ m{<td class="sum-r">(\d+),0</td>}msi;
			$current .= sprintf "Sum: %s\n", $sum;

			if ($sum >= $threshold) {
				if (defined $email && defined $smtp) {
					sendmail(	To 	=> $email,
							From 	=> $email,
							Subject => 'Grade from StudWeb',
							Message => $current,
							smtp	=> $smtp);
				}

				print $current;
				exit;
			}
		}
	}
	print $date;
	if ($current ne $last) {
		print "\n$current";
		$last = $current;
	} else {
		print ": No change";
	}

	print "\n";
	sleep(30);
	$mech->reload;
}
Posted in Coding | Tagged , | Leave a comment

Converted to WordPress

As the blogging software I wrote before was in dire need of severe upgrades, and I want to be able to use 3rd party tools to update the blog, I have now converted ipwn.se to WordPress. Over the coming days, I will migrate blog entries from old ipwn.se to the WordPress installation to see how it works.

Oh, and if you got here from Twitter, then Twitter integration is working.

Edit January 5: Old entries are seemingly imported successfully! \o/ Comments too, but comment count is off for the time being.

Posted in Miscellaneous | 1 Comment

Array optimization in Perl

I learned something new this Friday. Some might frown and say that I should’ve known this from before, but I still have a long way to go before I fully master the Force. Say that we have an array filled with different values. For the example’s easiness, let’s say these values are from 1 to 2000, but they could be anything and don’t have to be in order at all.

my @allowed = (1 .. 2000);

The array define a range of allowed values in another array, which contain different, possible values. Again, for the example’s easiness, let’s say these are the values from 1 to 20000.

my @possibilities = (1 .. 20000);

Perl has a function grep to check whether or not a value is in an array, but if it has to check for every value we’re throwing at it, we’d end up with running it 18000 * 2000 + (2000 + 1999 + … + 1) amount of times. That’s 38 001 000 checks we have to toss in.

However, there is a simpler way. We can fill up a hash and check if it’s keys are defined. This would reduce the checks per miss from 2000 to 1. I knew this from before, but I’d been using a less awesome approach. Here’s what I’d do:

my %range;
for (@allowed) {
    $range{$_} = 1;
}

While it’s quite okay, it doesn’t look very pretty to be tossing in that for loop in the middle of the code. This is where map comes in. The above code could be rewritten to:

my %range = map { $_ => 1 } @allowed;

That’s it! For every element of @allowed, map the the element’s value as a key in %range to the value 1. Quite nifty.

Let’s see our final code now:

# Let's assume these are given
my @allowed = (1 .. 2000);
my @possibilities = (1 .. 20000);

my %range = map { $_ => 1 } @allowed;
for (@possibilities) {
    if (defined $range{$_}) {
        # Let's do some stuff here
    }
}

All in all, we’ve made the code prettier and we have reduced the amount of checks from the mind baffling 38 001 000 to merely 20 000. If it’s a hit or a miss, we have still only one check towards the hash. More optimized and fancy code. Awesome.

Posted in Coding | Tagged | Leave a comment

A revised guesstimate of Cataclysm’s release date

Ok, my previous guesstimate didn’t really hit, as I guessed that Cataclysm should hit around October 1. A bit optimistic, eh?

Today Blizzard announced that the 4.0.1 public test realm was released. This is the patch that will hit the live servers before the expansion with the events that lay the base for the expansion’s delve into lore.

From the earlier expansions we know that the patch itself is live for about a month before the the expansion hits, and that the date has been annonuced about two months in advance. We also know that Activision’s CEO has promised a 2010 release. In general, having a release in December is not optimal as this might require people to work overtime during Christmas, you might miss out on getting under the Christmas tree, and so forth, so I guess Blizzard will release before that point.

I have no idea about how long time the patch will be on the PTR, but I would guess at least a month. Trying to copy a character today, I saw that the queues were full and that the estimated processing time was 6 days. It looks like they are going to get sufficient testers at least.

Let’s estimate that the patch will be on the PTR for just under one month. Then the patch has to hit and be live for about one more month before the expansion hits. Based on this, I would guess that the expansion hits on a week day between November 11 and November 25. All dates are plausible, but if I were to gamble on one of them, it’d be Thursday November 18. Let’s see if I’m closer on this guesstimate.

Posted in Gaming | Tagged | 1 Comment

Paladin Talents I Won’t Miss

Blizzard recently announced that they would revamp the talent trees for World of Warcraft: Cataclysm by reducing each tree to having 7 tiers instead of 11 which we have today. This means that you have to spend only 31 talent points to get the top talent of the tree, down from 51. You will also have only 41 talents in total to spend at level 85, down from 76.

Personally, I think this can remove many boring and tedious spells which we are currently enforced to take in order to be allowed to further down in the tree. I will in this post try to sum up which talents I hope will disappear in this cleanup.

As I am a Protection Paladin, I will only consider talents available to me (all 11 tiers in the Protection tree and the top 4 tiers of the other trees), however most of these would never be considered in a Protection build, and others are just boring and passive, such as Deflection or Anticipation. Effect descriptions are the max rank of the talents.

Holy Tree

  • Spiritual Focus (-70% pushback on Flash of Light and Holy Light)
  • Seals of the Pure (+15% damage on Seal of Righteousness, Seal of Vengeance, Seal of Corruption and their Judgement effects)
  • Healing Light (+12% increased healing from Holy Light, Flash of Light and Holy Shock)
  • Divine Intellect (+10% intellect)
  • Unyielding Faith (-30% fear and disorient duration)
  • Improved Lay on Hands (-4 min cool down, gives target -20% physical damage for 15 seconds)

Protection Tree

  • Divinity (+5% healing done by you and to you)
  • Divine Strength (+15% strength)
  • Stoicism (-30% stun duration, -30% chance helpful spells and damage over time spells will be dispelled)
  • Guardian’s Favor (-120 sec Hand of Protection cool down, +4 sec Hand of Freedom duration)
  • Anticipation (+5% dodge chance)
  • Improved Righteous Fury (-6% damage taken)
  • Improved Hammer of Justice (-20 sec Hammer of Justice cool down)
  • Improved Devotion Aura (+50% armour bonus, targets affected by your Auras receive +6% incoming heals)
  • Blessing of Sanctuary (Blessing that reduces damage taken by 3% from all sources, increases Strength and Stamina by 10% and gives 2% mana back when the player blocks, parries or dodges a melee attack.
  • One-Handed Weapon Specialization (+10% damage when a one-handed weapon is equipped)
  • Spiritual Attunement (When the Paladin is healed by others, the Paladin gains mana equal to 10% of the amount healed)
  • Ardent Defender (Damage that takes you below 35% is reduced by 20% and attacks that would have otherwise killed you cause you to be healed up to 30% of maximum health. 2 min cool down)
  • Redoubt (30% block value, damaging melee and ranged attacks have a 10% chance to increase chance to block by 30% for 10 sec or 5 blocks)
  • Combat Expertise (+6 expertise, +6% stamina, +6% critical chance)
  • Touched by the Light (Increases spell power by 60% of the Paladin’s strength, increases amount healed by critical heals by 30%)
  • Guarded by the Light (-6% spell damage taken, 100% chance to refresh Divine Plea when hitting an enemy, -100% chance to dispel Divine Plea)
  • Shield of the Templar (-3% damage taken, +100% chance of Avenger’s Shield silencing affected targets for 3 sec)

Retribution Tree

  • Deflection (+5% parry chance)
  • Benediction (-10% mana cost of all instant cast spells)
  • Heart of the Crusader (Judgements will also increase critical chance by 3% against the target judged)
  • Improved Blessing of Might (Effect increased by +25%)
  • Conviction (+5% critical chance)
  • Eye for an Eye (Critical attacks against you causes 10% of the damage taken to the attacker as well)
  • Sanctity of Battle (+3% critical chance, +10% Exorcism and Crusader Strike damage)
  • Crusade (+3% damage, +3% additional damage to Humanoids, Demons, Undead and Elementals)

Wow, that’s a good share of Protection talents. If I were to take all talents I just “removed”, I’d spend 51 talent points. What does this tell us?

One of the main problems with the Protection tree for Paladins and possibly the tanking trees for Warriors, Death Knight and Druids, is that there are too many passive talents like “+X% chance to Y”, or “-Z% W damage taken”. This is generally bad and it’s not very likely. There are of course talents that shine, such as Hammer of the Righteous, which is a great addition to Paladins’ tanking rotation and especially when tanking several targets.

All in all, I hope that we will get some fun talents, and although my list might be cynical, I wouldn’t miss many of the talents if they were exchanged for more “fun” talents. There will always be talents like “-Z% W damage taken”, but if mixed with other things they could be more fun and less cookie-cutting.

Posted in Gaming | Tagged , | 3 Comments

Speculation: Cataclysm’s release date

This Fall, Blizzard will release World of Warcraft: Cataclysm as the third expansion to World of Warcraft. As usual, we don’t know the exact release date, but let’s try to speculate and theorize about when it will be release.

First off, let’s see how it’s been done before:

  • World of Warcraft was released in the US on Tuesday November 23rd 2004, and on Friday February 11th 2005 in Europe.
  • World of Warcraft: The Burning Crusade was released in the US and Europe on Tuesday January 16th 2007. The closed beta started Thursday October 12th 2006.
  • World of Warcraft: Wrath of the Lich King was released in the US and Europe on Thursday November 13th 2008. The closed beta started Thursday July 17th.

From what we’ve seen on screenshots and such from the Cataclysm Alpha, we can assume the closed beta will begin within the interval of mid-June to mid-July. Since many are, assumingly, going to pre-install the expansion from Battle.net, we can assume that the DVD production will take significantly less time than for Wrath of the Lich King. Furthermore, we can assume that the beta period lasts for about two months, given the data trend from The Burning Crusade, where it lasted about two months, and Wrath of the Lich King, where it lasted about 2.5 months.

We can predict the beta period to last for 2 months and the DVD production to take 3 weeks, assuming all the extra stuff is pre-made so that the only thing left to do is to produce tons upon tons of DVDs. Given these predictions, by having the closed beta start in the middle of June, Cataclysm would ship around the second week of September.

Then we add Blizzard’s “When It’s Ready” factor, rub our magic eight ball and read that Cataclysm should ship in the end of September. My guess is September 30th or October 1st.

Edit June 13: Blizzard just lifted the NDA of Cataclysm, meaning that the Beta will surely commence very soon™!

Posted in Gaming | Tagged | 3 Comments