Home » Community » Forums » » Using PDL for Code Design and Documentation
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

Add Forum to Favorites |  Send Topic To a Friend | View Forum FAQ | Track this topic


 Last Thread Next Thread 
 Using PDL for Code Design and Documentation
Post Reply 
[BEGIN TRANSMISSION]

Hello all you readers! I'm finally getting up to speed with this whole message board response thingy, just to let you know. Although I do enjoy all your adoring and supportive emails, I would appreciate it if simple questions and comments could be posted here so that future visitors may find answers and insights without having to clog up my inbox. Okay, so I really don't get THAT much fan mail, but hey - it'll be easier for everyone right? Besides that any ticks you have with my article can be discussed here, where all can add their input and I am saved a scathing back and forth email war between myself and the acussee. Course that hasn't happened yet but it's always good to be prepared. Yeeeaaah. So, if anyone ever happens to visit this desolate place, rest assured that starting today it is bookmarked and will be checked regularily by moi. Let the posting begin!

[END TRANSMISSION]



==============================
"Need more eeenput..."
- #5, "Short Circuit"
==============================

 User Rating: 2077   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

PDL sounds like it could be both useful and annoying.

When I was back in university, I asked the reason why you'd want to write you code first in pseudo code then into your code. The teacher said "Because you can then use the psuedo code as comments".

I'm a religious commenter myself, but I found that Psuedo code always gave another level between me and the code. I just found it was easier to comment as I went.

On the other hand though, it makes you think a bit more about your comments b4 you put them in the code, and see the "BIGGER" picture when you comment..

Anyway, good article for illustrating your points, as always (since I did agree very muchly with your previous article)

Like to see more in the future..

 User Rating: 1086   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Loved the article. It is exactly what I've been looking for.

I hate commenting my code because it takes a lot of time. PDL eases that by making my design comments. Really neat.

Know of any other tricks?

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Nope, sorry NuffSaid. But what other tricks? PDL sums it all up rather nicely

==============================
"Need more eeenput..."
- #5, "Short Circuit"
==============================

 User Rating: 2077   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

A comment about the statement
'When we talk about high-level languages, we talk about languages where the instructions you type represent English (as an example) more and more.'

This is NOT what you usually mean by a high-level language.
For example:
68000 assembly
A) moveq #1,D0
'High-level' according to the statement
B) Quick Move Number 1 to Data Register 0
The semantic meaning of A and B are obviously the same ie. D0<-1.

A higher-level language is a language where you abstract away from lower details more than in a language some 'level' below.

Edited by - Jorgen on June 28, 2001 6:31:01 AM

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Yeah well I hate using 'abstract' in describing things to people and avoid it whenever possible. I talk to people that way and get weird looks - it's hard to wrap ones head around the idea of abstracting, at least a lot of people I know had trouble with it. On the technical level tho your explaination is correct

==============================
"Need more eeenput..."
- #5, "Short Circuit"
==============================

 User Rating: 2077   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

re: "PDL stands for Program Design Language"
and: "I think another acceptable translation of PDL would be Program Documenting Language"
(from your article www.gamedev.net/reference/articles/article1384.asp)

PDL also stands for Program Description Language... google it and see...

all are good descriptions of this tool...

PDL is just one version of pseudocode... Niklaus Wirth, in his seminal article "Structured Programming through Stepwise Refinement" (ACM Communications article from long ago) laid it out clearly... you want to describe/design your algorithm/program at the highest level of abstraction at each stage of development, refining it finally into the code and data structures of the target machine/language... and English (or any other human language) is the highest level of description we can use... as a matter of fact, this is the basis of Domain Analysis and Domain-specific Languages...

i'm fluent in over 20 computer languages, with degrees in computer science and a long background in software engineering... when interviewers or other folks ask me what language i mostly use for programming, i always say "English" =) most of them get it...

i always code whatever i'm programming in PDL or pseudocode and then cast it into whatever language the project requires... as i said, i'm fluent in over 20 computer languages, and this methodology works every time, regardless of size or type of project, regardless of computer language...

and your technique of using the PDL to comment your code is a good one... using it to generate your code is good too

(btw, Farber was one of my professors =)



 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: