Aug 22 2012

IDisposable is Not About Garbage Collection!

Published by under Programming

Like a lot of engineers I participate in my company’s hiring process by conducting technical interviews with candidates. And like a lot of engineers I have a stable of questions that I draw on repeatedly. I try to vary them somewhat, and add and subtract from the list as technology changes, but a few of them have persisted for years. One of these, on the topic of C#, is: why would the author of a class need to implement IDisposable? This question has a companion for follow-up: how can you ensure that Dispose is called on a disposable class at runtime? I rarely get to deliver the follow-up, though, because almost nobody gets the first question right.

I didn’t intend for the IDisposable question to end up on my long-term go-to list of interview questions. As I recall I just tossed it out there during an interview one afternoon. The answer I got back was so appalling that I asked the same thing of the next candidate, and the one after that, etc. Next thing you know it’s a tradition. To this day I would say maybe one or two out of every ten candidates has given the correct answer to the question. I’m still perplexed by this. IDisposable is not what you’d call obscure in .Net. It is implemented by many classes in the framework, most commonly in System.IO, System.Net, and of course System.Data, but there are plenty of others too.

I consider IDisposable to be fundamental to the relationship between .NET and the underlying Win32 APIs on which it rests, and so I am often left with a strange conundrum when a candidate doesn’t know what it’s for. Many of these candidates are quite strong in ASP.NET, SQL, and other skills that our company requires. Do I vote them down? Vote them up? Are we passing on a decent developer that would enhance our team because he or she doesn’t recall some bit of .NET trivia? Can you be a good developer, and yet be ignorant enough of the structure of .Net and C# that you can’t explain IDisposable?

The most common incorrect answer that I get, usually accompanied by much hemming and hawing, is that IDisposable is for garbage collection. When would you use it? When you want to garbage collect something, of course. It’s as if I were interviewing an auto mechanic and asked what a differential did and why vehicles need them, and was told that it helped remove heat from the engine. Would you hire that mechanic? I wouldn’t. And yet for some reason I feel bad rejecting someone who is perfectly capable of slapping a web page or a query together, but apparently doesn’t understand much of what’s going on under the hood.

IDisposable does have a vague relationship to .NET garbage collection, in that it patches the holes where garbage collection doesn’t work. Deep in the guts of Windows, well below the .NET layer, live things called handles. A handle is an identifier that is assigned to a system resource when it is created by an API call. You get them back when you create things like device contexts, file descriptors, and streams. When you’re done with them you have to free them. Otherwise they hang around and consume system memory. In short, they leak. In the old days of C we had to carefully write code to clean these up. In the slightly less ancient days of C++ and MFC the destructor mechanism was used for this purpose.

C# has destructors, of a sort, but they do not behave the way that C++ destructors do. In C++ memory management is manual. You control when an object is created, and when it is deleted and the destructor is called. That gives you a nice, deterministic connection between when you no longer need an object and when the resources it owns are freed. In C# you can write a destructor, but it essentially implements the Object.Finalize() method, and it will be called whenever the garbage collector sees fit to reap the object. What this means is that expensive system resources that the object has allocated, handles in other words, hang around for an unpredictable amount of time.

Enter IDisposable and the ‘using’ clause. If an object implements IDisposable then it supports a method called Dispose(). Dispose() is meant to be called when you are through with an object, but before the object is garbage collected. Inside Dispose() you can get rid of all those pesky .NET wrappers around pesky COM wrappers around memory-hogging system handles. If you instantiate your object with the ‘using’ clause, then when control passes beyond the end of the ‘using’ block Dispose() will be called on the object automatically. It’s the closest thing to C++ destructor semantics that C# has to offer.

So now, if you ever interview with our company, there should be no reason why you can’t tell me what IDisposable is for.

No responses yet

Jun 10 2012

Aptana Studio 3 and libjpeg62

Published by under Programming

It’s been my experience that every non-trivial install on Linux will at some point present you with an error. Today while setting up a new VM for python/django development, I seemed to have evaded the rule. Everything went swimmingly right through configuring python, git, mysql, django, and installing and testing the MySQL libs. Fortunately, Aptana Studio 3, my current experimental IDE of choice, was about to step in to save the day and uphold the regime of order and predictability.

