Linux Editor Update

May 1, 2008

Well, no sooner than I had written the previous article, did I consider NetBeans.  At this point I was willing to try anything, so I downloaded the special Ruby distribution and gave it a whirl.  One of the prereqs was the Java 1.6 runtime, a hefty download.  As NetBeans opened for the first time, I was greeted with a splash screen with a progress bar inching along as various Java libraries were loaded.  This did not bode well!  My bloat-meter was starting to register.  

However, once NetBeans was up and running, I found it to be pretty intuitive and it runs very well.  Response to input is instantaneous and the editor does a good job of not getting in the way.  I really enjoy the SVN integration as well.  It’s very easy to ignore files and perform the usual updates/commits.  The merging tool has some of the slickness of Apple’s FileMerge and many of the features of my favorite diff tool, Beyond Compare.

My only beef so far is that auto-complete is invoked with CTRL+space and I don’t think you can map it to TAB and still be able to use TAB for its original purpose.  The autocomplete also only works by selecting items from a drop-down.  It won’t just guess what you want.  

But overall, NetBeans has been my favorite Linux text editor for Rails.  However, I think I’ll have to stick with gedit or Eclipse for my Perl editing.


Ruby/Rails on Linux (oh yeah, Perl too)

April 26, 2008

So I’ve spent the last four months developing Rails apps, Ruby scripts, and Perl scripts on a Fedora desktop. I cut my teeth with Ruby/Rails on my Mac at home, so I was in on the TextMate and Growl goodness. It’s comical to see that 90% of Rails developers are on the Mac, and one would assume that it’s because if one must use a trendy framework, they must also choose a trendy development platform. The truth is, I just haven’t found sufficient analogues to Mac tools in the Linux environment.

The first editor I experienced (and the one I keep coming back to) is Eclipse/Aptana/RadRails. It is a beast of an IDE, taking several seconds to load on a capable dual core AMD 64. Here’s some other issues I run into on a daily basis with the 1.0 release (which, to me, would imply feature complete and stable):

  • RadRails “forgets” about syntax highlighting and makes everything purple.  Sometimes, typing space at the end of a line and saving will fix it, but it’s a crap shoot.
  • Eclipse will occasionally slow down to a crawl for about a minute.  The GNOME task monitor says the CPU is idle, but Eclipse would make you think it was sharing CPU time with a nuclear explosion simulator.
  • The “go to resource” dialog doesn’t quite load results for every file that matches your criteria.  It also takes an extra arrow key press to get through the list.
  • If left open for too long, the inevitable, “There was an error, would you like to exit the workbench?” dialog appears.  You can say “no” but then you’re just living on borrowed time.  Eventually, it will all come crashing down.
  • Of course, there are not nearly as many cool shortcuts and scriptability that TextMate offers.
After getting frustrated with RadRails, I turned to gedit, GNOME’s text editor.  Apparently, there are several plugins you can get to make it act almost like TextMate.  It’s also very lean and responsive.  First of all, the gedit website was down when I tried to get the plugins.  Then, it became a confusing ordeal to get the plugins installed correctly.  Gedit also liked to keep backups of each file sitting right next to the real files.  This made SVN a bit messy when I would just run an svn commit on everything.  Furthermore, the plugins, like the quick file open, didn’t even work 100%.  After some gedit crashes, I decided to ditch it and look further.
After trying the two major open source editors, I looked into ActiveState’s Komodo IDE.  It’s a paid app running at $300.  This IDE was the most consistent, stable, and feature-rich app out there.  However, it had major performance issues.  Simply scrolling through the list of files in a project slowed the app to a crawl.  I installed the version compiled with gcc 5, which offered a slight speed improvement, but still wasn’t snappy enough to facilitate rapid development.  It wasn’t worth $300.
So now I’m back to Eclipse.  Yes, I know there’s always vi and emacs, but I’m feeling too lazy right now to learn all the keystrokes required for things as simple as highlighting text and switching files.  I’d rather just use the mouse that God gave me.
As far as a Linux analogue of Growl, there is Mumbles.  At this point, it seems like too much of a hassle to find all of the plugins to make Mumbles work with even simple services/apps.  I love how many apps now (like Firefox 3) have Growl support built right In.  
Which brings me to my point.  The Mac is sort of like a “GUI on Rails.”  Its API sets stricter conventions on how an app should work, but with those limits comes the benefits of simply getting things done and the ability to focus on the grander issues - like interoperability and bleeding edge features.  In the Linux world there is an amazing freedom of choice, but with it comes chaos and a lot more work that goes toward just getting things to talk to one another.  While the freedom is nice, sometimes it’s nicer to work within stricter guidelines and get something done quickly.

    Happiness

    April 21, 2008

    A book I still have to read is [ed. I think it was called] The Science of Happiness whose author was interviewed recently on NPR.  The interviewers discussed the emerging branch of psychology that is studying happiness.  It got me thinking about how perceived happiness is a major market factor and how people now days are more willing to pony up extra cash and make an effort to buy your product or service if it causes them some happiness beyond the satisfaction of having a need met.  

    There are so many examples of this:

    Apple is the most obvious candidate.  Sure, you can buy and build a computer using the same parts Apple does for half the cost.  You can install Linux for free or pay for Windows and get your work done.  Why are people paying more for Macs?  The Mac OS and Apple’s software suites offer a more user-friendly and, ultimately, satisfying experience.  Apple’s users (like me) are happier.  

    37 Signals recently posted about Zingerman’s deli in Ann Arbor and the philosophies they follow that make them a great company.  Yes, you pay $20 for a reuben and a root beer, but the experience of going to the deli outshines many other casual eating experiences.  Customers are showered with free samples of exotic foods and the staff are very personable.  The selection of products is also far beyond what you’d find in many other places.

    This also brings to mind Ruby on Rails.  There are plenty of other MVC frameworks out there that do the same exact thing as Rails.  But there are so many positive externalities that Rails offers that put it above the rest: the community, the Ruby language itself, and the way agile development is baked into the framework and its related plugins.  It really makes for a pleasant development experience.

    The bottom line is that Americans are becoming more willing to pay for products that make them feel better.  This has positive repercussions where a product can benefit the natural environment or society as a whole.  The challenge is to build a brand that offers that extra bit of happiness and (ideally) really does change the world for the better.


    Coworking and Collaboration

    March 29, 2008

    Today I read an interesting post on coworking - where small companies and individuals rent a desk or simply a key to access shared office space.  It’s a really cool concept that fosters collaboration.  Over the past year, I’ve been going to some Ruby user group meetings and Lansing’s own Web Design Meetup.  It’s been great throwing ideas around and learning things you’d be hard pressed to find in a Google search or have show up in your RSS reader.

    After reading the article, I realized that I’m already involved in coworking to a certain extent - my own company shares office space with a small web company.

    Recently, the city of East Lansing announced a plan to convert some old office space above Barnes & Noble into a “tech incubator” that sounds a bit like a coworking site, although perhaps not one that’s open to passers-by.  If anything it might be nice to have a space for when I can’t commute all the way to Ann Arbor.

    Another idea that started in Germany and Austria and has spread to some large cities in the US is that of a hacker space.   It’s basically a rented space where tinkerers and artists can work.  I think it’s mainly attractive in large cities where people don’t have space at home to work on “messy” projects or for those who just want to collaborate.

    In my dreams I’ve thought about turning the abandoned thrift store across the street into a hacker space…


    Location, Location, Location

    March 22, 2008

    One of the exciting technologies that’s getting a lot of attention is location-aware devices.  The ability to post location data to the Internet is creating some very interesting applications.

    A few years ago, a company came out with a device that can be embedded in a child’s clothing or backpack.  While this was a prime example of how real-time location information could lead to invasion of privacy, there have been some benign uses of the technology.

    One such use is GPS-enabled cameras.  Photographers can easily keep track of exactly where each picture is taken.  Flickr added location data to photos allowing you to browse for photos from a world map.  Lately, a lot of buzz has surrounded Yahoo!’s Fire Eagle.  It’s basically a location updating service and it’s opening up some great possibilities, one of which is wikinear written by Simon Willison.  You can use your location to fetch Wikipedia articles that pretain to landmarks and events that surround you.  A blessing for history geeks!

    Another commonly forseen application is being able to hook up with (or avoid) friends that are nearby.  Some have also suggested using individuals’ location data to measure traffic on highways and in shopping malls.  I can only imagine the sort of alternative reality games that will crop up now that developers can track players’ locations.

    Of course, the major impetus for all of this is the iPhone.  Not that the iPhone’s locator technology is new, but it’s finally available in an easily usable (and easy to develop for), tight package.


    A Landmark Day for the Web

    March 3, 2008

    There was a controversy storming over the way Microsoft proposed to handle standards compliance in their upcoming Internet Explorer 8. At first, MS released a screenshot that showed IE 8 rendering the Acid Test (a web standards compliance test). Everyone in the web development community was ecstatic. Finally, IE wouldn’t “break” the Internet! Then, it was revealed that a special trick was needed to render standards-compliant web pages correctly: a <meta> tag instructing IE 8 to follow standards. The community was in an uproar and most everyone (including me) agreed that it was wrong to have to specially code web sites to force IE 8 to do what it should be doing right in the first place. MS’s argument was that having IE 8 follow standards correctly would mean that dozens of corporate intranet web apps written specifically for IE 6+7’s quirky behavior would break, leaving their poor customers helpless. It seemed like business as usual at Microsoft. Today, however, the IE team announced that they are reversing their decision and that IE 8 will render sites following standards by default and that developers of IE 6-specific intranet applications can stick the <meta> tag in their apps to give IE 8 the proper handicap to render their apps correctly. Phew! Now, we just have to wait 10 years for IE 8 to be adopted on a wide scale and we can dump all of our IE6+7 hacks!

    What’s the big deal? For those of you who don’t work with web standards much, let alone web development, here’s why this is important. A group called the World Wide Web Consortium has spent thousands (ok, I made that number up) of man-hours defining standards that specify what a web page should look like given the HTML and CSS code used to generate the page. The ECMA has spent thousands more hours defining standards for how JavaScript should work to give our web pages those flashy effects. In theory, I should be able to code a web page with specific HTML/CSS/JavaScript and have it behave the same exact way, no matter which browser, IE, Firefox, Safari, Opera, Lynx, is used to display it. However, Microsoft never saw fit to follow these standards completely. Instead, they made some completely ridiculous decisions and countless bugs that made it extremely difficult (if not in some cases, impossible) to develop web sites that behave the same in IE and every other browser. This caused countless hours of hardship for many web developers.

    Some developers took that approach of writing web pages that will only work correctly in IE and even went to lengths to try and block other browsers from visiting their sites. This means that if you happen to own a Mac or run Linux, you’re out of luck or are forced to trick the site into thinking you are running IE.

    IE 6 was released in 2001. While there were some improvements over IE 5.5 in terms of features and standards, it still was nowhere near perfect, and it took Microsoft 5 years to release IE 7. Again, while IE 7 offered some improvements, it still had plenty of “quirks” that made it difficult to develop for. Now, nearly 2 years later, Microsoft is just starting to talk about IE 8 and has not released any sort of early testing version. It may be another 2 years before IE 8 sees the light of day. In the meantime, IE 6 still controls a healthy amount of usage, enough that, after 7 years, developers cannot choose to dismiss it and must ensure that their web apps work with the ancient pile of rotting garbage that is IE 6.

    So, the good news is that Microsoft’s IE team has finally awoken to the desire for and importance of web standards. This could even mean that IE reclaims its throne among Windows users. Just think of the terabytes of network traffic that will be saved by users not having to download hacks for IE and workarounds built into JavaScript libraries! Think of the thousands of man-hours of developers’ time saved by not having to hack around IE’s quirks! Of course, it will come at the price of IE-specific-web developers having to learn how the web should work. I think the ends justify the means in this case.


    On The Air

    February 26, 2008

    It’s official!  This last Saturday, I hopped over to Grand Rapids, got to the Apple Store as it opened, and made use of my MSU ID (good as gold!) to purchase a brand new MacBook Air.

    As I stated in a previous post, I realized that top-of-the-line performance was not a major factor for me and I liked the ultra-portability it offered.  Plus, the price was just right.  So far, I’ve just been setting up apps and moving over data, but it is plenty speedy.  The only time I’ve run into slowdowns is when copying files over the network while running iPhoto from a shared network and copying files from an external hard drive.  Otherwise, it’s been running SO much faster than my PowerBook G4.

    I haven’t done any web development on it yet, so I’ll throw up a post when that happens.

    My comments so far:

    • The build quality is absolutely the best I’ve seen in a Mac.  It’s rock solid and there are no gaps in the seams of the case.
    • It’s very lightweight!  I hardly notice I’m using a laptop.  It’s like a natural extension of my body.
    • MagSafe is a GodSend.
    • The function keys are all messed up..but getting used to it.  The modifier keys combined with the expose key replace F9-F11.
    • The black keys make the back-lit keyboard much more functional.  With the PowerBooks, there wasn’t enough contrast between the silver keys and the white lit letters to make the lighting effective, except in pitch black.
    • I’m not missing the CD/DVD drive.
    • I’m not missing FireWire…yet
    • The monaural speaker is on the right side and sort of causes an imbalance when sounds are played - makes you think something is coming at you from the side.  Freaky!
    • The iPhone-like touchpad is awesome.  Three-finger swipe to go back/forward in Safari!  The system preferences also shows videos of all the different “moves.”

    This really is the ninja’s laptop!  The MacBook Pro/PowerBook is more of an armored knight.


    Three Weeks of XP

    February 14, 2008

    I’ve moved on from a job cowboy coding (read: shoot from the hip, work alone) ASP.NET websites to a job working at an anti-spam software company using Ruby on Rails, Perl, and sendmail under an agile/eXtreme Programming methodology. It’s heavenly bliss! Definitely worth the hour drive to Ann Arbor each day.

    I’m finding that I’m much more productive working with a programming partner. Something about working side by side really spurs me on. When you work with people with open minds (and have an open mind) it’s a continuous learning and improvement process. It also minimizes the stupid mistakes that slow you down as you have another pair of eyes on the situation. Not only do I learn new techniques and ideas from others, but it also helps me to coalesce ideas that I know intuitively, but gain a better understanding by having to explain them.

    Working with Ruby on Rails is also a joy. It’s great to be able to whip out features in a matter of hours and spend more time on testing and polishing. Perl, well, it’s no Ruby. It’s definitely better than C, but given the choice, I’d go for Ruby.

    Ditching Windows has improved my life. I think my blood pressure has gone down. My workstation runs Fedora. Now I don’t have to worry about antivirus software causing my user interface to crash. It’s no Mac OS, but any sort of UNIX works for me.

    I’ve also enjoyed the company pool table and the coolness that is Ann Arbor!


    Completely Unteathered?

    February 4, 2008

    It’s not very often that I get to seriously consider what my next Mac will be.  My 4.5 year old PowerBook is on its last leg with a broken display and dwindling performance.

    I’m stuck trying to decide between two options.  Option 1 is to just get a MacBook Pro.  A workstation in my lap.  Option 2, however, is a bit more intriguing: get a MacBook Air. 

    I know, you’re saying to yourself, “Derek, for only $100 more you get a wider screen, a ton of ports, a lot more storage, and improved performance.  As a developer why would you even consider a less powerful machine?”  It’s because I’ve been toying around with the idea of becoming untethered. 

    Performance

    It’s true that MBP is significantly faster than the MBA.  The 7200RPM BTO hard drive option would blow the MBA’s puny 4200RPM drive.  The MBA has its video memory shared with the main RAM.  Games on the MBA wouldn’t be very good and I wouldn’t want to do any serious video editing.  But when I think about it, when’s the last time I played a computer game or edited video?  In all honesty, web development is more memory intensive than anything.  Macworld recently found that, while the MBA is slower than the MBP, it’s still significantly faster than the last PowerBook (which was significantly faster than my current machine).  So any of Apple’s current offerings would be an improvement over what I have now. 

    Storage

    The largest hard drive you can have installed on the MBA is 80GB.  I’m already filling up my 100GB drive and as I watch more online video, take more pictures, and listen to more music, my space requirements are only going to increase.  This is probably the primary factor that’s holding me back.  However, I’ve found that storing my photos on a network share over a 54Mbps wireless connection offers no serious penalty.  With an 802.11n connection, it would be even snappier.  Thus, storing all of my photos on our home server will leave me plenty of room (21GB) to work with on the MBA.

    Efficiency

    This is where the MBA shines.  The MBP is quite heavy.  I haven’t held the MBA yet, but from what I hear, it’s amazingly lightweight.  It would be nice to have to lug less weight around.  It would also be nice to have a more compact laptop for on the plane.  I loved my 12″ iBook in college and the MBA’s 13″ screen would be an adequate size. 

    The MBA only uses a 45W power adapter while the MBP uses a whopping 85W.  That’ll save me money on utilities!

    I also like the idea of a multitouch trackpad.  However, it’s expected that the next MBPs will have that as well in the next couple of weeks.

    Overall, it’s the portability that really draws me to the MBA.  While the power of the MBP is compelling, to me it seems like buying a Ford F-350 for my commute to work.  I’d rather go with the Honda Civic.


    An iPhone Letdown

    January 17, 2008

    One of the cool things with OS X’s address book is that with my old Sony Ericson phone, I could manage calls.  I would pair the phone with my Mac using address book (by pushing a little bluetooth icon).  Whenever someone called, their vcard and picture would pop up on my screen and I could choose to answer or ignore it.  Of course, I couldn’t talk through the Mac’s microphone/speakers, but it was nice when using headphones - I could still catch calls while the music was blasting.   It’s also interesting to note that under the bluetooth utility, it states the iPhone supports no bluetooth services whatsoever - no file syncing or address book syncing.  So, it’s really only for bluetooth headsets.  That’s pretty lame!