<CharlieDigital/> Programming, Politics, and uhh…pineapples

30Aug/11Off

What I’ll Remember Most About Steve Jobs

Posted by Charles Chen

Ford, DO IT -- BUILD IT JUST LIKE THIS!

I know I'm about a week late to the whole Jobs retirement story, but as I saw Ford's new Evos concept, I was reminded of an article I read on Jobs back in 2005 that stuck with me:

Ask Apple CEO Steve Jobs about it, and he'll tell you an instructive little story. Call it the Parable of the Concept Car. "Here's what you find at a lot of companies," he says, kicking back in a conference room at Apple's gleaming white Silicon Valley headquarters, which looks something like a cross between an Ivy League university and an iPod. "You know how you see a show car, and it's really cool, and then four years later you see the production car, and it sucks? And you go, What happened? They had it! They had it in the palm of their hands! They grabbed defeat from the jaws of victory!

"What happened was, the designers came up with this really great idea. Then they take it to the engineers, and the engineers go, 'Nah, we can't do that. That's impossible.' And so it gets a lot worse. Then they take it to the manufacturing people, and they go, 'We can't build that!' And it gets a lot worse."

 

23Aug/11Off

Filtering By “Reaching” Into Arrays With Mongo

Posted by Charles Chen

One seriously neat capability with Mongo is the ability to filter by "reaching" into an array and filtering on a property of an object in an array.

This is seriously powerful stuff and incredibly easy with Mongo.  There's an example in the official SDK docs, but it's buried pretty deeply in there.

So here's a short summary. Say we are building an address book.

From the Mongo shell, we would enter:

> use addressbook
switched to db addressbook

To create the "addressbook" repository.

Next, we insert two contacts:

> db.contacts.insert({
... Name: "John",
... Addresses: [
...             {Street: "3 Main St.", Town: "Princeton", State: "NJ"},
...             {Street: "198 5th Ave.", Town: "New York", State: "NY"}
...     ]
... })
> db.contacts.insert({
... Name: "Christy",
... Addresses: [
...             {Street: "47 Park Ave.", Town: "New York", State: "NY"}
...     ]
... })

So what if we want to find the list of all contacts who have an address in the state "NY"?

In Mongo, this can be accomplished with the following query:

> db.contacts.find({ "Addresses.State" : "NY" } , { Name: 1 })
{ "_id" : ObjectId("4e54148fdf15eca8a7d2e6d5"), "Name" : "John" }
{ "_id" : ObjectId("4e5414b5df15eca8a7d2e6d6"), "Name" : "Christy" }

Love that simplicity.

Filed under: Mongo No Comments
23Aug/11Off

Damn It, Microsoft (SharePoint)

Posted by Charles Chen

Came across an interesting quirk today with regards to AddFieldAsXml in the SharePoint API.

It turns out that SharePoint doesn't really give a damn what you want to call your field when it adds it to the list; it's going to damn well do whatever it damn well pleases!

You see, in the MSDN documentation, it implies that you can specify the display name and the internal name (just look at that sample code).

However this isn't the case and, as Bill Simser points out, this has been an issue going back to 2005.

Thankfully, as commenter Morten Bundgaard Pedersen points out, you can use the SPAddFieldOptions.AddFieldInternalNameHint option to force SharePoint to use the name value that you specify in the XML.

Seems kind of silly to me given that this is the most likely use case and should be enabled by default given that the intent -- in specifying the Name and StaticName fields would be to, you know, use them when creating the field.

Damn it, Microsoft.

15Aug/11Off

Alan Simpson on “Western Conservatism”

Posted by Charles Chen

In the Michelle-Bachmann-I'll-eat-your-brains-stare issue of Newsweek (8/15), there's a great interview with Alan Simpson, a former Republican Senator from Wyoming:

You and Cheney represent an old tradition of Western conservatism.  What happened to those views?

I say clearly, abortion is a terrible, terrible thing, but it's a deeply intimate and personal decision, and I don't think men legislators should even vote on it.  Now, that takes you immediately from a conservative to a commie.  Now I also think that we all have someone we love who's gay or lesbian.  There should be no special prejudices, no special penalties, no special privileges.  And so that'll knock you into the commie box, too.

One would like to think that Simpson is speaking in hyperbole, but it's the sad truth of the current state of "conservative" politics.

11Aug/11Off

Why I Can’t Be Bothered To Learn Silverlight

Posted by Charles Chen

Aside from hating Flash and Flash-like applications in general, as I've stated before, I view Silverlight as a dead/dying technology at the scope of web and business applications.

It may retain niche applications in gaming and the Xbox platform, but I think that's it.

Of course, Silverlight diehards will point their fingers hard at Windows Phone, but I say it really doesn't matter.  The trends seem to show that WP7 is dead in the water:

However, perhaps the most surprising finding of last quarter was that Microsoft's Windows Phone 7 platform was beaten out by Samsung's Bada operating system. According to Gartner, over 2 million Bada-based smartphones were sold last quarter, earning the platform 1.9 percent market share. Windows Phone 7 followed with 1.7 million units sold, helping it to earn 1.6 percent of the market.