All you have to do to install Aptana Studio 3 is unzip it some place and then run it. I made a bin directory under my home directory so I wouldn’t have to worry about updates working due to permissions under /usr. I then popped up a terminal, navigated to the Aptana directory, and ran the AptanaStudio3 executable. The first problem was that it wouldn’t run. Bash complained that the command was unknown, even though my working directory was the command’s location. I’m constantly forgetting everything I know about bash and having to relearn it, and have no doubt this was my fault.

Strangely, navigating to the same folder in the… whatever the hell Ubuntu calls its graphical file explorer… and double-clicking the same file I was trying to run from bash worked just fine. This is one of the reasons I love Linux. You never have time to grow complacent. So the program ran and Aptana started up, and I saw the IDE and was thinking “Looks pretty good!” when a dialog popped up containing the following:

Launching Aptana Portal...' has encountered a problem. An internal error has occured. Details: An internal error has occurred. No more handlesNative code library failed to load. (java.lang.UnsatisfiedLinkError: /.../plugins/com.aptana.swt.webkitbrowser.linux.x86_64_1.0.0. 1334860664/os/linux/x86_64/libcefjni.so: libjpeg.so.62:
cannot open shared object file: No such file or directory)

You have to hand it to Linux. The error messages might scare an ordinary user back to his Mac in thirty seconds, but at least they give you some idea what’s going on. I didn’t like the look of this one because it sort of smacked of a dependency problem, and I hate those. It’s very easy to get the wrong versions of libraries installed in Linux when you’re not careful, and I’ve done it more than a few times. In this case, though, the solution was straightforward.

The file libjpeg.so.62 turns out to be part of a library called libjpeg62, and executing …

locate -i libjpeg

… showed that I didn’t have it. The solution was as simple as …

sudo apt-get install libjpeg62

… which command installed the missing libraries, and Aptana started without error. A couple of clicks later I had a quicky tutorial project running on the local development web server, and django was working. So far Aptana looks like a winner, even if it is based on Eclipse, but I’ll have more to say about that in future posts, after I’ve had a chance to get to know it better.

3 responses so far

Mar 25 2012

So-so On Metro

Published by under Programming,Technology

Back at the beginning of last summer Microsoft did a public preview of the Windows 8 user interface, and the world got a look at Metro apps for the first time. A number of people in the software business, myself included, came away with the impression that, at least as far as the mobile platform was concerned, the company was backing away from XAML and Silverlight in favor of HTML5 and javascript. Some of my colleagues felt that this was an overreaction. Certainly it was an early announcement, and there was very little information to go on. As a developer who had invested a fair bit of my career in the .NET framework and related technologies including WPF and Silverlight, I was of course interested to know whether I was going to have to throw that away and learn a new framework to write apps for Windows 8 mobile devices, but in general agreed that the best course was to wait and see.

With the release of the Windows 8 consumer preview back at the end of February wait mode was over, and it was time to see. A day or two after it was made available I cleared enough time to get it installed into a VirtualBox VM along with the Visual Studio 11 beta with support for Metro application development. That process wasn’t entirely smooth, which isn’t totally surprising given that both the operating system and development environment are pre-release software. I still can’t run reliably with the Oracle Guest Additions installed, so no widescreen for me. But eventually I was able to get it working well enough to start playing around with Visual Studio. After building a few tutorials and my own “hello world” style Metro apps, and after using Metro on my desktop for a couple of weeks, I’ve been able to come to some early conclusions.

The first and most urgent question, for us WPF/Silverlight developers anyway, is whether Microsoft threw our favorite stack under the bus. Well, yes and no. The .NET framework, WPF, and Silverlight are all alive and well, and .NET 4.5/C# 5 even contains some cool new toys, such as language support for async programming. However, WPF and Silverlight have no role in Metro app development. In fact the .NET framework has only a supporting role in Metro app development. This is because Metro apps don’t run on the CLR the way WPF and Silverlight programs do. Instead they run on something called the Windows Runtime. The WRT is a sandboxed execution environment for Metro apps. I almost said “mobile apps” but in fact Metro plays a big role in Windows 8 on the desktop too, which I’ll talk about more below. The WRT looks a lot like .NET in certain ways – you create UI markup in XAML or HTML and code-behind classes in C#/VB/C++/javascript – but there are a lot of differences too. So in the end, yes, you’re going to have to learn a new framework to write Metro apps. It doesn’t look like a huge hurdle for .NET developers, but there it is.

So with that out of the way, is it worth learning to write Metro apps? It will be worth it if there is a lot of demand for them. Metro apps can run on mobile devices like phones and tablets, and on the Windows 8 “Metro desktop” (for lack of a better term), so those are the markets where demand will have to arise. We can dispense with the last case first. When I first started using Windows 8 I specifically wanted to keep an open mind about Metro on a desktop machine, but having used it for a couple of weeks now my mind is becoming more and more closed. I don’t see the advantage of most of the Metro UI metaphors in a desktop environment, especially without touch. You end up moving the mouse around a lot more, and virtually every aspect of the design aesthetic for Metro apps is hugely wasteful of screen real estate in an environment where you have lots of it. I have two 24″ LCD monitors, and turning that real estate into a vast field of some cheerful color populated by a few tiles with really big fonts in them doesn’t strike me as a good return on my hardware investment.  Windows 7 is so good, and Windows 8 is in most ways such a minor delta from it,  that there is no way I would voluntarily upgrade just to get Metro. I suspect most businesses will see it the same way, and most consumers will get it on a new PC, if they get it at all.

If I’m right about that then what remains is mobile devices. I’m nowhere near enough the expert on those environments to predict whether Microsoft has a chance of driving adoption. But I know enough about business and markets to think they need a knockout to take substantial share away from competitors as entrenched as iOS and Android. I’ve developed iOS and Android apps, and have used both platforms on smartphone devices, though not tablets. I really don’t see what advantages Metro has in usability. Over the long run, though, I think Metro has a chance against Android, simply because the Android ecosystem is so fragmented. Apple has shown over the years, as has Microsoft for that matter, that tight control leads to a more polished user experience. Based on that I wouldn’t be surprised to see Metro gain some adoption over the next few years. It will continue to be a niche player for some time, however, and that means that developers who put time into learning WRT and Metro development will be speculating on its future success. Will that speculation deliver a big payoff? I guess it’s time to wait and see again.

No responses yet

Jan 29 2012

Fixing My House (or Maybe Not)

Published by under Notes & Asides

I was standing outside this morning, looking at my driveway, and it got me thinking about the nature of suburban property and the new realities we all face. My driveway, you see, needs to be replaced. It was resurfaced years ago with a thin layer of asphalt that was all the cheap bastard that owned the place before me would pay for. That layer is cracking off, the layer under it is dried out and fragmenting, and perhaps most critically the house has settled over thirty years and a portion of the apron near the garage now grades back toward the foundation. If you’re a homeowner, you know why that’s bad.

My house also needs new bay windows. Bay windows are a bad idea. Any boat builder will tell you that if you go to the trouble of building a watertight box, you ought to be very reticent about cutting big holes in it, and even more reluctant to hang cheaply-built wooden structures off of those holes. But that’s what bay windows are, and mine are rotting and need to be replaced. The list doesn’t end there. We need a new furnace, new windows, some interior drywall work to correct the effects of settling, a fix for a foundation crack, regrading in the back yard to fix a drainage problem, a new front porch and landscaping, and a thinning out of the many trees on the property so we can grow grass and stop our dogs from rolling in mud and wet leaves whenever it rains.

Our house sits on an acre of suburban land in northwestern New Jersey. Since moving in ten years ago we have already replaced the roof, the air conditioning system, the deck, and the garage doors. We’ve landscaped, planted grass and watched it die, and painted everything at least twice, inside and out. We’re on our second refrigerator, our third dishwasher, our second washer/dryer combo, and our second microwave oven. I have stopped counting toaster ovens and coffee makers since the numbers are large enough to be unwieldy. During that ten years, in addition to sloshing joint compound and paint on every vertical surface approximately as fast as my children could smash into those surfaces with hard, penetrating objects, I have fixed all three toilets at least four times, and put hundreds of dollars into minor plumbing, electrical, and carpentry projects.

Over the years I imagine I have spent $30-$40k on the place, and I could easily, and I do mean easily, dump another $50k in without even trying hard. The questions is: why should I? For a long time those of us who purchased single family homes in the suburbs viewed them as a form of wealth. Put in the money for maintenance, and the value of the property would increase and ultimately help pay for your kids’ educations and your own retirement. Like the stock market, gain was all a matter of appreciation. Like many of the public companies whose shares are traded on the market, my property doesn’t earn a dime. On the contrary, it costs me several thousand dollars a month in mortgage payments, utilities, maintenance, and the property tax payments by which I rent the right to stay here from the township we live in. If the value of my property doesn’t increase, then I’m never going to get a return on everything I’ve put into it.

And frankly, it seems unlikely to me that the value will increase. I was born in 1960, and my wife and I represent the very end of the baby boomer generation that bubbled into existence in the twenty years after World War II. We’re in our mid forties and early fifties, and our kids are either out of high school, or a year or two away from that milestone. As my generation passes into retirement, where will the families come from to drive demand for all the suburban single family homes that will be available? How can we expect the values of our properties to increase? It’s hard not to think that the great suburban land boom is over for good. And perhaps this should not be surprising. That boom, which largely consisted of people purchasing more land and more housing than they actually needed in order to gain better quality of life, could only have been sustained on the back of rising middle class incomes.

But middle class incomes have stagnated for well over a decade now. At the same time costs continue to rise at a steady few percentage points every year. It’s a game of economic water torture that can only end with exhaustion. I’ve got a few thousand bucks put away, and as I was standing outside this morning entertaining these thoughts, it suddenly seemed clear to me that the stupidest thing I could possibly do with that money is convert it into a new driveway and bay windows, or something to add “curb appeal.” It’s a fairly nasty Catch-22, because when you don’t put in the money to maintain a property, the decline in value only accelerates. Ultimately all you can do is hope to sell before the bottom, but in our neighborhood we already have one vacant place behind us that the bank can’t get rid of, and this is one of the more desirable areas in a state where the real estate market has always had a lot of resilience.

Faced with these realities, the possibility of a “Detroit-ification” of the American suburban landscape seems all too plausible. It would be nice to follow that statement with a prescription for what to do about it, but I have no idea what to do about it. We need a vigorous economy and rising middle class incomes. That should do it. How do you get back to those things? No idea here, or, I guarantee you, in our national capitol or any of the fifty state capitols. If we’re waiting for the right politician to pop up and rescue us it’s going to be a grim vigil. About the best I can suggest is to have a plan for either selling your property or making some money with it. Plans I have entertained include: starting a microbrewery in my basement, converting my attic into a shirt factory, and simply knocking down the house and landscaping the acre in hopes that, some day, a rich guy will want to incorporate it into his growing estate.

4 responses so far

Oct 18 2011

Upgrading my Desktop (and Other Anachronisms)

Published by under Notes & Asides,Technology

I’m one of those dinosaurs whose computer still exists as a collection of components mounted in a large aluminum box. Therefore, unlike the mobile device users who are laughing at the crusty immobility of my platform, I don’t have to throw the whole thing out when it gets too slow. I can fix it! Desktop computer builders fix their machines by upgrading them. Virtually every significant problem is a good excuse for an upgrade. It’s a testament to the quality of the components available now that my last upgrade was over three years ago.

I’m currently running an E8500 wolfie on an Asus motherboard with a P43 chipset and 8 GB of ram. The wolfdale has really been struggling lately. I have Visual Studio solutions that take 3-4 minutes to load. That’s unacceptable. I need more cores. I also have a GTS-250 graphics card w/512MB. Similarly unacceptable! Battlefield 3 and Skyrim are coming out. The latest generation of any classic game title also provides a valid excuse for an upgrade, and I have two coming at me. Clearly work must proceed on a component list forthwith.

But wait, it is a damn interesting time to be planning an upgrade. I don’t think I’ve been faced with this many tough choices in a long time…

Processor: I5-2500K vs I7-2600K

The 2600K is roughly $100 more, and clocks just .1 Ghz faster. It has hyperthreading on all four cores, and 2MB more L3 cache. I think that’s about it. Do I need hyperthreading? Four cores is a pretty good upgrade from my dualie already. Do I need four more virtual ones? Will I care about that 2MB of cache? I think I might. Leaning 2600K but not sure.

Chipset: P67 vs Z68

The P67 chipset is the tweakable “geek” version of the last Intel platform. The H67 was the mainstream “never touch the BIOS” version. The H67 supported the Sandy Bridge on-chip GPU, but the P67 did not. Now the Z68 combines the tweakability with the onboard GPU support and some drive-caching technology for SSD owners. Do I care about the onboard GPU? Not really, but it might be nice if my graphics card craps out. The rest of the stuff I don’t care about. Leaning P67.

GPU: 560ti/1GB

No real dilemma here. There’s zero chance I will pop for $300 -$500 for a GTX-570 or 80. Midrange for the win, and this will be a major upgrade over my GTS-250.

Monitor: too many factors to list

The monitor is really driving me nuts. I have a 5 year-old Dell 2405. It’s a slow panel, but it has served me well. I now need more screen space, and so I am adding a second display. The problem is that I detest 1080 line LCDs. Please. I had more lines than that on my NEC 17″ fifteen years ago! As a developer I need those lines. On the other hand I would love LED backlighting. It’s cooler and you get far better dark range colors. I would also like a fast panel. I would also like to match the 24″/1920×1200 of the current monitor, just for the sake of symmetry. Really have no idea which way to go here. Choices seem to be something like Dell’s 24″ S-IPS, which is 16:10 but fairly slow at 8ms, or the larger 25″ or 27″ 1080 (yeccch) displays from Acer or Asus.

I guess it’s nice to have choices.

No responses yet

Sep 29 2011

Steal My Copper, Please

Published by under Notes & Asides,Opinion

Copper is neat stuff. It’s malleable, ductile, resists corrosion, transfers heat readily, and can be easily soldered. In various forms it is incredibly useful. There are around 50 pounds of copper in an automobile, and 11,000 pounds in a diesel locomotive, for example. One of the less useful forms that copper takes is when it is extruded into long, thin wires, coated in insulating material, and strung between wooden poles to carry analog telephone signals. We still have one pair of these wires coming into our home, and I can’t for the life of me figure out why.

Our local carrier is Embarq, or whatever they are calling themselves these days (DinoComm? DustyLink?). For $30 a month they offer us a hard-wired circuit-switched connection to any local phone number I care to call. That is, assuming I remember the number, and don’t mind dialing it in manually. Thirty bucks a month. If I want to call any of the neighboring area codes, have voice mail, call forwarding, caller ID, etc., all of that is extra. We recently dropped all that stuff on our one remaining line. Before that it was $60/month.

Sixty bucks! That’s nearly half my Comcast bill, for a single lousy voice circuit. Really? I’m still paying these guys why? I can’t figure it out. We don’t even use the line anymore. Nobody uses the line anymore except a couple of marketing bots that hang up as soon as I answer (even the guys who write marketing bots don’t give a crap about telephones anymore). We use email, SMS texting, cell phones, and Skype for virtually all our communications needs. Skype is $29/year and I can call anywhere in the U.S. and Canada, with good quality, with one-click dialing, with video, and I can exchange text messages and files at the same time.

We came very close to cutting the cord completely a few months ago, and just couldn’t quite get there. It’s easy to generate doubt. What about 911? It doesn’t work on Skype but we all have cel phones and it does work on them. What about when the power is out and the computers are down? Well, the phone on the copper line is wireless and needs power too… and we have cel phones. All of the real questions have answers. Still, we didn’t get rid of it, and we’re still donating $30 every month so that Embarq can afford to scrub the rust off their trucks. It must be some sort of cultural nostalgia, or the communications infrastructure equivalent of apron strings.

According to the FCC (Table 2.2 Statistics of Communications Common Carriers) in 2006 there were 2.7 billion kilometers of metallic (mostly copper) wire in the physical plant of the country’s licensed local telephone carriers. I did a double take when I saw that number, and had to think about it a bit before I realized that this stat counts every conductor. If you look at sheathed metallic cable, most of which will have multiple conductors, the figure is 6.1 million kilometers. I googled around a bit on some stats for how much copper that represents, and calculated that it’s in the category of “metric ass ton.” If you want to get more specific, have fun with it. However you look at it, there’s a lot of metal hanging from wooden poles so that forgotten autodialers sitting in some dusty office closet can call me and hang up as soon as I answer.

Copper today is selling for $3.30 or so on the New York Exchanges. Next week in this space: the Post Office.

No responses yet

Aug 08 2011

Keep the Stars, I’d Like a One G Drive

Published by under Opinion,Technology

I have to admit, I’m a complete space geek. That’s one reason why I was thrilled to read this week about the Defense Advanced Research Projects Agency’s grand initiative to seek the fundamental science of interstellar travel, with the goal of developing the enabling technologies by 2111, one hundred years from now. This is good stuff. We need it, by God. In the middle of the last century John Kennedy challenged us to land a man on the moon, and that vision sustained America, in many ways, through some dark and divisive days. In this time of credit downgrades, defaults, unemployment, inflation, foreclosures, the snickering of our enemies, and the bickering of our politicians, an initiative that calls us to envision the greatness we might achieve in a century is more than welcome.

That said, I think I would have suggested a more reasonable target than the stars. I grant that “The Stars!” is a far more potent rallying cry than “A One Gravity Constant Acceleration Propulsion System!” Nevertheless, that’s what I would have suggested, and that’s where I believe our energy and resources ought to be focused. The stars may someday be accessible to us, but a high specific impulse one gravity drive would open up the entire solar system as soon as it was available. The math of constant acceleration is a wonderful thing to behold.

Start from a dead stop and begin accelerating at one gravity, or 9.8 meters per second, squared. In 10 seconds you are travelling 98 meters per second. In 30 seconds you’re moving at 294 meters per second, or 17 kilometers per minute. By the end of your first hour of one-gravity acceleration you’ve reached the blistering speed of 35,280 meters per second. That’s more than 126,000 kilometers per hour.  If you can keep this rate of acceleration up for a week you’ll be moving at more than 5000 kilometers per second. In about 354 days you’ll hit C, the speed of light in a vacuum. Well, actually you won’t, or maybe you will; we really don’t have any idea. But with a one-g drive we could find out in a year. A few years more could put a probe powered by such a drive in the Alpha Centauri system.

As cool as that sounds, the benefits of a one gravity drive don’t derive from streaking across interstellar space at the speed of light. The benefits lie right here in the solar system. Currently getting around the local neighborhood is extremely difficult for us. The reaction engines we have available produce many times one gravity of acceleration, but can only operate for very short periods at high rates of fuel consumption. That’s good, because we need such engines to get off the ground. Obviously if you light off a one-gravity drive at ground level the thing will just sit there and look imposing, and perhaps hum a bit. But once in space these low specific impulse (fuel inefficient) reaction motors become a liability.

Everything in the galaxy is in orbit around something else, riding around and around the inside of a deep well of space created by the gravitational fields of massive objects. The moon orbits Earth, which orbits the Sun, which orbits the galactic center, which orbits something much vaster that I am unfamiliar with. The center of a cluster or something. A spacecraft, once it is free of Earth, is another orbiting object in this vast dance. But, because it has power, it can do something no other object in the universe can do: it can decide to change its orbit. It can do this by applying forces to add to or subtract from its velocity. To put it simply, if you are in an orbit, and you add velocity, you move to a higher orbit. If you subtract velocity you move to a lower.

Because we can only burn our reaction motors for very short times, a human spacecraft that wants to travel from Earth to Mars, for example, has to use something called a Hohmann Transfer Orbit. To put it simply, because I am incapable of putting it other than simply: the spacecraft begins at Earth, sharing Earth’s solar orbit. It is then accelerated until it is in a higher solar orbit that meets with the orbit of Mars at some point in the future. It then coasts until it reaches the orbit of Mars, and decelerates to match Mars’ orbital velocity. Voila! And it only took five years! Yeah, Hohmann transfers are slow. First, you have to delay even starting until the objects are in relative positions that make the voyage practical. Then you have to boost yourself into a high orbit, switch off the motors, and just ghost along for years.

With a one-gravity constant acceleration drive the trip would be slightly more expeditious. You could calculate a trajectory through the solar gravity field that intercepted the object you wished to reach, taking into account deflection from other gravity fields, and then point yourself in the right direction and light off the drive. You accelerate at 1 G until you’re halfway there, and then turn around and decelerate at 1 G for the remainder of the voyage. The moon would be hours away. Earth to Mars? Something like three days. Mars to Jupiter? Maybe ten. Now that’s cool. Such a drive would instantaneously render the entire solar system open to human exploration and exploitation, and would lead to further advances that might one day actually take us to another star.

Exciting, for sure. Achievable? Make no mistake: a one-gravity constant acceleration drive of high specific impulse is magical fantasy. Perhaps it is slightly less so than a lightspeed drive, a warp drive, a transporter, or a holodeck, but it is fantasy just the same. Still, if we’re going to set a very high, very long term goal, I think this is the one to shoot for. We may very well never get to another star. Even if the challenges of distance, time, and velocity can be overcome, the remaining technical challenges of fuel consumption, heat dissipation, hull integrity, radiation, communication, and a hundred other problems might very well be enough to keep us home.

By contrast, we already know pretty well how to survive and navigate our own solar system and return home safely. We simply lack the power to do it in a reasonable time. If we were to gain that power, it would be of far more immediate benefit to the human race than reaching another star system. It would open the vast resources of every corner of the solar system, and if there is other life to be found in the galaxy, mastery of our own system would set the stage for someday encountering them on more equal terms. The stars might make a more compelling objective, but a one-gravity drive is really the key to a human future in space.

No responses yet

Aug 01 2011

Ineffectual Ventures

Published by under Opinion,Technology

Here’s a question: what do you do after you’ve made it? I don’t mean had a couple of wins and put a few bucks in the bank. I mean absolutely, unequivocally, ball-out-of-the-park made it? Dr. Nathan Myhrvold, the former Chief Technology Officer at Microsoft, has definitely made it. He leveraged his massive intellect and first-class education into a career at the hottest startup of his era, and in the process made hundreds of millions of dollars, at least. So what do you do after you’re done with game seven of the series and emerge the big winner?

For Myhrvold’s former boss Bill Gates, his friend Warren Buffet, and many other very wealthy individuals, the answer has been philanthropy. For some, like Steve Jobs, it’s a second turn at the reigns of the horse you rode across the finish line in the first race. Others are serial entrepreneurs. Not a few have embraced the greatest challenges of our time. Paul Allen and Elon Musk build spaceships. For many of the newest mega winners, such as Mark Zuckerberg, the question remains to be answered. What about Dr. Myhrvold?

According to a recent investigative piece by NPR, the answer appears to be, at least in part: buy up a huge number of patents and go fishing for dollars. Myhrvold’s company Intellectual Ventures was ostensibly founded to be an incubator for innovation, and indeed it is involved in a lot of interesting projects, many a good bit more relevant to humanity than the world’s most expensive cookbook. The company holds around 1,000 patents on original work, which is pretty damn impressive. On the other hand it has purchased over 30,000 patents for it’s portfolio, and has allied with a shadowy network of employee-less patent trolls (many located in the same building full of empty offices in the Texas town of Marshall) to monetize those intellectual properties through the usual mechanism of threatened litigation.

I don’t need to address here whether software patents are a good or bad thing in themselves. I instinctively don’t like them, but on the other hand I’m a believer in the idea that software is analogous to machinery. If it’s machinery, then why shouldn’t it be patentable, as machines have long been? The question is troubling to me, but it is deserving of its own debate. The issue here is not whether software patents are right or wrong, but rather that the process by which they are currently granted is completely broken. There are patent trolls out there right now suing for license fees on ideas as basic as popping up a tooltip when the mouse is moved over a rectangular area of the screen. The NPR piece talks about a guy who literally has a patent on just about everything everyone does online. Myhrvold’s company used to own it.

It doesn’t take a genius with a doctorate to know that the system is broken, and that patent examiners are unable to accurately judge prior art, or whether what they are seeing is really a unique design for a new machine or process. My own work has been cited in five granted software patents. The articles cited in the patents were all written back in the nineties for journals like Computer Language and Dr. Dobb’s. There’s not one line of original work in any of them. I wasn’t doing original work. I was summarizing technologies for readers who wanted to understand them. I didn’t discover or invent anything, or lay the foundations for anything to be discovered or invented. So what is my work doing in patent disclosures?

That’s the problem, and it’s why I was disappointed to read what Intellectual Ventures has been up to. I have long been an admirer of Dr. Myhrvold, albeit one who will never spend $600+ for his cookbook. I have heard him speak, and read what he’s written, and I don’t believe he can convince himself that the actions of his company are encouraging innovation, or supporting the efforts of small inventors. They certainly could do that. There’s nothing wrong with their model if it is pursued honestly. But they are trolling with a wide net, and catching too many of the wrong kinds of fish.

Patents were originally intended to encourage innovation by offering protected disclosure of methods and processes. Nothing is disclosed when a patent is granted on something basic like tooltips, or remote updating of software, because nothing needed to be disclosed. We all already know how to do those things, which is a pretty clear indicator of prior art. The effect of these patents is simply to erect private tollgates on well-traveled roads. Good software patents might be healthy, but bad software patents are definitely unhealthy, productive of a relationship more parasitic than nurturing. The NPR piece is conclusive, as far as I am concerned, with respect to Dr. Myhrvold’s participation in this business. That’s too bad. With his mind I have no doubt he could make himself another billion or two, and in a much more productive and satisfying way: by inventing something cool.

No responses yet

Jun 17 2011

Windows 8 Hurts My Brain

Published by under Opinion,Technology

