Intermediate / advanced?

Can someone tell how was your problems to pass from intermediate level to advanced level in SC?

I have found that the code exposes very complex post intermediate level and is not longer easy to manage the software.

How was your experiences to pass from one to the other?

This is true.

The main thing that made a difference for me is paying attention to code organization. Organising large project - What do you think of my solution? what are yours? - #7 by jamshark70 explains some of my approach. (Note, when that post refers to my SC book chapter, that’s the first edition.)

If you’re storing all your resources in global variables and throwing about bits of code without much discipline, once you pass a certain threshold of complexity, you will definitely get confused. By contrast, I’ve been able to build some quite complex behaviors into my live coding environment that I’m pretty sure would have been prohibitively difficult without encapsulating resources into objects that make sense.

hjh

My level is still intermediate, so I’m not really in a position to make any strong claims, but I do agree with @jamshark70 about how important encapsulation becomes as things get more complex.
I’d just like to share a few observations from my own experience:

  • Encapsulating things in functions can sometimes be a bit confusing, especially when you have numerous function definitions. Since SC doesn’t provide autocompletion for user‑defined functions, unlike Max’s assistance comment feature, this can make function‑based encapsulation less comfortable. For example, it can be difficult to remember which function takes which arguments, and for users like me who don’t have the best memory, having to look up the definitions repeatedly can become quite a hurdle to productivity. If you want autocompletion, creating a class and method helps, as SC will then recognise your own abstractions.

  • Using custom classes and methods can introduce compatibility issues when working with other users or across different machines. Some people solve this by writing their own Quark, and many advanced users do exactly that. If you’d rather not write a Quark, using Dropbox or another cloud service that can launch applications can make it easier to keep your working environment synchronised across platforms.

  • SC‑IDE doesn’t support code folding, so keeping a main SC file in a dedicated folder and loading additional files with .loadRelative can help keep things tidy and make the overall structure easier to follow.

  • I do use VS Code’s language server protocol, but I still enjoy working in SC‑IDE (and sometimes the terminal). That said, I’ve noticed that many advanced users rely less on SC‑IDE these days, so moving to VS Code might be worth considering. At the very least, SC‑IDE isn’t ideal for testing code for pull requests, as it automatically removes trailing whitespace on save, and developers generally prefer avoiding unnecessary diffs.


added:

One more point, which isn’t directly related to the perspective of your question:
It can be helpful not only to rely on the documentation by pressing cmd/ctrl + d, but also to check method definitions using cmd/ctrl + i. I believe that more advanced users are quite accustomed to looking at method definitions directly and using the documentation mainly as a reference.