Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Learning New Languages (http://www.chiefdelphi.com/forums/showthread.php?t=15274)

Stephen Kowski 05-12-2002 20:42

Visual Book
 
books from www.hungryminds.com, Read Less - Learn More, but in reality they just explain how everything works and give you examples on all the aspects of the programming language. I highly reccomend these books....I learned C#, VB.NET, and ASP/ASP.NET from them.

Chris Nowak 05-12-2002 23:29

I know BASIC and a little Java, mostly from working in a class and with Flash. On my job, I would have to figure out how to do things in Flash because my boss would present me with a goal of something that I didn't know how to do, so I learned how to do it. Thats just actionscript, though, which is basically Java just implemented in Flash. I would recommend this strategy for languages, though. Figure out a project or something and go do it.

seanwitte 06-12-2002 11:34

data structures
 
The class that taught me the most about how to write effective, reusable code was data structures. If you can find a team alum who took some CS classes or a book in the library, I would reccomend trying to work through the concepts involved.

The idea centers around applying a logical design to an abstract concept. An example is a Stack. A stack has the following properties:

1) It can hold 0 or more items.

2) You can only add items by putting them on top of the stack.
This is called a "push".

3) You remove items by taking them off the top of the stack.
This operation is a "pop".

Assume the following scenario:

PUSH A
PUSH B
PUSH C
temp1 = POP
PUSH D
temp2 = POP
temp3 = POP

Whats on the stack and what are the values of temp1, temp2, and temp3?

temp1 = C, temp2 = D, temp3 = B, stack = A

How would you write a piece of code to represent this behavior? How would you make it so you can push anything on the stack, regardless of its type? How do you make sure you don't run out of space? Being able to translate this abstract description into workable code is a skill that will help you a lot, no matter what programming language you use.

Neal Probert 06-12-2002 11:45

Stack based languages
 
There is a language called FORTH, which has been around in various incarnations for quite a long time.

I spent a couple of years programming in this language, but it's not my favorite.

It's stack based, so all operations are in "reverse polish notation" as used on the older HP calculators.

Example:

1 2 +

It's often used where a simple low level programming language is needed. More advanced varients will do automatic type conversions as needed. One variant put strings on their own stack.

Mongoose 07-12-2002 02:21

IIRC,

Prefix = * + 1 2 3
Postfix = 1 2 + 3 *
Infix = (1 + 2) * 3

Correct me if I'm wrong. I remember my cs teacher making us convert an infix string into either of the two notations. I think (reverse) Polish notation is synonymous with the first 2? Anyway, to do postfix, you used a stack, and for prefix, you used recursion. (At least that's how I did it.) Try doing it in C++, I think it's a great exercise.

Oh yeah, I think the name PBASIC is deceptive because it's not quite as basic as the other basics. Like the if-statements, for example...

-Eric

Brandon Martus 07-12-2002 07:43

Quote:

Originally posted by Mongoose
Try doing it in C++, I think it's a great exercise.
My 'Data Structures' professor couldn't agree with you more. :D Hooray for linked lists, hashes, stacks, etc.


All times are GMT -5. The time now is 01:10.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi