Programming helpful tool suggestions
Moderator: DosItHelp
-
- Posts: 81
- Joined: 19 Nov 2013 00:41
Programming helpful tool suggestions
So I've been creating batch programs for about a year and a half now. Sounds funny, but I love it. However, after my recent discovery of autohotkey, and notepad++ I've realized that I've really started from the ground up. Now that I've done this for awhile I want to make things easier for myself. Notepad++ has been a big improvement over notepad, however... now I'm after really helpful things. That's why I'm posting here. The names dbenham, carlos, aacini, etc have been in my list of knowledgeable cmd gurus almost since starting. Some of the best stuff I've learned is from their responses on stackoverflow, and dostips. SS64 is also great site. So here's what I want to know. What are the guru's using?
A few things that I would love to make life easier for me is to have ss64 as a hlp file that could be imported into the notepad++ plugin. I have sort of done something already to this effect. I used a program called httrack. It's a program that downloads whole websites. For me this is helpful because I'm not always online (I fly a lot for work). So, I dloaded SS64 and dostips to my computer. It's awesome, but something that could be integrated into something like a userdefined language in notepad++ would be amazing. I don't have the skills to write it, but like highlighting a command like for /f and right clicking and having the option to see ss64 has to say. Notepad++ is cool cause you can make your own plugins. I did make a laughable attempt at trying to understand how to do it. Needless to say I failed miserably.
Anyway, I know this is a lot of digression, but I am really curious, why do i have to be constantly refer back to ss64 for commands I should know by heart just to help me debug? Has someone created a smart debugger yet that I don't know about?
I know dostips have templates for functions you can dload, but i can't imagine you all go there everytime to dload them. So, where do you like to store your basic templates you use?
I would love to hear what you all do to save time or pullout that great macro you use.
Thanks in advance! Jules
A few things that I would love to make life easier for me is to have ss64 as a hlp file that could be imported into the notepad++ plugin. I have sort of done something already to this effect. I used a program called httrack. It's a program that downloads whole websites. For me this is helpful because I'm not always online (I fly a lot for work). So, I dloaded SS64 and dostips to my computer. It's awesome, but something that could be integrated into something like a userdefined language in notepad++ would be amazing. I don't have the skills to write it, but like highlighting a command like for /f and right clicking and having the option to see ss64 has to say. Notepad++ is cool cause you can make your own plugins. I did make a laughable attempt at trying to understand how to do it. Needless to say I failed miserably.
Anyway, I know this is a lot of digression, but I am really curious, why do i have to be constantly refer back to ss64 for commands I should know by heart just to help me debug? Has someone created a smart debugger yet that I don't know about?
I know dostips have templates for functions you can dload, but i can't imagine you all go there everytime to dload them. So, where do you like to store your basic templates you use?
I would love to hear what you all do to save time or pullout that great macro you use.
Thanks in advance! Jules
Re: Programming helpful tool suggestions
I use notepad but then I'm just an amateur
Something tells me this is not what you want to hear. 


Re: Programming helpful tool suggestions
check notepad++ marcos -> http://www.martinrinehart.com/frontend- ... acros.html ; http://stackoverflow.com/questions/5431 ... in-notepad
May be it's close to the the things you want
May be it's close to the the things you want

Re: Programming helpful tool suggestions
I'm no expert, and my batch files have been far from complicated or as elegant as the experts here, but I have been making batch files for over 20 years now.
My tools of the trade have been:
But my most important tool is actually the most simple--a piece of paper and a pen. I learned this when I took classes for C. I try to pseudocode what I want my batch file to do, what the variables are, how the loops work, etc. Once I get the logic down on paper, then it's time to code it. Along the way, if I discover a better method or a drop-in function, I revise my pseudocode. This has always made the 'thinking' part of batch file creation so much easier for me.
My tools of the trade have been:
- A good text editor that's open with the file I'm working on
- A command prompt where I can run the current version of the file.
- An open Internet browser with quick access to resources like dostips, etc.
But my most important tool is actually the most simple--a piece of paper and a pen. I learned this when I took classes for C. I try to pseudocode what I want my batch file to do, what the variables are, how the loops work, etc. Once I get the logic down on paper, then it's time to code it. Along the way, if I discover a better method or a drop-in function, I revise my pseudocode. This has always made the 'thinking' part of batch file creation so much easier for me.
Re: Programming helpful tool suggestions
Samir wrote:But my most important tool is actually the most simple--a piece of paper and a pen. I learned this when I took classes for C. I try to pseudocode what I want my batch file to do, what the variables are, how the loops work, etc. Once I get the logic down on paper, then it's time to code it. Along the way, if I discover a better method or a drop-in function, I revise my pseudocode. This has always made the 'thinking' part of batch file creation so much easier for me.
I entirely agree with you!

