programming guidelines, ~hints by Stefan Kost email : kost@imn.htwk-leipzig.de I wrote this, because I sometimes see people doing things which are unneccessary or could be done better. I don't want to say that my programms (SoundFX, FractalUniverse,... are perfect. This file is for collecting nice hints & tricks. So if you have some tricks, remarks, comments,... please let me know. -------------------------------------------------------------------------------- Don't Use Assigns ! ------------------- Every programm gets automatically an assign called progdir: from system. Therwith you can acess all file from the assign. Every additional assign you made has to set everytime the user boots his amiga an slowdown the boot-process. Furthermore if you use an assignmanager, the user has to move the assign from user-startup to his assign-manger everytime he is installing something. Keyfiles ! ---------- If your sharewareprogramm needs a keyfile, the please don't copy it to L: or S: or somewhere else. I started with SoundFX and FractalUniverse to make a drawer keyfiles in devs: and I recomend to place keyfiles there. This makes it possible to easilly backup your keyfiles. I've heard that some using a global env-variable called KEYPATH. Maybe check that too. Prefs ! ------- Everytime you boot you amiga, it has to copy all prefs from envarc: to env:. My suggestion is : Try to read prefs first from Envarc: and then from Env: If there's no prefs in Env: you already read the one from Envarc:. If all programms would do that, we don't need to copy them everytime. An easier way is to use 'HappyEnv' which could be found on Aminet:. This programm solves all these problems descibed above. Avoid copying to much to system-directorys ! -------------------------------------------- I advice you to create local directory from progdir: and to copy everything which is only used by your program there (shared librarys, catalogs, online-help). Another advantage is with removing the entiere drawer you remove all things installed by the program. Maybe you ask the user (expert) during installation where to put it and during program runtime you check both locations. -------------------------------------------------------------------------------- I got inspiration, comments, ideas from (in alphabetical order) : Andreas Mixich humpty@TOMATE.TNG.OCHE.DE Guido Mersmann geit@studST.FH-Muenster.DE M. Tjoelker M.Tjoelker@mpn.cp.philips.com Matthias Andree M_Andree@tribal.line.org Tak Tang tst92@ecs.soton.ac.uk That's all for now. Please support it, by sending me suggestions. We need proffesional software to survive ! Ciao Stefan