JCooney.NET

Joseph Cooney's Weblog

NAVIGATION - SEARCH

No-longer a Windows Client Development MVP

Since 2007 every April (April 1st to be exact) I’ve received an email letting me know I’ve been recognized by Microsoft as a Microsoft Valued Professional (MVP) in client application development, primarily for my contribution to the Windows Presentation Foundation (WPF) community. It came as no surprise, but with a small amount of sadness, when I received no such email this year. I say “no surprise” because it has been about 2 years since I’ve done anything significant with WPF (and, as one of my colleagues said, it’s been a bit longer than that since Microsoft did anything with it, unless you count abandonment as “a thing”). My strategy has shifted, as they say in the trade, to single-page applications with libraries like Knockout.js and Angular, to Sharepoint, to Android development, with lots of ASP.NET MVC thrown into the mix. Ironically it looks like Microsoft might be finally stepping up to address some of the issues with WPF (mostly to do with performance) if their recent job ads are to be believed. I’m planning on keeping learnwpf.com going, and posting anything interesting I come across with WPF.

You’d probably expect I’d have lots of sad farewells to say to on the WPF team at Microsoft, and in the WPF community, but I haven’t. Most of the people I know, or know of who were on the WPF team have moved on. Many of them are working evangelising the “other” rich, fast multi-media UI platform that is kicking a lot of goals lately – chrome. The product team never engaged with me in much capacity – occasional Microsoft live meetings at 3.A.M. which I never really made the most of. Locally DPE’s focus on evangelizing emerging technologies (AKA what they’ve been goaled on for this quarter), and living and working in a city where they have no real presence means there won’t be any sad farewells or commiserations from that quarter either.

The software development ecosystem is a vastly different, and more heterogeneous one from 7 years ago when I became an MVP. Its time to remind myself that first and foremost I am a developer, not [just] a Microsoft developer.

The Future of M# and Organisational Politics

It’s new year’s eve, so naturally I’m at home by myself drinking Veuve Clicquot and thinking about software development. I was interested to read about the new research language announced by Joe Duffy, which he dubbed ‘C# for systems programming’ but which I’m calling M#. This resulted in a lot of comments, both on Joe’s blog and speculation around the web. Rather than focus on the technical aspects of the language, which is ill-suited to one who has ingested a bottle of Veuve Clicquot, I’d rather focus on the organisational politics surrounding the announcement of M#, and the future of Midori.

But first, a bit of history. Midori is a skunk-works operating system project that grew out of MSR’s Singularity operating system/tools project. It is managed code all the way, with the goal of being highly dependable and verifiable. It was made up of a small, but star-studded team. Joe Duffy, who wrote the original prototype of plinq in a week-end, Chris Brumme, the VM guru MS hired from Oracle back in the day for a signing bonus of $1M and a Porsche 911, who knew everything about the CLR and then ‘went dark’ about 9 years ago. WPF Maestro Daniel Lehenbauer, and quite a few others. Midori existed outside the normal Microsoft divisional structure, but was instead run by Eric Rudder who reported directly to Steve Ballmer.

Fast forward to now-ish. A few weeks ago Eric Rudder moved to the newly created role of Executive Vice President of Advanced Strategy, and Midori has been moved into Terry Myerson’s Unified Operating Systems Group, AKA the Windows Division. So far all of this is stuff you would have seen in Mary-Jo Foley’s excellent article on the subject, but the thing that MJF doesn’t say, and which I think is really key when considering the future of M# and Midori is the history of the Windows Division. The Windows Division HATE managed code. HATE, HATE, HATE. C++ and Javascript are the languages of the Windows Division. Every since they got burned by Managed Code in longhorn, and had to scrap a few years of development work, and re-set on top of the server 2003 code-base, the Windows Division has been strongly against managed code.

Lets also consider what Midori was setting out to achieve – replacing windows – something the folks on the Windows team are somewhat enamoured with.

From Mary-Jo’s Article:

Myerson's OS group is going to be determining which parts of Midori have a place in Microsoft's future operating-systems plans.

I suspect the conversation would be discussing the relative merits of suffocation with a pillow, or stabbing with a knife. I could be wrong here – Terry Myerson’s past in Windows Phone, which uses .NET heavily for its programming model, might make him more sympathetic to managed code, but I wouldn’t count on it.

Happy New Year

veuve

A Random List of Cool and Useful Stuff

http://visualping.io/ – I wanted to use this to check for the availability of the nexus 5, but due to the location google things the site is coming from the devices section doesn’t show up. Still, a cool idea.

