NEBytes / UK Tech Days events in April

Next month we’d already planned an event on the 3rd Wednesday as usual, when we had the opportunity to become part of Silverlight Geek, Jesse Liberty‘s tour of the UK & Ireland. It was too good a chance to pass up, so we’re doing the regular event and a special one-off…


On Friday 19th April, Jesse will be joining us to deliver a session on “Building A Highly Extensible, Decoupled Silverlight Open Source Application with MEF and RIA Services using Lean, Test Driven Development, An International Team of Volunteer Programmers,  and lots of Advil.”


This talk will use the Silverlight HyperVideo Platform open-source project on CodePlex as a case study in building highly extensible Silverlight applications. Among the topics we will focus on are:


  • New features in Silverlight 4 and how they made life easier
  • The Managed Extensibility Framework (MEF) added to Silverlight 4
  • WCF RIA Services for connection to a back-end db
  • Handling inter-module communication when the requirements are that modules cannot assume which other modules will be created, there can be no dependencies on order-of creation and unanticipated modules must be able to communicate with existing modules.
  • Using Markers, Injected Markers and polling to trigger events while viewing a video.
  • A Quick introduction to Lean, TDD and Kanban.

Registration is open and is free as usual. We are exploring the possibility of following Jesse’s session with a Geek Dinner (although that won’t be free). Keep an eye on the NEBytes site for more details on that.


You may want to sign up for that one as soon as possible – with the recent announcements over Windows Phone 7 Series development using Silverlight, this topic is hotter than ever.


In addition, we’d already planned April’s regular event on Wednesday 21st April, where Ben Lee and myself are going to cover Office 2010, and Colin Mackay is coming to talk about “SQL Injection Attacks and Tips on How To Prevent Them”.



The Office 2010 session isn’t just going to be your typical tour of sparkly new features, although we will do a bit of that for people who like that sort of thing (I know I do). We’re going to have some proper IT Pro content in there, so if it’s your job to deploy and manage the Office suite, this session is for you. Hopefully we’ll manage to fit in one or two cool things that you can go and teach the boss to help make them look good too.


Registration for the 21st is also open now.


It’s also worth pointing out that we’re running these as UK Tech Days fringe events. The main Tech Days events run in London, 12th – 16th April, with a full line-up for developers and for IT professionals. There are a variety of fringe events in London that week, and around the country, being run by various usergroups from this week into May.



You can follow all the UK Tech Days events by searching for the #uktechdays tag on Twitter

First Impressions: Battlefield: Bad Company 2

I mentioned in my post about Battlefield 1943 last year that I have a long and happy association with the Battlefield series, although I managed to miss out on the first Bad Company game because of various other things in my life. That didn’t stop me being very excited to try out the multiplayer demo of Bad Company 2 when it hit Xbox Live a little while ago, and for the duration that it was running it stopped me playing Modern Warfare 2.


My experience with the demo was enough for me to recommend it on this site, but now that the full game is out and I’ve had a chance to play it a bit, I thought it was time that I backed up that recommendation with an early review.


At release, it seems that EA were having some problems with the servers that were supporting multiplayer games on the Xbox 360 (they seem more stable now), so I started out playing the offline campaign. What you get with the single player is basically a very good first person shooter. The story and characters give it a bit more personality than comparable titles. However the thing that really sets it apart from the competition is the destructable environments. Where other games may give you the option to go to the left or right of a structure, BFBC2 lets you blast a hole straight through the middle.


The first time I reached a challenging point in the game (i.e. I died a few times before I progressed), I’d tried to attack the enemy twice be going around the front of a building. After two failures, I tried to go round the back and again failed. On my fourth attempt, I entered the building and climbed up to the attic, intending to snipe at the enemy, except I found that the single window didn’t give me a view in the right direction. Rather than head back downstairs, I just popped a suitable hole in the roof with a grenade and took out the targets with my rifle. It was a satisfying incident.


The multiplayer really is a different game to the single player campaign. That’s not a bad thing – it just means that you’re getting two great games for the price of one. BFBC2 online features the same ranking mechanic as Modern Warfare 2. You unlock new and more powerful weapons and kit as you rank up. It is fair to say that unless you are just good at this kind of game, you can’t just jump in and expect to rank up in your first match. The difficulty curve is quite steep to begin with.


