Happy New Years Eve 2006
So its New Years Eve, so I decided that I would post something reflecting on 2006 and looking forward to 2007. I think I've missed off loads of items but these are the main points which have stuck out for me.
2006
- Attended DDD3
- Obtained MCTS (Microsoft Certified Technology Specialist): Web Applications
- Read GTD (Getting Things Done, David Allen) which, although hasn't helped much with Uni has helped with other parts of my life.
- Finished my placement year, enjoyed the year - throughout all the ups and downs. Created some very good applications, while also making some mistakes but I have grown and improved as a result.
- Read loads of books, too many to list here. Main one I was impressed with was Craig Larman’s Applying UML and Patterns
- Started working on the MbUnit project
- Started to attend the NxtGenUG
- Became a Microsoft Student Partner. Very proud of this :)
- Attended DDD4
- Appeared on the DDD4 video on Channel 9
- Got an XBox 360
- Talked to some great people over the year, listened to some great presentations.
- Been a Vista Beta Tester and got a free copy
- Started to blog, which has been move successful than I first imagined.
Some items for the start of 2007:
- Release some applications. I want to stop just developing POC and release something useful to the world. Got loads of ideas, just need to convert it into something useful.
- Hold a vista launch event on campus as part of my MSP year.
- Do more MbUnit work
- Improve my WPF and WPF/E knowledge
- Improve my Linq knowledge
- Get a graduate job somewhere...
- Attend more NxtGenUG meetings
- Present @ DDD4/DDD5? Maybe just at a NxtGenUG event
- Get to know more people
- Spend more time with Sarah (Girlfriend)
- Blog more
- Submit a Imagine Cup entry
- Create screencasts/articles on new topics
- Oh yeah, graduating might be an important one :)
Think that covers what I plan to do for the first few months of 2007. After that - who knows :)
btw. Sure I've missed off really important items - sorry.
5 Things you didn't know about me
I just got tagged by Mark Johnston (Microsoft UK DPE and all round nice guy). It's great to be tagged by you :) Noticed it last night but xbox was calling and I couldn't resist.
- When I was 15, create a company (was limited and all official) with my brother called TheQuoteCentre.co.uk Ltd, dealing with insurance which was successful. Sold my share to fund college, also was the first proper website I created. Gave me a great insight into business, the web and the issues facing companies online.
- I hate spiders. Silly I know but I just can't stand them.
- My favorite film is Kill Bill, recently watched Sin City which was amazing!
- My final year project is based around security in web frameworks, focusing on ASP.net and Ruby on Rails. The working title at the moment is "To what extent do frameworks assist developers in creating secure Internet applications?". Still got loads to do.
- Been with my girlfriend (Sarah) for two years and three months, for some reason she puts up with me being a geek and spending hours every day online.
Five people I am going to tag are:
Andrew Stopford - MbUnit Project Lead, great guy who knows his TDD.
Jeff Bullock - old work friend, cool guy.
Scott Findlater - friend of Jeff's, again good guy.
Mike Taulty - UK DPE, great developer, blogs lots of cool samples.
Barry Dorrans - Great presenter.
XBox 360 Live Gamer Tag
I got an XBox 360 for Christmas!! Hence the reason why I haven't been blogging or checking my email since.
This is my gamer tag. If anyone wants a game, give me a shout.
Merry Christmas
Just wanted to wish all my readers a Merry Christmas!!
Hope you have a great day
Ben
btw. This is my 100th post!! I'm quite happy about that.
VMWare 6.0 Beta
VMWare have announced availability of VMWare 6.0 beta, well I've only just noticed.
- Support for Windows Vista - Use Windows Vista as host operating system
- Multiple monitor display - You can configure a VM to span multiple monitors, or multiple VMs to each display on separate monitors
- Integrated Virtual Debugger - Workstation integrates with Visual Studio and Eclipse so you can deploy, run, and debug programs in a VM directly from your preferred IDE
- Automation APIs (VIX API 2.0) - You can write scripts and programs to automate VM testing
- Headless mode - You can run VMs in the background without the Workstation UI
More info at http://www.vmware.com/wsbeta
I'm very interested in the integrated virtual debugger, sounds like it would be great when testing and debugging on non-standard environments. Headless mode also sounds cool when you just require SQL Server or a domain controller for testing purposes in the background. Download for Windows is 167mb.
Dot Net Solutions Wikipedia Explorer
Dot net solutions have just released a Wikipedia explorer created in WPF. This is a great little application, which uses excellent 3D effects (as saw on Channel 9 a few months ago) and has a great network node feature which builds relationships based on their algorithm.
I was really impressed when I saw the 3D effects on Channel 9 and its great to have a play. Sure this could be really useful in the right kind of application.
More information here:
http://www.dotnetsolutions.ltd.uk/casestudies/wikipediaexplorer/
Nice work guys!
MbUnit 2.4 : Testing private methods
Andrew Stopford has just posted an excellent explanation regarding the contribution I made to MbUnit regarding Reflection and testing private methods. I know this is a hot topic, but some people might find it useful. Hope some of you find it useful.
Read about it here:
http://weblogs.asp.net/astopford/archive/2006/12/20/testing-private-methods-new-to-mbunit-2-4.aspx
UK Community on Channel 9
Channel 9 have just posted a video featuring Sarah Blow, Richard Costall, Dave McMahon, Brian Long and Guy Smith-Ferrier talking about the UK Community while at TechEd. Good discussion on the community as a whole, some really good ideas coming out regarding channel 9 improvements.
I like the idea as a central google/live maps website which links all UGs together to advertise the meetings, Upcoming.org does a bit with regarding to more open source ug like ruby on rails but more could be done.
I attend NxtGenUG meetings whenever I am around and they are a great evening. Microsoft have a list of usergroups on their site - http://www.microsoft.com/uk/msdn/community/usergroups.mspx . Have a look and see if you can find one which interests you, it is worth it!
Visual Studio 2005 Service Pack 1 Released
Microsoft have released SP1 for VS2005, including Team Suite (inc standard + professional), team foundation and express editions.
"Through further advancement and feedback, Service Pack 1 also provides over 70 improvements for common development scenarios including:
- New processor support (e.g., Core Duo) for code generation and profiling
- Performance and scale improvements in Team Foundation Server
- Team Foundation Server integration with Excel 2007 and Project 2007
- Tool support for occasionally connected devices and SQL Server Compact Edition
- Additional support for project file based Web applications
- Windows Embedded 6.0 platform and tools support"
Please note, 'Visual Studio 2005 SP1 Vista Refresh Beta’ has not been released, this is due Q1 of 2007.
Download: http://msdn.microsoft.com/vstudio/support/vs2005sp1/default.aspx
On a side note, Microsoft have also released their new website design - http://www.microsoft.com/
UK Vista and Office Developer Launch - Register Now!
As I have mentioned before, Microsoft UK are holding their own Vista launch event in Reading on 19th and 20th of January. Registration for this has now opened. http://www.microsoft.com/uk/launch2007/dev/default.mspx
On the 19th, they have some great presentations including a Keynote from Sanjay Parthasarathy (vice president of the Developer and Platform Evangelism Group at Microsoft Corp). They then have two tracks, one for Vista and one for Office with some great looking sessions.
On the 20th they are holding two coding sessions, the morning is focused on Vista with the afternoon focusing on Office. Some prizes are on offer here! Ian Moulster says this about the Saturday - "Well, we’re really keen to allow you to get your hands on these products as developers. So we’re building a huge room full of machines and inviting you to come along and write some code with us. We’ll brief you on an assignment then give you help to write the code in a two hour period, making sure that you get real experience of the platforms. And we’ll have some fun too, seeing as it’s a Saturday."
Not only are they doing the launch in Reading, but they are also putting everything online ON THE DAY! (no need to register for this, information will be on the launch page on the day) On the Saturday you will be able to interact with developers via chat rooms, forums and the blogs.
Sounds like a lot of fun!! I've registered.
Singleton and Observer Pattern in Java
This has been done a million times before, but I just wanted to do it myself in Java. Also has given me chance to use IntelliJ IDEA which is a great Java IDE on the mac - shame its not free, but it does make doing java that bit more enjoyable so might be worth the $99.
Basic model.
- Main class - Creates everything, sends messages which the observers should output
- Feed and AnotherFeed - Observers registered to listen to the Alert object for messages, outputs any messages to console prefixed with their name.
- Alert - Observable, receive message and notifies observers (feed and anotherfeed). This follows the singleton pattern, so only one object is ever created.
- Alerter - sends a message to Alert to trigger change.
Simple but effective (for a simple demo).
The main class contains the following:
//These will be used to listen for alerts and output them to the console
Feed f = new Feed();
AnotherFeed f2 = new AnotherFeed();
//Say they want the alerts
Alert.getInstance().addObserver(f);
Alert.getInstance().addObserver(f2);
//Call an object, which inturn calls Alert that something has happened.
Alerter.Alert("DON'T PANIC");
Alerter.Alert("This is a test");
Alerter.Alert("Thanks");
The alert class looks like this:
static Alert instance = null;
private Alert(){}
public static Alert getInstance()
{
if(instance == null)
{
instance = new Alert();
}
return instance;
}
public void postMessage(String message)
{
//push model
setChanged();
notifyObservers(message);
}
If you do not call setChanged(), then it doesn't work.
Alerter looks like this
public static void Alert(String message)
{
Alert.getInstance().postMessage(message);
}
Feed and AnotherFeed do this:
public void update(Observable observable, Object object) {
System.out.println("AnotherFeed Alert: " + object.toString());
}
Because I send the message as a parameter of notifyObservers(), it gets sent to the observers as the object parameter. This is the push model, in the pull model the observer would have had to gone and received the message for itself.
The final output to the console should be this:
AnotherFeed Alert: DON'T PANIC
Feed Alert: DON'T PANIC
AnotherFeed Alert: This is a test
Feed Alert: This is a test
AnotherFeed Alert: Thanks
Feed Alert: Thanks
Notice AnotherFeed outputs first, this is because it was added second, so the observers get called in the opposite order than what they where added.
Hope this helps someone, any questions leave a comment.
Code can be downloaded here : http://www.benhall.me.uk/code/Observer.zip
MbUnit 2.3 RTM
MbUnit 2.3 RTM has been released. Lots of bug fixes and feature improvements.
I recommend you give it a ago.
Download it at http://www.mbunit.com
Also, you can find a tutorial over at the NxtGenUG site on getting started with TDD and MbUnit - http://www.nxtgenug.net/Article.aspx?ArticleID=107
WPF/E Hello World
Today I had a little bit of spare time so I started to play around with WPF/E and Cocoa (OSX programming language). After a morning reading about Cocoa (need to spend more time with that) I decided to spend the afternoon with WPF/E. This is the first time I have tried to do WPF and XAML animation so it was very new to me.
View the sample here http://www.benhall.me.uk/helloworldwpfe/
First things first:
Using Beta 1 of Blend
First CTP of WPF/E
XP SP2, Visual Studio 2005 with Templates installed
To start with I created a new project using the VS templates. Note, if you have VS SP1 installed then you may have some problems with the samples. John Rayner has a guide on the templates. http://blogs.conchango.com/johnrayner/archive/2006/12/05/WPF_2F00_E_3A00_-Setting-up-your-workstation.aspx
The sample creates a html page, javascript and a xaml button. On mouse events, the button changes colour and on click it displays an alert. For my hello world, I wanted to extend this a little bit.
First thing I did was copy the XAML into Blend, however this doesn't work as Blend does not yet support creation of WPF/E XAML. Instead, I created a new project in Blend and built my button up using that. Blend is cool, very drag and drop and you can click the interaction, set when stuff will happen and using the timeline you can say where you want stuff to be at certain times in the animation and blend works out the movement for you. Very cool.
After I created the XAML I had to modify it to work with WPF/E. Mike Harsh replied to my post on the forums on how this should be done. http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=986587&SiteID=1
Just to quote it here:
"For the Expression issue, current CTP of Blend does not yet support the "WPF/E" XAML namespace (http://schemas.microsoft.com/client/2007). However, the "WPF/E" runtime supports but the WPF and "WPF/E" namespaces. To open the plugin.xaml file from the "WPF/E" template in Blend, just change the XAML schema to http://schemas.microsoft.com/winfx/2006/xaml/presentation".
For coping animations from Blend to "WPF/E", you'll need to take these steps:
- Copy the Canvas.Triggers block to the "WPF/E" XAML file
- Remove the Storyboard attribute from the BeginStroyboard tag
- Copy the Storyboard block from the resources section of the Blend XAML and paste it into the "WPF/E" BeginStoryboard tag.
- Change the x:Key attribute to x:Name
This will give you an animation that works in "WPF/E". This workflow is not ideal, but keep in mind that the current CTP of Blend isn't yet optimized to output "WPF/E" friendly XAML.
The next thing you'll want to do is change this animation to start when some other event is triggered. To do this, change the BeginTime of the Storyboard to be "1". This maps to one day. Then, in your eventhandler, get a reference to the Storyboard by calling findName("<storyboard name>") and then calling the begin method on the Storyboard."
After following this, and also removing the RoutedEvent tag, it worked!! Because I removed the Event handler it doesn't work when I moved my mouse over like it should. To solve this, we need to jump into javascript. At the top of the canvas there is the Loaded="javascript:root_Loaded" statement, together with <script type="text/javascript" src="js/eventhandlers.js"></script> in the HTML we now have full access to the world of javascript.
In the loaded event, we setup the event handlers so we can access all the events in javascript.
function root_Loaded(sender, args) {
var button = sender.findName("button");
button.mouseEnter = "javascript:handleMouseEnter"
button.mouseLeave = "javascript:handleMouseLeave"
button.mouseLeftButtonUp = "javascript:handleMouseUp"
button.mouseLeftButtonDown = "javascript:handleMouseDown"
}
An example of this is when the mouse enters the button, and the code is executed.
function handleMouseEnter(sender, eventArgs) {
var gradientStop1 = sender.findName("gradientStop1");
var gradientStop2 = sender.findName("gradientStop2");
gradientStop1.offset = 1;
gradientStop2.offset = .403;
var wpf = document.getElementById("wpfeControl1");
var o = wpf.FindName("sbMouseClick1");
o.begin();
}
First get access to the WPF control
var wpf = document.getElementById("wpfeControl1");
Then it get access to the storyboard we created in XAML.
var o = wpf.FindName("sbMouseClick1");
Then we can call methods on the storyboard such as begin and stop.
o.begin();
This then links everything together allowing for animations and completing my hello world application.
I think this covers most of the issues I had with getting a Hello World application created.
Sample is online at : http://www.benhall.me.uk/helloworldwpfe/
Code at: http://www.benhall.me.uk/helloworldwpfe.zip This also includes the original xaml created by blend so you can compare how I changed it.
NOTE: When I uploaded the sample onto my hosting, I was/am having problems with caching of the XAML, in IE7 I used the Developer Toolbar to disable caching and clear the cache for my domain but still didn't seem to work. Working locally it was fine. Just something to be aware of.
I hope this helps you, any questions post a comment and I will get back to you. Any other comments as well.
WPF/E CTP Released
Just thought I was say that WPF/E has been released. Just downloaded and installed it onto my iBook - very good (and works!).
Look out of more info soon, hopefully I will blog more about this as its something I think is really cool.
Think its still very rough and ready, but it will give a good idea where its going.
More information here:
DDD4 - Post Event
On Saturday I attended DDD4 at Microsoft HQ UK, Reading. This is a event run by the community for the community. I had been looking forward to this event for the past few months, so I was excited that it had finally arrived. Luckily I managed to grab a lift off Jeff from UsingTangents (Thanks!).
On arrival everyone was greeted to sausage and bacon rolls with loads of coffee which was a great start to the day.
First session was on AntiPatterns and writing crap code. This could have been a really good session, but I think Ben must have been overrun with work (plus he had another session to plan for) and he used a non-admin account meaning his demo failed to work and kept referring to his notes throughout - good general discussion.
Next up was intro into Robotics studio which was great, shame bluetooth didn't connect to the NXT but was still very good. I think I have managed to get Sarah to buy me one for Christmas :D
Richard Fennell then gave a talk on continuous integration which was about the best talk I have saw. Two great demos with a good discussion about the use of the technology. Really good!!
At lunch time there was Grok Talks and a Park Bench discussion. I think this was a bit more popular than they thought so 60+ people where sat on the floor making it difficult to listen to, shame they didn't use the empty Memphis room next to it - maybe next time. But definitely good use of the time!
I also got dragged kicking and screaming (ok, maybe not) into a back room my Matt Duffin and Mark Johnston (DPEs) for an interview for Channel 9 site. Think it could have been a lot better (:( sorry guys) but keep an eye out for it. Was going to try and get on the NxtGenUG podcast but I didn't get chance to see Dave in the afternoon :(
Aspect Oriented Programming was next, but have to admit a lot of it went over my head.
Finally, DataAccess Layers - Convenience vs. Control and Performance? was up, this was the one I was looking forward to most but the projector failed for the first 15 minutes which was a shame. Still a great talk, but might need to follow up on a few things which wasn't discussed.
BUT WHERE WAS THE SWAG?? Apart form in Richard and Dave's session where they had 17Kg of the stuff wasn't anything about.
Overall, Very good day. Maybe i'll do a presentation @ DDD5.





Social networks
Twitter GitHub SlideShare