In praise of Smultron

Thu 14 Feb 08 21:58 | Tags: Mac, Programming, Software

I write this post in praise of what I think is one of the unsung heroes of development on the Mac; the Smultron text editor.

The shadow of TextMate looms large and dark, despite its ~$60 shareware fee. It's by far the most popular text editor among Mac coders, and it even has its own dead tree book. However, even though I'll occasionally go back and give it a try, I keep coming back to Smultron, and not only because it's free.

One document at a time? That's for sissies!

Smultron supports most of the features of competent text editors, such as tabbed editing (Smultron uses vertical drawers by default, but can be easily switched to use horizontal tabs), automatic line numbering, syntax coloring, integration with FTP programs such as Transmit, and so forth. But let me quickly run a couple reasons why I keep choosing it over others, including TextMate. (This list might not be totally fair, since it's been a while since I last tried TextMate.)

The most common uniquely Smultron feature I use is the Split Window feature. This lets you look at two documents, or possibly two different parts of the same document, in one window. The window is split horizontally if you just select the Split Window item from the View menu (or press Command-Apostrophe), but holding down the Option key while opening the View menu (or pressing Command-Option-Apostrophe) lets you split the window vertically, which I find much more handy in these days of triple-wide monitors. Editing a template, but can't remember what variables you've assigned to it? Open up the template in the left pane and the code where you've assigned the variables in the right. Made a complicated function and you can never remember the order of the parameters when you go to use it? Open the function definition in the right pane, and continue hacking away on the left. What a great feature!

Another great feature is the Advanced Find & Replace window. The regular Find feature (Command-F) just uses the simple standard Mac OS X find-and-replace tool, but the Advanced Find feature (Command-Shift-F) works with regular expressions. That in itself is not too fascinating, but what's cool is that it will build you a list of lines that match your pattern, and selecting the line will show you where that line appears in the document in the pane below. This is absolutely great for testing regular expressions before you do a replacement with them. It's also handy for testing a regular expression that I want to use in my code instead of on it; I just open up a new tab, paste or type in some sample data, then bring up the Advanced Find window and test and refine my pattern until it's perfect.

And did I mention it's free?

The Advanced Find window. Very cool.

It's lacking a few features, though, of course, most notably any auto-completion features of any sort -- though I personally don't miss 'em. Also, though it's possible to make your own syntax definitions for syntax coloring if one of the fifty or so included with the program doesn't suit your needs, or add one that someone else made, it's not very convenient; you have to literally use the Finder's Show Package Contents feature on the app itself and root around in there -- the process could be much easier.

Still, if TextMate isn't cutting it for you -- or maybe you just can't afford it -- it couldn't hurt to give Smultron a try. With my current job, I can now easily afford a more expensive, more feature-packed editor, but I'm still sticking with Smultron.

Get more great Ray Gun Robot content sent directly to your feed reader or email inbox! Subscribe today!
Feed icon Articles & LinksVia Email
Feed icon Articles OnlyVia Email

1 Comment | 0 Trackbacks | Digg this article | Bookmark with del.icio.us

 

Conflagration Beta 4

Sun 8 Jul 07 17:29 | Tags: Blogging, Software

Yesterday, I released the latest version of my Conflagration script. If you're a blogger who "burns" feeds with FeedBurner, check out Conflagration; it lets you do some cool things with your feed counts that FeedBurner's standard non-programmer tools won't let you, like combine the feed counts of more than one feed and create a custom image to display your feed count.

New in this version is the ability to also output your feed count as plain text, if you don't need no stinkin' images to show off your count. Doing this required some major changes to some parts of the code, so it's possible that a few new bugs snuck in there somewhere; mad props will go to you if you can find one.

Conflagration is totally free and fairly easy to set up, so why not give it a try?

Get more great Ray Gun Robot content sent directly to your feed reader or email inbox! Subscribe today!
Feed icon Articles & LinksVia Email
Feed icon Articles OnlyVia Email

0 Comments | 0 Trackbacks | Digg this article | Bookmark with del.icio.us

 

Jammin' with Joomla!

Sun 24 Jun 07 05:44 | Tags: Internet, Reviews, Software

One of the projects I'm working on at work is building a site using a content management system called Joomla! (I'm not overly excited about it; the exclamation part is actually part of the name, just like with Yahoo!) It was a bit of an experiment in that neither I personally nor the company as a whole had any previous experience with it, but I was told to give it a try for this one client and see if it was going to be something that we'd want to use for other clients in the future.

