Monday, February 24, 2014

Software Craftsmanship: The need to understand maintainability

As a professional software engineer for the last 14+ years I've gone through may iterations of what I've called myself and what I've wanted to be called. Some call us engineers, developers, programmers, web programmers, or etc. On top of those some call themselves ninjas (sigh... I hate this one with a passion), software generalists, rockstars, or etc. Earlier in my career I wanted to be called a programmer or developer. I wanted others to know that I was more than an organizer; that I actually made the software tick. As I matured and better understood what it meant to be a software engineer I started to desire to be associated closer to an engineer than a developer or programmer. Those terms no longer seemed to encompass who I was or wanted to be.

While software is an engineering discipline there's a certain art to it. The best software engineers start to recognize the patterns as building blocks. Learning how to apply prior knowledge and understanding to solve problems unseen or encountered.  As I grew and matured as an engineer I really started to feel like the software industry lacked a description for the art of software engineering.

Several years ago a co-worker turned me on to the missing piece to the puzzle; Software Craftsmanship. The software craftsmanship movement seems to fill in the gaps that are left by the description by software engineer. I am, and always will be a software engineer. But I practice software engineering as a craft. Always trying to add value as I respond to change. Always building partnerships as I collaborate with peers and customers to provided business value.

It's with craftsmanship in mind that I start on the topic of software maintainability. Why is an understanding of software maintainability important to software craftsmanship?

When we think about the software lifecycle what we're really thinking about is the total cost of software development. When I say cost I don't just mean dollar amount from the business perspective, as you may be a hobbyist software engineer and not being paid. It's just as important (arguably more important) for the hobbyist to understand the total cost of software development as it is for the professional engineer.

Regardless of what methodology you choose to implement the software development life-cycle, your life-cycle will be composed in some fashion from these parts:

  • Planning
  • Implementing
  • Maintaining

Planning involves rooting out what the software is going to or should do. I.e. what problem or problems is the software going to solve? Planning also brings clarity around who your target audience is. Understanding that target audience will give rise to helping you pick the software platform(s) best suited to reaching your target audience.

Implementing composes the tasks of designing an architecture (whether it's defined at the beginning or defined through emergent design), designing the software user interface(s) (including any API's that other engineers will consume), testing the software, developing the software, deploying the software, and creating any documentation necessary. Notice how I put testing before developing, that was on purpose.

Maintaining is comprised of everything else. Fixing bugs, implementing missed requirements or features, enhancing existing features, creating new features, removing existing features, adapting to infrastructure changes, and on and on and on. Unless your software project is killed before it's released to some sort of production use, it will spend the majority of it's life being maintained.

In the paper "Software Maintenance Costs" (via The Internet Archive) Jussi Koskinen states "The relative cost for maintaining software and managing its evolution now represents more than 90% of it’s total cost."

In the "Role of Software Readability on Software Development Cost" Emilio Collar, Jr. and Ricardo Valerdi state that "The majority of the time and effort expended during maintenance-related activities is code reading."

What this means for the software craftsman is that we should put a significant effort  into writing more readable code. The more readable our code is the higher it's quality is because it takes less effort to successfully understand and modify. When the code is more understandable it's complexity is reduced.

Writing readable code helps you and your successors spend less time maintaining code. Readable code has several benefits:
•  Cuts down the amount of time spent reading code you or, more likely, someone else has written
•  Less time reading code = less time maintaining code
•  Less time maintaining code = increased efficiency delivering products
•  Increased efficiency delivering products = reduced waste && more time writing new code
•  More time writing new code == job satisfaction!

As we invest some time in understanding software craftsmanship we'll spend some time taking a look at the tools at our disposal. There are five acronym's that are staples in the world of software craftsmanship. KISS, YAGNI, DRY, LEAN, and SOLID. We've already taken a look at LEAN, but in the coming weeks we'll take a look at the rest of these acronyms and try to see how they can help us to be better at our craft.

Monday, February 17, 2014

My personal technology stack: Mail Server

As I mentioned in my previous post My personal technology stack: My Server I feel that it's important to have a technology stack that's important to you and that solves technology problems that you deal with on a day to day basis. In that post I outlined the hardware I use to run my server and services. In this post I'd like to talk specifically about my mail server.

I run my mail server on a virtual machine running Slackware 13.37. Slackware is one of the oldest running Linux distributions and is EXTREMELY stable. Slackware doesn't provide a lot of bells and whistles in terms of GUI utilities. I find that the lack of GUI utilities actually helps me to learn and understand the underpinnings of Linux.

My mail server runs Qmail (setup via the wonderful instructions provided by Roberto Puzzanghera) for mail queuing and STMP as well as Dovecot for IMAP with the Pigeonhole Sieve plugin for dynamic filtering support.

Unfortunately we live in a world where SPAM is out of control. This is especially true if you're email can be found anywhere on the Internet. In order to deal with the constant onslaught of SPAM I also install and run Spamassassin.

