Scoop: Microsoft Expression Suite To Run On Apple Computers!

Have just returned from tech.ed (Australia) with an awesome scoop to share. Discovering this fact was one of those slow motion moments when the hero gets shot -- so obvious yet so far-reaching.

The Expression Suite of tools were designed to be run on apple from the very first moment. The ramifications of this are bigger than big.

The information was extracted from various MS people, occasionally using Veritaserum (read 'alcohol') where needed. (Note also that many MS people I spoke to knew nothing about this, and had not even heard of the rumour)

There is currently a 'super secret' project underway at Microsoft, to put together the underlying cross-platform framework necessary to enable the Expression suite of products to run on Apple Computers. Seamlessly, natively, super fast, beautifully.

This is a huge 'tell' in terms of microsoft's future direction and strategy as a company.

I see it as Microsoft accepting, at the highest levels, that they've lost the API-war -- and hence aiming to redefine the battle ground for where the future profit centres for their software company will be. They're looking beyond operating systems, and clinging to the source of all their successes to date: a strong developer focus.

But Wait? Aren't Operating Systems Great?

Hello 1995? This is 2007 calling -- we want to show you Windows Vista. OS's are too expensive to build, too hard to deploy, far too hard to update, and impossible to secure.

If developers on every platform, every medium, in every language and every device -- be it apple, windows or linux -- be it desktop, server, or web -- be it ruby, python, angle brackets (Html/XML/Ria), squiggly brackets(C/Java/C# family), or begins and ends (VB) -- if all developers and all designers are using microsoft tools to build their software, then microsoft can branch out, moving beyond OS development and ensuring they are the dominant force in tomorrow's software as well as today's.

Eat that google, apple, ibm, java, etc.

This is big thinking, strategic stuff.

Disclaimer -- I don't want to get anyone in trouble. Everyone who spoke to me did so under a veil of 'plausible deniability'. I ensured them that no one would believe me, so they were free to speak their mind. Ssad, but true, and like a typical, terrible, journaliste I agreed not to unveil my sources. Don't ask. Note also that Visual Studio won't run on Apple computers, just Expression Blend et al. We're happy to accept xaml from the black skivvy wearing apple using auteurs... but code? no thank you... For now... (You don't want to know what's coming after 'Rosario'... hint: who's for a Browser-Based IDE?)

 

Sorry Visual Basic -- I is through *WITH* YOU!

I've always had a soft spot for visual basic.

Sure it's verbose. (verbose, like XML, is evil.)

Sure it feels patronising to say "nothing" when you really mean "null".

Sure some of the default settings were criminally stupid.

Sure VB over uses the round brackets, like they're good enough for parameters, arrays and generics all at once, yet makes no clear distinction about using them for method versus property references... then mis-uses the angle brackets for crazy non-XML stuff like attributes.

But it has background compilation, and -- smarter still -- it has the with statement.

The with statement is way cool.

With is like the (not yet invented) Context Driven Development which will give us a further 46% productivity gain. (Eat that, smug lisp weenies!)

Yet with just bit me bad -- turns out there's something fundamental i didn't know about with...

Say you have an object variable you've already declared:

Dim builder As StringBuilder

While it's fine to write this:

builder = New StringBuilder
With builder
    .Append("Fred")
End With

It's not fine to write this:

With builder
    builder = New StringBuilder
    .Append("Fred")
End With

The latter returns a null reference exception.

Setting the with'd variable inside the with seems to be a little bit ignored.

The reason is buried deep in the generated MSIL. I expect. And it sh*ts me to tears.

So one of those tiny elegant features that makes life simpler and easier just dissolved for me -- making like uglier and more complex.

At least VB's still got background compilation and a nicer embedded XML syntax (...come 2008. Whenever that's gonna get here)

(and before some dimwit troll jumps in to attack a language in the comments -- i strongly support polyglotics over language-war.

Say the average human can master 3 natural languages. And the average computer language is (for the sake of argument) 1/20th as complex as a natural language -- then the average programmer ought to be able to master 60 programming languages. If you've mastered less than 60 languages and you openly discourage others from learning a particular language -- well, that's outright bigotry. maybe. or not ;-) )

 

How to aggregate a bit column

This is an oldie but a goodie:

When you first try to count the number of true values in a bit column (in SQL Server) you get this error:

"The sum or average aggregate operation cannot take a bit data type as an argument."

(caused by a query such as...

"SELECT SUM(MyBitField) FROM MyTableWhatHasABitColumn")

With droyad's help we came up with four ways to get around the problem:

SELECT
        SUM(CAST(MyBitField AS INT)) AS '1st Technique',
        SUM(CASE(MyBitField) WHEN 1 THEN 1 ELSE 0 END) AS '2nd Technique',
        COUNT(NULLIF(MyBitField,0)) AS '3rd Technique',
FROM
        MyTableWhatHasABitColumn

4th Technique: Another approach is to get a bigger hammer. In SQL Server 2005 you can create user defined aggregates, in the .net language of your choice. But that was the specific path I was trying to avoid going down.

Comparing the performance of these four techniques is left as an exercise for the avid reader. My favourite is the "COUNT NULLIF." I hope it ain't too slow.

(sorry for the straight nerd talk. not feel like telling funny stories this week)

 

Microsoft Expression Family... WTF?

When it comes to the 'Expression' family of Microsoft products, I have (until now) been about as confused as a man who's offered a shovel, a spade and a mattock, then told to take his pick.

What's the story with all these Expression tools?

There have been all sorts of codenames come and go -- and all the products seem to have some overlap with existing or retired Microsoft tools.

Here's the skinny as near as I can tell:

The Evil OverlordsTM of Microsoft have put out the following:

  • Microsoft Expression Web
  • Microsoft Expression Blend
  • Microsoft Expression Design
  • Microsoft Expression Media

and

  • Microsoft Expression Studio.

What are they for? what's the difference? and what do they do? Here's all the answers you'll need...

Starting at the end -- Microsoft Expression Studio is a combination of the first four products, plus Visual Studio 2005 Standard Edition.

So Expression Studio is the whole expression family, plus Visual Studio Standard.

Okay -- that's that out of the way.

But what are those first four?

Well -- Microsoft Expression Blend: I know what that is already! That's a design tool for making fancy XAML files that represent animations, graphics, forms -- all the sort of good things you can make with WPF or it's subset Silverlight. It's targeted at designers, but we all know that programmers are going to end up having to learn it (we end up having to learn everything, in the end).

