Archive for the 'Software Development' Category

I’m flyin 2 ur GoldCoast 4 Tech.EduCATn ur d00dz!!

Tuesday, June 19th, 2007

Actually, no.  Because I’m fortunate to live between Brisbane and the Gold Coast, I’ll probably just drive down.

Frank Arrigo started a Tech.Ed LOLCat! meme and it’s growing.  I know I’ll hate myself in the morning, but here’s my entry…

I'm flyin 2 ur GoldCoast 4 Tech.EduCATn ur d00dz!!

Tech.Ed 2007

This year, Tech.Ed 2007 is being held at the Gold Coast Convention Centre from Tue 7 to Fri 10 August.

See Andrew Coates‘ blog for more info as track details evolve.

What do Vista Sidebar Gadgets and Xbox 360’s have in common?

Tuesday, June 19th, 2007

Do you want to win an Xbox 360?  Do you love developing and have 2 hours to spare?  All you have to do is develop a Vista Sidebar Gadget and enter the Innovation Centre Competition (closing next Friday 29th June).

So you might be thinking it must be hard?  Right?  WRONG!  It is just html and JavaScript like a Webpage without the browser.  To help you, we have a webcast on how to create a Vista Gadget from one of the competition entrants John O’Brien who happens to be a Microsoft MVP.

On the competition website you can find ideas and resources, terms and conditions, competition steps and a registration page.

What’s new for Developers in Longhorn

Sunday, June 17th, 2007

Qld MSDN User GroupThis month’s QMSDNUG meeting features
Anthony Borton, speaking on
“What’s new for Developers in Longhorn.”

Session Outline:
Anthony will introduce the Windows Codenamed “Longhorn” application server role and what this offers developers.  We will look at .NET 3.0, IIS 7.0 and the host of features contained therein.  During the session you will also see how you can use new features in Longhorn to make your application more secure and more manageable.  Come along and see why Longhorn will be a huge improvement for developing and hosting your applications!

Presenter:
Anthony is the Lead Readiness Instructor: Longhorn Development and Architecture with Microsoft Australia and has been busily delivering Longhorn Touchdown and Readiness events around Australia.  He is a Microsoft MVP for Team System and runs the QLD VSTS User Group here in Brisbane.  He has been a Microsoft Certified Trainer for over 10 years.

Date: Tuesday 19 June
Time: 17:30 for 18:00 - 19:30
Location: Microsoft Brisbane office,
Level 9, Waterfront Place, 1 Eagle St, Brisbane

These details are also available on our QMSDNUG website at www.qmsdnug.org.

RSVP
All invited; attendance is free; pizzas, drinks supplied.  An immediate rsvp by email to mike@fitzsimon.com.au will help with planning.

ASP.NET Internationalisation

Saturday, June 2nd, 2007

Qld MSDN User GroupMay’s QMSDNUG meeting was very successful.  It featured Dave Apelt of Sigma Solutions, speaking on “ASP.NET Internationalisation in VS2005 - the good, the bad and the ugly.”.

Always an entertaining speaker, Dave did particularly well this time.  E-mail feedback from members was along the lines of “Great presentation.  I came along not expecting to learn much, but I learnt a lot!”

For Web Developers

The basic thrust of Dave’s presentation was to show how simple it is to develop a web page that renders in multiple languages.  Not separate pages for each language; but ONE page that renders in whatever language the reader has selected in his browser.

He took us through the Internationalisation features of Visual Studio 2005 for ASP.NET developers and identified the aspects that are well constructed as well as the areas where designers, developers, and translators should be wary.

Dave also gave us a mini-book review of .Net Internationalization by Guy Smith-Ferrier.  (I’d say he gave it 4 stars.)

For Web Surfers

Once a web page has been developed to render in multiple languages, what must the end-user do to select a language?  There’s a little-known feature of web browsers that handles this; In Internet Explorer, select Tools -> Options to see the Internet Options window.

Internet Explorer, Tools, Options
Internet Explorer Options window.

