Friday, June 08, 2007

New Linux Command (tcpdump)

From the man page:

Tcpdump prints out the headers of packets on a network interface that match the boolean expression.

Example:

tcpdump -i eth0 -n dst port 389 and not src host 192.168.1.50

Dumps all traffic to port 389 that is not from ip 192.168.150

Awesome.

Tuesday, June 05, 2007

Book Review: The Pragmatic Programmer


This is one of the best books I've ever read on being a "Professional Programmer." My two favorite parts of the books are the "Goals" section in Chapter 1, and the final paragraph of the book.

Goals
-----
* Learn at least one new language every year.
* Read a technical book each quarter.
* Read nontechnical books, too.
* Take classes (or go to trade shows)
* Participate in local user groups.
* Experiment with different environments.
* Stay current. (Read magazines / journals)
* Get Wired. (RSS Feeds, News Groups)

The final paragraph sums up what the book is all about:

We want to see pride of ownership. "I wrote this, and I stand behind my work." Your signature should come to be recognized as an indicator of quality. People should see your name on a piece of code and expect it to be solid, well written, tested, and documented. A really professional job. Written by a real professional. A Pragmatic Programmer.

Thursday, May 24, 2007

Vista Ultimate

My beta for Vista is finally expiring at the end of this month, so I decided to re-install my OS this week. I decided to install Vista Ultimate. Although my fellow geeks were pushing me towards Ubuntu I just couldn't make the switch.

First, an operating system is only as good as the applications that are made to run on it. Windows still dominates in this area. The applications made for Windows are just better, period. Don't argue with me, you know you are wrong.

Anything I've ever needed to do on a Linux machine can almost always be done via SSH. So I have no compelling reason to make the switch. I don't have some burning desire to see Microsoft lose the OS war. I think they will continue to dominate for a long time because of my first point above.

And let's not even get into the whole driver issue. Everything just works on Windows (OK, except for my old wireless card), but at least I don't have to install a new video card and I can print in color.

