Coding and Beer

Whatever's on my mind (usually tech and beer)

Archive for June, 2012

Building Dynamic Calendar in HTML

without comments

There is an awesome feeling that comes from building a dynamic calendar in HTML.  The steps:

  1. First you have to build a object structure (assuming you are using an OO language) to support the month, weeks, days, and content within each day.
  2. Then you have to instantiate the structure based on the month rendered and query the database and load the content within it.
  3. Of course, next comes the actual rendering of the calendar structure in HTML.  Use a table?  I started there, but then my friends laughed at me (not really, but I think they would if they had seen it).  I used the good old div tag.
  4. Last, you need to style it with CSS.  To me, this was the hardest part.  Getting the correct float and borders applied to make it look halfway decent was an hour exercise – this is one of my weaker areas I’m trying to improve.

It felt good to finish it and see the results.  I know it is relatively trivial to some degree, but still rewarding to see the results.

Of course, I wasn’t finished.  I had to add some flashy AJAX popup when the contents of the calendar are clicked.

Overall, I believe adding the calendar view of the data will make the application easier to use for most people.  Seeing data in lists works well, but sometimes when that data is date based, there is no better display than a good old calendar.

Written by Brian Russell

June 25th, 2012 at 3:24 pm

Posted in Development

No TV In Our House – Update

without comments

Well, it has been a few months since we decided to get rid of our DirecTV subscription and I thought it would be good to provide an update.  The title might be slightly misleading, we still have our physical TV, we only use it for DVD’s, Netflix, and games now.  We no longer subscribe to a traditional TV service like cable or satellite.

What’s changed?

  • It’s quieter around our house.  The TV isn’t always on making the house louder.
  • I’ve been doing more productive things around the house.  Family, yard, hobbies are getting more of my time.
  • I’m busy!  I don’t even know how I watched TV at this point.  I have been so busy doing stuff I just don’t know what I was doing before and how I fit TV into my life.
  • I’ve read several books.
  • I’m missing the Stanley Cup Playoffs.  I’m getting over this as it happens, but I do love hockey.  I can still go over to my brothers house to watch it if I want.  Maybe some of the last few games…

Overall, I recommend getting rid of the TV service.  You really don’t miss anything.  Actually, you experience a lot more because of it!

Written by Brian Russell

June 1st, 2012 at 3:21 pm

Posted in Home

I think I broke Visual Studio

without comments

I have been fighting a bad design for a few days now.  It felt like I was continuing to make trade offs I wasn’t happy with.  What the hell, it’s Friday and I’m a bit squirrely … time to do some serious refactoring.  I completely changed the interface to my state machine and at the same time redesigned the database to make sure I couldn’t build my project for another day our two.

Visual Studio keeps lying to me saying I only have 50 errors.  We both know that I have hundreds more than that to get through…

Even with the big error list, it is the right thing to do at this point.  I will come out on the other end with a more flexible and maintainable design.  Getting excited again after feeling bogged down over the last few days.

Written by Brian Russell

June 1st, 2012 at 3:10 pm

Posted in Development