Steve Jobs Invents Threads!

Leon forwarded me this gushing NY Times regurgitation of this apple press release. This part on upcoming advancements in OSX Snow Leopard’s use of mutiple cores was interesting:

Snow Leopard delivers unrivaled support for multi-core processors with a new technology code-named “Grand Central,” making it easy for developers to create programs that take full advantage of the power of multi-core Macs.

The NY Times quoted Steve Jobs as saying:

“The way the processor industry is going is to add more and more cores, but nobody knows how to program those things,” he said. “I mean, two, yeah; four, not really; eight, forget it.”

And Apple’s “snow leopard” landing page says this:

Grand Central takes full advantage by making all of Mac OS X multicore aware and optimizing it for allocating tasks across multiple cores and processors. Grand Central also makes it much easier for developers to create programs that squeeze every last drop of power from multicore systems.

Colour me sceptical. Concurrency is a hard problem and current programming models rely on the developer to (try and) keep track of what is shared and what isn’t. Apple is certainly not the first company to notice the rise of multi-core, and not the first company to try and ease the pain for simple-minded developers. On top of the “normal” concurrency stuff (threads, monitors, locks etc) that are built into .NET Joe Duffy and co have been cranking out parallelfx releases for at least 6 months (and discussed for nearly a year and a half). Joes upcoming book on concurrency looks awesome. I’ve done some sholder-surfing while Joel has been flicking thru some of the chapters in the rough cuts version and I can’t wait. You can pre-order form Amazon.com here.

One thing I did like about the Apple press-release was the announcement that they are working on “foundational” enhancements in snow leopard rather than a lot of user-facing features. This is something that Microsoft tried with Vista. Time will tell if it has paid off for them or not, but I certainly think there is a lot of work that could be done on “foundational” stuff and “fit and finish” in Windows, rather than going for bullet-points-on-the-back-of-the-product-box features.

Comments

Bruce McLeod
Joseph,

I think that Microsoft’s track record is exceptional in this area. Don’t the outlook team give roadshows on best practice for writing multi-threaded code.

:-)

Bruce
11/06/2008 4:15:00 PM
Winston Johnston
Concurrency is just hard and developers often get it wrong. I’ve always thought that the compiler is the best tool for generating parallel code because it can analyse control and data flow at the instruction level. Has obvious potential with functional programming, Parallel Extensions for .NET and F# spring to mind.
25/06/2008 6:29:00 PM
David Connors
Threads and Grand Central aka Open CL are not even remotely the same thing.
4/03/2009 12:38:00 AM

»

Data grids - lack of imagination or abdication of design responsibility?

Paul recently wrote a great blog entry that called out something I’ve felt for a long time, regarding the absence* of an editable datagrid in the “out of the box” WPF control set. While many hard-core winforms users bemoan the lack of a data grid in WPF, I think the absence of a data grid in WPF is a good thing. Why? To me the editable data grid is an over-used UI device, which shows either a terrible lack of imagination or understanding as to how data is going to be entered, or an abdication of UI design responsibility. To be clear - I’m not talking about displaying of tabular data ala the ListView (WPF’s list view is very powerful for this). I’m talking about banging in data, row by row, cell by cell. We don’t give users a copy of SQL Management Studio, show them how to open up underlying tables and let them go nuts, but (to me) giving them an editable grid is not that different.

The reason editable data grids fall short is that when a user enters some data that means something, and I believe data grids don’t do a great job of capturing that meaning because all data entry operations look the same. A bank employee changes a customer credit rating from “good” to “credit risk” using a drop-down list in an editable grid means the nature of that customer’s relationship with the bank is about to change fairly dramatically. Why was the change made? What validations need to be applied? What other processes need to be initiated as a result of this change? As Chris Stevenson pointed out a while ago, editable grids don’t do a great job of capturing these subtleties. Data grids are the “one size fits all“ data entry solution you don’t even have to think about. Sure, the data you get may not be as good as it could have been. The user might have had to jump through a few hoops to get what they wanted done, and they may have been exposed to some implementation details of the system but the data got in there.

Users and analysts will often request an Excel-like interface to data. Some people think that given Excel’s ubiquity this will reduce training. However Excel is a commercial product with hundreds of person-years poured into its code-base. Is the grid you’re using going to be as fast as Excel (given that unlike Excel your data probably has to come from a remote server)? How will your grid handle concurrency (Excel doesn’t have to care about concurrency)? Excel has hundreds of features and tweaks to make editing of tabular data faster - how many of those are you going to implement? Which ones? When Excel v.Next comes out will you rev your application to continue to “be like excel“? If end users want Excel why not just let them use Excel?

