Support Board
Date/Time: Sat, 01 Mar 2025 07:17:18 +0000
Post From: Code Organization Patterns
[2021-09-17 16:53:34] |
silvereagle - Posts: 23 |
Hello fellow engineers, Sierra and otherwise :) It's been a long time since I coded in C++ but I'm getting back into the swing of things, kinda. I'm getting better at understanding sierra and the acs api, however, I've come to the point where having all the code in one file is just draining my productivity with all the scrolling and hunting and pecking. I've got visual studio up and running, and am able to build studies and debug by attaching the sierra chart process, however, I'm scratching my head on how best to organize my code to make life easier. Does anyone have a strategy for organizing their Sierra code? Perhaps breaking apart logical blocks or persistent variables into their own files (headers/cpps) to make the code more manageable than one big honkin' file? I've read in a few places on the support board here where the sierra folks say, "just use one cpp file to make life easier." But there are two sides to the coin, 1. on one side, a single file makes things easier to build by having everything in one place, but 2. on the flip side, boy when it gets big is it a bugger to work with and I'd like to make things a little more manageable and maintainable. The more manageable and maintainable, the less bugs I will write. Does anyone have any suggestions or a strategy on how they separate/organize their code into manageable files/chunks? Much Thanks! :) |