|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||
|
||||
|
On the quality and complexity of software within FRC
McCall quality factors are lacking, or in some cases non-existent. in FRC and it is about time to address it.
Year after year, the vast majority of teams are writing poorly written, inefficient, and disorganized code. Their code base fails to generalize for multiple years due to poor design, but no one seems to care or talk about this. Someone posts a cad drawing of a robot that they did for practice. People ask questions asking about the foundations of the design ("How thick is the G10?"), but no one asks questions when code is released. No one asks, "what is the *big-O notation of this function?" No one cares enough to truly scrutinize someone else's code. No one cares that an on board vision program isn't threaded. No one cares about how inefficient a routine is so long as it works in a match. A lot of teams forbid the altering of code once it works, which is a disgusting practice. Teams that get 10-15 fps on a vision program and say "it's good enough" when they haven't even done their research on optimization techniques. The vast majority of code would get a 'C' at best in an intro to programming class in a high school. So why is no one talking about this? |
|
#2
|
||||
|
||||
|
Re: On the quality and complexity of software within FRC
I think you exaggerate a bit when you write "no one"; and I think it would be (should be) unusual to generalize about "the vast majority of teams" FRC software's condition, without first agreeing with your audience what requirements that software is supposed to satisfy.
There is more than one way to skin most cats, including software cats. Blake |
|
#3
|
||||
|
||||
|
Re: On the quality and complexity of software within FRC
I'll bite.
Quote:
Quote:
Also, as a firmware engineer (intern), my first priority is proving the concept before actually applying it to the hardware I work with. I don't care about the efficiency until I have to ship it on very limited hardware, I want to see the concept work before I start trimming my variables, deallocating memory, etc. Quote:
Quote:
Just like the top teams have amazing designs, they also have amazing software. I marvel over 254's software releases and always learn something about their software design. I suppose the majority of CD's talk is mechanical design-oriented, so it's tough to see all of the software discussion going on (and there's a lot). |
|
#4
|
||||
|
||||
|
Re: On the quality and complexity of software within FRC
Quote:
Quote:
Quote:
Quote:
We've begun to encounter the issue that WPIlib for Java is poorly coded itself. The libraries relating to vision code are particularly messy. This may be why so many teams opt to build their own libraries entirely. Sometimes, optimization is good. But, usually, it isn't all that necessary for FRC because we have a magical beast of processing power called the roboRIO. Since there's no real limit on how inefficient your code can be (unless you try vision code, then good luck) there's usually no reason to optimize your code. Outside of FRC? Yeah, optimization is important. In FRC? Not really, because 2 minutes out of your 2:15 match, your robot is an RC stacking machine, not an autonomous robot. |
|
#5
|
||||
|
||||
|
Re: On the quality and complexity of software within FRC
Quote:
|
|
#6
|
|||||
|
|||||
|
Re: On the quality and complexity of software within FRC
Quote:
|
|
#7
|
||||
|
||||
|
Re: On the quality and complexity of software within FRC
Too bad having a garbage collector and running natively don't work together super nice, without a lot of work. Because that's basically what that would be. I think later this summer, I want to do a runtime shootoff between LV, C++, C#, Java and Python (all the currently working languages) and see how much performance you gain or lose with each one.
|
|
#8
|
||||
|
||||
|
Re: On the quality and complexity of software within FRC
Quote:
|
|
#9
|
||||
|
||||
|
Re: On the quality and complexity of software within FRC
Quote:
Some of the things that I know are fine, but still make me cringe, involve the use of generics and enums. Since Java on the CRIO did not support either of these, most of the Java code doesn't have them. However, you can tell that some of the new classes do use generics and enums. I know this is fine, but you can tell there is a disconnect between the old and the new code, and something that would be nice would be for somebody to take a month and thoroughly clean it up. I bet with some cleanup to include new features, and maybe some algorithm refactoring, we could get the code much nicer and easier to work with. Maybe they could fix all the spelling and punctuation errors in the comments too ![]() |
|
#10
|
||||
|
||||
|
Re: On the quality and complexity of software within FRC
Quote:
|
|
#11
|
||||
|
||||
|
Re: On the quality and complexity of software within FRC
Quote:
Also, which nested while loops? I haven't noticed any that have caused issues so far, but maybe I just don't remember. I've read too much code lately. |
|
#12
|
||||
|
||||
|
Re: On the quality and complexity of software within FRC
Hi Evan. If you've got a couple of minutes, there's some unfinished business over on your "Blown CIM" thread.
|
|
#13
|
||||
|
||||
|
Re: On the quality and complexity of software within FRC
I'm sorry... what are you talking about?
|
|
#14
|
||||
|
||||
|
Re: On the quality and complexity of software within FRC
I believe that he may have got the wrong Evan.
|
|
#15
|
||||
|
||||
|
Re: On the quality and complexity of software within FRC
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|