The last 12 months have been difficult for Microsoft. According to Gartner, the company's market share just one year ago was 4.9 percent on over 3 million unit sales.

At an anemic 1.6% market share for 2Q11, one has to wonder -- from the perspective of a developer: why waste my time on a platform that has such a trivial market of users?  Silverlight is already dying in the wider web.  I can't remember the last time I saw a Silverlight enabled web page that wasn't a Microsoft property.   But with this news of WP7s declining market share, one has to wonder when the diehards, Silverlight defenders, and (the absolute worst!) the Silverlight evangelists will just give it a rest and stop trying to tell me how awesome it is and how every business wants Silverlight apps and all that nonsense.

With the news that Windows 8 will support HTML5+Javascript apps and a tablet- and touch-friendly interface, one has to wonder how much longer Silverlight will have applicability in the mobile space.  Could Microsoft scrape the current, Silverlight-driven Windows Phone platform for one based on HTML5 as a derivative of their Windows 8 platform?

One thing is for certain, the market has spoken: Silverlight sucks!  Now go away, please (and take Flash with you!).

Filed under: Rants 6 Comments
8Aug/11Off

TFS – Does It Suck?

Posted by Charles Chen

I'm not sure, but I don't want to find out either.

I'm currently tasked with recommending a new source control platform and a new defect tracking platform as well.

I'm late to this post from March 2010, but Martin Fowler posted an internal ThoughtWorks survey of version control tools:

I conducted the survey from February 23 2010 until March 3 2010 on the ThoughtWorks software development mailing list. I got 99 replies. In the survey I asked everyone to rate a number of version control tools...

...there's a clear cluster around Subversion, git, and Mercurial with high approval and a large amount of responses. It's also clear that there's a big divide in approval between those three, together with Bazaar and Perforce, versus the rest.

The biggest offender?  TFS with a 0% (yes, z-e-r-o) approval from the ThoughtWorks staff.  Scary.

James McKay provides an interesting take on it:

Team Foundation Server advocates claim it’s unfair to compare TFS to other source control tools, since it’s not just source control, but an integrated end-to-end application lifecycle management solution. Comparing TFS to, say, Subversion, is like comparing Microsoft Office to Notepad, so they say.

Now where have I heard something like that before? Oh yes, Lotus Notes:

The main focus for frustration is Notes’s odd way with email, and its unintuitive interface. But to complain about that is to miss the point, says Ben Rose, founder and leader of the UK Notes User Group (www.lnug.org.uk). He’s a Notes administrator, for “a large automotive group”.

It’s regarded by many as an email program, but it’s actually groupware,” Rose explains. “It does do email, and calendaring, but can host discussion forums, and the collaboration can extend to long-distance reporting. It will integrate at the back end with huge systems. It’s extremely powerful.”

The thing is, it wasn’t the detractors who were missing the point. It was the Lotus Notes guys. You see, e-mail is right at the heart of any groupware application. It’s the part of the application that users interact with the most. It’s where usability matters the most. And it’s what Notes got wrong the most.

Is TFS really that bad?  I haven't used it or recommended it (mostly out of concern for cost), but 0% approval?

On a related note, I've been digging into Redmine the last few days to try to examine its suitability for a project that I'm taking over and new products that I'll be bringing online.  I've been really impressed with it, even compared to the excellent Trac.  Compared to Trac, Redmine just feels more well put thought out (i.e. native support for multiple types of source control systems, native sub-projects, so on) and the UI is a bit cleaner and easier to use.  I expect to be blogging about it frequently in the coming months.

2Aug/11Off

The Most Awesome Thing You’ll Read Today

Posted by Charles Chen

Nicholas Schmidle's article in the New Yorker detailing Operation Neptune's Spear (AKA the raid that killed Bin Laden):

The Americans hurried toward the bedroom door. The first SEAL pushed it open. Two of bin Laden’s wives had placed themselves in front of him. Amal al-Fatah, bin Laden’s fifth wife, was screaming in Arabic. She motioned as if she were going to charge; the SEAL lowered his sights and shot her once, in the calf. Fearing that one or both women were wearing suicide jackets, he stepped forward, wrapped them in a bear hug, and drove them aside. He would almost certainly have been killed had they blown themselves up, but by blanketing them he would have absorbed some of the blast and potentially saved the two SEALs behind him.

The first round, a 5.56-mm. bullet, struck bin Laden in the chest. As he fell backward, the SEAL fired a second round into his head, just above his left eye. On his radio, he reported, “For God and country—Geronimo, Geronimo, Geronimo.” After a pause, he added, “Geronimo E.K.I.A.”

I'm still awed and fascinated by this operation even now, months after it took place.  This piece has had the most detailed account of the events of leading up to and during the raid that I've read so far.  Worth 15 minutes, for sure!

Filed under: Awesome No Comments