The Joy of Writing

I recently picked up an iPad mini to replace my aging iPod touch. I thought that the larger screen size would allow me more freedom for reading, typing, and general usage. The larger size is both good and bad. It is harder to carry around because it is bigger, but that extra screen size allows me to do something I never considered before: write.

I don’t mean just typing, or writing in the sense that you are creating words. I mean handwriting, with a stylus. It is not a new idea by any means, but it a revolutionary idea to me. I’m a little sad that it took me so long to discover, but now that I have found it I feel like doing more writing. I don’t think I’m going to try and say anything too profound; I just need to get the words out.

I’m looking forward to putting up a few more blog posts. I think I’ll start with why I love my iPad and stylus, and then see where it takes me. Talk to you soon.

No decimals in MySQL!

I ran into a snag the other night when running my Rails migrations on my production MySQL database. None of my decimal columns had any scale (decimal places)! This problem didn’t happen in development running sqlite.

I fixed it by running another migration that specified the precision and scale for each decimal column. However, I haven’t worked out the best way to deal with this. I’ll probably switch my development db from sqlite to MySQL, but how do I verify the columns are correct? I could write a test for each model that validated each value had decimals after saving, but then I have to remember to update the test when I add or change a column. I could query MySQL to get the column type, but that will only work for MySQL. There doesn’t seem to be a way to get the metadata from ActiveRecord, but I’ll have to look deeper.

Suggestions are welcome. When I finally do get something figured out, I’ll update this post.