Showing posts with label christmas. Show all posts
Showing posts with label christmas. Show all posts

Friday, December 25, 2015

Merry Christmas!

This will be a short post today, and contain no significant content. I figure everyone will probably be doing something more important that reading my blog today, Christmas 2015.

Anyway, I hope you read and enjoyed my Amphibian.com version of A Christmas Carol. In the end, today's comic, the CEO frog decides to never give thoughtless gifts again. I feel like it's an important lesson for all of us today. But I was surprised to learn that it was an important lesson for us 100 years ago - a lesson that NO ONE LEARNED!

That's right, over a hundred years ago Eleanor Robson Belmont started the organization known as SPUG - the Society for the Prevention of Useless Giving. It was a response to what was seen as wasteful spending on gifts for the sake of gifts at Christmastime. Sound familiar? I guess some things never change. SPUG got a lot of attention back in the second decade of the twentieth century, but the outbreak of World War I took the focus off of revolutionizing the way Christmas was celebrated. The Society doesn't officially exist anymore.

Maybe it's time for a comeback?

In any event, have yourself a Merry Christmas. I'll post again on Monday with some more progress on my platformer and we'll all play it and be joyous as we await the start of 2016.

Amphibian.com comic for 25 December 2015

Monday, December 21, 2015

The Gift of No Gift

Merry Christmas!

I hope everyone is looking forward to Christmas this Friday for all the right reasons. It's gotten difficult to teach my children that Christmas isn't about providing a list of expensive items that will be purchased for them in exchange for good behavior. The Santa-Industrial Complex is working hard to convince us all that we need to buy stuff for everyone we love this time of year.

The series of comics I'm running right now at Amphibian.com is my attempt to poke fun at this modern tradition. Last week, the Goat of Christmas Past reminded the CEO frog that no matter how good presents might seem, they don't last. Odds are, you don't currently have many (if any at all) gifts you were given as a child that are still valuable to you today. In today's comic, the Goat of Christmas Present shows the frog that too many people are giving gifts that aren't really needed. How many coffee mugs do you really use?

Please don't think I'm some kind of villain worthy of mention in a Dickens story. I don't hate the giving of gifts on Christmas. I am just suggesting that as a society we should take a closer look at our motivations. Why do we go crazy and spend $59 bazillion between Thanksgiving and Christmas each year? Is it because we've all lost the ability to show our love for each other without enlisting the help of Wal-Mart and Target?

There is an aspect of the gift-giving craze that I suspect few people stop to consider. Many people don't feel loved when they are receiving gifts. At least that's what Gary Chapman wrote in his book about the Five Love Languages. While there seems to have been little research done to confirm his theories, I've read it and it does seems to fit extremely well with my experiences. Some people feel love by receiving gifts. But a bunch of other people don't, or at least not as much. So if our goal at Christmas is really to show our love for each other, shouldn't we desire to do that in the way the recipient will most feel love? There's a good chance that won't be a gift.

But if we're really just buying gifts because advertising agencies have fooled us into believing that we need to in order to conform to the Christmas rules, maybe we should stop.

Just something to think about.

Amphibian.com comic for 21 December 2015

Wednesday, December 9, 2015

Christmas Decorations

Like the frogs of Amphibian.com, I have also been decorating for Christmas. My family's Christmas tree is adorned with ornaments collected over the years that have a special meaning to us.

This first one actually opens up. It originally had the engagement ring I gave to my future wife back on December 21st, 2001. Inside it today is still a little bit of the wrapping paper from the box.


We picked up this Union Jack ornament on one of our trips to the United Kingdom back before we had children.


I love this Pac Man arcade machine ornament. It plays the music from the game if you push the buttons. We got this back when I was buying classic arcade machines.


I picked up this rustic squirrel ornament on clearance at a Meijer store in central Ohio after Christmas. We used to travel there in January every year to celebrate post-Christmas with my mother's family. It reminds me of those trips.


I got this Octocat ornament from GitHub earlier this year with my winnings from the GitHub Game Off 2015. I've been waiting 9 months to hang this thing up!


There are so many more on the tree; I can't show pictures of them all. But they all have a story. Here's the big picture (the whole tree):


And let's not forget about my outdoor decorations...


That's all I have to share today. I know, two posts in a row with no code to share. It's a busy time of year. The frogs have been busy as well, so be sure to check out all their decorating work in today's comic.

Amphibian.com comic for 9 December 2015

Friday, November 27, 2015

More Features for your Jade Templates

If you've seen Amphibian.com today you might notice the Christmas lights hanging from the header. I wanted to decorate the site a little, but I was worried that I might forget to take them down at the end of December. I think I left the lights up on my house until March last year. It was really cold and I didn't want to go outside.


To prevent this from happening to my website, I decided to add some code which will check the date and automatically display the lights only during the Christmas season. Since the HTML for Amphibian.com is generated by the Jade template system and Express, conditionally including some lights could be accomplished by putting a date check in the template for the comic page. The problem? The check for the Christmas season is a little more complicated than I cared to cram into a Jade template. And Jade/Express doesn't provide any utility libraries by default that help in this situation.

