CoRD, Pixen, and the passage of time…

It has been nearly two years since I last updated this blog and a lot has happened.

First, my Pixen fork is dead. I’m sorry but I found it rather difficult to spend time on a project I for which had no personal use. Luckily Pixen’s original creators have started updating the project once again. They released version 3.5.10b1 just a few weeks ago. It also looks like they’re taking the project commercial on the app store. Anyone looking for a good pixel editor should give it a try.

Second, I’ve recently started hacking on CoRD, an RDP client for OS X. I’m currently a windows server admin for my university and I needed a good RDP client. Microsoft’s official client just wasn’t cutting it for the number of servers I connect to on a daily basis and its stability was rather poor. So far I’ve modernized the code a bit, moved the minimum requirements to 64-bit on 10.6, and added one new feature, the ability to set a default username, password, and domain for new connections. I’ve also begun refactoring some of the more egregious metafiles (1000+ line AppController). Anyone interested can track my fork here and download my latest build here. I’m very interested in getting CoRD switched from rdesktop to FreeRDP but have hit a few obstacles along the way. But I have finally gotten FreeRDP playing nice with Xcode so I’ll be working on it more over my spring break next week.

Finally, I’ll be graduating with a degree in computer science at the end of April. In the mean time I’ll continue hacking away on CoRD and hope to make some sort of contribution by the time I find a job. Speaking of which, I should probably put my resume up here somewhere.

Pixen: Out with old, in with the nu

I’d been planning a Pixen update explaining my continued lack of progress for quite a while. That I was busy in my new role as an iOS developer for the company I’d been working at for over year. How I would surely make progress on Pixen by leveraging the skills I developed on the job. But then they decided to downsize their iOS team from 3 developers to 2 and I suddenly found myself unemployed. Luckily my night classes at the local community college have paid off and I’ve been admitted to the local university’s computer science program. So now instead of being to busy working to work on Pixen I’ll be too busy studying to work on Pixen. But fear not! I’ve found a solution: rewrite it. Yes, I know rewrites are usually a foolish waste of time and money, but fortunately being unpaid, all I’ll waste is time! Turns out that it’s much easier, at least for me, to create a pixel editor from scratch than it is to shoehorn Pixen’s current code into modern APIs. I call it nuPixen. It’s still in the prototype phase but it does enough to be worthy of a screenshot.

A bit simplistic?

It can edit pixels, I swear!


You may have noticed by the window controls that I am, in fact, developing on 10.7. This will eliminate any version specific code I need to write and allow me to take advantage of all of the Lion APIs without worrying about compatibility. nuPixen will be open source on my GitHub page but will not be available until sometime after Lion’s release. In the mean time I’ll be posting updates on my progress and questions for users of Pixen and Mac developers in general about how I should move forward. Like I said, I’m still in the prototype phase, so that means I’m still trying to grok the OS X imaging APIs and how to fundamentally write a pixel editor. As you can see from the screenshot though, I do have basic image input, editing, and output working, along with the ability to set your fill color and switch the pixel grid on and off.

This is where I’ve hit my first issue: my pixel grid is uneven. Here’s my current code:

This method both resizes the image (currently stored as an NSBitmapImageRep) while maintaining the aspect ratio and draws the pixel grid when when it’s turned on. As you may be able to tell from the screenshot, the pixel grid is uneven, or at least appears to be. So my question is this, Mac developers: what would be a better way to draw the grid? As well, I currently access the image data by using NSBitmapImageReps’ setColor:atX:y: and it seems to work fine, but is it the best way? I ask you so I can code and not worry that what I’m writing is stupidly wrong. I look forward to your input.

P.S. Does anyone know a good, free, code-friendly WordPress theme? Carrington is just too damn narrow.

Pixen: Where am I?

Well, it has been almost a year since I posted about my adoption of Pixen. While I haven’t made the progress I had hoped in that time, there is some to report. My current GitHub repository builds on 10.6 only and only with the 32-bit Intel architecture. I’ve gotten the build down to 3 warnings with all of the options I’ve enabled but the clang static analyzer still finds over a hundred issues with the code. There are also several bugs still present that I’ve been trying to narrow down. And, unfortunately, several major parts of Pixen must be rewritten nearly from scratch to build against the 64-bit APIs. Overall, this has turned out to be a much more complicated project that I’d hoped. Pixen consists of over 25,000 lines of custom code, and that doesn’t count 3rd party libraries, of which there are several. There are an assortment of custom classes used throughout the program, including custom UI elements and even the basic image type is custom. Combine this with very little in the way of documentation or comments and my new job, and I just haven’t had the time (or expertise) to delve as far into the code as necessary. So I apologize to anyone hoping for some Pixen progress.

There is still hope however. Pixen: we can rebuild it, we have the technology. Over the coming weeks, time allowing, I’ll be adding a list of several major issues that need to be addressed for Pixen to move into 2010. These will be posted on my GitHub page, so feel free to comment with any suggestions. I always welcome additional insight into the Pixen code. Even if you don’t implement features or fix bugs, pointing me in the right direction so I can try to do so myself would be great. I’ll be focusing on any bugs that pop up (I already have at least one) and the transition to the 64-bit APIs. One of the biggest changes I’d like to see, even if I don’t do much with the foundation of the program, is a refreshed UI. I am not a designer by any stretch of the imagination, so if anyone is interested in submitting UI ideas or artwork, especially the UI icons, I would greatly appreciate it.

Thanks for reading.

I’ve adopted a Pixen!

Just over a week ago, Andy Matuschak, of Sparkle fame, asked for volunteers to adopt his Pixen project. It’s a pixel-based image editor for Mac OS X, and Andy just doesn’t have the time to maintain it or add features for the upcoming 4.0 release. So I offered my services. I figured I may be more successful working on an already established project rather than creating my own from scratch. You can follow my progress at GitHub and some of my code has already been integrated into the main Pixen repository there.

So far my efforts have been limited to project cleanup, modernization, and house keeping. I expect this to be a great learning experience for me going forward and I’ll be posting code updates as I understand more of the Pixen code. Right now my priorities are fixing all of the warnings I created with new compiler options, updating the Obj-C syntax and Cocoa API’s used, and taking a look at the performance. Plus we’ll all be discussing exactly what new features to add for version 4.