Software

You are currently browsing the archive for the Software category.

It occurred to me that by keeping launch dates secret, Apple never appears to suck at software estimation. Microsoft gives a date, sails right past it, and everyone is up in arms about it.

A better question is why doesn’t MS keep things secret? Or all software companies, for that matter? I know with sales, everyone wants to know when the next version is out so they can hold off on buying the current one. Or the sales person tries to keep you from buying their competitor’s product because their next version will be much better. But everyone knows there’s no guarantee of that happening, and there’s a potential opportunity cost in waiting. And since the estimates that drive the schedule were done by the wrong people at the wrong time, without being updated,1 you’ll probably be waiting longer than they claim.

I think the best policy would be to launch whenever it’s ready, and everyone who purchased within the last 60 days – or better yet, has a support contract – gets the new version for free.

Of course, this only applies to software. For hardware, you’re forced to apply common sense: do I need this right now? Does it do what need at a fair price? Or you can visit http://buyersguide.macrumors.com/ and hope they’re right.

  1. See the Estimation section of Facts and Fallacies of Software Engineering. []

I recently had some more frustration with Eclipse, with no solution on the web, so I’m posting mine.

The problem:

I had an auto-generated task (TODO) from creating a class that implemented an interface. At some point, I noticed the task comment was gone, but the task indicator (checkbox icon) was still there. Probably because I have it set to reformat on save, but maybe I deleted the task comment without hitting the task button (or both). Anyway, I could not clear it no matter what:

  • Double clicking the icon didn’t work since it couldn’t find the comment.
  • Clicking the “Clean and Redetect Tasks” button did nothing.
  • Restarting Eclipse (which I do more often than a Windows admin reboots), did naught.
  • The Task View displayed the offending tasks, but the Delete option was greyed out. Selecting the task and hitting delete 3 million times while cursing furiously at the screen brought no justice.

The solution:

  1. Go to Window >> Preferences, then Java/Compiler/Task Tags. Select the TODO task tag, or whatever accursed tag haunts you.
  2. Click Remove. When it threatens a rebuild, call it’s bluff (that is, agree). When it’s done (and it took its sweet time), the offending tasks will be gone. Rejoice!
  3. Click New… and restore the TODO tag. All legitimate TODO tasks will be restored.  Callooh! Callay!

keywords: can’t delete tasks, task tags, eclipse 3.4, mylyn

Tags:

I had this idea and considered creating it as a service, but I’ve got my own web startup going and don’t need the distraction. Several sites, such as Zap2it, TV Guide, and TitanTV (beta) already have the infrastructure (as well as the TV listings I’d have to license) so hopefully this won’t be too hard for one of them to implement.

I’m looking for a clone of the Tivo Wishlist. The difference is that instead of recording, you get email alerts. I imagine if you have a DVR/PVR that is internet programmable, the service could take advantage of that, but I’ve got my cable company’s DVR (Scientific Atlanta) like most people and must program it with the remote. So this provides a wishlist feature for everyone without a Tivo, which I think is compelling.

The search features of current TV listings sites are missing critical fields for a wishlist to work (not to mention the email reminder part). Filtering (both inclusive and exclusive) by genre and channel are required.

Here are a couple strong (IMHO) use cases:

  • You want to be notified if anyone on a list of people is scheduled to be on a talk show. You enter description:”Quentin Tarantino, Kevin Smith, Judd Apatow” and genre: talk and every time any of them appear on a talk show you’re notified. If Tarantino’s Reservoir Dogs is played on HBO, nothing happens.
  • You’re planning a vacation and you want to record travel shows about various places. You enter keywords:”Prague,Tokyo,Paris” and interest:travel (or perhaps channels:travel,discovery,tlc,pbs) and you get notified for any travel shows relevant to you.

Of course, the above would be done via a nice GUI/query builder.

When you get your email, there would be links to hide/exclude shows in the future, which is useful for anything that gets rerun frequently (especially basic cable shows).

You can monetize this through targeted ads, since the user is telling you what he/she wants.

Another service would be to send a post-mortem email that includes links to the shows you want on Hulu, YouTube, the network’s website, etc. after they’ve been uploaded.  At that point you’re much closer to a real Tivo service and could possibly charge for it. Possibly.

I should point out that Tivo’s own advanced search is great and includes categories (and subs) and is open to the public.

And if you are only interested in the talk show part, you can set a calendar reminder to check the talk show lineups page once a week. However, I’d much rather have something automated that allows me to set it and forget it.  I could probably whip up a script to parse that page and run it as a service/cron job to notify me when there’s a match, but still, it would only work for talk shows. And parsing poorly formed HTML is a pain.

No, the easiest solution is to convince someone else to implement it for me :)

Update: If you want to see Yahoo TV implement this, upvote it here.

Tags: ,

That question was posed on the LAJUG mailing list in a response to a rumor about IBM buying Sun. I think it’s clear that Apple doesn’t really want to get into enterprise computing. Their entry, the OS X Server, at that price point, shows they are not serious about it.

This may sound ridiculous, but I believe Apple doesn’t think enterprise computing is a cool enough market to enter. They really seem to love being in the spotlight with consumer products. And the fact that the art and entertainment industries use their stuff. It’s glamorous and I don’t blame them for it.

Because of all that, acquiring Sun, or even merging with them, doesn’t make strategic sense. The only major synergy would be Apple’s GUI and integration from their server OS added to Solaris. Sun would lose training income driven by an OS that’s unwieldy to manage, but they could charge for it as a product. It would certainly save their customers money on admin labor costs. However, they could probably license that from Apple and avoid a fruitless merger.

In addition, Sun is a bigger pill to swallow than most realize. IBM is much better suited for them. And despite heavy list traffic on the subject, I haven’t heard anyone voice their opposition to the idea.

I’m starting a new project with some new (to me) technologies and finding the start up process – setting up my IDE and build script to play nice together – to be somewhat frustrating. I kept thinking to myself, “Somebody already solved this; wouldn’t it be great if I could grab their project and just start coding?”

My idea is for a directory of Java example projects.1 It would make it easy to search projects by stack: IDE, tools, frameworks, libraries, and app server. Projects would include the minimum to show the integration points. The directory would also have basic social features: a way to vote up projects and a forum for discussing integration, setup, and architecture best practices. This is probably something a CMS expert could tackle fairly easily.

I admit there are a few problems with this idea. People expect to thrash around during project startup. They learn from it. When it’s over, they start doing real work. They probably don’t want to share their lessons learned. Those that do are typically evangelists for a particular framework. Spring, as an integration framework, comes to mind with its Pet Clinic and Pet Store examples. Hibernate’s Caveat Emptor is probably the best example app I’ve seen. AppFuse also demonstrates integration, although earlier versions seemed more explicit (the new version built with Maven seems to hide a lot of the details).

However, these apps don’t cover IDE configuration, and the IDE/build tool mismatch problem is where most of the difficulty lies. The most important IDE features, IMHO, are incremental building for syntax checking, and debugging. So you have this natural duplication of effort. The IDE/build script conversion tools (in either direction) seem narrow in scope; granted, I’m limiting myself to Eclipse/Flex Builder to/from Ant. I don’t know if full integration between the IDE and the build tool is the answer, but it would certainly go a long way in making things easier.

In the meantime, however, a project directory would be a welcome resource.

  1. You don’t need to host the projects themselves when there are already sites like code.google.com and Source Forge. []

Tags:

Joel Spolsky recently posted a transcript of a conversation he and Jeff Atwood had on the Stack Overflow podcast.  It’s a nice reminder to think about the situations where unit tests add value and where they add maintenance hassle.

The takeaway was that there are a few places where code coverage makes a lot of sense because change is rare and breakage has a big negative impact. These include APIs, especially plugin architectures where others are depending on the contract of your code, and mature business logic that should rarely change.1 You really want to think about the number of people or LOC that are depending on that code to work.

In contrast, there are a lot more places where you’re slowing down your coders and their ability to respond to customer needs.

Another contradiction Spolsky suggests: many of the same agile programmers who espouse YAGNI require an arbitrary percentage for code coverage (often close to 100%). Shouldn’t YAGNI also apply to unit tests?

I believe the key is simply thinking about what you’re doing. Here are some guidelines:

  • If it’s foundation code (frameworks, libraries, etc. – anything that gets called a lot) write the tests.
  • If you’re about to refactor the code, write the tests.
  • Even if you’re not going to write the test, channel the spirit of Test First Development – design the code so that it’s easy to unit test should you have to later on.

I realize this might sound obvious, but a) not everyone agrees with this, and b) sometimes you can lose sight of what’s “obvious” when others are persuasively defending blind adherence to “principles”.

  1. Like, say, the state mandated 7-day waiting period for the purchase of weasels. []

Tags:

So I’m coding along and all of a sudden, Eclipse (3.4) can’t resolve classes. Classes that are in the same package as the class I’m editing. Classes that are fully qualified in the import statement.

Not good.

The last thing I had done was add a Spring @Autowired annotation. I saved the file and voila, everything goes to crap. I then spend a stupid amount of time trying to track down the cause. I took the changes out. I did a clean and rebuild and retest (everything passed; this was Eclipse-only). I added new classes to see if they broke (they did). I did a false modify (add space, remove space, save) to see if that broke said file (it did). It was a death spiral. No matter how I changed the code, the same problem was there.

Turns out, it wasn’t the annotation, or anything else in Spring, or any of my code, or any of my Eclipse plugins. It was a step before that killed me. I was doing a little cleanup and I created a temp directory at the top of my project folder so I could move some files there. It wasn’t nested in anything, other than the top level directory. What could go wrong?

Apparently, that makes Eclipse see red. Squiggly red.

The solution was simply to do a refresh (F5) on my project. Just as quickly as it started, the problem went away. That smells like a bug to me, but if it was I figure I’d see a lot more mentions in Google or the Eclipse bug tracker. I’m really hoping this helps someone save some time.

Update: If that doesn’t help you, see more solutions in the comments. Thanks to those who contributed them.

Keywords: false error, bogus error, eclipse bug

Tags: ,

In IT (as in most industries), there are many factors to consider when choosing a new technology. One must carefully consider cost, features, ease of blah blah blah who cares? The only thing that matters is: will this look good on a resume?

Enter Indeed job trends. Indeed is a job website that searches many databases at once. They have launched a nifty tool that allows you to graph job trends based on keyword; it even does comparisons.

Comparisons are perfect for choosing technologies. To do a comparison, you separate keywords with commas. You can also have multi-keyword searches by separating them with spaces. And you can quote exact phrases. Yeah, that’s not terribly clear so I’ll just give examples.

Consider the many technologies used to create rich internet applications (RIA). It’s ridiculous. You want to know what’s in demand and what’s gaining ground. I used a context keyword in my search phrase since some frameworks use common words with multiple meanings (dojo might be found in karate instructor jobs, flex in body builder jobs, etc.). So requiring “ajax” to be in the job description makes the search more relevant:

ajax scriptaculous, ajax yui, ajax dojo, ajax flex
Scriptaculous, YUI, Dojo, and Flex job trends

Here we can see that my choice to begin Flex 3 classes was freakin’ brilliant.

Since these are statistics, they can help persuade others by lying. For instance, two popular Java build tools are Ant and Maven. You want to use Maven 2 because it’s newer so it must be better. Let’s compare:

java maven, java ant
Maven vs. Ant job trends

Crap. That won’t help convince your boss. Which is bad, because the real reason you want to use Maven 2 is that you’ve heard Atlassian uses it, and you want work for them so you can move to Australia and be around sheilas with cute accents (never mind the spiders the size of small dogs). No worries, Indeed has you covered. Just change the scale from Absolute to Relative:

Maven vs. Ant job trends - relative comparison

Wow, Maven is taking off like crazy – 600% job growth! That totally makes up for Ant having 4 times as many jobs. And this technique works with every other cutting edge framework and tool. I mean, it has to; that’s just how math works. You go from zero jobs to some jobs, that’s like infinity percent increase for significantly small positive values of zero. Math doesn’t lie.

