I don't think Fortran and punchcards cut it anymore...
June 26, 2011 4:09 PM   Subscribe

Which programming languages are best suited to creating a timetabling application?

Hey there.

I've got some very outdated experience in programming and databases (Pick Basic, COBOL RBase etc from the 1980s.

I want to create a solution for timetabling staff in a suite of operating theatres (public hospital so no budget and no IT support).
I've knocked up a kludgy spreadsheet solution as an interim measure and moved on to using Filemaker to create a more robust solution.

However I'm beginning to think that, since I'm doing this in my spare time, I might be able turn it into an opportunity to learn the basics of something more generic -Python, mySQL, PHP,Java,PERL...

I'm hazy on all the modern programming environments but happy to learn if someone can just point me to the right tools to look into. I have a Mac, but can run windows, or even Linux at a pinch.

Thanks for your suggestions
posted by bister to Computers & Internet (15 answers total) 2 users marked this as a favorite
I would definitely recommend Java. It has several good IDEs (I prefer NetBeans), it works well with mySQL and you could create a GUI relatively easily (just drag and drop buttons and lists!)
posted by Cloud King at 4:29 PM on June 26, 2011 [1 favorite]

If you want to spend time getting the feel of today's programming languages, I actually think you could do a lot worse than starting with JavaScript, because (a) it's everywhere (b) despite the usual handful of irritating gotchas, its fundamental design is very sound (c) most of the new concepts and skills you will acquire while working with it will be useful in other modern languages.

As for timetabling people across resources: have you played with Google Calendar at all? You might need to write a lot less code than you think.
posted by flabdablet at 5:07 PM on June 26, 2011 [1 favorite]

Python is easy to learn and you will likely be a lot more productive than in Java as Cloud King recommended above. I have yet to meet anyone, who after giving them equal time, found that they could be more productive and learn faster with Java than with Python. Here is the traditional "Hello World!" in Java:
public class HelloWorld {

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

and here is the similar program in Python (3):
print("Hello World!")

posted by aroberge at 5:09 PM on June 26, 2011 [1 favorite]

I don't really see any place for python in all of this. If you're building a web application on zero budget, Java + MySQL is pretty much standard. I wouldn't recommend PHP at all since it already sounds like you're going to have maintainability issues. If you had a budget I'd recommend C# and ASP .net instead of Java. I'd also recommend Silverlight... it would let you get this sort of thing up and running very quickly, and C# is so damn pleasant. But Java will get it done.
posted by jeffamaphone at 5:14 PM on June 26, 2011

The number of lines it takes to write "Hello World!" is a good metric if you're writing programs whose sole purpose is to print "Hello World!". For everything else it's not really relevant.

Any modern programming language is suitable for this problem.
posted by 0xFCAF at 5:15 PM on June 26, 2011 [8 favorites]

I'm assuming that you have in mind something that is multiuser and if so and you're interested in looking at Python you're probably going to end up looking at web frameworks.

You might then want to take a look at Django. Pythonistas can argue whether it's the best web framework for Python but it's certainly pretty close to being the best documented.

Even if you don't want multiuser you can run the Django webserver on your local machine and do the whole web-interface thing without having to find a 'real webserver' (I'm not suggesting this is unique to Django just pointing it out).

Data backend. Yes MySQL probably. If you're interested in transferable skills I'd say a RDBMS was a better bet than the various key-value offerings. Going back to Django - it's got a built in object-relational mapper which will mean you can get something going without having to know lots about the RDBMS you're using.

BTW if you do want to go down the .NET route ASP.NET is a great environment and C# is certainly a transferrable skill. You can use the 'Express' (ie 'free') versions of both Visual Studio and SQL Server to get you started (in fact for smallish apps they're probably all you're going to need) and MSDN is a great resource. AFAIK however you will need a 'real' webserver to get it into normal usage which as I mentioned above isn't the case for some other offerings.

If you're envisaging a graphical representation of the timetable I would say in many ways your bigger question is how are you going to do that ? HTML / Flash / Silverlight ? I don't have an answer but producing slick looking web-based interfaces whilst using HTML is reasonably challenging.

I love the fact you used to work on Pick Basic. I very nearly took a Pick Basic job once (I was working in COBOL at the time) - it's always seemed like a very interesting environment. I presume it's still in use out there somewhere ? In an emulator maybe ?
posted by southof40 at 5:34 PM on June 26, 2011

Assuming you want a web app, the lowest-cost, highest productivity solution here is something like a LinuxApacheMysqlPHP solution. Although, PHP is a horrible, ugly language that should be avoided at all costs.

