Tuesday, 27 April 2010
Over the weekend I had the chance to sit down with a friend who is studying a computer science degree and give some suggestions on their software engineering assignment. What made this interesting was that the assignment was in Java.
I hadn't used Java since the early days of Java 1.0/1.1 when we used it to create some browser applets to be used in teaching electrical engineering at UniSA, so I wasn't sure how much help I was going to be.
As someone who spends most of his professional life using Microsoft tools, I was pleasantly surprised to see that most concepts I use with C# and Visual studio have equivalents in Java language and IDE (NetBeans in this instance). That Java and C# are similar shouldn't be any surprise, but I certainly gained an appreciation of how C# has learned from it's older brother. It was only an hour or two so the comparison is certainly not extensive, but it is interesting to observe some of the subtle variations:
- Having to deal with exceptions that might be thrown (or the Java compiler fails your build)
- Properties seem to be just a convention of methods named getXXX/setXXX
- Importing namespaces and having to append .* on the end of the namespace
- Coming to grips with Swing and AWT (versus coming to grips with GDI/WinForms/WPF!)
- Inheriting a base class uses 'extends' instead of ':'
- NetBeans had familiar features including refactoring, project references, breakpoints and step through debugging, intellisense (kind of)
I think there's probably more the same than different, and I can understand how you could reasonably easily swap from one environment to another.
It did cause me to wonder how these languages and environments are going to change over the next few years. It does seem ironic that in many ways Microsoft may have some advantages in being able to innovate their language more easily than Oracle/Sun. On the other hand I think it is very healthy for there to be competition to encourage new features that will improve the development experience in both camps.
In the end we made some good progress on the assignment, though in my opinion it seemed it was trying to force the use of a particular design pattern into a scenario which didn't really need it, which probably ended up being more confusing and less useful to the students.
Wednesday, 21 April 2010
Last week I got to do something quite different – I taught the course 2310C: Developing Web Applications Using Microsoft Visual Studio 2008 to a group of software developers. I became a Microsoft Certified Trainer at the start of March, so I'm now able to teach a range of Microsoft courses. LobsterPot now has SQL, BI and .NET training comprehensively covered (contact us if you want to make a booking!)
I really enjoyed being up front teaching – an interesting contrast from just sitting at a desk in front of a screen. One of the first things I learned was how useful Win+P is for switching my laptop/data projector from 'duplicate' to 'extend' display modes. The PowerPoint slides were in 'extend' mode with the presenter view on my laptop screen, but for code demos I would switch back to 'duplicate' so I'd be seeing the same thing as the students.
The other useful thing was having a Microsoft Wireless Notebook Presenter Mouse 8000. This was a gift for taking part in the Demos Happen Here competition (along with a bright orange t-shirt). I'd worn the t-shirt a few times but the mouse had been sitting in a drawer feeling neglected. Last week it got a good workout though - really handy to swap between 'mouse' and 'presentation' mode to flick through the PowerPoint slides.
The course 2310C is a fast trip through various features of Visual Studio 2008 and ASP.NET 3.5, and is not a bad introduction to most of the things you'll need to get started doing web development. I'm pleased to observe 2310D looks like it will be available next month – with updated lessons on Silverlight 3, ASP.NET MVC and
ADO.NET WCF Data Services.
This week I'm booked in to do three .NET 4.0 exams (they're beta/pre-release which means there's no charge but also means you need to wait a few weeks to see if you pass or not). Passing those should mean I'll be able to teach courses on Visual Studio 2010 and .NET 4. I'm also planning to do some SQL 2008 Business Intelligence exams (70-448 and 70-452). These will not only be a good way for me to improve my SQL BI knowledge, but should be useful in LobsterPot getting the new 'Advanced Competency in Business Intelligence' (though if you've met Rob, you'll know he's a one-man walking advanced competency in BI already :-)
Wednesday, 14 April 2010
How to: Prepare a Database for Deployment From a Command Prompt by Using VSDBCMD.EXE shows how to upgrade the schema of a database on a remote server. However I encountered a problem this week running vsdbcmd.exe on a Windows Server 2008 R2 64bit machine:
vsdbcmd.exe /action:deploy /dd+ /manifestFile:Project.Database.deploymanifest
An unexpected failure occurred: An attempt was made to load a program with an in correct format. (Exception from HRESULT: 0x8007000B)
This error normally implies that you've got a mismatch between 32bit and 64bit dlls. I'd copied the DLLs from my Windows 7 32bit development virtual machine, so that made some sense.
It was suggested I copy the DLLs from a 64bit machine, but unfortunately that had no effect. I then noticed that some of the sqlce dlls did appear to be 32bit-specific.
I then downloaded and installed both the 32 and 64bit versions of SQL Compact 3.5 SP2 on the server, and removed the original sqlce dlls that I'd copied along with vsdbcmd.exe.
That seems to have fixed the problem – vsdbcmd now executes correctly.
So the actual list of DLLs ended up copying to the server now that the SQL Compact files are already installed are:
- Extensions (folder)
Tuesday, 13 April 2010
6.30am – Woke up
6.40am – Ate breakfast with kids
6.50am – Logged in to MSDN and started downloading the release version of Visual Studio 2010!
Not a bad way to start the day :-)
- Support for the 2008 RDL schema in local mode.
- Support for ASP.Net AJAX (All page navigation and report interactivity is done with AJAX)
- Significantly improved browser compatibility.
- Usability and “look and feel” enhancements.
- Local mode now supports the same RDL features that are currently available in SQL Server 2008, including tablix, chart, gauge, and rich text.
- AsyncRendering now controls whether the initial processing of the report blocks the entire ASP.Net page, and nothing else.
- Can be loaded into a .NET 3.5 or a .Net 4.0 application.
- No more frames - ASP.Net postbacks are used to render the report.
Read more about the ReportViewer control in the MSDN Library.
Friday, 9 April 2010
One tool that I was lacking in my new role as a Senior Consultant for LobsterPot Solutions was a laptop computer. Back in my UniSA days, if you needed a laptop for a presentation or a conference you just borrowed one, so it was never a problem. Post-UniSA I borrowed my Mum's nice Toshiba, or more recently the small (but capable) HP Mini Netbook that I got from Tech-Ed last year.
Rob and I did a fair bit of research, compared brands and options (including the Sony Z-series which I see Nigel chose), and settled on the Dell Studio XPS 16 model. Being a "laptop-newbie" I particularly valued Rob's good experience with his previous Dell laptop.
The XPS 16 comes with:
- Intel® Core™ i7-820QM Processor (1.73GHz, 4 Cores/8 Threads, turbo up to 3.06GHz, 8MB Cache)
- 8GB RAM
- 640GB HDD (will replace with SSD soon)
- 15.6" Screen
- ATI Mobility RADEON HD 4670 – 1GB
- Backlit keyboard
The CPU and RAM are similar to the Hyper-V server I built – though happily, while this CPU is also a Core i7, unlike it’s desktop cousin it doesn’t require a great whopping heatsink/cooler stuck on top (which could make shutting the lid a bit tricky!)
Some nice things I’ve discovered so far:
- It looks very nice, though the glossy surface does show up fingermarks very quickly.
- You can do "two-finger zooming" on the touch pad – great for Google/Bing maps.
- Windows 7 x64 runs very nicely.
- Rob noticed you can disable battery charging when on AC power.
- Doesn't seem to get too hot (though the AC transformer does)
After having a quick play I was pleasantly surprised to find that Dell had shipped it with the latest BIOS firmware - that is refreshing. Nevertheless, after a precautionary backup to my Windows Home Server, I did a clean install of Windows 7 x64 Ultimate and am proceeding to load up all the various "mandatory" applications (Office, SQL Server, Visual Studio, etc).
I'm also thinking I might leverage Windows 7's "boot to VHD" feature to have separate Win7 instances where I can try out pre-release/beta software without "polluting" my primary OS.
We chose the red ones, because a) they go faster (obviously!) and b) it kind of matches the red of the LobsterPot logo :-)
Tuesday, 6 April 2010
Today I needed to get a PowerShell script scheduled as a task in SQL Agent for SQL Server 2005. SQL 2008 natively supports running PowerShell, but all 2005 can do is run either T-SQL or CmdExec.
My first approach was to copy the path of the PowerShell executable from the start menu shortcut - "%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe"
That refused to work giving a really helpful "The step failed" error message.
Trying a few variations I eventually figured out that CmdExec does not expand environment variables. So either rely on the fact that PowerShell.exe is probably in the path, or specify the full path. My working version is:
c:\windows\system32\WindowsPowerShell\v1.0\powershell.exe -file "c:\tmp\test1.ps1" -ExecutionPolicy Unrestricted
Thursday, 1 April 2010
- For a brief period it looked like Mozy would be releasing a WHS client but that turns out not to be the case. I'd let my free trial with KeepVault lapse in anticipation of the Mozy product being released. Oh well :-(
- Found Backblaze - ($US5/month unlimited) but doubt they work with WHS. Casey from the Backblaze team responded to an email query saying "..don't have any plans for supporting Server OS like Windows Home Server"
- Others have recommended CrashPlan, and certainly their prices are competitive with Mozy and Carbonite. Whilst it isn't officially supported with WHS, at least it gets a mention on their support site. Poster "Scott" goes into more detail on how he got it working with WHS.