Musings on software development and life at Google

Author Archives: Kevin Pang

About Kevin Pang

ASP.NET Developer. ALT.NET Supporter. Pragmatic Programmer. Published Writer.
Test

There are a couple of ways to get a split view in Visual Studio.  Both are incredible time savers that I use daily.  The first is one that most developers will be aware of, but the second seems to be one that many do not seem to know about.

Viewing Two Files in a Split View

Let's say you have two classes you want to compare side by side:

Move your mouse over the Class1 tab and click and drag to anywhere on the window.  When you let go, Visual Studio will prompt you on whether you wish to open a new horizontal tab group or a new vertical tab group:

As you might expect, a new horizontal tab group will split your screen horizontally, and a new vertical tab group will split your screen vertically.  For most developers, I would say a horizontal split makes more sense so you don't have to scroll to see the end of your lines:

This is a very convenient way to compare and edit files side by side.  I have seen several developers take advantage of this feature and it's a great alternative to switching back and forth via the tabs or keyboard shortcuts.

Viewing the Same File in a Split View

What I haven't seen many developers take advantage of however, is a technique I use nearly as often: splitting the same file in Visual Studio.  Let's say you have a single file that is relatively long:

If you want to compare code from one section of this file to another, normally you would have to set bookmarks or just manually scroll back and forth to see both sections of the code.  However, if you hover your mouse over the region right above the scroll bar, you will notice your mouse icon changes from the pointer to the vertical resize tool:

Now if you click and drag down, you'll get a split view of your current file!

Both sections of the split view are editable and will update each other in real time.  When you're done, simply drag the divider all the way to the top and you're back to the normal view! 

This feature comes in very handy when you have long functions or classes and want to compare sections of the code (e.g. reviewing object instantiation before using the object, looking over similar business logic that you want to mimic, etc.).  This feature is available in Visual Studio 2005 and 2008 (and possibly earlier versions, if anyone can confirm please let me know).

Test

This post is to announce the release of Blunt Architecture, a lightweight web application framework built on the ASP.NET MVC framework.  My hope is that the Blunt Architecture project will help developers new to ASP.NET MVC get their feet wet by providing them a solid foundation to build upon. I know that for me, having a lightweight sample project to play with always speeds up the learning curve.  As always, your comments are welcome, so please let me know what you think.

To start playing with the bits immediately, the source code is available here, or you can checkout the latest version using Subversion at http://bluntarchitecture.googlecode.com/svn/trunk/

To learn more about Blunt Architecture, read on.  The following is taken from the project documentation:

Introduction

The Blunt Architecture project is a lightweight web application framework showcasing ALT.NET best practices such as:

  • Domain driven design
  • Test driven development
  • Inversion of control / dependency injection
  • Model, view, controller

The Blunt Architecture project is based off of the S#arp Architecture project. Where the Blunt Architecture project differs is that it is meant to be used as a learning tool rather than a ready-for-production framework. Because of this, the Blunt Architecture project strives to avoid outside dependencies wherever possible. This allows the user to focus his or her attention on the concepts presented without the added distraction of also having to figure out the syntax and details of third party tools. Although this constraint causes certain tasks to be more tedious (e.g. object relational mapping, dependency injection, etc.), it should make the project more approachable to users unfamiliar with the third party libraries commonly used for simplifying the implementation of these concepts (e.g. NHibernate, StructureMap, etc.).

The overall goal of the Blunt Architecture project is to present ALT.NET best practices in the easiest manner possible while allowing the user the flexibility to plug in whatever third party libraries they wish once they are comfortable with the framework.

Project Structure

The Blunt Architecture solution is divided into five projects which will be detailed below. The web application contains only two pages: a home page:

And a customer listing page:

As stated above, this is a very bare bones project so please forgive me for the lack of a nice style sheet and pretty UI.

BluntArchitecture.Controllers

This project contains the controllers used by the ASP.NET MVC framework to handle and respond to user input. Specifically, it dictates what happens whenever a URL is accessed. For example, in the HomeController class, the Index function below determines what happens when the user accesses the URL http://localhost/BluntArchitecture/Home:

This is a pretty boring function. It just sets the Title key in the ViewData dictionary which will be used by the master page to specify the title of the page, then returns the View (which will be the Index.aspx page found in the Home folder in BluntArchitecture.Web). This is all taken care for us by the ASP.NET MVC framework which you can read more about here.

The CustomerController class is a little more interesting:

You will notice here that CustomerController also has an Index function, but that it passes along an IList object to the view. This object will be used by the view to display customer information.

You will also notice that the customer controller has a private variable of type ICustomerDao, which is an interface defined in BluntArchitecture.Core that contains all the data access retrieval functions we need regarding customer information. This variable is meant to be set in the constructor of the CustomerController class, so it can be easily replaced by our unit test code (this is referred to as dependency injection). Normally, this injection would take place via a dependency injection tool such as StructureMap or Spring.NET, but in order to simplify the project we are defining a default constructor which will set the ICustomerDao object to an instance of CustomerDao, defined in BluntArchitecture.Data.

BluntArchitecture.Core

This is where we define our business objects as well as our data interfaces. Currently, the only business object is a simple Customer class:

As mentioned above, the data interfaces are also defined here. The reason we define the data interfaces here and not in BluntArchitecture.Data is to promote a separation of concerns between BluntArchitecture.Core and BluntArchitecture.Data. Because we specify the interfaces here, BluntArchitecture.Core doesn't need to depend on BluntArchitecture.Data. This has several benefits:

  • Developers are unable to sneak in data access code into the domain layer
  • The domain layer remains completely ignorant to how the data layer does its job. It only cares that the data layer implements the interfaces it needs. This allows us to switch out data layer implementation easily).
  • It allows us to use dependency injection to mock data access when testing the domain layer. This keeps our unit tests fast and dependable.

Here is our only data interface, the ICustomerDao interface which requires only one function to be implemented, GetAllCustomers:

BluntArchitecture.Data

This is where we define our data access layer. Currently, the only class defined here, CustomerDao, simply provides hardcoded results to the caller:

In a real application, this would be replaced with calls to a database or some other data store. How this is done is up to you (e.g. strong typed data sets, object relational mappers, etc.), just so long as you implement the interface. I specifically removed any decisions about data storage here to keep the solution as flexible as possible and to remove any third party specific requirements from the code (e.g. session management with NHibernate).

BluntArchitecture.Tests

This is where the unit tests go. Currently, the only unit test in place is the CustomerControllerTest. This unit test just makes sure that the Customer page can be loaded up and that it loads up the correct information from the ICustomerDao implementation. You will find a MockCustomerDao class that demonstrates how dependency injection can be used to create dependable unit tests.

BluntArchitecture.Web

This is where the front end of the application is defined. I won't go into how things work here as information regarding that can be found on [http://www.asp.net/mvc/ the official Microsoft ASP.NET MVC page].

Future Considerations

If there is enough interest in the project, I'd like to expand on this code base to show how to plug in third party libraries to speed up development (e.g. NHibernate, LINQ to SQL, Subsonic, StructureMap, Spring.NET, etc.).  Other than that I'm not sure I would want to add to the project as the motivation behind it was to keep it simple enough to function as an introductory sample. If you have any thoughts, I'd be more than happy to hear them.

Test

Joining Twitter was an intimidating experience for me.  I felt like the new kid in school where everyone had already formed into their own little cliques  The thought of tweeting about .NET development, or anything really, felt ridiculous when the only person following me was my wife. And while I still don't have many followers on Twitter, I have found that the experience became much easier once I started following twitterers who tweet often and take the time to respond to your replies.

Personally, I don't think I truly appreciated what Twitter had to offer until I witnessed one twitterer tweeting a tough programming problem he was stuck on, only to be flooded with solutions minutes after by his followers.  You just don't get that kind of instantaneous and interactive feedback from message boards, books, or Google searches.

With that said, here is my list of twitterers I think every ASP.NET developer should be following.  Please feel free to leave your suggestions for this list in the comments!

Scott Hanselman

Scott Hanselman

This one is a no brainer. Scott is a senior program manager at Microsoft and was one of the authors of the Professional ASP.NET 3.5 book.  His blog and podcast are both widely followed by .NET developers and his Twitter feed should be too.

Follow

Phil Haack

Phil Haack

Another no brainer.  Phil, like Scott, is also a senior program manager at
Microsoft in addition to being one of the leads on the new ASP.NET MVC framework and the creator of the open source .NET blogging engine, Subtext.  His blog is an excellent resource for .NET developers, especially those interested in the MVC framework.

Follow

Rob Conery

Rob Conery

Rob is the creator of SubSonic, an open-source object relational mapper that, in my opinion, is the greatest thing since sliced bread.  Rob was recently hired by Microsoft to work on the new ASP.NET MVC framework.  He is also the author of the MVC Storefront series, a series of video clips detailing his creation of a web-based storefront using the new MVC framework.  Like the rest of the twitterers on this list, Rob also updates his blog frequently.

Follow

Jeff Atwood

Jeff Atwood

The infamous author of CodingHorror, an absolutely ridiculously popular blog on programming.  Jeff doesn't post much on .NET development specifically, but he does offer very intelligent insight on programming with an emphasis on the social aspect of it.  He is also one of the creators of the much anticipated StackOverflow site.  His blog posts are always insightful, easy to read, and funny. Jeff is also a Twitter *fiend*.  He tweets constantly throughout the day and will respond to replies.

Follow

Jeremy Miller

Jeremy Miller

Jeremy is the creator of StructureMap, an open source dependency injection framework.  He's also an avid blogger whose posts are almost always informative.

Follow

Rick Strahl

Rick Strahl

Rick is a .NET developer whose blog always seems to be filled with useful information for normal developers.

Follow

Steve Harman

Steve Harman

Like Rick Strahl, another .NET blogger who I have followed for awhile.

Follow

Kevin Pang

Kevin Pang

I couldn't resist.  I don't work for Microsoft, I haven't authored any books, and I don't have an amazing open source project to call my own. But that doesn't mean I can't or won't.  I have been known for an occasional flash of brilliance and people seem to enjoy what few things I have written. If you follow me, I promise not to fill your twitter logs with drivel, which is more than I can say for a lot of twitterers out there. :)

Follow

Test

The following is challenge #14 in the dev102 series of programming interview challenges and my solution:

The question

Your input:

  1. List of points in a 2D space. If you draw lines between one point to the next one, a closed polygon is created (can be either concave or convex).
  2. A single point in a 2D space.

You need to determine whether the given point is inside or outside the given polygon.

My solution

Draw a ray starting at the given point that will intersect at least one of the edges of the polygon.  Run a simple intersect algorithm with this ray against all edges of the polygon.  If the ray intersects the polygon an odd number of times, then the point is inside the polygon.  If the ray intersects the polygon an even number of times, then the point is outside the polygon.

The reason for this is because whenever you cross an edge of a polygon, you are either entering it or leaving it.  Since a polygon cannot be infinitely large, the last edge the ray crosses must be one that leaves the polygon.  An odd number of intersections must indicate that the ray started from within the polygon because if the converse were true, that is if a ray with an odd number of intersections with the polygon were to have started from outside the polygon, then the final status of the ray would be within the polygon (e.g. 3 intersections -> entering, leaving, entering), which cannot happen.

As for what to do when the ray intersects the vertex of two edges of the polygon or when the ray lies right on the edge(s) of the polygon, I have no idea.  Pick a ray that doesn't do either of those. :-P

Test

When I graduated from college, I thought that I had a pretty firm grasp on what it would take to survive in the real world.  I had a solid foundation in the field of computer science and I was determined to immerse myself in my profession.  I kept up with the latest and greatest design patterns, development tools, frameworks, and programming languages.  I read books and blogs, listened to podcasts, went to conventions, and dabbled with open source projects as well as my own personal projects.  I had it all figured out…or so I thought.

Unfortunately, in my constant struggle to stay afloat in the sea of programming knowledge, I had neglected pretty much every other aspect of my life.  I could develop code for the core system of a financial institution, but I couldn't tell the difference between a W-4 and a 401(k).  I could describe heaps and stacks and the inner workings of a computer, but I couldn't tell you how to change the oil in my car.  I could combine open source, proprietary, and in-house libraries into an application, but I couldn't mix together anything more than hot water and ramen in the kitchen.  In the workplace, I felt at home.  But at home, I felt lost.

It wasn't until I met my future wife that I realized how many life skills I lacked (tip: knowing how to implement a black-red tree in pseudocode doesn't come in too handy when you're on a date.  Knowing how to cook a delicious meal on the fly does).  Lucky for me, she fell for me anyways, and as it became clear that we were going to be married I was forced to put aside my lust for all things programming and actually learn how to become a well-rounded, competant adult. 

The process was slow, arduous, and sometimes frustrating (mostly because I felt as if I had been inadequately prepared for life by both my parents and the educational system).  By no means do I consider myself a finished product (Beta at best…nowhere near a Release Candidate).  However, I think I have grown substantially since my lowest point (I once ate grapes covered with peanut butter for dinner because that was all that was left in my fridge).  The following is a short list of what I have learned how to do, how I learned them, and why I wish I had learned them sooner:

How to handle my finances

The majority of programmers fall into the group of middle-class earners.  We earn enough so that we can invest for the future, but not enough that we can ignore it and still come out ok. It's criminal how little our educational system teaches us about personal finances considering it is quite possibly the most important skill to have outside of our occupational trade (you can't invest if you don't earn money).  The numerous reports about our nation's negative savings rate as well as the current credit crisis shows that many of us do not grasp basic financial principals such as debt management and compound interest. 

The sad thing about this is that it's really not that hard.  When I first entered the workforce I came in with absolutely zero financial knowledge.  I had no idea what a credit report was.  I picked my 401(k) funds and contribution percentages out of a hat.  Even so, it only took a few months of casual reading to become proficient enough that family members come to me for financial advice.  I read a couple books, kept a few blogs in my RSS feeds, and lurked a few internet forums.  The information is out there and the subject matter is surprisingly simple once you learn to filter out the noise (e.g. Jim Cramer, Robert Kiyosaki).  Here are a few resources that helped me learn the basics of personal finance and investing:

  • Books
    • The Boglehead's Guide to Investing
      • Written by investors, for investors.  It's a very easy read and is a great starter book and covers everything from investing to insurance to estate planning.
    • The Four Pillars of Investing
      • Along the same lines as the Boglehead's Guide to Investing.  Another great starter book for learning the basics of investing.
  • Websites
    • The Boglehead's Forum
      • An internet forum where the authors of the Boglehead's Guide to Investing actually post.  I frequent this board a lot and it is an excellent place to get sound advice regarding anything financial.
    • Get Rich Slowly
      • A blog written by a normal guy who was drowning in debt a few years ago but has managed to slowly get himself out of debt by saving more and spending less.  His blog postings are informative and useful for everyday people who are looking for pointers in their financial lives that they can actually apply.

How to cook

Programmers tend to have a reputation for being Mac'N'Cheese eating,
Cheeto gorging, Mountain Dew guzzling machines.  I'm not sure when they started to phase out Home Ec from schools, but it certainly wasn't an option for me when I was in school.  Preparing, serving, and eating a delicious home-cooked meal is one of the most rewarding and joyful pleasures in life.  You are doing yourself a disservice if you cannot make at least one dish well enough to serve to company. 

Cooking your own meals also saves you a fortune.  For me, eating out for lunch and dinner every day adds about $10/day over what I would have spent had I packed my own lunch and cooked my own dinner (not to mention gas money for driving to restaurants and tips).  That's an extra $200/month I was paying before I learned how to make my own meals!  Painful.

As for cooking resources, unfortunately a lot of cooking knowledge comes from trial and error as well as osmosis from watching other people cook.  If you don't know anyone who can help you, The Food Network has a variety of programs that can provide lots of knowledge as well as inspiration.  If you're looking for recipies, check out Epicurious.

How to interact with people

I touched upon this briefly in my surprisingly popular post on metrosexual developers.  Like many programmers, I was not a very good "people person".  Some people swear by Toastmasters as a way to build their public speaking skills.  I can't say that any of those forced speaking clubs did anything for me.  What did help my people skills was improving my appearance.  With that came confidence and confidence is what people skills is all about.  Your mileage may vary.  Just know that e-mail, text messages, and poking people on Facebook can only get you so far in life.

How to take care of myself

There's really not much I can say about this that hasn't been said a countless number of times.  It's very simple.  Exercise and eat in moderation.  Get checked up routinely by your doctor, optomotrist, and dentist.  There is no excuse for ignoring any of these.  I regret that my health was something I took for granted when I was younger.  Luckily for me, I wisened up when I was still young.  All it took was the realization that somebody else would be depending on my good health in the future.

How to take care of my stuff

Aside from my computer, I really had no idea how to maintain the rest of my property.  My car went without an oil change and car wash for years.  My clothes were always wrinkled because I didn't know how to wash and iron them properly.  I couldn't fix a thing around the house.  Ignoring the fact that knowing how to take care of your property will save you tons money, it's nice to feel self sufficient.  When you can't take care of your stuff, you are completely at the will of those who can.  Anyone who has had to go without hot water while waiting for the plumber or take a cab to work because their car wouldn't start up in the morning knows that helplessness is a terrible feeling.  WikiHow and eHow are great sites that can help you learn the skills necessary to take care of your property.

How to have fun

I guarantee my last words on this planet will not be "I wish I could have written more code".  And yet for a good period of my life my actions indicated otherwise.  I would spend my working hours programming, then come home to read about programming and do more programming on the side for kicks. Now, looking back, I can't think of a single memorable moment for that time period.  It's all a blur to me.  There aren't any pictures or memories to enjoy.  I will probably regret this until the day I die. 

Do not miss out on your life because you were too busy developing.  Life is a journey that is meant to be enjoyed.  Alan Watts put it better than I could ever hope to:

Test

I recently stumbled across this gem of a "security question" when trying to access my wife's account over at Vanguard:

Seriously?  Her CURRENT best friend?  You mean she has to change her "security question" answer whenever she changes best friends?  Who in the world thought this was a good idea for a "security question"?  Actually, who in the world thought these "security questions" were a good idea to begin with?  The FDIC called for two-factor authentication a couple years ago to reduce the amount of account hijacking that was occuring due to the advent of internet banking.  Since then the "security question" + password model has become an industry standard, which would be great if not for one small problem: that this isn't two-factor authentication, it's one-factor authentication implemented twice.

A proper two-factor authentication implementation consists of verifying two of the following from a user:

  • Something s/he has (ID card, security token, cell phone, etc.)
  • Something s/he knows (password)
  • Something s/he is (finger print, retinal scan, DNA sequence, voice recognition, etc.)

Obviously, a user's password falls into the "something s/he knows" category.  Unfortunately, a user's "security question" answer also falls into the "something s/he knows" category.  And considering the questions are usually ones that any motivated hacker can get a hold of (e.g. what was your high school mascot?  what was your mother's city of birth?), it's not even a very strong implementation of the "something s/he knows" factor. I am baffled at how this managed to become such a widely accepted model. Why not just require two passwords if you're going to do this? A second password would be at least as secure as a "security question" answer. Or maybe three passwords would be more secure?  Or four?  Or however many it takes to make it too inconvenient for a hacker to even bother trying to hijack our accounts?

Kudos to those financial institutions (PayPal comes to mind) who are actually giving their customers proper two-factor authentication via security tokens.  Unfortunately, they are currently the exception to the rule.  Hopefully proper security models such as these win out over the security via annoyance model that the current status quo seems to be heading towards.

Test

As some of you may have noticed, I recently moved this blog from "lypang.com/devblog" to "kevinwilliampang.com".  The motivation for this was purely cosmetic as I got tired of seeing "/devblog" in all my url paths.

Since the new site's structure is identical to the original site's structure, the migration only involved making the following change to the old site's global.asax file (if you're wondering why I broke up the url, it was to prevent the code syntax highlighter from interpretting the "//" in "http://" as the start of a comment :-P)

protected void Application_BeginRequest(Object sender, EventArgs e)
{
    string oldPathAndQuery = HttpContext.Current.Request.Url.PathAndQuery;
    string newPathAndQuery = oldPathAndQuery.ToLower().Replace("/devblog", "");
    string url = "http:/" + "/www.kevinwilliampang.com" + newPathAndQuery;

    Response.Clear();
    Response.Status = "301 Moved Permanently";
    Response.AddHeader("Location", url);
    Response.End();
}