Joomla! is a fork off of an earlier CMS called Mambo. It's basically a PHP script which powers the creation of a web site in much the same way that blog software like Serendipity does, but it has a much broader scope; it can be used to make a blog-like site, but it can also build a site consisting entirely of static (unchanging) pages, or of periodical news articles, or of any combination in between. In addition, it has an extensive modding system with plenty of free and for-pay extensions which are fairly easy to install and include shopping carts, image galleries, and just about anything else you might need.

At first, I was skeptical of Joomla!, and didn't really like it when I started digging into it. It feels like it really does too much sometimes. It takes a bit of time to wrap your mind around the way that Joomla! works; for example, before you can add any content to your new site, you have to create at least one "Category," then one "Section" under the category; I'm still not entirely sure why this two levels of content categorization is really necessary. (Joomla! has an option, on by default, to automatically set up categories and sections and add some content to them when you install it, but I would actually recommend turing that off because you'll just have to go back and delete all that content later.) Also, when creating new Sections and Categories, you're prompted for both a "Title" and a "Name" for them, with no apparent explanation as to what the difference is between them or how they will be used. Weirdness like this give Joomla! a bit of a tall barrier to entry. Also frustrating are two things that I also found frustrating with WordPress; you're locked into using the unspectacular MySQL database system, and the "templates" are actually just PHP files which mix PHP code and page content and design, a poor programming practice.

However, the more I used it, the more Joomla! grew on me. Once you get over that initial hurdle of figuring out just how stuff is supposed to work, the simplicity and efficiency with which you can create new pages, add new content, and install new module features without ever having to touch a lick of code is quite pleasant - and will be greatly appreciated by our non-programmer client, who wants the ability to add content to his site by himself once we get it completely set up.

If you're going to try Joomla!, one extension that I highly recommend installing would be OpenSEF, which allows you to use URIs which are packed with keywords for search engines to index - not to mention making them easier to type for humans. Joomla! offers up some pretty gnarly URLs by default, such as (and I'm not making this up):

http://domain.xyz/index.php?option=com_content&task=view&id=8&Itemid=9

As our client is a guy who offers fishing tours of the local rivers, we're going to use OpenSEF to have an address like this instead:

http://domain.xyz/tour-packages-and-prices.html

Aah, much better. We're also using the RSGallery2 image gallery extension.

Anyway, just because you can create a Joomla!-powered site without any coding by all means doesn't mean you have to, and I sure wasn't one to shy away from a text editor for this project. For one, we needed to create a new template that'd be relevant to the client; after getting a mock-up image from one of our designers (that is, one of the guys that actually has some artistic talent; not my forte), I converted it into code and integrated it into Joomla!'s template system. I'd love to show it to ya, but it's not quite finished yet, so I can't link to it just yet.

One frustration that I had was that Joomla! does not have something in its back end to customize <title> tags for a page. It'll automatically create a title by taking the site name and appending the page's title as defined when it's created in the CMS back-end, but that wasn't really what I wanted for cosmetic and (especially) search engine optimization purposes. I figured there must be a way I could tweak the template to create a custom title depending on which page it was displaying. Finally, I found the $mainframe object, which contained a bunch of info about the current page that Joomla! used for various purposes. By doing a var_dump() on it, I found that the page's ID number was stored as a string at $mainframe->menu->id. So I whipped up a bit of PHP code and put it in the template near the top, before the mosShowHead() call.

