Flash 10.1 to Bring Performance Upgrades to the Mac
Posted by BinaryMuse in Technology on April 5th, 2010
I’ve only been using a Mac for about half a year now, although I’ve wanted one for quite a while longer. The performance, stability and flexibility of Unix combined with the elegance and ease-of-use for day-to-day tasks of Cocoa was a big draw to me. However, there has always been one thing I have been very, very not happy with on OS X, and that is the performance of Flash.
It’s not a lonely boat, either. Just a quick Google search turns up a whole bunch of people who are also unhappy with Flash’s performance on their Macs. But shining through the gray clouds is a ray of hope: Adobe promises that 10.1 will bring improvements. Ever the skeptic, I decided to try out the latest prerelease version* and see what there was to see.
Now, I will say that I currently use the Dev Channel version of Chrome–mostly because I don’t like Safari and Firefox eats memory like I eat spicy Cheetos… and I like my spicy Cheetos. (I’ve tried to like Opera, but I just can’t make myself. Sorry.) And Flash performance is far from stellar for me. When I’m browsing YouTube, I usually keep another tab open so I can read my RSS feeds, for instance, while the YouTube tab is completely unresponsive. When I create a bit.ly link, there is a noticeable delay after I click the "Shorten" button before I can select the new URL and copy it to the clipboard while the browser fires up the Flash on the page.
Short verdict? 10.1 is indeed faster.
The delay on bit.ly is all but gone, and browsing YouTube is as speedy as I could hope. I’m glad I installed the beta of 10.1, and I urge any of you readers who are fed up with Flash that is slow as… something that is the opposite of The Flash… to try it out.
* Can’t promise this link will work after 10.1 is released.
Engineer Thinking and the Art of Software Engineering
Posted by BinaryMuse in Technology on March 12th, 2010
Matt Gemmell brings up an interesting point in a recent blog post regarding user choice and defaults in software design.
But a problem arises when you allow precision-based design principles to hinder user experience. All too often, when faced with a decision about how to implement certain functionality, engineers take the extreme position that:
1. A feature must be exactly what 100% of users want.
2. If the above isn’t true (and it almost never is), the feature must be configurable.This binary approach is gravely wrong, and unjustly offloads decision-making onto the user of the software. We’ve all seen where this approach ends up: multi-row sets of tabs, scrolling panes of checkboxes, nested radio-buttons and a general overload of configuration.
He goes on to talk about technical complexity and the responsibility of software to "mask uncertainty and to make the effort to provide a sensible default behavior." However, as the post progresses, it evolves into an article that talks about the art of software engineering. One paragraph in particular really stood out to me:
It all comes down to a question of art. Our art (that of software engineering) is not in making it work. If you see it as a significant success that you managed to name some methods, or write code that compiles and runs (or implemented a heap sort, or found the bounding box for a set of points, or parsed some XML), then your career goals are low indeed. Anyone in this industry can do that stuff, including any reasonably proficient final-year undergraduate in Computing Science. That’s core-skillset, vocational learning. You’re not aiming high enough.
This got me to thinking: how often do I put ultimate importance on making something work? I’ve always been a proponent of attention to details and good UI design, but I’ve certainly been guilty of, as Matt puts it, setting my career goals too low. Something to think about.
Current Working Git or SVN Branch on the Prompt
Posted by BinaryMuse in Technology on February 22nd, 2010
This is a nifty tip I picked up somewhere on the Internet to show the Git or Subversion branch you are currently working in on the command line prompt, which I modified to include your stash level. I haven’t done a ton of serious programming under Subversion, but I know with Git I’m branching all the time (branches are so cheap in Git!). I wasn’t sure if I’d like the results before I tried it, but as it turns out, it’s even more helpful than I thought it’d be.
Edit your ~/.bash_profile to mirror the following functions. Of course, you may change the details of PS1 to your liking; it’s the \$(parse_git_branch)\$(parse_svn_branch) that’s important.
And what you end up with looks like (in this particular case):
[BinaryMuse ~/repo.git/src (FIX-15013 +2)]:
Enjoy!
How Come No One Told Me About Git?
Posted by BinaryMuse in Technology on February 16th, 2010
Prior to my current job, I never really did any "serious" programming. I had a few web sites, some tools and such I created for myself at home, and so on. The biggest team I worked on for a serious project was two people strong–myself and a good friend of mine. I’ve never really had to worry about version control or multiple people working on code at the same time.
Fast forward to my current job. I still don’t work with a huge team of developers, so I don’t have to worry about people editing my code at the same time as myself. However, I do have to maintain fairly large codebases–one in particular. This brings me to the title of my post: how come no one told me about Git?
For those unaware, Git is a "free and open source, distributed version control system." I’ve been using Git a lot lately, and I have to say, it’s awesome. Easy to use and fairly easy to understand (some of it’s more obscure features requires a bit of reading), I’m even using it for projects that only I’m working on. Branching and merging/rebasing is so easy and fast, it’s cake to test out experimental features without worrying about your stable codebase. And keeping a customized open-source project up-to-date is simple. Just git pull changes into the stable branch, git checkout your custom branch, and git merge stable. I’ve even been able to integrate it with Bugzilla, so I can push patches directly from the command line to our issue tracking system.
Another awesome pseudo-feature of Git is the community around it. It’s easy to clone and fork projects with Git, and GitHub is the perfect tool for finding code and getting your own code out there. I’ve never really written any code to share with the open source world, but I’d really like to, or find a project where my (very limited) expertise would be helpful and contribute. I think Git and GitHub will be my doorway into that world.
If you’re curious about Git, check out "Why Git is Better Than X," an article that compares various version control systems.
Why You Should Be Excited about Google Wave
Posted by BinaryMuse in News, Technology on October 21st, 2009
You may have heard the name “Google Wave” thrown around recently in tech news. Google Wave is Google’s hot new product, still in development and testing via an invitation, much like how Gmail started out. But what is Google Wave? Well, let’s start there.
What Is Google Wave?
When I was trying to think of my own definition of what Google Wave can do, I ended up with “real-time, extensible communication and collaboration.” When I looked up Google’s own definition, it turned out I wasn’t far off:
Google Wave is an online tool for real-time communication and collaboration. A wave can be both a conversation and a document where people can discuss and work together using richly formatted text, photos, videos, maps, and more.
At it’s very most basic, Google Wave can be thought of as real-time email, or really fancy instant messaging. But it’s really much more than that. Let’s define a key term or two, and then break down the definition.
Waves, Wavelets, and Blips
In Google Wave, the first unit of organization you will encounter is called a wave. A wave can be thought of as a forum topic, or a series of emails pertaining to a single topic.

Each Wave can contain wavelets, or sub-waves that have branched off the main wave, and blips, single units of communication within a wave or wavelet. When you create a wave, you can invite other people to participate in it. You can also invite individuals to wavelets, effectively giving them permission to access a certain part of a wave.
Let’s continue by breaking down the pieces of Google Wave’s abilities.
Real-Time Communication
Google Wave can be used to simply communicate with other people. If I start a wave and invite you to it, you can reply to my original blip with your own blip; I can then reply to that blip with my own. Used this way, Google Wave very much resembles email, with a few key differences.
First, communication is real time, meaning not only do I not have to press “send” or some other similar button when I am finished, but in fact, other users of a wave can see me type in real-time (unless I disallow it), allowing a more “instant message” feel to communication if so desired. Of course, the participants are welcome to come back at their leisure and respond whenever they wish.

via Wave: Google’s take on the future of communication
Secondly, participation is collective. For example, let’s imagine I have started a wave and invited my friend, Jonathan, to it. Jonathan and I have a back-and-forth about a particular issue at the office. Several blips into the conversation, we decide Jeff would be a good resource to consult. We add Jeff to the wave, and immediately Jeff has access to the entire conversation, including a “playback” feature that lets him see the blips as they were added and modified (in case the wave has branched into wavelets or edits have been made to blips).

Real-Time Collaboration
Blips in a wave are, by default, shared by any member of the wave. This means that any user that is a participant of a wave can edit any blip in the wave, effectively allowing for real-time collaboration between multiple individuals by editing the same blip at the same time. Any number of participants can edit the wave concurrently—imagine a meeting of 10 members of your department, each of them making changes to a shared wave.
But Wave’s true power comes in the final piece of the definition: extensibility.
Extensible
Google Wave is extensible in a couple of ways. The first is the notion of robots. Robots are automated users, for all intents and purposes. They are added to a wave the same way other people are, and they are programmed to carry out specific tasks. Some robots translate between languages on the fly; some robots perform other types of lookups or cross-platform postings of wave data, such as posting a wave’s data to Twitter or a blog.

Gadgets are another way to extend Google Wave. Gadgets are inserted into a specific place in a blip and provide extra functionality. This could be as simple as showing a URL in an iFrame or as complex as collaborative source code editing and highlighting, and even online games.

Looking To the Future
The future of Google Wave looks bright. Even in its current half-finished implementation, it is a powerful tool. As it becomes easier to create and install gadgets and people become more accustomed to using Wave, it has the capability to be an integral part of daily workflows. Furthermore, a protocol for Google Wave is being developed, allowing different providers to communicate with each other (much as how different companies host their own email at their domain). If you get an opportunity to try out Google Wave, I recommend you take the time to play with it and really see what it can do; also, if you have the time, the Google IO demo of Google Wave is also very interesting!
ITworks Design Journal: GWT-RPC it is!
Posted by BinaryMuse in Technology on May 26th, 2009
This post is part of the “ITworks Design Journal” series.
In a prior post, I mused about the advantages and disadvantages of using GWT’s RPC implementaion for server-side communication versus something like another server-side technology with JSON. I went and found some folks more experienced with GWT than I, did some reading, talked with some fellow programmers, and generally just absorbed information.
One thing someone advised me that really stuck in my mind was the following (keep in mind I use GXT’s widget library for GWT):
With GWT you give up the flexibility and the instant “make-change-hit-refresh” development workflow of dynamic languages like PHP and JavaScript in exchange for Java’s static type checking, reliable code refactoring, mature IDE support, and end-to-end debugging. If you aren’t going to benefit from Java on the server and GWT RPC functionality then you might be better off sticking to PHP and straight Ext JS. If you are using GWT just for GXT’s sake then you should definitely consider this.
Emphasis mine.
One of the things I don’t like about creating rich web apps is figuring out how the server will talk to the client. Everything has to be serialized, one way or another, and sent to the client, where it is reassembled. JSON is a popular choice because it is a subset of JavaScript, and thus the response can be eval()’d on the client-side for quick deserialization. GWT RPC does all this for you.
So, I decided to do a bit of tweaking to find out how hard it would be to implement my existing server-side technologies in Java, using RPC for communication. It didn’t take long to get LDAP authentication working, and SQL connectivity was quite easy (though I’m looking into additional libraries now).
I really like the way RPC feels. GWT handles all the serialization for me; I just call a function, pass a callback, and I get the data I want back. It’s quite nice. After some consideration, I decided to use Java for my server-side technology and use RPC for client-server communication. This will also give me an opportunity to learn more about Java and other projects (like Spring) for it.
As a comparison, here is some pseudocode for my user authentication script, before and after.
Before (JSON)
Client side
- Get a new RequestBuilder
- Quote username, password, and domain parameters
- Add username, password, and domain parameters to the request
- Create a new callback that does the following:
- Check the status code of the response
- On "200", parse the response text:
- Check that the JSON is valid
- Retrive the keys "auth", "name", "access" in the case of a successful login
- Retrieve the keys "auth", "message" in the case of an unsuccessful login
- On other statuses or exceptions, create an "error response"
- Send the right event to the controllers responsible for handling login responses
- Send the request to the server
Server side
- Connect to LDAP source, find user, gather information, etc
- Build a set of data with this information
- Transform data into valid JSON
After (RPC)
Client side
- Create an instance of the authentication RPC class
- Create a callback that does the following:
- Set appropriate data based on the User object returned from the RPC method
- Send the right event to the controllers responsible for handling login responses
- Call the method on the RPC class and pass in my current User object, receiving a modified User object in return
Server side
- Create plumbing interfaces, classes, and methods for the remote service
- In the server-side method, connect to LDAP source, find user, gather information, etc
- Put this data into a User object the client already uderstands and return it
GWT has it’s own small set of hoops. For every service, you need (1) an interface MyService that extends RemoteService that defines your methods for your remote service, (2) an interface MyServiceAsync that has a method that takes a second parameter AsyncCallback<MyReturnType> for the actual RPC call itself, and (3) MyServiceImpl, which is the actual server-side implementation of your service. However, the hoops really are pretty small. Here are examples of my code:
AuthenticationService.java
@RemoteServiceRelativePath("authenticateUser")
public interface AuthenticationService extends RemoteService {
User authenticateUser(User user);
}
AuthenticationServiceAsync.java
public interface AuthenticationServiceAsync {
void authenticateUser(User user, AsyncCallback<User> callback);
}
AuthenticationServiceImpl.java
public class AuthenticationServiceImpl extends RemoteServiceServlet implements AuthenticationService
{
@Override
public User authenticateUser(User user)
{
// Actual implementation here
}
}
When you use GWT RPC, your server-side code is Java–so you also get (very large) debugging benefits. For example, I use Eclipse as my IDE of choice and I debug my code using GWT’s HostedMode (which runs an internal Jetty server to serve up your server-side Java). I can add breakpoints at any point in my client or server-code and debug it right from the IDE (this was actually a huge help when learning to connect to LDAP from Java).
I’m excited about learning more about Java and frameworks like Spring (which I think I will use for my database connectivity). More to come later!
ITworks Design Journal: GWT RPC vs JSON
Posted by BinaryMuse in Technology on May 15th, 2009
This post is part of the “ITworks Design Journal” series.
Currently, ITworks uses JSON generated via PHP for client-server communication. This decision was made for several reasons:
- I am not extremely familiar with Java servlets or serving them (ie, Tomcat, etc)
- I am not familiar with accessing SQL databases from Java code
- I am experienced in PHP and quickly wrote code to convert SQL result sets into JSON responses
- I already had code to authenticate via LDAP written in PHP that could be reused for this application
- The university already has servers set up to serve PHP scripts
However, after reading more about GWT RPC and how it works, I decided to try my hand at setting up my first Tomcat instance. When the university’s web developer asked for a new Apache server, I figured it was an opportune time.
So, after a lot of experimentation and a lot of reading documentation, I installed my first Tomcat server, and even got the GWT "Hello World" demo app (the one that gets created when you use webAppCreator) to run by using mod_proxy and ProxyPass (I’m still having issues getting mod_jk to do what I want it to, but I think I’m close). So, now using GWT RPC is a real possibility.
GWT’s RPC sheme is very nice; you can call server-side methods, and your input parameters and the server’s return are all automatically serialized and sent acorss the wire–you don’t have to worry about it at all. This is certainly a very nice feature. I also feel confident that I can get LDAP authentication and SQL connectivity down fairly quickly.
The one downside is connection other non-GWT applications to the server-side code. If I want, say, an iPhone app, or a desktop widget, to be able to connect to the server to retrieve information I have to either (1) figure out how GWT RPC sends and receives information, or (2) code the server-side logic again in another language.
It’s still up in the air for me. Thoughts?

