For Automated Testing, Better Alternatives To DOS Batch Files? 426
An anonymous reader writes "I am working on a project that would allow our customers to test out sending different PCL commands to LAN printers. My initial thought was that a DOS batch file will allow users to select some simple options, send the tests to printers, and even generate a small web page which, when launched from the batch file, will provide email feedback on the tool. This all worked. To spice it up I added some ANSI color commands to the menus, though the implementation of that may prove tricky without resorting to .COM files or forcing the load of the ansi.sys via the command.com shortcut. And this implementation goes against my initial idea that I want the entire thing to be contained in a standalone batch file. My questions are: Is there a better option for this? Are DOS Batch files too 1990s to be taken seriously in 2010? The application needs to (1) be simple (2) be easy to update (3) be able to send PCL commands to LAN-attached printers and (4) allow email feedback. I don't know what other programming language would allow this and be as simple. I tend to think that I have found the best tool for the job but if you have another idea let me know. Call me crazy but I love DOS."
DOS Is dead use visual basic (Score:5, Funny)
DOS Is dead use visual basic
Re:DOS Is dead use visual basic (Score:5, Funny)
DOS is dead, and no-one cares
If there is a shell, I'll see you there
Re:DOS Is dead use visual basic (Score:5, Funny)
Okay (Score:4, Funny)
You're crazy.
15 minutes could save you... (Score:4, Funny)
Is Ed "Too-Tall" Jones too tall?
Sensible Suggestion... (Score:2, Funny)
I believe the only sensible and practical idea here is to have 1000 monkeys at 1000 consoles doing these automated tasks for you. Of course you'd need to feed these monkeys, so you'd need more monkeys. Thus, 1000 monkeys at 1000 banana plantations.
Re:Is it pronounced DOHS or DAHS? (Score:1, Funny)
DAWS.
No, the S is soft as in "esss" not "zee". da "AWE" ssss
It's pronounced the same as the word "DAS" in German; the A is soft ("AAAH" not "OH")
So... "DAHS" is probably about right.
And since no decent /. Anon post is complete without some kind of rant:
The word is wash. Observe the letters, notice you have Waaaaaaaaaa and then sshhhhhhhhh.
There is NO 'R' in wash.
It is not pronounced WORSH otherwise it'd be spelled that way.
It's not a regional accent, it's a complete mis-pronunciation of the word. Stop it already; it just makes you sound like you have a speech impediment. Or a single digit IQ.
Dont take my stappler. (Score:3, Funny)
I will be looking forward to the first error is encountered by a user. You will hear someone in the cubical farm say, "PCL PC Load letter? What the fuck is PCL PC Load letter?!?"
.Net and Silverlight (Score:2, Funny)
As you seem to be a MS fan, I can't believe you didn't consider dotNet languages and Silverlight.
My personal favorite is VB.Net.
Massive executables are the best way to show that your tool is of professional quality.
Silverlight is of course necessary for any kind of interface.
If you want to avoid a Web interface, use XAML.
Hey, we are in 2010 !
Re:If It Works, It Works But Remember Your Custome (Score:3, Funny)
Wizard? Pfft!
He needs to re-implement Clippy!
Think of how helpful this would be :)
Re:DOS Is dead use visual basic (Score:4, Funny)
I agree, if you are stuck on ms stuff then VB becomes your "shell scripting" language of quickness.
This being /. though, I'll have to mention a small customized LiveCD (think DSL sized) with a (perl script | python script | brainfuck implementation | emacs extension | vi/vim script | whatever) with i/o to the user being prettified by some shell/exec stuff with zenity or by developing a graphical app using qt/gtk/whatever. Distribute as a business card cd or a bootable usb key. Have the marketing dept come up with some video, etc. to put on it, make it a bigger CD.
Re:Is it pronounced DOHS or DAHS? (Score:4, Funny)
The other posters are correct. You only say "DAHS" if you're from Boston, as in: "Oh My Gawhd, some retahd on slashdaht is still writing DAHS bahtch files. Why don't we just fihre up Windows fah Workgroups while we're aht it."
Seriously though - I think nmap can send PCL commands via the nmap scripting engine, which is written in LUA. How about wrapping that with what some of the other posters are suggesting?
Re:Hate to say it... how about vbs? (Score:3, Funny)
You can just make an exe out of a python script which collects the runtime and all dependencies into a single file. I'd want to do that before resorting to invoking VB. I guess if it is an all-MS shop locked in some sort of hellish time vortex (which is consistent with the OP asking about batch files) then they may keep enough Eye of Newt and pentagrams handy to make VB seem like a convenient option.
Re:Ruby or Python (Score:3, Funny)
That's me Perl hardcore programmer saying.
If your Perl code is anything like your sentences...oh, who am I kidding, it would still make more sense than MY Perl code.
Re:Better Alternatives to DOS Batch Files? (Score:2, Funny)
You can use bash on most Linux implementations
You're in luck: there is something better than being a trolling twat making useless suggestions. It's called "sticking your head in a vise."
What you do is get a vise, you put your head in it, and you twist the handle until it contacts both sides of your head. At this point you'll really have to turn the handle hard, but keep going.
You can stick your head in a vise in most wood shops.
Re:Ruby or Python (Score:3, Funny)
I write Perl largely like I learned to write C, so its very readable, though perhaps not particularly idiomatic.
Re:DOS Is dead use visual basic (Score:5, Funny)
Rebooting your computer into another OS to test a printer?
Do you meatbags SEE why you're not commercially viable as developers?
Re:Is it pronounced DOHS or DAHS? (Score:3, Funny)
woorsh?
Re:15 minutes could save you... (Score:4, Funny)
Does Charlie Daniels play a mean fiddle?
size matters (Score:4, Funny)
Yeah. VB, C++, Java, they all do PCL commands.
..but will it fit on a floppy ??
Re:Is it pronounced DOHS or DAHS? (Score:3, Funny)
I never heard anyone say it.
Ugh. Now I feel old. Screw you, AC.
Re:perl? (Score:2, Funny)
A novice had a problem and could not find a solution. "I know," said the novice, "I'll just use Perl!" The novice now had two problems.
Re:perl? (Score:3, Funny)
I'll second this one. The place that I work runs almost all of its commands via bat jobs that run from simple to complex. When I started here, I installed Strawberry Perl on my win32 system. I have, since, replaced every functionality that the bat jobs used to do with perl scripts (primarily for my own purposes, but most of my coworkers don't mind them either). The primary reason I did this was readability.
That's the first time I've heard Perl and better readability together.
Re:Powershell (Score:2, Funny)
The moderators are having a field day with this one.
Re:DOS Is dead use visual basic (Score:1, Funny)
Re:DOS Is dead use visual basic (Score:3, Funny)
*whoosh*
Re:perl? (Score:2, Funny)
That's the first time I've heard Perl and better readability together.
He did say they started out as bat files...
Re:DOS Is dead use visual basic (Score:1, Funny)
just downloaded FireFox now, how do i add a new project again? ROFLMAO!