What this code does is trigger a 301 permanent redirect on any request for a page on the old lypang.com/devblog site.  It persists the requested path and query so that the redirection is seemless to the end user (e.g. a link to http://lypang.com/devblog/post/metrosexual-developers.aspx will 301 redirect to http://www.kevinwilliampang.com/post/metrosexual-developers.aspx). 

Obviously, for more complex sites and/or migrations this sledgehammer of a solution would not be sufficient.  In those instances, you would most likely be better off by redirecting to a static page and losing the path/query persistence or putting custom redirect logic on each individual page to ensure that they redirect properly. But for anyone who simply wants to move their website to another domain, this is a quick and easy way to do it.

Test

Like many other Firefox users, I recently upgraded to Firefox 3.  Unfortunately, when I went to install Firebug 1.2, I ran into this error:

Firefox could not install the file at
https://addons.mozilla.org/en-US/firefox/downloads/file/30423/firebug-1.2.0b3-fx.xpi
because: Unexpected installation error
Review the Error Console log for more details.
-203

The Firefox error console showed this:

Error: installLocation has no properties
Source File: file:///opt/firefox/components/nsExtensionManager.js
Line: 3849

After a bit of headscratching, I was finally able to resolve this issue by closing Firefox, deleting the following files from my profile (how to find your Firefox profile), then restarting Firefox:

  • extensions.ini
  • extensions.cache
  • extensions.rdf

I am still not entirely sure what the problem was, but that seemed to fix it.  Your mileage may vary.  Just thought I'd post this in case anyone else is having the same problem.

Test

I found out today that there is a little-known feature that lets you filter the DZone RSS feed.  For example, if you want to filter the feed to only receive top posts for the week, you simply add a "range" parameter to the feed:

http://www.dzone.com/links/feed/frontpage/rss.xml?range=top-week

Additionally, you can also sort the feed by the number of clicks instead of votes:

http://www.dzone.com/links/feed/frontpage/rss.xml?range=top-week&order=clickCount

I'm not sure what all the possible values are for these filters or whether more filters exist.  Just thought I'd throw it out there for anyone else who enjoys the DZone RSS feed but doesn't have the time to keep up with the volume of posts it generates.

Test

There once was a time when men looked good.  We dressed well, groomed regularly, and took pride in it.  It wasn't so long ago that suits, vests, and fedoras dotted the metropolitan landscape.  We styled our hair, shined our shoes, had straight razor shaves, and invested in signature accessories such as watches, belts, cufflinks, and ties.  Somewhere along the way though, we went from looking like this:

to looking like this:

Nowadays, we men just do not seem to be taking the time and effort to look our best, and for some reason many of us are proud of it.  "Look good without looking like you tried", has become the ideal to which we aspire (i.e. Brad Pitt or Johnny Depp).  Many of today's popular haircuts result in a rolled out of bed look.  Looking sharp for a night out on the town often consists of jeans, an untucked dress shirt, and a jacket.  With such a low standard of excellence, it's no wonder people waltz into work looking like slobs.

So, what does this have to do with software developers?  Well, despite the fact that most of us work in a stereotypical, isolated Dilbert/Office Space cubicle, I argue that there is still value in being well -groomed.  Although the benefits of looking good may not be quite as obvious as they are for more socially interactive positions (i.e. model or sales), they do, indeed, exist.

Career advancement

I've known developers who could code circles around their colleagues at their respective workplaces but were passed by for promotions time and time again.  Why?  Because they looked like garbage.  And because they looked like garbage,
nobody spoke with them outside of work.  And since nobody spoke with them outside of work, they lacked people skills.  And since they lacked people skills, they had trouble
interacting with clients.

This terrible chain of cause and effect is something you see a disproportional amount of in our field.  The simple fact is this: in order to advance in your career, whatever it may be, you need to add value to your company.  True, there is value in being a great developer, but there is more value in being a great developer who can also interact with existing clients and make presentations to potential clients.  Now, if all you want in life is to code in the same cubicle until you retire, then I suppose this does not apply to you.

Management

Management is not for everyone, but it is if you are interested in earning more money and advancing your career.  Like it or not, management is the next logical step for a software developer.  Once you have hit the point of senior software architect or whatever your company labels its highest ranking developer, there is nowhere else to go if all you bring to the table are your mad programming skills (unless you go solo in which case you become management by default).  In order to advance, you are going to have to join management.  Managers need to be presentable because their main duties revolve around dealing with people.  And fair or not, people make assumptions about you based on your appearance.  If you can't handle taking care of yourself, what is the logical conclusion a client is going to make about how well you are going to take care of them? 

Unless you are Steve Jobs, you are going to have a hard time being a good manager if you look like a slob.  Your employer understands this.  It does not matter how talented you are; management is more about people skills than technical skills.

Disposition 

Looking good gives you confidence.  When you feel like a million bucks you tend to stand up straighter, look people in the eyes more frequently, and smile more often.  As a result people listen to you more intently, give more weight to your opinions, and are generally easier to work with.  Developers tend to have a reputation for being snarky, condescending, and sometimes outright rude when dealing with others.  Remember the saying "you catch more flies with honey than with vinegar"?  If nothing else, look good for this reason.  You will find that you are much happier at work when people are friendly to you and you to them.

What can I do? 

It doesn't take much to look presentable.  You don't need to look like Gene Kelly and you don't need to wear Italian suits to the office in order to reap the benefits.  A little bit goes a long way.  Here's a short list of things you can do to improve your overall appearance.

  1. Look yourself over in a mirror before you head off to work.  There's no excuse for having boogers hanging out of your nose, rheum in your eyes, or a piece of your breakfast stuck in between your teeth.  You owe it to yourself to at least do this.
  2. Shave.  If you have facial hair, groom it.
  3. Shower.
  4. Get a hair cut.  This isn't the 60s and you are not Paul McCartney.
  5. Style your hair.  Buy an actual comb.  Buy some product and learn how to use it.  Ask your barber if you're confused about what to buy and how to use it.
  6. Wax your eyebrows.  The unibrow is not a style.  Never has been, never will be.  This procedure costs next to nothing, takes all of 10 minutes of your time, and drastically improves the look of your face.  Get over the social stigma associated with doing this.  David Beckham did not get his man license revoked by getting his brows done.  Neither did every other man who has ever appeared on tv or in films.
  7. Get a facial.  You will be surprised how much better your face looks with all the dirt, residue, and blackheads properly removed.  Plus it is a very relaxing process.  Schedule your appointment with an attractive aesthetician if you need to justify this cost of time and money to yourself.
  8. Keep your nails trimmed and clean.  No, you don't need to get a manicure/pedicure (although they certainly help), but people notice if your nails are growing out of control or if there's a line of black dirt under them.
  9. Smell nice but do not overdo it.  It is just as bad to reek of deoderant/aftershave/cologne as it is to reek of body odor.
  10. Update your wardrobe.  Get the basics (dress shirts, chinos, dress pants, sports jackets, polos, etc.) in solid colors and don't be afraid to splurge on quality for these items.  They don't go out of style and you can wear them anywhere.  Mark Twain put it best when he said "clothes make the man".  Keep your clothes clean and pressed.  Get them tailored if they don't fit well.  You don't want to look like you're wearing hand-me-downs from your pop's closet.  Match your outfits.  If you are incapable of doing so, find someone who is.
  11. Don't be afraid to buy accessories.  Purchase a good looking watch at the very least (e.g. not a Shark and not a calculator watch or a remote control watch).  Do not underestimate the importance of a good pair of dress shoes and a nice belt.  Learn how to tie a tie and don't be afraid to wear it.
  12. Eat in moderation and exercise.  Sitting at a keyboard 8 hours a day doesn't do much for your physical physique.  And if not for appearance's sake, at least for health's sake.

Most important of all, make it look like you at least put a modicum of thought into your appearance.  It may feel awkward as it runs counter to everything society tells you men should do, but trust me, Brad Pitt looks great shaggy because he has stylists and wardrobe people who specialize in making him look great shaggy.  You don't.  You just look shaggy. 

Give some of these a shot.  You may be surprised to find that you enjoy the results.  And although we may never be able to bring back men's fashion, we certainly can find a happy medium between the dressiness of the past and the laid-backness of today.  At the very least, the women of the world will be thankful.

Note: This isn't meant to be a man-bashing post and I fully realize the same rant and advice could easily be made for women.  But, seeing as how I don't understand women, writing about them seems ill-advised.

« older posts newer posts »