Click to See Complete Forum and Search --> : CCAE - open for business


kmj
04-27-2001, 09:20 AM
::trumpets and whatnot::

TheLinuxDuck and I have the new Catalogued Collection of Annotated Examples (http://codeexamples.org) up at http://codeexamples.org . Have a looksee an let us know what you think...

It was all done using perl/CGI and HTML, and I believe we plan on releasing the code for public perusal in the near future...

Some of the things the site features are...
1) a Database of Examples (Duh :)) -which is growing daily, I might add.

2) a Database of links to other helpful sites for languages

3) a Programming Dictionary (thanks gweedo!)

::more trumpets blaring::

(sorry, I just like trumpets :p)

TheLinuxDuck
04-27-2001, 09:21 AM
Cruddy.. I had several people who wanted to receive email when the site opened, but I left their email addy's at home...

Strike
04-27-2001, 09:31 AM
Quick spelling/grammar corrections (for CCAE's front page):

Sensie --> Sensei
who's --> whose

[ 27 April 2001: Message edited by: Strike ]

Strike
04-27-2001, 09:33 AM
Also, I have a hokey old Scheme program sitting around that you can post as a Scheme example if you want.

Stuka
04-27-2001, 09:41 AM
/me looks at site...rofl @ title (obviously TLD's work)

Sorry...I'll get a better review once I stop laughing at knickerless toasters! :)

kmj
04-27-2001, 10:03 AM
:( That's why I posted the other one five days ago; so I'd have time to catch my spelling mistakes (after having them pointed out to me multiple times, of course. :D)

and, stuka, I can take credit for that little tidbit of insanity... :p

kmj
04-27-2001, 11:09 AM
Originally posted by Strike:
<STRONG>Also, I have a hokey old Scheme program sitting around that you can post as a Scheme example if you want.</STRONG>

oh, forgot... sure! by all means do so, I've actually got a couple lisp things that I've been meaning to clean up and post.

Sensei
04-27-2001, 11:26 AM
posted to LNO front.

Stuka
04-27-2001, 12:39 PM
Better watch out, kmj...pretty soon you'll be wonking, if you're not careful! :D Hey, the site looks great! Minor quibbles: some spacing issues (as in spaces left out) on a couple of dictionary items, and the Database Search page could use some prettifying IMO. But seriously, gents, very nice work! (Plus it was cool seein' my name on the web! :cool :)

kmj
04-27-2001, 02:12 PM
Originally posted by Stuka:
<STRONG>Better watch out, kmj...pretty soon you'll be wonking, if you're not careful! :D Hey, the site looks great! Minor quibbles: some spacing issues (as in spaces left out) on a couple of dictionary items, and the Database Search page could use some prettifying IMO. But seriously, gents, very nice work! (Plus it was cool seein' my name on the web! :cool :)</STRONG>

Yeah; I've been conversing w/ TLD alot lately.. obviously. (c: He's made me forget about the idea of normalcy. Anyway, I don't wonk, I blarg... the space issues are from are probably because of newlines not being converted to &lt;br&gt;'s or spaces or anything... we can fix that...

...if you checked out the todo list, there are alot of neat things we want to add... I think between TLD and I, we have plans to change every single section of the webpage in one way or another. ...we have alot of cool ideas... :D

Thanks for the comments & stuff.

And Sensei, thanks for posting us on the front page. :)

Strike
04-27-2001, 02:41 PM
There's no choice for "Scheme" (or Lisp) in the "Language" dropdown, so I'm just gonna put C.

kmj
04-27-2001, 03:07 PM
Originally posted by Strike:
<STRONG>There's no choice for "Scheme" (or Lisp) in the "Language" dropdown, so I'm just gonna put C.</STRONG>

We'll have to add it; the script will try to parse it for hilighting and whatnot as if it's C, and append a '.c' to it. If you already submitted it, that's fine, cuz we're gonna have to go add Lisp/Scheme (i think it'd be fine to have them as one) anyway... and it'll be easy to rename that... what kind of extension to scheme files use?


does scheme use ; as a comment character?

edit: I see it does, just let me know what kind of extension it should have and I'll set it up...

[ 27 April 2001: Message edited by: kmj ]

Strike
04-27-2001, 03:24 PM
I use .scm, but it doesn't matter (of course, it doesn't really for any language I suppose)

kmj
04-27-2001, 04:06 PM
Originally posted by Strike:
<STRONG>I use .scm, but it doesn't matter (of course, it doesn't really for any language I suppose)</STRONG>

true enough; well, I suppose some compilers might care, but it especially doesn't matter for interpreted languages... I don't really want lisp and scheme to be in seperate sections, so I'm just going to use .lisp for the extensions for both... if you think there'll be a problem with that, let me know..

edit: It's up... I should have a lisp example (sorting; qsort, insertion sort, merge-sort) done in a matter of days.

[ 27 April 2001: Message edited by: kmj ]

Ben Briggs
04-27-2001, 07:40 PM
I'm glad to see it's up. I wish you and TLD a lot of luck with the site.

kmj
04-27-2001, 07:45 PM
Originally posted by Ben Briggs:
<STRONG>I'm glad to see it's up. I wish you and TLD a lot of luck with the site.</STRONG>

Heh, where do you think you're goin'? We've got plans for you!

edit: stupid ubb code.

[ 27 April 2001: Message edited by: kmj ]

binaryDigit
04-27-2001, 08:46 PM
you guys are awesome. nice work.
i give you 9 thumbs up.

:D

Ben Briggs
04-28-2001, 01:20 AM
Originally posted by kmj:
<STRONG>Heh, where do you think you're goin'? We've got plans for you!
</STRONG>

No! Not the probes again! :)

sans-hubris
04-28-2001, 02:56 AM
Dude, I got some many things from my two C++ class (taking Data Structures next year, more examples will come, I promise).

Gripe: can you please get rid of all those damn pictures (or at least use ALT tags) for those of us still using text browsers like links (e.g. ME)

kmj
04-28-2001, 10:41 AM
I'm using lynx right now, and the pictures don't show up for me; you should be getting text only message that says:



Welcome to the

Cataloged Collection of Annotated Examples
Click here for the latest site news!

Our mission is to provide you with commented examples for different
programming languages, to help you learn by example. Our site provides
a database of searchable source code for perl, python, ruby, shell
scripts, c, c++, java, and php. All code has been donated to the
cause of learning so you are free to use and modify any code available
on this site! We also offer to you a dictionary of searchable terms.
Please feel free to take a look at our links page, or learn a little
about the founders and contributors of this site.
If there is anything you feel we need, or an example that you'd like
to see, please visit the current projects page, and submit your
request. We're also always looking for coders to submit commented code
for the site. If you have a desire to submit something, please visit
the current projects page, and look at the list of projects in the
works. If something is not taken, please simply submit your project
idea and language to the appropriate form, and email it to us once
you're finished. We'll take it from there! We appreciate your interest
in CCAE, and if you have any questions, comments, or friendly
statements (Galee), please email either of us at kmj or thelinuxduck.
Thanks for your interest!


Using the links in that text you can get to any part of the code you want, w/o pictures.

binaryDigit
04-28-2001, 12:28 PM
the site works fine with w3m by the way. thanks for making it text browser friendly.

sans-hubris
04-28-2001, 12:34 PM
Originally posted by kmj:
<STRONG>I'm using lynx right now, and the pictures don't show up for me; you should be getting text only message that says:



Welcome to the

Cataloged Collection of Annotated Examples
Click here for the latest site news!

Our mission is to provide you with commented examples for different
programming languages, to help you learn by example. Our site provides
a database of searchable source code for perl, python, ruby, shell
scripts, c, c++, java, and php. All code has been donated to the
cause of learning so you are free to use and modify any code available
on this site! We also offer to you a dictionary of searchable terms.
Please feel free to take a look at our links page, or learn a little
about the founders and contributors of this site.
If there is anything you feel we need, or an example that you'd like
to see, please visit the current projects page, and submit your
request. We're also always looking for coders to submit commented code
for the site. If you have a desire to submit something, please visit
the current projects page, and look at the list of projects in the
works. If something is not taken, please simply submit your project
idea and language to the appropriate form, and email it to us once
you're finished. We'll take it from there! We appreciate your interest
in CCAE, and if you have any questions, comments, or friendly
statements (Galee), please email either of us at kmj or thelinuxduck.
Thanks for your interest!


Using the links in that text you can get to any part of the code you want, w/o pictures.</STRONG>

The problem w/that is that links does have support for frames and so will load up the frames version.

kmj
04-28-2001, 09:47 PM
Ah, I see... you're right, we should have ALT data in there...

kmj
05-01-2001, 02:30 PM
The ALT data should be in there now... Heh, it actually was there before, but it was in the wrong spot.

kmj
05-02-2001, 01:49 PM
Just thought I'd mention that we've completely redone the links section.. :) It is muy nice now, instead of just a big ugly slightly-dynamic list of links, it now lets you search & browse alphabetically, and by category. I've redone the interface completely using tables to make everything line up nicely, so the interface is pretty good now... also, you can choose to hide or show the descriptions, so if they don't get in the way.

Check it out (http://www.codeexamples.org) and let me know what you think...

[ 02 May 2001: Message edited by: kmj ]

EyesWideOpen
05-02-2001, 01:58 PM
Very spiffy! Great job. ;)

How about a link to CPAN (http://www.cpan.org) under the Languages &gt; Perl section? :D

Also, I know some are against popping up too many windows but it might be nice to have the links open in a new window so the CCAE window is still open.

kmj
05-02-2001, 02:43 PM
Originally posted by EyesWideOpen:
<STRONG>Very spiffy! Great job. ;)

How about a link to CPAN (http://www.cpan.org) under the Languages &gt; Perl section? :D

Also, I know some are against popping up too many windows but it might be nice to have the links open in a new window so the CCAE window is still open.</STRONG>

I'll add that link...

That's a good idea about opening in a new window, I'd be willing to bet the split on whether or not it should open in a new window would be about 50/50, so maybe I'll just add a button to all people to choose whether or not it should be a new window... Shouldn't be to hard.

Thanks for the advice EWO!

EyesWideOpen
05-02-2001, 03:17 PM
Originally posted by kmj:
<STRONG>I'd be willing to bet the split on whether or not it should open in a new window would be about 50/50</STRONG>

That's what I'd peg it at too. Those damn pop-up ads :mad: have soiled the reputation of opening new windows! :D

<STRONG>Thanks for the advice EWO!</STRONG>

No problem. BTW, I just submitted my first example. :D Got another in the works... (both Perl :) )

[ 02 May 2001: Message edited by: EyesWideOpen ]

EyesWideOpen
05-02-2001, 04:11 PM
Another small suggestion. The page that actually lists the examples for a given language could use a header that says what language the examples are for. I just clicked on the "shell(4)" link and then did something in another window while that loaded and when I came back I forgot what language I picked! :eek: I guess you can kind of figure it out by the descriptions but I'm too lazy for that. :p :D

My short term memory is terrible so I may be alone on this one... :D

sans-hubris
05-02-2001, 04:38 PM
kmj, sorry for the way I came off in those messages I sent you guys. I wasn't sure if you guys wanted any help so I offered some and the way I presented it was probably not the best way.

kmj
05-02-2001, 05:08 PM
Originally posted by ndogg.cpp:
<STRONG>kmj, sorry for the way I came off in those messages I sent you guys. I wasn't sure if you guys wanted any help so I offered some and the way I presented it was probably not the best way.</STRONG>

That's alright... I understand. Right now, we're kind of moving at our own pace (which happens to be damned fast for two guys who know nothing about web development), because we kind of want to choose the direction we go carefully... and we're kind of deciding that on the fly.


EWO: you don't have to look at the descriptions, you could look at the 'Language' column. :D

david
05-02-2001, 08:21 PM
What's with projects? I'm hopefully going to be adding lotsa nice comments to MyForum pretty soon, do you want that?

kmj
05-02-2001, 09:20 PM
The 'Projects' section is for people to post examples that their working on, so to minimize duplication of effort, and such... I don't think your MyForum would make a great example, since I assume it's a pretty big project... to be honest, if the duck would let me I'd take your code and use it as a bbs for the site. :D (Well, right now we're tackling a bunch of other things, and a forum adds alot of complications which we really don't have the time to worry about. Plus I'd have to take advantage of the open source nature to hook it more tightly into the site, so a person could have a single account for the forum and the rest of the site...)

EyesWideOpen
05-02-2001, 09:32 PM
Originally posted by kmj:
<STRONG>EWO: you don't have to look at the descriptions, you could look at the 'Language' column. :D</STRONG>

Doh! I honestly did not see that column there. :( Really I didn't! :rolleyes: :D

TheLinuxDuck
05-03-2001, 04:47 PM
EWO:

(^= It's not written in very large text.. and most of the languages are small works anyway.. it's easy to miss with all the other junk in there.. (^=

And thanks for the suggestions and things.. I know kmj really liked the pop up window idea for the links, because he's been working on that today.

As for me.. heh.. I've been working on rewriting the code 2 html parsing engine for the site.

The 'detail' code was not very flexible and had basic keyword highlighting that worked, but there were some issues with the way it handled everything, so I basically have spent the last 3-4 days rewriting it. I'm still not done, but have a great portion of the innerworking taken care of. Should help alot with the 'detail' view once it's in place.

And, I'm sure you are sitting there saying 'why is TLD telling me all this?', and I tell you... it's because my brain isn't working! (^=

EyesWideOpen
05-03-2001, 05:02 PM
Originally posted by TheLinuxDuck:
<STRONG>(^= It's not written in very large text.. and most of the languages are small works anyway.. it's easy to miss with all the other junk in there.. (^=</STRONG>

Thanks for understanding! ;)

<STRONG>And thanks for the suggestions and things.. I know kmj really liked the pop up window idea for the links, because he's been working on that today.</STRONG>

Cool! :cool: If I think of anything else I'll let you know. :)

<STRONG>And, I'm sure you are sitting there saying 'why is TLD telling me all this?', and I tell you... it's because my brain isn't working! (^=</STRONG>

As long as it keeps not working the way it has, you should be fine! ;) :D

TheLinuxDuck
05-03-2001, 05:24 PM
<STRONG>Thanks for understanding!</STRONG>

(c: Understanding is in my jeans.. err. genes.. heh..

<STRONG>Cool! If I think of anything else I'll let you know. </STRONG>

We're also open for constructive critisizm, too, so if something seems weird or otherwise funky, let us know that too. (^=

Originally posted by EyesWideOpen:
<STRONG>As long as it keeps not working the way it has, you should be fine! ;) :D</STRONG>

( (c: Either that, or I'll lapse into a coma.. (: But, thanks for the confidence!

kmj
05-04-2001, 10:14 AM
EWO: Your wish is my command... I added a button to the bottom right of the page which allows you to change whether you you open it in a different window (this should pop up a new window, in which all links clicked will be open in) or the current window; while I was at it, I figured I'd add a count of the total links, and the number of links returned.

YaRness
05-04-2001, 10:54 AM
i'd like to slowly butt shirley....

get it?!


hey, the site looks Pretty Damn Cool (C)

YaRness
05-04-2001, 10:55 AM
hey, i want your code for posting news items and stuff.

EyesWideOpen
05-04-2001, 11:04 AM
Originally posted by kmj:
<STRONG>EWO: Your wish is my command... I added a button to the bottom right of the page which allows you to change whether you you open it in a different window (this should pop up a new window, in which all links clicked will be open in) or the current window; while I was at it, I figured I'd add a count of the total links, and the number of links returned.</STRONG>

Very cool! I was just expecting you to add some target =_blank attributes to the link tags but that is definitely a more robust way to do it. ;)

kmj
05-04-2001, 12:00 PM
what is _blank? always a new window?


Yar: We plan on making all that stuff available, but we still need to do some cleaning... I'm going to do that for the "links" first, then I'll do it for the news.

YaRness
05-04-2001, 12:07 PM
damn your cleaning! :p

i'm just WAY too lazy to write something myself.. and i'm trying to get around subjecting myself to the likes of phpnuke or slashcode.

kmj
05-04-2001, 12:51 PM
Originally posted by YaRness:
<STRONG>damn your cleaning! :p

i'm just WAY too lazy to write something myself.. and i'm trying to get around subjecting myself to the likes of phpnuke or slashcode.</STRONG>

check your hotmail account, bub.

YaRness
05-04-2001, 12:53 PM
*hop*

YaRness
05-04-2001, 01:09 PM
looks like EXACTLY what i needed.

gonna hafta boot up the linux box i suppose, i don't know if that file locking stuff is properly ported to windows. let alone do i feel like figuring out how to get the winderz web server running.

ooowa.

at first glance, aside from some too-short variable names ( :mad: ), it looks just peachy.

just outta curiosity, what's with the big format_time function?


$foo = localtime;
print $foo;

will get you "Fri May 4 13:10:10 2001", which could just be grokked to get most of the info you print (your thingie returns " 4, 2001 01:10:10 PM EST"). just seems like a lot of code :D

k that's all i looked at so far.

kmj
05-04-2001, 01:22 PM
Originally posted by YaRness:
<STRONG>looks like EXACTLY what i needed.
at first glance,
</STRONG>

Good :)


<STRONG>
aside from some too-short variable names ( :mad: ), it looks just peachy.
</STRONG>

::shrug::


[/qb]
just outta curiosity, what's with the big format_time function?
[/QB]

It wasn't too much to write, and I wanted AM/PM, plus, doesn't localtime only return the month number 0-11? Though, actually, the 'EST' may be incorrect, since I have no idea what state mindwarp's server actually resides in. :)

YaRness
05-04-2001, 01:32 PM
if you call localtime in a scalar context (only been able to get it to work by doing $foo=localtime;print $foo), it prints what i showed above ("Fri May 4..."). it uses military time though, so i guess you'd still hafta translate that into AM/PM... but otherwise i think everything else is there.

might be some tools somewhere for doing time conversions and stuff.

anyway i'm just nitpicking :D

EyesWideOpen
05-04-2001, 02:58 PM
Originally posted by kmj:
<STRONG>what is _blank? always a new window?</STRONG>

Yeah. It tells the browser to open the URL in a new window. You could also put &lt;BASE "target=_blank"&gt; at the top of the HTML document and that will make all links contained in that page open in a new window. ;)

[ 04 May 2001: Message edited by: EyesWideOpen ]

kmj
05-04-2001, 04:15 PM
Originally posted by EyesWideOpen:
<STRONG>Yeah. It tells the browser to open the URL in a new window. You could also put &lt;BASE "target=_blank"&gt; at the top of the HTML document and that will make all links contained in that page open in a new window. ;)
</STRONG>

Good to know... I couldn't use the "BASE" tag here, though, since that would make a new window every time you click to expand a section or subsection.

EyesWideOpen
05-04-2001, 04:28 PM
Originally posted by kmj:
<STRONG>I couldn't use the "BASE" tag here</STRONG>

It's just as well. I don't know how widely supported it is anyway. I remember having problems with it in the past.

I'm off to install java. Didn't realize it wasn't installed until I tried to look at the "Building a java applet" example and there was blank space where the applets should have been! :eek: :(

kmj
05-04-2001, 04:47 PM
Originally posted by EyesWideOpen:
<STRONG>
I'm off to install java. Didn't realize it wasn't installed until I tried to look at the "Building a java applet" example and there was blank space where the applets should have been! :eek: :(</STRONG>

LOL! :)

If you're using Moz, it shouldn't be too bad, I did it w/o much trouble.