I don’t consider myself a “coding Ninja” by any stretch of the imagination - I’ve done more software Quality Assurance than coding. However, I have picked up a trick or two over the years.
One of my first micro:bit projects was the infamous “Magic 8-Ball” game. Going through that programming project, I ended up with several iterations that, (IMHO), represent evolution in programming complexity and style.
My first iteration was the basic game. You did something - like shaking the micro:bit - and you received one of eight-or-nine humorous answers using if-then-else constructs.
Then I wanted to experiment with more input methods by adding button presses to the ways to get an answer. So I added “on ‘A’ pressed”, “on ‘B’ pressed” and “on ‘A+B’ pressed” methods to the program.
At that point I realized that repeating the same random number --> answer construct for each case was both wasteful of memory and lousy programming style. So I investigated encapsulating the logic of the program in a function that would be called by each input method.
Having examined many of the “Magic 8-Ball” programs, I notice a lack of elegance and style.
Of course, for the beginning programmer the fact that they made it work at all is a huge accomplishment worthy of praise and honor.
However, at some point programming efficiency, maintainability, and style become ripe as a topic.
Is it possible for me to create/publish an article for this site that can be used by others to demonstrate the evolution of a programming effort and the changes made during that evolution?
Maybe this already exists. Maybe not. Is this something I can contribute?
I would like to be able to publish some of my “demo” programs that I wrote to explore various functionality - for example the left, right, both, and shake features - with appropriate displays of an animated left arrow, right arrow, center-expanding arrow, and shaky display animations.
Hi @Jim-Harris, we don’t have an article that explicitly discusses this progression, though we do try to demonstrate it in more advanced projects. However, we also don’t have an ideal platform to publish such an article on at the moment. If you’d like to share it, these forums might be the best place to do so. I know I’d be interested in reading it if you did.
Which fora would be the most appropriate?
Most of the sites I’ve seen that encourage project uploads seem to encourage hardware based projects - how to get your Pi, micro:bit, (et. al.), to control a nuclear reactor, or serve as the primary control computer for Space-X, etc. etc. etc. I’m primarily interested in software projects.
Should I PM you - or someone else - with a draft of the article before I post it?
@Jim-Harris I think the learning resources forum would be the place to put it. There’s no need to send on a copy in advance, this is a community discussion space and you’re part of the community!
. . . . perhaps so, but looking at the “Learning Resources” fora, there seems to be little that suggests it as a code-sharing site. It strikes me more as a place for group leaders and champions to discuss the proper - and safe - running of their Dojo’s.
If I were looking for something like that, this would not be the place I would go.
Perhaps a sub-forum within that group, or a separate forum category altogether?
May be a good idea to put items such as this on github, that way others can view them, you can then also put notes in markdown as part of the repository structure.
@Jim-Harris Github allows you to view commit histories. So you can roll back if need be or do lots of other complex stuff, not sure where you get good git hackers to help though.
Looks like your connection to CoderDojo Forum was lost, please wait while we try to reconnect.