Fortunately, it's rather simple to add your own modules that can be used in your templates.

First, I made a holiday module that I can use to determine if we are currently in the Christmas season.

module.exports = function() {

    return {

        /*
         * Returns a Date object that represents Thanksgiving (US)
         * for this year. The fourth Thursday in November.
         */
        thanksgiving: function() {

            var d = new Date();

            d.setDate(1);
            d.setMonth(10);

            while (d.getDay() != 4) {
                d.setDate(d.getDate()+1);
            }

            d.setDate(d.getDate()+21);

            return d;

        },

        /*
         * This function returns true during the Christmas season.
         * I define that as Thanksgiving through the end of December.
         */
        isChristmasSeason: function() {

            var monthToday = (new Date()).getMonth();
            var dateToday = (new Date()).getDate();

            return (monthToday == 11 || (monthToday == 10 && dateToday >= this.thanksgiving().getDate()));

        }

    };

};

This is a standard Node module that exports an object containing two functions. One returns a Date object for Thanksgiving in the current year. In the United States, Thanksgiving is the 4th Thursday in November, so the function finds the first Thursday and then adds 3 weeks. The second function returns true if the current date falls within the Christmas season. I have personally defined that as Thanksgiving (hence the need for the first function) through the end of December.

Now to enable this module in Jade templates, you just need to add it to the locals object in the Express app. Here's an example of how to do that with this particular module:

var express = require('express');

var app = express();

app.locals.holiday = require('./holiday')();

Any fields on the locals object are available in Jade templates. In my comic page template, I can now do do this:

doctype html
html
 include head
 body
  include header
  if holiday.isChristmasSeason()
   include holidayHeader
  div#comicArea
   include comic
  include footer
  include js

The holiday object can be used anywhere it's legal to use JavaScript expressions in the template. I use it in the if block to see if I need to include the special holiday header.

You can use this technique to add whatever module you want to locals and then use them inside your templates. While Jade is not perfect, this capability adds a lot of flexibility to the framework.

Please continue to enjoy this Christmas season by viewing today's comic, which is, appropriately, about the Christmas season.

Amphibian.com comic for 27 November 2015

Friday, December 26, 2014

What did you get for Christmas?

Another Christmas has passed and the new year will be here in a week. I still haven't had 2 minutes to write anything about the new JavaScript library I've been using off-and-on for the last few weeks, but hopefully that will change this weekend and all 3 of you that read this blog can be treated to that next week.

But let's take a moment to reflect on the gifts we've received for Christmas.

This year I got some coffee aged in oak barrels previously used to age Cabernet. I also got a stapler that looks like a frog.

When I was 12 years old, I got Visual Basic 3.0 (on floppy disks). That was an exciting Christmas. It was quite expensive at the time and I believe it might have been the only thing I got from my parents that year.

In 2001, I got two 15-inch LCD monitors from my girlfriend. I gave her an engagement ring that same year, and we've been married since September 2002. I would have given her the ring even if she hadn't given me the monitors.

Amphibian.com comic for 26 December 2014

Wednesday, December 24, 2014

Merry Christmas!

'Twas the night before Christmas...

Yes, it is Christmas Eve. I hope you have all your shopping done, if you're one of those people who buys gifts at Christmas.

My 5-part Christmas poem on amphibian.com wraps up today. I'll be spending this evening with my family in our traditional manner - pizza, Christmas Eve service at our church, and watching the Muppet Christmas Carol. The best film adaptation of Dickens' work, in my opinion.

The frogs will be back to their usual shenanigans on Friday, as will most of the world. I hope you have a Merry Christmas, and come back to read my blog when I return to writing about software development next week!

Amphibian.com comic for 24 December 2014

Wednesday, December 17, 2014

You Know, That Christmas Poem

Okay, so my comic up until Christmas Eve is clearly a parody of "A Visit from St. Nicholas." You may know it better as "The Night Before Christmas", which is not actually its title but part of the first line.

This classic poem, written by Clement Clarke Moore way back in 1823, is largely responsible for our modern ideas about Santa Claus. My poem will most likely have no cultural impact whatsoever. But it is a chance for us all to think for a few minutes about the level of effort required for Santa's operation to make it on time every year. To meet his requirements, Santa can't be up there in his workshop hand-assembling dolls. He needs to be an expert at managing a production line of impossible size, and use the most advanced techniques for both planning and execution. Knowing the current wakefulness state of every child on earth, their position on the naughty/nice scale, and their desired gift list at any moment is clearly a monumental achievement of data science that is the envy of everyone from Google to the NSA.

And we haven't even gotten to the whole delivery phase of the operation yet. Amazon can experiment with flying delivery drones all they want, but only Santa Claus has a team of flying reindeer out delivering packages at speeds which imply some sort of controlled distortion of space-time.

There's no company on earth that wouldn't like to send someone to Santa for training - he's clearly mastered things that the rest of us don't even know exist yet.

I'm not the only one considering things of this nature. As part of your Christmas preparations this year, be sure to read Are Santa’s Reindeer Used for Propulsion or Navigation?, in which an MIT graduate student delves into the interesting question using Moore's original poem as evidence.

Amphibian.com comic for 17 December 2014

Wednesday, December 10, 2014

The Christmas Song Lyrics You Never Knew

I'm feeling a bit under-the-weather today, so instead of a post about how to use some JavaScript technology or how to make a paper frog I'd like to help you with your Christmas songs.

Jingle Bells


I would have to suspect that you have never seen more than the first verse of this song. Few people know the rest of it.

Here are the complete lyrics:
Dashing through the snow
In a one-horse open sleigh
O'er the fields we go
Laughing all the way
Bells on bobtail ring
Making spirits bright
What fun it is to ride and sing
A sleighing song tonight!
(chorus)
Jingle bells, jingle bells,
Jingle all the way.
Oh! what fun it is to ride
In a one-horse open sleigh.
Jingle bells, jingle bells,
Jingle all the way;
Oh! what fun it is to ride
In a one-horse open sleigh. 
A day or two ago
I thought I'd take a ride
And soon, Miss Fanny Bright
Was seated by my side,
The horse was lean and lank
Misfortune seemed his lot
He got into a drifted bank
And then we got upsot. 
(repeat chorus) 
A day or two ago,
The story I must tell
I went out on the snow,
And on my back I fell;
A gent was riding by
In a one-horse open sleigh,
He laughed as there I sprawling lie,
But quickly drove away. 
(repeat chorus) 
Now the ground is white
Go it while you're young,
Take the girls tonight
and sing this sleighing song;
Just get a bobtailed bay
Two forty as his speed
Hitch him to an open sleigh
And crack! you'll take the lead. 
(repeat chorus)
The rest of the song isn't quite as catchy as that first verse, huh?

Good King Wenceslas


Now I'll share the words to one my favorite Christmas songs that isn't really even a Christmas song. Of course I'm talking about "Good King Wenceslas." You hear the music to this song all the time but rarely does anyone sing the words. It's not technically a Christmas song if you pay attention to the first line: "Good King Wenceslas looked out, on the Feast of Stephen." The Feast of Stephen takes place on December 26th, but I guess that's close enough. Also worthy of note, Wenceslas wasn't ever even a king in his lifetime - the title was bestowed on him after this death. Here are the words:
Good King Wenceslas looked out
On the feast of Stephen
When the snow lay round about
Deep and crisp and even
Brightly shone the moon that night
Though the frost was cruel
When a poor man came in sight
Gath'ring winter fuel

"Hither, page, and stand by me
If thou know'st it, telling
Yonder peasant, who is he?
Where and what his dwelling?"
"Sire, he lives a good league hence
Underneath the mountain
Right against the forest fence
By Saint Agnes' fountain."

"Bring me flesh and bring me wine
Bring me pine logs hither
Thou and I will see him dine
When we bear him thither."
Page and monarch forth they went
Forth they went together
Through the rude wind's wild lament
And the bitter weather

"Sire, the night is darker now
And the wind blows stronger
Fails my heart, I know not how,
I can go no longer."
"Mark my footsteps, my good page
Tread thou in them boldly
Thou shalt find the winter's rage
Freeze thy blood less coldly."

In his master's steps he trod
Where the snow lay dinted
Heat was in the very sod
Which the Saint had printed
Therefore, Christian men, be sure
Wealth or rank possessing
Ye who now will bless the poor
Shall yourselves find blessing
I don't understand why more people don't sing the words. I've always liked them.

Amphibian.com comic for 10 December 2014

Wednesday, December 3, 2014

What's Not on my Christmas List

I don't want a smart watch for Christmas. I don't want a new iPad. I don't want a new video game system. Or a 1TB SDD. Or pretty much anything else you would probably guess.

Much to the displeasure of my family, I rebel against the commercialism of Christmas. Corporate America does a pretty good job of convincing all of us that Christmas is about buying things for people. It gets more extreme every year. A few years back, I'd just had enough of it. I don't need anything. No one in my immediate family needs anything. There are many people in the world that do need things, but we don't know many of them. We spend all our time and money worrying about the people near us who most likely have few material needs.

No, I'm not some kind of Ebenezer Scrooge, sitting in my office counting stacks of coins and complaining about the Christmas season. I love Christmas, I just don't feel the need to celebrate it with consumerism. I want to celebrate it in a more appropriate way.

Here are my guidelines of Christmas gifts.
  1. When giving a gift, it should be something that the recipient either can't or won't buy for themselves. This could mean making something to give as a gift, but it can also mean buying something that the recipient would like to have but is too impractical for them to purchase on their own.
  2. Choose quality over quantity. My grandfather lived by this rule in everything. But at Christmas, a single thoughtful gift is worth more than a whole mountain of inconsequential junk.
  3. Try presence instead of presents. Is the giving of a gift the best way to show our love for another person? It depends on the person. Some people really respond to gifts, but others feel love more through quality time spent with them or acts of service done for them.
These are not just for me to follow when thinking of others - I want people to try this when they think of me as well.

Studies have shown that materialistic people are less happy (here, here, here, and here, for starters). Try my guidelines in your family and see if you have a happier and more meaningful Christmas.

Amphibian.com comic for 3 December 2014