When the only tool you’ve got is a hammer, everything looks like a miniature in-line version of Excel. By keeping the data grid off the table for a while the WPF team may have forced people to get a little more creative in how they interract with their data. At the end of the day “it that makes me find creative ways to work around its deficienceis“ is not a great selling point for a framework (although it never seemed to hurt the adoption of HTML) and the WPF team have come to the party and said they will provide a grid. That still doesn’t change the fact that I think they are generally a bad idea.

* There are 3rd party WPF grids from Xceed and Infragistics (both of which are free IIRR).

Comments

Paul Stovell
"Abdication of UI design responsibility" is a great way to put it. It’s not that data grids don’t have a place, but that when your application consists of nothing but grids you may as well be using MS Access with a SQL Server backend. Using grids in WPF is like buying a Ferrari to pick up milk from the deli :)
9/06/2008 6:26:00 AM
Steven Nagy
Guns don’t kill people…

By this I mean, why limit the functionality because bad developers/designers misuse it to create abhorent UX? Without a DG they will just find another way to achieve the same thing if that’s their design goal.

Don’t hate me because I’m right…
11/06/2008 5:57:00 PM

»

Pex is now available from MSR

Super-smart-guy Peli disappeared into MSR a while ago to work on Pex, an exploratory testing framework for .NET. There had been lots of teaser blog entries, a few conference appearances, chats with Hanselman, a video or two but no release, until last monday when Pex 0.5 was released. Testing Supremo Bruce McLeod is planning a series of posts explaining all of this tentatively titled “the Joy of Pex”. He then plans a follow-up article “how to explain to your spouse why you’re staying up a night reading something on the internet called ‘The Joy of Pex’”. »

My ReMix talk slides and demos on WPF 3.5 and 3.5 SP1 are available here

I just finished delivering my WPF talk at ReMix melbourne, which seemed to go OK. The talk was on WPF 3.5 and 3.5 SP1, and was somewhat based on the talk that Rob Relyea delivered at Mix08 in Las Vegas. Here’s the slides, and the demos (one of which was borrowed from Kevin Moore here, and the pixelshader one is based on Greg’s demo here). Leave me a comment if you have any feedback.

I'm speaking at REMIX. Are you?

Comments

Andrew Browne
Really enjoyed the talk today. Covered what is here now and what is to come really well.
22/05/2008 5:08:00 AM
Bronwen Zande
great presentation by the way
25/05/2008 11:33:00 PM

»

World Wide Telescope - nice app, shame it isn't WPF

I had a look at the new World Wide Telescope created by Microsoft Research today. Like scoble I also wanted to cry when I saw it, but perhaps not for the same reason. Unlike scoble (who did it for publicity) I felt like crying because it seemed like what COULD have been a great showcase for WPF instead stooped to “legacy” technologies. Please MS - WPF was made for creating these kind of apps. If you’re not going to  use it to build things like this then why should anyone else?

Comments

James Avery
The site is Flash too. Definitely not an "on message" launch. :)
15/05/2008 9:24:00 AM
Deepak
I think the reason why it is not in WPF is becasue MS wants a high reach. The issue doing this in WPF as I see is that those who do not have the runtime will have to download and install it. Most home users do not like to do such things.
23/05/2008 3:08:00 PM

»

CodeCampOz 2008 slides - Silverlight 2.0 and WPF

Here are my slides from the talk I gave at CodeCampOz 2008 on “Silverlight 2.0 and WPF - what’s the same and what’s different”. Thanks to everyone who came along to my talk. I’ll be doing the same talk in June at the QMSDNUG in Brisbane. I had to cancel on Mike for the May session because of ReMix, where I’ll be talking about WPF 3.5 and the coming improvements to WPF.

slides as PDF 691K

 

Comments

KB
Hi,

I attended the Remix08 in Melbourne and found your presentation very informative.

Thank you!
22/05/2008 3:54:00 PM
David
Open Source Silverlight Chart Visifire is now compatible with Silverlight 2 Beta 2
10/06/2008 4:09:00 AM

»

A gentle reminder that interfaces aren't contracts

