Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Splitting Programings up

Author
Message
Ian Hughes
20
Years of Service
User Offline
Joined: 29th Sep 2003
Location: UK
Posted: 5th Oct 2003 13:58
Splitting Programings up

Can anyone tell me if it is worth programing short programs ie( I am working moving a graphic around ie left and right an hopfull firing)
and then once i have done that program/routine I would move on to the next like displaying and moving the invaders. once i have done all my programing/routines and then try to piece them together is this the best way to program? or try to do it all in one go. I am very very new to programing and basic is the easyes languange ? also can i use the exambles that are shown in the tutorials

cheers
Ian

Spam UK
Mussi
21
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 5th Oct 2003 17:04
I mostly program a hard piece of code in an other file and debug it then. then implent it into the main engine. but what you have to do is to try things yourself and look what suits you best.

Specs: AMD Athlon 1800, 256 DDRRam 266mhz, 80GB HD 7200rmp U133, Geforce 4 Ti4400 128mb ddr sdram
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 5th Oct 2003 18:55
you can do it in seperate modules or all in one but I would recommend breaking out your code into as many small reusable routines/functions as possible - thus limiting the "hard coding" factor, and reducing possible areas where you find yourself writing lines of code that are exactly the same, in multiple places.

-RUST-
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Oct 2003 19:53
I think what you need is a test bed. You write your functions, and make sure the results are what you expect using your test bed. This might be as simple as calling the function and writing returned values to the screen.

Your functions can then be included in your main program, knowing they are already tested and working.

The functions are never a program in their own right. The test bed gets around the problem of testing code that isn't a full program.

BatVink (formerly StevieVee)
http://facepaint.me.uk/catalog/default.php

Login to post a reply

Server time is: 2024-09-21 04:13:54
Your offset time is: 2024-09-21 04:13:54