Testing Circuit Blocks
I managed to make every Part that may be used in a sub-circuit work in a circuit block. Along the way I refined some Parts as well.
One big global change was to remove the functionality of driving logic level and bus data in the reverse direction, apart from to the 7-segment display and Loop Bus. This change cuts out a lot of unnecessary complexity from the code. Also, it prevents repetitive bouncing around of bus value updates.
Now I am combining Parts in circuit blocks and finding some issues that are hard to debug. So now I want to implement a logging feature which will allow me to analyze what happened in detail rather than setting breakpoints and stepping through the code. There is just too much to keep track of manually to debug some things.
Many objects have deep structures that are painful to examine in the editor after a breakpoint, hence the idea for the logging system.
Sometimes I find a bug that I am thinking that would not have been found had I not done something unusual. This is kind of scary since it could make it into a released version of code and crop up later and be hard to identify maybe?
There is a weird bug that I have noted but cannot reproduce yet. Sometimes a selected part gets deleted after a file dialog was closed. But at least I am aware of it.
Working on a project like this has various benefits I think, such as:
- getting experience of developing a complex App
- getting a feel for how much work is involved to develop projects
- improving general development skills
Best practice ideas:
- don’t let the code become too hard to manage and debug
- test everything
- backup to version control after every improvement/bug fix
- always be working towards clear incremental objectives
- stop and take a break when you are stuck
So the next big thing to create will be the debug/logging system. Until next time …
More Devlog entries
Most recent first
- 2021 10 02 New Release of Digital Logic Simulator
- 2021 08 28 Nested Sub Blocks
- 2021 08 27 Debugging with a log file
- 2021 08 24 Bug Fixing with Blocks
- 2021 08 22 Debugging Circuit Blocks
- 2021 08 21 Circuit Blocks Update
- 2021 08 18 Circuit Blocks
- 2021 08 16 Highlighting of wires
- 2021 08 12 Adding Tutorial Content
- 2021 08 07 Numbers Scene
- 2021 08 06 Numbers Tabbed Scene
- 2021 08 04 Number Display Widget
- 2021 07 26 Logic Simulator Update
- 2021 07 24 - Launch of V1.0
- 2021 07 23 - Truth Tables
- 2021 07 22 Progress Update
- 2021 07 21 - Simple Computer Simulation
- 2021 07 16 - Community Forum
- 2021 07 15 - Community News
- 2021 07 11 - Save and Load ROM Data
- 2021 07 09 - Documentation About The Logic Simulator
- 2021 07 08 - Big Progress
- 2021 07 07 - RAM and ROM Testing Complete
- 2021 07 06 - Implementing Tests
- 2021 07 05 - Cool algorithm for binary text string
- 2021 07 04 - Debugging Complex Situations
- 2021 06 30 - End of June - Refactoring Continues
- 2021 06 29 Community
- 2021 06 28 Implementing More OOP
- 2021 06 27 Memory Parts
- 2021 06 26 Improving the Memory Manager
- 2021 06 25 Memory Data
- 2021 06 24 Memory Management
- 2021 06 23 First Devlog Entry