IDE settings

Questions and discussion about the ZBasic IDE.
twesthoff
Posts: 247
Joined: 17 March 2006, 6:45 AM
Location: Fredericksburg, VA

Post by twesthoff »

pjc30943 wrote:Anyone figure out yet how to turn off jumping to errors after compiling?
I have to agree. I would love to have this feature. The main thing that wastes time for me while programming is that the cursor does this. I would love to have the cursor stay where it last was so I can concentrate on the problem area of the code.

Now every time I compile, I have to either scrool back or use the search to find where I was working. When you have a very large program, this is time consuming.

I still like to see the errors as they often remind me of things I should do...
I would like to see an option to have the errors be first, and the warnings start after the the errors.
Tom
mikep
Posts: 796
Joined: 24 September 2005, 15:54 PM

Post by mikep »

twesthoff wrote:tI have to agree. I would love to have this feature. The main thing that wastes time for me while programming is that the cursor does this. I would love to have the cursor stay where it last was so I can concentrate on the problem area of the code.

Now every time I compile, I have to either scrool back or use the search to find where I was working. When you have a very large program, this is time consuming.

I still like to see the errors as they often remind me of things I should do...
I would like to see an option to have the errors be first, and the warnings start after the the errors.
Tom
Having seen the source code to the IDE, I'm sure Don could add an option to control the cursor position after a compile.

I personally like to code, compile, execute small portions of a code at a time so usually compile errors are localized to the code I just wrote.

If you have a huge amount of code in one file, I would think about dividing up your program into multiple modules(files). Each module can have a defined public interface as well as private internal routines.
Mike Perks
twesthoff
Posts: 247
Joined: 17 March 2006, 6:45 AM
Location: Fredericksburg, VA

IDE settings

Post by twesthoff »

mikep wrote:I would think about dividing up your program into multiple modules(files).
Maybe its just me, but having a program split into many small files is irritating and difficult to use. I then have to try to remember which file the code is in too. I often look back at previous routines to see what it does. That is the main reason I hate programming in C, all of the many files that are used make it very difficult to find where a constant is defined or where a function is located. Its probably just me, but if the whole program is in one file, I can find everything easily.

I sometimes put general purpose routines in a separate file, or some application specific things in another file. That make at most 2-3 files I have to deal with. Maybe its only me...
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

pjc30943 wrote:Anyone figure out yet how to turn off jumping to errors after compiling?
It appears that adding the line below to your User Properties file will prevent jumping to the first error.

Code: Select all

output.goto.message=0
- Don Kinzer
Don_Kirby
Posts: 341
Joined: 15 October 2006, 3:48 AM
Location: Long Island, New York

Post by Don_Kirby »

dkinzer wrote:

Code: Select all

output.goto.message=0
That did the trick. Compiles faster as well, as the IDE doesn't switch between modules during during the process (apparently following errors, warnings, and #Notice statements).

-Don
Don_Kirby
Posts: 341
Joined: 15 October 2006, 3:48 AM
Location: Long Island, New York

Re: IDE settings

Post by Don_Kirby »

I know I'm off topic here...
twesthoff wrote: Maybe its just me, but having a program split into many small files is irritating and difficult to use. I then have to try to remember which file the code is in too[...]
I find the opposite easier. The application I am currently (and have been for a while) working on consists of 2500 lines, 10 modules (files), 35 Subs/Functions, 8 Tasks, and a slew of variables, constants, and persistents.

To put all of that into 1 giant module would make navigating the application tedious at best. As it is, sometimes I feel like I am scrolling forever. I use Toggle Folding often to combat the problem further.

To be fair, most of the modules don't have much code at all; one of them is just a change log; another is only global variables (mostly persistent variables). Still, I've made it a point to keep everything organized and well commented.

I've been increasing the encapsulation as the application evolves, meaning that there are variables declared all over the place, constants included. Although it is safe to put constants in the Globals module, I've decided to try to keep each sub and/or function as self sufficient as possible.

I rarely have the problem of finding a particular piece of code, as related code sections are grouped in the same module. Of course there are exceptions to this rule, but a comment block at the beginning of each module reminds me of such occurrences.

I know that there are better editors available, but coming from VB6 (and no scroll wheel) the SciTe editor is more than efficient. One click opens the editor, including all of the applications files, which avoids me forgetting which modules I need to load.

That said, I'm a strong believer is doing what works. If you find it easier working as you do currently, by all means, keep doing it. It's all about productivity anyway. On the other hand, there's a chance that you aren't fully using the IDE to its' fullest ability, in which case, you might find that you can further increase your productivity by implementing some of the features that the IDE offers.

-Don
stevech
Posts: 715
Joined: 22 February 2006, 20:56 PM

Post by stevech »

I use individual files, where each file is a complete function, such as all the code to interface with chip xxx, or all the code to do a state machine, etc.

I choose file names carefully.

The files show up as tabs across the IDE window, so hopping between files is quick.

Another motivation for this is easier code reuse.
pjc30943
Posts: 220
Joined: 01 December 2005, 18:45 PM

Post by pjc30943 »

Thank you Don. Works perfectly; this makes using the IDE ten times more fun.
Post Reply