by Nick
17. October 2006 19:36
I was chatting with Darryl this afternoon at the weekly Geekzone catch up and he was filling me in on the progress of Windows Presentation Foundation Everywhere. Well, it turns out that support for mobile device will be shipping in V2, which is not surprising as this was stated early on by the team. However, what was a massive surprise, and IMHO a complete insult to the thousands of VB developers, is that only Javascript and C# will be supported for writing client side code to run on the WPF/e runtime. That's right apparently support for VB.NET will not make it into V1 - backlogged to V2.
THIS IS JUST WRONG - Microsoft should reconsider this, delaying shipment of WPF/e if necessary to guarrantee support for VB.NET
Updated: VB will be supported in the first release (see comments)
20f29693-46fc-4b0e-8b9b-6dd16efed958|0|.0
Tags:
Development
by Nick
15. October 2006 15:58
One of the problems with interviewing a vendor representative is that it is easy for them to drop into “salesman speak”. In the latest Arcast, Ron talks with Compuware representative, Sean Salisbury. Although there is the occasional product plug, it is intermingled with a number of great hints for successful development processes. These include integrated build testing (you mean your tests aren’t already run as part of your continuous build?) and performance analysis.
Speaking of performance analysis, JetBrains have been working on version 2 of their dotTraceTM Profiler. Last week we were having some issue with form load time so we downloaded the beta and within minutes we had tracked down some of our performance bottlenecks to the Infragistics grid control. More specifically the way we were using its stylesheets. Now that we know where the issue is we can work to reduce the load time. We want to keep using this grid control as it provides all the features we need in a data grid (such as headers, footers, styling and grouping with totals). So, the options are either to complain to Infragistics and see if they can tell us how to get around the issue, or, we can remove the bottleneck by putting it on a less critical path.
The idea of critical path in software is a concept that I think more development teams should investigate. By critical path I am generally referring to the user experience and everything that needs to go on to enable the user to work with the application. In the same way that you would minimise project risk by reducing the number/length/risk of items on the critical path, so too should application developers look to remove items from the critical path in their applications.
Take the example with the Infragistics control. The critical path here is that the user clicks a button and a form displaying a grid of data needs to be displayed (obviously in the shortest amount of time possible). There are a number of things that need to happen here: the form needs to be instanced, the grid needs to be created, the style sheet needs to be created from a resource file, the data needs to be loaded, the data needs to be bound to the grid, the form needs to be rendered. Using the profiling tool we were able to deduce that loading the style sheet is a major bottleneck on this critical path (at the moment all these actions happen in serial). If we can either pre-load this style sheet, or load it in parallel, we are likely to see a reducing in the load time for this form.
69b8c504-5d7a-4fef-83db-3f70d0ea8189|0|.0
Tags:
Development
by Nick
15. October 2006 15:34
Ok, firstly before I go further on this post I would like to apologise to any farmers who are reading this post and feel that I’m out of line with these comments. I acknowledge that I’m neither a farmer or an environmental expert and I welcome any feedback to enlighten me.
I have just been listening to the Australian world news (thanks to the ABC’s podcast series) hearing about how the Australian farmers are all hard done by and that the recent lack of water has meant that they may have to run livestock instead of crops. Ok, correct me if I’m wrong but Australia is predominantly a dry continent, and most of the crops and livestock are not native to Australia. Subsequently we run into issues such as drought and salinity.....
You would think that one of the best ways to tackle this would be to start farming native plants and animals. For example, farming Kangaroos – this is seen as taboo because it is one of our national icons. The reality is that in some areas the number of these animals actually makes them a pest; although the flavour of the meat is more gamey it generally means you eat less of it (potentially less obese people???) and they have skin/fur that can be used for clothing and fashion items.
Anyhow, before you start emailing the government in support of our whinging farmer, take a thought about whether money will fix the underlying issue facing the Australian primary industry sector!
0c66670a-60ac-416f-ab40-b13a78e74096|0|.0
Tags:
Development
by Nick
15. October 2006 04:35
Having recently installed Vista RC2 I have been eagerly installing all my favourite applications: Office 2007, Visual Studio 2005, Orcas VS extensions, WF designer extensions, Live Messenger, Guidance Automation Extensions/Toolkit. Most of these installed without a hitch, although I did get continually prompted to allow Administrative permissions. Note: I did NOT have to disable User Access Control (yet).
Yesterday I got an email from the Project Glidepath team announcing that v2 is now available for download, so I eagerly downloaded it. After installing the Guidance Automation Extensions (although they include the Dec 2005 release, I had already installed the most recent release) I proceeded to install Project Glidepath. Half way through the install fails, “Error 2869”. This seems to relate to the infamous User Access Control(UAC). Work around is to create a batch file with the following lines:
msiexec /i ProjectGlidepathRepositoryManagerSetup.msi
msiexec /i ProjectGlidepathMicroISVFactorySetup.msi
Then right-click the batch file and select “Run as Administrator”. This will get the installer to work. However, the UAC issues are not over yet. The post-installation instructions suggest running Visual Studio 2005 and creating a new Project Glidepath project, from which you can “update” to retrieve the latest guidance information. Unfortunately, what they don’t tell you is that you MUST run Visual Studio as administrator, otherwise the database can’t be created and you won’t be able to update. Again, this can be done by right-clicking on Visual Studio 2005 in the start menu and selecting “Run as Administrator”.
Well, back to “synchronising” project glidepath – will hopefully have an update as to what is actually included once this has completed.
96d2b167-9b96-4c29-8d8e-7b2a83e07737|0|.0
Tags:
Development
by Nick
15. October 2006 02:19
Earlier this year Microsoft announced that they would be re-banding SQL Mobile to SQL Server Everywhere. One of the ideas behind this initiative is to provide a better story for developers who want to build applications that support working in disconnected, or occasionally connected, mode. In the past the only solution in Microsoft-Land was to use either Access or MSDE (now SQL Server Express), neither of which provided a suitable solution. Access requires an Office license, while MSDE/SQL Express runs as a background service making it unsuitable for a single application local datastore. SQL/e addresses this issue as it runs in-process with the application. It will also be able to be deployed alongside the application using ClickOnce deployment.
One of the issues with using SQL/e as an offline datastore is that configuring merge replication was difficult and wasn’t always suitable, depending on the server datastore. As such the Smart Client data team at Microsoft have been working on a new sync framework. Steve Lasker has just posted a powerpoint presentation and a screencast that demonstrates where this technology is going!
d2c75fda-764a-4b97-b5eb-27c9cafee8a8|0|.0
Tags:
Development
by Nick
12. October 2006 08:55
I was just listening to Bill McCarthy chatting with Ron Jacobs on Arcast about the rich feature set of VB 2005. One of the points of interest was around the declarative approach to event handlers that VB.NET uses. For example say I have the following class with an event declaration:
Public Class ClassWithAnEvent
Public Event TestEvent As EventHandler
End Class
Now in VB.NET to wire up an object of this class so that I can receive notification on the TestEvent I can do it declaratively as follow:
Public Class ClassThatConsumesAnEvent
Private WithEvents x As ClassWithAnEvent
Private Sub TestEventHandler(ByVal sender As Object, ByVal e As EventArgs) Handles x.TestEvent
End Sub
End Class
The question is what does this do under the hood. Well the easiest way to explain this is using our good friend, Reflector, to regenerate the code:
Public Class ClassThatConsumesAnEvent
<AccessedThroughProperty("x")> _
Private _x As ClassWithAnEvent
Private Overridable Property x As ClassWithAnEvent
Get
Return Me._x
End Get
Set(ByVal WithEventsValue As ClassWithAnEvent)
If (Not Me._x Is Nothing) Then
RemoveHandler Me._x.TestEvent, New EventHandler(AddressOf Me.TestEventHandler)
End If
Me._x = WithEventsValue
If (Not Me._x Is Nothing) Then
AddHandler Me._x.TestEvent, New EventHandler(AddressOf Me.TestEventHandler)
End If
End Set
End Property
End Class
As we can see from this code, VB.NET is doing a lot of the heavy lifting around adding and removing eventhandlers. This means that we can easily reassign an object to variable x without having to worry about adding and removing eventhandlers. This also clears up, for those that were wondering, where eventhandlers are added/removed in VB.NET.
by Nick
11. October 2006 10:53
Following Alastair's post regarding encrypting sections of a configuration file I ran into a similar issue where I wanted to protect a password that my application was using. Obviously there are a couple of big NO NOs. I can't hard code the password into the application because it is too easy to use something like Reflector to crack it own and grab the password in clear text. I can't easily use the standard crypto functions that require a private key, cause then I would have to hide the private key somewhere). Luckily v2 of the .NET Framework exposes DPAPI through the ProtectedData class. As such I can do the following to encrypt/decrypt data:
Private pData As Byte()
Private Sub Encrypt()
Dim sensitiveData As Byte() = System.Text.Encoding.Unicode.GetBytes("Some sensitive data")
pdata = ProtectedData.Protect(sensitiveData, Nothing, DataProtectionScope.CurrentUser)
MsgBox(pData.ToString)
End Sub
Private Sub Decrypt()
Dim sensitiveData As Byte() = ProtectedData.Unprotect(pData, Nothing, DataProtectionScope.CurrentUser)
Dim str As String = System.Text.Encoding.Unicode.GetString(sensitiveData)
MsgBox(str)
End Sub
You will of course need to add a reference to System.Security to your application and import the System.Security.Cryptography namespace into your code file.
746b3579-12a5-46a3-8091-0c3a3880bd22|0|.0
Tags:
Development
by Nick
11. October 2006 07:39
David Kline makes a great point about the side effect of debugging code. In particular, if you have properties that actually do more than simply returning a value, you can unexpectedly modify the state of the system just by exploring an object in the watch window.
Visual Studio 2005 supports a number of attributes that can help control how objects are viewed during debugging:
DebuggerDisplay - This controls how the single line summary of the object is rendered when you hover your mouse over an object when in break mode.
DebuggerHidden - Can be used to attribute a method/property that you don't want the debugger to step into when debugging. Note that you can't place a breakpoint in a method/property with this attribute, nor will this method/property appear in the call stack if you place a breakpoint further down the call stack.
DebuggerStepThrough - This marks code that will appear as "external" code when debugging. Again you can't place a breakpoint in this code.
DebuggerNonUserCode - Just when you thought there couldn't be any more permutations on what will/will not be stepped through.... This attribute controls whether your code is stepped through when the "Just My Code" option is enabled (see Tools --> Options).
DebuggerTypeProxy - This attibute allows you to redirect the debugger data tip to display a substitute object in place of the object you are hovering over. This can be great if you want to simplify the way your object is displayed during debugging.
DebuggerVisualizer - Use this attribute if you want a richer display for your object. For example if you hover over a String object you will notice there is a magnifying glass in the data tip. Clicking this brings up the String visualizer which is a window where you can view the entire string. You can write your own visualizer by inheriting from the DialogDebuggerVisualizer class and then attributing your class with the DebuggerVisualizer attribute.
<Shameless plug>Samples of using these attributes is available in Professional Visual Studio 2005</Shameless plug>
15791b93-c408-42b0-9929-1885c76a4dc0|0|.0
Tags:
Development
by Nick
10. October 2006 08:51
In my previous post I mentioned the book review that was on Amazon but had subsequently been removed. Anyhow Dave Gardner pointed me to Google cache (normal search with "cache:<url>" as the search string) and there it was. So that we (Australians) can laugh at our perception elsewhere in the world, here is the review in full:
1 of 20 people found the following review helpful:
Worst book ever about .NET/Visual Studio, September 29, 2006
First, I did NOT buy this book, only came across it in a bookstore while trying to learn a few details about the new visual studio compilation system.
I guess every serious developer knows most Wrox books are junk, but still can't believe they managed to publish such a stupid and worthless one.
It's even worse than a simple rehash of the MSDN online documentation, which would at least save you some time to search through it.
The table of contents said it all: 56 chapters in 900 pages, most of which are made up of boring screenshots. Do the math and you'll ask yourself the question: who are the targeted readers?
These 56 chapters covered every aspect of .NET: C#, VB, ASP.NET Web development, Windows Forms, Team System, Debugging, Macros, Refactor, Compact Framework..., in a very very very poor and shallow fashion.
So the next thing i did was to find out who were the authors, and there you are: two experienced/accomplished but "Australian" developers. In my albeit limited experience, the majority of Australian developers were shallow in their understanding of highly complexy technical stuff, and they write code in an exremely sloppy fashion. But these two guys are supposed to be the creme de la creme of .NET developers in that country, or maybe not?
In any case, next time you buy a book make sure where the author(s) are from first.
c63a5bfb-46a7-4093-892e-9271d5006d1c|0|.0
Tags:
Development
by Nick
10. October 2006 07:45
The next installment of the MS Dev Show is now available on The Podcast Network where I chat with Rob Farley on the topic of Certification. More specifically we talk about Microsoft Certification and the examination process involved in becoming certified. We also talk about the value of certification in both the eyes of the candidate and their employer (or potential employer).
IMHO vendor certifications are probably not worth much more than the paper that they are written on. Maybe the samecan be applied to a University degree. I must admit that when I'm looking for new employees I look for a University degree, yet place little value on whether they are vendor certified. What do you do? How important are exams, or for that matter any form of tertiary education. Do you think that ongoing professional development is a good thing?
b94d5544-3052-49c9-b537-db8b94fa5bdb|0|.0
Tags:
Development
by Nick
9. October 2006 21:12
Over the weekend the co-author of our recently published book, Professional Visual Studio 2005, contacted me to point out a fantastic review of on Amazon. Well, it was fantastically funny and as Andrew points out it would be great if anyone else who has read the book could post a review ;-).
Unfortunately the actual review has been pulled from the Amazon website, but in summary it makes the following claim:
So the next thing i did was to find out who were the authors, and there you are: two experienced/accomplished but "Australian" developers. In my albeit limited experience, the majority of Australian developers were shallow in their understanding of highly complexy technical stuff, and they write code in an exremely sloppy fashion. But these two guys are supposed to be the creme de la creme of .NET developers in that country, or maybe not?
Does this apply to New Zealand developers or are we all too busy farming sheep and making award winning films?
942915f1-57f1-45ce-8b56-73a3ef1fc92c|0|.0
Tags:
Development
by Nick
8. October 2006 18:23
For those working with Vista and are armed with a Windows Mobile device you should check out the beta version of the
Windows Mobile Device Center which extends Vista RC1. If you aren't already aware Vista will ship with a cut down WMDC which simply allows you to connect to your device. In order to partner with your device you need to download this update. AFAIK the plan is to make this an update that will appear in Windows Update when you have a device plugged in. IMHO this sux and is again another black mark against mobility. In the same way that the Windows Mobile 5 sdks should have shipped with Visual Studio 2005 (instead of just WM2003SE), the full WMDC should ship with Vista!
by Nick
5. October 2006 06:55
I just noticed that
The Microsoft Developer Show is available via
iTunes - how cool is that. Now you don't even need to leave iTunes to subscribe to the podcast.
86a093ac-e4e2-4f1c-88c0-f7d224b31aa8|0|.0
Tags:
Development
by Nick
4. October 2006 08:19
Brian Madsen wrote an interesting post following Greg Linwood's presentation at my home user group, the Perth .NET Community of Practice. I would like to make a follow up comment on this as I have a slightly different opinion to Brian:
When it comes to an application that uses a database there are a number of roles associated with building that application. I don't want to get into the nitty gritty of what the roles are called but essentially they fall into a couple of broad categories IMHO.
- Interaction Designer: This role is primarily responsible for building the front end application such that it is usable, presents the information in an appropriate format and will get good user adoption. NB: This function is actually where a LOT of applications fail!
- Developer: This role is responsible for coding the business logic for the system - extracting and manipulating data into a format that can easily be consumed by the user interface. Quite often this role is merged with the Interaction Designer role but in large projects there are quite often coding tasks that just require manpower to get classes written that serve a particular function. NB: Most of the code this role rights should be easily tested using Unit testing. This role should NOT be concerned with how indexes are structured etc, rather they need to define what data they need to retrieve and update.
- Database Designer: This role is the only role that should be concerned with what indexes are on the database. If an application is performing badly (at the data tier), it is NOT the responsibility of the developer to reindex the database. Through collaboration with the developer (ie the user of the data) the database designer is responsibile for structuring the database such that the developer can work with the data.
- Database Administrator: IMHO this is an operational role and if an application has a good SLDC then the database administrator should NOT be reindexing. Any changes to the index should be applied as a new version of the application. Of course, this doesn't hold where a database is being used by multiple applications and is not being versioned in line with the application. Regardless, there should be some lifecycle management around any changes that are applied.
There may be other roles/points that I haven't considered, so please feel free to add your 2 cents worth ;-)
514d80eb-5493-4d00-af98-9130fe0e7da2|0|.0
Tags:
Development
by Nick
2. October 2006 10:25
The next show has just been published where I chat with Jeff Arnett, Windows Embedded MVP, about building applications that work across multiple platforms. As a fellow mobility MVP I can associate with the difficulties faced by developers wanting to port code between different platforms. In my previous role at AutumnCare we spent a lot of time maintaining a common code base, and now at Intilecta we are having to do the same process. Check out the latest show to here more!
69e61a10-01fe-4c05-af50-602a95745c24|0|.0
Tags:
Development
by Nick
1. October 2006 09:16
Happened across this blog post/ramble from Steve Yegge which talks about the good and bad of Agile methodologies. It also covers how Google uses incentives and the lack of a release schedule to be at the leading edge of business applications.
c4e38f71-620f-4e3a-a13e-5ff2cc67807c|0|.0
Tags:
Development
by Nick
28. September 2006 15:57
A while ago I blogged that there was an update for Vista Beta 2 that enabled you to partner your mobile device. As Mauricio writes on his blog, this update will be shipping as a separate component.
by Nick
28. September 2006 09:51
Franks has just pointed out that the MS Student Partners are now (infrequently) blogging. There is also a cool website where you can view where the Student Partners are based. My only complaint with this page is that it breaks the mouse-scroller - by default this should scroll the page NOT zoom in/out on the map!!!
It would be great to have this functionality for "Meet the MS Team" - although I guess they are travelling so much that it is difficult to indicate a location. Perhaps you need a "Where are they currently" or a "Where have they been" functionality.
53268398-462b-47ab-8a34-63e1b091e9d3|0|.0
Tags:
Development
by Nick
27. September 2006 10:24
James Avery makes a great point in his post about multiple assertions in unit tests. I really like the concept of being able to run multiple asserts within a given testcase and having them all run, even if one fails. However, I would like an additional argument (boolean - "exitOnFailure") for the Assert methods so that I can elect to abort a test if the assert fails
Using multiple asserts in this manner would really extend the concept of UnitTests, making it easier to trace what was the likely cause of a test failure. Instead of looking at all the tests that failed to try and pinpoint the root cause (in a similar way to looking at all the compile errors to try to identify the single error that is causing them all), you could look at a test case and analyse the assertions to narrow down the cause.
Great idea James!
130ba020-5ec6-425a-9b2f-bf1152d893ea|0|.0
Tags:
Development
by Nick
27. September 2006 07:51
As Brian Madsen pointed out, Mitch Wheat did a great post on improving productivity using Visual Studio. However, I would utter a word of caution, these short cuts DO NOT work for all profiles. When you first install VS 2005 you will be prompted to select a profile (eg VB, C#, General...) which will configure VS to the type of developer you are. As a VB.NET developer I was tempted to go with the VB profile until I realised that it has mapped the keyboard shortcuts to reflect what they were in VB6, which quite frankly sux. Instead I go with the General Developer profile which seems to work for me (oh, and Mitch's shortcuts all seem to work in that profile!)
A couple of other VS related things:
- I would also like to reference the announcment that VS 2005 SP1 Beta is now available, as per Somasegar's blog.
- <shameless plug>I can't miss this opportunity to point to the book entitled "Professional Visual Studio 2005" that Andrew Parsons and myself wrote, and is now available from Amazon.</shameless plug>
b7160205-4392-4a88-a658-9e5ba3d252e9|0|.0
Tags:
Development