Archive for the 'Microsoft' category

17
Apr

Four Windows apps for home-sick Mac users

Libra (like Delicious Library)

Delicious Library is a DVD, game and book organisation tool I've been using since my PowerBook G4 and a 2.0 version has been dangling from Wil Shipley's mouth longer than I care to remember.

Windows users however will find Libra a very interesting clone and it features some of the same great features such as bar-code scanning via a web cam, tracking loans, a rendered virtual shelf and fast queries.

Unlike Delicious Library 1.x it also features sharing your library on-line, tweaking the types and rendering and a more advanced query engine and is available free for non-commercial use.

E Text Editor (like TextMate)

TextMate is a programming editor for the Mac that can be extended through the use of Bundles to provide additional syntax highlighting, menu options and command processing. It is fast, feels lightweight and therefore incredibly customisable all of which contribute to it's success.

E Text Editor is a Windows clone of TextMate that doesn't just mimic the user interface but also provides compatibility with TextMate bundles allowing you to take advantage of some of the many great enhancements available and at $34 is almost half the price although it doesn't feel as snappy as it's Mac counterpart.

Digsby (like Adium)

Adium is my instant messaging client of choice allowing me a single app to manage MSN, ICQ and Google Talk (I wish they would get basic Skype support in there too).

Digsby provides similar functionality whilst also throwing social networking (Facebook, Twitter) and email notification (Hotmail, GMail, Yahoo Mail etc.) into the mix.

Dash (like Quicksilver)

QuickSilver provides a quick keyboard-based entry system for performing a wide variety of tasks and selections within Mac OS X and what it doesn't do can often be added with plug-ins.

Dash achieves a similar effect on Windows but I have to admit I'm not really sold on either yet. I think the movement from keyboard to mouse and back every now and then must be a good break for your hands if not for your productivity...

[)amien

02
Apr

Windows 2008 Server on my MacBook Pro

A troublesome disk (a story for another time) has forced me to reinstall my MacBook Pro and review my Windows partition.

My Boot Camp partition was running Vista Ultimate x86 which felt sluggish, ignored the last 1GB and bugged me with UAC. One Windows update kept failing to install which also prevented SP1 from completing.

Apple's Boot Camp doesn't support 64-bit Windows (except on the Mac Pro) and my 64-bit experiences have been unpleasant so far (no Flash for IE x64, limited 64-bit shell extensions, Live! refusing to install, drivers etc.) The increased x64 memory consumption would also be an issue when running in a 1.5GB virtual machine via Parallels or VMware Fusion.

Windows XP was one option but losing IIS7 and DirectX 10 would see me reinstalling Vista within weeks so I decided to try Windows 2008 Server x86.

Boot Camp happily accepted the 2008 Server x86 CD where I chose the BOOTCAMP partition, formatting it as NTFS and electing for a standard installation. The Boot Camp drivers subsequently installed without complaint, all 4GB of RAM was accessible and there are no 64-bit compatibility issues.

Microsoft are giving away 1 year evaluation copies of Windows 2008 Enterprise Server x86 as part of their Heroes Happen Here launch program for Windows 2008, SQL Server 2008 and Visual Studio 2008 if you don't happen to have an MSDN subscription to hand. There are however a few tweaks you need to do to get a more desktop-like experience:

Install desktop features

Head into Server Manager and Add Features then choose Desktop Experience to install Windows Media Player, Aero etc.

Go into Services and set the Themes service to Automatic and Start it to make themes available and then choose Browse... from the Theme Settings in Personalisation to select %windir%\Resources\Themes\Aero.theme

Install wireless networking

This one had me stumped for a while as I thought my wireless card/drivers weren't working. The reality is that 2008 Server has wireless networking removed by default so head into Server Manager > Add Features > Wireless LAN Service to install it.

Enabling hibernate

Open a command prompt and enter:

powercfg.exe /hibernate on

Remove annoying shutdown

Head into the registry to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Reliability and change the ShutdownReasonOn DWORD key to 0.

Relaxing local password policy

A controversial change I'm sure but I'd rather choose something complex and unique that will last 90+ days than something memorable every 30. Head into Local Security Policy > Account Policies > Password Policy > Maximum password age and change it to something more reasonable.

Going further

A great guide with screen-shots on additional tweaks for a more workstation-like experience also exists - wish I known about that earlier!

Simone Chiaretta has highlighted the that tap-to-click is absent and there are some Bluetooth issues stemming from missing drivers.

[)amien

01
Apr

Joining the LINQ to SQL team at Microsoft

I've been quiet on my blog lately largely because I have been preparing to change job and relocate half-way around the world to Vancouver in the beautiful province of British Columbia (where I spent my 2004 summer holiday).

