December 26, 2006

Wiiview

As I mentioned a few weeks ago, I got a Nintendo Wii. If I haven't been posting lately, it's because I've been playing it so much. Besides the included game, Wii Sports, I also purchased Legend of Zelda: Twilight Princess. And yesterday, I got Super Mario Bros for the Wii's Virtual Console.

The good is that the system is fairly brilliant. Using the "wiimote" to control things is very intuitive. I love how the wiimote twitches as you pass over the border to a button, as it you are really feeling a raised button. I like how it feels natural for so many games, whether swinging it in tennis, or using it to bowl. It has just the right heft and feel. The concept of Miis, generating little characters that look however you want them to is fairly brilliant. I'm unsure how they can be worked into that many games, but it is fun and social, especially when you can send your Miis to your friends.

The bad is that the UI can be inconsistent. How do you return to the Wii's main menu? The button, if it exists, seems to be in a different place at each time. Another problem is that sharing your Miis requires at least four or five steps. You have to send a 12 digit number to your friend, they have to send a 12 digit number back, you have to enable sharing of your miis, and then enable wii sharing again in another menu. Oh, and you have to enable WiiConnect24. The sharing of numbers is OK, obviously a guard against friend spam and undesirable intrusions. But once you have established the two way friendship, your Miis should be able to wander back and forth between consoles. I imagine it like the paintings in Harry Potter. I just feel it would be so cool is some of my Miis would just wander off the screen and really be somewhere else for a while, then wander back, etc. All this is possible. The Wii is updatable, so anything can change.

The Legend of Zelda: Twlilight Princes is a very good game. The graphics are excellent, the play is innovative, but what is really great is the graphic design. The new monsters look like they are out of Tron, it is a wonderful new look. What I'd like to have seen is more variety in gameplay, though. Playing the game is a sequence of going to a dungeon, finding the boss key, fighting and beating the boss, then going to some new area and then that dungeon, etc. One notable exception is the Snowpeak area, which is different and memorable. The dungeon doesn't seem like a dungeon, it seems like a castle, which is what it is. And it doesn't seem like some strange quest to merely get keys and get to some boss, it has more of a story in it. And to get to the castle you have to snowboard on your shield, which is very fun. If the whole game was like this, I think it would be consirably better. Not that there aren't many cool little parts to the game. There are. In fact, probably the best part for me was the spaghetti-western inspired assault on a little town with just a bow and arrow. Even the music is very Morricone-inspired at that part. Very cool.

Posted by ahyatt at 11:58 AM | Comments (0)

June 15, 2006

Andy Hertzfeld tells stories

I had the great fortune to see Andy Hertzfeld talk at Google a few months ago. He has created the wonderful folklore.org site, which contains a large number of Macintosh stories. He also wrote the book Revolution in the Valley, which is a book containing a lot of the same content as the site. Hertzfeld talked about the book, and his experiences at Apple. His video is now on Google Video, and I highly recommend it. For some reason the video looks very washed out, but even so, watch the whole thing, it is well worth it.

Posted by ahyatt at 07:19 AM | Comments (0)

May 13, 2006

New anti-spam measures

I've been having a real problem with spam for this blog recently. Not only do I have to delete comments almost every other day, but I've accidentally deleted some legitimate comments.

I was previously protecting my site with something that ensured they couldn't simply post a comment to my cgi comment script. Now, I believe the technique that is being used is to read the comment page and do a post from there. This more closely matches what a real person would do.

As a quick hack, I put in a quick captcha so that I can filter the spammers out. Please let me know if this is causing any problems. The problem you are most likely to experience is an "improper access error". Report such things to me via email, please. If you don't know my email, just mail to webmaster of this domain, and it will get to me.

Posted by ahyatt at 10:35 PM | Comments (0)

February 19, 2006

Orkut & FoodCandy

I joined Orkut the other day. Well, actually, you can't just join, you have to get invited. So I asked around my office and a friendly co-worker invited me. I spent some time online, and it is interesting all the communities you can join, and how you can find people, and make information available to friends, or friends of friends, etc. And the people there are interesting, a huge number of Brazilians, many Indians, and people from everyone. There's even around 20 people from my high school, Parkway North! However, the communities I have found are relatively quiet, at least the somewhat fringe ones I have joined.

Anyway, I only have one friend so far, my co-worker. So, if anyone is interested in joining Orkut, and knows me, go ahead and email me. Come, join, and... well... do whatever it is people do there!

Also, my friend dB has started a food-oriented social networking site, FoodCandy. Email me as well if you want to join. It just started, but I think it has good potential, so join up already! And make thousands of friends!

Posted by ahyatt at 05:15 PM | Comments (1)

January 02, 2006

Ruby on Rails

I have a particular personal project, which I've told just a few people about. It is very experimental, and basically has to do with creating a new type of online discussion, that fixes a number of problems I've noticed with discussion boards, usenet, and blog discussions.

I've decided to do this in Ruby on Rails, which is a web application framework that has become very popular lately. This is actually my second attempt at this. My first was fairly successful technically, but proved that some of my ideas about my project were invalid. I believe I've fixed the conceptual problems, so I'm redoing the project.

Ruby on Rails is so well liked because it makes everything simple. Whereas in previous web frameworks, only 10% of your effort went to critical code, the rest going to supporting code. With Ruby on Rails, there is pretty much only critical code. However, I find that still only 10% of my effort if going to writing critical code, with the rest of my time going to understanding the framework, due to strange problems I have.

I believe I have some fundamental misunderstandings about how Ruby on Rails does things. For instance, I was surprised to learn that you can have multiple different objects that represent the same thing! The following code returns false.


a = Foo.find(id)
b = Foo.find(id)
a.equal? b

In this example, we load two objects by the same id, and compare to see if they are the same object. They are not.

This amazes me. If you are in a transaction, and change the state of an object, the same object referred to through some other path will not reflect that change. This could cause endless confusion, but I suppose there is some way you have to program so that this problem would never reveal itself.