I personally like Ruby (and perhaps Ruby on Rails for a web framework). But, Python + Django is every bit as good.

If this isn't meant to be a web application, but is some sort of local GUI application, then I would suggest Java. Don't do the .NET thing... you're effectively tied into Microsoft at a number of levels then.

If you're building a web application on zero budget, Java + MySQL is pretty much standard.

What planet do you work on? I don't know anybody but "enterprise" shops that has Java webapps--and none of those folks are building new ones in Java. And nobody I know who works at that scale uses MySQL.
posted by Netzapper at 5:41 PM on June 26, 2011

I would recommend python+django. Take a couple of hours to do the tutorial they have on django site and see if you like it. For database, either mysql or postgres. Java seems like a huge overkill although I haven't used it in many years.
posted by rainy at 5:52 PM on June 26, 2011 [1 favorite]

The best language to write any project in is almost always the language you're the best in. Since you don't suffer that boon / burden, the basic truth remaining is this: you can write any program in almost any language. So, pick one that'll be kind to you and a good foundation for future work.

Since you're new, I highly recommend something statically-bound. That is, a language where, if you eff up on syntax or misspell a variable or something, the compiler will balk at you before you can even run the program. As much as I love python (and I write code in it all the time for work and home), it's right out for teaching new people complicated programming. I watch new folks here trying to pick it up and SO FRUSTRATING.

Learn a solid well-supported statically-bound language. Java is probably the best default choice. It's your basic imperative object-oriented language that, despite an odd fascination with making everything a noun, is very capable and isn't a bad foundation for most programming. (And I say this as someone who both loves and hates Java on a professional basis.) Go download Eclipse (the Java integrated development environment and is Free to boot) and start with basic tutorials. Master the basics, then take a step back and reevaluate the problem you describe; it won't look the same from your new point of knowledge.
posted by introp at 6:13 PM on June 26, 2011

As a coder, I'm going to say there's probably no good reason to reinvent the wheel from scratch, I'm sure there's a web app out there that can do it.

If you hit us with the rough requirements, someone should be able to point you to an existing [read: stable] piece of code that does what you need.

I wouldn't recommend PHP at all since it already sounds like you're going to have maintainability issues

I also think if this is being done from scratch, PHP is the best choice. I personally really don't like it, but if at any point you need to pay someone $20/hr to fix something up PHP is the language to do it in. Java folk are plenty expensive.
posted by soma lkzx at 6:20 PM on June 26, 2011 [1 favorite]

Once again. Go with Scala. Those Python and Ruby people are leading you astray.

Here's some stuff that you can do with Scala that you can't do with Python or Ruby.

object Main {
def main(args : Array[String]) : Unit = {

def printForever = {
println("Print this line")

This program will run forever on the JVM. Try that on Python and you'll run into stack overflow problems.

Python's lambdas don't allow side effects. Scala's do.

Scala can use the libraries available for Java.

The biggest thing is that statically typed (Scala has type inference but it's statically typed) scale better. Knowing the return type and the argument types emphasizes the contract between functions and packages more.

I think Ruby is better than python though. Python just seems to have a form of awkwardness that I can't stand.
posted by DetriusXii at 8:23 PM on June 26, 2011

Assuming you want a web app, the lowest-cost, highest productivity solution here is something like a LinuxApacheMysqlPHP solution. Although, PHP is a horrible, ugly language that should be avoided at all costs.

If you decide to go down this route (not a bad idea if we are being pragmatic) you definitely need to use a php framework such as CodeIgniter. Avoid rolling your own at all costs if you value your time and sanity.

Python's lambdas don't allow side effects. Scala's do.

You say that like it's a good thing.
posted by Dr Dracator at 11:12 PM on June 26, 2011

IM(very)HO Python this the easiest / most productive / shortest learning curve of the popular dynamic languages and would be your best choice.

Django is a great framework for tying together a database, business logic and presentation layer templates.

Strongly typed, static languages - Java, Scala, C++ etc are a terrible choice for the middle layer of a database / logic / web front end stack because they force you to deal with all the bullshit rather than just getting the job done. Also, Java's web layer, 'servlets' is horrid.

posted by col at 3:17 AM on June 27, 2011

Oh yeah, and if you've not been there: Stack Overflow is super useful.
posted by col at 3:18 AM on June 27, 2011

I need to correct myself. What I meant to say is that Python's lambda's don't allow local variables. Side effects in a lambda may be a bad thing, but having local variables allows the code to be more readable.
posted by DetriusXii at 9:04 AM on June 27, 2011

« Older Online law   |   What to do in Mexico in July? Newer »
This thread is closed to new comments.