Auto-imported from old gallery:
Auto-imported from old gallery:
While the post has fallen down on the page, the comments on my previous post “Apple In My Eye” are generally excellent all around and deserve some attention. As an update to some of the problems, Apple has released a new version of iTunes for Windows which fixes the random crashing problem and has allowed me to import the rest of my collection and it didn’t move any of my files around or discard any metadata. On my laptop I don’t use it because it tends to be a bit demanding on resources, however on my desktop which is sometimes just a glorified jukebox it’s running pretty much full time. The album art feature is really intuitive and easy to use, and I burned a CD the other day using it (instead of Nero or Easy CD Creator like normally) and it was a piece of cake. On my laptop I’m using a great little program called foobar2000 which is very small and does the job well.
In judging Apple as a company I’m going to be watching this memo very closely:
This memo is written for two reasons. First, to request that Apple officially recognize that LiteSwitch X played a role in the formation of Panther’s switcher. For tens of thousands of users the feature has existed since May 2002. A developer at Proteron first conceived of it. Proteron developed and published it. Now Apple has made it their own, an “Apple innovation,” without recognizing Proteron.
Still waiting for something from the PDC to knock my socks off. For a good filter use everyone’s favorite human aggregator, Robert Scoble.
Lately it is with less frequency that news from the White House sends a chill up my spine, yet it seems the White House is using technical means to prevent spidering and archival of key documents. This is, without question, highly questionable. I hope there is a good reason for this or that it will be reversed quickly, but one has to wonder whether such a deliberate action could have been done by someone who is not a stakeholder, like a web lackey.
Of course this is a situation that could be addressed by technical means. A spidering robot that did not follow the robot exclusion rules could spider a number of public government web pages at set intervals, say twice a day, archive the results of the crawl, and a summary of the differences between the versions could be offered as a service of government transparancy. WhiteHouse.gov would certainly be worth watching and others such as the Fed could be interesting as well. It’s not a trivial task, but I would imagine one of the groups interested in such things would have no problem funding the development and mantainance of such a tool. For complete transparancy the tool could be open source. I can’t think of a legitimate objection that could be brought against such a service by operators of the websites in question. Bandwidth use would be trivial compared to the amount of traffic such sites must get every day.
A little afternoon hacking has produced a new WordPress feature that is in the CVS for the curious. Thoughts? So are you ready to use WordPress yet?
Old links of the style
/p123 are being permanently redirected to the new format using a very simple PHP script and a modification of my old mod_rewrite rules. No link left behind! The RSS feeds (feedii?) should be fixed as well. This is a feature I’ve been wanting for a long time and it has been surprisingly easy to implement so far. I need to tweak the bread crumb function still, but that’s an issue specific to this site, not the general implementation.
Also now notice that the date attached to each post is in fact a multi-level link, an idea I stole from the best, Dunstan Orchard.
Wow, this first and last full day of the conference has been absolutely amazing, in many ways. I’ll blog specifics about each session tomorrow when I’ve had time to soak everything in and review my notes, so let’s call this a short man-on-the-street account of the day. I’m writing this as I upload pictures but the open wireless access point I’m on has a very weak signal so it’s making it a little hard to work. I took about thirty pictures, and many of them came out well so I’m happy with that. They are up now but as of yet uncaptioned. So how was the day?
It got started with me waking up naturally, which was good because I had accidentally set my alarm for PM instead of AM, and if I had been late I never would have lived it down. I walked to the bank, which was close enough to be comfortable but farther than I thought. A walk is a good way to start the morning. There was a “breakfast” with various fruits and light food available, and though I was hungry for something a little more substantial it held me. I found Scott and Iram at a good seat right in the middle of the conference room.
The first session consisteted of Bob McTeer, Rose and Milton Friedman, and Alan Greenspan who joined in over a video link. Greenspan gave a glowing introduction to Milton and it was one of the most sincere speeches I’ve ever heard him give, very conversational and comfortable. (Contrast his reports to congress.) Greenspan stayed in on the conversation that followed for a bit before signing off.
The first session on education dealt with choice in schools and vouchers. I thought it was one of the more productive sessions of the day. After that was lunch where I ended up at a table with Iram, Scott, Steven Landsburg, another fine gentleman from Rochester whose name escapes me, and Tyler Cowen. Our conversations sort of fragmented till I heard the word “blog” from across the table and tried to get their attention for a minute asking if any of them had one. Finally I ended up calling out one of their names and I discovered Tyler blogs at Marginal Revolution, whose name I love, and at The Volokh Conspiracy (less frequently). The conversation that followed was very interesting and ranged from how blogs are changing the way people interact with writing to controlling spam, two topics I find myself coming back to again and again.
The second session is one I’m going to have to think about a lot more. The presenters from PERC (I have no idea what that acronym stands for) basically argued for free market enviromentalism, or that the best way to solve economic problems is by exposing the elements to the open market and letting those forces work things out. The idea was pushed several times that the ideas of socialism and command economies took the better part of a century to defeat, and millions died as a result of that debate not being resolved to the extent that it was clear what choice was the best way to run a country. It follows that the socialist ideas being pushed by many enviromentalists could have a similar effect today. They seemed very serious about what they spoke of, and I respect that. It’s easy to forget that these economic decisions have profound effects on the world.
The third session was, to me, mostly not terribly interesting so I won’t write about it here. After it was done though I did a picture with Milton Friedman.
In the fourth session the topics didn’t seem to mesh like they had in previous sessions but they were all interesting. It got started off with Tyler who I had met earlier (picture) who discussed economics and art, which I’ll write more about later, followed by a paper comparing Capitalism and Freedom and Free to Choose and finally a presentation by Gregory Chow that quite frankly I’m still not sure what to think of but I’ll talk more about all that tomorrow.
After it was all said and done I enjoyed it all but part of me wished there had been more debate or confrontation on the ideas that had been presented. I was reminded of Joi’s complaints of traditional conferences and how the paper presentation model isn’t really that great for taking advantage of the great minds gathered in one spot for this occasion. Dinner, however, proved interesting.
I sat with Scott at the table with Tyler Cowen, Pete Boettke, Greg Chow, and one or two others I couldn’t name. Just a few feet away at the next table were Rose and Milton Friedman sitting with Bob McTeer, Harvery Rosenblum, Ben Benanke, and another Nobel prize winner Gary Becker. At the end of his speech Becker posed a question to Milton Friedman concerning competitive supplies of currency, to which Friedman responded he had no good answer at the moment. However at some point Gregory Chow jumped in (and got a microphone) and it turned into a minature debate between the three which I found quite enjoyable. It went for a bit and it was obvious that some people were getting quite annoyed, though whether it was with Chow himself or Chow’s views (China isn’t as bad as it seems, state run enterprises can work if there’s competition) I don’t quite know. Personally I could have watched them go all night, as it was extremely entertaining and informative, but President McTeer cut things off and the night finished up. Please excuse any typos, I’ll edit this entry and post more about the indvidual sessions tomorrow.
Auto-imported from old gallery:
My goodness Scott Roman keeps his house as cold as I used to keep the classroom. I woke up this morning to the thought that “Gee, it’s cold,” and just dealt with it for a while, however eventually the air constantly blowing became too much and I got up to look at the thermostat to see where it was. It was set at 60, which I’ve seen before but what surprised me was that the temperature actually was 60 degrees. Insane. It’s woken me up though.
I knew I kept the economics category around for a good reason. Tonight through Friday I’m going to be in Dallas because I was invited to the “Legacy of Milton and Rose Friedman’s Free to Choose” conference here at the Dallas Federal Reserve Bank. Internet access during the conference is probably not going to happen, as it’s unlikely I’ll be able catch anything wireless or just plug into the wall somewhere, so I can’t promise live-blogging of the sessions, but I can pick up a few access points here where I’m staying so I’ll try to catch up every night. I’m very excited about the oppurtunity to meet Milton Friedman, who was very influential in my early studies. His influence is undeniable, and I’m honored to be here.
The drive was long but in good company with my old friend Iram in the passenger seat. We discussed a lot of current issues, Plato’s Republic which she is also studying, and how our economic viewpoints have changed in the two years since we won the Houston and district-level Fed Challenge competition. I dropped her and her mother at their relative’s house, and made my way back by the Bank where Scott Roman, my former teacher/coach and now head of education for the Dallas Fed, lives and also where I’m crashing. It was a little tricky getting here, but now that I am the exhastion from the drive is starting to catch up with me and I think it’s time for some sleep. Breakfast at 9 tomorrow. Planning to take lots of pictures.
Auto-imported from old gallery:
It’s back and better than ever. Two really great articles, one of which by Joe Clark mentions yours truly, and a new script grace the re-launch. A List Apart has taught be more than any other resource in developing for the web, and I wholeheartedly recommend it whenever possible. Many congratulations to the team that makes it happen.
Has it really been over a year? I can’t believe it.
An unassuming little script, called “autop” and titled New Lines to Paragraphs was one of my earliest attempts at massaging plain text into smart XHTML, and it has come a very long way since it first started. (See the legacy code.) The code is not perfect, and it may never be, but it has worked very well for an impressive number of people, and I value that.
Auto-imported from old gallery:
So your Author would be a terrible blogger if he didn’t point out that iTunes is now available for Windows. It was immediately installed, requiring a reboot (the box had not been rebooted for 32 days), and preceded to crash consistently on a seemingly random set of files. It works swimmingly with about 95% of the files, but certain albums, when played or imported, crash iTunes every single time. Winamp, Windows Media Player, and every other media player installed works fine with said files. That said, one is very impressed with many of the features and how consistent it seems with the Mac version. Except the feature where it moves files out of their meticulously chosen folder hierarchy and renames them, losing track information in the process. Every feature but that one. Yes, it is an option, however the option does not communicate the weight it carries.
Ironically, today is also the day one decided to never by a Mac because one’s PCs were significantly cheaper and of comprable quality, the Windows OS is sufficently stable, and because of the beautiful things Michael Heilemann was able to do with Windows. (Not to mention the wonderful things he does with WordPress.) Something similar will be attempted here as soon as time permits. One program, Windows FX, was bought months ago as a result of its attractive functionality.
I just saw this quote and thought it was worth including:
“We’re going to fight illegal downloading by competing with it,” said Jobs. “We’re not going to sue it. We’re not going to ignore it. We’re going to compete with it.”
—Steve Jobs. No wonder people love this guy. Hat tip: Wired.
Something similar, but much worse happened to Adam.
Carrie Bickner, whom I had the pleasure of meeting at SxSW and have done my best to keep in touch with since, has a new book out, Web Design on a Shoestring. She has told me before that I’m not really the target audience for such a book, but it is certainly something I would like to read, review, and recommend. It seems every day I talk to another client who was paying 4-5 times what they should for hosting and spent a fortune on a site whose non-standard code made it obsolescent the day it was delivered. The days of monolithic development by giant agencies with even bigger budgets are over. Carrie’s book is indicative of the new era coming. I’ve ordered my copy.
Out of curiousity I ran some stats on the different RSS versions I offer here. The results were pretty much what I expected:
Also as an update to a previous look, I don’t know what it was about Mozilla that month (August). Here’s what is happening currently:
- 38% — Internet Explorer
- 36% — Netscape/Mozilla
- 6% — Googlebot
- 3% — Safari
That’s pretty much on par for the course. One interesting note is that IE6 users seem to spend the most time on the site, for whatever that’s worth. As before, let me know how these things stack up in your neck of the woods.
What follows is what I consider to be best practice for my personal sites and a guide for those who wish to do the same. Months ago I dropped the
www. prefix from my domain in part because I think it’s redundant and also because I wanted to experiment with how Google treated valid HTTP redirect codes. The experiment has been a great success. Google seems to fully respect 301 Permanent Redirects and the change has taken my previously split PageRank has been combined and now I am at 7. There are other factors that have contributed to this, of course, and people still continue to link to my site and posts with a
www. (or worse) in front of it, but overall it just feels so much cleaner to have one URI for one resource, all the time. I’m sure that’s the wrong way to say that, but the feeling is there nonetheless.
Now for the meat. What’s a good way to do this? Let’s look at our goals:
- No links should break.
- Visitors should be redirected using a permanent redirect, HTTP code 301, meaning that the address bar should update and intelligent user agents may change a stored URI
- It should be transparent to the user.
- It should also work for mistyped “sub domains” such as
wwww.(I still get hits from Carrie’s bad link)
So we need a little magic in DNS and in our web server. In my case these are Bind and Apache. I am writing about this because at some point the code I put in to catch any subdomain stopped working and while I reimplemented it I decided to write about what I was doing. This method also works with virtual hosts on shared IPs where my previous method did not.
In Bind you need to set up a wildcard entry to catch anything that a misguided user or bad typist might enter in front of your domain name. Just like when searching or using regular expressions you use an asterisk (or splat) to match any number of any characters the same thing applies in Bind. So at the end of my zone DB file (
/var/named/photomatt.net.db) I added the following line:
*.photomatt.net. 14400 IN A 188.8.131.52
Note the period after my domain. The IP is my shared IP address. That’s all you need, now restart bind. (For me
Now you need to set up Apache to respond to requests on any hostname under photomatt.net. Before I just used the convinence of having a dedicated IP for this site and having the redirect VirtualHost entry occur first in my
httpd.conf file. That works, but I have a better solution now. So we want to tell Apache to respond to any request on any subdomain (that does not already have an existing subdomain entry) and redirect it to photomatt.net. Here’s what I have:
CustomLog domlogs/photomatt.net combined
RedirectMatch 301 (.*) http://photomatt.net$1
The two magic lines are the
ServerAlias directive which is self explanitory and the
RedirectMatch line which redirects all requests to photomatt.net in a permanent manner.
There is a catch though. The redirecting
VirtualHost entry must come after any valid subdomain
VirtualHost entries you may have, for example I have one for
cvs.photomatt.net and I had to move that entry up in the
httpd.conf because Apache just moves down that file and uses the first one it comes to that matches, so the wildcard should be last.
That is it, I’m open to comments and suggestions for improvement.
Trying to be as true as to I would actually use a program like this, I didn’t read any of the documentation. Plus there’s a readme file, but it has no extension so opening it means no less than three or four dialogs in Windows XP. A
.txt extension wouldn’t hurt anybody. It gave me a message that the storage directory wasn’t set up properly, which told me that I probably need to edit a configuration file of some sort. So I fire up SSH. A
ls -lah (which I have aliased as
ll) shows a
config.php, which I guess is what I’m looking for.
I fire up the one true editor. There seems to be a little more at the top than necessary and it doesn’t say much, but that’s a personal peeve. The varible names seem logical (some camelCase going on) but the descriptions above each is not always helpful. Mostly it’s just
$photosName. I’ve never used the program before, and the description “The name of your Photos section.” makes sense to me as an English sentence but I don’t quite grok its significance.
Next up is the path information, which could possibly be streamlined. First we have
$dirRoot where PhotoStack seems to want the absolute path to the script. It recommends “$_SERVER[‘DOCUMENT_ROOT’].’/photos’ may work for you.” but even though that makes perfect sense I’ve dealt a lot with this in WordPress. More people have messed up
DOCUMENT_ROOTs than you could ever imagine, there are a few other solutions that may be better. One I’ve had good success with is
dirname(__FILE__). which works like a charm for finding the absolute path of the current directory. realpath() may also be helpful, but we use the first trick in WordPress. The next variable is the URI of where PhotoStack is located, with the instruction “no trailing slash.” This is another pet peeve, but an instruction like this should be avoided at all costs. No trailing slash there, should I have a trailing slash on
$dirRoot? It didn’t say anything. It causes confusion. It’s programatically trivial to detect and remove a trailing slash on this variable, so why even bother the user? Don’t make me think.
There are a lot more configuration options, a lot. It suggests replacing “no” with “yes” or vice versa to change the value. While this is probably more intuitive than boolean values of true or false, I think spelling out “yes” or “no” several times is a little patronizing. I know, impossible to please.
Okay so I’m done with the configuration file, I reload the URI. Still doesn’t work! I’m guessing it’s time to go to the readme, probably the storage directory needs to have permissions set or something. There is no wrapping in the file, which means each paragraph stretches really far and to read it I’ll have to scroll horizontally in my editor. Wrapping at 72 characters would probably not be a bad idea. Fortunately I know a shortcut (ctrl + j) to fix this but that’s just luck. I find out the software is licensed under the Creative Commons Attribution-NoDerivs-NonCommercial license, which I suppose means I can never use this for a paying client and if I want to improve on the code and release the changes without explicit permission from Noel. If Noel fell off a cliff I suppose the code would be locked under the license and development would halt? I don’t know exactly, but that’s what goes through my mind. Generally I’m much more comfortable with more liberal licenses, be it MIT or GPL or Artistic or anything Free. Next it says:
Templates in PhotoStack are not licensed as part of PhotoStack. Therefore, they are not subject to the licensing terms of PhotoStack. I’m placing this decision in the realm of Mr. Allen… If anyone can lend some clarification that would be great.
That doesn’t inspire the greatest confidence, but I’m planning to modify the templates anyway so maybe I should worry. Finally at the end it tells me to
chmod 777 the storage directory. Ah, what I needed to know. I have heard some peopl ecomplain about the liberal chmod requirement before, but it’s really only necessary because of the way most web servers are set up to execute PHP, which I suppose could change in the future. It’s no problem to me. I secure things at a much lower level.
I’m already at the command line so it’s a simple matter to modify the directory. No errors but the pictures don’t load. Whoops, I missed setting
$webDir variable, probably because I was planning to talk about it but went off on a tangent. The default value of this is “http://yoursite.com/photos”, and this is splitting hairs but there are several domains expressly for this purpose and an RFC to back them up. It’s a good practice because since
yoursite.com isn’t reserved, it could theorectically be taken by some unsavory character that used its ubiquity in examples in some malicious fashion. You never know.
It loads! However I click on the sample album and there’s something funky going on with the layout. Perhaps it has something to do with the size I set my thumbnails at (150×150, though I would like to just be able to say something like 150 px on its longest side and allow it to keep its proportion, or just 150 px wide all the time. I’m not crazy about every thumbnail being square). What ever it is it will have to wait until tomorrow because it is past my bedtime. Hopefully tomorrow I can start loading this thing up with photos.
“Matthew! How could you possibly be so nitpicky with this poor guy’s project? How would you like that if someone did that to your project?” Actually, I would be thankful and flattered. If I didn’t like Noel and think PhotoStack could be great I wouldn’t be spending time documenting my thoughts on it. Constructive feedback is golden to an open-minded developer.
I’m going to participating in Fray Day 7 here in Houston tonight at 8 PM. I’m a “featured speaker” tonight and I’m going to be telling a story I call “The Little Red Button That Changed My Life.” Several friends have already expressed an interest in coming and I’m looking forward to seeing everyone. It should be a lot of fun for everyone involved. I know Robert Nagle has worked very hard in putting all this together, my Dad told me he heard the event mentioned on the radio Friday morning.
To be honest though I’m scared to death.
Where? The Nexus Cafe (Walden Internet Village) is located on 2828 Rogerdale, 2nd floor (between Richmond and Westheimer).