programming and LIS students: caffeine free anyone?

Last week I posted a simple Python script and alluded to what I feel is the need for LIS programs to address computer programming.

The LIS field – or industry? – is so immersed in the usage and advocating of technology that it seems logical, per my logic at least, to offer library students an introductory class that allows them to learn about what lies behind the surface.

That said, I think LIS programs that do offer such classes need to really think about what language(s) should be taught to students who will – perhaps more often than not – have virtually no prior programming experience.

And while it would be neither professional – or perhaps even nice – of me to get into specifics, let me just throw out this question:

Why Java?

Sure, it's critically important as a language, but that isn't the point. The point is "is it appropriate for what will likely be a class of beginner programmers majoring in library science?"

Now I'm not a real programmer, an educator, or even a 'librarian' but I'm going to answer the question anyway.

No.

Why?

For starters, library students – who are not computer science majors – need to learn a language that is syntactically simple enough to more or less stay out of their way as they learn to think about design – knowing where you want to go and figuring out how to get there.

For an example of the problems in wading through syntactical issues when you're starting out, here's an excerpt from John M. Zelle's Python as a First Language regarding the ubiquitous "Hello World!" that constitutes many people's first program.

Python supports the use of functions and classes but does not force it. Simple programs really are simple. For example, consider the ubiquitous "Hello World'' program in Python:

print "Hello World!"
 

C++ requires this program to be wrapped in a function and preceded by a preprocessor directive:

#include <iostream.h>
int main()
{
   cout << "Hello World!";
}
 

In Java, the situation is even worse, as all code must be inside of a class:

public class helloWorld
{
   public static void main(String [] args)
   {
     System.out.println("Hello World!");
   }
}
 

Sure you can find plenty of Java advocates too, but keep in mind that Zelle is writing in terms of appropriate first languages for computer science majors, not librarians. That seems to only bolster the notion the Java might not be the best thing for LIS students – at least not for a first programming class.

Secondly, I think one needs to also consider the execution environment. PHP, for instance, can be executed via the command line, but also can so easily be executed in the most widespread GUI we've ever known: the web browser. All one needs is something like XAMPP, an Apache distribution with PHP that installs in minutes if not seconds. From there one can make web forms and database queries to their heart's desire in addition to running backend programs that manipulate files and folders, etc.

Lastly, there's the matter of salability. I'm not saying Java skills aren't salable – that would be ridiculous – but will people really develop salable skills in one semester? PHP is salable, I think, in the library world just because it has, I'd argue, a lot of name brand recognition even amongst administrators who are less familiar with a lot of technologies. I see it on library job descriptions all the time (preferred qualifications).

By the way, here's "Hello World!" in PHP; it's almost as simple as Python.

<?php
echo 'Hello World!';
?>

I guess what I'm saying is that for a beginner what matters isn't the language itself, it's the language behind the language and I'm not sure Java is the best way for LIS students to become conversant in the latter.

--------------

Related Content:

3 Comments

  1. Melissa

    Thanks for this, Nitin. I was happy to learn that our program would be offering its first programming class but bummed to hear that it would be offered the semester after I graduate. Your post reminds me that other opportunities can (and will) be equally enriching. Maybe some PHP should be in my future…

    Reply
  2. Ginny

    Thanks for this thoughtful analysis (I knew I'd be happy putting this blog in my RSS feed!). As you know, I am one of those non-programming folk who come to Library Science willing to learn and determined to barrel the way through this side of things. It is neither elegant nor efficient. The approach you advocate could help people like me, and ultimately help library patrons. Part of me still wants to learn one of the simpler programming languages…though I'll never get close to you and Melissa. Hmmm, perhaps I could do it as a continuing ed. option.

    Reply

Leave a Comment

Your email address will not be published. Required fields are marked *

*