Skip to content

Random Tid Bits

Heres some programming tid bits that really didn’t deserve their own post, so I grouped them all together into one post! 😛 else-switch We all know about the common else-if language construct that is available in almost all programming languages, but here one you might of not been aware of: the else-switch statement. [code lang=”javascript”] if(false) { } else switch(number) { case 0: //do something break; case 1: //do something else break; default: //do default action } [/code] Actually, you can follow if with any control statement. For instance, you can have an else-return or an else-break statement. This might be old news to some programmers, but I never knew you could do that!..

Continue Reading

CSS Optimizer 1.0

I finally found some time to get CSS Optimizer 1.0 released to the public. The 1.0 release brings with it alot of changes: Adding support for the “”}”” hack outlined here: http://diveintoaccessibility.org/examples/fontsize.html Added processing css from the standard input (-i option) Added outputting processed css to the standard output (-o option) Added -q (quiet) option Code cleanup & optimization Updated manual/reame now in HTML Online version of CSS Optimizer at: http://developer.mabwebdesign.com/cssoptimizer/compress.html CSS un-compressor at: http://developer.mabwebdesign.com/cssoptimizer/uncompress.html Exit codes are now predictable…

Continue Reading

XASH: Flash Help File Viewer

XASH, a Flash help file viewer written in Cocoa whose goal is to make it easier & faster to view flash help files is now available. At the moment the implementation is very simply and doesn’t provide any advantages over Flash IDE help viewer (other than its faster, open-source, and a native Cocoa application); but I’m planning on adding filtering and searching features which should make finding the right help pages alot easier. If you have any feature requests or bug reports please let me know!

Continue Reading

Expr Crippled on OS X

Lately, I’ve been trying to dig into shell scripting. While reading through a Bash Scripting Guide and testing out the expr command line utility I found that the OS X version of expr is very limited compared to the linux/standard version. All of the nice string related commands outlined on the Man Page for expr don’t work on the OS X version of the utility. This is severly limiting especially because (as far as I know) there is no way to find the index of a substring in Bash scripting except through expr. In any case, I’ve filed a bug-report (rdar://4269034) about this problem. On a side-note, thank-you everyone who responded to my previous post on ‘What is Missing?’. I will be making one of the suggested projects.

Continue Reading