Chris Moyer https://coredumped.org/blog Chris Moyer's Blog SQS Growl Link

So, in retrospect this seems very obvious, but there are two applications which have never really been linked. Yes, you guessed it, Amazon's SQS, and Mac OSX's wonderful little program called Growl.

SQS is Amazon's wonderful system to Queue up messages and allow access from anywhere, based on access levels and credentials. In a practical example, this could be used to send alerts to users about downed services, or just little comments about what's going on.

Growl is a great OSX program that allows other programs to send notifications to the user based on their own preferences. It allows you to even specify differences based on what "type" of message each program is sending.

Why before no one has ever thought to bring these together, I have no idea. I've done it in a simple python app which took me a total of about an hour (mostly trying to get the python bindings from growl). Thu Apr 10 16:09:00 -0400 2008 https://coredumped.org/blog/show/20 Simple Web Framework

Although Django and Rails are both great frameworks for developing a GUI over Database, what do you do when you have a non-relational database, or something else entirely? Take, for example, SDB and the boto persistence layer.

The answer? mod_python, clearsilver, and a little bit of intelligent design. I came up with a very interesting framework that simply routes between special handlers which are mapped in a config file, and then generates HDFs to be sent to templates, all depending on what the user asked for. For example, if you go to /index.html, it renders templates/html/index.cs, where if you try /index.xml, it goes into templates/xml/index.cs.

Look for an upcoming new open-source framework from me in the near future. It has a lot of practical applications, and it neatly integrates with SDB.

Wed Apr 02 20:10:15 -0400 2008 https://coredumped.org/blog/show/19
iPhone heaven Now that I have a new iPhone(thanks to my boss for buying it for me), I've been working a lot on making my existing web-apps more mobile-friendly. Looking at the standard wordpress feel (large amounts of wasted space on the sides) makes me realize just how bad our current thinking of web-based development is.

My boss pointed me to iui the other day and I started working on transferring some of my work over to that framework. After playing with it for a while I decided to see how it looks in a regular browser. When did the internet get so fast? It's amazing how bad programmers have become. We now consider that a memory leak in our browsers that leaks up to 1MB every hour to be ok.

Better computers are breeding worse programmers
Mon Feb 25 16:09:08 -0500 2008 https://coredumped.org/blog/show/18
Tabs v Spaces
I don't use tabs because it makes my lines go over my 80 character terminal size.

So, originally I thought tabs were evil. I couldn't understand why anyone would use tabs, considering that most editors could be set up to insert the appropriate number of spaces instead. Then I learned Python.

In Python, whitespace is an important part of the language. In this case, tabs can mean something entirely separate from spaces. Since you really do determine what block of code you're in simply by whitespace, using tabs says "I'm in the next code block" where using spaces along could just meant that it's a continuation from the previous line. Moreover, from a simple regex point of view, it's a lot easier to find the tabs, and recognize what they do (at the compiler level), then to decide if these set of spaces are meaning you're at the next code block, or if you're a continuation from the previous line.

So, why would anyone use spaces instead of tabs? Some people claim that it's so the code will "look right" on anyone's editor. If my editor didn't have the "$" character available, would you not use it in your code? How is it any different from a tab? Tabs can and should be a functional part of the language, just like any other comment would be. Tabs are one of the simplest forms of commenting code, they're saying "Hey, we've moved into a new block of code, and I know you can tell how far down we are because it's the exact number of tabs". With tabs, it's universal, one tab for each new block of code. How many spaces do you use instead? Well, that depends on the person doesn't it?

In conclusion, if you really can't stand tabs being so long, get a real editor, and then add this to your .vimrc:

set tabstop=3
set listchars=tab:>-,trail:-
set list
My work here is done.
Fri Feb 15 08:20:22 -0500 2008 https://coredumped.org/blog/show/17
py-s3fuse opensourced Since Amazon announced SimpleDB (SDB) I've had thoughts of how you could make a S3 based File system. I've been working on S3FS for a while now for DocumentWorx, but recently we've decided to open source the project. It's currently still in the very alpha stage (as is SDB), but it's looking promising. I'm not planning on doing any caching at all so I won't have the integrity issues that other s3 based filesystems have, but it will be a lot slower. On the plus side, you can download it for free and start using S3 as you would a normal drive from any Mac or *nix based system. Thu Jan 24 22:07:40 -0500 2008 https://coredumped.org/blog/show/16 XMPP, not just for IM?

Apparently there's been a lot of Hype for using XMPP for communication between services that are loosely coupled. There are a few benefits to this. First of all, it's very lightweight, the packet sizes are minimal compared to something like SOAP or even REST. Secondly, the system supports multiple clients registering as the same service on the server. This means that you could distribute out the workload, having the last client to respond being the one that will get the messages from the connecting client. Most importantly, XMPP clients exist for almost every device imaginable, including the iPhone and my Blackberry, which basically means you can control your servers from anywhere, on anything you carry.

This, to me, seems to be a lot of Hype for nothing. There are still a lot of side effects, such as security concerns and the single-point-of-failure issues that we don't encounter as much with other systems. If you recall, soon after IRC came out, many of the same claims were made about it, being as you could have IRC clients on any OS, and it was big news to be able to send commands directly to your servers over a third-party client.

So, with all this hype, will XMPP become the next big thing for distributed computing? It's doubtful. It may, however, bring in some new ideas for what direction we take. XMPP has a lot of good ideas that every programmer should heed when developing scalable flexible distributed systems.

Thu Jan 24 21:16:59 -0500 2008 https://coredumped.org/blog/show/15
Amazon Web Services For those of you who haven't heard yet, I have a new job working for DocumentWorx. They do some pretty cool things with Amazon's Web Services; specifically, they run there entire operation off of them. Instead of managing our own data center, we simply use the robust environment AWS provides, and we can scale to any customers needs instantly.

It'll be nice never having to deal with hardware again. This is every SE major's dream.

Fri Jan 11 13:58:27 -0500 2008 https://coredumped.org/blog/show/14
Rails V. Django
Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
Although I'm still a fan of Ruby, I've always had a thing for Python. The only reason I haven't adopted it entirely into my own site is because of how it uses whitespace as a key part of the language. That being said, Python has a great web app framework called Django. Django, unlike rails, operates on a modular "app" format. Instead of designing the whole website as a single app, they allow you to incorporate multiple apps into a single website, and even have a lot of pre-built things to help you get started. Django allows you to package your apps separately from your site, so the two are entirely independent. More to come.
Thu Nov 15 10:08:26 -0500 2007 https://coredumped.org/blog/show/13
Semantic Web
The Semantic Web provides a common framework that allows data to be shared and reused across application, enterprise, and community boundaries. It is a collaborative effort led by W3C with participation from a large number of researchers and industrial partners.
http://www.w3.org/2001/sw/
For those intereseted, I've written a research paper on the topic of the Semantic Web and Semantic Searching. I'm also working on incorporating RDFs into my current Rails system, including an RDF generator, and hopefully I'll eventually be able to scrape information from wikipedia and use it in my RDFs. I may also be opening up my RDF generator for anyone to add things. For now check out Disco, the simple RDF browser.
Thu Nov 01 20:50:39 -0400 2007 https://coredumped.org/blog/show/12
Blog goes Rails
Web development that doesn't hurt
www.rubyonrails.org
I've just pushed Rails to my main site. Please let me know if you find any bugs.
Thu Nov 01 19:47:23 -0400 2007 https://coredumped.org/blog/show/1
Active Record So, now that I've found Ruby's ActiveRecord implimentation, I'll be working on converting my entire site over to using it for my DB. I had been developing my own implementation of it until someone pointed me to how rails does it. Turns out you can use ActiveRecord as a rubygem without using rails at all. Also turns out that ActiveRecord is a design pattern for ORM (Object Relational Modeling) that is the same pattern which Java's Hibernate uses (or at least similar). Look forward to a LOT of updates soon Tue Sep 18 13:29:02 -0400 2007 https://coredumped.org/blog/show/11 Ruby Oscar Ok, so ruby and oscar don't exactly have a good rep. There were several oscar API's that existed, but none of them worked exactly right. I took several existing ones and looked at how they were designed to work. From there, I generated a simple and easy to use API that actually works. I'm not sure yet if the error handling (reconnecting) works, but at least I can send and recieve messages now. Combined with Genetrix's new modular alert system, we know have AIM (and Gtalk) alerts available, in addition to the simple email system. I had to restructure the DB table, but I'll release my DB map shortly. Thu Jul 19 20:26:13 -0400 2007 https://coredumped.org/blog/show/10 Firefox and Tables After spending quite a bit of time trying to decipher what my problem with table layout was, I found out that Firefox does not properly calculate the table size based on what it is displaying. It seems as though if you put two spans with white-space: nowrap next to each other inside of a TD that is set to wrap, the table expands correctly to the size of the largest span, as if it was going to wrap the second span on to the next line. When displaying this, however, it does not wrap the span, causing the second span to overflow. Firefox 3.0 beta seems to have this fixed, however, it breaks when you stick an image inside of a table, incorrectly forgetting the size of the image when calculating the size of the table. Firefox 3.0 may have fixed one bug, but in doing so they introduced another one. Will someone just fix the table layouts already? To see what I'm talking about, check this out: firefox_tables.html Bugzilla bug Thu Jun 28 15:50:25 -0400 2007 https://coredumped.org/blog/show/9 Genetrix So, hobbit sucks, nagios sucks, and pretty much any other system monitoring software out there blows even worse. Because of this, I've started my own System monitoring software called Genetrix. It's still in the planning and design stage now, but I plan to have a fully modular system backed by a database. More information can be found at: genetrix.coredumped.org Mon Jun 18 17:38:02 -0400 2007 https://coredumped.org/blog/show/8 I.E. and cookies Ok, so this is something that really threw me for a loop. Internet exporer doesn't send cookies when you use the document() function in XSL. It also doesn't send cookies on includes from XSL. What this means: You can't include dynamic information based on a session using the document() function. In my case, a menu based on login information isn't possible. Workaround: Use a simple div and have a javascript ajax request that filters through XSL after it comes back before going into the div as its innerHTML Downfalls: Safari doesn't allow javascript to call the XSL transformer, thus this breaks Safari alltogether. Mon Jun 04 18:11:44 -0400 2007 https://coredumped.org/blog/show/7 mod_ruby strikes again Once again I found some interesting "Features" of mod_ruby. It seems as though it handles exceptions by writing out a message to the error.log file in apache and then throwing a 500 Internal Server Error. This includes MySQL connection exceptions. For now, I've handle d the MySQL connection exception error by a simple begin, rescue, retry block like so: begin @conn.query("SELECT 1 FROM DUAL") rescue connect retry end This seems to have fixed most of the problems, but I'm looking for a more perminate solution to handle errors in the future, perhaps my own default exception handler? Fri Jun 01 18:41:41 -0400 2007 https://coredumped.org/blog/show/6 Mod Ruby quirks So, Mod Ruby has a few interesting quirks that wouldn't be obvious to the average user. First of all, it does some sort of super caching where it doesn't actually reload required files. This means that in my case, when I decide to change some of my api, I have to actually restart apache in order to get mod_ruby to pick up the changes. It also doesn't give any sort of error message when something goes wrong, insted throwing a 500 (Internal Server Error). Although there have been a lot of headaches here, I think I'll be able to live through these few little quirks until they're fixed. Until then, don't be supprised if my server goes down for a few seconds every once in a while, and if you see a 500 (Internal Server Error) email me right away. Thu May 31 15:12:35 -0400 2007 https://coredumped.org/blog/show/5 Blog goes SSL I've just created my own CA, and cert, and hacked in SSL support for the built in RAILS server. I can now run an SSL server as well as a standard server. Sat May 19 14:54:00 -0400 2007 https://coredumped.org/blog/show/3