开发者

How can I reduce the edit, compile, debug cycle?

One thing that has always gotten to me when using compiled languages, (I use Delphi and FreePascal) the tedious edit, compile, debug cycle. It has been growing worse of开发者_StackOverflow社区 late that now I am beginning to dread the whole process any time I have to make some changes, especially when they are just minor GUI changes.

I have to wait for what is now approaching 60Mb of debugging enabled exes to be generated every time before debugging can start and I'm afraid I am beginning to show signs of an ADD. I tend to approach development with what I can do in the mean time whilst stuff is cooking.

The problem is the is duration too long to be staring at the screen, and too short to give something else your attention before coming back to it.

I guess for compiled languages ObjectPascal isn't bad, I believe it is even worse for C++ programmers.

I may have to get a hex core CPU with 24Gb of RAM, and the fastest SSDs to make the process tolerable. Some hosting providers are doing them for circa €100 a month.

Now to Business

Quite simply I am thinking of a way to create the application in parts, so that the parts containing the new functionality can be developed separately as standalone programs, perhaps even console programs.

This raises the question of how procedure parameters and results can be passed, and these are the options that have initially come to mind.

  1. Find a way to automatically translate simple variables, record structures, or objects into text and pass them via the command line or pipes. Perhaps JSON, XML or simple name-value pairs can be used here. Designing the parameters as TPersistent objects that are streamed into text form may be a better option here.

  2. Rather than using the command line, make them network services and pass the parameters that way, or may make them RESTful/XML-RPC with all the new webby stuff( I am getting into some of that stuff now)

  3. Design them as DLLs initially - I suspect that will bring along a different set of problems.

Once they are well tested I can incorporate them into the main executables.

I suspect that others have come across this problem before, with ObjectPascal and perhaps other languages and have found a way to mitigate the problem.

If I have to do business as usual, will using stuff like interfaces help?

I really need some help here or else I may have to resort to PHP(gasp!!) or even Java (bigger gasp!! shock!! horror!) or Zen (not the programming language)


Integrate an interpreted language into your application. If you have a C-compatible language (I'm no expert on Delphi or FreePascal) you could easily integrate a number of common interpreted languages, like Lua, Python, or JavaScript.

Equally, I'd say that if you're recompiling the whole thing because you made a GUI change, then it's time to alter your build process. Compile the different modules into different libraries and only recompile the library in question. This also helps to enforce encapsulation, as it's impossible for one DLL to call another DLL with a non-exported function.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