Microsoft Expression Web is the most confusing one for me (and it's what started me on my current investigative rampage).

Turns out Microsoft Expression Web is the replacement for FrontPage. It's touted as being head and shoulders above FrontPage and I'll give them the benefit of the doubt for now. I'd like to put it side by side in a shoot out with my favourite web tool -- Aptana. I expect Expression Web would perform admirably.

Microsoft Expression Web is kind of part of the office suite, so it's something that every business should end up having a copy of (whether they use it or not). And like all office tools it probably has way more power and features than any one will ever use or find or understand.

The two remaining tools are Microsoft Expression Design and Microsoft Expression Media.

As near as I can tell Microsoft Expression Design is a fancy drawing program -- think MS Paint with a couple more features. Okay, a couple of thousand more features. And where MS Paint is pixel based, Expression Design leaps into the world of vector art, thus competing with Adobe Illustrator and friends. This is the most daring of the lot, I think because this moves away from the developer market (where Microsoft have fared well) and hits squarely in the graphic design market, where Microsoft's performance has always been abysmal. Perhaps abysmal is the wrong word. "Shithouse" might be more appropriate.

Every family has that one ugly member who utterly lacks sex appeal (a big hello to my uncle Terry!) -- and in the expression family, it's Microsoft Expression Media. This is some kind of 'professional asset management tool' and it sounds about as interesting as a hat full of armpits. As a programmer I value version control, source code management, and all those dry kind of boring things that make most people swallow their own tongue in boredom. I imagine that graphic designers -- with their uber cool flair, talent and turtle-neck-skivvies -- are even less thrilled at the prospect of asset management, encoding issues, and so on than the ordinary person. So no matter how good this application is, no one's gonna love it.

Okay -- that's my round up. This was info I had to find out for myself so I hope you don't mind me sharing it. Cheers.

If I'm wrong about stuff -- please tell me! Always happy to make corrections.

(note: I wrote this entry in Expression Web... didn't particularly enjoy the experience -- it felt like trying to ride a unicycle while drunk.)

 

Hogwarts: an alternative dictionary.

(bit off topic this one.)

I've been reading over people's shoulders on the bus -- books today seem full of strange words I never learnt at school.

Here's some of the weirdest words i've noticed in the book most people are reading this week, and the definitions I've come up with to try and make sense of it all.

Buy
'Harry Potter
and the
Deathly Hallows'
at Amazon
albus dumbledore
nick name for a person who, with elbows, stumbles into doors.
alohomora
hawaiian greeting.
avada kedavra
what it sounds like when you try to say abra cadabra with a mouth full of bertie bott's every flavour beans.
boggert
short sharp spell that makes you soil your pants.
crookshanks
the way richard nixon's jowls wobble when he denies involvement in watergate.
durmstrang
when you drop a guitar and it goes out of tune.
expecto patronum
an old man's cough syrup.
expelliarmus
violent, sudden emission.
gillyweed
what mrs weasley bakes into muffins to help her get through those endless meetings of the order of the phoenix.
grawp
a drunken fumble.
hedwig
a wig on ya hed.
hermione
phonetic shuffling of 'her on my knee'.
hogsmeade
ointment for the treatment of hogwarts.
Buy
'Harry Potter
and the
Deathly Hallows'
at Amazon
hogwarts
pustulating genital protuberences, transmissable through porcine interference (i.e. what happens when you f**k a pig).
horcrux
any street corner popular with ladies of the night.
hufflepuff
air biscuit.
kreacher
sound of coughing up an expecto patronus.
lumos
glowing fungus in the out-house.
lupin
spinnin.
mudblood
tainted transfusion.
padfoot
ankle bandage.
parceltongue
when you're snoggin' your girl and she gives you her cough lozenge.
platform 9 3/4
really big disco shoes.
portkey
how to open the liquor cabinet.
quidditch
inflamation of the groin caused by parceltonguing a horcrux.
scabbers
infectious hogwarts as passed from cedric to harry via cho. originating with hagrid/firenze.
sirius
not a joke.
sneakoscope
little mirrors on the tip of your sneakers for looking up witches robes. sort of thing percy weasley would use.
Buy
'Harry Potter
and the
Deathly Hallows'
at Amazon
tonks
you're wolcome.
veritaserum
a runny cheese.
wingardium leviosa
spray on cleanser used in elevators.
 

Exec Inline AddIn for Visual Studio 2005 -- Get It Now

Exec Inline for Visual Studio 2005

I still use the Exec-Inline addin now and then -- so I've updated it to work for VS 2005.

Download ExecInline 2005 Download ExecInline.zip

To install it:

  1. unzip this file -- ExecInline.zip -- into the folder:

    "C:\Documents and Settings\{Your Username}\My Documents\Visual Studio 2005\Addins"
  2. (If the folder doesn't exist -- create it!)

  3. Next time you start visual studio 2005 the tools menu should contain a new item: 'ExecInline' with a smiley face icon. (if not, check the Addins menu to see that it's loaded)

Select a snippet of your code, press 'ExecInline' -- and KAPOW! The snippet is executed all by itself.

Illustration:

***

As I've said before:

...all credit for this invention goes to these four places:

Code compilation retyped from jconwell's Dot Net Script Project at CodeProject.

Wrapper around compilation via dstang2000's DynamicCompileAndRun project.

Help with writing a VS Add-in: Scott Swigart, PasteAs Visual Basic Add-in

And help with getting the currently selected text from the IDE, via Kevin McFarlane's VS Csharp Macros page.

Also, the idea was partially inspired by Don Syme's F# interactive which I first saw mentioned on John Lam's website -- but mostly inspired by Ctrl-E from SQL Query Analyzer. In fact the more I look into this little side project the less credit I deserve. I am a flea on the back of bigger fleas, ad infinitum.

 

Sick Of Being Nagged to Restart, Every 10 Minutes After An Update?

restart keeps nagging every 10 minutes... stop it like this

This is a tip that has been posted a lot of times before, but I've drawn a little picture to make it simpler.

First, here it is in words:

  1. Open the windows Run dialog
  2. type in "gpedit.msc" press ok -- this opens the "Group Policy" management Console
  3. Open "Local Computer Policy"
  4. Open "Computer Configuration"
  5. Open "Administrative Templates"
  6. Open "Windows Components"
  7. Open "Windows Update"
  8. Double click on "Re-prompt for restart with scheduled installations"
  9. Select "Disabled"
  10. Click "OK"
  11. Close the Group Policy management console

Here's the picture...

disable the restart nag interval

Note that in the help for this setting it wrongly says:

<wrong>"If the status is set to Disabled or Not Configured, the default interval is 10 minutes."</wrong>

('wrong' tags added for the benefit of people who are just skimming, i.e. most of us)

I've found that with the status set to disabled I never get nagged. So just do as I do, and it should be okay.

What I'd like would be a "configure notification" link directly on the nagging dialog box itself, that takes you to this part of the group policy. Provided you're allowed there, of course.

Here's some other posts talking about this topic:

[yeh, I'm blogging this so i can find it next time I need it ;-) ]

 

ATM Thief Busted By Observant Internet Watcher?

Wired News reported [link updated] about a brazen trickster who reprogrammed an ATM to think it was dispensing $1 notes when it dispensed $20 notes... The thief stuck twice, taking a couple of thousand dollars.

The police are baffled. And the trail runs cold... Until now!

The story continues with possibly legitimate internet world first exclusive scoop...

One of the comments at the Wired article said:

"OHH MY GOD, CALL THE POLICE. I FOUND OUT WHO DID IT,,GO TO THE TRITON PAGE......http://www.tritonatm.com/en/service/manuals.php

Which leads one to a picture of an ATM technician.

As an exclusive internet stunt first, I'm going to put the two pictures side by side. You be the judge!!

Master Thief ATM Technician

Now I'm not one to sully the good name and reputation of someone who is probably a hard working computer technician.

And I'm not one to suggest that public opinion ought to be more influential than the informed decision of a well selected jury of peers.

But on the other hand...

YOU BE THE JUDGE!

TRIAL BY INTERNET! DID HE DO IT??

Is the ATM technician Guilty or Innocent?

Friendly support technician? Or master criminal with a criminal streak as dark as night?

VOTE NOW!

I'll tally up the hits and give the results later in the week. In the tradition of unbiased media polls, you are of course free to vote as many times as you like.

While typing this up, I found another disturbing piece of evidence...

Richard Campbell from DotNetRocks (and RunAsRadio)...

ATM Technician Richard Campbell... or is it?

Once again -- you be the judge!

Is Richard Campbell really, as he claims, a SQL Server and programming expert featured on three regular podcasts...

or is he... AS THE EVIDENCE CLEARLY INSINUATES in actual fact....

 

...AN ATM TECHNICIAN?

YOU BE THE JUDGE!

TRIAL BY INTERNET!

Is Richard Campbell a SQL Guy or an ATM Guy?

VOTE NOW!

The truth will out.

God bless the internet.

 

What a week in source code!

I've been working way too hard to notice anything around me. Apparently my mother died. I barely lifted my hands from the keyboard. You know how it is.

But I'm told the two most memorable articles on the webtubes this week are:

Interestingly the first was written by a Canadian. (A what? They're kind of like Americans.) This is the inimitable Justice Gray who is funny, intelligent and just freaking weird. I'm a big fan of his words.

and the second was written by one of those lovable whingers from ShutUpAndCodeBetter, no not the brilliant Sam Gentile or grumpy bum Scott Belware (:-))... rather, the other, nicer, one, Jeremy Miller. I haven't had a chance to read it -- so tell me if Jeremy's train of thought is worth catching. I suspect it is :-) And I do love a bit of ADHD.

Something else I've been enyoing is: QuickUnit.net a really clever "Simple Unit Testing" framework, based on one of my (so-called) 'million dollars ideas', i.e.: Annotating your code with simple tests'". Get it! use it! Experience ultra simple unit testing! Improve it! Keep us updated!

Also: Arjan's World is a nice place to get an almost daily update of what's new. Write to Arjan and ask him to keep up the great work!

In other news, I saw this heading: "Jakob Nielsen says 'don't be like Scoble'" and thought, yep. secretGeek says 'Don't be like Scoble!' Chicks won't dig ya.

Also, Windows Home Server!!! HMMOGMFJCAM! that's a pretty groovy tool! Get this one and join up your whole house, pronto.

Ah, and meanwhile, the excellent Haacked got himself re-skinned.

Discuss.

 

That Shakespeare Loved His Code

I don't think anyone ever quite understood the inherant difficulty of software maintenance quite so well as old William Shakespeare.

After all, it was crazy Will who once wrote:

"Striving to better oft we mar what's well"
--King Lear

So true. He compresses whole volumes into that one sweet line. Years of practice poured into a paragraph.

Maybe it's this which explains Shakespeare's fondness for test-driven development. But the more I read his works, the more confused a picture I get of old Will.

Tell me, can the following be interpreted as an endorsement for "Big Design Up Front?"

"What is decreed must be"
---Twelfth N, Act i, Sc.5

And anyone who worked with Will, recalled his Draconian attitude on matters of software estimation:

"Better three hours too soon than a minute too late"
---M W of W, Act ii, Sc.2

...and his quirksome way of expressing Postel's Law

"Love all, trust a few, do wrong to none"
---All's Well, Act i, Sc.2

Alas, he set the cubicles in a roar. Filled, was Shakespeare, with a jubilant optimism about the role of lockless threading in the Multi Core era:

"O, two such silver currents, when they join, do glorify the banks that bound them in"
---King John, Act ii, Sc.2

Though he was a little trite in favouring WS-Security as the be-all of soa:

"Safe may'st thou wander, safe return again!"
---Cymbeline, Act iii, Sc.5

But most of all, old Will loved to chat on about Microsoft's strategy concerning 'Windows Vista'.

Initially he didn't care how long Vista took to arrive:

"How poor are they that have not patience"
---Othello, Act ii, Sc.3

... though he was visibly upset when WinFS was dropped:

"This was the unkindest cut of all."
---Julius Caesar (III, ii, 187)

and he was clearly aggravated by UAC:

"The lady doth protest too much, methinks."
---Hamlet (III, ii, 239)

He turned it off, as soon as possible:

"I like your silence; it the more shows off your wonder"
---Win Tale, Act v, Sc.2

Around this time he drifted away from Microsoft. And though he dabbled with Apple, he refused to use parallels to run Microsoft software on Apple hardware:

"'Tis time to fear when tyrants seem to kiss"
---Pericles, Act i, Sc.2

Amd finally turned his back on both Microsoft and Apple, reverting to the *nix systems of his youth:

"Farewell! thou art too dear for my possessing"
---Sonnet 87

Perhaps, wisest of all, he was never fooled by google's "Do no evil" mantra:

"The prince of darkness is a gentleman."
---King Lear, 3.4

But right until the end, he regretted nothing so much as Mike Gunderloy's decision to take up with that wily strumpet Ruby:

"Let us sit upon the ground and tell sad stories of the death of kings" --Richard II, 3.2

and his most cutting line of all...

"He hath given his empire
Up to a whore."


(ps -- while, for my own amusement, I poke fun at MikeG, I always mean it in a spirit of admiration. Mike's much clever than me. He's probably right in his choices. I wish he wasn't. But reality isn't determined by the wishes of its constituent parts, dagnamit. And no, i don't consider Ruby to be a strumpet. [Though the name sure sounds like a strumpet's name])

(Bring on the languages, I say! Innovation as part of my dayjob isn't always welcome. But as fuel for my intellectual hobbies: that's more than welcome.)