I'm going to teach my wife to program.

posted in Jemgine
Published February 08, 2011
Advertisement
I want to teach my wife how to program. So I'm going to.

Step One : Trick her into writing code by making it a game. A week or so ago, I started writing a MUD, and I made her play it. She seems to enjoy it. She's not much of a video game fan, but a MUD is nice and slow paced, and she doesn't need to learn how to press buttons or move sticks. She just types, she can type just fine. We get to build the world together, and that is nice too.
I'll expose her to concepts in whatever order the creation of the MUD allows me. The MUD itself presents the first concept. The MUD has a state. You enter commands which modify the state, and the next command will operate on the new state. Each command is the line in an imperative program.
More to the point of this, I'm going to introduce her to variables, and I'm going to do it by creating an object.

[quote]
Creating an object : Create Adjectives Noun. Adjectives are optional. Most objects shouldn't have more than one. Don't use auxiliary words like 'an' or 'and'.

Fixing Common Grammatical Errors -
You might see an object listed as 'a name of object' when it should be 'an name of object'. To fix this error, set the object's A attribute to 'an '. The phrase '' is replaced with the object's SHORT attribute when the text is displayed. Objects whose name is a proper noun also need to have their A attribute set, usually to just ''. Set their SHORT attribute too, so that their name is properly capitalized.
If the object isn't pluralized by adding an s, set the object's PLURAL attribute to the correct pluralization.


Many simple objects should be instance objects. If you want to put other objects on, in, or under the object, it can't be an instance object. To make an object into an instance object, use the command 'makeinstance #ObjectID'. Instance objects can be in many places at once so it appears that there are many copies of them.

If you want to be able to place things on an object, give it the attribute 'allow_on'. Similarly, if you want to be able to put things in it, give it the attribute 'allow_in'.
[/quote]


Did you catch the variable? It's that '' bit. She won't notice, but she'll be using variables.
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement