So it’s been about 3 years since I made the switch over to Macs, and I’ve been pretty happy with it. I have shell that doesn’t suck and all the goodness that comes with a UNIX-like operating system. The one thing that’s always bothered me a bit is the lack of good tiling window management. About 6 months ago I played with xmonad for a bit and really loved it, even to the point where I tried using it in XQuartz on Mac (which turned out to be a terrible experience).

I’ve somewhat managed to get away with it by using emacs for the most of my editing. While not of the same calibre as a TWM like xmonad, it gives me that frameless experience I like. The one disadvantage is the lack of a shell I could use (if there’s something better than eshell, OH PLEASE TELL ME!) so I’ve typically had emacs using 80% of my screen, and an iTerm window using the other 20%… or something. It’s been alright, though I hate having to switch out of one application into another run something then switch back, etc etc. This is where I decided to take the plunge and give tmux a shot.

For those who don’t know about it, tmux stands for “Terminal Multiplexer” and allows you to have multiple terminal sessions running, sort of like Spaces or Virtual Desktops except entirely text based. They also allow you to disconnect from a session while not actually killing the processes, which is useful for things like running something on a server (upgrading stuff, or running a really long query where timeouts may be an issue). The connecting/disconnecting part has been a pretty awesome life-saver for myself where I have a tendency to lose context and kill or close the wrong application which is most often my editor.

Along with the session management there’s the window or pane aspect as well, which I really just use as a tiling manager. It’s not as advanced as xmonad, but I’m spending more time in a single application (iTerm) where it’s drastically easier to switch between my applications.

Of course everything isn’t perfect! I still haven’t figured out how to get stuff from emacs into my clipboard, which kinda sucks though aside from some sort of minor issues like this, I’ve been pretty satisfied.

 

I gave myself a personal goal around mid to late November; to finish an STO Android app with the dataset that Phil Casgrain had given me access to.  The app is now available on the Android market as STO on the Go though it’s almost impossible to find using the search.

I’m selling the app for $1.00 though there is a good chance it will be getting an increase in the next version, which will have at least maps and favourites features.

 

I’ve been working on a side project at Shopify recently and one of the things I had to take a converted JSON object and store it on disk as a cache. I’m typically working with NSArrays and other fancy things so I figured this is where I’d look for serializing that data into a plist on disk.

-(BOOL) saveArray:(NSArray*)itemsArray toLocationOnDisk:(NSString*)location
{
    BOOL saved = [itemsArray writeToFile:location atomically:YES];
    return saved;
}

Because I’m targetting iOS 5 I have this nifty new tool available, it’s NSJSONSerialization though there’s a bit of a caveat. The data that you get back from it isn’t actually objects of NSArray, NSDictionary although for all intents and purposes they behave like they are in your code.

There is another way to get around this though, what you can do is convert the array into an archived object like so.

-(BOOL) saveArray:(NSArray*)itemsArray toLocationOnDisk:(NSString*)location
{
    NSData *archivedItemsArray = [NSKeyedArchiver archivedDataWithRootObject:itemsArray];
    BOOL saved = [archivedItemsArray writeToFile:location atomically:YES];
    return saved;
}

Now all we need to do is re-convert that data into an NSArray, which is relatively straightforward.

// Deserialize the object back to an NSArray
-(NSArray*) getArrayFromDisk:(NSString*)location
{
    NSData *rawData = [NSData dataWithContentsOfFile:location];
    if(rawData == nil)
        // Assuming iOS 5 using ARC
        return [[NSArray alloc] init];
    return (NSArray*) [NSKeyedUnarchiver unarchiveObjectWithData:rawData];
}

Once you know about this, it’s pretty straightforward but trying to find answers on sites like StackOverflow for this kind of problem is a bit tricky since people often assume you are working with plain old NSArrays and such.

 

I recently discovered that although PhoneGap is pretty awesome, there are some things you should know before you go out and try to get it working on your melange of devices.

phonegap.js isn’t all that you expect it to be. That is to say, phonegap.js for an iPhone isn’t the same phonegap.js that is used on Android. So, if you are going to be dropping phonegap onto a bunch of different devices while testing, be sure that you are using the proper javascript file. Otherwise you will be stuck scratching your head wondering why the camera works on platform X but not platform Y.

They are hoping to get that taken care of in the future, but for the time being you’ll have to be sure that you are using the proper file.

 

I’ve released my first version of Bloggit: The dynamic blogging engine for hackers or something…

My main motivation for creating this tool was inspired by jekyll which I used for a bit in the past but found there were certain parts of it I didn’t like. Essentially the goal of this project is to have the application installed somewhere, then have a content directory that uses some kind of source control system such as git which it will pull from and update every hour or something. So when you write a blog post you save it in your local content directory, then push your commit to a public repository somewhere such as Github. There will be a bit of a delay between your push and when it gets published on the site but that can be customized via your CRON that would run.

The tool is extremely simple in concept, though still quite rough around the edges, especially in deployment. You can see it running at my Codenoodles site. The default templates and themes have support for mobile devices such as Android and iPhone.

All you need to start running your own Bloggit powered site is to have Flask and markup installed on your machine.

More details about it can be found on the wiki

 

I know this is old news, but I still see through my twitter feeds that people are still talking about this paid app pledge. I for one cannot stand the idea of spending 5 dollars every week for software, which after a certain point will be the trash apps that pollute what is the Android Market.If anything this makes Android developers look even more pathetic in the eyes of those developing for the “superior platform”.

Your software should have better reasons to get users to upgrade their software from the free Lite to the Pro version. These incentives should not simply be to remove the advertising from you apps! What else am I getting for that money I pay you besides having advertisements removed? Hell, charge me $3.00 and add a bunch of new features that make me want to upgrade. That one feature that makes your app good but not great without it. That is something I will pay for!

Some users complain about an application having advertising in it, which is typically in something free. Though from what I’ve noticed, most advertising is in the form of banner ads or in-list ads that I don’t even notice them or care. As such I’ve never let advertising in apps bother me one bit, I’m still using the free version of ChompSMS and don’t have any intentions of paying for it because the removal of advertising isn’t worth my money.

So, developers: make your apps rock and users will flock to them with wads of cash.

So, users: You control the market, so buy the apps that are worth the money.

I’ll do another post about developers cannot get the merchant _blessing_ and how we can try to make money through other means in the future.

© 2011 Christopher Saunders Suffusion theme by Sayontan Sinha