Andrew Aitken - Blog

Model.Parent == null

Thought I would put up a quick post on an issue that I came across when converting my blog to Umbraco.

I have a macro that lists posts, it will show the normal page as well as the filtered pages for categories and tags. While trying to get my tag filter to work I hit a strange issue.

if (Model.Parent != null && Model.Parent.Id == 1234)

In the above if statement, Model.Parent was always null.

Parent should only be null if you are on the homepage, so I checked Model.Level and sure enough it was 1.

It took a bit of head scratching and some fruitless googling before I realized it was because the node I was loading was called “Blog”, as was the root element of my site. Doh!

Quick rename of the tag (and the category as it would have suffered the same problem) and all was good in the world of Umbraco again.

I’m still not 100% sure on the rules of nodes with the same name. They seem to be fine if they are not direct descendants of one another.

Read more →

Small update

Finally got round to fixing an issue where a 404 was being recorded as error. Should save some disk space :) I’ve also added a new friend link for Greg and Jen who are off traveling round the world.

Hopefully this will inspire me to get my ass in gear and do a bit more work on my blog and maybe even write some blog posts! One thing I really want to do is update the design and javascript so when I post code it fits on the page and is syntax highlighted automatically.

Read more →

500 Recipes for chicken

It’s been another week and I’ve passed the last two exams. 70-516, accessing data with .NET 4 and 70-519, desgining and developing web applications using .NET 4. So I’m an MCPD now. Yay!

We’ve noticed it raining a bit more every day, but on Friday night it was non-stop downpour. It’s Sunday now and the rain is just getting silly.

Refreshments

After passing the last exam on Friday we decided to celebrate by heading north to Calangute where there are a lot more bars and clubs. Gareth, Marc and Sanjay came along for a few drinks. Thomas got a hookah with apple flavoured tobacco which was strange but nice at the same time. It was only Thomas and me who were up for staying out, so when the other guys got a taxi home, we headed across the road to a club called Tito’s.

It was 1500rs (£21) to get in, with free drinks all night, and they let us both in for the price of one. The inside of the club was actually quite small but pretty busy. As with every other bar we go to, the guys out number the girls about twenty to one. We stayed until about 3am then got a taxi back to the apartments.

I really wanted to go see an elephant but after lunch on Saturday I had to stay within close proximity of the toilet for the rest of the day. :(

My three weeks in Goa has been fun. Our apartment was clean and the food cooked for us has been excellent. With all the studying we didn’t get time to do very much else, but what we have seen has been fun. I think if I was going to come back it would need to be in the dry season, although I don’t think I could handle the temperatures they get over here.

I am looking forward to going home though. I’d do anything for a bacon double cheese burger just now. The food options here are quite limited. I seen a book today that summed it up quite well, “500 recipes for chicken”.

Read more →

One week to go

Last week went well. We went over the Windows Communication Foundation (WCF) books and passed the 70-513 exam with 950/1000. To be honest the course was too fast and I think I’ll be keeping the books for future reference. WCF is vast. There is so much in there and to cover it all in three days was just not enough to really get to grips with it.

I can’t beleive it’s been two weeks already. The time has really flown past. So far we have completed eight books, two exams and we are halfway through the two data access in .Net 4 books. Once we finish that we will have another exam, then we will sit the MCPD exam. I’m not sure if we get any books for the last one, as it is more of a summary of all the other modules we have studied so far.

So far the data modules have been quite straight forward and tomorrow we start a module about using entity framework in an n-tier environment which I’m quite interested in.

Not a lot else has been happening. We went out for a drink on Friday after passing the WCF exam. We studied a lot this week and haven’t gotten out much so not a lot to report.

Read more →

Down the road

Well today went as well as could be expected. Gareth and I felt we were as prepared as we would ever be to take the exam (70-515) and decided to take it in the afternoon. We are a day ahead on the course and ideally would have sat the exam on Tuesday, but for some reason the test centre was closed on Tuesday so we decided to bite the bullet and go for it today.

What a relief. The exam questions came thick and fast but I felt very much on top of it. In fact, when I found out I had gotten 880 out of 1000 I was slightly disappointed. I honestly don’t know what questions I got wrong. Never the less, 880 is a pass and that’s all that really matters.

Church in Goa

We headed back to the apartments early as we can start WCF tomorrow and we are still one day ahead of schedule. We picked up Marc and Ramu from the other apartments and headed out for the afternoon. We had a few (understatement) drinks in Hotel Fidalgo (I’m sure its Fandango) then headed back for dinner.

We picked up the almost everyone else after dinner and headed to the local hotel Vivanta for a drink. It was very fancy and very quiet but twice the price of hotel Fandango, still less than £2 for a beer though. After that we headed to the Marriott. It was a bit of a trek but we made it, hot and thirsty. The Marriott is a five star hotel and prices for beer are about the same as the UK, but again it was very quiet.

At this point a Gareth and Thomas threw in the towel and headed back to the apartments, but the rest of us soldiered on and headed to a bar we had heard of called Down the Road.

For some reason they don’t have regular music here, instead they have people singing popular songs. In Down the Road it was a man and his wife taking turns. They were very good and had some songs by the Killers and Jason Mraz to name a few. This place was much better. For a Monday night it was pretty busy and we agreed that it is where we should go on Saturday night.

Tomorrow we try to tame the WCF beast. I’m sure I will come out of this one with a few scars but passing this first exam has helped a lot and we are going to give it all we’ve got.

I’m a bit tipsy, gonna sleep now.

Read more →