In February I travelled out to Redmond for three days of interviews (one position grew to two, then three). Having read the Microsoft Jobs Blog I was prepared for long hard days but in reality the process was incredibly enjoyable and exciting.

So much so I wanted to find a desk and move in right then.

With some luck I also found myself at Hanselman's geek dinner which involved some great discussions and the chance to meet Scott himself, Brad Wilson and Nikhil Kothari who I knew from .NET on-line community as well as some 35 other developers from both within Microsoft and the outside world. It was one fun evening and my thanks go to Scott for kindly driving me back to my hotel in Redmond town centre.

Many white-boards and a few lunches later (including an unexpected one with Phil Haack, Nikhil and two more guys from ASP.NET team - I wish I could remember all the names of the people I met!) I found myself with the hard task of choosing a position.

I settled on a developer role within the LINQ to SQL team starting mid-May and am counting down the days...

[)amien

19
Mar

Visual Studio, Windows Server and SQL Server 2008 launch in Guernsey

The various Heroes Happen Here community events in the UK/USA to celebrate the launch of Visual Studio 2008 etc. made me envious that we don't get such events and goodies here on the little island of Guernsey so I thought I'd so something about it!

We at the Guernsey Software Developer Forum are hosting a community event in conjunction with Microsoft to celebrate the launch of Visual Studio 2008, Windows Server 2008 and SQL Server 2008.

The event starts at 6:30pm on March 27th (next Thursday) at La Rocquettes hotel in St. Peter Port, Guernsey.

We will be giving away a bunch of goodies including the Heroes Happen Here launch packs with promotional copies of Visual Studio 2008 Standard, Windows 2008 Enterprise Server and SQL Server 2008 Developer as well as demonstrating some of the new features of Visual Studio 2008 and .NET 3.5.

Heroes Happen Here launch event

I'm hoping this event will be bigger than normal GSDF events given the cool stuff we are giving away and the interest from non-developers in Windows 2008 and SQL Server 2008 so tell your friends (if you're in Guernsey of course)

[)amien

28
Feb

DLookup for Excel

I had to do a couple of ad-hoc Excel jobs today and found that whilst Excel has a VLookup function for spreadsheet/ranges it doesn't have one for databases.

It's been a while since I touched VBA and Access but the DLookup function was quite useful so here it is for Excel. Read the warnings below before you use it!

Public Function DLookup(expression As String, domain As String, criteria As String, Optional connectionString As String)

    Dim con As ADODB.connection
    Set con = New ADODB.connection
    If IsMissing(connectionString) Then
        con.Open "Driver={SQL Server};Server=abc;Database=def;Trusted_Connection=Yes;"
    Else
        con.Open connectionString
    End If

    Dim rs As ADODB.Recordset
    Dim sql As String
    sql = "SELECT TOP 1 " + expression + " FROM " + domain + " WHERE " + criteria
    Set rs = con.Execute(sql)
    If Not rs.EOF Then DLookup = rs(0)
    rs.Close
    Set rs = Nothing

    con.Close
    Set con = Nothing

End Function

Copy and paste the code above into an Excel module and replace the "Driver=... with what you want to be your default connection.

Some examples of use:

To select the Name column from the Customers table where the numeric ID is held in column 2.

=DLookup("Name","Customers","ID=" & A2)

To return Forename and Surname columns joined together with a space from the Contacts table in the crm database using the postcode from column 5

=DLookup("Forname + ' ' + Surname","crm..Contact","PostCode='" & A5 & "'")

To return Description from a Products table held in another connection using a partial like match from column 1:

=DLookup("Description","Products","OrderCode LIKE '" & A1 & "%'", "DSN=SecondaryDSN")

I think you get the idea!

There are a few caveats you need to be aware of using this function:

  • It only returns the first value of the first row
  • DLookup's are not efficient opening a connection each time it is referenced. This could put a lot of strain on your server.

  • DLookup syntax is open-ended and has some attack vectors.

If that doesn't scare you then give it a shot. As usual no warranty expressed or implied!

[)amien

18
Feb

Microsoft opens Office binary file format specifications

Microsoft have released the binary file format specifications to their Office suite (the XML ones are already published) under their Open Specification Promise.

I am not a lawyer but as far as I understand this means you are free to implement the standards with a promise that Microsoft will not use any patents under its control that are required to implement the specification against you.

Hopefully Apple will now address Keynote's PowerPoint support bug so exported PPT's works with Office 2007.

Now that the .NET Framework 3.5 source is available (for reference) and Scott Guthrie (now VP) announcing the MVC framework will be user-buildable and patchable (not redistributable) and include project templates for a number of open-source testing frameworks the future is looking very rosy.

