Sunday, May 31, 2015

Requiem For A Stupid Idea

I have a dream

In 2012 I had a dream.  A dream that I could feign interest in my friends without actually doing anything.  And not just my friends. Colleagues. Acquaintances.  That lady my mom said was at my wedding.  In short, everyone I'm Facebook friends with.  "But", I thought, "how can I do this without expending any energy?  I know, I'll put weeks and weeks into developing an app to do it.  Then I can just sit back and reap the sweet sweet benefits of ... something ..."  And with that solid plan, I set off to work.

It's a stupid dream

My plan was to develop an app that would automatically send birthday messages to my Facebook Friends without my having to do anything.  My first problem was

Sunday, August 10, 2014

How to replace a CPU Fan

Replacing a CPU fan is probably the most fun thing you can do with your computer.  Ok, maybe not, but it is an occasional maintenance task that there doesn't seem to be too much detailed information about on the internet.  I recently had to replace one and here are the steps I took.

Sunday, February 9, 2014

For My Baby Boy

Declaration of Independence

When in the Course of human events, it becomes necessary for one baby to dissolve the umbilical bands which have connected him with his mother, and to assume among the powers of the earth, the separate and equal station to which the Laws of Nature and of Nature’s God entitle him, a decent respect to the opinions of mankind requires that he should wait exactly 40 weeks and one day and then cause his mama’s water to break at 9pm so as to make known that which impels him to the separation.

Tuesday, August 28, 2012

How those Spring @Enable* Annotations work

Spring's Java Config is a great way to configure your application without writing a lot of configuration code.  One reason is those awesome @Enable* annotations that let you magically set up things like Transactions (@EnableTransactionManagement), Spring MVC (@EnableWebMvc) or timed jobs (@EnableScheduling) with a simple class level annotation on your configuration class. These simple statements provide a lot of functionality but their machinations are fairly obscure.  On the one hand, it's great to get so much functionality for so little work, but on the other hand, if you don't understand how something works it makes debugging and problem solving much harder.  I couldn't find any posts or documents that covered how those annotations work so I figured I would write up one based on the research I did while debugging.  I don't work for Spring and I didn't write any of this code so please post any corrections or improvements in the comments and I'll update the post.

Wednesday, May 23, 2012

In Place Editor Custom Binding for Knockout.js

I recently discovered knockout.js and was totally blown away. It does a great job of removing the need for (most) DOM manipulations which lets you focus on your data model and get complex UIs running with a minimal amount of code.  That said, those complex UIs are by default made up of simple widgets (input boxes, buttons, etc) and if you want more complex widgets (date pickers, inline editors, etc) you need to either find them elsewhere or roll your own.  Ryan Niemeyer gives a great explanation of how to create a date picker (or any custom binding) and I quickly incorporated it into my own site.  Since I also needed an inline editor I figured I would post my results so others could reuse and improve upon them.  The following code is very much based on the Custom Bindings article referenced above and the Jeditable inline editor.

Tuesday, May 15, 2012

Euphemisms: When Good Words Go Bad

A euphemism is a nice way of saying something not so nice.  The problem with euphemisms is that the more successful they are, the more likely they are to take on the not so nice meaning of the thing they're trying to be nice about.  Once this reversal happens, they transition from a euphemism to a synonym and a new euphemism must be created.  It's an interesting quirk of language that a word or phrase can be intended to mean one thing and then become so popular that it comes to mean something entirely different.

Tuesday, May 8, 2012

Pagination with Spring MVC, Spring Data and Java Config

Spring 3.1 has a lot of features for limiting the boiler-plate code you have to write for common functionality.  One great example is pagination.  Getting paged data from a database and presenting it to the user is one of those tasks that everyone seems to reinvent even though it's common functionality that is never specific to your business.  Spring Data provides some facilities to add pagination to your application with a minimal amount of code.  The documentation on this is pretty good and it includes some steps on how to set up both in the data tier and the web tier.  Unfortunately, the documentation is unclear in a few places (see below) and doesn't explain at all how to use a Java Config.  This post tries to fill those gaps.