PDA

View Full Version : Code Examples



Archangel
- 16th January 2007, 02:04
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

mvs_sarma
- 16th January 2007, 07:11
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.

Archangel
- 16th January 2007, 07:44
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!

sayzer
- 16th January 2007, 09:08
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.

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

Archangel
- 16th January 2007, 10:38
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!

SteveB
- 16th January 2007, 17:02
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.:D), 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

skimask
- 16th January 2007, 17:34
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! :)

Darrel Taylor
- 16th January 2007, 19:39
Is there something in the Code Examples forum that you think shouldn't be there?

.

sayzer
- 16th January 2007, 19:43
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).


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

Archangel
- 16th January 2007, 21:02
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". ;)

Darrel Taylor
- 17th January 2007, 04:08
Yes I can be an irritating little turd,...

No, I only get those when I eat Jalapenos. And yeah, Ice to the whole helps. :eek:

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.

Archangel
- 17th January 2007, 08:01
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

T.Jackson
- 27th February 2007, 04:18
No, I only get those when I eat Jalapenos. And yeah, Ice to the whole helps. :eek:

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

Darrel Taylor
- 29th April 2007, 02:46
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/showpost.php?p=36992&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 :eek:

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

Does this make any sense ??

_

T.Jackson
- 29th April 2007, 05:05
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.

Darrel Taylor
- 29th April 2007, 05:58
Oh my!

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


Playstation gamepad interface code? (sayzer)
http://www.picbasic.co.uk/forum/showthread.php?p=18649


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

sayzer
- 29th April 2007, 10:05
Oh my!

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


Playstation gamepad interface code? (sayzer)
http://www.picbasic.co.uk/forum/showthread.php?p=18649


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

T.Jackson
- 29th April 2007, 10:49
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.

Darrel Taylor
- 29th April 2007, 20:59
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.

.

mackrackit
- 1st May 2007, 01:33
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".

mackrackit
- 1st May 2007, 01:59
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?

Darrel Taylor
- 1st May 2007, 02:16
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" (http://www.google.com/search?q=site:picbasic.co.uk%20+"thread%20rating")

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. :cool:

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.

.

mackrackit
- 1st May 2007, 02:29
OK I will start voting.

Is there a way to put you link on the main page, with instructions?

Darrel Taylor
- 1st May 2007, 03:26
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" ('http://www.google.com/search?hl=en&q=site:picbasic.co.uk%20+"thread%20rating"%20-"2%20votes"%20-"3%20votes')

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

.

Ioannis
- 7th May 2007, 21:18
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

rhino
- 7th May 2007, 23:33
Darrel suggested another one ... but I lost it. If I only could find where it was....

GOOGLE SEARCH FOR PBP FORUM! (http://www.google.com/custom?hl=en&cof=AH%3Aleft%3BS%3Ahttp%3A%2F%2Fwww.picbasic.co.u k%2Fforum%3BL%3Ahttp%3A%2F%2Fwww.picbasic.org%2Ffo rum%2Fimages%2Fcrownhill_logo.gif%3BLH%3A37%3BLW%3 A174%3B&domains=picbasic.co.uk&q=&btnG=Search&sitesearch=picbasic.co.uk)

Originally posted by Darrel Taylor

mackrackit
- 8th May 2007, 00:20
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.

Pic_User
- 8th May 2007, 15:48
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-

mister_e
- 8th May 2007, 19:10
http://www.picbasic.co.uk/forum/showthread.php?t=4751&highlight=search

mackrackit
- 8th May 2007, 19:41
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".:D

mvs_sarma
- 9th May 2007, 16:02
By reading this forum I have leaned how to build a "BOSS DETECTOR".:D

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.

mackrackit
- 9th May 2007, 17:06
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...

Archangel
- 13th May 2007, 08:09
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

Acetronics2
- 30th June 2007, 09:34
....................