One thing that I would suggest to people who are struggling to rack up any kills to begin with is this: if you spot the enemy and point them out to the rest of your team, you can get points for an assist. On the Xbox 360, this is done by pressing the Back button on your controller when an opposing soldier or vehicle is in your sights. When you’ve done that, a little indicator will appear above them, and they’ll appear on the mini-map for your team mates. An assist isn’t nearly as good as a kill, points-wise, but it does help towards your total, and may help you to feel like you’re helping the team a bit and not being a total noob.


In the multiplayer again, the destructable environment makes a huge difference to the gameplay. You’ll find that multiple playthroughs on the same map can be unique experiences as tanks and explosives flatten buildings and change the available cover. The additional use of vehicles and UAV drones also add spice to the mix, and for me make this game more enjoyable than Modern Warfare 2. There’s nothing quite as impressive as a bunch of people jumping in a helicopter and working together to take on the opposing forces. [A quick note to the people who excitedly jump into a helicopter, lose control of it when transitioning into forward motion and crash into the first building - if you let go of the controls, they auto-hover - try to make use of that knowledge and not waste the aircraft.]


That’s about all I’ve got to say for now. I haven’t had a huge amount of time to play the game just yet, partly because I’m still very much into my Assassin’s Creed 2 addiction (that’s a fantastic game too, by the way – I thought the first one was too repetitive, as much as I wanted to love it, but the sequel is fantastic!), plus I have a lot of other pulls on my time. BFBC2 isn’t totally perfect, but then what is? If you weren’t sure whether you could justify the investment over just carrying on playing Modern Warfare 2, I think I’ve made my position clear. :-)

Select-String provides context in file content searching

When you spend as much time as I do writing scripts, it doesn’t matter how sensibly you store and name them, you’re always going to have situations where you know you’ve already written a snippet of code that does something, but don’t know which file it’s in. Windows’ built in search does a fairly decent job of telling you which files contain a string of text, but you then have to open them to search again inside for the actual section you’re looking for.


It’s fine being able to locate what you’re looking for, but when you’ve got a good sized body of work that you’re searching through, especially if you didn’t author it all yourself, then it’s nice to be able to see the context that your search result occurs in. That’s where Select-String is working wonders for me.


Select-String’s -context parameter is used to define the number of lines either side of the search results that you want to include. The help says:


-Context <Int32[]>

Captures the specified number of lines before and after the line with the match. This allows you to view the match in context.

If you enter one number as the value of this parameter, that number determines the number of lines captured before and after the match. If you enter two numbers as the value, the first number determines the number of lines before the match and the second number determines the number of lines after the match.

In the default display, lines with a match are indicated by a right angle bracket (ASCII 62) in the first column of the display. Unmarked lines are the context.


Typically I only specify one integer, either 2 or 3, to show 2 or 3 lines either side of the match, but it’s nice to have the ability to say I want 1 line before and 6 after, or whatever.


So, if I know that we used the Set-QADuser cmdlet to do a particular task, I might do this:


select-string -path c:\scripts\*.ps1 -pattern “set-qaduser” -context 2


The results that I get back would be like this (trimmed to fit this page layout, but I’m sure you get the idea):



Of course there’s more to Select-String than that. Firstly, the pattern that you’re searching for, by default, is a regular expression, so you can do some really complex searches if you wish (to do a simple match for a string, just use the -simplematch parameter).


Being PowerShell, the results of your Select-String search aren’t just text on the screen, they’re rich MatchInfo objects that you can pass down the pipeline and do things with. In the results above, you can see the filename, line number and the content of that line – those are all seperate properties of the MatchInfo object, so say you wanted to do a complex RegEx search for some content in a bunch of files, then copy those files somewhere else and send an email to your colleague saying “Hey, check out examples of where we use Set-QADuser; I’ve copied them to our team folder and you want to look at these lines in the files…” it would be really easy.


I think Select-String is a pretty useful tool and if you haven’t taken a proper look at it before, I encourage you to do so.