Twenty Three Weeks, Baby!

| | Comments (0)

It seems like Andy is a different baby nearly every day. Lately, he's been wanting to stand up. When you try to have him sit down, he'll stiffen his entire body. I've had to resort to burping him over my shoulder instead of the usual way -- across my lap. Its probably just a phase, he likes working on new skills for a while, until he's done it a few times, and then he'll move on to something completely different. I mean, I haven't seen him roll over in a few weeks. Oh he could if he wanted to, but instead he just likes rotating around on his play mat.

Strawberry Heads Forever

This weekend, I took care of him a lot more than usual. It's sorority season at the local campuses so Laura is away a lot. This means that I get to feed Andy all by myself -- a few bottles over the weekend, and today sweet potatoes. It's getting a lot easier. He'll take bottles with no problem at all now. And in fact, I'm starting to wonder if we need to move up to the 8 oz. bottles. I don't think I've filled him up with a bottle in a while.

Sweet Sweet Potatoes

Andy is going to have a long lasting fear of the Beauchamp's house, I think. We took him there for football, and he got really frightened every time we cheered. I can totally understand why. I mean, you're sitting in a room full of intently concentrating people, and at random intervals everybody jumps up and screams. It was way too much for my sleep deprived little baby.

An article at Salon today laments the lack of ubiquitous BASIC interpreters on today's computers. You see, back when the author was cutting his teeth on computers, he had to get down and dirty with "line-programming languages like BASIC" where he learned the basics of algorithms and how computers work.

I'm sure that this argument was made when he was learning BASIC by those who learned to program computers by flipping switches, and watched their programs light up flashing LEDs on the front panel. Yep, those were sure exciting times.

There's nothing magical about BASIC that can't be taught using other programming languages. I certainly don't advocate teaching children the language du jour, but the fundamental concepts of computing can be taught without having to resort to buying Commodore 64s on ebay.

Five Months

| | Comments (0)

Anderson loves to freak his father out. Yesterday I was taking care of him while Laura was off at a sorority event. The plan was to give him a bottle after his nap, and then put him down for his second nap after a few hours. Seems pretty easy right?

Well, his first nap was woefully short. Barely more than an hour (what happened to the 3 hour marathon naps!). I played with him on the play-mat for a while, watching V for Vendetta. He never really got too fussy (a good sign that he's hungry, or tired, or both) so after a while I decided to give him his bottle.

The last time I tried, it was an older bottle of breastmilk, and he refused to have any of it. This time? Yeah, he refused to have any of it. He makes some funny expressions while making his face immobile so he doesn't accidentally suck on the bottle. Well, they're funny to me anyway. He didn't seem to appreciate it too much. Eventually he went down for his second nap. I kept trying with the bottle, but no luck. Finally Laura came home and fed him -- 5 hours after his last meal.

Our theory is that most of the time he's just not that hungry. He likes to eat, because its comfy and he likes the closeness with his mother. But if he's not hungry, why eat something he doesn't really like.

The good news is, he didn't spit up from the small amount of formula that he did have. So, previously it may have just been some bad formula, or maybe we fed him too much. Still, I'd like to be sure that I can take care of him whenever Laura has to leave the house for a few hours. I have a feeling that if he was truly hungry he would've had whatever I was offering.

Happy 5 months Andy!

Sortable HTML Tables

| | Comments (0)

A while back I needed to make a sortable table. A quick search revealed sorttable, a javascript and CSS solution. This seemed to be exactly what I was looking for.

However, as I dug a little deeper into the javascript I realized that I was changing so much that a whole rewrite was in order. Since I had simultaneously discovered the fantastic prototype library, I decided to use it in my rewrite.

And thus, sortable.js was born.

This library can turn a table such as:

NameDate of BirthSalary
Smith, Jane01 April 1966$26000.00
Smith, John31 December 1970$35001.00
Appleby, Jackson01 January 1978$92500.00
Zacharia, Isaac13 May 1977$32000.00
$185501

To this:

NameDate of BirthSalary
Smith, Jane01 April 1966$26000.00
Smith, John31 December 1970$35001.00
Appleby, Jackson01 January 1978$92500.00
Zacharia, Isaac13 May 1977$32000.00
Total:$185501

To use the sortable.js library do the following:

  1. Add the javascript libraries:

    <script src="prototype.js"></script>
    <script src="sortable.js"></script>
    
  2. Mark the table as sortable:

    <table class="sortable">
        <thead> Header Rows always stay at the top. </thead>
        <tbody> ... </tbody>
        <tfoot> Footer rows always stay at the bottom. </tfoot>
    </table>
    
  3. Optionally define css style for sorted columns:

    <style type="text/css">
        .sortable thead, .sortable tfoot
        { font-weight: bold; }
        .sortable thead td 
        { 
            background:url( sortable.png ) center right no-repeat; 
            cursor: pointer; 
        }
        .sortable thead td.up 
        { background: url( sort-up.png ) center right no-repeat; }
        .sortable thead td.down 
        { background: url( sort-down.png ) center right no-repeat; }
    </style>
    
  4. There is no step 4.

Please note, sortable.js requires prototype 1.5.0, which at the time of writing is only available in release candidate form as part of the scriptaculous library. I hope somebody finds this library useful. If you have any questions or comments, feel free to send an email to kovax.org@gmail.com.