Thus far, I've installed the following applications:
1. Putty (SSH), have to have, it's awesome, I wish it had tabs though
2. AIM (the real one, not GAIM) The latest version is awesome. I even figured out how to turn off those annoying exploding smileys.
3. Firefox (it's just faster and better than IE)
4. Microsoft Office Trial, MS Office kicks butt compared to Open Office (don't argue with me, you know you are wrong), plus I need to test Outlook 2007.
5. Programmer's Notepad, after all these years Microsoft still has the worst text editor out there.
6. Paint.NET, I use it for cropping images

And finally, I think Windows is every bit as stable as any other OS out there. I've never had problems. I think people that do have problems usually have some other type of issue such as hardware or bad drivers and they don't know how to investigate it properly.

So, for all you Mac and Ubuntu users, give me reasons that your OS is BETTER than (not "as good as") mine, and maybe I'll consider not activating this copy of Vista. I doubt you can do it. ;)

Friday, May 11, 2007

Adding Using awk

Today I had a need to take a file that was formatted like:

40.00
34.00
100.50
...
3902.00
50.00

and add up all the numbers. The file was huge so I didn't feel like opening it with Open Office. I knew there had to be an easy way to do this without leaving my shell in Linux. So after about 5 seconds of Googling I found this little gem:

awk '{x+=$1} END{print x}'

Works like a champ:

13300.8

Tuesday, April 24, 2007

How important is email?

I saw this fact on ClarkHoward.com today:

According to Information Week, three-quarters of people say that e-mail is essential to their lives. When asked what that means, 40-50% say they prefer e-mail to chocolate, coffee and TV. And, 60% spend more time sending e-mails than they do on the phone. 15% say they would rather lose their spouse than not have access to e-mail.

I guess I'm in the right business. :) But seriously, give up your spouse? Now that's pretty bad!

For me, checking my email is usually the first thing I do when I wake up, the first thing I do when I get to work, the first thing I do when I get home, the last thing I do before I leave work, the last thing I do before I go to sleep.

If I'm on a trip it's the last thing I do before the plane takes off, the first thing I do when the plane lands, the first thing I do when I get to the hotel, the last thing I do before I check out, and I'm constantly checking my email on my handheld.

And I know I'm not alone, I would even say that my spouse is worse than me. ;)

Book Review: Summer of '49


Pulitzer prize winning author David Halberstam passed away on Monday. I've only read one of David's books but it was fantastic. I'd like to read more because Summer of '49 was an amazing book that any Red Sox / Yankee fan must read.

More on his work can be found here:

http://www.amazon.com/gp/blog/post/PLNK2LRO9IXJLGKO6

Wednesday, March 21, 2007

PHP Performance

We've been working hard the last few days to squeeze every ounce of performance out of our PHP code. This article from Linux Journal was especially helpful:

http://www.linuxjournal.com/article/7213

Also, if you haven't seen George's slides on PHP performance, check them out:

http://www.schlossnagle.org/~george/talks/ZendPerf.pdf

Tuesday, March 13, 2007

Life Insurance 101

Making sure my family is taken care of if I kick the bucket unexpectedly is important to me. Keeping my life insurance policy updated is one of the major steps I can take to make sure this happens. But I'm never sure which type of policy (term vs whole), the amount, or the length of a policy I should buy. I trust my life insurance agent, but I like to do a ton of research on my own. So I find consulting my financial advisor very helpful. His advice on life insurance can be found here, very useful stuff, highly recommended.

Wednesday, March 07, 2007

Book Review: The Ultimate Question


French fries or baked potato?

Khakis or Jeans?

Do I really need to do sit-ups today?

These are all questions I struggle with on a daily basis but none of them are “The Ultimate Question.” The Ultimate Question is a powerful, yet simplistic approach to achieving profitable growth. The book does a great job explaining why customer satisfaction and loyalty is so important and how it will ultimately lead to true growth. Definitely a book the entire organization should read.

Monday, March 05, 2007

Open Files

lsof -p process_id | wc -l

is just way too slow sometimes, I finally figured out a faster (and more accurate) way to quickly get a count (or list) of open files.

ls -l /proc/process_id/fd/ | wc -l

Thanks to http://www.netadmintools.com/art295.html

Saturday, February 24, 2007

Running Version 2

I finished my 10 week running plan over a month ago. I've been slacking since then, but today I'm going to pick it up again. I'm going to start training for that 5K I have to run at some point this year. My 10 week plan worked out great. It wasn't too hard, I had more mental issues than physical. Here is the plan for the next 6 weeks:

Week M T W H F S S Total
1
2
2
2
6
2
2.5
2.5
2.5
7.5
3
3
3
2.5 2 10.5
4
3.5
3.5
3 2 12
5
4 2 3.5
3.5 2 15
6
4
2
2
8

Monday, February 19, 2007

Book Review: Inside Intuit


This book is one of the most fascinating, intriguing, and entertaining books I've ever read. Every entrepreneur should get a copy of this book. Intuit went through all of the stages a startup company might imagine including an epic battle with Microsoft. Software developers will love all of the great stories about the challenges and hard work that it took to make Quicken and the other Intuit products so successful. Service oriented companies will love to hear about how this company truly valued their customer's and their feedback. Management will love to hear how they acquired companies, raised money, and were almost acquired by Microsoft. A truly amazing story about a startup who beat all odds.

Wednesday, February 14, 2007

Why Code Reviews Are So Important

Yesterday I spent five hours participating in a hard core code review / bug fix session. The code we were reviewing was rather small, but there were a lot of cases to test. Code reviews can be structured in many different ways, but we took the following approach:

1. Review the functional specification to understand the goals of the project
2. Run a few preliminary test cases to make sure the product met the goals
3. Compare every screen to the designs to make sure they were 100% correct (right fonts, colors, wording)
4. Fix bugs on the spot. This was the most time consuming part, but I'm glad we did this right away, avoiding having to hold another session the following day.
5. This project was primarily modifying existing code to add additional functionality. This means that we can use trac in combination with svn to review only the changes made to each file. This makes the code review process very thorough and very fast. Trac does a great job color coding differences and we were able to find a dozen or so typos and bugs simply from looking at the trac diffs. We fixed the bugs right away, committed the code, and repeated the process.
6. After we finished fixing all of the bugs we went through a more thorough testing of the entire application to make sure we didn't break anything and that all of the bugs discovered were indeed fixed.

Overall I was very pleased with the results. The code review not only produced many bug fixes, but it emphasizes the importance of good coding, documenting your code, and being able to work with others.

Wednesday, January 17, 2007

Book Review: Blue Ocean Strategy


I'm posting this one rapidly in hopes that I can cover up my last post before anyone sees it. :) "Blue Ocean Strategy" is a very thought provoking book that puts structure behind strategic planning. It reminds me a lot of "Purple Cow" type of thinking and is definitely worth a read. My only real complaint is the authors don't make the book all that exciting or entertaining. It did a good job putting me asleep on more than one occasion.

The sub-title of the book is "How to Create Uncontested Market Space and Make Competition Irrelevant." The focus of the majority of the book is strategies for discovering your Blue Ocean. I liked their ideas on how to put a process around strategic thinking.

Damn, too late, AMartin is already on my case for the Martha post.... :)

So, what is a Blue Ocean? Just think about how instead of one-upping your competition with the next big feature, how can you make the competition irrelevant by creating a new market space where there is no competition. For example, "Curves for Women" created a new type of health club aimed at the millions of women who hated working out at home, but also hated spending hours at a high priced, intimidating health club. Typical health clubs want you to spend a lot of time there, spend a lot of money, and use equipment that is complicated. On top of that, there are a ton of bulky guys there starring. Curves created a new environment that had equipment that was easy to use and didn't require a lot of time to workout. Curves made regular health clubs and home workout equipment irrelevant by moving into this uncontested market space.

Damn, second comment on my blog, I can tell I'm in trouble so I'll go ahead and post this one!

Book Review: Martha Stewart's Homekeeping Handbook


The sub-title of this book is "The Essential Guide to Caring for Everything in Your Home". I think the key word in that statement is "Everything". This book is huge and covers every topic you could ever imagine with regards to caring for your home.

I'm sure I will get a hard time from some of my co-workers for even picking up this book, much less reading it from cover to cover, but I am definitely a huge Martha fan after reading this book.

A word of warning though, this book reads like an encyclopedia. Martha has a lot of talents, but don't expect her to crack a joke or two when discussing the proper way to clean your sink.

You can see why Martha has been so successful in her life (going to jail aside), she doesn't do anything unless she does it 100%. Anything worth doing is worth doing right, even if it is cleaning a toilet, you should know the right way to clean it. Another lesson from the book that can be applied to any area of life is being organized. It's amazing how much better you feel after you clean and organize a room in your home. Over Christmas break I spent almost a full day with Velvet organizing our garage. It's gone from being an eye-sore to my favorite room in the house.

Being a home owner (well, the bank technically owns it, but in 26 more years it will be all mine) I want to do everything I can to maintain my home and make it a place where I enjoy returning to after a long days work. I learned a lot from reading this book and I would recommend it to anyone.

Friday, December 29, 2006

Book Review: The 22 Immutable Laws of Marketing


This book is on Joel's reading list and was occupying space on Pat's bookshelf so I decided to steal...errrr...borrow it for the week. Working for a company that is heavily driven by marketing, it's important for me to learn as much as possible on the topic. This is the second book I have recently read on marketing. The first was “The Purple Cow” written by Seth Godin. I found both books very good and hard to put down. This book is a little more outdated in terms of the examples that it provides, but is nonetheless a great book. As I was reading the first few chapters, I had the urge to argue in my head the validity of the laws. But after reading the entire book I understand now understand each law and I would argue that each one is indeed immutable.

2007 Goals

The end of 2006 is only days away and I've done a good job accomplishing many of my 2006 goals. Looking back, I'm very pleased but some goals were rather unrealistic, some were just not easily measured. So this year's goals are going to be more measurable. I have also broken out my personal goals and my work goals. My work goals are posted on the door to my office.

My personal goals are as follows:

1. Read for at least 30 mins every day.

2. Run the Draper Mile in under 6 mins.

3. Run a 5K.

4. Do abs three times per week.

5. Bench press 250 lbs.

6. Spend at least 30 mins cleaning the house every day.

7. Try to force myself and my kids to eat at least 1 vegetable every day.

8. Get my weight to 175 pounds.

One of my work goals is to work at least 60 hours every week. Looking back over the last year, I've averaged 51 hours per week. That's just not good enough. So I've laid out a plan to workout less, work more from home and on weekends, and sleep less. If I stick to the plan I shouldn't have any trouble fitting in an extra 9 hours. And since football season is over there is really no reason to even have a TV, so no more TV for me either.

Hopefully all of this will still leave me plenty of time to spend with the kids and most importantly, Velvet. ;)

