FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

New Examples Posted

 
Post new topic   Reply to topic     Forum Index -> Tutorials
View previous topic :: View next topic  
Author Message
jcc7



Joined: 22 Feb 2004
Posts: 657
Location: Muskogee, OK, USA

PostPosted: Tue Jul 27, 2004 5:16 pm    Post subject: New Examples Posted Reply with quote

I haven't added many examples recently, but Russ Lewis just started the Delegate category. (Thanks, Russ.)

Editing Examples

An issue of increasing concern to me is how editable should the tutorials be to the average user. It's a conflict between security and maintainability. Currently, the system only allows me and Brad to edit examples (per my design). If someone is interested in adding examples from time to time, I wouldn't mind giving him or her access, also, but I'd rather grant access person-by-person than by allowing full access to everyone who logs into the forums.

I've already been thinking that I should set up some sort source control on the examples. I might be able to the PHP xdiff_string_diff function and a change table. Then, I'd feel comfortable about opening up editing to everyone who's logged in. We could even have a "recent changes" page and people could even find out what in particular changed. (Since it's sounding more and more like a Wiki, maybe I should look into hacking up phpWiki or some other php wiki system to highlight D syntax).

It's a big project and I'm not even sure which direction to go, so I don't think we'll have this anytime soon. In the meantime, just send me a PM or post in this forum and I'll fix it for you. Sorry for the inconvenience.

New Feature: rawhtml

By the way, there's a feature for embedding raw HTML now. Here's an example (#14):

Code:
void main()
{
}

/+rawhtml For an explanation of what this means, visit <a href="http://www.wikiservice.at/d/wiki.cgi?D__Tutorial/StartingWithD">Wiki4D.</a> rawhtml+/

A more exciting example: #59

The idea is that the content between the /+rawhtml and rawhtml+/ tags to output directly to HTML. Basically, it facilitates adding hyperlinks and custom formatting.


Other Ideas for Enhancements
- Add some error-checking to the d2html program (unmatched comments, unmatched quotes, etc.).
- Previewing "htmlization" of D source before it's added to the database.
- Custom sort options, such as by date or by difficulty
- Show a star by recent additions/edits in the list
- Add a last edit date/time and edited_by to separate the edit author from the post author.

Well, what do you guys think?
What should I do first?
What else might we want from a tutorial system?
Anyone want to help? Smile
Back to top
View user's profile Send private message AIM Address
Blandger



Joined: 21 May 2004
Posts: 50
Location: Ukraine, Kharkov

PostPosted: Wed Jul 28, 2004 10:31 pm    Post subject: Re: New Examples Posted Reply with quote

jcc7 wrote:
I haven't added many examples recently, but Russ Lewis just started the Delegate category. (Thanks, Russ.)

Thanks. I've never understood delegates till I 'played' with examples.

Quote:
It's a big project and I'm not even sure which direction to go, so I don't think we'll have this anytime soon. In the meantime, just send me a PM or post in this forum and I'll fix it for you. Sorry for the inconvenience.

Just leave your contact email on pages for the peolpe who'd like to post example but doesn't have an access. They might send their examples to you by email. Think it's easiest way but not a best. Or Is everyone allowed to post example but can't edit it?

Quote:
New Feature: rawhtml

Good.
I'd suggest to put somewhere a link to a page with tips about this feature. You can point it somewhere around tutorial pages.

Quote:
Other Ideas for Enhancements

My personal view:
1) - Previewing "htmlization" of D source before it's added to the database.
2) - Show a star by recent additions/edits in the list

Less priority I think.
3) - Add some error-checking to the d2html program (unmatched comments, unmatched quotes, etc.).
4)- Add a last edit date/time and edited_by to separate the edit author from the post author.
5)- Custom sort options, such as by date or by difficulty.

Quote:
What else might we want from a tutorial system?

I don't think it's a tutorial. I suppose for example 'Java Tutorial' from Sun is realy qualitative but this stuff is far way from such Sun's tutorial.
It's a kinda list of examples which is very useful to look for using some 'undocumented' or 'not obvious' D features sometimes.

Quote:
Anyone want to help? Smile

I'll always happy to send good example to section when I have it. Don't know php. Sad
_________________
Regards, Yuriy
Back to top
View user's profile Send private message
jcc7



Joined: 22 Feb 2004
Posts: 657
Location: Muskogee, OK, USA

PostPosted: Wed Jul 28, 2004 11:59 pm    Post subject: Re: New Examples Posted Reply with quote

Blandger wrote:
Or Is everyone allowed to post example but can't edit it?
Anyone can post examples, but only a couple of us can edit them (if something needs fixing).

Blandger wrote:
I don't think it's a tutorial. I suppose for example 'Java Tutorial' from Sun is realy qualitative but this stuff is far way from such Sun's tutorial.
Are you trying to hurt my feelings or something. Confused If someone was paying me to do this, I'd spend more time with it.

I'll grant you it's not much as a tutorial yet, but it's growing. My whole idea is to teach by example. I plan to add more commentary to the examples, but I haven't gotten around to it yet.

Blandger wrote:
I'll always happy to send good example to section when I have it. Don't know php. Sad
Actually, contributing an example is easy (no PHP skills required). Just click on "Add an example" at the bottom of the page and a form appears. Specify the name of an example, category, an optional description, and paste the D code into the bottom box (the syntax highlighting will happen automatically when the page is viewed). Click on "Submit" and the example will appear among the others.
Back to top
View user's profile Send private message AIM Address
jcc7



Joined: 22 Feb 2004
Posts: 657
Location: Muskogee, OK, USA

PostPosted: Tue Aug 03, 2004 5:36 pm    Post subject: Reply with quote

Brad mentioned to me that his new server will be running Trac. I've been looking at the Trac wiki system (I just got it installed on my computer). It looks pretty nice. Trac allows custom syntax highlighting processors written in Python.

I've written a little Python and I don't think it'll be a problem to port D2HTML (which was first written in D) from PHP to Python. Or from D to Python. So I think Trac might be a good basis for a tutorial system. One big advantage to using a wiki compared to the current system is that the change tracking would be automatic and safe.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Tutorials All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group