Useless Comments

I ran across a rather cryptic piece of code today but luckily it was commented:

// This cause me 2+ days of debugging work

Seriously though, this is less than useless – it is counterproductive. The comment does nothing but state an irrelevant fact that has nothing to do with the code. Instead, a useful line or two explaining what the code did and, more importantly, why it did it, would save me the same two days of debugging work that are likely to follow.

If you write a comment anywhere, anytime make sure that it:

1. Is relevant

2.  Explains WHY

3. Possibly explains what is happening – this won’t be needed in most cases if the WHY is explained well enough


2nd Charleston SC JUG is History

This is a re-post from the Charleston SC JUG site

We had our second users group meeting last night and had a small but great event. We had Chuck Peterson and Mark dos Santos from BEA join us and talk about virtualization, how it affects java applications, and some of their solutions for improving it. While it was a sales presentation, it was a highly technical one, chock full of interesting information about how virtualization works, how it interacts with the JVM, common problems with it, and ways of eeking quite a bit more performance out of it.

I blame myself for the small turnout. There was an event at my work that conflicted that I was unaware of and I didn’t do a great job of championing this meetings due to my new baby and my recent injury. I plan on doing a better job next time.

So along these lines, here’s what I am looking for in the community:

1. Someone to help champion the group and get the word out

2. Someone to help find corporate sponsors to fund meetings.

This can be two different people or the same person and you can devote as much or as little time as you want. If you are interested, contact me.

P.S. Thanks again for coming to speak with us, Chuck and Mark.


Book Review: Stylin' with CSS

I feel that I must first disclose that Stylin’ with CSS was written by someone I work with. That said, I don’t feel that our work relationship swayed my opinion in any way.

I have been doing web development for a long time now and have played around with CSS quite a bit over the years. I can get a lot done with it but have always found that there were certain points that I would get to and just spin my wheels. When I change one property, something else stopped working. When I fixed the something else, the original change broke again. After reading this book I now understand why.

4172k6q3y7l_sl500_aa240_.jpg

The first handful of chapters go over the way CSS works, its structure, and how browsers go about rendering it. An extremely important part of this is the explanation of hierarchies and relationships between elements. These chapters also focus on the different types of major elements, block and inline, and go into details about how each work. The remaining chapters go over things like how to achieve different layouts and effects and how to create reusable components. In addition to examples in the book there are a number of libraries that can be downloaded from the book’s website that will allow you to quickly recreate any effects in the book with minimal duplication of code.

If you have never heard about or touched CSS, buy this book. If you have just a little bit of web experience and want to learn more about CSS, buy this book. If you have a fair amount of web and CSS experience, consider buying this book. If you don’t know everything about CSS but are very comfortable using it, this is likely not the book for you.