What flow of programming and tools do you use?

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

What flow of programming and tools do you use?

Post by Jorg »

Just a more generic question to you guys. Everybody has their beloved tools to make life easier for programming. It would be nice to see people list all tools they basically use to program an app. Maybe someone will discover another programmer is using THE tool he/she never knew existed!

For programming I start like:
1. Use UltraEdit to make my first class setup. Simply copy and alter some existing files.

2. I use DialogBlocks when I create a GUI app. It takes about 5 minutes to get a good GUI overview, and a starting point of from where I will start with my design.

3. Create a CMakeLists.txt which I use for CMake (http://www.cmake.org) to generate my initial project files. This looks like;
PROJECT(WXGEN)

#wxWidgets build related stuff
SET(WXW_USE_DEBUG ON)
SET(WXW_USE_UNICODE OFF)
SET(WXW_USE_SHARED OFF)
SET(WXW_USE_UNIV OFF)
SET(WXW_USE_MONO OFF)
SET(WXW_FILE_VERSION "26")
SET(WXW_VERSION "2.6")

INCLUDE (${WXGEN_SOURCE_DIR}/bin/FindwxW.cmake)

INCLUDE_DIRECTORIES(${WXGEN_SOURCE_DIR}
${WXGEN_SOURCE_DIR}/lexer
${WXWIDGETS_INCLUDE_DIR})

LINK_DIRECTORIES( ${WXWIDGETS_LINK_DIRECTORIES} ${WXGEN_BINARY_DIR} )

SET(CMAKE_CXX_FLAGS "${CMAKE_WX_CXX_FLAGS}")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D__WXDEBUG__ -DWXDEBUG=1")

IF(LINUX)
ADD_DEFINITIONS( -DLINUX=1 )
ENDIF(LINUX)

SUBDIRS(lexer generator)
This generates my projects. I always use "out of source builds" which means my source is at: z:\src\someprj and I build from z:\builds\someprj-debug this is a neat feature from CMake so my source dir won't get polluted with intermediate files.

4. After it compiles for the first time, then it is check in time. I use SuperVersion (http://www.superversion.org/) for the job. Why? I have used SVN for a while, and I hate the super large repository it leaves in your code tree, the lack of proper branching and not to mention it is so slow when you use it in combination with a mem stick. SuperVersion is a JAVA tool which uses the Smythe database. It is platform independent and it works like a charm on Linux as well as on Windows, with a centralized repository which checks your work dir and finds the match of the current version of the code in the database. With an USB stick checking in a large source tree on SVN can take up to an hour (no kidding) and with SuperVersion a few minutes. It uses file chunks instead of small files which is where the USB stick write speed is not so limiting.

5. For the remainder of the programming project I will use Visual Studio .NET as my programming platform is mostly Windows. Under Linux I simply use Kate or GEdit, which is ofcourse not so powerful. When I add files to the project, I regenerate my CMake project for the changes. My check in behaviour is; as long as it compiles, and after every change I did in my head which is significant. Also ofcourse when changing something big like refactoring, first check the old code in, mark a tag so you know what might have broken it later on.

6. Now, a tool that really proved to be invaluable is TodoList by AbstractSpoon (http://www.abstractspoon.com) which is a freeware windows only (unfortunately) Todo List manager. It's strength lies in it's simplicity and the author's enthousiasm to add anything people ask, making it a very good manager. One of it's strong points is that it saves in XML, and can archive the tasks that are done. This archived list is a seperate file which gets merged with new done tasks whenever they are done. In this list I add my ideas, and during programming I add things to do, and things I encounter that need attention later. I always make a This release and a Next release section. When I get feature requests I judge where to put them, also for future enhancements I think of myself, I let them 'brew' in the next release section first, so they won't distract my goal of getting a first release.

7. For compression of the final exe, I use UPX (upx.sourceforge.net). Which is a good tool to compress the slightly big wxWidgets exe code. I noticed you need to make sure that the resource section does not get compressed, or you lose your icon for windows. The upx command line I use is;
upx -9 --force --compress-resources=0 somefile.exe
Which gives great results.

8. For documentation generation I used to use RoboHelp. But the pile of files that app created is surely unbvelievable. It also is not even sure what I can check in my revision control syetem and what not. I am now using Doxygen because in CMake I can create a target that automatically generates doxygen help during a build. This really takes away a lot of effort, and it is suitable enough to create API documentation, and even user documentation. In CMake you can create an entry like;
OPTION( MAKE_DOXYGEN "Generate doxygen documentation for the treemultictrl" ON )
IF(MAKE_DOXYGEN)
ADD_CUSTOM_TARGET(api-docs ALL ${DOXYGEN}
${TREEMULTICTRL_BINARY_DIR}/docs/Doxyfile DEPENDS
${TREEMULTICTRL_SOURCE_DIR}/doc/Doxyfile.in )
ENDIF(MAKE_DOXYGEN)
This will give the option to create it during a build. Also, it will use the file Doxygen.in in which I can set some project specific information like the latest version, project name, path etc. which are generated by CMake after copying the file to the build directory.

9. For changelog generation, I look at what I did with TodoList. In the archived version of my todo list, I rename the "Current Release" to e.g. "v1.08" which is the change log release for that version (older versions will stay in the archived list too). Then I simply look at what relevant changes were, rephrase them a bit, add proper credit to people helping me out, or solving the bug. Then I copy and paste the contents of that version in a changelog.txt file. Now, TodoList also knows how to transform XML to any other output using XSL language. So what I will do in the future is write a small script that generates a changelog.txt from all versions I have in the archived todo, plus extra info like when it was fixed, how long it took etc. The XSL can be used to create HTML too.

Also a very neat thing I want to try is posting the latest generated TODOLIST (from HTML) to my site, so people can see an update of what I added to the todo list, what I already done, etc. I need to dig deeper in this, but I reckon I can use a simple batch file that first transforms the todolist xml file in a do-did-done list showing what needs to be done, what I did since last upload of the list, and what is already done. This will give people some live feedback on a project, and all it requires is a FTP client, and one of the many XML transform tools out there.

10. For creating an install package I use InnoSetup (http://www.jrsoftware.org/isinfo.php in combination with ISTool. Very powerful installer which is yet very simple to use and very well documented.

11. For distribution I usually use my site, to tell as much about the app as possible, and find forums and usenet groups that are appropiate to announce this release. Sometimes I also use free software sites to register my application like www.programmersheaven.com. They have a lot of info and freeware applications as well. I try to keep the help online as well for my components so I can always update those with the latest versions.

There, this is about it for my tools. I hope it was informative and I hope others will also post some of their traits and how they come to a software release. Allbeit not as extended as I wrote the introduction! :-)

Regards,
- Jorgen
Last edited by Jorg on Wed Jan 18, 2006 8:41 am, edited 1 time in total.
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
Frank
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 211
Joined: Sat Jan 01, 2005 6:19 pm

Post by Frank »

Here's my list.

I'm using DialogBlocks for the GUI.

Visual Studio 2003 for Editing/Building/Debugging etc

Mantis for Bugtracking/ToDo-List

Subversion for Version-Control

IconXP for creating icons

Installer is selfmade.

Packing... No. I used to use UPX too, but since we had some trouble on machines with WinXP SP 2 and DEP activated we no longer use it.

Online-Help... Plain Text Editor. But I'm looking for a good WYSIWYG-Editor for good looking HTML-Help.
qgranfor
Experienced Solver
Experienced Solver
Posts: 89
Joined: Sun Aug 29, 2004 7:32 pm
Location: ND...USA
Contact:

Post by qgranfor »

VisualWX for the GUI
Codeblocks for IDE
GCC for compiler
Installshield for installer
WinCVS for version control
wxWidgets 2.6.0 for ease of cross-platform development
Codecounter for the kicks of seeing how much code I really have
Helpmaker.NET for the building of CHM help files
MySQL Front for maintenance of the DB's I have
phpBugTracker for bug tracking and to-do list
dotProject for project tracking and management
User avatar
Ryan Norton
wxWorld Domination!
wxWorld Domination!
Posts: 1319
Joined: Mon Aug 30, 2004 6:01 pm

Re: What flow of programming and tools do you use?

Post by Ryan Norton »

BRILLIANT. Stickied :).

Before I left as a wx-dev I pretty much just used MS Visual C++ 6.0 for everything without anything special. Since then its changed considerably.

Note that I don't use WX really at all anymore (in fact I'm still amazed I know so much and can comment at all). I don't use project generators currently because 99% of my work is done from windows codewarrior which targets windows classic mac and OSX which is really 3 major platforms (windows,mac,unix) and all I need. If I end up using kdevelop and MinGW a lot I'll probably making some kind of project generator for my own uses.

Note that you haven't done REAL(TM) development until you've taken a look at THE LIST

http://www.hanselman.com/blog/ScottHans ... lList.aspx

1. If its some kind of API, I usually write it down on a piece of paper first. I find this catches a lot of mistakes...

2. 99% of time I just code my GUI interface out, maybe doing a quick sketch first. If its really complicated though, DialogBlocks works wonders.

3. If I'm going to WX I use Microsoft Visual Studio Express. The problem with it is that its really slow opening files in big project files like WX. If I'm not using WX I use CodeWarrior for windows (not sold anymore unfortunately - no clue whether you can use WX with it) - its fast and easy to configure and you can compile for mac.

4. Before I do anything I set the compiler settings.

I'm getting to the point where I feel comfortable always compiling in release mode... I rarely use the debugger anymore. If I need to do real debugging I use WinDbg (http://www.microsoft.com/whdc/devtools/ ... fault.mspx). (A little assembly knowledge helps with this too -http://blogs.msdn.com/oldnewthing/archi ... 55800.aspx).

Always compile for small code size BTW, the speed gains for faster code etc. are generally not worth it. Also, max out warnings, turn on warnings as errors, turn on ANSI-stubburnness since GCC will give errors for those things. Don't forget to turn on auto inlining (let the compiler do it, rather than you, it probably knows better).

If I don't use WX I also compile without the C runtime for a lot of reasons - but I'm not going to go into that since WX requires it and the wx-devs wouldn't recommend compiling without it. You can look at my blog to find out more if you really want.

(If you're a GUI editor don't forget tabs-as-spaces)

5. After I have my project working windows (as mentioned I use WinDbg if I really have to), I make sure it compiles in mac in codewarrior. If I do heavy GUI stuff for mac I might boot into OSX at this point and use Project Builder.

6. After that works I make a project file for MinGW Developer Studio and make sure it compiles in this - as long as I don't use any unix-specific code I will know pretty much that it will compile on unix at this point.

7. If I do use some unix-specific code, I use cygwin to compile it. If I use some GTK-specific stuff I boot into linux instead and use KDevelop to put the finishing touches on it.

8. At this point I document the code. I usually use a wiki for that (its the next step in code-documenting evolution, leave latex and doxygen behind :) - note that wiki programs like my WikiServer can convert all your wiki pages to HTML for distribution), but for large sources I may consider using some kind of home-brewed documentation generator that converter that "converts" the docs into wiki syntax.

9. At this point I check my code in to whatever version system there is. Note that this implies that I don't really use version system of my own. I of course use tortoisecvs and putty for sourceforge because its a freakin' life-saver on windows.

10. Now I'm done and make the release (or pre-release). Like Jorg I might use freeware sites like programmersheaven.com.
[Mostly retired moderator, still check in to clean up some stuff]
Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg »

Great! Well I am always looking for better ways to do stuff, and a lot of those things we do without thinking about it nomore. But it is nice to see how others approach the problem..

Anybody else wants to contribute? Maybe on my new site I can make a 10 steps plan with all major actions in a source development lifetime and list the best tools and tips and tricks there..

Ohh I might mention that I learned that; "options in an application are usually deviations of the intentional design. The developer doesn't like the features, but the users do." Most of the time my options come from user requests when something needs to be done differently, but personally I don't like it to be that way ;-)

- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
wyo
In need of some credit
In need of some credit
Posts: 9
Joined: Thu Apr 21, 2005 8:03 pm
Contact:

Post by wyo »

Obviously I start out any new project from wyoGuide (http://wyoguide.sf.net). I start first on Windows because I greatly prefer the debugger of VC++, as much as possible of the debugging is done with VC++. Besides that I use Windows and Linux intermixed because wyoEditor is available on both.

1. I duplicate the wyoGuide-Demo to the new project directory and change all names to the new ones. Then I drop all the files onto wyoEditor and change all names inside the files. With the help of the global to all sessions history in the find/replace dialog it's really no big deal. Depending what I want to get I remove some excess code and change application info, etc. I also edit the VC++ project files and the Makefile right away.

2. Now my new app is already buildable besides some typing errors which I just check with VC++. I usually have both wyoEditor and VC++ open. If everything builds fine I put it put under CVS (WinCVS, GCVS) even if it doesn't do much so far. Now I can concentrate on adding the features I actually want this app doing.

3. From now on I really only have to add any new source code to the project, VC++ project file and Makefile are already correct. All what's needed is to add a new file name from time to time.

Besides wyoEditor I uses VC++ on Windows and GCC, MAKE, GDB on Linux. Thanks to wxConfig all my Makefiles are incredible simple, so I've no need use any IDE on Linux. Well it would be nice if there would be an alternative to GDB but exactly in this point any IDE has its deficiency.
Mr. Lane
Experienced Solver
Experienced Solver
Posts: 57
Joined: Tue Dec 28, 2004 12:19 pm

Post by Mr. Lane »

WxDevC++. Thats it.
Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg »

And wxDev-Cpp covers your needs for version control or installing as well? Tell us more about the round trip you make. wxDev-Cpp is just the IDE.

- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
benedicte
wxWorld Domination!
wxWorld Domination!
Posts: 1409
Joined: Wed Jan 19, 2005 3:44 pm
Location: Paris, France

Post by benedicte »

For the moment, we only developp on Windows.
We use Visual Studio .Net as the "text editor" as it is very powerfull. We use the free Microsoft C++ compiler.
On Mac/Unix, we will probably use gcc + makefile.

native XRC for UI design : we have many proprietary controls ("unknown" classes).

for the version control, we didn't find any suitable. We have tested more than 20 version control systems, and all have big lacks... and we are developping a new version control software with much more features than any existing tool.

We have not decided yet the setup program we will use. The only "real" cross platform solution is too expensive, and it has bugs we can't afford. We may need to choose one per platform, we will see later.
priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia »

What I do:
:D
1.)Use Visual Studio.NET, the best editor [I work in office only, and my company has a license], :) with a complimentary license of Visual Assist, the combination rocks.

2.)Generally code the dialogs by hand, it won;t take much time, once you have a habit, also my dialogs are all custom shaped hi-fi GUI. Also there is wxGLADE and that free too.

3.)Not needed (Visual Studio.NET)


4.)Here I lacks with no source version

5.)Not needed (Visual Studio.NET)

6.)Microsoft Project Plan 2003 - I guess you can't have better than that

7.)Not needed (Visual Studio.NET)

8.)Not needed http://www.codeproject.com/macro/KingsTools.asp Doxygen and all type of documention and its free and must have.

9.)Inno rocks!

10.)Earlier I used to regular post on CP, but things have chnaged a lot now, there performance and attitude of moderators and hi profile members is intolerable. You I just post my article and no posts in their forum. I love this forum, and its the new destination.
Note that you haven't done REAL(TM) development until you've taken a look at THE LIST

http://www.hanselman.com/blog/ScottHans ... lList.aspx
And thanks Ryan for the URL
jazz
Experienced Solver
Experienced Solver
Posts: 73
Joined: Thu Jun 09, 2005 12:37 am
Contact:

Post by jazz »

IDE: Dev-Cpp (not wxDev-cpp)
Dialogs: I do all my dialogs by hand.
Makefile: Dev-Cpp
Version Control: Subversion
TODO: Trac, which is brilliant and has awesome SVN integration
Exe Compression: Why bother? My clients have 200gig hard disks. :)
Documentation: Sorry, I'm a programmer. I don't do documentation.
Changelog: Trac. I find it's Wiki comes in very handy. It tracks changes and you can also download as a straight text file to stuff into a archive.
Installer: Usually don't bother, but i have my own installer which i zip up into a self-exec zip file.
Distribution: Sourceforge. ;)


Has anyone noticed Jorg had 9) in the twice? :?: :?: :?: ;)
[INSERT LAME SIG HERE]
Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg »

Goofed up there! :-)
Thanks for noticing it and thanks for your contribution!

I am planning on making this a nice article on my Blog. Just to show people what they use for tools.

- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
vdell
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 536
Joined: Fri Jan 07, 2005 3:44 pm
Location: Finland
Contact:

Post by vdell »

jazz wrote: Documentation: Sorry, I'm a programmer. I don't do documentation.
I hope that was a joke, otherwise you should eternally burn in hell! :lol:
Visual C++ 9.0 / Windows XP Pro SP3 / wxWidgets 2.9.0 (SVN) | Colligere
Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg »

Well everybody is entitled to writing no documentation. One bit of advice is, when you apply for a job and your boss asks what you think about documentation, do not tell him you hate writing it! We had one applicant that arrogantly replied that his code was so perfect and clear, it needed no documentation or comments. Then in my honest opinion he never worked in a team where others also have to understand how your solutions work, or WHY a piece of code is there.

At home I try to write some but not lots of documentation. I do try to document my classes fully, also for myself so later I know how the heck I should be using them again :-)

A good test is write something, forget about it and start using it after a year. If you documented NOTHING, then you feel exactly like the people seeing your software for the first time :P

- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
phlox81
wxWorld Domination!
wxWorld Domination!
Posts: 1387
Joined: Thu Aug 18, 2005 7:49 pm
Location: Germany
Contact:

Post by phlox81 »

My List:

1. Sit down, and think about the problem, take a paper and write down.
2. Take the Notes, and try to make a classdiagramm, this happens mostly
in my head, sometimes i draw it.
3. Think about the Solution, what weaknesses it has, where is it strength. Could it be done better ?
3.1. If some things stay unclear, or need to be tried out, write a quick console/wx App, thats does the needed part, or shows a proof of concept.
4. Dig out my CodeGenerator, and type the Model in. While doing this, i mostly think about the Design, and make some changes.
4.1 if GUI needed, I use wxFormBuilder, to make my GUI Design, and copy the construction code to the Constructor in my codegenerator.
5. Try to get the generated code running. (actualy, step by step, i add new Features)
5.1 Test the implemented Features, correct errors if necessary.
6. Test the whole App, hand the Application to other People, for happy testing.
7. Do Documentation, which is rather small. I mostly draw an UML Diagramm with Dia, and for larger programs i Write a Developers Documentation. For public Apps, i also write a Read me, or even a Handbook.

IDE: Codeblocks, and my own CodeGenerator
Versioncontrol: none, did not have a need for this until now.
Installer: Most of my programs are able to run "out of the box"
Distribution: Over my own Website, if its a private Project.

phlox
Post Reply