At D9 Microsoft showed the Windows 8 UI for the first time. All the attention was on the touch-oriented “Live Tiles” interface. Business Insider and some other pubs have taken to calling it “Windows 8 for Tablets.” I don’t know if that’s what it is. About all I can tell is that the Live Tiles interface is supposedly an addition to, not a replacement for, the native Windows UI. That’s good. Getting all touchy-panny with some pretty photos on a ginormous wall screen that costs more than my truck is impressive, but it doesn’t mean much to desktop and laptop users.

Live Tiles on desktops and laptops makes about as much sense as wings on a Hyundai Sonata. Microsoft has said that Windows 8 will run on some different processors, i.e. ARM, Intel system-on-a-chip, whatever. Those aren’t running Alienware gaming boxes. So is this meant to be the UI of the mobile version of Windows 8? Who knows? Is it Windows Phone 8? Apparently not. When asked how developers would write applications for the new Windows 8 UI the company said “HTML 5 and javascript.” Developers and some industry pundits interpreted this to mean no Silverlight for Windows Phone apps. To many people this seemed to make sense, given the expansion to new hardware platforms.

But hardware independence is what .NET, the CLR, and Silverlight are all about. Programmers have invested a lot of time learning the technology stack. When Microsoft released Windows Phone 7 they built the application model and UI on Silverlight for Windows Phone. Developers could leverage everything they new about C#, XAML, and the Silverlight version of the framework to write apps for the mobile platform. Then those apps could be submitted to the shiny new Microsoft app store and start generating iOS-like sales. Now… what? The native mobile interface to Windows 8 will be HMTL + script, but you’ll be able to run Silverlight apps too?

According to some comments I’ve read Microsoft has clarified their position and said that there “will be a place” for Silverlight apps on Windows (Phone?) 8 (for Tablets?). I can’t find any direct quote. On the Silverlight forums the official response has essentially been: we can’t talk now, but don’t believe everything you read, and we’ll say more later. But they’ve said too much already. Why launch a platform and all of the tools to support it, and then make such a radical change in the next version? Has Microsoft figured out that they can’t build a native app ecosystem, and decided to attack Apple’s by promoting HTML 5 and javascript?

I’m not sure, but they’ve at least given me another good reason to continue my efforts with iOS, HTML 5 + JQuery, and Android. Why invest in native Silverlight apps for Windows Phone 7 if Microsoft won’t clearly commit to carrying forward the key components of the platform or building the ecosystem?

3 responses so far

May 31 2011

Jersey Sore

Published by under Notes & Asides,Places

I’ve lived in New Jersey now, off and on, for nearly twenty years, but I’m not a native. I was born in Michigan and have at various times lived in New York, Indiana, Rhode Island, Maryland, California, New Hampshire, and the British Virgin Islands. None of the places I’ve lived has been perfect. They all have their good and bad points. When it comes to New Jersey, though, nobody seems to acknowledge the good. From comedians to columnists to Internet forum posters the standard line is that New Jersey consists of a single strip of industrially polluted concrete running from New York to Philadelphia, studded with chemical plants, refineries, landfills, and tanning salons. Now, thanks to MTV’s “Jersey Shore,” everyone also thinks that the open space between the salvage yards and tattoo parlors is crammed with orange-tanned goombahs sporting oily hair and neck chains.

If that’s your view of New Jersey, then rejoice. Your ignorance quotient is about to be attenuated significantly. You’re about to learn that not only is New Jersey nothing at all like the popular stereotypes would have it, it is in fact one of the most beautiful places in America. From the mountainous Highlands of the northwest, to the fertile rolling hills of the midlands, and the vast undeveloped tracts of pinelands in the southeast, New Jersey combines a little slice of everything that is best about our continent. I won’t ask you to take this on faith. In order to make my point I’ve combed through thousands of pictures of the state that I have taken over the years, and selected fifty that I think show a New Jersey most of you don’t know exists. This is the New Jersey that I know, and I’d like you to know it too.

Click here to launch the slideshow

When you’re through enjoying the images, consider this: all that beauty, the pines, the highlands, the hunt country, the Delaware River, Delaware Bay, miles of shoreline, all of it, is within 1-2 hours of New York City and Philadelphia, and 3-4 hours from Baltimore and Washington, DC. In other words, we win. We have our share of problems, to be sure. Taxes are too high, and we have a lot of challenges in terms of how to maintain economic growth and rebuild infrastructure… but then so do the states most of you live in, and our Governor doesn’t have a secret second family. Yet. So the next time you see some Jersey-hater hating, point them toward this post so they can get some education. Better yet, come visit yourself. Then you’ll know what I’m talking about.

5 responses so far

Older Entries »