Categories
computer

OS X Ruby Troubleshooting: "command not found: dot"

If you’re trying to run rdoc but are getting errors like..

Generating HTML…
Diagrams: ./opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27: command not found: dot -Tismap dot/f_0.dot
./opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27: command not found: dot -Tismap dot/f_1.dot

..the package you need to install is called graphviz. You can install it using Darwin Ports on OS X like so..

sudo port install graphviz

Categories
computer

Parallels Desktop Coherence Mode Rocks: OS X/Windows XP Screenshot

I tried Parallels Desktop‘s Coherence mode today, and was so blown away I had to blog about it immediately.

parallels-coherence-mode-small.png

The above image has not been doctored. It’s my normal OS X desktop with Windows XP running in coherence mode. When activated, the window around the XP virtualization session vanishes, the XP taskbar integrates into your OS X desktop, and XP application windows are free to float around. With Parallels Tools installed each XP application has a dock item which can be Command-Tabbed to. If you look closely you can see I’m running IE 6 next to Safari, both natively, without the visual distraction of the virtualization window. This is a huge usability landmark. Thank you Parallels!

Try it yourself by selecting the View -> Coherence menu option when running Parallels Desktop.

(Question: Does VMWare currently have a feature like this?)

Categories
personal

SRP Time-of-Use Plan Hourly Price Change Reminder

To those on SRP’s time-of-use plan, reprogram your thermostats! On May 1st we’ll be entering into the expensive months.

  • 1pm – 8pm weekdays are “on-peak”: 17.83¢/kWh.
  • All other hours and holidays are “off-peak”: 4.88¢/kWh.

From here. If you live in a hot area and do not have a programmable thermostat, you absolutely must get one. If you live in Phoenix you’ll more than recoup the cost in a single summer.

Categories
computer

J2ME Acronym Cheat Sheet

l2_rockinduke.gif

Sometimes I think we’ll eventually run out of TLAs (three letter acronyms) in the Java space. Here’s a quick reference for the forgetful..

  • ABB (Audio Building Block)
  • API (Application Programming Interface)
  • BCC (Bluetooth Control Center)
  • BPWD (W3C Mobile Web Best Practices Working Group)
  • CBS (Cell Broadcast Service)
  • CDC (Connect Device Configuration)
  • CLDC (Connected, Limited Device Configuration)
  • CSS (Cascading Style Shee)
  • CSS-MP (Cascading Style Sheet – Mobile Profile)
  • DDC (Default Delivery Context)
  • GCF (Generic Connection Framework)
  • J2ME/JME (Java Micro Edition)
  • JTWI (Java Technology for the Wireless Industry)
  • JMF (Java Media Framework)
  • JSR (Java Specification Request)
  • JVM (Java Virtual Machine)
  • MMAPI (Mobile Media API)
  • OBEX (Object Exchange Protocol)
  • OMA (Open Mobile Alliance)
  • PAN (Personal Area Network)
  • PDA (Personal Digital Assistant)
  • PDAP (PDA Profile)
  • PIM (Personal Information Management)
  • MIDP (Mobile Information Device Profile)
  • MMS (Multimedia Message Service)
  • SMS (Short Message Service)
  • SDD (Service Discovery Database)
  • UAP (User Agent Profile)
  • WAP (Wireless Application Protocol)
  • WCSS (Wireless Cascading Style Sheet)
  • WMA (Wireless Messaging API)
  • WML (Wireless Markup Languge)
  • WTK (The Sun Java Wireless Toolkit/J2ME Wireless Toolkit)
  • XHTML-MP (XHTML Mobile Profile)
Categories
computer

5 Roadblocks To Enterprise Rails Acceptance

rails.pngI love Rails for its pragmatic design and agile culture: two qualities not usually associated with the large, enterprisey systems of Fortune 500 companies. In my last formal position I was part of a small internal movement to drive the Rails train upward through the IT ranks, but the effort was met with limited success. The unfortunately reality is that Rails currently lacks several key qualities to which enterprise project leaders have become accustomed. Here are five reasons of varying significance to start us off.

Insane Query Support

Most documentation you read about ActiveRecord will take you through tidy, minimalistic examples which are squeaky clean and really fast. Complex queries, however, will be easier to do using Model.find_by_sql, which accepts a raw SQL query. Ordinary dynamic finds with deep loading behavior may require you to hard-code names in the query to avoid issues with the generated SQL. ActiveRecord is way easier to use, but far from Hibernate. I’d say that over 95% of the queries issued by a larger application are of trivial or medium complexity, but a lot of time and your best developers go into that last 5%, and this is where the heavier OR/M frameworks start looking better than ActiveRecord.

Distributed Transactions

The rise in SOA interest over the last couple years has led to more applications using multiple data sources. While it is possible to nest transactions, “Rails doesn’t support distributed two-phase commits (which is the jargon term for the protocol that lets databases synchronize with each other).” (From Agile Development with Rails, 2nd Edition.) In many situations, simply nesting transactions will suffice; however, many situations should really have the safely and reliability of two-phase semantics, and this factor alone could be a deal breaker.

Data Integrity

Database Designers (DBDs) like FOREIGN KEY constraints, CHECKs, high levels of normalization, and are the natural enemy of null fields. In other words, DBDs don’t like Rails. While I’m certainly no Pedantic Data Nazi (PDN?), there should at least be a basic set of built-in mechanisms for generating such simple self-defenses against naughty applications. Frankly I’m surprised that the community isn’t pushing harder for solid constraint support within migrations.

IDEs

This isn’t technically an issue with Rails itself, but a roadblock to its adoption nonetheless. Most Rails developers (including myself) appear to be using TextMate. A smaller population use RDT, Emacs, or numerous other packages. But there isn’t yet an application which comes close to the basic core feature of the popular Java and .Net IDEs. The currently broken breakpointer is another swift kick in the pants. What I can do with Eclipse on a remote application server isn’t in the same universe of functionality as the Rails breakpointer, even when it worked.

Top-Down Push

For whatever reason, CTOs and CIOs haven’t yet become seriously interested in Rails, and without this air of implicit exploratory approval, managers seem reluctant to give in to antsy developers. I would love to see Rails become a flagship of agile enterprise projects, but that’s not going to happen until management sees the real ROI of a project done by experienced Rails developers.

None of these things are insurmountable, but there are many more challenges to overcome if Rails will ever sit on the same application servers as Java and .Net. What challenges have you faced with Rails at your organization?

Categories
personal photography

Marvels of the Human Eye

Being creatures limited by our instruments of perception, the behavior of the human eye and related processing systems never ceases to amaze me. Last year was particularly enlightening, as I hadn’t previously realized we effectively cannot see color in low light situations. I honestly never noticed until I woke up one morning and realized that I’d used the blue towel instead of the red towel after the previous evenings midnight shower.

Getting more heavily into photography has helped me understand the vast exposure corrections we make involuntarily and without consciously noticing. It’s simply not plausible to correctly determine proper exposure settings using the human eye alone. We adapt dynamically to different lighting situations, so your halogen lit living room at night–which seems like it’ll show well without a flash–will end up tragically underexposed if you “eyeball” the settings.

300px-same_color_illusion.pngPerhaps my most interesting discovery of late is the checker shadow illusion: a great image demonstrating we often see what we’re expecting, rather than what actually exists. But then, “what actually exists” is a different issue entirely.

Categories
computer

JXTA: Not The Solution To Java Peer Discovery

sun_jxta.gifOnly developers with hair should use JXTA, because those with bald or shaven heads won’t have anything to violently rip from their skulls while they develop with it. I have been, and continue to be excited by, JXTA’s potential, but have been very disappointed at the pace at which a project progresses when using it. JXTA’s capabilities, on the PowerPoint level, are impressive. It facilitates a great deal of networking features necessary for peer-to-peer operation and service discovery. So what’s my beef? A couple major areas off the top o’ me head..

Documentation

There isn’t exactly a massive community using JXTA. There are limitless possibilities of the platform and a few significant projects that use it, but it’s not exactly a common-place technology. That’s ok. Communities need time to grow. But to build a better mousetrap, people must understand why yours is better, and how to use it properly. At first I suspected I had jumped into the system at a particularly odd moment, but most of the documentation I’ve read is either out of date, or, in the case of much of the code itself, completely missing. This may come as a surprise to the good folks at jxta.org who provide many links to JXTA articles, but as a developer new to the platform sitting down and getting started, you’ll find yourself confused by deprecated and changed APIs without a clear understanding of the Right Way to do things. Thepopularbooksarelongoutdated.

Testing

As an advocate of test-driven development, my application unit tests attempt to cover the interactions between multiple peers on the JXTA network. Doing so requires instantiating multiple cores within the same Java unit test process, and being able to reset them to initial states between test cases. Unfortunately, JXTA is designed as a singleton, which as we already know is not a friendly pattern to test-driven development. Couple this unfortunate design with the general difficulties of multi-threaded unit testing, and you’ll either be spending vast amount of time with your unit tests, or forgoing the complicated ones completely. Probably the latter. So what’s the solution? I’m not exactly sure, but I’ve started working on one.

Journeta

Currently code named “Journeta”, that goal is to create a greatly simplified, zero-configuration-required peer discovery and communication Java library for “trusted” networks. No configuration files, hefty learning curve or even constructor arguments, but no security or over-the-internet functionality either. (At least at the library level.) While I haven’t been actively developing it this year, I started the project last year over at OpenRain, and anticipate releasing a build sometime this summer. Let me know if you’re interested and I’ll ping you when we release a demo.

Categories
computer

RailsConf 2007 (USA) Registration Re-Reopened. New Track & Keynote Announced!

I received this from O’Reilly just a couple minutes ago..

—- BEGIN EMAIL —-