Click on the Languages button to show the Language Preference window.  Add your preferred language, and move it to the top of the list.

Internet Explorer, Language Preference window
Internet Explorer, Language Preference window

When I was in Montreal and Quebec, of course, I should have had French (Canadian) at the top of my preference list.

Virtual Earth for scalable applications

Monday, April 16th, 2007

Qld MSDN User GroupThis month’s QMSDNUG meeting features
John O’Brien and Bronwen Zande of
Soul Solutions
, speaking on
“Virtual Earth for scalable applications”.

In this session John will prepare you for building a truly scalable Virtual Earth AJAX website utilizing advanced web concepts and the latest tools.  John is highly active in the Virtual Earth community informally supporting the MSDN VE forum, managing the VE code WIKI and publishing VE articles.  For those not specifically interested in online mapping the session still provides an invaluable introduction to ASP.NET AJAX that is powering the next generation of websites.

Agenda:

  • Introduction and quick demonstration of Virtual Earth version 4.
  • How to build a simple Virtual Earth site in 10min.
  • The limitations of the 10min site and the architecture of an enterprise Virtual Earth site.
  • ASP.NET AJAX web services and JSON for communication with server side code.
  • Clustering Virtual Earth.
  • OO JavaScript and AJAX.
  • New JavaScript features in the upcoming Visual Studio codenamed “Orcas”.

If you have particular questions you would like answered, John would be glad to hear about them.  Go to his blog post and leave any questions in the blog comments.

Date: Tuesday April 17
Time: 17:30 for 18:00 - 19:30
Location: Microsoft Brisbane office, Level 9, Waterfront Place, 1 Eagle St, Brisbane

These details are also on our website at www.qmsdnug.org.

RSVP
An immediate rsvp by email to mike@fitzsimon.com.au will help with planning.

Where’s Chuck?

Friday, March 30th, 2007

Microsoft mate, Chuck Sterling is also going to Code Camp Oz.  He is driving down from the Gold Coast.  As I write this, he will be in Newcastle, and after Code Camp, he is driving down to Hobart.  All up, he’s going to be on the road for a couple of weeks.

Now Chuck has his mobile phone with him.  Every now and then, if it is turned on, Chuck’s phone will check in with the nearest mobile phone tower.  Theoretically, one could enquire on Telstra’s mobile phone network and find out which tower was servicing Chuck’s phone right now.  Theoretically, if one knew the exact latitude and longitude of each mobile phone tower, one could plot Chuck’s position on a Virtual Earth map of Australia.  Theoretically…

Well theorize no more!  It’s been done.  Click this link to see where Chuck is right now.  Way cool.  (In many parts of Australia, you may have to zoom out 4 levels to see aerial photos.)

More information about the guys at Power Business Systems who have built this, over at Chuck’s Blog.  (Hmmm… thinks… I wonder how much Chuck’s boss, Frank would pay for this info?)

———————
Update: Mon 2 Apr 07
Chuck skived off early from Code Camp yesterday so he could get to Melbourne in time for the overnight ferry to Tasmania.  Here he is this morning just south of Devonport, approaching Launceston, on his way to his next .NET user group meeting in Hobart.

And speaking of skiving off, where’s Chuck’s boss, Frank, this fine Monday morning?

Where's Frank?

Rego Numbers != Primary Keys

Thursday, March 22nd, 2007

Ever walked into a carpark and seen a car very similar to yours?  Same make and model?  Same REGISTRATION NUMBER??

This is exactly what has happened to Abu Dhabi blogger, Oriental Arabesque (a friend of a friend, Samer Al Ramahi in Amman*.)

The only difference in the registration plates is the background colour of the centre section.  (Software developers reading this will have fallen off their chairs at the opening paragraph.  Graphic designers will be gasping for air about now.  And speedsters will be thinking, Wouldn’t it be sweet if my speed camera fines went to someone else?)

Duplicate Primary Keys, anyone?

This is reminiscent of my experience leading a team which developed a system for my state’s Transport Department.  The system was to track taxi vouchers.  These vouchers were issued by the Health Dept to old and infirm people who were not disabled enough to need an ambulance but were unable to catch public transport to medical appointments.  Patients used the vouchers to pay for their taxi trips to hospital and drivers then submitted the vouchers to the Transport Dept for reimbursement.

Of course, each voucher was identified by a unique serial number.  One part of our system recorded the voucher number against the patient name as they were issued.  Another part recorded the voucher number against the taxi driver as they were submitted for reimbursement.

Everything went swimmingly for a few years.  At any time we could tell how many vouchers were in circulation and how old they were.  With our unique voucher number as a primary key, we could detect data entry errors and fraud attempts.  Life was sweet, until…

One day, they ran out of vouchers.  No problemo.  We’ll just print some more, they said.  Now, what number should we start at when printing the new vouchers?  I know!  Let’s start at 1!

We had to mangle our system to allow data entry of duplicate voucher numbers, but only 2 duplicates, and no more.  Data entry performance took a major hit, and we looked like the culprits.  Aaargh!

Technical papers from nutcases make the best reading

At about this time, I was also helping organise an international conference.  All these erudite technical papers come in from practitioners and academics.  These have to be reviewed, accepted and printed in the conference proceedings.  1% of these will be from pranksters who are just pulling your leg.  It’s important to spot these and weed them out.  Another 1% will be from genuine fruitcakes and these papers are the real gems.

One such fruitcake wanted to alert the world that it was dangerous to get your photo taken for your driver’s licence.  “The Government” was doing more than just taking your photo.  Yes, ladies and gentlemen, “The Government” was implanting a number IN YOUR BRAIN, right behind your forehead.  And this number was 666, the Mark of the Beast.

Now, implicit in the above assertion, was the fact that everyone got the same number.  Our programmer, Robert MacGregor (Where are you these days, Rob?) who did the hard yards on the aforementioned duplicate taxi voucher data entry programs, said “Pfft! Transport Department! That’d be right.  Everybody gets the same Primary Key!

———————
Afterthought: I wonder if the guy who was responsible for printing the duplicate taxi vouchers was banished to Abu Dhabi where he is now working in the Transport Department.

———————
* Go on, pay Samer a visit. He has recently become engaged and now shares his blog with his fiancee, “Mrs. Al Ramahi”. It’s always encouraging to know that people on the other side of the planet from different cultures have the same hopes and dreams that we do.

Building A Real World WPF (Windows Presentation Foundation) Application: QMSDNUG Feb Meeting

Monday, February 19th, 2007

Qld MSDN User GroupJoseph Cooney, speaking on
“Building A Real World WPF Application”.

For the last 7 months Joseph has been building a non-trivial application in WPF (Windows Presentation Foundation) in his “spare time”. During this time he has also developed a number of proof-of-concepts in WPF. In this talk he will share his experiences developing with this new platform.

Topics to be covered include:

  • Choosing an application type & deployment strategy, and how the choices you make at this early stage determine what features of WPF you should and should not use.
  • Structuring your WPF project in Visual Studio - what kind of artefacts you will probably want to create, and where you should put them.
  • Choosing between doing things in XAML and doing things in C#/VB.NET
  • Doing things on Background Threads
  • Troubleshooting WPF Performance issues - some starting points

See more of Joseph’s WPF work at http://learnwpf.com/.  See also Windows Presentation Foundation.

Date: Tuesday 20 Feb 07
Time: 17:30 for 18:00 - 19:30
Location: Microsoft Brisbane office, Level 9, Waterfront Place, 1 Eagle St, Brisbane
ALL WELCOME

These details are also on our website at www.qmsdnug.org.

RSVP
An immediate rsvp by email to mike@fitzsimon.com.au will help with planning.

————
Brisbane/Qld software developers may also be interested in these upcoming events:

  • Qld SQL Server User Group, Thu 22 Feb 07, Rob Risetto - SQL Server Performance Analysis
  • Code Camp Oz - Charles Sturt University, Wagga Wagga, Sat 31 Mar & Sun 1 Apr 07 - I’ll be there.

