views:

812

answers:

16

I have a colleague that handles tech support, and her role involves a lot of transforming ASCII files from one format to another and occasionally reporting on them. The formats tend to be largely plain text with an occasional bit of XML. She regularly gets me to write small scripts to do these transformatsions, and also batch files for repeating the operation for collections of files in different locations. Currently she uses Crystal Reports to do much of this but it is a bit of a dog.

Could anyone recommend a language, or alternative tool, that she could learn to become more self reliant in this role. It must primarily be very easy to learn at a starting out level, be good at manipulating text files, and run in a Windows environment. Ideally, it would also be freely available, such that she could pass her scripts onto her end users.

A: 

With XML literals and "easy" syntax, I would suggest Visual Basic.NET (targeting .NET 3.5).

JTA
+17  A: 

I would recommend Python for tasks like this.

Syntactically it is clear and it handles reading, manipulating test files well. Also it provides excellent support for XML.

Dean
+15  A: 

A good first choice for a new programmer is probably Ruby.

I mention this not only because it seems to be an extremely simple language to learn (I picked up the basics in a few days without really trying), but also because it has a lot of extremely high quality learning material (more than I have seen for any language in a long time - if you haven't seen it, you really should check out Why's Poignant Guide.)

You can let her try Ruby on her own, too, to see how she likes it.

If she doesn't like Ruby, then Python would probably be my next choice, but the documentation can be a little dry in places. I'd definitely stick with a dynamic scripting language though, as they're very quick and easy to learn and you can "get stuff done" with the minimum of fuss.

I'd definitely go with Ruby first, simply because the learning material is of incredibly high quality.

Dan
+1  A: 

VB.Net using Visual Studio Express, and it gives a good IDE

GvS
+1  A: 

Perl seems like one natrual fit, Python sounds like a good option. I don't know what language you usually use but if it's a .NET based one why not go with Boo? That way tou get a pythonic syntax and can offer assistance by acting as a framework reference.

Torbjörn Gyllebring
+1  A: 

I agree that python would be good at the task, I'm just not convinced that somebody with no programming experience could self-teach to the level you require in a short time.

Expect to do a lot of support during this learning period.

Galwegian
+1  A: 

Windows Powershell - it's freely available, runs on Windows, is very powerful and effectively gives you the power of the .NET framework without the need to install Visual Studio and go through the hassle of compiling etc. Only downside is there might be a bit of a learning curve attached.

Luke Bennett
+1  A: 

I'd also recommend Python as it has a clear and easy to learn syntax, great libraries and decent documentation.

I do all of my text manipulation tasks in Python and couldn't be happier (though I am a programmer...)

Dan
A: 

For starters, give her a text editor with regex search and replace, like Notepad++ or SciTE. Once your colleague groks the concept, you can introduce her to an appropriate scripting language (I agree with Luke that Powershell would be a good option).

Treb
+5  A: 

JOKE: You could try to teach her Regular expressions ;)

Robert Gould
Now you have two problems.
zaratustra
+5  A: 

You answered your own question - scripting.

Why not teach her to write those scripts you have been writing for her? I assume you are doing WSH scripting, which is a pretty low barrier to entry for non-programmers; don't require alot of framework and SDK installations, don't really need Gigabyte-big IDEs. Just a decent text editor and WSH help file, and some tutorials to get her started.

I began my career as a system/network administrator, not a programmer/developer. And learning scripting to automate my tasks was exactly the activity that made me remember my first love and to switch lines to software development.

icelava
+2  A: 

AutoIT is both free and easy to learn. The help docs that ship with it are extensive.

Xandir
AutoIT certainly seems to be a quite pragmatic solution
Shane MacLaughlin
AutoIt3 would also be great if it had to interface with other programs.
Brad Gilbert
A: 

If you're windows-only then vbscript, I've taught it to several non-developers, it's pretty easy to pick up. If you're a mixed shop then perl would probably be most useful.

tloach
A: 

You could try an alternative to learning regex, by using the powerful regex capabilities of editpad

This is very fast and a lot of the tasks that you are scripting to do the conversions/replacements may be possible by using this.

A: 

In the end any kind of scripting environment should get the job done. It all depends on what you're environment is. I'd personally go with either Python, Perl or Ruby since all of them have good support for regular expressions, different encodings and XML (although I'm not so sure about Ruby in the Unicode department).

For simple file-transformation talks all of them should also be more or less en-par when it comes to learning them.

Horst Gutmann
+1  A: 
switch (Get-ComputingCulture)
{
 'unix/java' { python || ruby}
 'Windows 2000/VB6' { vbscript }
 'Windows XP/.Net'  { PowerShell }
}
Scott Weinstein
What about Perl?
Brad Gilbert
Scott Weinstein