Code archives are not being used enough
Miscellaneous Forums/General Discussion/Code archives are not being used enough
I'm starting to realise that a lot of juicy stuff is hidden away in threads all over the place in the various programming sections.
I believe a lot of this is due to the poster not even contemplate adding to the code archives - it doesn't cross their minds.
I think it would be a good idea that BRL amend posting to include something like:
If you are posting example code, please feel free to also add this into the code archives
This type of prompt could appear anywhere around the 'Post reply to topic:' text.
Personally, I think this is a good idea as I strongly feel that people don't add to the archives purely as it doesn't cross their mind, not just they don't want to technically declare example code as public domain (which is part of the submission process to the archives).
This example is about as blatant as it can get:
http://blitzbasic.co.nz/Community/posts.php?topic=33995"Stickman" created a thread to post it - it will eventually drop off the forum. Even the programming sections get culled - not at the rate that General Discussion does - but the Blitz3D forums have lost a year from the start of the forums.
Maybe he just didn't want to add it to the code archives? He's not under any obligation to.
If its in a normal thread is it then not being declared as public domain?
I think some people don't do it purely because it doesn't cross their mind at the time.
I must admit that the PB code archives always seemed 1) Fuller, 2) Better organised than the Blitz ones
How about a Code search that searches for posts with [code] tags?
(Okay, maybe a bit complicated depending on how the indexer works, but it would be awesome and unique!)
Then you'd get a bunch of code that didn't work, Picklesworth... for instance, when a new programmer asks "what's wrong with this code?"
@ Picklesworth, the same thought (albeit fleetingly) crossed my mind - awesome and unique indeed!
I'm informing BRL of my decision to implement the new posting system. They will suitably facilitate my request.
Right, glad I sorted that out.
Actually, I've changed my mind.
If the current posting system did mention somewhere around the 'Post reply to topic:' box the suggestion to add code to the archives then the archives are in danger of filling up with pure junk.
This is a bit annoying really - I am convinced some code is destined for the archives if only the poster thinks about it at the time.
Hm... "Add to archive" above code blocks?
Could get ugly, though, and could end up with the same problem as Torrente mentioned except more controlled. (But then comes the problem of duplicate entries!)
Oh, and it may be cluttery.
Maybe to solve that it could only appear if it's your own post...
Just some food for thought :)
when a new programmer asks "what's wrong with this code?"
Not just new programers ;)
Im sure Ive posted more code that didnt work than did.
Puki is (unfortunatly), correct, the code arhieve content/organisation is abismal, compared to how much really good coding has been posted.
As an example someone posted me a singlton TGame type, and I know its there somewhere just below one of the 2500 odd posts Ive made, but I cannot find it. And not long ago, someone posted some code in a thread, and I thought "wow" thats good, Ill dl it later and use that. Yet Now I cannot remember what the code was about much less who posted it or were.
Puki, if you're so concerned about code, useful code, disappearing from the b3d programming forum then you should find the useful code and post it to the code archives yourself, crediting the original author.
It's already public domain when they posted it and if anyone did complain you could, or a mod, could then remove it.
That seems the simplest solution as long as you are prepared to search through all those posts for the good stuff I guess. Good idea?
Right - let's test it - I'll do one now:
http://blitzbasic.co.nz/codearcs/codearcs.php?code=2021What do people think?
It's already public domain when they posted it and if anyone did complain you could, or a mod, could then remove it.
Hold on. Where does it say any code posted on these forums is public domain? If I can't reserve my rights when posting code I may stop posting code altogether. I'll decide which, if any, of my code I wish to become public domain thank you. And when I do decide I'll put it in the code archive.
worthy of archiving, I've been steeped in BMax of late and it was great to have a reason to fire up Protean again.
What do people think?
If I remember correctly, there's an agreement that you must click to ensure that you are the author of the code, and it is definitely public domain. I'd suggest you remove that immediately unless you want to get in serious trouble (I would imagine claiming someone's work is public domain when it's not is a very serious offense).
Mmm.
Not an easy one to solve then - I can't just add stuff.
However, is there an alternative?
I could create a thread in (for example) Blitz3D Tutorials that indexes threads/posts - ie you can click a link to jump to that post - the link would have a short description and they would be arranged in groups (like the code archives).
How about this new idea of hyperlinking the posts?
commendable if your willing to do it Puki.
How about this new idea of hyperlinking the posts?
That is a much better solution in my view. Then at least the code would be seen in context.
Right, looks good to me.
Sometimes I'm convinced I am some sort of bipedal genius.
Only gonna work if its a sticky
And you need a BPlus and a BMax one (Im not expecting you to do them)
And cannot you do that hyper link thing that tonyG does, so the name is the link?
Like the entries in my sig?
Yep, I can do it that way.
And, its the organisation of the code that matters just as much, so you need a heading
"Lighting code" (for Example), and you have to promise to keep it up to date(ish)
(Yes like your sig, but tong always does it, so I think of it as his style)
I think you might run into a bit of an argument here though.
If I post some code in the achives, Im making it public domain. If on the other hand I post some code in answer to a question, then although the code is "In" the public domain, it isnt actualy public domain, and I can expect it to drop off the current threads quite quickly.
What you/we are now doing is taking these Non Public Domain posts and keeping them "In" the public domain.
If Oddball is correct, (and hes the only one to have answered my "Is it PD question"), then there might either be a strong responce from some ppl, a deletion of posts that otherwise might still be useful, or less replies to problems.
(Just thoughts)
They still drop with a forum cull - I'm purely linking to the original posts. It does not alter their date position in the forums.
In fact - I can add the suggestion for the poster to add the code to the archives via the thread!!!
I am a chuffing Large genius.
I swear I am some kind of scientist.
If you are an author of any of the code in the links then please contemplate adding your code to the relevent section of the code archives
Utter genius.
It does not alter their date position in the forums
Hummmm, does alter how easy they are to find though.
The problem as I see it, isnt the ones that are obviously ment to be PD (such as the one you link to), which might as well be coppied to the code archives by you, giving credit.
I think you need to think about what to do with the code that is not the first post, the reply/explination posts, cos they are 1) Often very very useful, 2) Could be argued not to be in the PD, unless BLR say that thread posts are PD
I would be annoyed if I gave Bob (say), some code, in the knowage that after a week the thread would effectivly be gone, for you to then holdup a big sign saying "Look at this code"
which is hidden in the threads and not in the public domain achives. In part because maybe its unfinished/unrepresentive of my code, or partly because I dont want loads of people useing it, and especaly all these new ppl who have joined in the last X years who I dont know.
If you are an author of any of the code in the links then please contemplate adding your code to the relevent section of the code archives
I like that
In fact, when you look at the code archive rankings (this list is about a month out of date):
53 jfk EO-11110
46 BlitzSupport
46 Nowel Cower
34 sswift
33 skn3[ac]
31 Matt Merkulov
28 Frankie Taylor
28 Rob
23 Chroma
22 Rob Farley
21 bradford6
20 Jeppe Nielsen
19 Andres
19 elias_t
19 Perturbatio
18 Anthony
18 EdzUp
18 skidracer
17 Vertex
16 markcw
15 Beaker
15 fredborg
15 Markus Rauch
15 Devils Child
13 grey Alien
13 n8r2k
13 Ziltch
12 David Bird(Birdie)
12 Filax
11 Fabian
10 big10p
10 Cygnus
10 ninjarat
10 ozak
10 starfox
Where the hell is "halo" (via any of his nicks)? "halo" has posted a lot of stuff in the forums - he's an ideal guinea-piggy for this.
"halo" is way, way down the code archive rankings, but he is a 'thread code poster'.
Havent all of Halos threads dissapeard?
Anyway I think your right.
(Go on organise it all, in fact write some code to do it for you)
And do Bmax while your at it
Nope.
In fact, his "Leadwerks" nick is his "halo" one. With the Off Topic culling it brings his 'signal to noise' ratio down to quite a nice searching status.
In fact, it's not just code I can index - I can also just index an entire thread on the basis that it is totally interesting.
Example:
http://www.blitzbasic.com/Community/posts.php?topic=20679#212189
Personally, I post code to the archives only if it can be ‘plugged’ into existing projects, comes with at least one example, and does not require external media files. My 'thread code postings' generally do not fit those criteria. However, I do consider all my posted code to be public domain (but not the media files, if any).
Ok, I guess that wasn't a good idea. Sorry you had to post and then remove something due to my suggestion, puki.
I certainly wouldn't mind someone posting my code to the code archives which is why I assumed others would feel the same way, but after reading the responses here I realize that I was wrong.
I think you should put something in that code entry though Puki, rather than just "void". You can add this code of mine if you like, it's a simple pong game I posted here in GD a few months ago.
The links idea is quite good, the only problem is stuff will still be culled.
;Pong1, by markcw on 23/9/06
width=640
height=480
Graphics width,height,0,2
SetBuffer BackBuffer()
playery=height/2
cpuy=height/2
SeedRnd MilliSecs()
While Not KeyHit(1)
Cls
;court line
Rect width/2,0,1,height
;ball
Oval ballx,bally,15,15
If serve=0 Then ballx=60 : bally=playery+20
If serve=2 Then ballx=width-60 : bally=cpuy+20
ballx=ballx+ballxspd
bally=bally+ballyspd
If bally<0 Or bally>height-15 Then ballyspd=-ballyspd
If ballyspd>8 Then ballyspd=8
If ballyspd<-8 Then ballyspd=-8
;computer
Rect width-50,cpuy,10,60
If ballx>width-50 And ballx<width-40
If bally>cpuy-8 And bally<cpuy+52
ballxspd=-3 : ballyspd=ballyspd+(cpuyspd/2)
EndIf
EndIf
If ballx>width/2
If bally>cpuy+20 Then cpuyspd=4
If bally<cpuy+20 Then cpuyspd=-4
If Abs(cpuy+20-bally)<10 Then cpuyspd=cpuyspd/4
If ballx>width-60 And Abs(ballyspd)<2 Then cpuyspd=2*(Rand(0,4)-2)
If cpuy<0 Then cpuy=0
If cpuy>height-60 Then cpuy=height-60
cpuy=cpuy+cpuyspd
Else
If cpuy>height/2 Then cpuy=cpuy-2
If cpuy<height/2 Then cpuy=cpuy+2
EndIf
If serve=2
cpuyspd=2*(Rand(0,4)-2)
serve=1 : ballxspd=-3 : ballyspd=ballyspd+(cpuyspd/2)
EndIf
;player
Rect 50,playery,10,60
If ballx>50 And ballx<60
If bally>playery-8 And bally<playery+52
ballxspd=3 : ballyspd=ballyspd+(playeryspd/2)
EndIf
EndIf
If KeyDown(200) Then playeryspd=-4 ;up key
If KeyDown(208) Then playeryspd=4 ;down key
If Not KeyDown(200) Or KeyDown(208) Then playeryspd=0
If playery<0 Then playery=0
If playery>height-60 Then playery=height-60
playery=playery+playeryspd
If serve=0 And KeyHit(57) ;space key
serve=1 : ballxspd=3 : ballyspd=ballyspd+(playeryspd/2)
EndIf
;points
If nextpoint=0
If ballx<0 Then cpupoint=cpupoint+1 : nextpoint=1
If ballx>width Then playerpoint=playerpoint+1 : nextpoint=1
EndIf
If nextpoint>0 Then nextpoint=nextpoint+1
If nextpoint>60
nextpoint=0
If cpupoint>10
cpupoint=0 : playerpoint=0 : cpugame=cpugame+1
EndIf
If playerpoint>10
cpupoint=0 : playerpoint=0 : playergame=playergame+1
EndIf
If cpupoint+playerpoint<5 Then serve=0 Else serve=2
If cpupoint+playerpoint>9 Then serve=0
ballxspd=0 : ballyspd=0
If cpugame>1 Or playergame>1
serve=3 : ballx=width/2-7 : bally=height/2-7
EndIf
EndIf
If serve=3 And KeyDown(57) ;space key
serve=0 : cpupoint=0 : cpugame=0 : playerpoint=0 : playergame=0
EndIf
Text width/2-140,0,"Player = "+playergame+" : "+playerpoint
Text width/2+20,0,"Computer = "+cpugame+" : "+cpupoint
If serve=3 Then Text width/2-40,40,"GAME OVER"
Flip
Wend
I can't use that - the entry I created was in '3D Graphics - Mesh'.
I will sniff out a replacement.