Google Mobile Apps Just Keep Getting Better

This morning the GMail team blogged about a new feature for the Google Mobile Apps - a map view of your contact list... nice.

Although this has been seen before (I'm sure there's an iPhone commercial of something similar), Google will make it significantly more useful by not limiting it to a single platform: the app has runs on Android, Blackberry, S60, Windows Mobile at launch, and (eventually) will support the iPhone.

This just makes me miss my Blackberry even more...

Official Gmail Blog: See where your friends are with Google Latitude

BungeeConnect Basecamp API version 0.1.2

I (finally) updated the BungeeConnect Basecamp API this morning, with the following improvements:
  • Milestones and Todo-Items no longer error out during the uncomplete function.
  • Getting archived messages correctly uses the AbbreviatedPost class, instead of the Post class.
The following issues are still outstanding:
  • TimeEntry methods are not well tested, as this is a premium feature. I've asked 37Signals for access to TimeEntries for testing & development.
  • Update methods are still failing out. BungeeLabs is working with me to resolve this issue.
Prerequisites (unchanged):

Getting Started with Rails

I've recently had a few inquiries about how to get started writing web apps with Ruby on Rails so, in order to repeat myself less, and in general, congeal my thoughts, I blog:


(1) Learn Ruby.

Unless you're a Smalltalk &/or Perl whiz, and instantly absorb unusual programming syntax, Rails will seem like black magic without a clear understanding of how Ruby works, and what it is capable of.

Ruby is a non-compiled (scripting) programming language. It's very plain-english in style, and, from what I read, draws upon some of the best practices of Smalltalk and Perl. Yes, Ruby comes from Japan. Yes, everything is a first-class object. Yes, Ruby is a scripting language. No, it doesn't compile. Yes, it really is cross-platform. And, yes, it does totally rock.

Go to the source and read a bit. Wow yourself. Then go buy a good book. I recommend the PickAxe book from Pragmatic Programmers.

(2) Pick a working environment.

A key to getting your work moving will be to develop a stable workflow. (I hesitate to use the term IDE, because I associate it with big clunky develop-crap-ware, like Visual Studio and Eclipse. Yuck.) Ruby is extremely flexible here, leaving you plenty of choices from which to select a good fit. So do so.

If you like to work online, Heroku/Heroku Garden are your workspaces. If you think GMail is a 1st class email client, Jungle Disk is the best removable media you've ever used, or subscribe to the Bungee Labs mantra 'Build the App, not the Crap', then Heroku is your new best friend. Heroku is built around a web application for developing and testing Rails applications. What about deployment? Get over it. It's waaaay easier than you think. BTW, your test app is publicly deployed, as you develop it, if you so choose. ;-)

If you like IDEs, and took serious offense to my prior parenthetic remark, please please download NetBeans w/Ruby. You'll do just fine. Or, if you're primary OS is Windows, NetBeans is for you, too, because command-line work in Windows still isn't any fun. NetBeans will let you run projects either on the built-in JRuby, or any other local Ruby install. If you plan to do something freakishly wacky, like run Rails apps on a Java App Server, this is also the place for you. Otherwise, install Ruby and switch the Netbeans default platform over to it.

If you worship Steve Jobs, then take out a withdrawl from your Mac Tax account and iBuy your iSelf a copy of Textmate. That's what all the cool iKids use.

What do I use? NetBeans on Linux. Until it annoys me, then I go back to gnome-terminal and gedit. I use a custom script (called grails - yes I do like to gname gthings on gnome) that launches gnome-terminal with 3 tabs (a web server in development mode, a ruby console in development mode, and bash in my project folder) as well as gedit with the folder view rooted on my project, with the database schema & the README open (one of these days I will read it...).

(3) Commit to learning Rails.

Don't even think about all the cool things your first Rails app could do. Stop drooling over how many plugins you could use. Get a book. Take a class. Run some demos. Write 50 Hello World apps. Learn how it works before you even think about making it do what you want. Think of it as investing in your Karma. If you go into your first Rails app thinking it will be anything useful, from an amazing .com startup to a little toy for your spouse, YOU WILL NEVER DEPLOY THE APP.

If you're going the NetBeans route, Sang Shin has a course that covers all the bases, and all the basics, and puts you through the Hello World wringer. Pay attention, stay on schedule, and turn in all your homework and you might just walk away with a Certificate in Rails for your Ego Wall.

