LibraryCarpentry / week-one-library-carpentry-DEPRECATED

Week One lesson
http://librarycarpentry.github.io/city-november-2015/
9 stars 8 forks source link

When does code become software? #5

Open drjwbaker opened 8 years ago

drjwbaker commented 8 years ago

Unanswered question from the week one ignorance amnesty exercise. Thoughts, comments, links aimed at a general audience appreciated.

marioa commented 8 years ago

I would have treated the two terms almost synonymously. If you want to draw a distinction maybe software is the collective noun for code. I can talk about the piece of code I am involved with but all the pieces of code become the software that fulfils whatever the requirements are ... at least that is how I think I use the terms.

After discussion with Mike (probably stealing his thunder) software is more generic - it could include the documentation, the licence, etc which is not code (the bit that gets run by the computer either through compilation or through an interpreter)

mikej888 commented 8 years ago

Perhaps code becomes software when it has tests, appropriate documentation and can be used, understood and maintained by someone other than its original author? Or looking at it from a different perspective, a user manual is part of the software but not part of the code. There's an article "Code versus Software" (https://www.artima.com/weblogs/viewpost.jsp?thread=67178) which comments: "Programmers write code: a formal plan of the software, expressing its intent in maximal detail. Software is the end product: in execution it is what the user perceives, interacts with and experiences." and discusses this view in detail. Certainly writing code and developing software are not synonymous - you can be part of a software development team but spend little, if any, time writing any code.

lonelyjoeparker commented 8 years ago

Both @marioa and @mikej888's answers are much better thought out than mine, and a lot more sustainability-minded too!

I was simply going to suggest that, yes, software contains code but not the other way round. And explicitly, any computer instruction can be considered code, but 'software' implies an input, operation and an output, e.g.:

#code
myName = 'Bob'

And:

#software
yourName = <input>
myName = 'Bob'
print "Hello $yourName! I am $myName - nice to meet you :D"

That's a bit of a functional definition though so philosophically useless I suspect...

lonelyjoeparker commented 8 years ago

(Also - this is literally the first time in my programming career that SO hasn't been any help - urrk!)

alysbrett commented 8 years ago

I agree with the previous answers in that "useful software" requires more than just code and not every code snippet could be classed as a piece of software on its own.

Beyond that, I think the answer depends on the reason for trying to make the distinction. A few possible reasons I can think of are:

  1. Career structures (who is classed as a software developer and who just writes a little code as part of another role)
  2. Institutional Policy (eg different QA requirements for different scales and applications, varying need for methodologies & other sorts of "best practice" from the software world)
  3. Provenance and/or reuse issues (what should we be aiming to share and preserve)

For 3 you could argue that it's worth treating any code you write as something potentially useful in the future and making the effort to use version control for example.

For 2, it would clearly be overkill to require people who aren't primarily software developers to apply a blanket software QA policy if they just write a 20 line script for their own use a few times a year. This is something I've been asked to think about for our organisation, though I haven't got beyond mulling it over yet. I'm thinking of some broad classifications along the lines of "the following guidelines apply if your software is made available for others to use, if it produces data that others rely on or if it can potentially have an impact on experimental operations".

snim2 commented 8 years ago

Interesting stuff! I would say that code becomes software when the user can run it. You could write a little snippet of code, or try out a few ideas in a notebook, but that might not add up to a program that the user can run. Code is something for the programmer, software is something for the user.

I like the comments from @alysbrett and @mikej888 but I think realistically a lot of software doesn't have documentation, tests and so on. Does that make it code rather than software? I suspect that isn't the way the terms are usually used, but no tests or documentation certainly makes the software less useful, less good.

alysbrett commented 8 years ago

Yes, I agree that lack of tests and docs don't prevent something being software, but knowing what counts as "software" in a particular context might be necessary to know when these things are required.

If an organisation wants to say things like "all software written here should have x, y and z" then they either need to define what counts as software or phrase the policy more carefully to consider different categories of software I guess.

lonelyjoeparker commented 8 years ago

@snim2, makes sense.

I'm wondering if my BI colleagues @jiacona @james-milburn-crowe @robturner1, or alumnus @MattBlissett, have any opinions..?

drjwbaker commented 8 years ago

Comment from email correspondence: "I guess for me code becomes software when it is a) usable by other people and b) documented."