As a professional programmer, the languages I code in during the day are very much dependant on the particular project I am working on. Also as a programmer I have a very low threshold for repetitive or complex tasks - basically if I have to do something more than twice then I'll probably write a quick program to do it for me (sometimes taking longer than the repetitive task would have done, but I have a lot more fun along the way :-) ). These little programs are throwaway pieces of code. I'll probably never run them more than once - I'll almost certainly never come back to them and I'm certain that no-one else will see them.
I find it interesting what language people choose to write these little disposal programs with - I call it your "Pocket Knife Language". Currently I would usually use C#, despite that fact that I code all day in Java. I would normally use C# just because it is that much easier to access the bits of the operating system I normally run on (Windows) - but there are a huge number of libraries and methods in the .NET framework to do the heavy lifting for me. Jumping between C# and Java is pretty easy for my brain to cope with.
But It's not always been like this for me. I guess my first pocket knife language was probably Excel and then I quickly moved on to Visual Basic. I stayed with VB for a while. At the time I was earning a living writing mainframe code - anything that requires you to write a 30 line program (in JCL) to just compile and run your code is not suitable for inclusion in anyone's coding pocket knife :-) In my professional career I then moved into web development, it was around this time that Java started to appear on the scene and I moved into J2EE work and at some point, I'm not quite sure when, I started using Java as my pocket knife language. I went through a brief spell when I was doing a lot of front end web development that I dispensed with IDE's and compilers completely and JavaScript and the DOM actually became my pocket knife of first choice. However I quickly saw the light. Once I started working on .NET projects professionally it didn't take me long to move to C# as my pocket knife language and it has stuck there for a few years now despite moving back to Java on the professional front.
I was having a chat at the weekend with a friend of mine who is currently doing some very clever and complex work down at a pretty low level which requires him to be coding in C++ all day long - however I found it interesting that he was using Java as his pocket knife language. Other people I work with would use Perl or Python as theirs.
So, dear reader, what is your pocket knife language and why?
C# too - but then again I've always been a microsoftie.
I keep wishing I had to time to learn something like IronPython as I'm sure it would make a great pocket knife language.
I code in C++ day and night but when I need to prototype something quickly I also use C#.
Lately I more and more use Windows Powershell scripts.
C# too hehe, but I have been always working in Microsoft environments so ...
I still use Visual FoxPro as my pocket knife. I haven't found a more productive environment for "run once" development.
++Alan
I use PowerShell. All the power of the .NET framework plus easy handling of command-line arguments, file system, and XML, which is usually what my custom tools are written for.
I've started using PowerShell for this kind of thing - and with TFS inside PowerGui [http://coolthingoftheday.blogspot.com/2008/05/want-to-access-tfs-work-items-via.html] you have one less excuse for not checking it out!
Hi Geoff,
I keep trying to force myself to use PowerShell (even getting rid of my default cmd shortcut for a while) and I've always failed to get past that initial hump. I think I just need to bite the bullet and spend a day getting up to speed. Everyone who gets over that initial hurdle seems to love it.
Thanks for the link - I guess I have to check it out now :-)
For me, it's IronPython (in preference to PowerShell, as a scripting tool for working against .Net APIs), against a default day-job language of C#. It used to be Java, when the day-job language was C++.
Unix Tools - ksh, sed, awk et al for low level stuff, even ms-dos scripting if I fancy a challenge. Don't dive into compiled stuff unless I think I am going to reuse it or need to do work at higher level .. and then it's Java which also pays the rent. Doing pocket knife stuff with it keeps me up to speed with more esoteric stuff which I don't use day-to-day.
I think the comments reflect your current readerships interests :)
Portable Python of course