visualping

http://tympanus.net/codrops/category/playground/ – a collection of cool HTML5 demos. Animating check-boxes, slide-down combo boxes, sidebar effects etc.

effects

CLink – makes windows command-line better. Command-line probably doesn’t require a screen-shot.

HTML5 Admin Template – built on boot-strap, very slick-looking.

admin

Exception Breaker – toggle on/off ‘break on all exceptions’ in VS quickly.

exception

LiceCAP – weird name, cool utility for doing screen recordings as animated GIFs on Windows or Mac.

Solving SharePoint’s Worst Problem

By any measure SharePoint is a big success – it is used by 100+ million users around the world, and generated (in 2009) over $1.3 billion in revenue for Microsoft (while they were still letting on how much money it was bringing in). 78% of fortune 500 companies use SharePoint, and the platform adds about 20,000 new users to its ranks every day. Ask anyone who’s had to develop or support SharePoint and they’ll tell you it isn’t without its shortcomings. Re-skinning it is a pretty big undertaking, and up 2013 it was pretty terrible on mobile browsers. As a development platform it consistently fails to win the mindshare of other (more generalist) web platforms like Ruby on Rails, ASP.NET MVC, or Node.js. There are no sexy start-ups featured on the front of Hacker News that are building on top of SharePoint. Once it is in production things aren’t much better – while smaller SharePoint sites can run happily on a spare workstation your larger SharePoint deployments are going to need specialist care and handling. While many of these things can be problems I don’t believe any of them comes close to SharePoint’s biggest issue –

finding things in SharePoint is much harder than it should be.

No doubt there will be people out there who have great success finding data in their company’s expansive, well ordered, curated, and taxonomically correct SharePoint deployment. You folks can probably finish reading now, because I doubt you’re going to agree with anything else I have to say, but before you go know this - you people are not the norm. I’ve worked in far too many places to believe anything other than this:

SharePoint search as it currently stands is broken.

How many of these seem familiar?

  • Launching a search in SharePoint, scanning through pages of identical-seeming items, all of which seem to be related more to SharePoint’s inner workings and structure than the information you want to find.
  • Searching for keywords you know should return some results, but getting nothing.
  • Searching in vain for several minutes, before having to email the person you think created the document, asking them to send you a link.
  • Searching, and getting errors every time.

After a friend pointed out to me just how bad this experience was I was amazed I hadn’t recognized it as being that bad before, but it was. After sitting down with a few friends and brainstorming some things

we decided we’d try to fix it. I think we succeeded.

We built an extension to SharePoint that fixes as much of the search experience as we could (we have quite a few more ideas of things we’d like to go after). It is easiest to describe (like so many other things) using the power of animated GIFs, so here goes.

infotext Demo

If you’re interested in trying out Infotext please visit www.infotext.com and get a trial license key. I’d love to hear your feed-back.

Good Developer, Good Googler

or Why Sigmund Freud is right, and Scott Hanselman is wrong.

The prodigious Scott Hanselman recently wrote a blog post responding to a question posed to him – are we really developers anymore, or just good googlers? While Scott touched on a number of things in his response, including the imposter syndrome that affects many people, myself included from time-to-time, one thing he said really struck me as wrong. Wrong enough to bring me out of 4-month-long blogging hiatus. This is what Scott said:

Third, try programming for a day without Googling. Then two days, maybe a week. See how it feels. Remember that there was a time we programmed without copying our work.

While I guess _trying_ something and reflecting on how it went can be a good course of action, it is not always the case “try cutting your wrists and sitting in a warm bath for a few minutes, a few hours. How does it feel?”. Before we head down this road of no googling lets think our strategy through a little. Are we going to start war-dialling the internet and hope that we come across something relevant? Are we going to hit the books instead? If so, are we going to read the book cover-to-cover, or look things up in the index? Isn’t looking something up in the index of a book just a horribly antiquated version of performing a very limited google search? Or are we going to ignore ‘prior art’ altogether? Imagine the following hypothetical conversation between us, and the owner of the small software consulting firm we work for:

Owner: Thanks for coming in at short notice. I’ve just gotten a call for $CLIENT you’ve been out on-site working for. I know you’ve got a great relationship with them, and you’ve done a lot of great work there, but they gave me a call earlier today, and said the standard of your work has been suffering a lot in the last two weeks. They said you’ve only delivered a fraction of what you’d both planned on. Is everything OK?

Us: OK? Everything is great! I decided two weeks ago instead of looking things up on the internet I was going to do everything from first principles. I spent most of the week writing a concurrent dictionary in C# using a lot of the data structures and concurrency theory they taught me at college. It’s been hard, and there are a few bugs, but I think in a few more weeks it will be ready to add to the project.

Owner: I see. I haven’t been too ‘hands on’ for a while, but isn’t there a ConcurrentDictionary they added in .NET Framework 4.0?

Us: You might be right.

Owner: So….just so I’m clear on this – you spent two weeks re-implementing something that was already in the .NET framework, because you unilaterally decided that building things from first principles, rather than searching for existing information on a problem was somehow “better”.

We’re all ultimately accountable to someone for how we spend our time - other founders in a start-up, team-mates and managers if we’re white-collar slaves working for “The Man”, our clients if we’re freelancers or maybe just ourselves [1]. I think wilfully ignoring all the world’s information that has been organized, and made universally accessible and useful, so you can feel better about your prowess as a programmer is crazy.

freud

Freud, who knew a thing or two about crazy, in his 1930 “Civilization and its discontents” hit the nail on the head:

“Man has, as it were, become a kind of prosthetic God. When he puts on all his auxiliary organs he is truly magnificent; but those organs have not grown on to him and they still give him much trouble at times.”

The Internet and the google index are the magnificent auxiliary prosthetic organ that gives us programming super-powers, in much the same way that the atomic bomb is the prosthetic organ that gives humanity the god-like power to destroy the planet. All the same arguments you can make about not using google you can make about every other advancement – intellisense, syntax highlighting, IDEs, high-level languages, integrated circuits, electricity, the steam engine, mathematics, iron, agriculture, language. It is natural that the organs have not grown onto us perfectly yet, and that we, to quote Freud again “do not feel happy in his God-like character”.

[1] - A self-employed person, with no dependents, working on a project for themselves with no deadlines, which is a vanishingly small % of working programmers.

3 gotchas I discovered calling Postgres (esp. from C#).

I’ve always been interested in Postgres – it never seemed to be quite as crazy as MySql, and since I’ve used Access (LoLWUT?), Ingres (party like it’s 1989), DB2 (meh), Oracle (and the difference between god and Larry Ellison is…), SQLite (awesome!), ESE (key-value FTW), SAPDB (why?), MySQL (how did this ever become popular?), different versions of SQL Server, and a few I don’t quite recall at various times I thought I’d give it a try. Here are few gotchas that tripped me up, considering my primarily SQL Server background.

#1 The user-name in the connection string for the otherwise quite awesome looking npgsql seems to need to be lower-case. I created the login via SQL as PascalCase. When it showed up in the pgAdmin III tool it was all lower-case, so maybe it is Postgres’ fault…not sure.

#2 Database functions execute by default with the rights of the Invoker. You can change this with a little bit of extra stuff in the create function statement, by switching to SECURITY DEFINER instead of SECURITY INVOKER (the default). In the MS SQL Server world stored procedures (the closest analogue to Postgres functions) run with the security rights of the creator.

#3 When calling pg_get_serial_sequence to get the name of the sequence that is defined for a serial column I had to double-quote the name of the table like this, which I found slightly odd:

select * from pg_get_serial_sequence('"<table name>"', 'Id')

Otherwise all pretty cool and straightforward.

Mac Mini Upgrade, the Australian Way

I recently decommissioned an old laptop, and salvaged 4GB of laptop ram out of it. Having no other good use to put this to, I wondered if my iTunes isolation mechanism (a very early Mac mini) might be able to be upgraded to Mountain Lion if it had enough ram – it was currently running snow leopard, had a dual-core CPU, all that seemed to be missing was and additional 2GB of RAM, exactly the same kind of RAM I’d just taken out of the decommissioned laptop.

Unfortunately early model mac minis weren’t built to be serviced anywhere outside of factories in china where they were also assembled. Step 1 involved prying open the case with a paint-scraper or similar device. Not having a paint scraper, and not wanting to wait until the effects of whisky wore off, and the realization that I was risking wrecking a good machine for no real gain dawned on me I pressed on with the most similar tool I had to hand – a barbie mate. The brushed aluminium case and the stainless steel sure looked good together.

prying-open-the-case

It worked, after a fashion, and after several other harrowing steps the upgrade was complete. I turned it back on and the machine still worked, but unfortunately the upgrade to mountain lion was prevented by the lack of 64-bit BIOS (I believe – it was never able to boot into 64-bit mode, and I’m going to chalk that up as the cause). Oh well, at least iTunes has a bit more RAM to play with now.