Hi again. I have a question if posting my code for criticizem is appropriate or not? I figured I'd ask before I did it. A little background on me so hopefully you understand why I'd ask something so simple. I'm a nearly 40 year old blue collar worker with no formal college education or ANY code training at all. Anything I have learned is from google searches and trial and error to get it to work. I got into robotics first with HAM radio because I worked on an off road race team. That led to tracking HAM sattelites which led to astronomy, which led to robotics. This is simply a hobby for me. After almost 2 years of working on a robot I got it to do what I wished for. The code complies and the robot for the most part works flawlessly. By flawlessly I mean it completes it's objective 90% of the time if not more. My question is not about getting my robot to work. I've came to the conclusion the the adrruino IDE is like writing a paper for school, there's many ways to it. Some right, some wrong. But in the end you can still turn in a paper for a grade even if it's done wrong. With that said, my question is about having people with formal training or experience criticize my code and tell me how to tighten it up, make it better or any other advice. Before I post it, is that appropriate here? Thank you for any help.
If it does what you want, then don't post it. Move on to your next project. This is not like grading an assignment. It is like buying a car. If the car you have is working fine, then why did you walk into the shark teeth of a car dealership's front door?
If it doesn't work, then post the code and tell us what it actually does and what you wanted it to do.
Thank you for the reply. The robot does work like I wish for. I'll keep the code as it is written and make adjustments as I add more tasks to it in the future. If I can't get it to do something I wish for I'll post that specific issue then. Thanks for the vote of approval!
-
Dig deep hole
-
Put on tin hat
-
POST YOUR CODE - in code tags!
-
DIVE INTO HOLE.
mARK
If it's modular, you could post a module or two for evaluation. For example, a well documented, self contained function with well defined inputs and outputs. Links to the hardware, if necessary to provide context. If not, then you are doing it terribly wrong.
An interesting thought that crossed my mind this week. I wanted to add a radically new capability to a large program I'm writing. As I did it, I thought to myself, "Why is this so easy? I don't remember it being like this in the past...". The entire job took only a little over an hour. It dawned on me that it is because I've been scrupulously improving my virtualization and modularity. I thought that the difficulty of adding something or making a big change, is a good benchmark of your coding practices.
If your 2 year project is a huge monolithic puzzle, you would find such changes and additions painful and tedious. So think that over.
aarg:
you would find such changes and additions painful and tedious. So think that over.
That is my big concern. I've learned that the code isn't always written the way I envisioned it. But the robots actions can still be what I envisioned. I should just be happy with that and drive on to bigger tasks. Thank you to all who replied.
You may find some ideas in Planning and Implementing a Program
I hope it would provide the framework for the sort of easy extension @aarg mentioned in Reply #4
...R
Robin2:
You may find some ideas in Planning and Implementing a ProgramI hope it would provide the framework for the sort of easy extension @aarg mentioned in Reply #4
...R
Thank you for that Robin!
That is awesome, very nicely written and easy to understand. I would feel comfortable comparing my code to your suggestions and making appropriate changes. Thank you again.
Hi,
Hi again. I have a question if posting my code for criticizem is appropriate or not?
I figured I'd ask before I did it.
A little background on me so hopefully you understand why I'd ask something so simple.
I'm a nearly 40 year old blue collar worker with no formal college education or ANY code training at all.
Anything I have learned is from google searches and trial and error to get it to work.
I got into robotics first with HAM radio because I worked on an off road race team. That led to tracking HAM sattelites which led to astronomy, which led to robotics.
This is simply a hobby for me.
After almost 2 years of working on a robot I got it to do what I wished for.
The code complies and the robot for the most part works flawlessly.
By flawlessly I mean it completes it's objective 90% of the time if not more.
My question is not about getting my robot to work. I've came to the conclusion the the adrruino IDE is like writing a paper for school, there's many ways to it.
Some right, some wrong.
But in the end you can still turn in a paper for a grade even if it's done wrong.
With that said, my question is about having people with formal training or experience criticize my code and tell me how to tighten it up, make it better or any other advice.
Before I post it, is that appropriate here?
Thank you for any help.
Whew,, sorry, but it sounds and reads better this way.
Tom.... ![]()
TomGeorge:
Hi,Whew,, sorry, but it sounds and reads better this way.Tom....
Thank you Tom, much better ![]()