[)amien

26
Jan

What being open means to Apple & Microsoft

Apple

Former Apple engineer Jens Alfke believes Apple's external image has been polished until featureless. The restrictive staff blogging policies, the veil of secrecy around future plans and a carefully orchestrated three-person spokes-team of Jobs, Schiller and Ive lead to a very impersonal closed business.

It certainly wasn't always this way. The original Mac team appeared in Rolling Stone magazine with credit in about boxes, a practice that was continued at NeXT but abolished by Mac OS X Beta. Jobs makes regular comparisons between engineers and artists and touted individual thinking in the Think Different campaign and artists like recognition with signatures on art and credits on film.

Conversely Apple's Mac OS X operating system is built on open software and standards. The kernel is derived from open elements bundled up as Darwin which Apple provides back along with compilers, debug tools, programming language, command line tools, Bonjour, device driver kit and a bunch of drivers. All are open.

The web rendering technology in Safari (WebKit based on KHTML) is also open and changes rolled back to the communities often reveal unannounced insights into Apple's plans (e.g. Safari for Windows).

And yet how many engineers write or talk about Apple? Do you know the names of any product managers? Could you find any out with Google? (LinkedIn doesn't count ;-)

These aren't academic questions, what if you have a great idea for a feature you'd like to see added? How can you discuss how a product could evolve to fit your needs? What about a simple bug report or advanced access to technology? (The answers are "send it to feedback@apple.com and don't hold your breath", "you can't" and "join the developer program")

Heaven forbid you do actually find out what their plans might be - you could find yourself talking to their lawyers like the ill-fated ThinkSecret site that featured rumors, speculation and the occasional insider info.

Microsoft

Jens makes a passing mention to Microsoft's relaxed blogging policies.

Microsoft is a company that rarely provides the source, never ships or builds upon existing free software and yet not only discusses plans and roadmaps but actively solicits feedback in the design process through conferences, user groups, forums, mailing lists and even on-site review teams. Employees such as Scott Guthrie and Brad Abrams have become quite well known within .NET communities often being the first to break announcements and provide quick feedback through their blogs.

The centre of this effort is engineering thanks to sites like Channel 9 providing regular interviews, Microsoft Research providing experiments to play with and CodePlex hosting open projects.

But they aren't the only ones reaching out.

Microsoft's HR & recruiting team and individuals are also putting up interesting insights and thoughts on how the company operates and head of the Xbox Live! is so active in this area that the name Major Nelson is known to any serious 360 owner.

Being open

How strange that Apple embraces open technologies yet keeps communication closed and Microsoft's technologies are still quite closed yet communication is very much open.

What does it mean to be open and where will each company's approach lead them?

[)amien

17
Dec

When SQL Server replication eats disk space

Part of my job involves revising our SQL Server architecture. My plan includes the addition of a read-only reporting SQL pair for non-critical enquiries and reports. This allows the heavy and unpredictable load from reporting away from from the primary SQL pair responsible for critical operations (shipping orders).

We utilised SQL Server's publisher-subscriber replication on the required databases which, given their legacy nature, had some cross-database dependencies that were added without due consideration.

The reporting SQL pair needed to be rebuilt so the subscriptions were removed whilst they were being rebuilt. Within three days our primary servers were out of disk space and we had a problem that needed to be solved quickly.

Our first step was to remove the new publications. This released a small amount of space in the distribution database (now 100GB) and allowed the replicated databases logs to be truncated and shrunk. We now had a little breathing room.

One publication would not remove in a reasonable time (10+ hours) and even trying to remove individual articles caused a slow-running operation sat on PAGEIOLATCH_SH (which Microsoft describe as waiting on disk IO). A quick investigation revealed a complex query on internal system tables with no indexes - presumably for fast insert performance.
In the mean-time this slow-running operation would block the replication agents which are also used by IBM's DataMirror product to replicate data back to the iSeries (AS/400) in real time. This blocking would prevent us shipping orders and was therefore unacceptable.

The database in question is a home-grown data warehousing application rebuilt each night and on reflection was a terrible idea to replicate using this method. Each night it generated over twice it's own size in replication activity. Given we have a 72 hour replication retention and the size of the database that alone was enough to wipe out the disk space on our server within 3 days.

Reinitialize All Subscriptions was the magic bullet which ran in just a minute allowing the publication to be subsequently instantly deleted. The replicated databases transaction logs were then truncated and shrunk giving us ample breathing space on the storage front.

The distribution database was still huge but heading into Replication Monitor's Common Jobs and starting the Distribution clean up: distribution job was our final step.

The job might take all day but did not block any other replication activity :)

[)amien




Feed subscription

Subjects