December 2, 2010

Design Patterns in Software Development

Design patterns are a great tool for software developers. The classic text by the "Gang of Four", Design Patterns is a great starting resource. I honestly will have to admit that I don't have all of the patterns memorized, but I do refer to them on a regular basis. Whenever I find myself struggling with a design decision, I flip open the book try to get some inspiration. I don't always find a magic answer, but it can help me straighten out my thoughts.

Design patterns are great, but not anything new or earth shattering. I believe that most good software engineers tend to use the generally ideas anyways. They may not match exactly what is described in the traditional design patterns, but generally they are similar ideas. The introduction of formal design patterns just helped to formalize and standardize these good design principals.

In my opinion, design patterns are not the answer to all things. They provide a framework and common vocabulary for organizing my thoughts, and having discussions with other developers. Since the original book came out others have come up with additional patterns, which in most cases provide similar value. I recommend to all software developers to make sure that they are familiar with design patterns, and have a resource available to use when they need it.

November 30, 2010

C# Generics

A few days ago I was reviewing some old code that I had written a while back, and I found that I was having problems scanning the code quickly to see what it was supposed to do. After a couple a minutes, I realized that a number of areas in the code we're a little more verbose and confusing than they needed to be. The primary reason behind this: no generics. I know generics have been around for a while, and I have just gotten used to having them around. They make it much easier to deal with collections of objects in a type safe, and easy to follow manner.

Sure, before generics you could make things work, but in many cases I found myself having to cast object to a type, that I knew they we're. Now with generics, I just don't even worry about it. Everything just works, and that's good.

November 25, 2010

Android vs. iPhone

Lately, I've seen a lot of articles about how iPhones are so much better than Android devices, or that Androids will take over the world and Apple should be running scared. So far I think we would all have to admit that Apple has done an exceptional job with the iPhone (and iPod Touches). They have sold a ton of them, and everyone seemed to want one. Yes, meant to use past tense. Now that there is a real competitor in the market, Apple has to be a little concerned. They still have an excellent product, and the quality and quantity of applications that they have in their app store is unbeatable, but how long will it last?

With the plethora of Android phones (and other devices) available, it seems like will will continue to see a pretty big shift away from the iPhone. This may change if and when iPhone's are available on other networks, but I still think it will continue. I will admit that I have an HTC Evo 4G and I also have an older model iPod Touch. I've had the iPod longer, and honestly, when I got my hands he EVO, it was great. The screen was bigger, it was better to use, and it was just cool. My iPod is now a toy for my daughters to play with.

My biases are obvious, even though the iPhone is still a good product, unless Apple can do something dramatic, they will loose this battle. Their are more phones, more features, and more variety with the Android phones, and the number and quality of applications available for the phones will increase pretty quickly for the coming years.


Just to be fair I thought I would mention two of the other contenders in the market: Blackberry and Microsoft. I used to have to carry a Blackberry Pearl for work and hated it. It worked OK as a phone, and was barely passable for reading texts and emails, but it was impossible to use the web. It was a complete waste of space as a smart phone. I know that they have come out with some newer phones and features, but it it's too late. Backberry had their chance.

Microsoft is another issue entirely, they have tried time and time again to create a decent mobile operating system, and failed each time. I don't think this time will be any different. I haven't used the new Windows phones, but just looking at the user interface makes me cringe. I will give Microsoft credit for trying to think outside the box, but I think they completely forgot about the box, and ended up with something else entirely.

November 23, 2010

ASP .NET Chart Control

I recently needed a chart in one of the asp .net website I've been working on. In the past I've never been able to find a satisfactory solution that was free or inexpensive. I was pleasantly surprised to find out that in Visual Studio 2010 and .NET 4.0, that Microsoft included new chart controls for ASP .net and for Windows forms. I figured that since they we're free and already included in C#, I might as well try them.

At first glance they appear to be pretty decent. The control includes most of the basic features that you would expect: multiple chart types (bar, line, pie), multiple series, 3D capabilities, legends. It also has a number of other features that we're well beyond what I was expecting for a free solution: advanced statistical calculations, and over 12 different categories of chart types.

