Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Software Design and Algorithms (http://www.programmingforums.org/forum64.html)
-   -   Python developer looking for design advice (http://www.programmingforums.org/showthread.php?t=13486)

Foxandxss Jul 6th, 2007 5:55 AM

Python developer looking for design advice
 
Hello everyone, I'm Foxandxss and I'm Spanish.

I'm a Python developer, but I haven't done anything big and I want to know how to design a program.

I would like to know what things I need to do before I start coding my program, things like analysis and design...

If anyone can guide me with the steps that I need to do before starting to code, I will be very very happy.

I'm learning by myself, and I don't know how to do something """big""" like a book database because I can't open the text editor and start coding without an idea of what classes I should create or what design I need to follow.

In conclusion, I would like to learn how to design a program before coding.


Thank you very much.

mackenga Jul 10th, 2007 8:07 PM

Sorry, it's been a long time since this post but there have been no answers and I've just come across it. Hopefully you're still holding out hope for an answer, Foxandxss!

Software design is a big topic in itself, but as a starting point, the first thing you need to figure out are the requirements - what you want, or what the user wants, from the program. This includes things like what it will do, how it will do it, what other systems it will talk to if any, how it will perform, what it will run on - often many of these decisions are made (each time I sit down and code for my own use I know it will run on Linux; if it's to use a database it will be Postgres; and so on - but you need to think about all of these questions first of all in quite a general, abstract way.

The next stage generally with object oriented development is, as you say, to think about what classes to use. A traditional starting point is to write down what your program does and what it does that with, and think about the objects and actions involved. For example, in a book database objects might include a book, and maybe you'd want objects for an author, a publisher, and so on. Each of these will have some data associated with it (for example, a book might have an ISBN number or other identifying numbers, and maybe a barcode if that's relevant to you).

That gives you some of the information. Now, you need to think about what actions will be performed on the objects. A book database for a library might need to have "check in" and "check out" types of action associated with it.

This sort of thinking will give you some ideas of what classes will feature in your program (the objects you identify), and what characteristics in terms of data and methods these classes will need to have. The same sort of method can be applied to more 'programmatic' sorts of objects that don't correspond to the real world, but although there's a lot of variety in the world of design methods, it's often a good idea to start by thinking about how you will represent real world objects that matter to your program.

I recommend getting a good, big book on this subject. I'm a programmer of the 'hacker' school unfortunately and design mainly by feel - this is not actually a good way to go about it, but it means I can't really recommend specific books. There is a "Software Design and Algorithms" forum on this site which might be helpful with finding a book that would be useful to you. Look out for books about the design process that are based around UML (the Unified Modelling Language) - it's a useful tool and looks good on a job application!

I hope this helps and didn't come too late:)

mackenga Jul 11th, 2007 1:40 PM

Whoops, my bad - this IS the Software Design and Algorithms forum! Lol. Must have been pretty tired when I posted this last night!


All times are GMT -5. The time now is 2:43 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC