Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: What is the most useless or funniness batch file?  (Read 7905 times)

0 Members and 1 Guest are viewing this topic.

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: What is the most useless or funniness batch file?
« Reply #15 on: February 05, 2009, 09:28:24 PM »
Find the best  square root of 2 out to 10^100 significant digits. And see if you can do that with only iteration and not recursion. I am not sure.
But, in any case, I would not try it in a batch file. Maybe you would.

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: What is the most useless or funniness batch file?
« Reply #16 on: February 05, 2009, 09:36:30 PM »
newtons method of square root approximation was originally an iterative algorithm.


The iterative versions of a recursive solution are slightly slower but less memory intensive, and additionally a major PITA to code at all. a recursive solution is a lot easier to understand and read.


And then you get messy stuff like mutual recursion between four or five class modules- or recursion within them... for example, my expression evaluation library has a "CParser" main object. the stack item for a function has an array of other CParser objects that represent each argument. It would be extremely difficult to make a "iterative" type of solution for this, so really I found an exception myself.

I guess it depends on the complexity of the algorithm more then the complexity of the recursion used to implement it.
I was trying to dereference Null Pointers before it was cool.

xcharge50

    Topic Starter


    Beginner

    Re: What is the most useless or funniness batch file?
    « Reply #17 on: February 05, 2009, 09:37:52 PM »

    So them,  does writing a pointless batch file have no value at all? Is there no value in doing this? I think is more entertaining that the word game that has been going on forever. But, just IMO.


    I guest that's my current problem =) Making batch for entertainment! But this recursions is interesting!
    p.s. Batch file is better than solitaire

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: What is the most useless or funniness batch file?
    « Reply #18 on: February 05, 2009, 11:55:29 PM »
    Quote
    p.s. Batch file is better than solitaire
    My favorite is FreeCell. I find solitaire
    much to difficult for my small bird brain. I average about 5 minuets on free cell and then 10 minutes on this forum.

    BC  You are right. And I never did like recursion, but you sometimes have to plan for it if you program takes a strange turn and later somebody says 'now can you just add this little feature'. If you had allowed for possible recursion, you can do it. Some programming languages or implementations make it have to use dynamic allocation of memory, which makes recursion hard to do. I made the mistake of use global variables  in a simple X.25 telecommunication program and then later the boss said it also had to be a fast mini database that would index the clients notes! Awwak!  :o


    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: What is the most useless or funniness batch file?
    « Reply #19 on: February 06, 2009, 09:48:21 AM »
    I thought to split this recursion,iteration, and so forth discussion here:

    http://www.computerhope.com/forum/index.php/topic,76323.new.html#new

    after all- these aren't useless :)

    I was trying to dereference Null Pointers before it was cool.