My needs for the project I'm working on are very simple, so after a few minutes of looking at some examples (4 Guys From Rolla was a great starting point), I was up and running. Within a few minutes I had a basic line charts working, and shortly after that I had the legend, labels, and multiple series all working as well.

So far from what I've seen, these chart controls seem to work pretty well, even if someone had some intensive charting needs, these free chart control might still fit the bill. Definitely worth a look before buying anything to fill your charting needs.

November 18, 2010

C# Lambda Expressions

For quite a while now I have been wondering about lambda expressions. I've started seeing more and more of them in code examples, and there has obviously been a lot of talk about them. But most of the examples I've seen have not been very intuitive. I finally decided to see what they we're all about, and was surprised about how simple they are to understand. They are not really anything new, just a new shorthand for doing things that C# could already do.

I started my journey be reading chapter 11 of Pro C# 2010 and the .NET 4 Platform (As a side note I've read a number of the other chapters, and it looks like a decent book so far.) I thought it was interesting that lambda expressions we're grouped in the same chapter as delegates and events, but after reading the chapter, it all makes sense now. This is probably oversimplifying it, but lambda expressions are just "syntactic sugar" for creating anonymous functions, and working with delegates. They allow a developer to easily write a basic inline function for event handlers or anywhere else a delegate is needed.

The basic format for lambda expressions is arguments => statement. The expressions can have 0 or more arguments and 1or more statements. The most common case I've seen is probably one argument and one statement, and the nice thing about a single statement is that the result of the statement is the "return" value of the expression. One of the other great things about lambda expressions is that in most cases the parameters can be implicitly typed, so that can mean a few less characters to type, and simpler, easier to understand expressions.

I still don't know how often I will use them, but it is nice to know how simple they are and how easily I can define event handlers now. What would have taken a significant amount of boiler plate code and definitions and a function, can now be done in a single, quick line of code.

November 16, 2010

The Future of Computers

Over the last few years it has been exiting to see how computers have changed, and how they have changed the world. Mobile devices have become ubiquitous, almost every new computer has 2-4 cores, and software drives business throughout the world. How will things change over the next few years?

Computers will get faster
As we have started to see over the last little while, computers have started plateauing on overall speed and raw MHz. Instead computers have started getting multiple cores. I think this trend will continue, we will see 4 cores become standard and 8 eight cores become common.

Mobile devices will rule the world
Already many people are using mobile devices, but with smart phones becoming more popular and more functional, we will the web become even more important, and also more critical that it supports devices with smaller screens and different input methods like touch screens

Software Engineers will continue to be needed
Since software is already critical to the world, businesses will continue to need to buy software and hire programmers. This is good news for those of us that are in the industry, and even better news for those that are just getting started.

The future of computers looks pretty exciting. We will continue to see new technologies, and we will continue to see increases in speed. the only thing that is for certain, it that things will continue to change...

November 11, 2010

Web Development with JavaScript and AJAX

It seems like JavaScript and AJAX are becoming more and more necessary to create professional, interactive web sites. Basic HTML and even CSS just won't cut it. People expect the "bling" that JavaScript provides. I have mixed emotions about JavaScript though. It can really make a website stand out, but compared to traditional languages and development environments, it can be a pain to develop, debug, and maintain.

Part of me would say that Silverlight or Adobe Flex provides a easier environment to develop in, but they can be very heavyweight for most web sites. Maybe I just haven't found the right JavaScript framework or toolkit that really works well and makes sense. It seems like jQuery and the Google Web Toolkit are two of the most common and well known systems. jQuery seems a little more flexible, and the Google approach seems to be very tightly coupled with Java. Since I do most of my development with C# and ASP .NET, jQuery looks like a more promising solution.

November 9, 2010

Training Software Engineers

As I mentioned in my last post about hiring software engineers, I generally categorize software developers as either programmers or software engineers. Programmers have the basic skills to get the job done, but software engineers truly understand and apply all of the techniques and ideas that come with their craft.

Given the fact that no one is a perfect software engineer; how can we help train and educate team members to reach their full potential? Here are some of the techniques that I have used, but I would love to see what successes others have had as well.

1) PowerPoint Presentation Training

This is probably one of the most straightforward techniques, but one that I have the most mixed feelings about. I believe that this type of training is necessary and important. It can be very useful to get a group of people together to review, learn, and/or discuss something. But I also think that it can have the least overall impact of the different training ideas I have used. People tend to not participate much, so the presentation is very one sided, which means it's hard for attendees to focus.

2) One-on-one training

Sitting down with someone to review something specific, or explain something can be very powerful. Since the target audience is one, it is much easier to tailor the training to the individual, and they are much more likely to provide feedback and ask questions than in a group setting. This can happen formally as code reviews, targeted training, etc., or even informally as a brief discussion based on a question or comment. Sometimes I think the informal training, even though it is generally spontaneous, can be more effective than any preplanned training. With one-on-one interaction I find that the effect can be more dramatic than in group settings.

3) Training by Example

Another approach I use is to show developers good examples of how to be a software engineer. This can be including people in design discussions, reviewing "good" code, or asking them questions to help you work through a problem. This approach also works well, and is probably the least obvious form of training from the trainees standpoint. They may never know that they were being "trained."

Overall it seems to be one of the most difficult and important parts of my job: helping people reach their potential. It's a slow and time consuming process, but it can also be very rewarding for everyone involved.

Does anyone have any other techniques they use, or more ideas on how to improve or refine the ideas I already have? Also has anyone read any good books (or other resources) about how to manage software developers? I'm always looking for new ideas.

November 7, 2010

Hiring Software Engineers

We recently went through a round of interviews for software developers where I work. Ever since then I've been reflecting on how to hire software developers. I wanted to outline some of the ideas that I have, and see if anyone has any feedback or other ideas.

1) Where to post job openings?

We have tried a number of different free and paid sites for job postings (state job sites, dice, careerbuilder, etc) , and most of them seem to be pretty hit or miss. We get a fair number of completely unqualified candidates, and only a few that are even worth interviewing. Does anyone have any other suggestions or ideas of where to find candidates? One of our most useful resources has been the local university, but that only works when we are looking for interns or recent graduates.

2) How to filter through resumes?

Many of the resumes we get are for individuals that aren't even experienced or trained in software engineering (Do people not ready job postings?). But after the first pass, here are some of the things I generally look for, other than some of the obvious ones:
  • Is the resume just full of keywords, instead of really focusing on skills that the individual has?
  • What variety of projects have been worked in recent years (Web, back-office, database, etc)?
  • How long does the candidate stay at jobs - are they a job hopper?
  • Is the resume well organized and clear - or does it look like a computer generated it?
These kinds of questions help me to see the potential that someone might have as a good employee. What over ideas do people have for sifting through resumes?

3) How to interviewing candidates?

I wrote about a year ago on Job Interviews. I wanted to touch briefly again on some of the techniques that I use, and some of the areas that I continue to work on. Here are the key things that I want to get out of the interview:
  • Do they have a solid understanding of software engineering?
  • Can they communicate well with others (even non engineers)?
  • Can they analyze information and problems?
  • Do they fit with the culture and environment of the company and the team?
  • Are they dedicated and a hard worker?
  • Can they lead a team and mentor other developers?
I find that I can get a pretty good feel formany of these within 45 minutes or so, by covering 5-6 software design concepts, a story problem or two, and a little pseudo code. One of the items that I continue to think about and refine is how to make sure they have a solid grasp of software engineering.

With interns and candidates with little or no experience, I find that it is generally not too hard. Developers with 5+ years of experience seem to be much more difficult to interview. Most of this comes down to my belief that there is a significant difference between a programmer and a software engineer. A good programmer can be given a small to medium sized task, and can be expected to complete it in timely fashion, meet the requirements, and the end result will be decent code. The programmer focuses on getting the job done. A software engineer will do all of the same things, while at the same time taking into account overall business strategy and goals, code maintainability, design opportunities like refactoring, and many other things.