<?php
//Better title-fier

if($mainframe->menu->id=="1"){
    $mainframe->_head['title']="Client Name Guide Service - River Fishing Tours in Humboldt County, Northern California!";
}
elseif($mainframe->menu->id=="6"){
    $mainframe->_head['title']="Client Name Guide Service - California Fishing Tour Packages &amp; Prices";
}
elseif(…){…}
?>

(Yes, smart-alecks, I could use switch instead of a bunch of if/elseifs, but I think the syntax for switch structures sucks.)

It's not easy to get started, but Joomla! is slick enough that I'd recommend it for people who want to get an easily-customizable site up and running quickly - though admittedly, you'll be setting up your second Joomla! site up an order of magnitude faster than your first one. Joomla! is free and open-source, so it won't cost you more than your time to give it a try.

Get more great Ray Gun Robot content sent directly to your feed reader or email inbox! Subscribe today!
Feed icon Articles & LinksVia Email
Feed icon Articles OnlyVia Email

1 Comment | 0 Trackbacks | Digg this article | Bookmark with del.icio.us

 

Conflagration: A better web feed subscriber widget

Sat 26 May 07 19:19 | Tags: Blogging, Meta, Software

Here's one for my fellow bloggers out there, specifically those who use the FeedBurner service to tweak and serve their web feeds. FeedBurner allows you display a little widget on your blog that shows you how many subscribers you have. Even if you don't use FeedBurner, you may have seen it around the web at big-name blogs like TechCrunch and John Chow, as well as smaller (though not as small as RGR…) blogs like Mac OS X Tips and Kumiko's Cash Quest. It looks like this.

I used to use this widget myself, for somewhat selfish reasons, but I was never too excited about it. Why? Because at every site it's displayed, it looks exactly the same, save for slight color variations. The same boxy design, the same ugly aliased font.

Now, if you look over to the sidebar on the right, you'll see a feed widget with a number that is quite different. How did I do that? I made my own widget which I call Conflagration. It gets the subscriber count from FeedBurner and creates a prettier and much more original image with it. I've even implemented a simple theme system which lets me create new designs apart from the code itself, so you don't have to know any programming to create new "themes." Along with the "RayGunRobot" theme which I'm using here, Conflagration also comes with these themes "out of the box:"

"BigTimeSkyBlue" theme (also comes in gray, pink and green).

"Tilted" theme. (It could use a little more work…)

Also, back when I began offering two versions of my feed, I wanted my widget to display the total subscriber count of both feeds. So I added a feature to display the total subscribers from as many feeds as you want.

Today I am making Conflagration available to the public at large for the grand price of zero, zip, zilch, free. It's still in "beta," so more features should be forthcoming, but it seems to work fairly well at present and there's no bugs that I know of. It's a little more difficult to set up than the standard FeedBurner widget, and you have to have a server which you can run PHP scripts off of (so Blogger/TypePad/LiveJournal/etc users are out of the loop for now), but if you're looking for features above and beyond what FeedBurner's widget can do, give it a try. And please don't hesitate to contact me or leave a comment if you have any questions, feature suggestions, or found bugs.

Also please contact me if you've created an aesthetically-pleasing theme which you'd like to share with others. I'm a programmer, not an artist, so I'd be glad to see more and better-looking themes made available for Conflagration than the ones that are currently included.

Oh, and have you checked out SigFeeder? That's another cool tool for bloggers which I've developed.

