CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Library clean up

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

Library clean up
PostPosted: Thu Jan 21, 2016 6:54 am     Reply with quote

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
Ttelmah



Joined: 11 Mar 2010
Posts: 19537

View user's profile Send private message

PostPosted: Thu Jan 21, 2016 8:12 am     Reply with quote

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?.
temtronic



Joined: 01 Jul 2010
Posts: 9241
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Jan 21, 2016 8:15 am     Reply with quote

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
Ttelmah



Joined: 11 Mar 2010
Posts: 19537

View user's profile Send private message

PostPosted: Thu Jan 21, 2016 8:24 am     Reply with quote

Flex LCD already is stickied. The I2C scanner should definitely be added to the ones that are.. Smile

++++++++++++++++
Done.
- Forum Moderator
++++++++++++++++
newguy



Joined: 24 Jun 2004
Posts: 1909

View user's profile Send private message

PostPosted: Thu Jan 21, 2016 8:58 am     Reply with quote

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.
Ttelmah



Joined: 11 Mar 2010
Posts: 19537

View user's profile Send private message

PostPosted: Thu Jan 21, 2016 9:59 am     Reply with quote

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
gpsmikey



Joined: 16 Nov 2010
Posts: 588
Location: Kirkland, WA

View user's profile Send private message

PostPosted: Thu Jan 21, 2016 11:06 am     Reply with quote

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
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Thu Jan 21, 2016 11:22 am     Reply with quote

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
_________________
John

If it's worth doing, it's worth doing in real hardware!
gpsmikey



Joined: 16 Nov 2010
Posts: 588
Location: Kirkland, WA

View user's profile Send private message

PostPosted: Thu Jan 21, 2016 4:00 pm     Reply with quote

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
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

PostPosted: Thu Jan 21, 2016 8:53 pm     Reply with quote

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
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

PostPosted: Thu Jan 21, 2016 9:05 pm     Reply with quote

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
Ttelmah



Joined: 11 Mar 2010
Posts: 19537

View user's profile Send private message

PostPosted: Fri Jan 22, 2016 1:42 am     Reply with quote

Ttelmah wrote:
Flex LCD already is stickied. The I2C scanner should definitely be added to the ones that are.. Smile

++++++++++++++++
Done.
- Forum Moderator
++++++++++++++++


Thanks. Smile
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Fri Jan 22, 2016 9:07 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group