<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>themorgue.org</title>
	<link>http://themorgue.org/blog</link>
	<description>ramblings of distinction</description>
	<pubDate>Fri, 11 Jul 2008 02:09:25 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>
	<language>en</language>
			<item>
		<title>I&#8217;ve heard of the liberal media bias, but birthday cards?</title>
		<link>http://themorgue.org/blog/2008/07/11/ive-heard-of-the-liberal-media-bias-but-birthday-cards/</link>
		<comments>http://themorgue.org/blog/2008/07/11/ive-heard-of-the-liberal-media-bias-but-birthday-cards/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 02:09:25 +0000</pubDate>
		<dc:creator>Kevin D Smith</dc:creator>
		
		<category><![CDATA[Home]]></category>

		<guid isPermaLink="false">http://themorgue.org/blog/2008/07/11/ive-heard-of-the-liberal-media-bias-but-birthday-cards/</guid>
		<description><![CDATA[I was at a FedExKinkos in Norman, OK today just browsing around and came across the greeting card section of the store.  One card caught my eye that had George Bush&#8217;s face on it.  The card said something about Bush&#8217;s last day in office (which is in 2009) and that on your birthday [...]]]></description>
			<content:encoded><![CDATA[<p>I was at a FedExKinkos in Norman, OK today just browsing around and came across the greeting card section of the store.  One card caught my eye that had George Bush&#8217;s face on it.  The card said something about Bush&#8217;s last day in office (which is in 2009) and that on your birthday you should party like it&#8217;s 2009.  OK, not a really big deal, people have been taking shots at Bush for years.  As I continued browsing, I noticed an anti-Cheney card.  Again, not a real surprise.  Further browsing did turn up some slightly more surprising cards.</p>
<p>The next one I came across was a Hillary Clinton card.  With the words &#8220;President Hillary Clinton&#8221; across the top.  The inside said something along the lines of: see there are things scarier than getting old.  This one did stray a bit off the usual anti-Bush fodder, but she was once a first lady, so I guess it still makes sense.  Believe it or not John McCain was next.  This one did strike me as a bit more odd than the others; however, this is an election year so I guess you&#8217;re bound to see cards poking fun at all of the candidates&#8230;  Not quite.</p>
<p>The final group of cards were the Barack Obama cards.  I figured that they would again take some shots at the prospective presidential candidate.  That&#8217;s where I was wrong, way wrong.  These cards portrayed Obama as some sort of superstar, sex symbol.  Not a single negative or even neutral point was made about him.  You could have replaced his pictures on the cards with pictures of Marilyn Monroe and left all of the prose in place!  Needless to say, I was flabbergasted!  It&#8217;s basically like the greeting card company is campaigning for Obama through their cards (and FedExKinkos is indirectly doing the same by carrying the whole collection).  I guess it&#8217;s their company and they can do what they want, I&#8217;m just taken aback by how blatantly biased they are.  Oh well, I guess you can just chalk it up to more free publicity for Obama.</p>
]]></content:encoded>
			<wfw:commentRss>http://themorgue.org/blog/2008/07/11/ive-heard-of-the-liberal-media-bias-but-birthday-cards/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Django and ModelForm</title>
		<link>http://themorgue.org/blog/2008/05/14/django-and-modelform/</link>
		<comments>http://themorgue.org/blog/2008/05/14/django-and-modelform/#comments</comments>
		<pubDate>Wed, 14 May 2008 04:28:45 +0000</pubDate>
		<dc:creator>Kevin D Smith</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://themorgue.org/blog/2008/05/14/django-and-modelform/</guid>
		<description><![CDATA[The current SVN version of Django has a new way of creating forms for adding and editing objects in a database.  The most recent released version, 0.96, had two functions to create objects that generated forms for you: form_for_model and form_for_instance.  The form_for_model function would take a Model class and generate an input [...]]]></description>
			<content:encoded><![CDATA[<p>The current SVN version of <a href="http://djangoproject.com/">Django</a> has a new way of creating forms for adding and editing objects in a database.  The most recent released version, 0.96, had two functions to create objects that generated forms for you: form_for_model and form_for_instance.  The form_for_model function would take a Model class and generate an input form for it.  The form_for_instance function would take a Model class instance and do the same, but would also fill in the values specified in the database.  These were pretty handy, but it was inconvenient to have two functions that did basically the same thing.  So the Django team added ModelForms.</p>
<p>ModelForms combine the features of the two previously mentioned functions into a single ModelForm class.  Let&#8217;s say that we have a Student model in our Django application and we want to create a form for it in our view.  We would create a subclass of ModelForm as follows.</p>
<pre>
from django.newforms import ModelForm

class StudentForm(ModelForm):
    class Meta:
        model = Student
</pre>
<p>If you were to create an instance of StudentForm in a view method and run the as_table method, you would get an HTML form that contained all of the fields in the model.  A sample view method is shown below that creates a new user if there isn&#8217;t posted data, or saves the student information if there was posted data.</p>
<pre>
def studentEditor(request):
    # Save the newly created student using posted data
    if request.method == 'POST':
        form = StudentForm(request.POST)
        if form.is_valid():
            form.save()
            return HttpResponseRedirect('/students/')

    # Create a new Student with no data
    else:
        form = StudentForm()

    return render_to_response('studentEditor.html', {'form':form})
</pre>
<p>This is great, and does basically the same thing as the old form_for_model function, but it still leaves the editing portion to be done.  Before ModelForms came out, you had to use the form_for_instance function to convert an existing instance to a form instance, then render the HTML form to edit the data.  Now it is much easier.  You simply add an &#8216;instance&#8217; keyword option to the ModelForm constructor that speficies the instance to read the initial data from.  Below is the same view as above with a new argument that is the primary key of a student in the database.  This primary key is used to get a student instance to pass to the StudentForm constructor.</p>
<pre>
def studentEditor(request, id=None):
    instance = None
    if id is not None:
        instance = Student.objects.get(id=id)

    # Save the created or edited student using posted data
    if request.method == 'POST':
        form = StudentForm(request.POST, instance=instance)
        if form.is_valid():
            form.save()
            return HttpResponseRedirect('/students/')

    # Create/edit a Student with database values
    else:
        form = StudentForm(instance=instance)

    return render_to_response('studentEditor.html', {'form':form})
</pre>
<p>This is pretty nice, but there is still a redundancy in creating the StudentForm instance.  You have to do it in two different places for the create and edit cases.  However, with a couple of little Python tricks using &#8216;and&#8217; and &#8216;or&#8217;, you can simplify the above code to this:</p>
<pre>
def studentEditor(request, id=None):
    form = StudentForm(request.POST or None,
                       instance=id and Student.objects.get(id=id))

    # Save new/edited student
    if request.method == 'POST' and form.is_valid():
        form.save()
        return HttpResponseRedirect('/students/')

    return render_to_response('studentEditor.html', {'form':form})
</pre>
<p>Now that&#8217;s an idiom that would make a mother proud.</p>
]]></content:encoded>
			<wfw:commentRss>http://themorgue.org/blog/2008/05/14/django-and-modelform/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Bad Design Considered Harmful (Seriously)</title>
		<link>http://themorgue.org/blog/2008/04/22/bad-design-considered-harmful-seriously/</link>
		<comments>http://themorgue.org/blog/2008/04/22/bad-design-considered-harmful-seriously/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 01:59:51 +0000</pubDate>
		<dc:creator>Kevin D Smith</dc:creator>
		
		<category><![CDATA[Home]]></category>

		<guid isPermaLink="false">http://themorgue.org/blog/2008/04/22/bad-design-considered-harmful-seriously/</guid>
		<description><![CDATA[There is an epidemic of bad design in this world that is more than just annoying, it&#8217;s dangerous.  I&#8217;m not just talking about bad aesthetic quality of devices, obviously.  I&#8217;m mean that their behaviors are badly designed as well.  I think Steve Jobs nails it when he talks about design.


Design is not [...]]]></description>
			<content:encoded><![CDATA[<p>There is an epidemic of bad design in this world that is more than just annoying, it&#8217;s dangerous.  I&#8217;m not just talking about bad aesthetic quality of devices, obviously.  I&#8217;m mean that their behaviors are badly designed as well.  I think Steve Jobs nails it when he talks about design.
</p>
<blockquote><p>
Design is not just what it looks like and feels like. Design is how it works.
</p></blockquote>
<p>So how could this possible lead to &#8220;danger?&#8221;  I&#8217;m glad you asked.  I&#8217;ve been dealing with safety devices in the home lately.  Safety has taken on a new meaning to me since I moved to Tornado Alley last year.  The weather in this area pretty much mandates that you have a weather alert radio to notify your of impending danger (especially at night).  The other badly designed device I&#8217;ve dealt with recently is a smoke alarm.  Let&#8217;s start with the smoke alarm since most people are familiar with them.</p>
<p>There is a smoke alarm installed in my kitchen that was there when I moved in.  It works well.  Too well.  Any hint of smoke in the air from cooking sets it off.  What happens when it starts going off for that reason?  I get annoyed and remove the battery.  This isn&#8217;t necessarily dangerous while I&#8217;m cooking, but I have to remember to put it back in when I&#8217;m done.  That doesn&#8217;t always happen.  To try to remedy this situation, I bought a new smoke alarm made for kitchens that has a &#8220;hush&#8221; button.  This is a button that you press when you get &#8220;false alarms&#8221; due to cooking.  Great idea!  Except that it was badly designed.</p>
<p>I was cooking today and created a pretty good amount of smoke (no, I&#8217;m not a bad cook, some things just create smoke when you cook them).  The new smoke alarm went off, and rightfully so.  I pressed the hush button, and it stopped! YEAH!!  Then it started to annoy me.  Every minute or so, the smoke alarm let out a small chirp (basically like the chirp most smoke alarms let out when the battery is low).  After a few chirps, this annoyed me enough to take the battery out.  So I&#8217;m right back where I started!</p>
<p>If fire isn&#8217;t bad enough, weather in Tornado Alley can be even more dangerous.  I purchased a weather alert radio to alert us (mainly at night) about severe weather.  The first one I purchased in a very simple model and pretty well designed.  It has three lights on it to indicate different levels of alert and a screen that displays what type of alert it is.  It can be plugged in or can run on batteries.  So what&#8217;s wrong with it?  It&#8217;s too dang loud!  It has the option to alert you in three different ways: light up the display, voice alert, or siren.  Obviously, the light won&#8217;t do much at night; it&#8217;s not that bright.  The siren is absolutely obnoxious and is loud enough to induce a heart attack in the middle of the night, so voice alert was my choice.  The problem is that &#8220;voice alert&#8221; only means &#8220;partial voice alert.&#8221;  Before the voice alert comes, you get about five seconds of the horrendous siren first.  I&#8217;m a light enough sleeper that the voice is plenty to wake me up.  I think the danger of having a heart attack by having the siren go off in the middle of the night is a bigger danger than facing whatever it is that the radio is alerting me to.  Here comes weather radio number 2.</p>
<p>The new weather radio was much more technologically advanced.  It has base station and a hand-held portion.  I liked this feature because it made it handy to take into the storm shelter during an alert.  Both the base station and the hand-held portion have a clock on them.  Since the hand-held radio is battery operated, it isn&#8217;t affected by power outages.  However, the base station doesn&#8217;t have battery backup, so when the power goes out, the time goes back to 12:00.  This wouldn&#8217;t be such a big deal if it just took the word of the hand-held portion (which still has the correct time since it&#8217;s running on batteries), but the opposite occurs.  The hand-held radio takes the bad time from the base station so that they are both wrong!  Now I should explain that the base station is supposed to sync with the atomic click in Colorado, so it should always have the right time.  But that is only true if it can actually connect to the atomic clock which brings up another design flaw.</p>
<p>The sensor for the atomic clock must be placed outside so that it has a clear shot at Colorado.  There are conditions though.  It can&#8217;t be in direct sunlight, it can&#8217;t be subject to direct moisture, it can&#8217;t solid objects between it and the atomic clock in Colorado.  So it must be installed under something that gives it protection from sun and rain, but that would block the signal to the atomic clock.  I give up&#8230;</p>
<p>I&#8217;ll definitely be sticking with the second weather radio because it has a much more sane alert than the first radio (although it does automatically turn itself to maximum volume when an alert occurs), but it is far from perfect.  I haven&#8217;t even gone into the other issues that I have with it.  The point is that each one of these devices annoys me enough that I consider not using them at all, which puts me in the path of danger whether it is fire, severe thunderstorms, or tornados just because of bad design.  While bad aesthetics probably will never cause any real danger except to my sense of taste, design of safety devices that cause you to quit using them is dangerous.</p>
]]></content:encoded>
			<wfw:commentRss>http://themorgue.org/blog/2008/04/22/bad-design-considered-harmful-seriously/feed/</wfw:commentRss>
		</item>
		<item>
		<title>My New Favorite Ginger Ale</title>
		<link>http://themorgue.org/blog/2008/04/04/my-new-favorite-ginger-ale/</link>
		<comments>http://themorgue.org/blog/2008/04/04/my-new-favorite-ginger-ale/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 19:47:03 +0000</pubDate>
		<dc:creator>Kevin D Smith</dc:creator>
		
		<category><![CDATA[Food &amp; Drinks]]></category>

		<guid isPermaLink="false">http://themorgue.org/blog/2008/04/04/my-new-favorite-ginger-ale/</guid>
		<description><![CDATA[Growing up in Michigan, the only real choice of ginger ale was Vernor&#8217;s.  As I would find out later in life, this wasn&#8217;t such a bad thing.  After moving to North Carolina for graduate school, I discovered that not everyone knew what Vernor&#8217;s (or ginger ale in general) was all about.  The [...]]]></description>
			<content:encoded><![CDATA[<p>Growing up in Michigan, the only real choice of ginger ale was <a href="http://en.wikipedia.org/wiki/Vernors">Vernor&#8217;s</a>.  As I would find out later in life, this wasn&#8217;t such a bad thing.  After moving to North Carolina for graduate school, I discovered that not everyone knew what Vernor&#8217;s (or ginger ale in general) was all about.  The grocery stores there usually only stocked Seagram&#8217;s, Schweppes, Canada Dry, and some store brands.  I had never had anything but Vernor&#8217;s growing up, so I assumed that they probably all tasted about the same.  I couldn&#8217;t have been more wrong.  All of the other brands that I tried tasted like Sprite with the slightest hint of ginger.  This is totally unlike Vernor&#8217;s which has a strong ginger flavor and a lot of bite to it.  There is even a &#8220;You know you might be from Michigan&#8221; joke that goes &#8220;You know you might be from Michigan if you can drink Vernor&#8217;s without coughing.&#8221;</p>
<p>I did finally find Vernor&#8217;s in North Carolina, but it was very expensive (probably twice what it cost in Michigan).  My parent&#8217;s would also bring some with them whenever they made a visit to see me, which made it a little expensive as well since Michigan has a 10 cent deposit on all pop cans and bottles.  I did come across some other ginger ales in the Whole Foods store in Raleigh by <a href="http://www.reedsgingerbrew.com/">Reed&#8217;s</a>.  While Reed&#8217;s is better than the weak stuff you get in regular grocery stores, it goes a bit overboard.  The herbs and spices are too strong for my taste.</p>
<p>I found inexpensive Vernor&#8217;s again while living in Colorado, but alas, I was only there for a few months.  Now that I&#8217;m in Oklahoma, it&#8217;s difficult to find again.  However, when I discovered <a href="http://www.pops66.com">Pops</a> on Route 66, I was introduced to a much better selection of ginger ales than I had ever seen before.  In my first visit, I selected Dr. Tima&#8217;s Honey Ginger Ale as my first ginger ale experiment.</p>
<p><img src="/images/honey-ginger-ale.jpg" align="left" width="100" height="126">I didn&#8217;t hold a lot of hope for Dr. Tima&#8217;s Honey Ginger Ale due to my previous experiences with other ginger ales, but I didn&#8217;t hold that opinion for long.  Dr. Tima&#8217;s Ginger Ale not only <b>has</b> honey in it, but that is the <b>only</b> sweetener in it.  There are no refined sugars or corn syrups.  The first taste was very pleasant.  It didn&#8217;t have quite the bite that Vernor&#8217;s does, but it had a great ginger flavor.  The honey introduced a warmness to offset the tang of the ginger.  Overall, it&#8217;s a great ginger ale and I enjoyed every sip more than the previous one.  I&#8217;ll have to sample a few more bottles of it (and the other 20 or so brands of ginger ale at Pops) to see how the taste wears on me, but at the moment, it reigns my top choice of ginger ales.</p>
]]></content:encoded>
			<wfw:commentRss>http://themorgue.org/blog/2008/04/04/my-new-favorite-ginger-ale/feed/</wfw:commentRss>
		</item>
		<item>
		<title>THE Reason to Visit Oklahoma</title>
		<link>http://themorgue.org/blog/2008/04/03/the-reason-to-visit-oklahoma/</link>
		<comments>http://themorgue.org/blog/2008/04/03/the-reason-to-visit-oklahoma/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 17:14:30 +0000</pubDate>
		<dc:creator>Kevin D Smith</dc:creator>
		
		<category><![CDATA[Travels]]></category>

		<guid isPermaLink="false">http://themorgue.org/blog/2008/04/03/the-reason-to-visit-oklahoma/</guid>
		<description><![CDATA[I know that nobody thinks there is any reason to go to Oklahoma, and for the most part, you&#8217;d be right.  Yeah, there is a wicked cool museum of banjos in Guthrie and there is even a canal area of Oklahoma City a lot like the one in San Antonio, but nothing I knew [...]]]></description>
			<content:encoded><![CDATA[<p>I know that nobody thinks there is any reason to go to Oklahoma, and for the most part, you&#8217;d be right.  Yeah, there is <a href="http://www.banjomuseum.org/main.htm">a wicked cool museum of banjos in Guthrie</a> and there is even <a href="http://www.bricktownokc.com/">a canal area of Oklahoma City a lot like the one in San Antonio</a>, but nothing I knew about prepared me for what I came across this weekend.  I didn&#8217;t even know it, but there are more miles of Route 66 in Oklahoma than any other state.  We decided to do a bit of touring around and see what there was to see.  For the most part, Route 66 is just a highway like any other, but there are some interesting sites along the way.  We went to the <a href="http://www.oklahomaroute66.com/preservation/rockcafe.html">Rock Cafe</a> and <a href="http://www.arcadiaroundbarn.org/">the round barn</a>, but those were nothing (as far as I&#8217;m concerned) compared to a newer attraction: <a href="http://www.pops66.com/">Pops</a>.</p>
<p>The construction of Pops started in 2006.  It is a store like nothing I&#8217;ve ever seen before.  We actually drove by it a couple of times not even realizing what it was, but decided to go back and take a closer look.  Boy am I glad we did.  Pops is a Route 66 attraction that is basically a gas station and restaurant, but the real feature is pop (that&#8217;s coke for the Southerners).  They have nearly <b>500</b> kinds pops and bottled waters.  They don&#8217;t stock everything all the time, so you have to come back more than one time to see them all.  The entire front of the building is covered in glass and has glass shelves lined with thousands of bottles of pop, just for decoration.  Every bottle in the store is glass.  If you aren&#8217;t a pop connoisseur, this is the <b>only</b> way that pop should be enjoyed. For me, this was a dream come true.  They had pops there that I have wanted to try for years, and lots that I had never even heard of.  They even had more than one kind of strawberry rhubarb pop!  If you are looking for a reason to come to Oklahoma, this is it.  But you&#8217;ll probably want to stop by and see the banjos too&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://themorgue.org/blog/2008/04/03/the-reason-to-visit-oklahoma/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MooTools &#38; Garbage Collection</title>
		<link>http://themorgue.org/blog/2008/04/03/mootools-garbage-collection/</link>
		<comments>http://themorgue.org/blog/2008/04/03/mootools-garbage-collection/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 17:09:30 +0000</pubDate>
		<dc:creator>Kevin D Smith</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://themorgue.org/blog/2008/04/03/mootools-garbage-collection/</guid>
		<description><![CDATA[I&#8217;ve been working on a MooTools class for the past couple of days that makes large data tables scrollable.  When the page loads, it checks to see if any data tables are larger than the scrollable area of the window.  If there are tables like this, it puts the table into a scrolling [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on a MooTools class for the past couple of days that makes large data tables scrollable.  When the page loads, it checks to see if any data tables are larger than the scrollable area of the window.  If there are tables like this, it puts the table into a scrolling div and copies the header and footer areas above and below the scrolling div, respectively.  It also has the options of making the rows alternate colors and making the table rows sort when the headers or footers are clicked.  I had it working quite well, but there were some performance issues.</p>
<p>The table I was testing with had 429 rows of 16 columns.  This is a total of 6864 cells.  I was taking advantage of MooTools&#8217; getElementBySelector in many places because I needed to find th and td cells within the tbody, thead, and tfoot elements separately.  This created some problems when the page unloaded.  On Firefox, it was taking over <b>7 seconds</b> just to leave the page.  This obviously was unacceptable.</p>
<p>I was having trouble figuring out what the exact problem was.  I&#8217;m having done a lot of Javascript debugging, and have done even less performance profiling.  Luckily, the <a href="https://addons.mozilla.org/en-US/firefox/addon/1843">Firebug plugin to Firefox</a> was a huge help.  In fact, I don&#8217;t know how I would have figured out the problem if I hadn&#8217;t had it.  I turned on profiling then refreshed my page.  Firebug told me that the &#8216;remove&#8217; method of the MooTools Array object was taking up all of the time.  I wasn&#8217;t using the remove method, so I figured there must be some sort of garbage collecting going on in MooTools.  After posting to the MooTools forum, I got the answer.  Apparently, whenever you use any of the MooTools that returns a DOM node, it extends those nodes with the special MooTools methods.  This means that if you use $, $$, getElementsByClassName, or getElementsBySelector, every node that is returned is extended by MooTools and must be garbage collected.</p>
<p>In my table, I had thousands of cells that I was accessing to implement various features.  Every one of those cells was being extended and had to be garbage collected.  By the time my script was finished, I had <b>over 7,000</b> objects to be garbage collected when the page unloaded (as seen in the Garbage.elements object under the DOM tab in Firebug).</p>
<p>While the getElementsBySelector method is very handy, it wasn&#8217;t going to work for me because of the extreme number of cells in my table.  I ended up rewriting much of my code to use the standard getElementsByTagName method to get around the issue.  This made the code quite a bit uglier, but I guess most optimizations do.  The lesson today is to <b>be careful when using methods that extend nodes in MooTools</b>.  While MooTools is really nice, there can be too much of a good thing.  I&#8217;ve heard that MooTools 1.2 does memory management in a very different way, so hopefully the severity of this type of situation will be reduced in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://themorgue.org/blog/2008/04/03/mootools-garbage-collection/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Life with MooTools</title>
		<link>http://themorgue.org/blog/2008/03/25/life-with-mootools/</link>
		<comments>http://themorgue.org/blog/2008/03/25/life-with-mootools/#comments</comments>
		<pubDate>Tue, 25 Mar 2008 02:08:27 +0000</pubDate>
		<dc:creator>Kevin D Smith</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://themorgue.org/blog/2008/03/25/life-with-mootools/</guid>
		<description><![CDATA[It&#8217;s been a while now since I&#8217;ve started using the MooTools Javascript toolkit, and I haven&#8217;t regretted that decision once.  MooTools still doesn&#8217;t have a following as big as Prototype or jQuery or maybe even Dojo, but it just seems to fit my code aesthetic the best.  I love how non-invasive MooTools is [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a while now since I&#8217;ve started using the <a href="http://mootools.net/">MooTools</a> Javascript toolkit, and I haven&#8217;t regretted that decision once.  MooTools still doesn&#8217;t have a following as big as <a href="http://www.prototypejs.org/">Prototype</a> or <a href="http://jquery.com/">jQuery</a> or maybe even <a href="http://dojotoolkit.org/">Dojo</a>, but it just seems to fit my code aesthetic the best.  I love how non-invasive MooTools is when the HTML is concerned.  Applying a function to elements based on selectors is fairly easy.</p>
<pre>
$$('.myelem').each(function(item) {
    myfunction(item);
});
</pre>
<p>This idiom is actually the way that you deal with arrays in general.  Another highlight of MooTools is the Class object.  This object lets you program classes in Javascript much like in other class-based languages like Java or Python.  I couldn&#8217;t possibly do a better job of demonstrating classes than <a href="http://clientside.cnet.com/wiki/howtowriteamootoolsclass">this tutorial on //clientside</a>.  When I originally started using MooTools, I didn&#8217;t think I was going to use the Class object much, but it has ended up being one of my favorite things.</p>
<p>Last but not least in the world of MooTools is the effects library.  You can get a good feel for the quality of the MooTools effets simply by <a href="http://mootools.net/">going to their web site</a>.  It&#8217;s hard to ignore the slick animation effects that MooTools gives you access to.  The only trouble with effects is that it can be pretty easy to go overboard and start to make some really tacky web sites; however, in moderation, visual effects can really make your work stand out.</p>
<p>There are lots of other cool things about MooTools such as custom events and introspection of style attributes.  If you use MooTools, I&#8217;d like to hear what your favorites idioms and features are.</p>
]]></content:encoded>
			<wfw:commentRss>http://themorgue.org/blog/2008/03/25/life-with-mootools/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Prototype and jQuery and MooTools, Oh My!</title>
		<link>http://themorgue.org/blog/2008/01/19/prototype-and-jquery-and-mootools-oh-my/</link>
		<comments>http://themorgue.org/blog/2008/01/19/prototype-and-jquery-and-mootools-oh-my/#comments</comments>
		<pubDate>Sat, 19 Jan 2008 05:05:47 +0000</pubDate>
		<dc:creator>Kevin D Smith</dc:creator>
		
		<category><![CDATA[Computers]]></category>

		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://themorgue.org/blog/2008/01/19/prototype-and-jquery-and-mootools-oh-my/</guid>
		<description><![CDATA[I&#8217;ve been playing around with writing web applications lately and have been looking for a good Javascript library to help with Ajax and web browser differences.  After doing a little searching, two libraries floated to the top: Prototype and jQuery.
Prototype was definitely the most popular, partially because of the script.aculo.us user interface library.  [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing around with writing web applications lately and have been looking for a good Javascript library to help with <a href="http://en.wikipedia.org/wiki/Ajax_(programming)">Ajax</a> and web browser differences.  After doing a little searching, two libraries floated to the top: <a href="http://www.prototypejs.org/">Prototype</a> and <a href="http://jquery.com/">jQuery</a>.</p>
<p>Prototype was definitely the most popular, partially because of the <a href="http://script.aculo.us/">script.aculo.us</a> user interface library.  Prototype is definitely extensive and fairly well-documented.  On the other hand, it plays a lot of dirty tricks under the covers to do it&#8217;s work.  I wouldn&#8217;t count it out just for that reason, because it is very popular and well-tested in the real world.  I do find the script.aculo.us web site to have absolutely horrible navigation, which is very odd since it is claiming to be the premier user interface library.</p>
<p>The other problem I have with Prototype is that is is fairly large (~100k).  I want to make my web application usable by people with dial-up access, so file sizes are very important.  Through compression and other techniques, you can minimize the download time, but it is not something that can be ignored.</p>
<p>jQuery was the next candidate.  jQuery seems to have a somewhat different focus than Prototype.  Prototype is more of an application building framework, whereas jQuery seems to be more of a quick-and-dirty query-and-modify toolkit.  I really liked the idea of jQuery and can see why it has a large following.  Being able to use CSS selectors to locate elements and chain functions is very powerful.  So powerful that I almost chose jQuery as the toolkit to use for my projects.  What stopped me was the somewhat ugly API.  The method names and arguments seemed to be somewhat inconsistent and overloaded to excess.  It felt more like an accident than a design.</p>
<p>While deliberating over whether to choose Prototype or jQuery, I came across a forum of Ajax developers where <a href="http://mootools.net/">MooTools</a> was mentioned.  I didn&#8217;t really want to research any more tools especially ones that didn&#8217;t have that big of a following.  After seeing the MooTools web site though, I thought I&#8217;d give it a shot.</p>
<p>I really like the look of the MooTools web site.  This may sound superficial, but I figure that if they have a good aesthetic for their web site, they probably care about what their code looks like too.  Looking at their API confirms this.  The API is very consistent and powerful.  In addition, it is also modular so that you can simply include the pieces you need rather than having a monolithic library.</p>
<p>MooTools seems to be a happy medium between Prototype and jQuery.  It has enough application building tools and extensions of native Javascript objects without getting too invasive or outrageously large.  It also has the power of jQuery&#8217;s CSS selector method of locating document nodes.</p>
<p>If you haven&#8217;t figured it out yet, I&#8217;ve decided to use MooTools for my applications.  I&#8217;ve been playing around with it for the past couple of days and am quite happy with the results.  The API is very easy to work with and extremely powerful.  It&#8217;s not all a love-fest though.  I have had some major problems with getting the correct keys for key-based events, but I think that has more to do with the <a href="http://www.quirksmode.org/js/keys.html">inconsistencies between browsers</a> than anything else.  Hopefully, they&#8217;ll come up with a fix for these problems soon.  Until then, I&#8217;ll continue to learn more MooTools tricks and idioms and let you know how it goes.</p>
]]></content:encoded>
			<wfw:commentRss>http://themorgue.org/blog/2008/01/19/prototype-and-jquery-and-mootools-oh-my/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Python User Group</title>
		<link>http://themorgue.org/blog/2007/10/28/python-user-group/</link>
		<comments>http://themorgue.org/blog/2007/10/28/python-user-group/#comments</comments>
		<pubDate>Sun, 28 Oct 2007 04:28:56 +0000</pubDate>
		<dc:creator>Kevin D Smith</dc:creator>
		
		<category><![CDATA[Computers]]></category>

		<category><![CDATA[Python]]></category>

		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://themorgue.org/blog/2007/10/28/python-user-group/</guid>
		<description><![CDATA[Now that I&#8217;m living in Oklahoma I thought it might be fun to try to organize a Python User Group.  My friend Blaine has been running a dynamic language user group for a while now in Omaha, NE and it sounds like a lot of fun.  I thought about doing something similar, but [...]]]></description>
			<content:encoded><![CDATA[<p>Now that I&#8217;m living in Oklahoma I thought it might be fun to try to organize a <a href="http://wiki.python.org/moin/LocalUserGroups">Python User Group</a>.  My friend <a href="http://blog.blainebuxton.com/">Blaine</a> has been running a dynamic language user group for a while now in Omaha, NE and it sounds like a lot of fun.  I thought about doing something similar, but pretty much everyone that contacted here in Norman was only interested in Python.  That&#8217;s fine with me since Python is my language of choice (although I do enjoy a bit of Javascript from time to time).  Anyway, I met up with some people at the <a href="http://nwc.ou.edu/">National Weather Center</a> who had an interest, and it looks like it&#8217;s a go!  We&#8217;ve set up a <a href="http://opy.sixquickrun.com/">web site</a> and we&#8217;re working on getting our very own <a href="http://mail.python.org/mailman/listinfo">python.org mailing list</a>.  So if you live in the central Oklahoma area and are interested in Python at all, keep an eye on our web site for meeting details.</p>
]]></content:encoded>
			<wfw:commentRss>http://themorgue.org/blog/2007/10/28/python-user-group/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Coolest Application You&#8217;ve Never Heard Of</title>
		<link>http://themorgue.org/blog/2007/10/28/the-coolest-application-youve-never-heard-of/</link>
		<comments>http://themorgue.org/blog/2007/10/28/the-coolest-application-youve-never-heard-of/#comments</comments>
		<pubDate>Sun, 28 Oct 2007 03:56:32 +0000</pubDate>
		<dc:creator>Kevin D Smith</dc:creator>
		
		<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://themorgue.org/blog/2007/10/28/the-coolest-application-youve-never-heard-of/</guid>
		<description><![CDATA[I&#8217;ve been doing a lot of security work on my web server and email this past week and decided to update all of the passwords on my accounts in the process.  I have to admit, that I&#8217;m really bad at coming up with good passwords.  I guess that&#8217;s why password generators were invented. [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/images/password-assistant.png" align="left" width="221" height="160">I&#8217;ve been doing a lot of security work on my web server and email this past week and decided to update all of the passwords on my accounts in the process.  I have to admit, that I&#8217;m really bad at coming up with good passwords.  I guess that&#8217;s why <a href="http://www.google.com/search?q=password+generator">password generators</a> were invented.  I did a quick search on the internet to find about 11,000,000 matches for the phrase &#8220;password generator.&#8221;  Then I remembered something from a couple of weeks ago.  I was adding a new account to my Mac and there was a little application that popped up next to the password field that generated passwords for you.  I&#8217;ve been using OS X for years, and it&#8217;s probably been there all along, but I never paid much attention until now.</p>
<p>The window that pops up calls it the Password Assistant.  It allows you to select from different types of passwords such as &#8220;Memorable&#8221;, &#8220;Letters &amp; Numbers&#8221;, &#8220;Numbers Only&#8221;, &#8220;Random&#8221;, and &#8220;FIPS-181 compliant.&#8221;  This is really cool, because some accounts limit the types of characters that you can use.  The Password Assistant also lets you select the length of the password.  It does this all while showing you a nice little gauge of how strong the password really is.  Ok, maybe I&#8217;m getting a little carried away just for a freebie password utility, but I have to say that it has made coming up with new passwords much more enjoyable.</p>
]]></content:encoded>
			<wfw:commentRss>http://themorgue.org/blog/2007/10/28/the-coolest-application-youve-never-heard-of/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
