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.
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!
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:
| Name | Date of Birth | Salary |
| Smith, Jane | 01 April 1966 | $26000.00 |
| Smith, John | 31 December 1970 | $35001.00 |
| Appleby, Jackson | 01 January 1978 | $92500.00 |
| Zacharia, Isaac | 13 May 1977 | $32000.00 |
| $185501 |
To this:
| Name | Date of Birth | Salary |
| Smith, Jane | 01 April 1966 | $26000.00 |
| Smith, John | 31 December 1970 | $35001.00 |
| Appleby, Jackson | 01 January 1978 | $92500.00 |
| Zacharia, Isaac | 13 May 1977 | $32000.00 |
| Total: | $185501 | |
To use the sortable.js library do the following:
Add the javascript libraries:
<script src="prototype.js"></script> <script src="sortable.js"></script>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>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>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.