(By the way, if it looks like I'm linking to all those blogs in the first paragraph in the hopes that they'll notice the incoming link via Technorati, check this out, then start using Conflagration themselves and then link back to me, well, that's exactly what I'm doing. It's just one of those sneaky things bloggers do.)

Get more great Ray Gun Robot content sent directly to your feed reader or email inbox! Subscribe today!
Feed icon Articles & LinksVia Email
Feed icon Articles OnlyVia Email

5 Comments | 0 Trackbacks | Digg this article | Bookmark with del.icio.us

 

My three favorite totally free fonts

Fri 18 May 07 21:20 | Tags: Software

During the development of SigFeeder and other projects, I found myself in need of some free fonts. (Yes, I know the proper wording should be "free typefaces," but for my sanity's sake, I will stick with the shorter, more common term for now.) Now, there are plenty of sites where you can download decent fonts at no cost - dafont.com is a nice one - but, as the original (now abandoned) plan with SigFeeder was to run it for profit, the font's license had to permit me to use it for commercial purposes. And with other projects, I wanted to redistribute the font along with the source code of the project. It turns out the creators of many "free" fonts are just fine with you downloading the font to your computer and using it to create signs for your church's bake sale or whatever, but their licenses prohibit redistribution and/or use for profit-oriented purposes. And, me being me, I'm too broke to pay up licensing fees to be able to do those things, and I'm so cheap that I probably wouldn't do it even if I could afford it. This led me on an ongoing quest to find fonts that really were totally free; that had permissive or even public-domain licenses that would grant me these freedoms. Of course, I'm a little bit of a closet typography nerd, so they had to look good too, and they had to be good for a wide range of applications; they couldn't be gimmicky. Here's the top three good-looking, non-gimmicky, very free fonts I've found so far.

Junicode

It seems to be customary with fonts to offer graphical previews of them composed of several random words in various font styles. Far be it for me to break tradition.

Whoops… I've got "miniscule" on there twice. Oh well.

Anyway, according to its website, Junicode was designed for writing medieval languages such as Latin, Middle English and such, but as you can see, it works just fine with the modern equivalent; indeed, it's almost visually indistinguishable from Times, though it is harder to read at smaller sizes. I think where this typeface really shines, though, is the italic form. Very pretty.

Junicode is available under the GNU General Public License, the same license that Linux is distributed under. So it's quite liberal.

Free UCS Outline Fonts

This is actually comprised of three separate fonts; a serif, a sans-serif and a serif-y monospaced font.

The Free UCS Outline Fonts (what a lame name!) aren't perfect. In the sans-serif one, the baseline seems uneven at larger sizes; notice how the L in "disgruntled" seems to be hovering above the baseline of the T and E surrounding it. On the other hand, it looks good at smaller sizes, if a bit wide. The serif font, on the other hand, looks great when it's big, but, as with Junicode, the characters tend to bunch up too much at smaller sizes. The monospace font is unspectacularly functional, though I tend to prefer fewer serifs in my monospaced fonts, a la Monaco.

Like Junicode, these fonts are available under the GNU GPL. The download section of their site is a bit confusing, as it lists several different files with no explanation as to which one you should nab, so let me make it easy for you; download this one.

Tuffy

I really like Tuffy. It's a clean sans-serif face with playful curves. It doesn't quite have the wide character range of the other fonts listed above, but as long as you don't need to venture too far outside of the Latin alphabet (including accented characters), Tuffy should do the job.

If you're astute, you may have noticed that this is the font I use for my feed count widget at the top of the page.

Tuffy is the most "free" font in this article; it is released under a public domain license.

A note to fellow Mac users: When you try to install these fonts (and various other free fonts around the web), Font Book might warn you that the fonts have "Missing OpenType Data" and you shouldn't use them. From my experience, it seems to be perfectly safe to ignore this warning and install the fonts anyway. Also, you might be interested in reading "The easiest way to use OS X fonts in GIMP."

Know of any other great, free general-purpose fonts you'd like folks to know about? Please leave a comment and share your thoughts.

Get more great Ray Gun Robot content sent directly to your feed reader or email inbox! Subscribe today!
Feed icon Articles & LinksVia Email
Feed icon Articles OnlyVia Email

0 Comments | 0 Trackbacks | Digg this article | Bookmark with del.icio.us