LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-22-2007, 03:29 PM   #1
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
best way to maintain a project from multiple perspectives?


I don't know quite how to word this, but I'll do my best to get it right in the OP.

I'm writing a server which has grown to about 10x what I expected it to in the beginning and I haven't even released it yet. I'm getting slower and slower in the development because I spend most of my time visualizing everything in my head and finding where I need to make changes. I currently use 8 Kate sessions simultaneously (6-55 files each) to represent each module as a list of its files. At this point, however, I find that every new client/server interaction requires 4 inter-module connection points in addition to intra-module interaction, normally 8-10 files per change.

As an example (something I worked on today):

Added a new client command which requests a list of all active clients on the server (about 14 file changed):
  • Added a function to the public API to make the command available to client programs (creates and sends the command to the server)
  • Added a new command object which is to be transmitted from the client to the server to perform the request (automatically assembles an XML-style transmission and automatically parses it server-side)
  • Added an execution point to the server interface which allows the incoming command to execute the request (the command object is given a server interface to work with and it calls the "list clients" function)
  • Added a function internally to the server to actually perform the requested operation (the "list clients" function calls an internal function to compile and transmit the current list of clients back to the requester)
My current method of maintaining the project is to group files by module, but I want to be able to quickly locate the necessary files within several modules to change something. I need a way to maintain the project from build, communication, and internal views. What's the easiest way to do that? Thanks.
ta0kira
 
Old 11-23-2007, 04:08 PM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Have you tried using an IDE, like Eclipse?

Dave
 
Old 11-23-2007, 07:54 PM   #3
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
This is probably not an answer to your question and may not be relevant but I wonder if you have any fundamental design problems? The alert to me was when you said that the program had grown about tenfold. Of course this may not be the case but I feel that a new command shouldn't be that troublesome. For example has the command parser be abstracted out so that it will extract the command and then execute it without worrying about whether the command actually exists?

However you certainly have a sizeable project on your hands and this is often an area where IDE's do help over text editors but they will take time to configure to meet the organisation of your project. What I tend to do is organise the project by folders with each specific group managed within their own folder, I try not to break it down too much so that I have core areas held within the folder and then in that folder the source code. So, for example I almost always have a folder called Utilities and within that all the source code that provides functionality which I don't consider to be unique to this project.
 
Old 11-23-2007, 09:57 PM   #4
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Original Poster
Rep: Reputation: Disabled
Yes, I expected a design quality inquisition and I almost addressed it ahead of time, but wanted to keep the OP short.

Part of the trouble I'm running into is how much design went into it. For example, I can diagram library/program linkage, communication paths, and nearly any action a server or client must take but when it comes to editing I can't easily associate those diagram points to individual files. I know exactly how everything interacts and how it's put together and it's going better than planned, but the amount of code itself is greater than I'd expected, so I find it more and more difficult to isolate files I need to change for a particular action.

It's more a matter of knowing what process needs to take place, but then having to 1) locate 4 file pairs between 4 modules of 25 or so files each, 2) finding the particular logic within those files which corresponds to the point in the process.

The main reason for my current file layout is security. Certain things need to be grouped together to minimize external symbols and to simplify interfaces. For the most part they are grouped by the static data the functions must have access to, by what type of object the functions act on, and the interfaces required by other sources. It's really a fitting layout for security, but I can't view the code any other way.

The ideal tool for this would be one that I could create several tabs of diagrams with and be able to click on a symbol to go to that file. Even if I do start using an IDE, I don't plan to let it write any code for me. About the only thing I'd consider would be one that will allow me to select files in a graphical way and won't interfere with my code (not even automake and autoconf files.)
ta0kira

PS Looking into Eclipse.

PPS It's based around this security policy, which was written soon after the initial library/program layout:
http://resourcerver.sourceforge.net/security.html

P^3S I guess I underestimated by quite a bit. It looks like 198 header/source/Makefile.am with >16.5k non-empty lines.

Last edited by ta0kira; 11-24-2007 at 12:03 AM.
 
Old 11-24-2007, 12:03 AM   #5
95se
Member
 
Registered: Apr 2002
Location: Windsor, ON, CA
Distribution: Ubuntu
Posts: 740

Rep: Reputation: 32
You may be impressed w/ IDEs. Many have, at least, plugins that allow you to create UML diagrams that you can tie in w/ files/classes. This way, you can, at least, find the files you need to edit for a particular interaction faster, or you could even create the interactions at the diagram level and let the IDE create some stub code for you (many will only do very basic code, but I know you said you don't want any code generation).

At the very least, you can create some hard copy (or soft copy) design diagrams and create a good requirement tracability matrix. The RTM helps to find all the files you need for a particular functionality. Maintaining it is a bit of a bitch, but would probably pay off.

BTW: It looks like you put a lot of thought into this project, I'm looking forward to seeing the final product I'm really interested in this kind of stuff. I've been paying attention to DragonflyBSD. They've been working hard on creating a message passing interface for system calls and lower level stuff. Very cool.

Last edited by 95se; 11-24-2007 at 12:08 AM.
 
Old 11-24-2007, 01:42 AM   #6
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Original Poster
Rep: Reputation: Disabled
Thanks. It's unbelievable how much easier programs are to write when you put extensive work into the design before writing anything. Even though this is the most complex project I've worked on, it's one of the easiest to debug and to get things working in.

I've been messing around with Eclipse for about an hour and it seems pretty BA. I think I'll use it as my editor, but I'm still going to hand-write everything and build from the command line. I imported it as a "Project, Nebulous" and I like how easy it is to browse the includes and jump to declarations, even in includes that require a -I to work! I also like how you can jump to system includes. I may still need to make a symlink tree for grouping different concepts, though.

I'll post an update if I get anywhere with all of this fancy IDE nonsense...
ta0kira
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: The Portland project: No silver bullet for hairy problem of multiple desktops LXer Syndicated Linux News 0 08-26-2006 06:21 PM
how to use gdb to debug multiple files in a project like other IDEs? DrowningFish Programming 1 08-15-2006 08:55 PM
LXer: Open source perspectives come into focus LXer Syndicated Linux News 0 07-29-2006 06:54 AM
Using multiple languages in a project Chrax Programming 2 01-30-2005 08:07 PM
How does one maintain a linux PC? bxb32001 Linux - General 7 06-16-2001 01:28 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration