May 18 2009

All Code is Inherently Evil

Here is a snippet of a conversation I had on Twitter about code. I thought it was interesting how my conclusion lead to a belief that all code is inherently evil. Maybe I went flew off the rails on that conclusion, but if early optimization is the root of all evil… how evil is regular code?

  • @techknow: Less code is the best code.
  • @Archimage: So you are saying that no-code is the best code ;-) (yes I know what you meant).
  • @techknow: The inverse of this means that any code is bad code. Sort of like Original Sin of Code!?
  • @Archimage: Which implies it can be made better.
  • @techknow: Only if it repents.

In the following snippet of conversation, @newparadigm introduced me to Let Me Google That for You (lmgtfy.com). This site animates someone typing a search term into a page that looks like Google and hitting the search button. If anyone ever asks you what the private keyword is for, just direct them to Let Me Google That for You!

  • @techknow: There might not be any stupid questions, but it is a lot smarter to find out the answer yourself!
  • @newparadigm: AGREED – http://tinyurl.com/ppe44x (lmgtfy.com)
  • @techknow: LOL that’s kewl! If anyone ever asks me a simple question question I am going to send a link to Let Me Google That for You (lmgtfy.com).
  • @newparadigm: haha. my boss only had to send that to me once before i stopped asking questions before my own research!
  • @techknow: If this only worked with or internal wiki, it would make me 20% more productive.

If you like to chime in with our thoughts about code, process, management, and just about anything else, hit me up at techknow and juixe on Twitter.


May 15 2009

RailsConf 2009 Presentations

If you missed RailsConf 2009 earlier in the month, Blip.TV has a few of the RailsConf presentations online so that you can catch up. Here are some of the highlights from RailsConf 2009.


May 14 2009

The Free Technology Conference

Large conferences such as JavaOne or Wordwide Developer Conference can cost over $1,000, just for the pass alone. When you add air fair and hotel accommodations this can easily reach over $2,500! This is all well and fine if your company is going to reimburse you. But during these tough times companies are making all sorts of cuts.

There are plenty of regional conferences such as MountainWest RubyConf and Gold Gate Ruby Conference and conferences tours such as No Fluff, Just Stuff and Future of Web Apps that are more reasonably priced. But even at $99, there are cheaper alternative options!

Find the local user group for the technologies that you are interested. User groups typically meet up once a month to discuss latest trends and demo recent products. No matter where you live, there is probably a Java or Python user group. If there isn’t one start one up and coordinate using blogs, forums, meetup, and Twitter.

In addition to user groups, I’ve attended to barcamps and unconferences. There are all sort of regional barcamps organized around all a variety of topics. When the iPhone first came out, I attended a barcamp in the Adobe office in San Francisco were geeks got together to experiment, collaborate, and program.

If you live close to a university, the Computer Science department might offer a colloquium series where they bring on different speakers, from entrepreneurs to visiting professors.

In addition to user group meet ups, barcamps, and academic presentations, there are tons of video presentations from top quality presentations online. Many of the presentation put on by Google are posted on YouTube under Google Tech Talks. You can find some of the RailsConf 2009 presentations on Blip. Confreaks has a slew of videos from all sorts of Ruby conferences such as Goruco and MountainWest RubyConf. If you want to catchup with the content of from a recent conference, but for whatever reason you are not able to attend, don’t feel left out. Most presenters put up their slides of their presentations, and many conference organizer put up video of the presentations.

These are just a few ways that you can keep up with the developments your field.


May 14 2009

Lookup Pattern and Java Generics

In some situations I dislike the verbosity of declaring Java generics.

Map<Key<String, Integer>, List<Item>> m = getItemsMap();

But using Java generics reduces other forms of tedious class casting common when using List and Map objects. For example, in my current project their we use a Lookup pattern, used to locate concrete implementation to certain key services. For example, to read and write application data we use a FileService which we can get via the Lookup class.

FileService fs = (FileService)Lookup.lookup(FileService.class)

These services we lookup are stateless and we can switch the underlying implementation by modifying some configuration file. In terms of this discussion, I wanted to note that casting. Using Java generics that cast is not required if you use parameterized types. Notice that the key of the lookup is a Java type, in our application it is an interface which the underlying implementation class needs to implement. As you can imagine, the implmenation of the lookup method can be simplified to the following…

public static Object lookup(final Class type) {
    // compoments is a map of implementation service
    Object comp = components.get(type);
    return comp;
}

Using Java genetics we can use the class information in the parameter to cast the return type correctly. We can remove the required class cast by updating the code that locates the required concrete class for the service requested. Here is a simplified version of the lookup method which removes the need to cast.

public static <t> T lookup(final Class<t> type) {
    T comp = (T)components.get(type);
    return comp;
}

Now, using this updated lookup method and employing Java generics our lookup can be of the following form.

FileService fs = Lookup.lookup(FileService.class);

May 14 2009

Conference as a Business Model

There is an interesting rant over on Coding Context on how Joel Spolsky and Jeff Atwood are brilliant assholes because they are organizing Stackoverflow Dev Days. It may be true that Joel and Jeff are self obsessed ass wipes, but I am note sure it is because they are trying to cash in from the inadequacies and inferiority complex of other developers.

Micah, the guy behind Coding context, brought up the point that the guys behind the Stackoverflow Dev Days conference are exploiting their developer community to build their personal brand. According to Micah’s calculation, the series of six conferences can net nearly $200,000 and as of yet they don’t even have the presentations or speakers lined up!

Personally, I am put off by their floating point error size ego, dismissive attitude, and general writing style while a loyal following finds them eloquent. That said, Micah is totally right, they are building their brand! There two respective blogs attracts a large portion of developer eyeballs. Their joint venture, a question and answer site for developers, gets millions of hits monthly. In addition to this, Joel Spolsky runs a job board which he claims has made him over a million dollars. But is this all bad? Is this devexplotation?

In regards to their tech days, they are not the first to realize that there is good money in running a conference, look at Future of Web Apps, No Fluff/Just Stuff, and all the Web 2.0 O’Reilly conferences. A few years ago, I was part of the executive committee that put on a one day conference for a non-profit. With just corporate sponsorship alone, in a good year, we would net $35,000-$50,000 cold hard cash without even trying!!! And remember, in addition to money for ad space, conference organizers are able to get companies pay for printing material, goodie bags, giveaways, and even lunch. To a good organizer, everything including the Wi-Fi identification and mailing lists, can be had for the right sponsorship level.

From a conference like this, I would be concerned by the quality of speakers. What I feel happens, specially when there is corporate sponsorship, is that the sponsors will use the presentations to pitch their tools and try to up sell the audience to their proprietary tools and services. No matter what they say, Conferences like this are used as promotional tool, and they will sell out to sponsors to use their allotted time and space to pitch to a captive audience. Similar remarks have been said of JavaOne. One complain that I have heard of is that JavaOne is to Sun centric, even though they are the ones that put it together. There is a fine balance between corporate sponsorship and speakers so that the conference does not seem like one long infomercial. It always helps if there are different tracks!

In Slashdot style, here is the formula for a business model for running a conference!

  • Schedule a conference
  • Ask for volunteers in exchange for badges and shirts
  • Sellout presentations to sponsors
  • Give out sponsors’ marketing material in goodie bags
  • Have sponsors buy lunch and provide wi-fi
  • Charge per seat
  • Sell books, shirts, and anything else
  • ?????
  • Profit!!!

This is not all to different from the open source business model which includes building a community, charging for training, selling books, licensing technology, providing certification, and putting on a conference …. and profit!!!


May 13 2009

Closed Products and Open Platforms

At a fundamental core, Google News and RSS tried to answer the same problem, how to aggregate the most current articles from your favorite news sites and blogs? Having a ton of raw brainiacs with twenty percent time Google over engineered their solution with more artificial intelligence than common sense. Google News came out of an engineer’s 20 percent time and allowed him to simultaneously read top head headlines from thousands of newspapers.

Another approach to this problem, having to visit multiple sites to catch up with the news, was Really Simple Syndication (RSS). RSS has grown to be used in news aggregators not too unfamiliar to Google News, podcasts, and many other websites and programs. One example of a online RSS aggrigator is Happy Coder’s Daily Digest. Happy Coder’s Daily Digest aggregates the latest headlines from nearly 100 of my favorite technology bloggers.

In my mind, RSS provides a lot more value, even though it’s history is marred with constant battles over standardization. Those battles are what forged RSS to a de facto technology and it allowed for uses not envisioned by its original creators.