If your program/application is large enough so you must also write an user manual/reference guide/any documentation, try to completely write the documentation first (this requires a large dosis of patience) and then try to review it with the point of view of the user (this is not easy, it requires that you "forget" your previous knowledge!) so you can catch any flawn or problem in the design at this stage. Only when this step is complete, start coding; if you do so, the development of the program will have no problems.
Antonio
Re: Programming helpful tool suggestions
So the code is just proof of concept, hmm what an interesting ideaSamir wrote:I learned this when I took classes for C. I try to pseudocode what I want my batch file to do, what the variables are, how the loops work, etc. Once I get the logic down on paper, then it's time to code it.

The waterfall technique ?Aacini wrote:Samir wrote:But my most important tool is actually the most simple--a piece of paper and a pen. I learned this when I took classes for C. I try to pseudocode what I want my batch file to do, what the variables are, how the loops work, etc. Once I get the logic down on paper, then it's time to code it. Along the way, if I discover a better method or a drop-in function, I revise my pseudocode. This has always made the 'thinking' part of batch file creation so much easier for me.
I entirely agree with you!I would like to add just one point more:
If your program/application is large enough so you must also write an user manual/reference guide/any documentation, try to completely write the documentation first (this requires a large dosis of patience) and then try to review it with the point of view of the user (this is not easy, it requires that you "forget" your previous knowledge!) so you can catch any flawn or problem in the design at this stage. Only when this step is complete, start coding; if you do so, the development of the program will have no problems.
Antonio
It really depends on your definition of large, as it can be turned around just as well ;
if you do so, the development of SMALL programS will have no problems.
The larger the project the less the waterfall technique is desirable, the risk of failure becomes too high. Many requirements have to be changed or forgotten about during implementation. Large project have a better chance of success if developed iteratively. ( Craig Larman )
Re: Programming helpful tool suggestions
Very interesting. I bet this methodology can be applied to business workflow processes as well...hmmm...Aacini wrote:Samir wrote:But my most important tool is actually the most simple--a piece of paper and a pen. I learned this when I took classes for C. I try to pseudocode what I want my batch file to do, what the variables are, how the loops work, etc. Once I get the logic down on paper, then it's time to code it. Along the way, if I discover a better method or a drop-in function, I revise my pseudocode. This has always made the 'thinking' part of batch file creation so much easier for me.
I entirely agree with you!I would like to add just one point more:
If your program/application is large enough so you must also write an user manual/reference guide/any documentation, try to completely write the documentation first (this requires a large dosis of patience) and then try to review it with the point of view of the user (this is not easy, it requires that you "forget" your previous knowledge!) so you can catch any flawn or problem in the design at this stage. Only when this step is complete, start coding; if you do so, the development of the program will have no problems.
Antonio
Re: Programming helpful tool suggestions
I never thought of it that way, but that's definitely one way to describe it.Ed Dyreen wrote:So the code is just proof of concept, hmm what an interesting ideaSamir wrote:I learned this when I took classes for C. I try to pseudocode what I want my batch file to do, what the variables are, how the loops work, etc. Once I get the logic down on paper, then it's time to code it.

Re: Programming helpful tool suggestions
Remember that computer problems are not solved in the computer, but in the human brain; the computer is just a tool that the human brain use to test and achieve the solution.
Antonio


Antonio
Re: Programming helpful tool suggestions
Too err is human. To really screw something up requires a computer.
-
- Posts: 81
- Joined: 19 Nov 2013 00:41
Re: Programming helpful tool suggestions
I get where you're going with writing everything out. I usually draw up an outline. I guess I just figured some of you had some windows tools that move things along a little quicker for you. After 25 years of programming figured you'd get annoyed when you're running a batch file and you're scratching your head for hours going, why the hell isn't this working? Only to figure out the next day.. DOH!!! I forget to add a "!" to the end of that variable. Stupid annoying things like that. Sorta seems there should be a file checker, like a spell checker in word. Highlight possibly missing a variable symbol here or this echo will echo nothing, this variable will be empty. AutoHotKey at least runs a check first (of the whole file) before running, it even points to where the issue is. Just seems odd that no one has created a program like this yet for bat.. And no.. I can't make it. I've only just started writing bat scripts. I'm not a programmer.
Re: Programming helpful tool suggestions
julesverne wrote:Sorta seems there should be a file checker, like a spell checker in word. Highlight possibly missing a variable symbol here or this echo will echo nothing, this variable will be empty. AutoHotKey at least runs a check first (of the whole file) before running, it even points to where the issue is. Just seems odd that no one has created a program like this yet for bat..
Advanced Batch is based around tips and tricks and undocumented behaviour, and that behaviour changes even more as further bugs and tricks are found.
It would be a daunting task to create a complete and fully featured syntax checker - but there are editors with batch syntax highlighting that can help in many ways.
Re: Programming helpful tool suggestions
This would definitely be a neat idea. And you're right as I can't see why someone hasn't made one yet, at least for basic batch files.julesverne wrote:I get where you're going with writing everything out. I usually draw up an outline. I guess I just figured some of you had some windows tools that move things along a little quicker for you. After 25 years of programming figured you'd get annoyed when you're running a batch file and you're scratching your head for hours going, why the hell isn't this working? Only to figure out the next day.. DOH!!! I forget to add a "!" to the end of that variable. Stupid annoying things like that. Sorta seems there should be a file checker, like a spell checker in word. Highlight possibly missing a variable symbol here or this echo will echo nothing, this variable will be empty. AutoHotKey at least runs a check first (of the whole file) before running, it even points to where the issue is. Just seems odd that no one has created a program like this yet for bat.. And no.. I can't make it. I've only just started writing bat scripts. I'm not a programmer.
Re: Programming helpful tool suggestions
Having something that could point out what it thinks are syntax issues and such would work though, wouldn't it? Like in Borland Turbo C when it would issue 'warnings' about certain parts of the code even though it would still work if you knew what you were doing.foxidrive wrote:Advanced Batch is based around tips and tricks and undocumented behaviour, and that behaviour changes even more as further bugs and tricks are found.
It would be a daunting task to create a complete and fully featured syntax checker - but there are editors with batch syntax highlighting that can help in many ways.
Which editor has batch syntax highlighting? I want!
Re: Programming helpful tool suggestions
They have been made, I've seen someone on youtube who wrote a batch-editor with syntax checking and highlighting. Then I realized I was wasting my time when the guy gave an example of his program fixing an error which was not an error obviously. The reason he gave trying to convince that it was an error, convinced me he was a batch script kiddy.Samir wrote:This would definitely be a neat idea. And you're right as I can't see why someone hasn't made one yet, at least for basic batch files.
Creating an editor is not too hard and is not the reason obviously, if it were easy it would have been done already, as foxidrive said previously; it's veryComplex, too many variables, too many exceptions to take into account, too many different behaviors on too many platforms.
I can't stop youSamir wrote:Having something that could point out what it thinks are syntax issues and such would work though, wouldn't it?

Code: Select all
%= =%set ^"exit_=for %%? in (1,2) do if %%?==2 (set ?=^&for %%? in (^!*^!) do set ?=^!?^!¦%%?%$n1c%
%= =%if ^!?^!.==. set ?=^"^")^&for /f ^"tokens=1-26delims=¦^" %%a in (^"^!?^!^") do (for %%? in (1,2) do if %%?==2 (for %%? in (^!~^!) do (if ^!§inline^!.==. echo(%$n1c%
%= =%set/a$debug+=1,$err=0,§inline=1%$n1c%
%= =%set $trace=%%~?%$n1c%
%= =%set $debug.^!$debug^!=%%~?%$n1c%
%= =%set $%%~?.p=^!*^!^&if ^!*:~0^^,1^!==^^^^^^^! set $%%~?.p=^!*:~1^!%$n1c%
%= =%set $r=$err))else set ~=exit_%$n1c%
%= =%echo(^&^<nul set/p= ^!$trace^!^^(%%~a;%%~b;%%~c^^)%$n1c%
%= =%if defined $sysTemp.fullPath if /i ^!$script.path^! neq support (set _=^!$function.fullPathFile^!^&if ^!$NDF^!.==. for %%? in (1,2) do if %%?==2 (for %%? in (^!*^!) do set ?=^&set ?=^!%%~?^!^&^&(set ?=^!?:^"=^"^"^!%$n1c%
%= =%call set ^"?=%%^^?:^^^!=#^"#^"^^^!%%^"%$n1c%
%= =%set ^"?=^!?:^^=^^^^^!^"^&set ^"?=^!?:#^"#^"=^^^!^"%$n1c%
%= =%set ?=^!?:^"^"=^"^!%$n1c%
%= =%set %%~?=^!?^!))else set *=_%$n1c%
... ... ...