If you're bookish, go get yourself a copy of The Rails Way, by Obie Fernandez. Kiss the cover. Sleep with it under your pillow and hope for osmosis. This book is awesome. Amazing. It will knock your socks off. And if you're wondering who this Obie guy is, he's serious. He's got a nice little company that walks in and builds production Rails apps from scratch in 3 days!

As strongly as I recommend TRW, I recommend avoiding Agile Web Development with Rails. This was my first Rails book. I thought it was pretty good, but that's only because I didn't know better. It misses many of the finer points of Rails completely, and although it does walk you through building a demo app, the implementation leaves much to be desired. Besides, the Depot App is included in NetBeans, for your study pleasure. In my opinion, covering SQL design in the MySQL console, instead of Migrations, is neither Agile nor Rails-ish.

(4) Continuous improvement requires continuous absorption.

Subscribe to blogs. And podcasts. Read wikis, and READMEs and newsgroup archives. Google 'Rails anything' and see what other people did. Someone smarter and more experienced than you probably wrote a tutorial on how to solve your Monolithic Problem with 3 lines of code.

In no particular order:
Also, when you're ready for some serious 'a-ha' moments, get yourself a copy of Design Patterns in Ruby by Russ Olsen. Imagine: you can learn design patterns in a OO language without having to wade through miles of C++ or Java code, and learn a few Ruby-only design patterns. Prepare to truly grok how Rails works for the first time.

(5) Teach your app cool tricks.

That problem that you're thinking about solving - the one you just filled the whiteboard sketching out - someone else solved three years ago. Yes, there's a plugin for that. Maybe a whole gem. Google 'Rails myproblem' and you'll find a million solutions. Afraid you're going to muck up your work? Copy the whole project to another folder, then install the goodies there.

(6) Get comfortable with a Revision System.

Subversion. Git. CVS. Mercurial (woot!). Whatever. Pick one. Use it. Again, if you're one of those 'living in the clouds' folks, you should have no problem finding a hosted revision system, especially if you're going to build an open-source app. Check out Github for Git, or Sourceforge or code.google.com for SVN.

(7) Deploy your app with robust resources.

Don't expect a $5/month hosting account to handle your app well, even if you're the only one using it. Starting up a Rails app is system-intensive. If you are using hosting, I'd recommend a VPS to start with. Or your own server if you've got one. Bandwidth is usually much less of an issue than available CPU cycles.

Slicehost offers solid VM hosting starting at $20/month, and it should do fine for your startup app. I default all my new app VMs to 256 megs of RAM and 1 CPU, and flex them up when there is demand.

If you're going to host yourself, check out Jumpbox's Ruby on Rails VM Appliance, configured excellently on a Ubuntu server.

If you decide to build from scratch, don't get hung up on old software, just because its there. I run all my production apps on mongrel, the same server I develop with. I use either pound (pure reverse proxy with an HTTPS wrapper) or nginx (if I need to serve a bunch of static content, and don't want to tie up my mongrel cluster doing it) as a reverse proxy, depending on the apps requirements. Both have super-low requirements, super-easy configs, active developers, and good behavior.

That's all, folks!

If I missed anything major, I'll do a follow-up. Feel free to add your own best practices in the comments!

24 Hours with openSUSE 11.1


Christmas came a week early for openSUSE users!

Back in June I blogged about my first experiences with openSUSE 11.0. Although there were some groundbreaking improvements, the general tenor of my experience was negative. I did eventually move to 11.0, as I saw improvements appear from the community (such as a recipe for making Firefox3 use the system's Cairo library, thus enabling subpixel hinting.) I also suggested that 11.1 would fix all major issues introduced in 11.0, but not add any substantially new features. I stand corrected: 11.1 does fix the issues I whined about, but does also, amazingly, incorporate quite a bit of 'newness'.

I'm happy to say that both of my major gripes with 11.0 are completely resolved in 11.1, and then some.

Control and display for my integrated Intel wireless are working beautifully; the light works; the light blinks with traffic; pressing the button turns off wireless, and pressing it again turns it back on. Yay. Kudos to the NetworkManager team for moving past some blame issues with the wireless switches, and to Intel for getting the new driver in better working condition.

The default font configuration is easy-on-the-eyes, literally. The standard fonts are very well rendered, and appear consistent across, well, everything. From GTK apps, to Firefox (my other big complaint last time around), to OpenOffice.org, to Java apps, everything looks the same in the workspace, and a look under the magnifying glass proves it out. Also, out of the box, subpixel hinting can be enabled from the Appearance Control Panel app; gone are the days of installing someone else's freetype library. Big yay!

Fonts render consistently across applications.

Fonts render consistently across applications, despite variances in design.



Don't be fooled; openSUSE 11.1 is more than a bugfix release; it incorporates a variety of new features and improvements.


I won't bother repeating the published improvements, you can read the openSUSE blog post for all that. But I've noticed some changes, (some big, some small) that aren't covered.

Sleep mode works. Finally. It may not work for you, but my Centrino-based HP Compaq 6710b sleeps. Hibernate has worked since 10.3, but sleep takes the ease-of-use way up. The only reason I can see to reboot now is for kernel updates.

X86-64. Finally. I've been itching to use a 64-bit OS. Not that I'm using more than 4GB of RAM, but more that I want the optimizations that come along with it (I cringe every time I see a .i386.rpm). With browser plug-ins finally making the leap (Flash & openJAVA both are avialable), so did I. And contrary to the horror stories I've heard in the past, everything, everything has been smooth, and just a bit faster, methinks.

GDM got the once-over. Gone are the full-screen themed-up days of Gnome Desktop Manager. GDM now sports a very desktop-ish look, complete with function tray icons, and drop-down menus for selecting auth points (like Active Directory domains), remote X servers, and Desktop Environments. I don't know if I like it as much as the smooth green & gray GDM theme from 11.0, which blended seamlessly with the Bootsplash, but I can see obvious improvement in access to the full range of GDM's feature set.


GDM on openSUSE 11.1


Fast, Easy mounting of remote filesystems. In openSUSE 10.3, opening a samba share in Nautilus took about 30 seconds. 11.0 cleared that up, most likely as a result of the new GVFS integration. 11.1 takes it up a notch, easily mounting anything I can throw at it, adding an icon to the desktop while its mounted, offering the option to bookmark it, and making the files accessible through a local mount, easing the pain of working with those files in programs that don't make good use of remote paths (*cough* OpenOffice.org *cough*). Oh yeah, there's a nifty little unmount button on Natilus' Places list,and tabs too (the Ubuntu guys have been bragging about this in their 8.10 release).

Injet Disc Printing. This has long been on my list of 'Reasons why I still have to use Windows (occasionally).' I use an Epson RX580 to print directly on CD-R & DVD-R printable media, via Epson's rather limited software. Now, I'm able to do the same with Gimp, Foomatic & Gutenprint. Apparently this isn't totally new, but its the first time I've been able to make it work. I think the best reason I have for keeping Windows around now is the shiny sticker they put on my laptop at the factory.


Direct label printing with GIMP.


KDE 4.2 Backports. Although I've gone Gnome, I still try to keep up with KDE. There's been a good bit of whining about KWin's compositing effects, namely the lack of a a 'desktop cube' effect, for which Compiz is so famous. KDE 4.2 will ship with a desktop cube; KDE 4.1 for openSUSE 11.1 ships with it as well, as the effects have been backported for the release. Nice work, guys!

OpenSUSE Build Service. If you build software, or just hack around a bit, you should have an OBS account. OBS uses virtualization to build software from your source for a variety of distros, including a spectrum of SUSE, Fedora, and Ubuntu targets, all at once. In addition, openSUSE 11.1 was built completely on OBS. One of the strongest side-benefits was that applicable patches automatically backported to prior releases. This is the first time I've seen a rash of updates to an old release the weeks leading up to a new release.

Of course, there are still some improvements I'd like to see.

SAX2, the X11 setup tool, still doesn't handle setup of xrandr well. In order to get good behavior out of xrandr, I have to tell SAX2 I'm using a monitor capable of handling any resolution I expect to see, otherwise the specified resolution will be used as a cap by xrandr. So, counterintuitively, I set my laptop's LCD to 1600x1200, which allows xrandr to set it at the native 1280x800, and any external display at a resolution up to 1600x1200.

Something's funky in Firefox; my mouse cursor disappears while if its over a page area thats still rendering. Something to do with Xulrunner and Cairo, I'm sure, but hopefully it goes away soon; having the cursor disappear in your browser is disconcerting.

The Intel video driver still prevents me from using Compiz on multiple monitors. Intel chipsets, starting with the i945, are capable of handling textures up to 8096x8096, earlier chipsets (down to the i810) has a max texture of 2048x2048. Despite the physical capability, and the presence of patches that prove it works, the intel driver still ships with the lower limit, which prevents Compiz from rendering a texture across my two 1200px-wide monitors. Sigh.

All in all, openSUSE 11.1 is an extremely well-polished release. If you've been waiting to give it a shot, now is a great time. If you're wondering what differentiates openSUSE from other distro's, here's a quick rundown of this capable, flexible OS:

  • Desktop Environment options. OpenSUSE is one of few, and the only major Linux distribution, to comprehensively integrate more than one DE. OpenSUSE 11.1 gives you a well-tended desktop experience in Gnome, KDE (4.1 & 3.5) and XFCE. Enlightenment, ICEWM, WindowMaker, and FVWM are also included, though not as well manicured as Gnome, KDE & XFCE. In contrast, Ubuntu ships only with Gnome, and leaves integration of other DEs to the community. Fedora Core 10 has received quite a bit of bad commentary for the poor integration of KDE 4.1.

  • Download how-you-want. Software.opensuse.org provides a simple path to downloads of both full DVDs, CD sets, live CDs, bittorent links, and network installs for x86, x86-64, PowerPC, for Gnome Live, or KDE 4.1 Live. Did I mention it's actually easy?

  • The desktop is the server. In addition to the great desktop integration, SUSE releases have always made excellent servers. Setting up a LAMP stack, for example, is a one-click affair during install. Same as 'games'. ;-)

  • A huge universe of software. The above-mentioned OBS allows developers to upload code, and the service compiles it for them, and optionally, publishes it for install. Any time the codebase changes, or a depency changes, the software is automatically rebuilt, and if you have subscribed to a package's repository, you'll get an automatic update.

  • OpenOffice.org Novell Edition. Retailing for $120 for Windows, OpenOffice.org Novell Edition includes a variety of enhancements that have not yet been included in the upstream OOo package, such as PDF Import, better Excel formula integration, and improved import of MS OOXML documents.

  • The OpenSUSE community. OpenSUSE is working aggressively to step up the role of community, which typically is the group of people posting in forums or chat. OpenSUSE recently held an election of a steering board, which will guide the principles and direction for OpenSUSE. Voting was open to 'members', contributing participants in the the various openSUSE projects; this is a subset of registered 'users'. In addition, you have the larger, official support interests. Since openSUSE feeds into Novell's SUSE Linux Enterprise products, the documentation is well maintained, and installation support is still available with the boxed release.

  • Green is better than orange. Really, it is.






I use openSUSE Linux as my primary OS both at home & work, and SUSE Linux Enterprise Server at work as well. If you've got questions about using SUSE at work, even in a mostly-Windows shop, feel free to email me at bear454 [at] opensuse [dot] org.

Basecamp API for BungeeConnect

+ = ?

12 classes. 60 functions. 6 test applications. 30 unit test functions. One big fat API wrapper. BungeeConnect applications can now completely integrate with 37signals' Basecamp Project Management application.

Why?

Well, 37s are an arrogant group of developers; they even admit to it in their book. Ask them for a new feature and the answer is "no", or in my case "there's an API, build it yourself." So I am, in BungeeConnect, and you can too. (My own itch is moving todo-items from one project to another, something 37s has been reluctant to offer.)

Prerequisites.
Getting Started.
  • Login to the Bungee Builder, and create a new Solution.
  • Modify the Solution's Depencies to include the Basecamp API
  • If you want to modify the API, Import it (you'll probably want to, as there aren't any inbuilt Adapters).
  • In a class in your TypeLib, add BasecampAPI as a field.
  • Before you can go to town, you'll have to setup the API. Now there's nothing stopping you!
Issues.
I've got two rather minor functions that are still throwing 404 errors - I'm working with 37s (via the forums) to get to the bottom of it, but again, they are minor, and I don't consider them showstoppers.

A bit larger, is an issue I found with BungeeConnect: their HTTP Utility doesn't properly auth PUTs, so none of the Update functions currently work. Bungee Labs has labeled this as Issue #7889 - hopefully it will be resolved sooner rather than later.

In Conclusion...

I'll be maintaining the BungeeConnect code until someone else steps up with better code, so drop me a line with any issues you encounter, or just let me know what cool tool you're building!

P.S. I'll be dropping another blog post soon about a new site I'm building for making Basecamp better using a variety of small tools.