rc3.org

Strong opinions, weakly held

Month: February 2006 (page 1 of 3)

Macs for Web development

There’s a new trend in Web development tools that seems to have arrived first for Mac users, but that I suspect will find its way to Windows and perhaps even Linux as well at some point. When you deploy Web applications, they generally rely upon system level services like a Web server, a relational database, and perhaps an application server. On computers running some Unix-like operating system, this means that the files all live in system directories like /usr, /var, and /etc. On Windows machines, you find yourself installing applications like MySQL and Apache as Services.

That’s fine for servers, but what do you do if you just want to run these applications on your laptop so you can do some development? Installing all of these packages just so that you can test out some PHP scripts or run a Rails application is a lot of work and adds significant cruft to your system. Things can get even more complicated when you start installing libraries from PEAR for PHP or Gems for Ruby. (This is one area where Java has an advantage over most other application platforms — it’s easy to let your libraries live with the applications that use them rather than installing them at the system level.)

In the Mac world, there’s a trend toward building all-in-one application packages. I first encountered it when I was having trouble getting Ruby on Rails to work on my Powerbook. Someone pointed me toward Locomotive, which is a self-contained application that has everything you need to start building Rails applications. Then one of my coworkers turned me on to MAMP, a similar package for PHP, Apache, and MySQL. I would expect to see a similar package for Tomcat soon, and then my life would be more or less complete.

These self-contained installs of servers, libraries, and everything else you need to kick start your Web development are a strategic advantage for OS X. I can get a new developer going on a Mac in 15 minutes by explaining to him where to get Locomotive and how to check out our application and run it. As someone who spends most of their time developing Web applications, I can’t really imagine going back to Windows at this point, and that’s not as much due to Apple as it is to the people developing incredibly useful free software for OS X.

From the comments: xampp is a cross-platform project that provides a self-contained environment for Apache, Perl, PHP, and MySQL.

So long, Camino

My experiment with using Camino as my everyday browser has ended. It was nice, but while it was different than FIrefox, it didn’t seem better. Teaching my brain all new keyboard shortcuts turned out not to be worth it, especially since I still use Firefox whenever I use my PC.

Of Interest

I’ve created a link blog for your feed consuming pleasure. For lack of a better name, it’s called Of Interest. You can read it in your browser, but it’s really meant to be read in your RSS/Atom reader of choice. You can subscribe to an Atom feed or an RSS feed. I also have a del.icio.us account that I use, but that’s mainly for bookmarking.

I feel like regular Movable Type entries are kind of heavy, and I wanted a place to just be able to quickly toss up links with minimal commentary. One thing I want to write more about is how different kinds of writing environments encourage different kinds of writing. I feel like everything change I’ve made to rc3.org since the beginning has encouraged longer entries. The link blog sort of goes back to the original spirit of the site, which was more about quick links to things other people wrote. We’ll see how it works out.

Update: Several people (including the first commenter on this item) noticed that when they subscribed to the Of Interest RSS feed, the items linked back to my Web site rather than to the item being discussed. That’s because some aggregators link to the link element, while others link to the guid element. I set the guid to a URL at my Web site and the link to the item itself at first, but that was causing problems for some users. Now both elements point to the actual item being linked to, so once your aggregator downloads the latest version of the feed, you should get the results you expect.

The new golf

So I read the other day that World of Warcraft is the new golf. Are you playing?

I thought it might be fun for people to post the servers where they play. I’ve spent time playing Alliance on Dalaran, Horde on Lightbringer, Horde on Emerald Dream, and I have both Horde and Alliance characters I recently moved to Eitrigg. Right now, when I have time to play, I play my tauren druid on Emerald Dream or my dwarven hunter on Eitrigg.

Other World of Warcraft players, feel free to out yourselves in the comments.

Update: Tom Coates plays, on a European server it looks like.

Pulling the torture threads

Last November President Bush stated without equivocation, “We do not torture.” That’s not true. Not only do we torture, but torture is the official policy of the United States and has been since 2002. The New Yorker has published an astounding article that documents the evolution of the administration’s torture policy since its inception, tying together many threads that have been reported over the years.

I was not amazed to read that there were people within the administration who stood in opposition to torture, but I was amazed to learn that rather than accommodating their views, the people making the decisions chose to simply lie to them the same way they’ve lied to the public. The bottom line is that in this administration, the people in control dismiss internal dissent the same way they dismiss external dissent. They avoid accountability because they believe themselves to be infallible.

(Via Eric Umansky, who seems to have joined the crew of bigots and psychopaths at Pajamas Media.)

The postmaster

One of the most interesting things and trying things about running my own server has been dealing with email issues. It seems like there are more options when it comes to email than there are with anything else. You have to pick a mail transfer agent and a POP/IMAP server, and you have to configure everything. Then there’s spam and viruses.

Postfix was the obvious choice when it came to choosing an MTA. It’s well documented, it’s easy to install, and is known for being secure. The other popular options there are Sendmail, which is monolithic, hard to configure, and used to be very insecure, and qmail, which I don’t know much about. I honestly didn’t give this decision much thought — I installed Postfix and moved on to other things.

The next question was what to do for POP and IMAP. The choice was tougher, mainly because I don’t know much about email administration. I started doing research online, and the big two packages I read about were Cyrus IMAP and Courier. Unfortunately, everything I read about them intimidated me, and most of the howto documents were aimed at people who were running email servers for lots and lots of users. I really didn’t want to have to set up MySQL databases to keep track of email aliases, or store mail, or do anything else. I am running MySQL anyway, but that just seemed excessive. I talked to a friend who suggested UW IMAP and Dovecot, which require you to have shell accounts for every mail user. That’s not a problem for me, because only my wife and I are using the server for email currently. I wound up going with Dovecot. It’s one of those things that just works, and I couldn’t be happier.

All that was left was to configure Postfix properly (this was relatively straightforward), get DNS set up correctly, and then put all of the email aliases I use into /etc/aliases. I got all of that done and I’ve been an email administrator for more than a week with no hiccups. So far so good.

In the nexts email-related post, I’ll discuss dealing with spam and viruses.

PHP is bad

Tim Bray says of PHP:

If you want your ears bent back, have a listen to Zend CEO Doron Gerstel; he’ll tell you that half the websites in the world are powered by PHP and that there are 2½ million developers and that the war is over and PHP won. So here’s my problem, based on my limited experience with PHP (deploying a couple of free apps to do this and that, and debugging a site for a non-technical friend here and there): all the PHP code I’ve seen in that experience has been messy, unmaintainable crap.

I can go one further and say that all the PHP code I’ve written has been messy, unmaintainable crap. It pains me to say that because it’s code that I wrote, and I know how to write code that is maintainable and neat. I do it in Java and Ruby all the time. So why can’t I do the same in PHP? I don’t know, but it seems to be impossible. I rewrote somebody else’s reporting system in PHP last year, and it turned out to be garbage. So then I rewrote that system again, and it was still garbage when everything was said and done.

I do think that one big problem with PHP is that refactoring is extremely difficult. When I have some messy code in a Java system, I refactor it. I find refactoring a lot more difficult to do in the PHP world, and the lack of a tool like Eclipse that facilitates refactoring is a big part of that. I’m not just talking about the stuff under the Refactoring menu, either, I’m also talking about the fact that Eclipse understands your code well enough to tell you about your compilation errors before you actually compile anything. That makes it a lot easier to move things around without having to round trip things to the browser to make sure they still work. And then there’s the fact that Eclipse has a JUnit test runner built in so that once you’ve done your refactoring you can easily run regression tests to make sure you haven’t broken anything.

It will be interesting to see how easy it is to refactor Ruby on Rails applications. The editors are not as powerful as Eclipse is for Java, but Rails is built to be easily testable, and if you take advantage of that you’re pretty well insured for refactoring.

Camino vs. Firefox

I’m giving Camino a try for a few days to see how it compares with Firefox, my old standard. It is a bit prettier than Firefox, although these Firefox themes close the gap to a certain extent. I think the thing that will ultimately drive me back to Firefox is that it’s basically the same on Windows as it is on OS X. The biggest difference I’ve seen so far is the chrome. The biggest pain so far is that the keyboard shortcut that provides access to the built in search engine box differs between the two. I use that box 25 times a day at least. (If you’re using Firefox and you aren’t using it, teach your fingers the Control-K (Command-K on OS X) keyboard shortcut. Your wrists will thank you for the reduced mouse usage.)

Web publishing resources

I’m revising a list of Web publishing resources. I posted the list to a wiki on the site, and was looking to solicit some help from readers in updating the list. You can find the list here.

Dick Cheney shot a guy in the face

I’ve been disappointed in what a lot of my favorite weblogs have had to say about the Dick Cheney incident of late. Take Think Progress for example, or firedoglake. I’ve been reading their posts on this “scandal” as they’ve been posted, and mostly they make me feel tired. I can’t help but wonder what they’re trying to uncover. Did the Vice President accidentally shoot a guy while hunting, after having a beer, and perhaps even more than one beer? Sure. Have some people lied about whether any drinking was taking place? It seems like it. So what?

I guess I don’t get the greater meaning that people are trying to draw from this. If you imagine every aspect of this scenario with a guest at the Armstrong Ranch who wasn’t the Vice President of the United States, I’m sure the details would be the same except for the media coverage. Nobody likes Dick Cheney less than me, and I still can’t see what people are getting at.

Some of the coverage I’m seeing reminds me of nothing more than right wing coverage of events when Bill Clinton was being impeached during the Monica Lewinsky scandal. We learned that the President’s mistress and his longtime assistant actually dissembled on his behalf, as though this shocking revelation blew the cover off of everything wrong he had ever done. People speculated on whether Bill Clinton wore a certain tie in order to send a message to Monica Lewinsky. They obsessed over small gifts he had purchased for her while on vacation. And none of it meant anything. They contributed nothing to the essential story, which was that the President had an affair and lied about it.

Dick Cheney went hunting and accidentally shot a guy in the face. That’s the story. All of this other crap people are talking about is just a waste of time and energy.

The best coverage of this thing I’ve read has come from people who actually hunt, like Mike Leggett in the Austin American-Statesman and Stephen Hunter in the Washington Post.

Update: Jay Rosen’s essay is a must-read as well.

Older posts

© 2024 rc3.org

Theme by Anders NorenUp ↑