Slashdot Mirror


For Automated Testing, Better Alternatives To DOS Batch Files?

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."

28 of 426 comments (clear)

  1. DOS Is dead use visual basic by Joe+The+Dragon · · Score: 5, Funny

    DOS Is dead use visual basic

    1. Re:DOS Is dead use visual basic by Anonymous Coward · · Score: 5, Funny

      DOS is dead, and no-one cares
      If there is a shell, I'll see you there

    2. Re:DOS Is dead use visual basic by game+kid · · Score: 5, Funny

      Visual Basic sucks. Get Firefox instead.

      --
      You can hold down the "B" button for continuous firing.
    3. Re:DOS Is dead use visual basic by i.r.id10t · · Score: 3, 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.

      --
      Don't blame me, I voted for Kodos
    4. Re:DOS Is dead use visual basic by Anonymous Coward · · 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?

    5. Re:DOS Is dead use visual basic by jetole · · Score: 1, Funny

      While I agree that visual basic sucks ...what the hell does that have to do with Firefox. Thats like saying Chevy cars suck. Get a Android cell phone instead. You just compared a programming language to a web browser.

    6. Re:DOS Is dead use visual basic by dhalgren · · Score: 2, Funny

      *whoosh*

    7. Re:DOS Is dead use visual basic by Anonymous Coward · · Score: 1, Funny

      just downloaded FireFox now, how do i add a new project again? ROFLMAO!

  2. Okay by srwalter · · Score: 3, Funny

    You're crazy.

    --
    Freedom is the freedom to say that 2 + 2 = 4
  3. 15 minutes could save you... by schmidt349 · · Score: 3, Funny

    Are DOS Batch files too 1990s to be taken seriously in 2010?

    Is Ed "Too-Tall" Jones too tall?

    1. Re:15 minutes could save you... by Bigjeff5 · · Score: 3, Funny

      Does Charlie Daniels play a mean fiddle?

      --
      Security is mostly a superstition... Avoiding danger is no safer in the long run than outright exposure. - Helen Keller
  4. Sensible Suggestion... by Elitist_Phoenix · · 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.

    --
    "I'm going to f***ing bury that guy, I have done it before, and I will do it again. I'm going to f***ing kill Google"
  5. Re:Is it pronounced DOHS or DAHS? by Anonymous Coward · · 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.

  6. Dont take my stappler. by TiggertheMad · · Score: 2, Funny

    I am working on a project that would allow our customers to test our sending different PCL commands to LAN printers.

    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?!?"

    --

    HA! I just wasted some of your bandwidth with a frivolous sig!
  7. .Net and Silverlight by eulernet · · Score: 1, 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 !

  8. Re:If It Works, It Works But Remember Your Custome by Barny · · Score: 2, Funny

    Wizard? Pfft!

    He needs to re-implement Clippy!

    Think of how helpful this would be :)

    --
    ...
    /me sighs
  9. Re:Is it pronounced DOHS or DAHS? by AgentPhunk · · Score: 3, 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?

  10. Re:Hate to say it... how about vbs? by forkazoo · · Score: 2, Funny

    Python is much easier to write and much more maintainable than a batch script. Unfortunately it can be unfeasible to require this dependency on Windows machines.

    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.

  11. Re:Ruby or Python by MaskedSlacker · · Score: 2, 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.

  12. Re:Better Alternatives to DOS Batch Files? by EvanED · · 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.

  13. Re:Ruby or Python by bsDaemon · · Score: 2, Funny

    I write Perl largely like I learned to write C, so its very readable, though perhaps not particularly idiomatic.

  14. Re:Is it pronounced DOHS or DAHS? by omnichad · · Score: 2, Funny

    woorsh?

  15. size matters by Eth1csGrad1ent · · Score: 3, Funny

    Yeah. VB, C++, Java, they all do PCL commands.

    ..but will it fit on a floppy ??

  16. Re:Is it pronounced DOHS or DAHS? by Anonymous Coward · · Score: 3, Funny

    I never heard anyone say it.

    Ugh. Now I feel old. Screw you, AC.

  17. Re:perl? by nacturation · · Score: 1, 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.

    --
    Want to improve your Karma? Instead of "Post Anonymously", try the "Post Humously" option.
  18. Re:perl? by nicks,nicks,nicks! · · 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.

  19. Re:Powershell by EvanED · · Score: 2, Funny

    The moderators are having a field day with this one.

  20. Re:perl? by Undead+Waffle · · Score: 1, Funny

    That's the first time I've heard Perl and better readability together.

    He did say they started out as bat files...