Running Qmail and Dovecot allows me to connect any modern email client to send and receive email via IMAP/POP/SMTP. One of the things that's important to me is consistency in mail clients. In order to really have my mail accessible from anywhere I run a web based frontend to provide web access to my email from any HTTPS enabled browser. I've chosen Roundcube as my web mail frontend. Roundcube is a very mature web based mail client which support things like drag & drop and integrates well with my Spassassin and Sieve (mail filtering) services via built in plugins.

With this setup my wife and I are able to access our email accounts from our phones (previously iOS and currently Android), our home laptops (Chromebook Pixel and MacBook), as well as our work computers (Windows and OS X). The experience is pretty seemless. On our phones we use the native email client and on our work and home computers we use the web based interface as it provides a consistent experience across all our laptop/desktop machines.

This is just a small part of my home technology stack. But it gives you an idea of how I invest in technology from home. I'll write a few posts in the future with some details of the other parts of my technology stack.

Monday, February 10, 2014

My personal technology stack: My Server

As a technologist I feel that it's important to have a technology stack that's important to you and that solves technology problems that you deal with on a day to day basis. Having a personal technology stack is a great way to explore technology and learn new things about technology in a way that keeps you invested.

My technology stack includes a mail server, web mail frontend, calendar server, shared cloud drive, source control server, and RSS aggregator. I choose to run my own version of these services on my own personal virtualized cloud at home.

Every technology stack starts with the server. Whether you run your stack in the cloud or on a laptop, you need somewhere to run the software and services that comprise your stack. For my technology stack I chose to run my own virtual cloud at home on a custom built server. My main reason for this is cost.

I've been running my own home server(s) for the past 14+ years. I've found that I can build a machine and have it serve my purposes without the need for a hardware refresh for 3 - 5 years. My goal whenever I build a hardware solution is to bring the cost down to roughly $150 - $200 a year.

With my latest hardware refresh in 2012 I decided to move from one server running all my software and services to a virtual cloud where I can run multiple servers and services. For my virtual cloud I chose to run XenServer 6 since it's an open source technology which has a huge install base and decent documentation and help via online forums.

My custom built home server runs 2-3 virtual servers running on an Intel Core i5-3570K Quad-Core Processor running at 3.4 GHz with 16BM of RAM and 750GB of disk space.

Building a home server is not as difficult as it may sound. The only real difficult part is finding the right combination of hardware which is built and tuned to run together. The basic parts of a home server are:

  • Motherboard
  • Processor (+fan)
  • RAM
  • Case
  • Hard disk
  • DVD Drive
  • Additional cabling

Here's my home server:
  • MotherboardIntel Desktop Motherboard LGA1155 DDR3 1600 mini-ITX - BOXDH77DF

  • Processor (+fan): Intel Core i5-3570K Quad-Core Processor 3.4 GHz 4 Core LGA 1155 - BX80637I53570K
  • RAM: Corsair 16GB XMS3 (2x 8GB) DDR3 SDRAM 1600MHz 240-Pin 16 Dual Channel Kit DDR3 1600 (PC3 12800) CMX16GX3M2A1600C11
  • Case: Antec ISK 310-150 Black Mini-ITX Desktop Computer Case 150 Watt Power Supply
  • Hard disk: Western Digital WD Scorpio Black 750 GB SATA 3 GB/s 7200 RPM 16 MB Cache Internal Bulk/OEM 2.5-Inch Mobile Hard Drive
  • DVD Drive: Sony AD-7740H-01 8X SATA Internal Slim DVD+/-RW Drive
  • Additional cabling: NZXT CB 3F-R Sleeved 3-Pin fan Premium Extension Cable

Monday, February 3, 2014

It's no longer okay to not understand the web

It's no longer okay to not understand the web. Our daily lives are filled with multiple computer interactions that we rely on. Some of these interactions are not even in the forefront of our thoughts like driving our cars, riding the bus, flying in an airplane, or getting on the subway. But other interactions are much more front and center like our phones, our email, our calendars, our social media (Facebook, Instagram, vine, etc).

I'll start off by stating what I am not trying to say. I'm not trying to say that you need to understand technology in order to understand how to use these technologies. I really believe the opposite of that. I believe that if you have to understand these technologies in order for them to be relevant to you that we've done something wrong.

What I am trying to say is that in order for us to move past where we are and move to where we want to be with technology we all have to be involved. If we want to fix the broken interactions or the overbearing burdens that some parts of technology require of us (logins, usernames and password, and federation I'm looking at you) we have to have some basic understanding of how our technology works. Once we better understand the technologies we can start to identify what's really broken and start to demand that we move in the right direction. So where do you start?

Learn HTML; it's a critical piece of your everyday life so why not understand it. You use HTML every time you surf the web, read a blog, or go to Facebook. If you don't understand the technology they you've got no control.

Learn how HTTP works. HTTP is the backbone of the internet. If you don't understand it you've got no control.

Learn how a server works. The reason your email, your payroll, your calendar, your SMS work is because of servers. If you don't understand them you've got no control.

Take a free class at the Khan Acadamy, Udacity, or Coursera. There are sooooooooo many high quality and FREE classes available online. If you don't understand math, science, and the humanities you've got no control.

So take control and go learn!