Autoupdating when during Write-and-test stages - autocad

This is a general question and not related to a specific bit of code.
How do you work when writing and testing a routine? My autocad doesn't "react" when I update the code with Notepad, so I have to close the file, open it again and then (load "filename") again.
I'm sure there is a better way to do this, but I've searched a bit but couldn't find (or couldn't understand) the answers. Thanks

I would strongly suggest using the development environment provided freely within AutoCAD to write, test & debug your code. This utility is known as the Visual LISP Integrated Development Environment (VLIDE).
I have written a basic introduction tutorial describing how to access & use this environment, but you can also find a wealth of information in the standard documentation provided by Autodesk.

Related

Installing environment for GO programing language

I would like to start programming in GO. As I am a Windows user, I understand that it possible to do so using the GO plugin for NetBeans.
Until now, I have written GO programs in text files and run them using the command prompt, but I prefer to use another platform/environment so I would be able to debug the programs.
The code examples in this forum are syntax highlighting and seem to be taken from an environment like Visual Studio. Does anyone know about the environment?
I would appreciate a simple solution. Thank you! :)
IDEs built specifically for Go and still actively maintained:
LiteIDE: http://code.google.com/p/golangide/
Portable and fast with build in debugger
GoWorks: http://tunnelvisionlabs.com/products/demo/goworks
Based on NetBeans 7.3, standalone application or NetBeans plugin
Googling you can find several IDE, for instance:
http://go-ide.com/ or
https://code.google.com/p/goclipse/
You may find this question gets closed as it's quite subjective, and a FAQ. However, the simple answer: from your description, it seems likely that you would be comfortable with goclipse.
More complete answer: there is no "one true environment" for Go development. The code examples you see here are coloured using Stack Overflow's syntax highlighter, and were submitted in plain text. You'll probably find highlighting and utilities available for most major editors. For example, I use Vim which has a plugin to run gofmt on the current buffer.
I believe some Windows users are fond of Sublime Text 2's GoSublime plugin. A more complete list of development tools can be found here.
You don't really need an IDE to develop using Go. I'd encourage you to spend more time working with a good editor and the command line. Getting to know the tools already distributed with the language is essential IMHO (go, godoc, gofmt). See also Debugging Go Code with GDB.

Documenting Visual Basic 6.0 code [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I have just recently been asked to document 10 years worth of VB6 development done by one person. It's been some time since I looked at VB6 code myself, so I'm basically wondering if anyone has any tips for how best to go about it.
Is there any good software, free or not, which would do something similar to javadoc out there for VB6, that could be helpful?
Or just if anyone have any suggestion for tools / methods on how to do this. Any tip would be greatly appreciated.
You can try VBDox, which is a free VB6 source code documentation generator.
You may find my add-in, Atomineer Pro Documentation helpful. It can generate and update JavaDoc, Qt, Doxygen and Xml-Documentation comments in source code (Visual Basic, C#, C++/CLI, C++, C, Java, unrealscript), and you have a lot of control over the format it produces.
(edit: please note that this addin only works in Visual Studio versions from 2005 onwards, so you cannot use it in VB6, only to document old VB6 code using a newer version of Visual Studio. Once documented however, it can still of course be reloaded and compiled in VB6)
(You could say it generates the "boilerplate" documentation for you, but it generates a lot more than just a basic boilerplate skeleton - it fills in as much detail as possible to minimise the amount of additional documentation you need to write)
So it doesn't create external documentation from the comments (like JavaDoc), it creates the comments themselves - so you would still need another tool to generate the external documentation. However, AtomineerUtils would save a lot of time if you have to generate new documentation comments for existing (undocumented) code, or if you already have the code commented/documented in a Javadoc style, AtomineerUtils can process the documentation comments to convert them to Doxygen or XML Documentation formats, which may help you to gain compatibility with other tools (Sandcastle, etc) that can build external documentation for you.
To generate the external documentation from source-code comments, Doxygen is a leading (and free) external-documentation generation tool that can build documentation from JavaDoc, Qt, Doxygen or Dcoumentation-XML format documentation-comments, and is well worth trying out.
I used to code in VB6 a loooong time ago, and I never encountered any decent tools that helped with documentation in the Javadoc sense.
I would approach this from the angle of what needs to be documented: is it for developers to understand the API or is it for a user to work with the application? Assuming the former, then what is the bare minimum that you can get away with such that a developer can follow what is going on? You may be able to avoid documenting every method, and just provide a general hand waving use case based approach that could be separate from the code entirely and be based on your explorations. A few good diagrams goes a long way to transferring understanding.
If it is for the user to work the application, then you're into the realms of the help compiler. You might be lucky and find one of this lot is still available: http://help-compiler.qarchive.org/
Alternatively, if it must be the equivalent of Javadocs or you don't get paid, then you may want to consider writing a tool to scan over the source code and do a large portion of the boilerplate parameter filling for you. A tool like Unix AWK can really help here.
Our VBdocman does exactly what you need. It uses javaDoc comments and it can generate several output formats.

Creating a scripting language

Can somebody please guide me in the right direction of creating a scripting language that targets the WSH (Windows Scripting Host)?
I have googled for it, but there seem to be far fewer links related to this than when I originally searched for it a few months back.
THank you
The product is now called "Windows Script Host". The MSDN documentation suggests that what you want is a Windows Script Engine, about which the documentation claims that you can create one for any programming language or environment—presumably including one you create yourself. Beyond that, the documentation is not terribly clear.
You should be able to find all necessary information about creating Windows Script engines on MSDN; other than that there seems to be no resources available (at least I couldn't find any). You can also take a look at some open-source engine implementations to get the idea of what your code should look like:
PHPScript
ActiveScriptRuby
Open Object Rexx
If you have any specific questions about implementing Windows Script interfaces, feel free to ask them here. Good luck!
Topic starter need to carefully read the script56.chm, which can be found on MSDN. This help file describes WSH engine specification.

Methods for debugging NSIS installers?

Although NSIS allows you to build quite powerful installers, the "so low level language that it reminds me of assembly" that NSIS uses is quite prone to making mistakes and therefore, when you want your installer to do something more complex other than writing files, debugging is a must.
Until now I've used the following Dr Printf-like debugging technique:
In a .nsh file that I include everywhere, I define a NSIS_DEBUG_MSG macro according to the value of a DEBUG define
if DEBUG is on, the macro will trigger a MessageBox with the debug message
if DEBUG is off, the macro will do nothing
This method has served me well but it presents some disadvantages:
it requires me to fill the code that I feel it's the one failing with calls to NSIS_DEBUG_MSG and rebuild the installer several times until I get enough info to allow me to solve the problem
it will do me no good if my problem is that the installer itself fails (if the installer program dies)
So what I wanted to know is what debugging methods do you use for these installers so that hopefully I can improve mine.
During my time using NSIS, there is these things noticeable:
I have found out that nothing is more powerful than parsing !verbose 3 level output with self-made tool ;)
I have found out that you can NOT depend on any NSIS-based debugging method. It may crash .. and your installer will crash along with it. No pretty, eh'? :(
I have found out that enabling/disabling debugging on-demand is also very powerful weapon against idsses as it allows to distinguish between unstable and failed NSIS build ( it is easier to use CI terminology though... :) ).
I have found out that verbose output w/o realtime automated NSIS testing is like driving Cadillac with bicycle engine :)
Hope it helps for those accidentally visiting this question :)
EDIT: It's always good idea to start with 3rd party tools. For example, no need to hassle around GUI as it is always easier to use tools like:
EclipseNSIS ( I do not like it though :P )
NSIS Dialog Designer (http://nsis.sourceforge.net/NSIS_Dialog_Designer)
Self-made static code analyzer. I have made one for myself :P
EDIT #2: I have found out that pretty effective method for debugging is to use direct documentation automatization. Currently I use the following components:
http://nsis.sourceforge.net/NsScreenshot_plug-in ( See IMPORTANT NOTES to have no unexpected surprises... )
http://www.dokuwiki.org/cli#dwpagephp ( See this link for more information: http://www.microsoft.com/web/platform/phponwindows.aspx )
The result is that I got screenshot after nsDialog:Show plus I got updated images in wiki :) .. only stuff left is to fetch info from svnlook :)
EDIT #3: And the need of svnlook is also worked-around by building a svn log --xml exporting DLL using NSIS v2.44 header for Delphi and Lazarus IDE 0.9.30.2 :) Kudos to Lazarus!
Woohoo! :)
EDIT #4: Hit this small discussion here: http://forums.winamp.com/showthread.php?t=325521
What have saved me much time is to use the logs that are created by NSIS. Both the log while compiling the scripts, and the installation log. They allows me to check that the macros I have defined is in use, and that the installation actually run the scrips they should.
It might seem too little, but this is actually everything I need to keep my installation software of 50+ nsh files running, along with the divide an conquer principle.
You can download one of the special builds of NSIS from the official site that has advanced logging. This will give you very detailed logging information that makes debugging easier.
I use the DumpState plugin a lot, much better than a basic messagebox for stack issues. I alse tend to use a macro that sets all registers; $0=r0,$1=r1 etc so I know the stack is in the correct state. This is of course only useful during the design phase and not so much for debugging on the end users system...

Black Box testing software

We are about to get a canned package in that has been modified to our needs. I'm part of the team setup to prepare tests for it. It has an Oracle back end and I believe it's written in C++ .NET.
My question is what free or open source testing tools would you recommend.
Thanks
Ken
For regression testing of our applications I use a free tool called AutoHotKey http://www.autohotkey.com/. It is simple, batch configurable, and can work for virtually any application you have. Not exactly designed for black box testing, but a good free tool to add to your toolbox.
While there are a few good commercial applications for black box testing of applications (HoloDeck http://www.sisecure.com/holodeck/index.shtml, Cenzic Hailstorm http://www.cenzic.com/), the only open source applications that I know about only test network security (Spike http://www.immunitysec.com/resources-freesoftware.shtml, OWASP WebScarab http://www.owasp.org/index.php/Category:OWASP_WebScarab_Project, and Nikto http://www.cirt.net/nikto2)
Value checking. See if only valid dates are exempted, number fields except the full range, ect.
What do you expect from such a tool? I don't know of any tool that can arbitrarily test any piece of software.
For what is sounds like you already know what it is that you want to check. Being a custom application your best bet would be to devise a test plan and manually test the values that you would like to validate.
Agree with the others - since the application has been modified to your needs, you should make sure that it actually is modified to your needs.
If the assembly isn't obfuscated, you can use FxCop to analyze the binaries and see if there are any critical bugs (note - if you're not familiar with fxcop and static analysis, find someone who is before reporting a ton of bugs that won't be fixed).
Beyond that, you're looking at more techniques vs. tools to get the job done.
Testing, either functional or non-functional, without reference to the
internal structure of the component or system.

Resources