A similar problem is one where a change to one object causes a change to another object. So if every call to an instance method of a database object (model instance, in Rails parlance), Foo.doSomething causes some data in a linked object of type Bar to change, then how do I write the code so that this happens? If I change the instance of Bar on Foo.doSomething, then I have to keep that instance as an instance variable on Foo, until I save. Alternatively, I could override the save method, and make the change there, if necessary. However, in either case I have to override save so that the depended instance of Bar is saved as well. This doesn't work, throwing an error about the number of arguments to save.

Also, why do I have to save? And why do I have to specify transactions manually? Why can't everything in one web request be a single transaction, and all modified objects automatically saved?

I guess I really haven't "gotten" Rails yet. Although perhaps there is nothing to get, and it really is only suitable for the most simplistic applications.

Posted by ahyatt at 05:06 PM | Comments (0)

December 22, 2005

iMac G5

Since my old iMac was dying, I decided to get a new iMac G5. The price was not too shabby, the screen was great, and the latest generation of iMac G5's were more reliable than the previous batches.

I received the computer a few days ago. As I anticipated, it is quite fast, and it has lots of screen real-estate. There's been a few pleasant surprises. First, great programs such as Quicksilver, which seemed too draining on resources before, now work quickly and without causing any delays anywhere else. Apple's Dashboard functionality, which always seemed too slow, and too useless, now is fast, and while it has no new functionality, I now realize that previously it just wasn't useful enough to compensate for the pain I was suffering. But since the pain went away, now I find myself using it occasionally, usually to check on the weather and use the SysStat widget.

Also, I got iLife for free, so I was pleased to find that the latest iPhoto now is quick enough for me to use again. Which is good, because it is a nice program for keeping everything organized. I also used GarageBand, which is fun. I amused my children by playing "Twinkle, Twinkle Little Star" on a big electric guitar. Right now, that seems to be the extent of my musical talent.

Posted by ahyatt at 06:55 PM | Comments (0)

December 09, 2005

Time for a new Mac

My four year old G4 iMac is dying. It crashes all the time with graphic card errors. My hard drive is also slowly dying, and has numerous unrecoverable errors. And of course the constant rebooting is probably turning my hard drive filesystem to swiss cheese.

I took my iMac in to Tekserve, a well-known Mac shop by my gym. They estimated it would cost around $550 to repair everything. For a 4-year-old iMac, that's a bit much. So I lugged my iMac back home and considered my next move. First of all, though, I noticed they had changed my desktop settings, so I was now using thousands of colors, instead of millions. This seems to be have been a smart move, and the crashes have been much less frequent after they did this.

At any rate, I still want to replace my iMac. The question is, to what? One possibility is a laptop. However, I don't really have a laptop lifestyle. So the other possibilities are a G5 iMac, and a Power Mac. I'm a little reluctant to get a G5 iMac, since reportedly it runs quite hot, and component and disk drive failures are common. Even the second-generation iMacs, which fixed many of the reliability problems of the first generation, still seems to have some problems. On the other hand, the PowerMacs are really for power users, which I am not, although I do occasionally do some video editing.

The price is really bothering me, though. I can get a pretty nice iMac for less than $2000. A comparatively nice PowerMac runs around $2500 without a monitor, although that does have the extra processor. I don't need the expandability of the PowerMac, but I'm afraid of reliability problems in the iMac. What should I do?

Posted by ahyatt at 07:05 PM | Comments (1)

October 22, 2005

How to fix Wikipedia


Wikipedia has problems. Big problems, even acknowledged by it's founder, Jimmy Wales. The problem is that Wikipedia styles itself as an encylopedia, but it's articles are of questionable accuracy, and are often badly put together.


The strength of Wikipedia is that anyone can add content. This is a nice way to get a lot of different content, with a lot of different perspectives. However, it is not a nice way to get a coherent and valuable article.


Wikipedia needs to have, first of all, a reputation system. Wikipedia makes no effort to distinguish between valuable contributers, and contributers who do nothing really worthwhile. Sure, vandals might be banned, but everyone else is equal. Also, reputation has to mirror real-life reputation. If you are writing an article about the Marvel Comics, the input of Stan Lee is just more valuable then the input of your average Wikipedia user. But note that in this case the reputation is constrained to a particular topic. I trust Stan Lee to help create an article about Marvel Comics, but not to help create an article about differential equations. Similarly, some posters might create value in a particular topic, but have a negative effect in another topic.


So, the first element in my proposal is a reputation system where each user has a reputation in a particular topic area.


With this reputation system, you could have three levels of content for each article. The first is the content as it exists today, which is the level-playing field free-for-all. I call this content level the "low level content". Users of high enough reputation (which should be just a handful of users) get a brand new article in which they can build up, using new content, or content from the lower level of content. This content level is the "medium level content". Finally, what should be just two or three users with the highest reputation should edit a "high level content", drawing from the lower two levels.


Each level provides ready-made text which to edit to the level above, and since each successive level is contributed by fewer people, the editing should be tighter, and the site more stable.


Notice how this solution is different than the solution proposed by Wales, which is "branching" content that has reached a level of acceptability to a sort of "release branch Wikipedia". That solution results in a static release branch, which is not very internet-appopriate because it is static. Also, it assumes that content can get to a releasable quality with the current system. That is almost certainly a false assumption. My system lets Wikipedia be Wikipedia, but also provides for additional layers of quality that are less and less Wikipedia-like, and have more and more quality. All the levels can feed off each other, and I think the entire process has something for everyone.


The question I have not answered is how to do a reputation system, especially a reputation system that is context-sensitive. It's a difficult question, but I'll try and write another article about it soon. I have to figure it out first, though.

Posted by ahyatt at 03:10 PM | Comments (1)

October 21, 2005

Emacs, productivity, and planner.el


There was an interesting article in the New York Times a few days ago called Meet the Life Hackers, which described the study of productivity. It had to do with a lot of stuff I'm interested in. It had a bit about the human factors of productivity, a bit about software engineers, and a bit about interruptions.


The bit about productivity got me thinking. There's areas where I am pretty good, and some where I am not so good. First of all, I am rarely bothered by excess interruptions as work. Much of that is the somewhat isolated nature of my job. But also, I check mail in emacs, which is where I do most of my other work as well. And I never figured out how to get emacs to tell me about new mail. So I only get new mail when I remember to check for it. Sometimes I check every few minutes. Sometimes not for several hours. But I'm never interrupted.


Emacs also came to mind when reading the article, which tells how technology writer Danny O'Brien asked the 70 most prolific people he knew about how they managed their life. One of the things he found was that:


None of them used complex technology to manage their to-do lists: no Palm Pilots, no day-planner software. Instead, they all preferred to find one extremely simple application and shove their entire lives into it. Some of O'Brien's correspondents said they opened up a single document in a word-processing program and used it as an extra brain, dumping in everything they needed to remember - addresses, to-do lists, birthdays - and then just searched through that file when they needed a piece of information.


Wow, that sounds just like how people use emacs! Except that emacs isn't a "simple application" by any means. However, I've been keeping a running list of notes in emacs for years now, and it works extremely well. For instance, I store the SQL statements I need to do a common task at work. When I need it, I just open up a buffer, do an incremental search for the relevant words, copy, and paste. It works extremely well, and I store work-related items, places to try for lunch, and anything I want to be able to recall quickly, but don't want to actually remember.


One thing that hasn't been working so well for me is keeping a "todo" list. I started by having a text file I edit in emacs, with everything I needed to be working on, along with all notes related to those items. However, this was hard to keep up-to-date, and became cluttered with items that were stalled and had voluminous notes, making the important items hard to see.


Today I installed planner.el, a way to organize todo items into projects. It's very popular, some people even learning emacs just to use it! You can see items on a todo list for the current day, or see them grouped by project. Each day, or each project can have notes and schedules attached. It's all done in a emacs wiki system, which is publishable as HTML. So far, I'm very happy with it. I think this might be the final part of my emacs productivity puzzle.

Posted by ahyatt at 02:01 PM | Comments (0)

October 15, 2005

Finder usability problems

Mac OS X's user interface for most things is usually pretty intuitive. However, the Finder is something I have some problems with.

First, there's the whole spacial-mapping thing, where folders are laid out spacially, requiring you to actually move folders around so they don't land on top of each other. I know UI gurus are big fans of this, but I just don't get why. It seems like much more work for no apparent gain except in very specialized circumstances which I have yet to encounter.

Second, and more annoying, there's the occasional thing you want to do, that seems quite reasonable, but just baffles you. Like you are in a folder, and you pick up an item and want to drag it to your parent. Is there any way to do this without dropping it and switching the Finder view to either show parents, or opening up a new Finder window?

Another Finder problem bit me recently. I was trying to copy a file from my wife's account to my account. I thought I would be all Mac-like and use the Public Drop Box, a folder for each user that exists solely so that users can drop files there. However, my wife is not an admin, and I just could not get to the parent of her home directory. Therefore, there is no apparent way to navigate to my drop box. I also couldn't find a way in Finder to just jump to a folder. Eventually I cheated and opened up a Terminal and typed "open ~ahyatt/Public/Drop\ Box", but it felt wrong. I must be missing something here. I can't believe the Public Drop Box is not accessible.

Then again, the Mac is great for sharing things between computers, with "Bonjour" and various other technologies. But sharing things among accounts on computers? It's tough as hell, man! And it makes no sense that I can share things with another computer easier than I share things within the computer.

Whoops, it looks like this little rant has ended up on a completely different topic than the one I started with. Sorry, folks!

Posted by ahyatt at 08:27 PM | Comments (3)

September 09, 2005

Farewell to Quicksilver

As I may have mentioned before, I'm a big fan of Quicksilver. It really makes using a Mac very fast, as far as tasks. However, my Mac has been very slow lately, and I was looking for things to kill. When I stopped Quicksilver from starting automatically on logon, things got much faster.

What I'm guessing is happening is that Quicksilver was taking too much memory with it's index. Spotlight does similar things, and is perhaps not as fast, but seems to have a much lighter footprint. Besides, two apps that have an index of everything seems fairly wasteful.

So, no more Quicksilver. It was a nice app, though. Very well designed. If I ever get a faster computer, with much more memory, I may consider using it again.

Posted by ahyatt at 07:28 PM | Comments (0)

July 19, 2005

Mac slowdown

After installing Tiger, my Mac has gotten really slow. It has been taking me several minutes just for me to log on. Greta recently said how her account is incredibly slow as well.

I took a look, and found she had RSS feeds automatically set up in Safari, that she never used. The "news" feed had over 1000 articles in it! I figured this may be causing Safari to eat huge amounts of memory, which would cause the slowdown. I deleted all her RSS stuff. It seemed to work, and things are zippy once again. And evidently her Safari was affecting my account, because she always is logged on with Safari running, and I use user switching to switch to my account while hers is still active.

Kind of scary. I wonder how many Mac users don't understand their Safari RSS features, and are suffering from a huge slowdown now because of it.

Posted by ahyatt at 04:46 AM | Comments (1)

May 09, 2005

Tiger installed

Well, I backed up everything worth saving on DVDs. Burning DVDs is slow, about 1.5 hours to burn and verify, and probably a good half hour just moving things to the disk image before burning. So at about 2 hours per DVD, and with 5 DVDs to burn, plus counting that I wasn't just sitting there waiting for things to finish, it took me all day to backup. But by 11pm on Saturday, I had erased my disk, and installed Tiger.

The next day, Sunday, I installed everything, and of course realized I had forgotten some critical items like my precious .emacs file! But luckily my .emacs file is so precious I use variants of it on multiple machines, so I managed to restore it.

So far, it looks great. Things are speedy, although that may be also due to cleaning out all the clutter while reformatting. Dashboard is nice, but slow to update things when you go to the dashboard pane. Spotlight is also nice so far, and has some of the same neat usability features as Quicksilver.

One other praise for Apple. I made a differently named account on my newly formatted hard drive than I had before. There were surprisingly few places where I had to edit configuration files or XML directories to make things work. Most of the places I did have to edit were in third-party programs. So good work, Apple!