Hopefully by now you’ve realized I’m employing some tongue in cheek humor. At the same time, being able to chart industry trends is valuable for both your business’s technical strategy and your career planning. Use it wisely.

Tags:

OK, so this blog is starting to look like the Steve Yegge Fan Club, and I’m only 3 posts in. Lucky for me, I don’t care.

Steve recently wrote a compelling post on the next big language. In my first post here, I bet that Java would be dethroned within 5 years, and Steve appears to agree. Now, he doesn’t mention which language he’s talking about, but if you read the comments (those on-topic; not those wondering how he got a hot wife), it’s pretty clear he’s referring to ECMAScript 4 (ES4), aka JavaScript 2 (JS2). If you don’t think it’s clear, I suggest you actually read the article, then his other articles (including the brilliant drunken blog rants), then Brendan Eich’s presentation on JS2. [1] At this point, it should be crystal.

As I’m always on the lookout for the next language to write my masterpiece in, this launched yet another info hunting/gathering session. JS2 looks to be a pretty nice language, the syntactic love child of Java and JavaScript, with some other goodies thrown in. And I never had a big problem with JS1.x. In fact, I’ve got solid anecdotal evidence that just about everyone who hates JavaScript never bothered learning it like a real language, picking up the rhino book and reading the gory details section. The haters all see JS as an obstacle, a necessary evil thrust upon them by the need for client-side validation, so all they do is blindly stumble around, trying to twist some working script to their needs. Yeah, some haters are cunning programming linguists who hack out parser generators while waiting for their triple-grande cafe Americanos, but they’re a tiny minority. Plus, they hate all languages.

Anyway, I found out a lot. ES4 is already available, (more or less, as the spec isn’t finalized) in Adobe’s ActionScript 3 (AS3). Yes, the language used for Flash. Adobe built a virtual machine for it, codename Tamarin [2], aka AVM2. It’s been embedded in Flash 9, and it’s supposed to be wicked fast. It’s also been open sourced and donated to Mozilla, so it should show up in Firefox 3. [3] Frank Hecker wrote a nice piece on what impact this will have.

So soon you’ll be able to use the same language for Flash apps, Flex 2 apps (which is a lot more up my alley), and AJAX. That’s a big motivator to learn it.

The only place it’s missing is the JVM. Now, if you read carefully, Steve said it would launch on the JVM. Unfortunately, I’m not so sure. Rhino, the embedable JS interpreter/compiler for the JVM, can only handle JS 1.5. I figured, hey, they just added it to Java 6, of course they’ll maintain it and keep it up. But we’re up to JavaScript 1.7, and it’s still not there. So I focused my search for a Rhino roadmap, and you know what? There pretty much isn’t one. The best source I could find was this thread on mozilla.dev.tech.js-engine, concerning the implementation of ES4 features in Rhino. I found it scary for a few reasons:

  • There appears to be only one active committer, and just a few other helpers. Apparently Sun does not have any engineers devoted to Rhino.
  • Modifying Rhino to handle ES4 is a daunting task. Rhino was initially a straight port of Spidermonkey, which was written in C.
  • The other option suggested is creating a straight port of Tamarin. Tamarin was written in AS3, essentially JS2, which should be easier to port to Java than C was. But it’s 135,000 lines! And in a much terser language than Java! So who knows how many lines the port will end up being. An AS3-to-Java compiler seems like it would take less time, but that still sounds like a major effort.

I’ve also seen a couple instances (PHP, Python) where someone connected Java to a native implemenation of a language. Perhaps they could do that with Tamarin, although I wonder about the performance. Would it be better than a Java implementation, or would the overhead hurt it too much?

So I’m bummed, as I’m looking for something to help me script Java (actually, replace it in the middle – and possibly presentation – tier), but I don’t want to choose a dead platform. To use JS2 server-side I’d have to give up Java altogether, and that seems like cutting off my nose to spite my face, or throwing the baby out with the bath water, or some other such calamity. There are just too many Java FOSS libraries, which solve really hard problems, that I’d have to give up.

