Andrew Aitken - Blog

Hello bedsheets

Well we’ve kicked it into high gear now. We are in class from 9-5, study at the apartment until 7:30, go for dinner, then go back and study until about 9 or 10. I keep getting really tired in class which is annoying because I’m sure I’m getting enough sleep. Divakar had coffee today and it smelled so good, I’m not sure if I trust the coffee machine though.

Tonight I went through 95 test questions for the 70-515 exam. Took around 3 hours in total and I’ve got a list of stuff I want to look into before the exam. Good news is I got enough right that it would have been a pass (821/1000). That’s a bit of a confidence booster because we have both felt totally overwhelmed the last few days.

I’m still a little worried about only having 2 days to study for the WCF exam. But we are hoping the WCF exam will be a lot more focused and easier to study for than the web development exam which covers such a vast amount.

Other Happenings

We took a walk down 18th June Street the other day. There are lots of shops selling car batteries. We found the Bombay bazaar which seems to sell some nice things but the staff are constantly trying to show you things. Outside isn’t much better, I got followed down the street by a woman trying to sell me cashmere pashminas. I must have told her “no” about ten times. They are pretty cheap but I don’t know anyone who would want one. We got caught in the rain on the way back, it started off light but in about 5 minutes it was a torrential downpour. I did manage to run from Koenig back to the apartment without any anterior tibialis issues. It’s been a while since I’ve been able to run that far.

Today on the way back to apartment there were two guys selling bed sheets on the street. As we passed he just looked at Gareth and said, “hello bedsheets,” in a husky voice. We didn’t know what to say to that.

I updated my photos on Picasa yesterday, I don’t expect there will be much more for me to post over the next two weeks.

Sorry if this post seems a bit broken, I think my brain has already gone to bed.

Read more →

Non stop tooting

My stomach is fine, thank you. Gareth and I went for a walk to find the supermarket after class. It’s up to about 85% humidity today, according to MSN weather it’s 30 degrees but feels like 39!

While trying to cross the main road a bus stopped to pick us up, so we sheepishly walked away. After about five minutes a gap opened up and we managed to sprint across the road with only a few mopeds having to toot and swerve. The locals look at us very strangely. I thought they would be used to seeing tourists around here but apparently not. A lot of them just stare at Gareth, which is a bit rude.

The traffic here is insane. There’s no other way to describe it. Walking to the mall the sound of horns is pretty much non stop, they peep when they over take, when they approach pedestrians, when they pull out and pretty much whenever they feel like it. At least they drive on the left. Most of the time.

We found the shopping mall and a KFC. It’s quite a walk, about as far as I was willing to go in this heat and humidity. I’ve noticed there are a lot of security guards around some buildings, our apartment has one at the gate and there is one in the reception area at Koenig. The mall was a different world, it had 3 or 4 security guards at the main entrance. To get inside we had to go through a metal detector and get scanned by a guard. There were several security guards inside and a man was standing at the top of every escalator. The shops were all very trendy looking and were priced to match. I bought some BBQ Pringles and a bunch of mini bananas.

The alleged korma

For lunch today I ordered chicken korma. I thought this would be a safer choice after the bag of grey slime I got yesterday. I have no idea how they do it but the chicken korma was even more grey than the chow mein and looked more like a tub of gruel. Fortunately it only tasted half as bad as it looked.

Read more →

Goa Baby

Getting here was fairly uneventful. The wait in Heathrow was made easier by a long lunch and couple of pints of Staropramen. The plane to was a 747 and for some reason was about 28 degrees inside. Thankfully the aircon kicked in once we were in the air and it cooled down to a more manageable heat. We had two seats at the very back of the plane so we didn’t have to sit next to anyone else. In the nine hour flight I think I managed two, maybe two and a half hours sleep. Leaving the plane at Mumbai I thought I had walked through some sort of exhaust vent for the plane. I soon realised it was just the air. The temperature is around 30 degrees and humidity is a sticky 75%. When we got on the Goa flight, there was vapour pouring out from around the overhead luggage racks. I guess it was the dry air coming out of the air conditioning reacting with the humid air coming in through the door.

It's a bad sign

There was also a “Refusal Room” in Goa airport. See my other photos here 2011-06 Goa.

The Apartment

The apartment is pretty much what I expected. We have a room each and Gareth’s room has an en-suite, so we have a bathroom each. The bedrooms have air conditioning which is pretty much essential for me as the heat doesn’t go anywhere at night. We get our breakfast and dinner served in another apartment. It’s in the same building but on a different block so we need to go down to the garage and back up a different elevator. The elevators have a sliding metal grate and can’t work when it’s opened, so they play a doorbell type of music to remind you to close it. Ours play “Home, sweet home” and one of the others plays “My heart will go on”.

Day 1 of the course

We went for breakfast in the other apartment. Fried egg, hash brown and toast. It was quite good and a pretty normal thing to have for breakfast after yesterdays chicken fajita. When we got to the classroom we got started fairly quickly. It’s only Gareth and me in the class. Our teacher had planned to do 8 modules today but as we are starting with quite basic stuff we got through them really quickly and managed to get 10 finished. Hopefully getting the extra work done today will mean we can have a bit more time on anything we struggle with later.

Lunch

I ordered chow mein for lunch today because it was the only thing on the menu that looked remotely recognisable. It came in a foil wrapped bag which took 10 minutes to open, only to be greeted by a really slimey, grey, onion filled sauce (I’m not a big fan of onions). I tipped it onto the plate and found a massive pile of noodles at the bottom of the bag. The noodles were good.

It’s still 30 degrees and it’s still incredibly humid.

Read more →

Caching file contents with CacheDependency

The CacheDependency will monitor a file or folder for changes. When it detects a change it will remove the associated key from the cache.

This comes in quite handy for my hangman game which stores the film titles in an xml file.

Below is how I cache the data and setup the CacheDependency. Some validation has been removed to keep it clear.

private HangmanGameCollection ReadGameFile()
{
    if (HttpRuntime.Cache["HangmanGame"] != null)
    {
        return (HangmanGameCollection)HttpRuntime.Cache["HangmanGame"];
    }

    HangmanGameCollection hangmanGames;

    FileInfo xmlFile = new FileInfo(Server.MapPath("~/TopSecret.xml"));

    XmlSerializer xmlSerializer = new XmlSerializer(typeof(HangmanGameCollection));

    using (FileStream fileStream = xmlFile.OpenRead())
    {
        hangmanGames = (HangmanGameCollection)xmlSerializer.Deserialize(fileStream);

        // Put it in cache with a dependency on the xml file
        HttpRuntime.Cache.Insert("HangmanGame", hangmanGames, new CacheDependency(xmlFile.FullName));
    }

    return hangmanGames;
}

Should maybe do something about fitting in long lines of code :\

Read more →

First post

There is still a lot to do but I have finally gotten a working version of my blog online. I chose to write my own blog for a chance to play with asp.net MVC 3 and the Razor view engine. So far I really like the Razor view engine and think my HTML looks much cleaner when working with it. Here is a list of what I hope to update over time:

  • Add a search feature
  • Have a correctly formatted date when viewing old posts
  • Implement MetaWeblog API
  • Comments support
  • Contact page
  • Detect tweets not loading and add redundency
  • Add a custom error page
  • Make sure all the HTML and CSS is valid
  • Minify and combine the js files
  • A few styling tweaks

Maybe add a style for lists too.

I did manage to implement an RSS feed and tags which I had missed or not wanted in my original specification.

I would like to thank Steven Gibson (@glasgowtozocalo) for doing the design for me. It’s got the clean, easy to read look I wanted and I’m really happy with it.

Read more →