Posted by ahyatt at 05:28 PM | Comments (0)

May 06, 2005

Tiger problems

I got my copy of Mac OS X 10.4 (Tiger), and attempted to install last night. Unfortunately, it does a thorough disk check, and it found an error on my disk that could not be repaired. It didn't say what it was, though. Damn you, Apple, give me an error message I can do something with! But wait, what's this? The install includes a copy of Disk Utility you can run separately, as well as Terminal? Yay, Apple, all is forgiven. I ran Disk Utility, and it didn't give me much more information, just another notice saying I had an unrepairable error on my hard drive, and an error number (-9972). I then opened the terminal and ran fsck (which is the same thing Disk Utility does, but I ran it with additional debug flags to get more info). It informed me of an error "invalid alternate VHB at 0". This sounds bad.

Many people have had the same -9972 error. Almost no one has seen "invalid alternate VHB at 0", though. Usually the -9972 means you either have to run Disk Warrior to repair your disk (which costs money), or you should back up everything, reformat and reinstall. In some cases, your hard disk is just screwed, perhaps just starting to go bad. I think I'll do the cheaper option, and back up everything to DVDs, and restore it later on. I could use to make backups anyway.

I think it's going to be a long weekend.

Posted by ahyatt at 03:33 AM | Comments (5)

February 10, 2005

ido.el

I just discovered the wonderful emacs package ido.el. It works sort of like the wonderful Mac app Quicksilver. It is used in both buffer-switching and file-finding, and offers as-you-type auto-completion. This will be in the next version of emacs, but for right now you can download it from the link above. I like it a lot, so if you use emacs, I encourage you to try it.

Posted by ahyatt at 07:50 AM | Comments (0)

January 06, 2005

Aggregator

I've been looking for a while for a good blog aggregator. There's a huge need for one. Most people read a variety of blogs, and who wants to keep checking up on them just to see if there are any new articles? It is very inefficient, both for your time, and for hits on the server.

I've experimented with some solutions, such as using the Thunderbird, NetNewsWire, or using web-based Kinja, or the new MyYahoo!, but was dissatisfied. The client-side apps work great, but since they are client-side, I can't use them from two different computers and have the same data on what is already read. Kinja is web-based, but when I tried it, it was slow to update, only getting new articles long after they had been published on their websites. MyYahoo! was prompt, but did not include summaries of articles, only their titles.

Finally, I tried Bloglines, which is web-based, and quick to update. Furthermore, it has great auto-discovery, and an easy to use interface. It still has a few problems, though. First of all, there seems to be no way to go directly to the actual page which shows the new summaries of the blogs, which seems to me the place where everyone wants to have quick access. Plus, they have a blog notifier, but it doesn't seem to work very well (at least the web-based one). But, Bloglines seems good enough, and now I'm regularly reading many more blogs than I have been before. Yay! A victory in either reducing information overload, or wasting time. Or both.

Posted by ahyatt at 04:37 PM | Comments (3)

December 02, 2004

Spam attack, or is it?

My blog (among others) has been getting a lot of repetitious posts that seem to almost be spam, but do not advertise anything or link anywhere. My guess is that it is supposed to be spamming the normal way, with links, but something went wrong. Since there are no links, the normal blacklist I have does nothing. I modified my previously mentioned pre-blacklist script to delete these things in bulk. As mentioned in the previous post, the script is here in case anyone wants it for their own uses.

Posted by ahyatt at 08:04 AM | Comments (0)

November 10, 2004

del.icio.us

I just made an account on del.icio.us, a social bookmark service that's been around for a year or so, but is still under development. I've noticed it for a while, but a Jon Udell column recently caught my eye, and convinced me to try it. Even the basic no-frills site they have now is quite useful as a bookmark repository. Bookmarking sites are easy, and since it is external, you can share between multiple computers. This is very useful to me. Not only that, but the real power behind this is the ability to look at who else shares your links, and see what else they have. You can quickly find all the interesting links of a particular topic. This is basically a much better way to get Yahoo-style categorization of internet. You can also subscribe to other people's bookmarks, or other people's categories, or a general categories bookmarks.

Feel free to check out my list of bookmarks. If the service is slow, or down... well it is like that sometimes.

Posted by ahyatt at 12:57 PM | Comments (0)

February 06, 2004

Mac freezing problem update

My system is still freezing. But evidently I'm not the only one with this problem. It makes me feel a little better. Check the link, I did notice a correlation with some Mac windowing errors (and posted it to the discussion), but what it means I'm not sure yet.

Posted by ahyatt at 07:53 PM | Comments (1)

February 03, 2004

Continuation based web servers

I recently have been experimenting with writing simple applications in continuation based web servers. Continuations are a type of variable in Scheme that stores the state of a thread. They are good match for web servers, since you can use them to write a web application framework in which you can write a web application in a similar way to a normal program. I first read about continuation-based web servers in Paul Graham's article on Building Web Applications in Lisp. Paul Graham's a good salesman. He made it sound very alluring. I had to try it.

So, over the past few months, I have written a version of my personal page in two continuation based web frameworks - Seaside and PLT Scheme.

Seaside runs in Squeak Smalltalk. This is it's whole separate world, which is both good and bad. The good is that a database isn't really needed, you just use Squeak's memory to store everything, and save or load the whole Squeak environment as needed. The bad is that you have to do everything in this environment. No emacs! And you have to use an ugly, confusing GUI that has no relationship to the platform you are running in. And how would one telnet in and edit code? Yuck. But Seaside is a very nice framework. It allows you to embed the results of actions as blocks very naturally right where the controls are. For example a simple counter with plus and minus buttons:

renderContentOn: html
    html heading: count.
    html anchorWithAction: [self increment] text: '++'.
    html space.
    html anchorWithAction: [self decrement] text: '--'.

This makes writing pages very easy. There are problems, though. First of all, the server redirects you to the page with a session parameter. This is extremely ugly. So, if go to: "http://my.site/seaside/links" I get redirected to "http://my.site/seaside/links/@pcAAIJptPXWALgmy/LNsfQyMJ". So a visiting user has to bookmark this ugly URL that encodes a continuation session that almost certainly won't exist by the time the user returns. That's not good. Someone else raised the same point in the Seaside mailing list, and the poorly-thought out answer was "just store all session permanently in memory". That solution isn't very scalable, I'm afraid. The problem is it's hard to write an app that doesn't use sessions in this framework. Stateless communication is the natural state of the web, and therefore what the web does best. Seaside is an interesting framework, very easy to program in, but it needs to be able to do stateless page serving before I could really recommend it.

I also tested out PLT Scheme. According to blogger Bill Clementson, PLT Scheme is the best open source Lisp out. It comes with a continuation based web server. The framework is not really like Seaside. You can't embed actions in the page like you could in Seaside. Instead, you have to handle the responses all at once. The above example would be written something (I haven't tested or even made sure the syntax is correct) like:

(let ([count 0])
  (unit/sig () (import servlet^)
    (let loop ((count count))
         (let ((env (request-bindings 
                     (send/suspend
                      (lambda (k-url)
                        `(html (head (title "Counter"))
                               (body ([bgcolor "white"])
                                     (h1 ,count)
                                     (form ([action ,k-url [method "post"])
                                            (input ([type "submit"] [name "submit"] [value "+"]))
                                            (input ([type "submit"] [name "submit"] [value "-"])))))))))))
           (if (equal? (extract-binding/single 'submit env) "+")
               (loop (+ count 1))
             (loop (- count 1)))))))

A lot more unweildy, to be sure. Macros can help, and I'm thinking of ways to use them in a sensible manner. However, you can don't have to use the continuation-based sessions if you don't want to. I wrote my personal page in PLT Scheme, and didn't use sessions for the user-visible part. There was no point in it, since the interactions were not complex, and I wanted everything bookmarkable. But for my administartion page, it completely uses continuations, and I think the program is better for it. The only issue is that sessions time out, so if I start an administration task, then go and eat lunch, I'll have to restart from the beginning.

For my needs, I like PLT Scheme best, and I think my needs are not different from the normal web programmer's needs. Of course, for high-volume commercial sites, I wouldn't necessarily recommend it until it is a little more hardened. There have been reports of memory leaks. I'd like to make my new PLT Scheme-based personal page available, now I just have to figure out how to do this, since I can't exactly run it on my machine I pay for hosting on.

Posted by ahyatt at 07:59 AM | Comments (4)

December 31, 2003

Fixing the freezing Mac problem

I perhaps have uncovered the reason that my Mac was freezing so much. Evidently, it is known that a service I had installed, CocoAspell is known to crash Mac OS X 10.3. I've uninstalled it. This product was supposed to provide system-wide spellchecking. Curiously enough, I still see the same spellchecking I always did, even after the uninstall. Either the uninstall was not successfull, or I've never been using cocoAspell and there has been some other system-wide spellchecker perhaps included by default. Very odd. I think today I'll go check out my coworkers Mac and see if they have this spellchecking feature as well.

Posted by ahyatt at 06:16 AM | Comments (0)

December 28, 2003

Sharing iPhoto accounts

More Mac woes. I just want to have my iPhoto library shared. Should be possible. People act as if it's possible - even the book iPhoto: the Missing Manual (which I leafed through at a bookstore once) says that it's possible. Unfortunately, I've tried it. It's just not possible in any elegant way. The good people at macosxhints.com have a hint about this, which is also incorrect in stating that it's possible to get this to work. As the comments already pointed out, it's not possible.

Besides the reasons mentioned in that hint page, iPhoto's AlbumData.xml file keeps getting it's owning group modified, which is a problem for me, since I'd like to have every file be a group containing me and my wife. Strangely enough, it gets set to the "wheel" group. This is odd, since I don't think that the iPhoto process is running as that group, and the parent directory of AlbumData.xml has the group permission I'm aiming for.

So I ended up doing what someone else had already had to resort to - just running a scheduled service to modify all the permissions to the way I like them. It's ugly. But it will hopefully work.

Posted by ahyatt at 10:51 PM | Comments (4)

December 27, 2003

Freezing Mac

My Mac has been freezing lately. It usually happens when I login and launch a few apps. It doesn't totally freeze, I can still move the mouse, which takes the form of an eternally spinning rainbow-wheel, like out some myth told by ancient Greek hippies.

Perhaps things would right themselves eventually. But after a long time of nothing happening, no disk activity, and not even the ssh server responding, I switch it off and reboot. Sometimes it comes back up correctly, sometimes I'm again greeted by the eternally spinning rainbow wheel. A further reboot seems to fix the problem.

This seems to have only happened when I upgraded to Panther, and furthermore, when I turned off journaling on the disk drive. I turned back on journaling, and hopefully it will fix the problem.

Posted by ahyatt at 09:20 PM | Comments (0)

December 04, 2003

Easy to read fonts for Linux

I use emacs a lot. Emacs is not antialiased (although I've previously discussed a patch on this). But how to get it to look nice on Linux, without using antialiased fonts? I really had no idea, even though I used emacs every day on Linux for a long time. Today I stumbled upon this Usenet thread, which talks about fonts on Linux. I learned the following things from this thread: (1) the default font rasterizer on XFree86 sucks. (2) The freetype one for truetype fonts is better, but almost all truetype fonts aren't made for the screen, and so don't have any good font hinting. (3) Basically only a few Microsoft fonts on TrueType are truly readable. I selected one of these "Monotype - Times New Roman" for my emacs default, and it is actually much more readable than before. So if you use emacs or any other non-antialiased program, use this font. Grab it off your Windows machine. It used to be a free download from Microsoft, but not anymore.

Posted by ahyatt at 03:29 PM | Comments (0)

October 29, 2003

Panther

I bought the new Mac OS X version, Panther, last weekend. It costs a lot, I think. $129. However, after a somewhat long install, I tried it out and was fairly impressed. One of the first things I noticed was something I haven't read on any of the reviews: the new DVD player is much better. It's much faster then the previous one. The previous one slowed down my machine, and the menus were very slow to move around in. This one is very responsive, doesn't slow down my computer as much, and has the ability to start a DVD watching session from the same place you left off the last time you played the DVD. Very nice!

Other than that, the whole OS does seem faster. I like the new finder. The new Mail seems good, but I haven't had too much change to use it yet. Emacs crashed, but after a rebuild of the sources, it worked fine again. The screensaver is improved, I actually can use my iPhoto album with it, which only sort of worked before. Now it works fine, although there is a big lag before it actually starts up. Expose is nice, but I don't use it too much yet.

Posted by ahyatt at 10:15 PM | Comments (0)

October 14, 2003

Comment spam

I recently got a load of comment spam today. There is no way to deal with this right now by default in the Movable Type system. You have to go through and manually delete them all, as well as do something to make sure it doesn't happen again. IP banning is pretty useless. So there really is no clear way to solve the problem. But I read up on Movable Type's API, and wrote a script to solve the problem.

If anyone want to use it, be sure and change the directories around. This script can be easily modified to erase all comments with a particular word in it. However, I think deleting by IP is good enough for now.

As far as ways to ensure they are not posted, it's something I'm thinking about. However, it's hard enough for email, in a similar way there's no way to stop everything except to have a whitelist, which sort of defeats the purpose of having a blog.

Posted by ahyatt at 09:41 PM | Comments (0)

September 11, 2003

Screen

I've been using Unix-type systems for a while now, but I'm still learning things I should have known a long time ago. One I just came across now was the screen program, which transforms one terminal into many, and will disengage the new terminal that screen provides from the tty, so that you could reattach to terminal sessions even when your window closes.

This is very useful for me, since I'm always using emacs on the terminal, as well as the non-terminal Mac emacs app. On the non-terminal emacs app, the meta key maps to the apple key. On the terminal, the apple key has other meanings. So when I want to cut text, if I forget and use the apple key on the terminal, and I type Apple-w, it closes the window. After a fair bit of cussing, I have to resume everything I was doing in a new terminal. Now, if I use the screen program, I can resume it as if nothing ever happened.

At least I think so. If not, there will be much more cussing, I promise.

One problem, however, is that some apps think the terminal is now non-functional, while others add color where they hadn't before. Nothing important is blocked yet, so I'm still happy with this find.

Posted by ahyatt at 09:18 PM | Comments (0)

August 20, 2003

Antialiased emacs

Last month a patch was sent into the emacs devel mailing list. It enables antialiasing on X windows for emacs, something I've wanted for a very long time. There are plenty of display bugs (perhaps related to proportional fonts), and display is slower than normal. If you want to build this font, I had to hand-patch it in, and also uncomment the BLOCK_INPUT and UNBLOCK_INPUT lines (as suggested in a followup message).

Screenshots are here (not by me).

Posted by ahyatt at 12:43 PM | Comments (0)

August 06, 2003

Gosling takes on Paul Graham-type bullshit

In an article on James Gosling's blog, he takes on the meme that Java was developed for mediocre programmers. I find this a particularly insulting meme popularized, or at least spread, by Paul Graham who is fond of spouting off on topics without any real knowledge of the subject (he does admit this, to his credit). I like Graham because of his brilliant book On Lisp, but his rants are ill-informed and contradictory, and his meme that Java was designed by committee to be a dumbed-down programming language shows a huge lack of undersanding, or the lack of effort in trying to understand.

Posted by ahyatt at 05:31 PM | Comments (0)

August 02, 2003

iPod

For my 30th birthday, my parents quite generously gave me an iPod. It was a great gift. I've previously had a mp3 player, Creative Lab's Nomad, but they screwed me by never coming out with drivers for it besides the Windows 98 drivers. If they are under the impression that I will stay with Windows 98 for the rest of my life just because of their mp3 player, they have another thing coming. I've never bothered to contact them to ask them if they did have that impression, but I'm sure they do, and now they know they have another thing coming.

The iPod is great: very thin, easy controls, and good sound. The only problem I have with it is if I place the iPod in the dock, and I'm not logged in, it will sit there and display "don't remove the iPod from the dock" until I log in, which is kind of annoying. But now I just don't put it in the dock until I log in, so problem solved.

I've uploaded all my music to iTunes. Not all, actually, just the ones I thought were worth it, which was about half of all songs. I even bought a song from the ITunes store, Fishbone's Skankin' to the Beat. It was great. But almost nothing else I like is on the store. No Dead Milkmen, no Mojo Nixon, no Foetus, no Laibach, no chutney music at all (they problem took one look at the cheapo Chutney albums with titles like "Yes Boss!!! Chutney time" and threw them straight in the trash). So they need to keep expanding the selection.

Anyway, now I'm one of those people you see with headphones on all the time. I'd feel stupid-looking if it wasn't for the great trail blazed by countless stupid-looking yuppies that use those handless cell phone accessories.

Posted by ahyatt at 08:26 AM | Comments (0)

July 17, 2003

Raskin on IDEs

Jef Raskin has an interesting new article about the usability of IDEs. I think he has some excellent points. This is something I am concerned with, and I have no patience for IDEs that are painful to use.

I use emacs. I think emacs solves most of the problems he complains about. It's not at all mouse dependent - quite the opposite really. He mentions the difficulty of wrapping comments. With emacs, just press Ctrl-J when typing to go to a new line - if your current line is commented, your new line will be too. Or type out a long comment and press Meta-Q. Very, very easy. And navigation is a snap, as well.

I've been thinking of these issues recently, since I have been trying out eclipse, a good open source IDE for Java. I felt a little bit guilty about trying it, since I use and contribute to the JDEE project, which is the Java Development Environment for Emacs. However, I think I've learned a bit about what makes each one good.

Eclipse is good because first of all, I strongly prefer antialiased text, and emacs on X11 doesn't have it, and will likely never have it. Eclipse is written in Java, which on Linux uses antialiasing in it's GUI text (at least on my computer it is). Second, it can do great refactoring, making some difficult tasks easy. Third, it can instantly show you your mistakes, and it can usually correct them automatically. I find using eclipse is great if you are doing heavy modifications to the code. Also, the debugger is wonderful.

On the downside, eclipse is slow. It has to do a lot of stuff. Every change you make, every typing you do will cause a little mini-compile to happen so it knows if the code is in a broken state, and where any errors are. Emacs doesn't do it, so typing is fast. And because emacs is a great all-around editor, there's no way any tool like Eclipse can compete with the editing capabilities of emacs (not to mention the flexibility). Plus, and this is a big problem, navigating to different classes in Eclipse is painful. I don't know how to do it without using the mouse. In emacs I have several choices - I can open the file as normal (via the keyboard, which due to tab-completion of paths is very quick), or I can use tag navigation to quickly jump to a class. This is really crucial; jumping around to different files is something that we all do many times a day, every day.

The integration of so many tools into emacs is also a big win for it. I can quickly jump from a Java file to just about any other kind of file, and the right thing happens. I use emacs to read mail, so I can cut and paste code snippets without leaving my app. In X11 this is great, since cut and paste is generally unreliable.

So for the time being, I'm sticking with emacs. Perhaps for heavy code modifications, I might go back to Eclipse, but that's not something that happens every day. I may use Eclipse for debugging though. The JDEE debugger still needs some work. Hopefully I can make some contributions to that area in the near future.

Posted by ahyatt at 12:22 AM | Comments (0)

July 09, 2003

Guido comes to San Mateo

Guido von Rossum of Python fame is coming to San Mateo! I'm not sure if he'll be living here, but according to his announcement he'll be working at a company called Elemental located here. I dream that one day, I'll take him out to lunch...

Posted by ahyatt at 04:37 PM | Comments (0)

June 28, 2003

Kung-Log

I have recently been trying out Kung Log, a Mac OS X client-side blogging app. It solves huge problem for those of us that upload pictures (as I do to my family blog).

The problem with the web is that you can't upload multiple files at the same time. Well, it's not a problem with the "web", according to the RFC 1867, you should be able to upload files with a multipart/mixed mimetype. But evidently only Opera supports this, and because of that, most web server apps are not designed to handle multiple file upload.

So if I want to upload 8 pictures to my blog, I basically had one way to do it. I had to go to the Moveable Type UI for creating blog entries, and upload them one by one, specifying the size, directory, thumbnail, and link type parameters each time. It was an exhausting process.

Only a client-side app can solve this problem. That app can upload pictures and media through the newMediaObject xml-rpc call. Knowing this, I set out in search of a Mac OS X app that can do this. I found only Kung-Log. Trying it out, I can see it does everything I need it to do. But it's not open-source (it's donationware), and the UI is horrible - very confusing and un-Maclike in places. I'm using it currently, but I'm also experiment to see if I can make an open-source version with a reasonable UI. I don't know much about Cocoa and developing for the Mac, so it's slow going right now. Probably my project won't go anywhere. It's fun for the time being, though. If I can get it to do basic functionality, I'll put it on SourceForge.

Posted by ahyatt at 09:21 AM | Comments (1)

June 25, 2003

Safari: Fixed at last

I still can't claim Safari doesn't hang a lot, but I have finally fixed my font problem. This morning I found a relevant post in Safari's support forum at Apple. Based on something else I found, I found out it wasn't a Safari problem at all, but a generalized problem with my fonts. I looked through all my fonts and deleted some bogus ones I had installed. It worked like magic after that. I've informed that discussion, and hopefully this will solve a problem several people have. Yay!

Posted by ahyatt at 09:32 PM | Comments (0)

June 24, 2003

Safari: on the other hand...

Safari continues to hang on me once in a while. It's only been a day since I've gotten in, but it's hung on random pages three times now. But the news is not all bad. I noticed that my other big pet peeve about Safari is now fixed. Finally, I can cut text and it appears to be in UTF-16 format. Before, attempting to paste international text cut from Safari would instead paste a series of question marks, probably indicating that it was not using a standard encoding. I actually tried several different encodings, but none of them worked, meaning the text was some invalid encoding. But the new Safari 1.0 has this fixed. Perhaps I can live with this program after all.

Posted by ahyatt at 07:47 AM | Comments (0)

June 23, 2003

Safari is 1.0, woe is me

So Apple has, among other things, released Safari 1.0 today. I was anxious for a new version, since my previous version, Safari 1 Beta 2, had a few problems. It worked well for web pages, but for some reason, when I looked at the preferences, it would get stuck on "Appearance", and refuse to go to any other pane. I couldn't change the appearance either. And then when I went back, Safari would freeze up on my next action.

I had reported this bug to Apple, so I thought it might be fixed. When I downloaded 1.0, I immediately went to the preferences, and lo and behold, I could go to the other panes, so I could actually change the settings for different items. But, to my surprise, I still could not change the font for some reason. I really would like to, I think the default font is a bit large. But I'm out of luck, unless I find out how to do it by editing the plist file.

Also, Java support seems to have regressed. I regularly use VNC, and Beta 2 worked, but this one just hangs seemingly forever.

Speaking of hanging, Safari just did hang. It seems to still have problems. I tried to leave feedback for fellow Hyatt David Hyatt, but got the curious error while adding comments that comments are not allowed. Strange to have a link that allows you to add comments, but then not allow them.

It doesn't matter really. From a few web searches, it appears my problems are fairly unique, so expecting anyone to fix it is a bit unreasonable. It's just one of those things.

Posted by ahyatt at 09:36 PM | Comments (0)

June 17, 2003

My contribution to free software

Today a beta release containing my contribution to the free software movement was released. I made a feature I personally find very useful for the JDEE project, which is the Java Development Environment for Emacs. The feature is a call cross-referencer that will build up a database of all the method calls in your program, and allow you to find all the places that call a particular function. You can also find uncalled functions, and display a call-tree that displays several levels of who-calls-who information. This is enormously useful for figuring out the logic of a program. Of course the information is incomplete, because you cannot factor in calling functions through reflection, so the user must keep this in mind.

I started this project before my daughters were born, since I knew my free time was soon to run out. I strongly believe in free software, and I personally have benefitted from it greatly. It was time to give something back. So I whipped up this thing in about a week, and through subsequent weeks and months rewrote parts, expanded parts, and increased the functionality a bit. I wound up learning quite a bit about this sort of thing. Basically it works by parsing Java class files in emacs itself (not the typical use of emacs), and creating a call database, which is cached and loaded on a package-by-package basis. It was more complicated than I first thought, with interfaces and inheritance muddying the waters of what it or what is not a call to a particular method. But largely it's been in the JDEE's cvs code unchanged for the last few months. Now it's seen the light of day, and I get to field everyone's problems with it. I just learned that my reliance on UTF-8 conversion may have been foolish, since xemacs does not always come with MULE (the multilanguage extention).

To check it out yourself, go to the JDEE webpage (see the link above), and download the latest version (2.3.3 beta or above).

Posted by ahyatt at 10:06 PM | Comments (0)

May 22, 2003

X-windows problem fixed

I fixed my X-windows problem by rebooting Linux. Yeah, I know that's not supposed to be necessary, but in my case it seemed to be. I'm guessing it was a hardware problem at some level, so I did a full, cold, reboot.

Posted by ahyatt at 02:59 PM | Comments (0)

X-windows woes

I'm a bit miffed at Xfree86 lately. For some unknown reason, my work computer completely freezes every time I switch to a text terminal for x-windows. This is very annoying, especially since it's the kind of problem that's not easily solved. I could do it a week ago, so what changed? Perhaps it's just time for a complete computer shutdown and reboot.

A possible factor might be the desktop-switcher I have, that I use to switch between Windows and Linux. Sometimes the mouse gets completely messed up when switching back to Linux. This causes a bunch of annoyances, since the symptom of this is my mouse moving and clicking randomly, like some hyperactive two-year-old has taken control of your mouse. As you can imagine, that's a great way to screw up your desktop. The solution for this was for me to switch to text terminal (Ctrl-Alt-f1) and switch back to x-windows (Ctrl-Alt-f7). That reset the mouse nicely. Now I can't do that, so I'm really screwed.

Posted by ahyatt at 11:21 AM | Comments (0)

Will Wright on Social Networks

Will Wright gave an interesting talk recently which touched on how advanced modeling and simulation techniques drives his work. He talks for a bit on social networks, which was my area of expertise at one point. Link via Valdis Krebs on the socnet mailing list. You can see the 9-11 hijackers social network on Valdis's website.

Posted by ahyatt at 11:01 AM | Comments (0)

March 20, 2003

PR now going after blogs

Interesting entry on the Eschaton blog, where Atrios gets a letter from the Heritage Foundation who wants to send bloggers like him "useful resources". Great. Now the PR machines are trying to get their stuff on blogs, as if their exposure via the traditional media isn't enough.

Posted by ahyatt at 09:00 AM | Comments (0)

February 27, 2003

Why free archives are a great thing

I found on Plastic.com a great old article from MSNBC describing the Republicans circa 1999 anti-war arguments. It really goes to show how it's all about politics, not logic. Aren't free archives great for quickly exposing hypocricy?
Posted by ahyatt at 02:32 PM | Comments (0)

February 26, 2003

More on emacs and weblogger.el

I was able to get the vanilla, out-of-the-box versions of xml-rpc.el (version 1.6.1) and weblogger.el (version 1.2) to work on my work machine. But my home machine still has problems. I wonder what the difference is. Probably a discrepancy in the url package versions, I'm guessing.
Posted by ahyatt at 09:51 PM | Comments (0)

February 24, 2003

Switch to a different emacs interface

I found that besides blogger.el there are a few other packages to blog from emacs. I found mt.el and weblogger.el. I found that weblogger.el has a good UI, but could not upload if you had any tags. mt.el got around that problem by escapifying text, but I found the UI was not quite as easy as weblogger.el. I've modified weblogger.el to do the same escapification, and it seems to work well for right now. I'll send my modifications to the author and hopefully the next version will just work.

Posted by ahyatt at 07:03 AM | Comments (1)

February 16, 2003

Google gets into blogging

I don't get it. Google has just bought Pyra labs, the makers of Blogger and blogspot.com. I'm not sure where they are planning to go with this, and neither, I suppose, is anyone else. Possibly including Google. My best guess is that they plan to do something similar to what they did with DejaNews - turn it into a tab, make it another search type and allow people to add content.

As a phenomenon, blogs seem be getting bigger and bigger by the day. This reminds me of the whole WWW phenomenon in it's early days. Could we be seeing the start of something huge?

Posted by ahyatt at 05:37 AM | Comments (0)

January 30, 2003

Strange Mac problem

Somehow, this morning, I had lost nearly all my fonts. I forget exactly, but I either only had the fonts in /System/Library/Fonts, or the ones in /Library/Fonts. What the difference is I have no idea. A reboot fixed the problem. This blog is quickly becomming "Andy Hyatt's Strange Problems with Computers Blog". Sorry about that.

Posted by ahyatt at 05:54 PM | Comments (0)

More on mt-xmlrpc.cgi

Evidently, I was wrong.

I'm not sure what was going on, but not it appears my fix to mt-xmlrpc.cgi is meaningless. Strange, since it seemed to fix the problem at one point. However, perhaps the problem was in emacs, and it may have happened that a restart of emacs fixed the program. Probably had to do with the loading of packages out of order at the time, since blogger.el has fixes to xmlrpc.el. Loaded in the wrong order, I'd be without the fixes.

Now I'm trying to figure out how to get a title specified through xmlrpc. It seems to take the first five words as a title. I'm not sure if there's a way around this.

Another thing I want to get fixed is that my newlines are interpreted somewhere along the line as <br>'s. So I have to type every paragraph in blogger.el as one looong line. Perhaps I could put some code in blogger.el that will automatically take out all line breaks except for two line breaks in a row. I'll post the code as soon as I have it.

Posted by ahyatt at 05:52 PM | Comments (0)