So I’m going to have to size up JRuby some more, and perhaps do a bit more digging on ES4, before I make any rash decisions. Procrastination wins again!

[1] BTW, the presentation uses some new HTML/CSS/JS document format to replace PowerPoint, and you have to point your mouse in the lower right to pop up the controls. Crazy frustrating if you don’t know that.

[2] It’s a monkey, like Mozilla’s C-based JavaScript engine Spidermonkey. Not tamarind, the seed that makes a delicious sweet and tangy sauce for my samosas.

[3] If Microsoft was smart, they’d use it for IE8, assuming that’s legal and wouldn’t cause Mr. Gates to have an aneurysm.

Tags: ,

Steve Yegge has a comparison of various languages for the JVM. For the comparison, he creates an actual Swing application, so if the language couldn’t handle that, it didn’t get included. Since the objective was to find a language capable of replacing Java on the JVM, it’s a reasonable criterion. He’s not finished, but he goes into depth on languages he does cover. I’m sure I’m not the only one anxious to hear his opinion of JRuby. Whatever he writes about it, though, couldn’t be worse than his damning review of Groovy.

To give you a taste of Steve’s writing style, here’s something from his Java wishlist (yes, Java 5 was included in the shootout):

#2: Bean shortcuts — C’mon, Sun folks. It’s practically the first thing people change about Java when they write a JVM language (or even an interpreter like BeanShell). Even small children can tell you that accessing a property using field-access syntax beats calling a getter or setter method. The only possible explanation for why Sun hasn’t added this yet is that they hate us.

Tags:

I thought I’d kick off this blog explaining my tech choice. I had planned on using Roller, because it’s written in Java, and many large, multi-blog systems (JRoller, Sun’s employee blogs, others) use it. I thought I could mess with the code if I felt like it, maybe learn a few things. Per my usual M.O., I donned my trusty loincloth and went on a info hunting/gathering expedition. The short of it is that Roller just wasn’t meant to be used as a personal weblog you host yourself. [Actually, it was conceived as a demo program for an article on how to harness Java FOSS to build apps.] Just look at the installation requirements and you’ll understand. It’s pretty much expected you’ll just sign up for a blog on JRoller or Java Lobby, which is admin free, and maybe you get a little exposure. Well, I felt that Java wasn’t my main topic, so I didn’t want to get lumped in there. [At some point I'll write why I think King Java will lose it's crown within 5 years.] And I wanted my own domain (which is awesome, you’ll agree).

I went through something similar with the last blog I set up, looking for a content management system with all the features I wanted. I got very hung up on all sorts of security requirements, probably because my day job involves tons of that in our web apps. That and my fear that a potential client or employer will discover I actually have opinions, and decide I’m too much of a risk to hire. Then I remembered that public content was the whole point of a blog, and if you don’t want your mom reading it, you probably should just leave it – or your real name – out of your posts. Another time saver: remember that as long as basic usability is followed, users (readers) don’t really care about presentation. I’m lauching a blog, not WiReD Magazine or the next social networking service. [I might also launch those things someday, but not today.] Back then I settled on Movable Type for ease of use.

Now I’m settling on WordPress for ease of use. I’ve set WP up several times now, and I’ve got it down to about two minutes, now that the database is set up. First time installation was five minutes (had to read the docs). And WP actually has way more features than JRoller, and a thriving plugin and theme development community. And unlike MT, it’s free . Not that MT is expensive, mind you, but my math skills have not deteriorated to the point where I can’t see a bargain when it bites me on the nose. It was so good that I converted the other MT blog to WP with reasonable success. [Note to those considering: do not skip the step where you convert the file to UTF-8 with iconv. All "special" characters like apostrophes turn into question marks. Very uncool.]

So if you’re setting up a blog for yourself, think hard about whether hacking its source is a necessity or just a phantom requirement. And if you believe it’s a necessity due to some missing feature, I bet somebody already wrote a plugin for it.

Tags: