Microsoft applications

Synchronised computing

For those people who have more copies of Windows than actual windows in their house, keeping the computers running in sync can be a slight chore. Generally, the more geeky Internet based things you use the easier it is. However even in these Web 2.0 days of Google Spreadsheets et al., most people can't get away with not storing anything actually on their own computer.

To solve this dilemma, there is such a thing as remote desktops, where a computer can act as a remote terminal insomuch as when you log in to computer 1, you're actually accessing stuff on computer 2. Guaranteed sync. However, assume you have a laptop and a desktop. You want to have the ability to not only sync the two, but when you leave the house, both computers should have the capability of working independently simultaneously, but any changes made to their files back over each other at some point in the future.

Syncing from Palm tasks to MS Access

Next up, the Poorhouse wanted to try some 2-way sync action with the Palm task (aka todo) list.

Being slightly familiar with MS Access, it was decided we'd sync the Palm tasks to an Access equivalent. Hopefully this would provide a good framework to sync them to anything else, as just the code involving the Access API would need to be replaced.

First we needed some synchronisation logic. Some methodology is required so that the sync works; tasks added in either database are added to the other, same with deletion and editing. Moreover, the correct action needs to be done - if two records don't match, which one do we go with?

Avoiding the 401 authorization required error with Google calendar API

Using the previously-described procedure to interact with Google Calendar's API from Visual Basic 6 led to a seemingly strange phenomena at first.

Whilst trying to add an event for the first time, during the second POST operation (which includes sending the Auth code to http://www.google.com/calendar/feeds/default/private/full) rather than the event being added, Google replied with a 401 Authorization Required error like this:

HTTP/1.1 401 Authorization required
WWW-Authenticate: GoogleLogin realm="https://www.google.com/accounts"

Using Google Calendar API via Visual Basic 6

Google Calendar is a lovely looking and acting "free online shareable calendar service", allowing you to maintain your personal schedule, share it with others, and view public calendars.

Google has also provided an API such that your programs and websites can make use of it remotely; for instance to view, add or delete events. There are special client libraries to let you use it from the Java or C# .NET programming languages. It also supports communication via standard XML, to allow any other suitable language to get involved.

Running your first conduit

Once your environment is all set up, now we can try out a test conduit to make sure all is well. If so, you will be ready to start developing your own conduits.

A good test conduit called "SimpleDB" is provided as a sample with the CDK. This is an example of a conduit that interacts with memos. Rather than syncing your memos between Palm and Desktop, this one will display a form and allow you to search for the count of memos that include a certain word. Possibly not the most useful thing to do, but if it works you will know your conduit development is ready for you to use to make something that is the most useful thing to do.

Setting up the Palm conduit programming environment

To start developing your own conduits, first you will probably want to get the Conduit Development Kit, which gives you the libraries to interact relatively easily with your Palm. It is freely available from here PalmSource's Palm OS Developer Program, although you will need to register on that site (for free) first. There are currently two versions of the program for Windows (and one for Macs), 4.03 and 6.01. I went for 6.01.

Download and install. Also get any updates / bug fixes from that page, and install as appropriate.

Programming Palm conduits

In a particulary geeky manoeuvre, the Poorhouse has decided to learn the arcane technique of building a conduit to interface between Windows and a PDA running the Palm OS. Conduits are the type of software that ensure that your lovely shiny palmtop and desktop PC synchronise such that they have the same contacts, memos, events, news and so on.

It didn't turn out to be the simplest of tasks; the documentation for getting started didn't seem to make the early steps trivial at all. As such, this section will detail a few notes about how I got started in case either I need to do it again, or anyone else is in a similar situation.

Visual Studio for free

Don't know if the Poorhouse is just the last one to notice anything but it seems Microsoft are offering a cutdown but still useful version of Visual Studio 2005 and SQL Server 2005 for free, under guise of the Visual Studio Express editions.

The package includes:

  • Visual Web Developer 2005 Express Edition
  • Visual Basic 2005 Express Edition
  • Visual C# 2005 Express Edition
  • Visual C++ 2005 Express Edition
  • Visual J# 2005 Express Edition
  • SQL Server 2005 Express Edition

The Notepad conspiracy

Windows users may regularly rejoice in the minimalist beauty of the built-in Microsoft Notepad, but who would have thought it was part of a US Republican Conspiracy to hide the truth behind the Bush administration's actions?

Sceptics - try this:

  1. Open a new Notepad document
  2. Type in the following sentence without the quotes "Bush hid all the facts"
  3. Save and close
  4. Reopen the file in Notepad. Notice how yet again there has been a cover-up to hid the dirty political truth.

(If you really want to know how Notepad has been owned by the Bush cabal, read on for the disappointing truth.)

Run-time error 13 and recordsets in Access

Access VBA and its cryptic error messages eh? Run-time error '13': Type mismatch is probably not unfamiliar to most Access aficionados. And to be fair, it even makes sense semantically. If you're mucking up your data types, you'll see it. If you're foolish enough to try and use numbers where strings are needed, booleans where dates are required and so on, you're asking for it.

Where it can become cryptic is in some of the object libraries, especially when two or more libraries have objects with the same name. A very common example of this is a Recordset.

Syndicate content