Skip to content

PyObjc & Seemingly Incorrect Return Value Mismatch

I’ve come to love developing in PyObjc. Sure, it has its quirks, isn’t the fastest, and isn’t the easiest to debug when something goes really wrong (aka imperfect integration with the xcode IDE); but it is fast to develop in. Almost every seemingly complex task that has come my way has been 50% completed by some open source python module that I can include in a commercial app without any licensing trouble. However, the other day I came across a bug (at least, what I thought was a bug) that seemed very blaringly obvious and for a production version of a scripting bridge…

Continue Reading

Regex Revisited: Ack, SED, and TextMate

Grep has long been considered the de-facto regex command line tool for unix developers, but I’ve never really liked it. Grep has always seemed slow, buggy, and limited in its regex capabilities; I always resorted to using the built in regex functionality of TextMate or Python’s built in regex abilities. As great as Python and TextMate are, they are not a clean solution to a simple problem and do not play nicely with shell scripting. Thankfully I’ve finally found a regex tool that fulfills my expectations: ack. There is an even a “Ack in Project” TextMate Plugin (so long Grep in Project) which works blazingly fast…

Continue Reading

Best CSS Compression Around: CSS Optimizer 1.1

After almost four years I’ve released the next – and possibly the last for a very long while – version of CSS Optimizer. Aside from minor optimizations, I’ve fixed the last remaining parser bug having to do with “font: 62.5%/1.2em”. I haven’t yet updated the GUI application, but the command line application for linux and os x is updated. I’ve also fixed all issues with the online web css optimizer. Also a little while ago I added a css optimizer web service to allow easier integration to custom automation systems. I’ve tested CSS Optimizer against some of the newer CSS optimizers such as YUI compressor as well as other online compressors and CSS Optimizer has always come out on top…

Continue Reading

Interactive PHP Shell

PHP is an amazing language, I’ve appreciated it and its community more and more since I’ve been forced to mull through some ASP code. One thing it lacks in comparison to other languages such as BASH, Python, or Ruby is an interactive shell to test code in. A while back I found a nice little command line script that creates a quasi PHP shell. It isn’t perfect but it works pretty darn well for simple code testing and makes developing PHP scripts a bit easier. In addition to the command line shell a couple days ago a simple GUI PHP console, PHP console, was released. It seems to work fairly well, although I prefer the command line shell.

Continue Reading

Don’t Forget To Flush…

No, not the toilet, your file streams. I was recently working on a project that involved creating a child process and reading its stdout to update the user inteface. Everything was working great until I sent it off to some testers who reporting that it ‘wasn’t working’ – the interface wasn’t updating correctly. I first thought it was a problem with the shell command itself, maybe it wasn’t performing the operation correctly and thus wasn’t sending the correct message through stdout but as far as I could tell everything was working perfectly. After about 3 hours of banging my head against the wall trying random things I finally thought to flush the stdout after sending my status message. It fixed it!..

Continue Reading

XASH 1.4

Following the XTrace 1.1 update is XASH 1.4. This is a smaller release, but still comes with a good number of improvements: Search speed improvements Hitting return with the help tree in focus will open the currently selected page in the help tree Hitting return in the search field will cause the top most search item to open The book filter is now ‘sticky’ (remembers which book you last filtered by) Compiled & tested as a universal binary Actionscript 3 Support Alot of people have emailed me asking about support for Actionscript 3. The fact is, I dont use Actionscript 3 yet (don’t do nearly as much Flash work as I did), so I have no desire to add support for Actionscript 3 documentation…

Continue Reading

DKActionButton: Cocoa Action Buttons Made Easy

Bringing use to my cocoa icons is DKActionButton, an easy to use class that allows you to create ‘action buttons’ as found in many cocoa apps today. DKActionButton is used in App Stop, along with another unreleased application (hence the DK prefix). Heres what it looks like in action: DKActionButton is pretty easy to use and simply takes a couple minutes worth of work in interface builder and a couple lines of code. You can download DKActionButton along with a sample application here. DKActionButton licensed under the BSD, so you can use it in commercial/shareware apps.

Continue Reading