Trying to determine who has the experience, knowledge, and skills to really be a software engineer instead of just a programmer is no simple task. Given a finite amount of interview time, what things can you look for or ask about that can really help determine which category someone will fall into?

November 4, 2010

Why would anyone buy an iPad

I've been wondering over the last few months why anyone would buy an Apple iPad. They seem to be fairly limited in what they can do. Wouldn't you be better off with just a smart phone or a netbook? It seems like iPad's are trying to fill a niche that isn't there.

But still people buy them. Are they using them as e-book readers, or running iPhone apps for people with poor eyesight. They just seem to bulky for what little they can do. I have to assume that I am  wrong since so many people use them, but yet I still struggle to see the value. Personally, I would even be hesitant to buy a tablet computer, when I could just go with a laptop instead. Maybe I'm just not the "target market," and that's why I don't understand.

November 2, 2010

ASP .NET Web Forns vs. MVC

I've used ASP .NET web forms for a number of years on some of the websites I've worked on. Recently I've been looking into MVC more in depth, to see if it is something that I should start using. It seems like most people are very adamant, that one approach or the other is the only way to go. Very few people seem to believe that both approaches are valuable.

I have Pro ASP.NET 4 in C# 2010 but it only briefly covers MVC. The only book I've seen that looks reasonable on MVC is Pro ASP.NET MVC 2 Framework, does anyone have any feedback on this book or recommendations for other resources. I'm looking for something that covers basics, but also covers overall design concepts and principals to use in real life applications. Most of the internet resources that I've found just touch on brief topics, but nothing seems to really cover MVC holistically.

I've also been wondering if MVC 3 has anything substantial that I should hold off for. Most people seem to agree that MVC 2 is the first usable version of the framework, is version 3 significantly better?

October 28, 2010

The Pragmatic Programmer

After reading Code Complete, I decided to continue with another book that had been on my reading list for a while. The Pragmatic Programmer is another excellent resource for developers. When comparing these two books, I would say that Code Complete is probably a better starting point, since it seems to cover more topics, and provide more details. With that said, Pragmatic Programmer is still a worthwhile read. There is definitely overlap between the two books, but there are some items that Pragmatic Programmer covers, that I didn't remember reading in Code Complete.

The book seems to be more humorous than some of the other software books I've read, which makes for easier, more enjoyable reading. The information in this book is what really helps separate the programmers from the software engineers. These concepts are what help make developers more valuable employees, and more productive engineers.

If you haven't ready Code Complete, I would recommend it first, but with that said I still think Pragmatic Programmer is a worthwhile read.

October 25, 2010

Software Engineering Handbook - Code Complete

I recently finished reading Steve McConnell's software development manual: Code Complete. It is a hefty read, but well worth it. As I was reading I found myself quickly skimming over some sections that I felt comfortable with, while at the same time other sections really made me think about some of the ways that I approach software development. I also found that some of the topics that I read were things that I tend to do naturally, but it was still nice to see formal definition and documentation to support what I do. The book covers all of the major areas that I would expect an experienced developer to be comfortable with.

Many of the topics are only briefly covered, but it is still an excellent source for how to develop software. For some programmers this may be their first exposure to these topics, so it is a great way to expand your knowledge. Some of these brief introductions should trigger further investigation and research for topics that are of interest. Even if the topics aren't' all covered in depth, it is nice to just know what ideas, practices, and techniques are out there.

In the end, I would say that Code Complete a "must read" for all software engineers, especially for those with at least 2-3 years of experience under their belt. It's still useful for the novice software developer, but the quantity of information may be a little overwhelming for beginners.

March 29, 2010

Java software development

From what I remember Java is about 15 years old now. Ever since it was released, Java has changed how we do software development. It was one of the first widely used and accepted "pure" object oriented languages. It was one of the best cross platform environments. Java byte code showed that an extra abstraction layer could perform well enough to be a viable option.

Many of Java's ideas and strengths have been copied by other languages and frameworks. These same languages have also learned from some of the mistakes that Java made. Even if Java doesn't become the end-all of software development languages, it will always have a place in history for it's impact on the development community.