Tag: design

I had an existing site I created using Blueprint CSS a while ago. I wanted to make it mobile-friendly. There are responsive CSS grid frameworks out there now, but I didn’t feel like replacing Blueprint, and I figured all I had to do was, using media queries, make every column span a fixed width. That was mostly correct. In the end, I used 100% widths, plus a few other alterations.  Here is how I ended up doing it.

Normally, you will link to your Blueprint screen.css file like so:

	

The following lines tell the browser to link first to a mobile-friendly CSS file. Then, if and when the width is 600px, link to the normal, desktop CSS file. The idea is that bandwidth is scarcer on mobile, so we don’t mind downloading two files on a desktop machine if we have to.


	
	 


	

To create my mobile.css, I copied screen.css, and made the following changes.

  1. Change table elements padding to 2px 
    th, td, caption {padding: 2px;}
  2. Resize all image widths to fit on screen 
    a img {border:none;max-width:90%}
  3. Change input text fields to 67% width. 
    input.text, input.title {width: 67%; padding: 5px;}
  4. Change textarea inputs to 80% width, and reduce height to 150px
    textarea {width: 80%; height: 150px; padding: 5px;}
  5. Change the overall container to 90% width. 
    .container {width: 90%; margin: 0 auto;}
  6. Change all span grid classes to 100% width. 
    .span-1 {width: 100%;}
    ...
    .span-24 {width: 100%; margin-right: 0;}
  7. For some reason, I ended up deleting all input.span and textarea.span classes, though I’m not sure why now.
  8. Change all append grid classes to 0px right padding. 
    .append-1 {padding-right: 0;}
    ...
    .append-24 {padding-right: 0;}
  9. Change all prepend grid classes to 0px left padding. 
    .prepend-1 {padding-left: 0;}
    ...
    .prepend-24 {padding-left: 0;}
  10. Change all pull grid classes to 0px left margin. 
    .pull-1 {margin-left: 0;}
    ...
    .pull-24 {margin-left: 0;}
  11. Change all push grid classes to 0px margin. 
    .push-1 {margin: 0;}
    ...
    .push-24 {margin: 0;}

Not pretty, but it seems to work well.  Happy CSS!

What Is Software?

Long ago, I concluded that software is in fact, among art, science, and engineering, closest to art.  But I had never really considered software as craft.  The Manifesto for Software Craftsmanship has rekindled a debate on software as craft.  That may yet be the best classification of our trade, but I’m sure it won’t be the last.

Let’s Start From The Beginning

Let’s back up a minute.  What is software?  Is it art?  Science?  Engineering?  Craft?  When in doubt, the dictionary is a good place to start.

engineering -noun the art or science of making practical application of the knowledge of pure sciences, as physics or chemistry, as in the construction of engines, bridges, buildings, mines, ships, and chemical plants.

Software has never felt much like engineering to me, maybe because there’s no calculus involved (usually).  There are of course parallels in resource trade-offs, input/output, etc.  But to me there is something inherently different between building a bridge, or even a stereo, and writing a program. 

Software development is still more a craft than an engineering discipline. This is primarily because of a lack of rigor in the critical processes of validating and improving a design.

Jack Reeves, What Is Software Design?

According to Reeves, if we adjust our definition of things slightly, and see that coding is really equivalent to the design that takes place before engineering, it can start to look like other engineering disciplines.  But tools (i.e. languages) and coding and testing processes need to evolve much more before that becomes true.

art -noun the quality, production, expression, or realm, according to aesthetic principles, of what is beautiful, appealing, or of more than ordinary significance.

Software, which is so technical, as art has always appealed in an esoteric sort of way.  They say that artists will destroy the first 100 pieces that they do. In the same way, many programmers fight the urge to rewrite something they’ve written, almost immediately after it’s completed.  I know I do.  But fundamentally speaking, the problem with this analog is that while art can exist for art’s sake, software is usually more practical.  That is, even if I write something for fun, I still want it to at least do something.

science -noun a branch of knowledge or study dealing with a body of facts or truths systematically arranged and showing the operation of general laws.

If I’m not convinced of software as an applied science like engineering, I don’t see how software as science can be so.  In that sense, it falls to the same problem as art: science may exists for science’s sake – to discover new knowledge – but for software, at the end of the day, there always seems to be a customer waiting.

craft -noun an art, trade, or occupation requiring special skill, esp. manual skill.

Oh, but I like this one.  It allows us to impose the special skills that is the craft.  It leaves room for the creativity that is so essential for success – and rewarding.  It speaks to the practical requirements that usually pay the bills at the end of the day and (hopefully) make life easier for someone.

If we consider software as craft, we cannot avoid talking about masters and apprentices.  People often forget that there are apprentices around today.  It used to be that if you wanted to become an electrician, plumber, or home inspector, you must have first trained as an apprentice.  Only after many (usually unpaid) months of apprenticeship under a master could you get a license to work.  These days, there are ways around that requirements, and apprenticeship is often found only in union crews.  (And in unions it seems that politics has overtaken the original goal: to further the craft.)  But I digress.

The main problem with this is the reason there is a market for this type of qualifying: it is the law.  You technically cannot pull a permit on a home’s electrical (except your own) unless you are licensed.  You cannot get your license until you apprentice or take a test.  So would it be better or worse if there was a law requiring all software developers to get licensed before practicing their craft?  I’m certain quality would go up.  But the profession suddenly becomes less accessible.

A Rose By Any Other Name…

While we’re on the subject, what do software professionals like to be called?  Software engineers?  Developers?  Programmers?  Artisans?  Architects?  I hate using the title “software engineer” (see above).  Besides, “software artisan” is closer, but does not sound any less pretentious.  Personally, I prefer “developer” if I’m in the company of those who know what that means, and for everyone else, “programmer” will do.

I am reminded of “The human programmer” that compares programmers’ quest for a title to musicians’ and writers’.

Maybe programmers are just like the 1950s musicians that lacked … confidence, snatching desperately for public nobility. Thus far our attempts at title theft have been less successful than theirs, though not for lack of trying (e.g. software developer / architect / engineer). Like musicians, our work requires not only talent but years of practice, and we see ourselves as “different.” The average person cannot walk up to a piano, or a computer keyboard, and produce anything of value. Writers? Throw them in here too, certainly. Are reporters not a little too serious about being called “journalists”? Of course, this line of thought would annoy both of those professions, them being old, established, and respected compared to programming.

Software As…?

Of course, none of this really matters.  We still go about our jobs every day doing what we do and enjoying it.  But we forget sometimes that software as a profession is only decades old!  Compared to other professions in art, science, or engineering, software is in its infancy!  Someday I think a classification will be agreed upon.  In the meantime, I’ll throw one more definition out there.

alchemy -noun any magical power or process of transmuting a common substance, usually of little value, into a substance of great value.

I like the idea of turning nothing but keystrokes and time into something of great value to someone.  Software alchemist.  I’m ordering new business cards.