Saturday, October 18, 2008

17 Days: On The Benefits Of Comments

For those who aren't software developers, I'll explain the the word code. In the early days of computing, programmers wrote short, cryptic programs that were unreadable by anybody who wasn't highly trained. In fact, even highly trained people had problems reading programs written by other people. This unreadability led to computer programs being code, as if it was "in a code" that required decryption in order to be read.

Flash forward many years and things have changed. We now write long, cryptic programs. But, we still refer to the lines of computer programs as code. Things have improved slightly through the addition of comments. While most computer code is either declarative (specifies something about the program) or procedural (actually does something), comments are notes placed in the code that are intended to be read by a human. They don't do anything -- except make the code clearer.

Like most programmers, I didn't always have good commenting habits. My first large program was 2,000 cards (yes, punch cards) of assembly language with nary a comment. These days, I comment everything -- even when I'm building a one-person startup -- and I don't just comment code. For example, I comment Illustrator and Photoshop files when I'm creating artwork where I might not remember what I did or why.

Not everybody thinks that comments are valuable. I've been told that I shouldn't write comments because it slows down development. The argument is that code should be readable without comments and that it's faster to rewrite it from scratch later if there are problems than to write comments in the first place. Unfortunately, all code -- including my own -- isn't nearly as readable as the authors would like to believe. Sure, good variable naming and other things can help, but they don't substitute for comments explaining what's going on or why the code is written like it is.

Recently, I had a great example of the value of comments. I broke something that had been working before. What happened? There was a slightly complex chunk of logic that seemed to be failing. Fortunately, I had commented the code, so I knew exactly what it was supposed to do without having to remember the details or figure it out from context. When I looked at the comment and the code, it was clear that they didn't agree -- I had inadvertently deleted something while making an unrelated change.

Yes, I could have used the debugger and figured it out, but such bugs of omission are hard to find -- after all, the code that isn't there just isn't there. My comments turned a potential crisis into a 1-minute fix. And, whether you're building a startup in 30 days or you're taking a more leisurely pace, that's a good thing.

Moral of the story: Comment your code, even if it's just for yourself.

Friday, October 17, 2008

18 Days: Closing In On Group

As I mentioned, there are two key parts of Groupthink - group and think. For the past few days, I've been working mostly on group and I wish I could say I was done with it, but I'm not. The good news (I hope) is that group is harder than think.

And what's group? Group is the support for sharing and collaboration that underlies the data. It's the infrastructure I need to support the actual data and user interface. I'm on my third implementation and I might tweak it a little more after a discussion with Mike Koss today. I think I'm on the right track now, but Mike asked some good, tough questions and I'm going to take some time and think about it a bit more and make sure I'm not missing the boat*.

Similarly, over the last two weeks, I've had a lot of really good discussions with outside advisors and gotten some great advice. Every time I have a meeting, I learn about more things that I don't know! Sometimes it's daunting, but I wouldn't have it any other way. As Jamie Riche explained at Wednesday's Seattle Tech Startups meeting, it's better to learn the things that you don't know. And it's why I try to listen as much as I can in these meetings (though I know I also spend a lot of time explaining).

To everyone who's been giving me advice, thanks again.

[* One thing that's a bit frustrating about Google App Engine is the inability to run reasonable performance tests on database operations. When I have multiple ways of doing something with big differences in schemas and/or queries, I'd like to be able to have a definitive way of telling which way is more performant, and, basically, I can't. So, figuring things like this out means thinking hard.]

Thursday, October 16, 2008

19 Days: Lose the Landing Page

Last month, I started having UX Office Hours at StartPad. For four hours each month, I'm available for whoever walks in to get some free advice on the user experience of their product. It's UX, not UI, because we cover a lot more than just the interface --it's about improving how users experience the product.

Today, one of the people was Mark Puckett of KExplorer. It was immediately obvious that he had done a lot right. He'd built something useful and, unlike a lot of things I see, it was neither ugly nor cluttered. Well, not very cluttered. He started with a very simple question about a feature that he wanted to add and how should he do that. We expanded the question to how could the whole page be redesigned to not only make it work better but to make the feature fit in naturally. I think we came up with some good improvements and a good design.

After we finished with that, Mark offered to show me the home page. I was a bit surprised because I thought we had been looking at the home page. It turned out that the front page was a landing page -- an introduction to the site with a bunch of information on it. The information might even be useful information, but the fact that Mark skipped over it when showing me his site is an indication of the problem. The landing page is an obstacle. It's in the way from the portion of the site that is the most interesting and the most valuable. My vote: get rid of it. Take the content in that page that is useful and integrate it into the new home page -- the page that we'd spent most of the time discussing.

Groupthink has no landing page. When you go to Groupthink, you're ready to get started. After all, that's why you're there. There isn't a page extolling the benefits and a "click here to get started". You just get started, whether it's your first visit or your one hundredth. This doesn't mean the home page (or the first page a user sees) can't do some promotion -- frequently, you need to do this, and Groupthink's does, under certain conditions. But, if your home page is a "landing page," you'll have a lot of users land there and then go away. This isn't what you want.

Landing pages aren't always a bad idea, but I'm hard pressed to provide examples of where they're good. If you're even considering having a landing page, take a good hard look at whether it's the right thing for your site.

Update: Lose the Landing Page, Redux

Wednesday, October 15, 2008

20 Days: A Non Productive Day

Today I had three long meetings, several other distractions, plus I was one of the speakers at the Seattle Tech Startups meeting tonight. In between, I got a few hours of coding. In short, I did a lot, but it seemed like a totally non-productive day. Two observations:

  1. There are lots of way to measure productivity. I learned things at all of my meetings. And, each one might pay off in the future. So, it wasn't a waste of time, though it didn't help with my current deadline.

  2. I knew going in that this would happen. It's almost impossible to avoid non-productive days in any project. While you can't really schedule for such days (and I've certainly seen it tried), I think you need to take it in stride and move on -- and hope you don't have too many of them. Tomorrow, I'll be spending four hours in UX office hours at StartPad, so I'll just have to be super-productive the rest of the day.
At Seattle Tech Startups, I was one of the speakers on the subject of Public Speaking, but I learned cool things from both of the other speakers.

One of the things that Tom Music presented was the idea of "Speech Patterns" (like design patterns for public speaking) for planning a speech. I really liked the idea and will probably use it in the future -- I think it will work well with the way I plan speeches.

Jamie Riche of Ideal Communications described the Johari Window, a cognitive modeling tool that I had not heard of before, and discussed various aspects of giving and receiving feedback. Now I have an explanation for my desires to share and get feedback! I'm definitely going to have to read more about this.

Tuesday, October 14, 2008

21 Days: Fighting Office Apnea

As I've mentioned, I'm working at StartPad in Pioneer Square. It's a great co-working space that's also helping out the startup community in other ways, such as having monthly talks of interest to startups and monthly office hours, where you can show up and get help from an expert. I'm holding User Experience office hours this Thursday from 2-6 (stop by if you need some advice).

I'm in an office with three other people and today is the first day where all four of us are here at the same time. This means that the office apnea index is particularly high today. If you haven't heard the term Office Apnea before, it's because I just made it up. Apnea literally means "not breathing," but most people who have heard the word have heard of it because of sleep apnea, a condition where people stop breathing periodically while they sleep. Many people occasionally stop breathing briefly while they sleep, but people with sleep apnea stop breathing over and over again throughout the night.

In many offices, including today at StartPad, we all stop working over and over again throughout our workday. Just like sleep apnea can prevent someone from getting a good night's sleep, office apnea can prevent someone from getting a good day's work. Today, somebody mentioned something about the new Apple laptops. Somebody else asked for help debugging. Another person offered some development tips that they'd just learned. I'm as much a contributor as anybody else, so I'm not complaining about my office mates. And all the information is useful. Even without office mates, there are things like Twitter to interrupt you. Each of these interruptions can result in yet another moment of "what was I working on?"

Interruptions aren't the only problem. Many of us tend to work on multiple projects over a long period of time. We're constantly asking ourselves questions like "What should I be doing?" or "What's my top priority?"

Groupthink can't hope to get rid of those questions. But I am hoping it can help with the answers.


P.S. The vote was 4-0 in favor of JSON over XML, plus my own vote which was also for JSON.

Monday, October 13, 2008

22 Days: I Have A Lot To Do

I have a lot to do! Despite working a long day today, I have nothing to show for it. Well, sort of. Groupthink's UI relies extensively on AJAX, which basically means that JavaScript in the page talks to the server in the background. I have to get this stuff working first, but it's just not very exciting. I haven't yet decided if I'm using XML or JSON for getting data from the server (it's trivial to change from one to the other, just a change in a template). I'm leaning one way, but I'm interested in feedback from others.

I have a slightly modified XYZ statement, after some feedback:

Groupthink is an information manager for people working together that allows them to easily and efficiently organize their work.
I'm not completely in love with the term "information manager" because I think people may think PIM, but it's the best phrase I have so far. Again, feedback welcome.

And, on an unrelated note, one of the mantras for server security is "never trust the client." What this means is that, even with a smart client in the browser, any information that comes from the client is suspect -- it might be from somebody trying to deceive the server. Even a small, new service like Puzzazz isn't immune. I found out today that somebody was making up URLs on the server, trying to get it to reveal the solutions to puzzles they hadn't solved. Because of the way solutions are safeguarded, it didn't work, but, because it didn't occur to me that anyone would try it, they got a Server Error. It's now fixed and such invalid requests are simply ignored. Maybe they forgot to read the FAQ:
Can I cheat?
That's up to you. The only person whose fun you will be spoiling is your own. If you think you're cheating, then we recommend you don't.

Sunday, October 12, 2008

23 Days: Not Entellium

I have an unusual relationship with the people who are advising me on Groupthink: I listen to them.

Right now, Groupthink is just me, so I don't have a formal board of directors or advisors. But, I'm fortunate to have a number of friends who are giving me advice. Some has been solicited and some has been volunteered. I'll take it all. Advice from two of them affected what I'm doing by nudging me from two different directions. Good thing too -- my original plan was way too ambitious. And, as I mentioned Friday, another advisor nudged me to disclose what I was working on, which resulted in me finishing up my competitive analysis, my XYZ statement, and my story. That was good too. It gives me clarity, even though, as Mike Koss pointed out, it's got a long way to go.

Contrast this with Entellium, where they were lying to their board of directors. Entellium is an extreme case, but I think similar things happen all the time. Over the years, I've advised a number of startups - some listened to my advice and some didn't (and notice I'm saying "listened" -- you can listen to advice without following it). And years ago, I saw a company consistently lie to their board. It wasn't fraud -- it was just not disclosing some details about some problems -- problems that they could have used help with. Instead, the problems got worse. The day the board found out, the president (a founder and the largest stockholder) got fired. If you're not listening to your advisors, why do you have them?

So, when I write on this blog that I'm interested in feedback, I really mean it. And I appreciate the advice.