Debugging Access “Permission Denied” Errors

Thursday, January 11th, 2007

One of my clients had a customer with server somewhere in rural Victoria.  A user (let’s call her Sue) had been running an MS Access 2003 application for years when it suddenly started throwing “Permission Denied” errors.

The Problem

Most of the application worked just fine.  On each form, Sue could navigate through the underlying recordset via the navigation keys; so there was no problem accessing the data.  However, when she tried to select a record via a combobox, she received the “Permission Denied” error.

Typical Access form equipped with a combobox to quickly select a record.
Typical Access form equipped with a combobox to quickly select a record.

My client had checked all obvious user login and file access permisssions.  All seemed in order.  He then asked me to have a look at it.

Investigation

My first check was the Access database permisssions. Nothing fancy there.  Any strange record locks? Nope.  Concurrency issues? Nope.

Interestingly, the application worked just fine when logged in as an administrator.  It was only when Sue tried to navigate via the combobox that there was a problem.

Debugging through the code revealed this in the combobox’s AfterUpdate event handler…

Private Sub cboSelect_AfterUpdate()

    ' Find the record that matches the control.
    Dim rs As Object

    Set rs = Me.Recordset.Clone
    rs.FindFirst "[CustomerId] = " & Str(Nz(Me![cboSelect], 0))
    If Not rs.EOF Then Me.Bookmark = rs.Bookmark

End Sub

There must be 60 million copies of this code spread around the planet.  It is generated by the combobox wizard whenever a new combobox is dropped on a form and the developer selects the “Find a record…” option.  There can NOT be anything wrong with this code.  Each of us has done this about a thousand times.

This looks like a job for FileMon !

At this point, we started using FileMon to see which files were being accessed at the time the error occurred.  FileMon monitors and displays file system activity on a system in real-time.

We discovered that the Permission Denied error happened exactly when Access tried to read the DAO360.DLL.   In the code above, rs could be either a DAO or an ADO recordset, depending on which libraries are referenced.  In Sue’s application, DAO was used.

Normally, DAO360.DLL is stored in some common location where it is readable by all users.  Typically, C:\Program Files\Common Files\Microsoft Shared\DAO\DAO360.DLL.  However, on this server it was stored in C:\Documents and Settings\Tom\...

The Cause

Now we could see what had happened to “break” Sue’s application.  Tom had recently installed a new Access application which required an upgraded DAO.  Not being a system administrator, he had installed the DAO360.DLL in his own Documents and Settings folder.  Not surprisingly, Sue didn’t have permission to access anything in Tom’s Documents and Settings.

And when we checked with both Tom and Sue, the date of Tom’s installation was around the time Sue first noticed her problem.

The Solution

The solution was to use regsvr32 /u to unregister the DAO360.DLL.  We then moved it to a more accessible location and re-registered it (again, with regsvr32.)

Process Monitor

Note that on recent versions of Windows (Windows 2000 SP4, Windows XP SP2, Windows Server 2003 SP1, Windows Vista), Filemon and Regmon have been replaced by Process Monitor.  This was released in November 2006.

Scaling to Multicore: .NET Concurrency Best Practices

Tuesday, December 12th, 2006

Qld MSDN User GroupTONIGHT, One Night Only !!!
Joel Pobar
, speaking on “Scaling to Multicore: .NET Concurrency Best Practices”.

Always an enthusiastic and informative speaker, former Microsoftie Joel is widely-known for such remarkable programming feats as “Writing a compiler in an hour”.  (I saw him do this, with Dominic Cooney, at the first CodeCampOz.)

In tonight’s session, Joel will take us through the concurrency features available now in the .NET Framework 2.0.  He will recommend a number of best practices including how to handle shared memory locks.  Joel will finish up with a brief preview of new language features, currently available in beta.

As Joel says on his blog, Bring your “scale my app across a bazillion cores” questions with you. 

(more…)