RailsConf 2007
May 17-20, 2007
Oregon Convention Center
Portland, Oregon
http://conferences.oreilly.com/rails
A fourth technical track has just been added to the RailsConf schedule.
That means a limited amount of space has opened up for those folks who
didn’t get a chance to register before RailsConf first sold out in
February.

If you haven’t yet registered and would like to attend RailsConf 2007,
please register now at:
http://conferences.oreillynet.com/cs/railswaitlist/create/reg/
(If you do not already have an O’Reilly user account you will be required
to create on in order to register for RailsConf. When prompted for your
password, click on “No, I am new to O’Reilly.” When you have finished
creating an account for yourself you will be taken back to the RailsConf
registration page.)

Note: We are no longer accepting checks for this event. All registration
fees will need to be paid in full by credit card at the time the
registration form is completed.

RailsConf Keynotes Just Announced
Chad Fowler and Ruby Central have put together a stellar program, which
now includes four simultaneous tracks. They’ve also just announced some of
the keynote speakers presenting on the main stage this year:

Ze Frank, Comedic Digital Savant
David Heinemeier Hansson, Creator of Ruby on Rails
Dave Thomas, The Pragmatic Programmers
Avi Bryant, Creator of Seaside
Tim Bray, Co-creator of XML and Atom
More speakers are being confirmed every day. Check out the entire list of
speakers and sessions on the RailsConf web site:
http://conferences.oreillynet.com/pub/w/51/speakers.html
Remember, seating is limited and likely to sell out very quickly. If you
haven’t already done so, register right away as this email does not
guarantee your seat.

We look forward to seeing you in May!

The RailsConf 2007 Team

—- END EMAIL —-

Categories
computer

ReactOS v0.3.1 Parallels Image

reactos_firefox.png

I couldn’t find a working Parallels image of the ReactOS v0.3.1 release after I had some issues installing it from the official ISO, so I’ve created one for you. This is a screenshot of me running FireFox on ReactOS within Parallels on a Core Duo-based MacBook Pro. Download the image for your Intel-based Mac here.

Categories
computer

Why Linux Won't Rule The Desktop Any Time Soon (1 of 2)

tux.jpgBefore the hate mail roles in, let me say that I’m a huge advocate of open standards and general use of F/OSS. I love Linux and use it almost exclusively for all my server side applications. I’ve used Linux on desktop systems for many years, have developed with it, had jobs supporting it, built custom distributions with it, and hacked on more systems than I can remember. All this, but I still switched to OS X for desktop use several years ago and the thought of switching back makes me nauseated. This is not meant to be a criticism of any single distribution or technology, but why the culture around Linux will not yield a massive exodus of “typical” Windows users any time soon.

It’s 2007, and decries have been made many times over the last 15 years that “Linux Is Ready For The Desktop”. Well, it’s 2007, and no, it’s not ready for the desktop; at least not for the masses. The people which tend to run desktop Linux systems these days satisfy two of these three criteria:

  1. Have more time than money.
  2. Are looking to run server processes.
  3. Have a natural competency for all things technical and enjoy fixing things.

If you fit two of these categories there’s a good chance I’d recommend Linux, and I’ll be the first to help with the installation. But since the common user is not looking to run a web server on their desktop, and surely not a 12-hour non-stop let’s-fix-all-my-device-drivers session, I don’t recommend it often to non-geeks. I’ve given presentations to businesses on why they should migrate their old Windows servers to Linux, but have not once recommended my parents do so on their old home machine.

Why? Two things: usability and support. Today we’ll tackle the first half.

Usability

Many interfaces are built purely for function, not usability.

As a culture of programmers, it’s somewhat expected that we’re producing interfaces with obtuse options, confusing layouts and poorly worded text. Would you like to “Set the SCSI IMMED flag“, or perhaps some “ISO9660 options“? Sure, why not.

Lot’s of tiny parts make for a horrible user experience.

The Unix principle that the system be compromised of many small pieces of functionality assembled into a larger system may work at the system level, but not for everyday desktop applications. Obscure or horribly named products makes users more confused.

Linux users love reconfiguration/options far more than ordinary users.

As a result, many distributions ship with redundant tools, and if not, someone on the other half of the planet creates another distribution with slightly different packages. While the freedom to do so is priceless, the practical value of many spin-off distributions is next to zilch. We, the community of F/OSS advocates, need to more heavily emphasize convention over configuration and use forking only if absolutely necessary.

The entire experience is not consistent and fluid.

Without a single vendor driving development of the * major * desktop * applications, integration between all the pieces just isn’t happening well. Forcing the user to go through installation of optional packages and perform technical manual configuration is a major turn off.

Some “frond-end” applications just scrape the output of the command-line version.

This is a horribly error prone way to integrate with a lower-level piece of software since there isn’t a static way of finding issues. Please stop doing this. It makes things break across upgrades, and just adds more weight to the “just wipe the disk and start from scratch” camp (which I happen to be part of).

Let the flames begin, and don’t foget to stick around for part 2!