Code Examples


Closed Thread
Results 1 to 34 of 34

Thread: Code Examples

  1. #1
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818

    Default Code Examples

    I think the Code Examples section should be closely moderated by the administrators so as to only hold valid examples of good sample code, and articles get put in only by the admins. Why? so it contains only threads on topic for code examples, any thread could be recommended, maybe installed by general consensus of the members. There are some really good threads on topic to this area, it would really be useful to newbies.
    JS

  2. #2
    Join Date
    Mar 2006
    Location
    Hyderabad (India)
    Posts
    123


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    I think the Code Examples section should be closely moderated by the administrators so as to only hold valid examples of good sample code, and articles get put in only by the admins. Why? so it contains only threads on topic for code examples, any thread could be recommended, maybe installed by general consensus of the members. There are some really good threads on topic to this area, it would really be useful to newbies.
    JS
    Totally ageed- Examples should set a standard and be exemplary and slf containd and optimized.
    Regards,
    Sarma

  3. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mvs_sarma View Post
    Totally ageed- Examples should set a standard and be exemplary and slf containd and optimized.
    and have superflurious chit chat removed, just really good code!

  4. #4
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Joe,

    I can not get myself away from talking in different topics during ongoing technical discussions.

    It is my weakness, infirmity, illness, addiction and the TASK to make the post enjoyable.


    When I feel there is a bend in the topic, I take it.


    I admit it.

    ----------------------------

  5. #5
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Talking Not Woofing

    Hi Sayzer,
    That is a good thing.
    I'm not woofing you or anyone else here, open discussion is a very good thing, we all share this forum and learn from each other, heck it was you who taught me to setup timers, I just think in the CODE EXAMPLE SECTION ONLY the administrators should have exclusive access to installing threads and then only after cleaning them up to be " EXAMPLES", there are some things in PBP that seem to throw every newbie for a loop, and this area is a supurb opportunity to shine, additionally every now and then someone here thinks up something brilliant, and truly elegant, example: Darrels instant interrupts. These brilliant code examples should be showcased here, without all the banter we all have so much fun exchanging. I would like to see good examples of Variable arrays, Timer usage, interrupt examples, etc. etc... Those same examples found throughout the other areas could be left where found as is and the example gleaned and cleaned and installed in the example section. . . well that's my opinion, yeah I know everybody has one. Cheers!
    Last edited by Archangel; - 16th January 2007 at 10:41.

  6. #6
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    Hi Sayzer,
    ...I just think in the CODE EXAMPLE SECTION ONLY the administrators should have exclusive access to installing threads and then only after cleaning them up to be " EXAMPLES"....

    Joe, I think you have a great idea.

    BUT, in defense of our beloved administrators, the do have day jobs (at least I think Darrel is still employed.), their own projects, and maybe even the occasional social oppurtunity (Va, Va, Vrooom!). Besides, just keeping up with the spam can be a chore.

    SteveB

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by SteveB View Post
    Besides, just keeping up with the spam can be a chore.

    SteveB
    And might I add that I haven't seen any spam floating around here in the past couple weeks.....'cept for my posts anyways!

  8. #8
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Is there something in the Code Examples forum that you think shouldn't be there?

    .
    DT

  9. #9
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    That is a WISH Joe.

    Post it on the wish list.

    And may be a (the) Genie will take it for consideration (there is one I know around here).


    -----------------------------

  10. #10
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Wow, where do I start?
    1. Darrel, Melanie and Lester do a fantastic job here, despite having lives and jobs of their own. A1 job!

    2.Sayzer, it's a dream - ok - nice dream though - Crownhill PBP University! And notice the word Genie in Genius!

    3 Darrel, I'm not sure you do not already clean this area up, certainly there are some great posts there. I love this forum and appreciate every post I find here.
    The issue (if indeed one exists) I am addressing is: to try to make this one catagory the goto place to search fo answers, that have been repeatedly addressed, without having to sort through a thousand days of friendly dialog. This forum is already the premier place to learn MeLabs P Basic + Pro, There are some really bright people who post here. As far as the workload issue, I was thinking a post would need to be nominated for assention to code example status, and then receive lots of votes from members.

    Yes I can be an irritating little turd, But guaranteed, I will make you think! And as long as you all are thinking, this forum just keeps getting better! Ugh, unless you are all thinking "what an ice whole" in which case . . . "nevermind".

  11. #11
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Yes I can be an irritating little turd,...
    No, I only get those when I eat Jalapenos. And yeah, Ice to the whole helps.

    But seriously,
    The Code Examples come Few and Far between. Whether it's a feeling of "Why should I give it to them for FREE?" or maybe a fear of ridicule from people who see it. Or maybe they just don't want to debug everyone's program when they try to use it, simply to prove that the original program really does work.

    With those reasons already in play, placing rules on top of it with voting and the like, would surely put a quick end to anyone posting anything. Because first off, nobody would bother voting. Just look at the results from the existing threads with Poll's.

    While many newbie's think that the Code Examples forum is the place to Request a Code Example, or Ask their question in the FAQ forum, simply because they've Frequently Asked themselves the same Question, I do my best to keep the Code Examples and FAQ forums clear of all the junk, and move everything out to the appropriate forums.
    Note: All the other forums are "Fair Game", except for SPAM and Flames. Added: and Politics, and religion.

    However, if I've missed something, feel free to chime in at any time. It's impossible to catch everything myself.
    Last edited by Darrel Taylor; - 17th January 2007 at 05:38. Reason: Added: and Politics, and religion.
    DT

  12. #12
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Food for thought

    You have made some good points Darrel. The last idea I had on this subject was to post sanitized code examples here and include a link to the original post. Thats all I have, I'm empty, still I hope everybody thinks about this and offers up their own suggestions however arcane they think they are, you gotta shovel a lot of rocks, to find some gold, but there is gold in these here posts!
    Thanks for hearing me.
    JS

  13. #13
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Smile Placing too many restrictions - not a good idea.

    Quote Originally Posted by Darrel Taylor View Post
    No, I only get those when I eat Jalapenos. And yeah, Ice to the whole helps.

    But seriously,
    The Code Examples come Few and Far between. Whether it's a feeling of "Why should I give it to them for FREE?" or maybe a fear of ridicule from people who see it. Or maybe they just don't want to debug everyone's program when they try to use it, simply to prove that the original program really does work.

    With those reasons already in play, placing rules on top of it with voting and the like, would surely put a quick end to anyone posting anything. Because first off, nobody would bother voting. Just look at the results from the existing threads with Poll's.

    While many newbie's think that the Code Examples forum is the place to Request a Code Example, or Ask their question in the FAQ forum, simply because they've Frequently Asked themselves the same Question, I do my best to keep the Code Examples and FAQ forums clear of all the junk, and move everything out to the appropriate forums.
    Note: All the other forums are "Fair Game", except for SPAM and Flames. Added: and Politics, and religion.

    However, if I've missed something, feel free to chime in at any time. It's impossible to catch everything myself.
    Hi,

    I spent the bulk of my time last year hovering around Planet Source Code. My main objective was to further improve my programming skills in VB. I achieved this through a series of about 50 code submissions, feedback from other users, and in December of last year I won a coding competition.

    For those who aren’t familiar with Planet Source Code, they have a voting system, and each month, based on highest number of votes, 4 submissions are chosen as contest winners. You win a prize of your choice, there are a few to pick from – I settled for a copy of PhpED valued at $299.

    Planet Source Code receives a tremendous amount of traffic from users. Most submissions get around (100-200) hits daily in the first week. Some of them even more!
    And, because of this the voting system works to some extent. About 1 in 100 people vote on merit. The rest either don’t bother or place a vote of ‘poor’ on something that they’re obviously very jealous about. All told, you’re doing well if you receive 10 or more excellent votes on your submission.

    I would like to make a suggestion that something of a similar system would go down well here. But unfortunately, I don’t think there’s enough traffic. Mainly because, even though PBP is at a mature state it’s not largely widespread enough. This may however change in all due time. *Hope it does* With most this in mind, you couldn’t place too many restrictions or be terribly too fuzzy with what people are willing to submit. As Darrel points out, the site may end up with nothing if this approach is taken.

    Keep Coding,

    Trent Jackson

  14. #14
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    I've been thinking. (ow, that hurt's)

    It seems like the idea is to have a list of all the GOOD stuff from the forum, Shown in a place that somehow makes it easier to find what you're looking for. There really IS a lot of good stuff here, and most of it just get's lost thru the time and menutia.

    The prospect of "sanitizing" everyone's posts and presenting a pristeen place to view "only working code", was a little more than I could fathom.

    But maybe there's another possibility, and still retain some of the "Voting" idea already proposed.

    Although for a different reason, I recently created a list of Examples of Clock/Timer routines ....
    http://www.picbasic.co.uk/forum/show...2&postcount=18

    I think the same format could be used in a "group" of list's to refer to examples on just about any topic.

    But here's the problem.... I need your help.
    There's no way I'm going back through the last 36,500 posts to try to find the good one's. Or even catagorize them once found.

    This is where the voting comes in.
    I'm not sure what's the best way to do it. But maybe we just have a separate thread where you can put your recommendations. (or maybe just this thread). And then I can maintain the list's as necessary.

    I'm sure you've come across some real Gem's as you've perused the forum.
    Maybe you can point out those Gem's, and make it easier for other's to find, by determining what catagory of problems it solved.

    But back to that "I need your help" part.
    I don't know what the catagories are. I don't know what the Subjects are, or even if Subjects are the same thing as Catagories

    So it'll take some real work on your part too.

    Does this make any sense ??

    _
    DT

  15. #15
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Smile Good Idea

    That sounds like something worth considering. An "Ultimate Resource" thread that's specifically dedicated to known good & working snippets. This is in fact one of the biggest attraction with sites like Planet Source Code. An overwhelmingly huge archive where something on almost anything can be found.

  16. #16
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Oh my!

    Case in point, someone just replied to a thread from over a year ago...

    I've never seen that before.
    This stuff needs to be in an index somewhere, or something.
    DT

  17. #17
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    Oh my!

    Case in point, someone just replied to a thread from over a year ago...

    I've never seen that before.
    This stuff needs to be in an index somewhere, or something.
    Hi Darrel,

    I did not get your point.

    Could you be more specific please?

    Thanks
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  18. #18
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    I think what Darrel is trying to say is that there's some relatively good threads backlogged that may be of some considerable interest to others.

  19. #19
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Sayzer,

    It's just that everything seems to gets lost in the forum.

    Over a year ago, you posted a complete woking program in the PicBasic Pro furum that interfaces to a Playstation Gamepad.

    Maybe I was playing Half-Life that day and didn't see it get posted. As time goes on and more threads gets posted. The example just gets buried deeper and deeper.

    I had actually never seen it untill someone else posted a reply to it.

    And in the same manner, my proposal for a way around the problem is also getting buried. It's up in post #14.

    There's got to be a better way.

    .
    DT

  20. #20
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Darrel,

    Is there a way to rig the forum so if a thread receives 10? 5 star ratings it would automatically be moved to... "THIS PLACE HAS GOOD STUFF".
    Dave
    Always wear safety glasses while programming.

  21. #21
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    On second thought the star idea may not work.

    This thread has 5 stars, why?http://www.picbasic.co.uk/forum/showthread.php?t=2907

    The thread it refers to has 4 stars?
    Dave
    Always wear safety glasses while programming.

  22. #22
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Thumbs up

    Dave,

    That's what we want to see. Good idea's!

    Unfortunately, vBulletin doesn't seem to have a feature like that.
    But such a good idea it was, it led to this thought ....

    http://www.google.com/search?q=site:picbasic.co.uk +"thread rating"

    Which pulls up every thread that has been voted on in the forum.
    A.K.A. the "THIS PLACE HAS GOOD STUFF" place.
    (the first few results are the Forums themselves)

    Then, if you add another search term to the seach box on that page, it will give a list of threads that were voted on, that also match your keyword.

    It also quite handly shows the number of votes for each thread in the search results.

    And if nothing else, it provides a source of the "Best threads" for creating a List as mentioned before.

    But then, you all need to start voting on the GOOD one's, to make it work.

    .
    DT

  23. #23
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    OK I will start voting.

    Is there a way to put you link on the main page, with instructions?
    Dave
    Always wear safety glasses while programming.

  24. #24
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Great!,

    I hope we can get a few more people to do the same.

    Here's a couple links that may improve the results by limiting them to at least Min votes.

    Min
    4 --- http://www.google.com/search?hl=en&q=site:picbasic.co.uk +"thread rating" -"2 votes" -"3 votes"

    5 --- http://www.google.com/search?hl=en&q=site:picbasic.co.uk +"thread rating" -"2 votes" -"3 votes" -"4 votes"

    .
    DT

  25. #25
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,802


    Did you find this post helpful? Yes | No

    Default

    If I may suggest, a good search engine might help also. The forum has one but not very practical. Darrel suggested another one ... but I lost it. If I only could find where it was....

    See what I mean? Can the forum search be improoved? If not, may be Darrel's suggestion be somewhere easy to find? (Higher rated)

    Ioannis

  26. #26
    Join Date
    Mar 2005
    Location
    Iowa, USA
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ioannis
    Darrel suggested another one ... but I lost it. If I only could find where it was....
    GOOGLE SEARCH FOR PBP FORUM!

    Originally posted by Darrel Taylor
    Wisdom is knowing what path to take next... Integrity is taking it.
    Ryan Miller

  27. #27
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Darrel,

    Could you put your google trick links on the main page so the are easy to find and do not get lost.

    Some of us "book mark" threads of interest, but in my case I am not usising the same machine all of the time (shop, office, on the road, etc) so it would help to put these google links out front.
    Dave
    Always wear safety glasses while programming.

  28. #28
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Cool the forum at work

    Quote Originally Posted by mackrackit View Post
    Darrel,

    Could you put your google trick links on the main page so the are easy to find and do not get lost.

    Some of us "book mark" threads of interest, but in my case I am not usising the same machine all of the time (shop, office, on the road, etc) so it would help to put these google links out front.
    Hey Dave,
    You don’t read the forum at work do you? ooops, gotta go..., here comes my boss...
    -Adam-
    Ohm it's not just a good idea... it's the LAW !

  29. #29
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  30. #30
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Pic_User View Post
    Hey Dave,
    You don’t read the forum at work do you? ooops, gotta go..., here comes my boss...
    -Adam-
    By reading this forum I have leaned how to build a "BOSS DETECTOR".
    Dave
    Always wear safety glasses while programming.

  31. #31
    Join Date
    Mar 2006
    Location
    Hyderabad (India)
    Posts
    123


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    By reading this forum I have leaned how to build a "BOSS DETECTOR".
    Perhaps the modern bosses won't appear dirctly-- but watch our activity by the pattern of operation of the PC used by us from the server as super user- or BOSS as you put it.
    Regards,
    Sarma

  32. #32
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mvs_sarma View Post
    Perhaps the modern bosses won't appear dirctly-- but watch our activity by the pattern of operation of the PC used by us from the server as super user- or BOSS as you put it.
    If my BOSS knew how do do that I would not have to read this forum. I could ask him. It is all about profit, as long as the numbers are good...
    Dave
    Always wear safety glasses while programming.

  33. #33
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    Darrel,

    Could you put your google trick links on the main page so the are easy to find and do not get lost.

    Some of us "book mark" threads of interest, but in my case I am not usising the same machine all of the time (shop, office, on the road, etc) so it would help to put these google links out front.
    You can set up your little piece of this farm to keep track for you, just subscribe to the threads of interest and unsubscribe to all the others, then on your , home computer bookmark all the subscribed threads for permanent archive or better yet save the web page as a file.
    HTH
    JS
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  34. #34
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Unhappy Anniversary ...

    ....................
    Last edited by Acetronics2; - 30th June 2007 at 09:36. Reason: Wrong thread
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. Timer code examples for PIC 16F628
    By Tastature in forum mel PIC BASIC
    Replies: 6
    Last Post: - 22nd November 2013, 02:47
  2. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 21:31
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  5. Any Simple ASM interupt code examples out there?
    By George in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 28th March 2007, 04:19

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts