function/code test area?

Questions, comments, and suggestions about this site should go here.
User avatar
01000101
Member
Member
Posts: 1598
Joined: Fri Jun 22, 2007 12:47 pm
Location: New Hampshire, USA
Contact:

function/code test area?

Post by 01000101 »

hey, I was thinking of adding a forum/subforum that can be dedicated to posting small functions of code that needs the public's eye for examination. I know we have the "test" forum, but that's for full releases and beta testing, not small pieces that need to be checked out and ridiculed by the community before actually be used as a 'stable' piece.

Either that, or direct me to the area where I can post my locking code just to be looked at and ripped apart until it's 100%. I have code that works, but I think it would be good for this place to have some sort of public inspection area where the community can look at snippets of other people's code that they post, just to make correction or give reason for change.

Good idea?
Bad idea?
JohnnyTheDon
Member
Member
Posts: 524
Joined: Sun Nov 09, 2008 2:55 am
Location: Pennsylvania, USA

Re: function/code test area?

Post by JohnnyTheDon »

I could go for that.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania
Contact:

Re: function/code test area?

Post by Love4Boobies »

Generally speaking, it's a nice idea. But I think in the case of this forum it would be flooded by all sorts of code from everyone and most of it would never get examined anyway.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
xDDunce
Member
Member
Posts: 173
Joined: Tue Aug 12, 2008 4:04 pm
Contact:

Re: function/code test area?

Post by xDDunce »

[$0.02]
i agree with both points of view...

i agree it will help alot if we had that section, but it could get a bit bogged down with trolls posting printf() functions that take 10 minutes to execute :lol:

but i think it could work, IF the right rules were applied.
[/$0.02]
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: function/code test area?

Post by AJ »

Hi,

I think it's a good idea, but generally I am quite strongly against new forum creation. I personally like a decluttered main forum page and am put off sites that have 20+ forums - I tend not to bother registering / posting (could just be general laziness on my part!).

Having send all that, it was, with hindsight a good thing splitting off the OS Design forum from the OS Development forum. Perhaps for now, you could just post in "Test Requests", despite the lack of precedent. If it happens a lot and works well, we could then ask Chase to create a new sub forum.

Cheers,
Adam
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania
Contact:

Re: function/code test area?

Post by Love4Boobies »

Perhaps creating a sticky topic in one of the sub-forums?
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Freenode IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: function/code test area?

Post by Combuster »

Let us first see that you are actually doing that before asking us to create a subforum, sticky a thread, etc etc, so that we actually see the real need for that.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
01000101
Member
Member
Posts: 1598
Joined: Fri Jun 22, 2007 12:47 pm
Location: New Hampshire, USA
Contact:

Re: function/code test area?

Post by 01000101 »

Then can we add a small sentence or something to the description of Announcements saying that it's ok to post code snippets for review?

I agree, a test-run would be the safest option.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania
Contact:

Re: function/code test area?

Post by Love4Boobies »

Heh; here's Troy Martin's chance to get that FAT12 driver going... :wink:
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: function/code test area?

Post by Troy Martin »

Hmmmm...

I'll post whatever real mode routines anyone ever need or wouldn't even think of needing, you can count on that for sure! :D
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
User avatar
Zenith
Member
Member
Posts: 224
Joined: Tue Apr 10, 2007 4:42 pm

Re: function/code test area?

Post by Zenith »

Troy: Yeah... Now that you mention it, I was wondering if you had decent FAT12 driver routines for real mode? :twisted:

On-topic: Usually, people don't ask for review of their code before putting it into their kernel, but only post their code when they run into problems. Hence the OS Development forum...

It's typically good practice to ask other people's opinion about your code, but does/will anyone actually submit their code for public display?
"Sufficiently advanced stupidity is indistinguishable from malice."
User avatar
01000101
Member
Member
Posts: 1598
Joined: Fri Jun 22, 2007 12:47 pm
Location: New Hampshire, USA
Contact:

Re: function/code test area?

Post by 01000101 »

I will.

And I think it would be a lot better to post sketchy code, get it hammered out by the public, and then implement it... instead of implementing the sketchy code, running into problems a few days/weeks/months later, then posting it and trying to figure it out.

Also, if some things like printf() and malloc() get put up, maybe the new guys can see what certain approaches are better than others and such.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Freenode IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: function/code test area?

Post by Combuster »

Things that are just as interesting to put up are definitions/descriptions of kernel interfaces. While a bug may prove nasty, design flaws are, from experience, really bad and can keep haunting you forever.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
JackScott
Member
Member
Posts: 1029
Joined: Thu Dec 21, 2006 3:03 am
Location: Hobart, Australia
Contact:

Re: function/code test area?

Post by JackScott »

Yeah, I mean, just look at either the Windows or Linux kernels. :P
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: function/code test area?

Post by Solar »

My 0.02$ worth:

Hammering your own code into submission by a series of test cases and szenarios is half the fun of programming, why offload it to some other dudes?

And, if you have those test cases and szenarios, script-driven by preference, you can repeat them whenever you changed something in the code, to see if it still works...

Unit tests / scenarios are a most valuable part of a software project, and peer review by mayhaps a dozen people from this board is a very poor second to that...

But go ahead, post your code in the test forum, and we'll see how much feedback it gets. (I excuse myself right here - going over other people's code is my daytime job, so I usually got my fill at work already. ;-) )
Every good solution is obvious once you've found it.
Post Reply