picea892 Posted April 19, 2009 Share Posted April 19, 2009 Hi Until recently I've only made short scripts so my bad habits and poor code layout has not affected me. Now for the first time I am pushing 1000 lines in one of my scripts and I'm really starting to feel the pain of being a self taught coder. It is some times rather difficult to find a spot in the code and I'm certain if I set this script aside for a couple months it will be very difficult to go back to it, simply because of how it has been written. So I want to clean it up but am not sure how to. Could people share with me some tips and tricks on how to keep code organized. It'd be greatly appreciated. Link to comment Share on other sites More sharing options...
monoceres Posted April 19, 2009 Share Posted April 19, 2009 Have you run tidy (Ctrl+t from SciTe4AutoIt)? Other tips is to use comment regions (#CS and #CE) and regions (#Region, #EndRegion). Also when you're writing the code try to modularize the code as much as possible, try to have standalone functions that don't rely on specific behaviors of other functions. Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
picea892 Posted April 19, 2009 Author Share Posted April 19, 2009 #regions will help a lot! Thank you. I'm wondering if there is a default setting in SciTe to have all regions compressed on startup. It defaults to all regions open. Link to comment Share on other sites More sharing options...
Developers Jos Posted April 19, 2009 Developers Share Posted April 19, 2009 add this to your SciTEUser.properties: fold.on.open=1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now