Replies: 2 comments 1 reply
-
Looks great. Splitting up CirSim.java would be really nice. |
Beta Was this translation helpful? Give feedback.
-
Refactoring is a great idea, I applaud your effort and I agree that it would improve readability and maintainability. However, I'd be cautious to make large changes when there are no automated test cases. Every refactoring step has the risk to introduce subtle bugs, and it is impossible to test the whole application manually after each step. So one of the first steps should be to write some unit tests and some integration tests. Ironically, this would probably be much easier after refactoring and separation of concerns. |
Beta Was this translation helpful? Give feedback.
-
Hi 👋
I thought I'd write down some of my thoughts on refactoring the project for readability, organization and (hopefully) expansion. As I think I've said in the past, I'm a big fan of this project, but my skills in calculus and circuity are still somewhat lacking. What I think I can bring to the project in the short term is a refactoring effort which I hope will make it easier for existing members to maintain and easier for new members to join the project. In the mid-to-long term I also want to look into improving the performance of the app with large and extra-large circuits.
Please reply with feedback!
Generally these are in order of priority/need
CirSim.java
by separating concerns.CirSim.java
should contain only code directly related to ticking/solving the simulation (runCircuit()
and decedents), I know this probably wont happen any time soon (if at all). It's an aspirational goal.circuitjs1.client.ui.*
CirSim.java
and files that already exist likeAboutBox.java
should be reorganized under a ui folder/namespace.Platform.java
class for the JavaScript basednative
code where appropriate.CircuitElm
and the other circuit elements.Beta Was this translation helpful? Give feedback.
All reactions