Archive for the ‘Lessons’ Category

March 1st, 2010

Lessons I’ve learned: Never delete anything.

I have learned a very hard lesson.

The quick version is that I wrote a bit of code that, instead of deleting a single record from a database, cleared the table in the database. Yeah, oops. And this script was tied to a button that any user of a web application might click. While this might sound like a great subplot to Lost, it’s terrible for a web site.

Twice. People clicked it twice, and emptied all of our data. I was able to restore a backup once. We lost a lot of hard-earned information.

We all write bad code. Why I’m truly kicking myself is that I elsewhere in the application I’d been using Active/Inactive flags (“Click here to delete this item” marks the “Active” field to 0. “Click here to restore it” marks the “Active” field to 1.) rather than deleting records. I should’ve done this for all of my tables. Why I didn’t was a snap decision while coding, and of course I now regret it.

So I’m determined to never delete anything. Or overwrite it without a backup. For example, in another web app that writes XML files, I’m copying the existing files to a folder with a time stamp before overwriting them.

People talk about how cheap web space is now, and how fast our server are. There’s no reason to ever get rid of data. This holds true for building web apps.

This is a new “best practice” for me. I keep a short list of rules so I will never make this kind of bad “quick decision” again.

June 15th, 2009

Lessons I’ve Learned: Delegate

As I’ve discussed a little bit before, I’m used to being and doing everything myself. This isn’t a “I have to do it all myself” instinct, necessarily. It’s more that I grew up an only child and never had to share. I think I got used to taking on different roles in any project I did (I’ll admit my parents helped a lot with that 6th grade science project about volcanoes). I have of course come to learn that being the only one responsible for all aspects of a proect can be bad, stressful and dangerous. Also there are often situations where you are simple expected to share the work load. I’ve learned that delegating can definitely be a good thing. Read the rest of this entry »

May 15th, 2009

Lessons I’ve Learned: Get sleep

Lessons I’ve Learned: After reading Dr. Maas’ book on sleep called Power Sleep a few years ago, I was convinced that there is good science and reasoning behind getting enough sleep. he’s a Cornell professor so who am I to disagree? He talks about how it takes a few weeks, but once you get caught up on sleep, you’ll feel better, happier, healthier and smarter. I was running myself ragged and felt like crap all the time. I was sick a lot. So it struck a chord for me. I worked hard to get caught up following his guide and I definitely experienced a huge difference for the better. And still do when I’m sleeping enough. There are exceptions, but I try. Read the rest of this entry »

April 15th, 2009

Lessons I’ve Learned: Think before you act

Lessons I’ve Learned: Everyday, all the little things you do, try to give a little thought to them before you do them. Ask what you will get out of it, and walk through the steps you are about to do. Nothing formal and it doesn’t have to be long. But being conscious about actions has helped me do a lot better work and make fewer mistakes.

I took me a really long time to develop this as a habit, but I’ve seen a huge benefit.

This goes for speaking, too, thought that’s a lot harder to develop as a habit.

March 15th, 2009

Lessons I’ve Learned: Play Monopoly

Lessons I’ve Learned: This is going to be different for everyone unfortunately, but learn how to be patient with money. For me, it took buying Monopoly for my iPod Nano and playing it on the subway. I didn’t buy it with the intent of it teaching me a life lesson, but it did. I found myself being more patient and more understanding with budgeting in my own life.

Whatever it takes, learn how to manage, budget, prioritize, and save money. Sometimes you don’t even have to do these things, just understand them and how to do them. And I only mean in a personal way, but doing it for yourself personally, which is simpler, helps you do it for a business, which is more complicated (if that applies to you).

Learn how to resist splurging, or else budget for it (this was really hard for me).

I also read Personal Finance for Dummies, How to Invest $50-$5,000, and a number of blogs that cover personal finance. I don’t read most of them anymore because I feel I’ve got a handle on the important parts. But it was great for a few months to have key points drilled into me daily.

Oh, and get out of debt. Now. Make it the most important thing. Seriously.