View previous topic :: View next topic |
Author |
Message |
Gabriel
Joined: 03 Aug 2009 Posts: 1067 Location: Panama
|
Library clean up |
Posted: Thu Jan 21, 2016 6:54 am |
|
|
Hi,
Related to the code library, I understand the difference between Working Code and Good Proven Code.
This is probably impossible to implement, but is there any interest as a community to clean up or set apart Proven code from this forum? Something like "a driver needs 10 votes from a community committee" to be moved to the "proven" side, and have a clean Post of the code with no questions or debugging on the thread.
Over the years i see code like PCMs flex lcd.... which at this point i pretty much trust blindly..... id say its a good example of "proven" code. Maybe there are not that many other drivers like this but i think there would be some effort/motivation by posters to get their code voted as proven...
End of shower thoughts.
G. _________________ CCS PCM 5.078 & CCS PCH 5.093 |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19369
|
|
Posted: Thu Jan 21, 2016 8:12 am |
|
|
There are some bits that you look at and think 'ugh'.
However there are also some parts that are likely to only be used very rarely, so would get 'low votes', yet are actually good code.
So it'd be very difficult to really sort stuff without trying every single routine.
It's interesting to reflect how many of the posts here are 'dross', yet still occasionally, there will be that one that contains that tiny nugget that is useful. The use of search allows these to be found. Unfortunately the people who most need to do this are the least likely to actually use the search....
The current system in the code library, already has the half dozen 'most used' drivers elevated by making them 'sticky', and this works quite well. Perhaps it could be extended a little by having a separate 'most useful' folder and putting the 'top twenty' drivers into this?. |
|
![](templates/subSilver/images/spacer.gif) |
temtronic
Joined: 01 Jul 2010 Posts: 9174 Location: Greensville,Ontario
|
|
Posted: Thu Jan 21, 2016 8:15 am |
|
|
One of those 'sounds like a great idea...but the Devil's in the details' idea.
Maybe the easy solution is to have code like the flex-driver and the I2C scanner 'stickyed' at the top of the list? Those ARE well proven and should be 'visible'. Maybe have the 'accessing I/O bits over 2 ports' program as well? That one comes up often...
If a program gets say 5 'PICs', it gets stickyed.
Jay |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19369
|
|
Posted: Thu Jan 21, 2016 8:24 am |
|
|
Flex LCD already is stickied. The I2C scanner should definitely be added to the ones that are..
++++++++++++++++
Done.
- Forum Moderator
++++++++++++++++ |
|
![](templates/subSilver/images/spacer.gif) |
newguy
Joined: 24 Jun 2004 Posts: 1903
|
|
Posted: Thu Jan 21, 2016 8:58 am |
|
|
The problem with votes is that voters aren't screened for intelligence before given the right to vote. "Beginner level" drivers (drivers that people who are new to PICs will be drawn to) will get the most votes while really useful posts/drivers will hardly get any due to most people not realizing the full implication/usefulness.
Take a look at reddit and that would be our future. Same trajectory as facebook and their "like".
Leave things as is. |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19369
|
|
Posted: Thu Jan 21, 2016 9:59 am |
|
|
Exactly. Also a driver being 'non popular' doesn't make it less 'important', if it shows a way of solving something awkward.
Extending the current stickies a little is the way to go I think. ![Smile](images/smiles/icon_smile.gif) |
|
![](templates/subSilver/images/spacer.gif) |
gpsmikey
Joined: 16 Nov 2010 Posts: 588 Location: Kirkland, WA
|
|
Posted: Thu Jan 21, 2016 11:06 am |
|
|
I would tend to go with the "extend the stickies" to flag a few more of the key ones as the most reasonable way to go. As observed, actually getting a bunch to sit down and evaluate/rate stuff is not likely to happen, but there are some that should be stickied.
mikey _________________ mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3 |
|
![](templates/subSilver/images/spacer.gif) |
ezflyr
Joined: 25 Oct 2010 Posts: 1019 Location: Tewksbury, MA
|
|
Posted: Thu Jan 21, 2016 11:22 am |
|
|
Hi,
My feeling is that 'publicly shared' code is always going to be what the programmer makes of it. If you are a savvy coder then even sloppy code can give you a leg-up on a programming effort if you are willing and able to do the clean-up to your standards. But, even really good code is going to be mostly useless to the clueless coder who just just wants to 'cut, paste, and repeat'...... In short, even the best library is no substitute for the most important processor of all, the one (hopefully) between your ears! ![Laughing](images/smiles/icon_lol.gif) _________________ John
If it's worth doing, it's worth doing in real hardware! |
|
![](templates/subSilver/images/spacer.gif) |
gpsmikey
Joined: 16 Nov 2010 Posts: 588 Location: Kirkland, WA
|
|
Posted: Thu Jan 21, 2016 4:00 pm |
|
|
That was why I liked the idea of extending the stickies to some of the common ones. Those that are willing to put the effort into doing their homework have a good starting point. Those that wanted their next class assignment handed to them, too bad. The problem with a lot of these is that you can spend all day searching and unless you have a clue where to start, you miss the important rock to look under for that key piece of information that gets you going down the right path.
mikey _________________ mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3 |
|
![](templates/subSilver/images/spacer.gif) |
Gabriel
Joined: 03 Aug 2009 Posts: 1067 Location: Panama
|
|
Posted: Thu Jan 21, 2016 8:53 pm |
|
|
Things like asmboy's olympic average routing, or cikelstra's RTC from system clock.... golden nuggets IMO.
Stickies are good but who "asigns" a sticky? (Genuine question)
Maybe not a full driver page but a golden nugget page?
But lets have those codes proposed(ownership not necesary) by commoners i.e. me and selected as worthy by the ranking dudes i.e. PCM.... maybe have 3 or more others chip in.
Example: i say the 2 code bits mentioned in my first line....3 ranked dudes say "here here, they shall pass!" And they move on to a higher ground page..... and the plebes can only hope to get there one day.
Eutopian shower thoughts ensue.
G. _________________ CCS PCM 5.078 & CCS PCH 5.093 |
|
![](templates/subSilver/images/spacer.gif) |
Gabriel
Joined: 03 Aug 2009 Posts: 1067 Location: Panama
|
|
Posted: Thu Jan 21, 2016 9:05 pm |
|
|
Please tell me half of you dont have the exact same 4 lines for SPI modes on all of your codes....when i first found it i cried a bit.
I like this gold nugget idea. _________________ CCS PCM 5.078 & CCS PCH 5.093 |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19369
|
|
Posted: Fri Jan 22, 2016 1:42 am |
|
|
Ttelmah wrote: | Flex LCD already is stickied. The I2C scanner should definitely be added to the ones that are..
++++++++++++++++
Done.
- Forum Moderator
++++++++++++++++ |
Thanks. ![Smile](images/smiles/icon_smile.gif) |
|
![](templates/subSilver/images/spacer.gif) |
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Fri Jan 22, 2016 9:07 am |
|
|
There are really TWO categories that code can stand out in.
#1 All purpose useful code bits that while coded for PIC CCS , have utility in 'C in the general sense.
#2 DRIVERS that are CCS specific |
|
![](templates/subSilver/images/spacer.gif) |
|