Learning by Doing
The tool is pretty simple, you enter in the baby’s due date into a text field and then it shows you how big your new baby is that week. I leaned on jQuery UI’s Datepicker widget to limit the available dates to the next 36 weeks. We start at 4 weeks because any earlier than that the baby is too tiny to really compare. The due date gets normalized and passed as a URL parameter to the next page. From there I created a render function, so that people can skip ahead or go backwards without having to refresh the page. All the data is stored in an associative array and the final touch was mapping the left and right arrow keys to allow for easier navigation between weeks. It’s all in the details.
Nothing crazy or super complex, but I learned a lot along the way.