I received a gentle reminder this evening that interfaces aren’t contracts. I was attempting to bend Silverlight 2 to my will, specifically the ResourceDictionary. I really wanted the keys, and was pleased to see that it implemented IDictionary<object,object>, which would give me a collection of keys (of object). I was dismayed to see the following implementation in reflector for the Keys and Values properties.

    ICollection<object> IDictionary<object, object>.Keys
    {
        get { throw new NotImplementedException(); }
    }

    ICollection<object> IDictionary<object, object>.Values
    {
        get { throw new NotImplementedException(); }
    }

This really brought home to me that Interfaces are nice and all, but really only tell us that a type will have methods with a certain name that take certain paramters - exactly the same thing the compiler tells us about lots of other things (that is if you’re in a compiled world….the benefits of interfaces seem even more marginal in more dynamically typed duck typing* languages). It doesn’t guarantee that the methods will actually DO what we think they’ll do (or even that they’ll do anything at all except throw an exception in your face). Don’t get me wrong - I like and user interfaces, but they’re not a contract, more of a gentleman’s agreement or shared understanding. Now if you’ll excuse me I have some nasty reflection hacks I need to brutally force on the Silverlight run-time.

* Aside: speaking of duck typing, I heard of another interesting turn of phrase for monkey patching - duck punching! If it walks like a duck and flaps like a duck but doesn’t quite quack the way you want it to you just punch it [chewie].

 

Comments

Riaz
Been googling this early morning as I’m also trying to bend the rules with Silverlight 2!

See, I’m having to convert a WPF project to Silverlight 2 and am having an absolute nightmare to come to terms with the much limited Resources in Silverlight (no merge etc).

The furthest I got was:
1) Keep the styling as a ResourceDictionary as an XML data type in SQL Server
2) Pull the data via WCF to a string
3) Load the string via XamlReader.Load in Silverlight and cast as ResourceDictionary

So far, so good. I have a working ResourceDictionary object and all x:Key defined in it.

As Application.Current.Resources is read-only (unlike WPF), can’t simply stick the dynamicly rendered resource dictionary to it.

Can’t also simply do Application.Current.Resources.Add(the_loaded_resource).
The keys don’t get added for some reason.

What I CAN do is:
foreach (DependencyObject d in the_loaded_resource)
{
Application.Current.Resources.Add(d);
}

The problem with the above approach is that ’d’ gets added without it’s ‘key’ setting. So while the styles/brushes/etc are added to the Application’s resource dictionary, the keys are lost.

To make things work, I have to manually type the key. Hence
Application.Curent.Resources.Add("HardCodedKey",d);

Which leads to your post. How on earth do I list the keys in the loaded resource dictionary to get all the names and not having to add them via hard coding?

Pls let me know if you find a way round it!
24/04/2008 8:12:00 AM
lb
This is why everyone should be using Spec#.

Real contracts at interface boundaries.
15/05/2008 5:21:00 AM

»

Ideas are worth next-to-nothing

I was reading through a discussion thread on a programming forum, where someone was proposing that a large software vendor should pay community members for ideas on how to enhance said software vendor’s platform. This is an interesting idea, which files in the face of my own personal belief that ideas (with a few notable exceptions) are worth approximately nothing. It is the implementation/execution of the idea that is worth something. Lets look at some big software companies - Microsoft and Google. Operating systems were certainly not a new idea when Microsoft released MS-DOS, it was their implementation of the idea and the royalty stream they created through savvy licensing to IBM that made MS. The operating system they licensed to IBM wasn’t even theirs, it was a CP/M clone they bought for $50K. Internet search and on-line advertising were not new ideas when google entered this market, but their dogged refinement of their search implementation built the brand/trust in the company, which in turn lead to extreme user buy-in and eventually a strong “network effect” between on-line content providers (AdSense) and advertisers (AdWords). Strong implementations of ideas are bought and sold every day (they’re called companies, or the rights to products) whereas there is not currently an established market for ideas.

See also: No One Is Going To Steal Your Brilliant Idea

Comments

silky
i guess this may have been me. i think it hardly needs to be said that just because a company is succesful on non-original ideas, that original ideas are worth nothing.

i 100% agree that unimplemented idea’s are worthless, and that the implementation of an idea is critical, but to say your idea’s are worth nothing is a little strange. if they’re worth nothing why provide them? why do people want them? they are clearly worth something.
14/04/2008 10:42:00 PM

»