Sunday, December 24, 2006

Bench Press Results

Friday was the last day of my 12 week workout. I can't believe I started that workout in September. The end result is that I was able to complete each workout successfully, except for the last week. The last week I benched 205 pounds 2 times on the first set, which would put my max at 217 pounds. Seventeen pounds over my goal for the year. 225 is still my nemesis...I'm taking a week off but I'm determined to get it in 2007!

Friday, December 22, 2006

Book Review: User Interface Design for Programmers


The book is written by Joel Spolsky (www.joelonsoftware.com) who provides an entertaining look at user interface design from a programmer’s perspective. Joel is good at seeing things from both a non-technical and technical perspective. He provides some great guidelines in this book, which for the most part I agree with 100%. The book could be updated to reflect a lot of the changes that have occurred over the last few years in the area of web development. The non-web parts of the book are excellent though, and I would recommend this book to anyone who builds user interfaces. The book stays focused on usability and not “use this color and this font” type of issues. The book is not for designers, it’s for programmers, but even designers could learn a thing or two from reading this book.

My two favorite quotes from the book are:

“A user interface is well designed when the program behaves exactly how the user thought it would.”

and

“Usability is not everything. If usability engineers designed a nightclub, it would be clean, quiet, brightly lit, with lots of places to sit down, plenty of bartenders, menus written in 18-point font sans serif, and easy-to-find bathrooms. But nobody would be there. They would all be down the street at Coyote Ugly pouring beer on each other.”

Thursday, December 14, 2006

Book Review: First, Break All The Rules


This book was recommended by Pat and it is based on an in-depth study of over 80,000 managers. The book's title says it all, the world's best managers are not afraid to break every rule held sacred by conventional wisdom. This book is one I would recommend to anyone who is in a management position. As I was reading this book I jotted down several notes and the page numbers for reference. I plan on going back through these notes and making a detailed summary of this book so that I can refer back to it often.

If I had to summarize the book with a picture, I would steal the one from Appendix A, which is summarized in text as:

  • Identify the strengths of every employee

  • Based on these strengths, find the right fit for each employee

  • The right people in the right roles with the right managers drive employee engagement

  • Engaged employees drive customer loyalty

  • Loyal customers drive sustainable growth

  • Sustainable growth drives real profit increase

  • Real profit increase drives stock increase

I strongly encourage everyone to read this book, even if you don't manage people.