Thursday, November 14, 2013

Simpleton Geek Teaches Computer Programming Book 1 Chapter 2


2. Arithmetic

2.1 You don't know Arithmetic?!

“What's that? You've never taken a test that you haven't studied for? Gya ha ha! Well, there's a first time for everything! You'll get it eventually, may as well be now! Clear out your desk! We'll start now!” The teacher happily wrote some questions on the board. A full exam on the first day of class is practically unheard of.
“Not even a roll call?” a student asked.
“What for? Your name will be on the paper. I'll learn your names then. If not, you'll get zero. No problem with me.” The teacher then started writing some questions on the board, while the students trembled with fear for the worst. Nevertheless, they began putting away their books and pull up a piece of blank paper for the test.
“Teacher, may we use a scratch paper?”
“Scratch paper? What for?”
“For the math.”
“Huh?” the teacher blinked. Then he looked at the board and see these questions:
3465+2345=
2425-2344=
23*65=
94*23=
121/11=
His expression changed from confusion to rage. “ARE YOU KIDDING ME?! YOU DON'T KNOW ARITHMETIC?!!!!”
“Yikes!” All the students coiled in terror.
“You guys are in HIGH SCHOOL!!! You should know this by now! Are you telling me that you don't know how to add two numbers?!” He just rages on and on. “You! Add these two numbers!” The chosen student paled, and he stared at the board for a long time. No answer was fortcoming. “Well?” the teacher grew impatient. Finally, the student went to the board, and did the sum mechanically, carrying the sum as needed. Finally, he arrived at the answer. He looked at the teacher for approval.
“Too slow! Are you kidding me? You're in HIGH SCHOOL! Are you telling me you still add numbers like you're in grade school? Here, let me show you. Write a random 20 digit number.”
The student meekly wrote this number on the board:
26349355826528364367
“Good. Another one below it. Line it up.”
26349355826528364367
64924473537234235343
And as the student wrote his second numbers, the teacher just wrote the answer immediately, slowing only when he had to add the sequence 3643 with 2353.
26349355826528364367
64924473537234235343
91273829363762599710
“There you go. Nothing to it. Why would you need a scratch paper for?” He sneered.
“But we're not that smart!” protested the students.
“What do you mean? It's just adding two numbers. It doesn't matter how many digits there are, you should be able to do it no problem. It can be a hundred digits, for all I care.”
“What! 100 digits numbers can be added immediately?” The students can't believe it.
“Of course! By the way, I expect each and every single one of you to be able to multiply two 12 digits numbers in your head.”
The students trembled with fear. Impossible!

2.2 Mental Arithmetic

“Come on, guys, get real. All this arithmetic does is just counting. Surely, you know how to count?” asked the teacher.
“Yes, we know how to count, but how can you expect us to add two large numbers immediately?”
“Using the same technique that allows you to add two numbers before the second number is completely written, of course. How else?” Such a simple answer. Of course, the students did not know that such technique exists. In fact, had they not witness it for themselves, they would not have believed that it was possible.
After a long uncomfortable silence, finally somebody asked, “How do you do it?”
The teacher smiled. “Ha. Took you long enough to ask that question!” He erased the board and wrote a groups of two digit numbers very, very quickly. After that, he asked, “Alright. Now tell me, assuming you have to add each digit of the numbers, how many of them totals 10 or more?”
32 56 43 72 57 22 76 34 67 23 43 45 23 76 26 85
The students slowly and painfully added the pair of digits. The teacher slam his fist to the table, scaring them all. “Wrong! That's not how you do it!” He glowered. “Do it by counting. First number: Count to 3, then 2 more giving 5. Less than 10!
“Second number: Count to 5, then 6 more giving 11. More than 10! Third: Count to 4. 3 more, giving 7. Less than 10!
“Got it?” He glowered menacingly. “Now do it again! By counting this time!” The student trembled with fear as they slowly count the digits. Finally, they're done. They look at the teacher wondering what they have to do next.
“Good. Now, for those of you who knows the answer to my next question, you'll get 10 points, which is the quiz score. You need to shout your answers because if you are late even by one second, you get zero, get it?” The students gulped and nodded. Finally, everybody nodded.
“Get ready. Here comes the question. Remember, you only have one second to shout it out. Ready. Okay. How many of the pairs totals 10 or more?”
The students were surprised. They were expecting just one pair of numbers, not all the numbers on the board. Those with quick reaction time started counting rapidly.
“Time's up!” the teacher said just as a student jumps up and shouted “Seveeeen!!!” The teacher looked at him, then he smiled.
The teacher waved him down. “That was quick, but the answer is six. Let's count them. 56 57 76 67 76 85. Six. Where'd you get number seven?”
“Ah, I made a mistake. I counted 72 as well.”
“Well, that happens when you in a rush. Next time make sure to do your calculations as soon as possible instead of waiting until the last moment.”
“But that's not fair. You hardly gave us any time!” another student said.
“You have 8 minutes to do it. I asked that question immediately right after I wrote the numbers down, remember?”
The students were speechless. That, indeed, was the original question. They had forgotten it in the heat of the moment. The students hung their head in shame.
“Gya ha ha ha! Total failure! What a bunch of idiots. Even after I gave you guys an extra second per problem, too.”
“Do you really expect us to do it one per second?”
“Not really. I expect you to be able to do it faster than that. Of course, that comes after practice, so practice!”
“Alright. Let's move on. By the way, homework for tonight. Take a stopwatch and set a timer. Hit the lap button randomly, and add the last two numbers on the stopwatch. That means the hundredth and the milisecond digit. Keep doing that until you get used to it.”
“How long will it take?” ask a student.
“That is entirely up to you.” said the teacher.
“Will you be scoring the homework?”
“No. What for? Just extra work for me.”
“Then how would you know if I did the homework?”
“I'll know that you didn't do the homework when you score zero on the quiz tomorrow. Is that not obvious to you? Gya ha ha ha”
The student looked embarrassed. As should be. That was a dumb question, after all. Of course, the sadistic teacher would let it known to everyone.
“Yeah, that was a stupid question. Do you know why it's stupid? Because you know the answer to the question. You don't need anybody to tell you the answer! All you need to do is just think about it, and you'll have the answer. Are you really that stupid that you cannot think about it? Gya ha ha ha!”
The student cannot say anything, but another student raised his hand. “But there is no stupid question!” he protested.
“Wrong! Or rather, incomplete. There is no stupid question IF you don't know the answer. If you know, or can figure out the answer yourself, then it's a stupid question. What's your name?”
“Tommy.”
“Good. Was that a stupid question? When I asked for your name?”
“No, of course, not. There's no stupid question.”
“Alright. By the way, Tommy, what is your name?”
“Um, Tommy.”
“No, Tommy. I asked for your name. So, what's your name, Tommy?”
“My name is Tommy!”
“No, your name is dum-dum. I already know your name, and still asked for it. How many times do I have to ask the same question before you get to admit that was stupid?” Tommy hesitates. The teacher smiled. “More than once is not acceptable. That is why your name is no longer Tommy, Dum-dum! Gya ha ha ha!”
Red faced, Tommy buried his face on his desk. Obviously, a sadistic teacher. Certainly not like the old gentle, understanding teacher.
“Alright, let's move on. Knowing that 2 numbers may add to more than than, that's called a carry. The point is that you don't need to worry whether or not this carry number is more than one. It's either 0 or 1. Of course, if you do it the formal way, that's done right to left. I have just shown you the informal way, that's left to right. So, here's the trick:”
26349355826528364367
64924473537234235343
91273829363762599710
“Look at the sequence 2634 and 6492. Do you see them? So pair them like this:
26 64 39 42
“Now you see that 26 pair is 8, remember that 8, and look to the next pair 64. That's more than 10, so add 1 to 8. That makes 9. Write it down.
“Go to the next pair: 64. That's 10. We remember that 0, and look to the next pair 39. That's more than 10, so add 1 to 0. That makes 1. Write it down.
“Go to the next pair: 39. That's 12. Remember that 2, and look to the next pair 42. That's less than 10, so write down 2.
“Keep repeating until you are done. Simple as that!”
The students were wild-eyed. They've never seen this technique shown before. They then keep working on the numbers until a student raised his hand. “Teacher! I'm having trouble on the last numbers.”
“You mean the sequence 3643 and 2353? You need to be specific in describing the problem! Do you take me as a mind reader?”
“Yes. Those numbers. Sorry.”
“Alright. Do it just like usual, but with a difference. Watch this!
“32 makes 5 and 63 makes 9. You can't write 5 down immediately because 9 maybe turned to 10, and you need to carry it over. So, remember 5 and look over to the next pair 45. It makes 9 so look over to the next pair 33 which makes 6. 6 is less than 10, so no carry over. Write down 599 because that's the answer.
“Suppose instead of 33 pair, we have 73 pair or any other pair that's over 10. Add 1 to 5 and write down 6, followed by zeros. 600 on the spots.
“And that's all there is to it. It doesn't matter how many nines there are since you're just writing down the digit on the first blank spot followed by either 9 or 0 on the remaining spots for as long as the pair totals 9.
“That's adding two numbers. Now try it a few more times, and later use the remainder of the class time to see if you can do something similar to the opposite: Substraction.
“In the meantime, though, let's take a detour and do a little explanation on numbers. You know that there are 10 digits, right?”
“Yes, teacher.”
“So, how does that work?”
The students just looked at one another. They expect the teacher to go on explaining things. They didn't expect a teacher to be asking them questions. Nobody moved for a while. Finally, the teacher pointed to a student. “You. How does that work?”
“Well,” the student got uncomfortable being singled out. “There are 10 digits, 0 through 9.”
“And if it goes higher than 9?”
“Then it goes to 10, 11, and so on.”
“Two questions. First, what happens if you don't have zero? Second, how come there's 10 digits and not other more natural number?”
“Uh,” the student got flustered, “I guess there's no 10 if you don't have zero. And I don't know why any other number would be more natural than 10.”
“Ha!” the teacher went smug. “How old are you know that you do not know these things? How many years has it been since you learn how to count? Still stuck in elementary skills, I see.” The teacher surveyed the class. “Does anybody know what happens if you don't have zero?”
The class went silent for a while. Then Peter raised his hand. “Does Roman numeral have zero?” The class collectively did a face palm. The teacher laughed.
“Yes, that's correct. Roman numeral does not have zero. It has digits denoting 1,5,10,50,100,500,1000. That's why there's a limit on how high a number can be. Interestingly enough, there are smart people back then. There were Aristotles, Archimedes, and so on, but somehow, nobody bothered to invent zero back then.” He smiled, “It's amazing that they managed to do as much as they did without the number zero.”
“Now on to the second question. Why 10? Why not some other natural numbers?” 
The student puzzled over this question. Finally somebody ask the question: “What can be more natural than 10?”
“Before I answer that, what makes you think 10 is natural?”
“We have 10 fingers.”
“True, but we also have 2 feet. Which makes 12. Therefore, I propose that 12 is a more natural number!”
“That's just silly!”
“Is it? Then why would God decree that there be 12 months to a year? Or 12 hours to the clock?” The students were speechless. “Or perhaps you can explain why there are 7 seas, 7 continents, 7 colors of the rainbow, 7 wonders of the world?”
“Because there are seven seas?”
“Whadaya mean there are seven seas? It's all one big ocean!” There was no reply.
“Most people can remember 5 or 6 items in their head. That's why it's seven!”
“And the twelve?”
“There's no one single big reason for it, but a year is 365 days, and moon cycle is 30 days. Therefore, 12 fits just fine. After that, it's a simple matter to divide the day buy the same 12. The big question isn't why we divide by 12. The big question is, why do we settle 10 as the base of numbers, instead of 12?”
The students couldn't answer that kind of question. They thought, and they thought, but for the life of them, cannot answer the question. Finally, they look at the teacher for answer.
The teacher shrugged. “Don't look at me. Ask the long dead Arab about it.”
“The long dead Arab? How can we asked him that?”
“You can't. He's dead. But the numbering system that we have is what is called Arabic numbers because that's where it originates. So there you go.” The students were confused. It's not usual practice for a teacher to ask unanswered question.
The teacher laughed. “So, if you have to create a numbering system, what would be the base numbers? Will it be 10 or 12?”
“12 seems to be more natural.”
“Actually, I'd say 2 would be best. Zero and One.” The student thought about this for a moment. “Which means,” the teacher continued, “there would be one, ten, eleven, hundred, hundred one, hundred ten, hundred eleven, and so on.”
The students were unconvinced. Finally somebody said “But only unreasonable people would do that!”
“Ah, that's why we're not using that. We're using something else, which is called hexadecimal. Zero and one is called 'bit', and if you take 3 of them together it's called 'octal', and if you take 4 of them together, it's called 'hexadecimal'.” The teacher smiled. “You'll be using bits or binary number for the foreseeable future. Do you know why?”
The students shook their heads. It's all new to them.
“The reason is that it's very simple! You don't have to do a lot of things just to do arithmetic. This way, you can understand how numbers supposed to work, as opposed to just memorize the instructions on how to add, substract, multiply numbers and so on. Furthermore, there are other benefits to hexadecimal in terms of space. Very convenient, that's why we use it.
“For now, though,” the teacher surveyed the class, “you need to work on your aritmetic. I have shown you how to PROPERLY add two numbers. For now, you need to learn how to PROPERLY subtract two numbers. Get to it!” The student then worked on the problem.

2.3 Multiplying large number with calculator

The students was working on a quiz. They're working on 2 kinds of problems. The first page was filled with 2 digit numbers. The second sheet was filled with 2 rows of numbers, printed double size. They're supposed to circle the pair whose digit totals more than 10. On the second, they're supposed to first add the pair of numbers together, and the second subtract them. No scratch paper is permitted. They're supposed to do it in their head.
5 minutes later, “Time's up! Bring your paper here!” The teacher gleefully looked over the answers as the papers were brought in. “Remember that each mistake costs 10 points, so if you make 10 mistakes, you get zero! Looks like plenty of mistakes there. I see bunch of zeros already! Gya ha ha ha!” The students threw their arms up in frustration.
“Ready for the next step? Multiplication, and no scratch paper for that either! Here's the multiplication table.” He wrote this on the board:

     0   1   2   3   4   5   6   7   8   9
   0 0   0   0   0   0   0   0   0   0   0
   1 0   1   2   3   4   5   6   7   8   9
   2 0   2   4   6   8  10  12  14  16  18
   3 0   3   6   9  12  15  18  21  24  27
   4 0   4   8  12  16  20  24  28  32  36
   5 0   5  10  15  20  25  30  35  40  45
   6 0   6  12  18  24  30  36  42  48  56
   7 0   7  14  21  28  35  42  49  56  63
   8 0   8  16  24  32  40  48  56  64  72
   9 0   9  18  27  36  45  54  63  72  81

“You need to memorize this. The faster the better, but no fear! Even if you're stupid, you will be able to memorize this eventually. It'll just take you longer to get there. Gya ha ha ha!
“Now, who's up to multiplying 10 digit number all at once?” The teacher surveyed the class. “Nobody? There's nobody here who can do 10 digit multiplication in their head?” Nobody moved. “Who among you has memorized the multiplication table?” A few hands went up. “All right, you, you, and you get up here. Write down this number:”
26184453923
“And multiply that by 4. Let's see you do it.” The students dutifully wrote their answers. All of them got it right. “See there? No problem at all, is there? I knew you can do it.”
The students went back to their seat. “For the rest of you, let me break it down to you. We're going to multiply these numbers right to left, because only geniuses multiply these numbers left to right.
“So, that's the trick! Instead of multiplying the numbers left to right like those geniuses do, we simply take a shortcut and multiply the number from right to left. Now, we see a 3 there. Multiply by 4 and we get 12. Write down 2, REMEMBER 1. Use your fingers if you have to. 
“Next digit 2. Multiply that by 4, we get 8. Add to the number you remember earlier. We get 9. Write down 9. REMEMBER 0 (because it's less than 10).
“Next digit 9 times 4 is 36. That's the benefit of memorization: you don't have to think about it. Add 6 to 0. Write down 6. REMEMBER 3. Keep going.
“Next digit 3 times 4 is 12. 2 plus 3 is 5. Write it down. REMEMBER 1. And so on.
“Keep going until you're done. Do you notice how each step is very simple and easy? All you have to do is add two numbers in your head. Write one, remember one. And that's why you are all capable of doing it! Unless you're handicapped, you should be able to remember 5 or 6 digits in your head, and you only have to remember 1! Got it?”
After a few times practicing, the students' time are improving. “All right. That's enough for now. Time to keep moving! For homework later tonight, write down a bunch of numbers. Use your stopwatch and multiply it by the last digit on your stopwatch. Keep doing it until you get comfortable with it. Now get out a fresh piece of paper.”
“We're now going to go over the way to multiply 2 digit numbers. Let's say we have this:”
63
14
“You can do it like we did and come up with this:”
  63
x  24
-----
  252
 126
------
 1512
“Or you can do it like smart people and do this: 60x20 + 60x4 + 20+3 + 3x4. So, let's try it: 1200 + 240 equals 1440. 1440 + 60 equals 1500. 1500 + 12 equals 1512. And there goes your answer! Got it? That's how smart people do it.
“If you notice, you actually keep the sum in your head from 1200 to 1440 to 1500 to 1512. And you can do it, too, because most people can keep track 5 or 6 digits in their head. Once you memorize the multiplication table by heart, these sort of things are easy to do!
“The problem is if you have to multiply larger numbers than this. Let's say you have 3 digits to be multiplied by another 3 digit number. Unless you're super smart and can keep the number in your mind, the whole thing breaks apart. That's when everybody is reaching for tools to help them do this. You know what tool it is, right?”
The students nodded. “A calculator.” Such obvious answer.
“That's right. A calculator. But what if you don't have it with you? What other ways can you do it?”
The students got confused. “Isn't the calculator answer good enough?” somebody asked.
“Gya ha ha ha! Of course not! You think coming up with a right answer is good enough? What kind of stupid are you?”
“But, what else can we use if not a calculator?”
“Let me run this off of you. You can use scratch paper, slide, ruler, abacus, your classmates, playing cards, coins, rope, rocks, and so on.”
The students were dumbfounded. The first few answers makes sense, since that is what people use to calculate, but classmates? How does that work?
Finally a student raised her hand. “But teacher! We can't use our classmates to calculate numbers!”
“Gya ha ha ha! Are you sure about that? Next you're going to tell me that you can't use coins to calculate.”
“But you can't use coin to calculate! It's impossible!”
The teacher frown. “You're not supposed to say that. What you mean to say is that it is impossible FOR YOU. Because it certainly is not impossible for me!”
“But how can you do that? Coins don't calculate, do they?”
“Listen, do you know abacus?”
“Yes.” The student nodded her head.
“Good, now grab a bunch of coins and line them up like those abacus beads. What do you have?”
After a long time to think, she finally said, “It looks like an abacus.”
“And there you go. It doesn't matter that it's made of pebble, or rock, or coins, as long as the function is the same, then it will work just fine. 
“You guys are too dependent upon others to do your work for you! Remember, you're computer programmers now. That means you write programs. That means you make stuff. That means you're a Maker. If you don't have an abacus, then you make one yourself! Simple as that! Got it?”
The students were having trouble processing the flood of information coming rapidly all at once. But the teacher doesn't say anything else until most of the students managed to digest the information.
“And I suggest you write it down, lest you forget, because I will be reminding it to you over and over again. If you don't have it, you need to make it. Crying or complaining about something because you don't have it is strictly not allowed!” 
“We won't forget.” The students promised.
“Gya ha ha ha! Of course you will forget! Do you take me as an idiot? It's not whether or not you will forget, it's how often you forget it.” There's a cruel glistening look on the teacher's face. “And when you do, there'll be hell to pay!” He winked. “Notice I said 'when', not 'if'. Gya ha ha ha!
“So now how you're going to use your classmates to calculate?”
“That's easy. You just line them up 5 to a line like in abacus, and ...”
WHAM! The teacher slammed both palms on the student's desk, scaring her into silence. “Are you kidding me? That's not how you do it! Anybody else?” Nobody else said a word. They have not a clue.
“Listen, a person can do more than being a stone. Here, let me show you. Multiply 127 by 364.” He wrote the numbers on the board. “Now you multiply 127 by 300. That's 38100. You will remember 38100.
“Next multiply 127 by 60. That's 7620. You, “ the teacher picked another student, “will remember 7620.”
“Finally, we multiply 127 by 4. That's 508. You, “the teacher picked yet another student, will remember 508.
“Now, back to you, “ he motioned to the first student. “What's your number?”
“38100”
“And you?” He motioned to the second student.
“7620”
“Add them together and they total 45720. What's your number?” he asked the third student, as he wrote the number 4 on the board.
“508”
“Add 5720 and 508, and you get 6228.” He wrote down 6228 next to the 4. Therefore, 127 timex 364 equals 46228. Got it?”
A student pulled out his calculator and verified that it is true.
“So, there you go. That's how you use your classmates for multiplying two numbers. You certainly do not line them up like abacus stones. That's just stupid.” The student's face was red with embarassment. 
“If you want to use them line them up like an abacus, then have them store the digits, one on each hand, two numbers per hand. Although, that's not the most efficient use of your classmates, it's simple and is acceptable.”
“How can you keep a number on just one hand? It's only got 5 fingers!”
“With five fingers, you actually can keep up to 32. But here's one way how you can keep your digit with one hand. Make a fist. That's zero. For 1-5, extend your thumb, forefinger, middle finger, ring finger, and pinky. With all your finger extended that's 5. Got it?” The students nodded. “Now fold your thumb. That's 6 (not four). For 6 to 0 fold your thumb(6), forefinger(7), middle finger(8), ring finger(9), and pinky(0). And there you go. That's how you keep a digit on one hand.”
The students all tried to do it. Some did it better than others. Some students have to press their hand on the desk to separate their ring finger with their pinky.
“All right, move on to the next step. What I just showed you is how to multiply 2 numbers the genius way. Of course, smart people can remember those numbers all by themselves. But you're not smart, are you? Just a bunch of losers. So, we're going to do it the simple way! First make a matrix like this:
1    2    7
3
6
4
“Now as you can see there are nine boxes. Fill them like like you did your multiplication table!”
1    2    7
3 3 6 21
6 6 36 42
4 4 8 28
“If you remember, we multiplied 127x3, then 127x6, then 127x4. That's equivalent to doing it in this order:” The teacher drew another matrix alongside it.
1    2    7
3 1 2 3
6 4 5 6
4 7 8 9
“But what you want to do, is do it in this order. Watch the diagonal lines 1, 2-3, 4-5-6, 7-8, 9.”
1    2    7
3 9 7 4
6 8 5 2
4 6 3 1
“First line 4x7 is 28. Write down 8, remember 2. 
“Second line, 6x7 is 42. 42+2 is 44. Remember 44.
“Next, 4x2 is 8. 8+44 is 52. Write down 2. Remember 5.
“Third line, 3x7 is 21. 21+5 is 26. Remember 26.
“Next, 6x2 is 12. 12+26 is 38. Remember 38.
“Next, 4x1 is 4. 4+38 is 42. Write down 2. Remember 4.
“Fourth line 3x6 is 6. 6+4 is 10. Remember 10.
“Next, 6x1 is 6. 6+10 is 16. Write down 6. Remember 1.
“Fifth line 3x1 is 3. 3+1 is 4. Write down 4.
“And you're done. The number you wrote down is 46228! And that's how you multiply 2 numbers in your head!”

2.4 BASIC causes Brain damage

“I hope you don't mind my verifying the process,” Peter said. “I checked it and it works, but I still don't quite understand it.”
The teacher looked at him carefully. “I don't mind explaining fuzzy concept. In fact, I'd be glad to. Just make sure it isn't some stupid question you're asking here.”
Peter gulped. The teacher sure doesn't play around. “Well, the way I see it, is that each line stands for a digit.”
“That's correct. It's the power of 10. 10^0, 10^1,10^2, and so on.” 
Peter saw that now. “So, then, for each line you write down the last digit.”
“That's correct. That's because there's no possibility of it changing.”
“For each line, I need to keep track of the sum of all the multiplied digits, in addition to the carryover from the last line.”
“That's correct. The nice thing about it is that you're only remembering a number, and adding the number from the multiplication table. Trivial process, once you get used to it.”
“And finally, just keep carrying the process until you're done.”
“Exactly. So, is there any part of it that you don't understand?”
Peter thought about it for a while. “I guess I got it. Just want to make sure. I guess I can use this to multiply just about any two numbers in my head.”
“Well, no, that's not true. Remember that you can remember 5 or 6 digits in your head?” Peter nodded. “Well, the process of adding the carryover value to the multiplication table value requires you to remember 3 digit number and 2 digit number. That's 5 digits. So, that's the limit that you can have.”
Peter mulled about it. “So what's the limit?”
“That's a stupid question because you can figure it out yourself. But I worked it out to 12 by 12.”
“How long will it take for me to multiply such numbers. I guess that's a stupid question because I can just do it and find out.” The teacher smiled. “Sorry, for asking such a stupid question.”
“That's okay. It's good that you have all these questions. It means you don't have brain damage.”
Peter didn't understand. He thought about it, but couldn't find the reasoning behind it. Finaly he asked, “What do you mean by that?”
The teacher sat back in his chair. “Remember when your old teacher claimed that BASIC caused brain damage?”
“Yes.”
“So many people claim that, so I researched it. I actually found the paper by Djikstra. Blah, blah, blah brain damage. Blah blah blah once a student learned something he can't unlearn it. Most people concentrated on the first sentence. I focused on the second. If you cannot unlearn what you learn, you will not succeed. That's brain damage. Basic does not cause brain damage. The damage is already there!”
“How do I unlearn what I already learn? And is that really a good thing?” asked Peter.
“It's very simple, although it's difficult for most people to do. Simply accept that you may be wrong about something. Have the humility to accept that the other person may be right. That's it!”


Wednesday, November 13, 2013

Simpleton Geek Teaches Computer Programming Book 1 Chapter 1


Book 1 Chapter 1

1. Introduction1.1 I'm looking for Programming Class for Beginner

The students of FISHOIL High school were in their classroom. It has been five minutes after the bell rang. There was no teacher. 10 minutes past, somebody was walking rather rapidly in the hallway. Then he opened the door and stuck his head in.
"Is this the classroom for beginning computer programming?" He asked.
"Yes, it is."
"Good, I'm in the right place, then." He smiled.
He walked toward to the blackboard. "I have bad news and good news. The bad news is that your old teacher cannot make it. He had an accident involving his back. So, he's in the hospital for now, and will be for the foreseaable future." The students were surprised.
"Don't worry, it's alright. It's not life threatening or anything like that." He smiled. "Well, now the good news: I'll be substituting for him until he gets well. My name is Ramstrong, but you can call me Teacher. I'll be teaching you all the knowledge of computer programming from the ground up until you are competent. Or at least not clueless like you are now. Gya ha ha ha." Bad joke already. The students feel a sudden chill. "Anyway, ready to start?"
There was nothing the students could do. All the classes have been scheduled, and all the students could do is to just sit there and follow through. The new substitute teacher seemed well enough, but really, the only way the students could petition for another teacher is if this one was so terrible, the only other choice is to cancel the class.
“So, you have a choice to make,” he said with glistening eyes. “Do you want to work hard and maximize your learning potential, or do you want to just take it easy and cruise, and get good grades on easy subject?” That was unexpected. Teachers don't usually make that kind of offer. The students were mulling on the idea. 
A total confusion reign among the students. Is this teacher for real? Does he just want to teach the barest knowledge good enough to pass the test? Of course, teaching to test is a reasonable choice if you want a good grade. Everybody knows that computer programming is hard enough. If there's any advanced knowledge required to pass the test, then there's a good possibility that the student will fail the class. 
On the other hand, not learning good knowledge in the beginning may jeopardize the future of learning. Remedial classes come to mind. What if learning just the core knowledge proved insufficient? What will the future course will hold? This is a very important decision to make for the students.
“So,” the teacher said impatiently, “Does anybody here just want to take it easy?”
“Yes!” said somebody in the back. His laid back posture and unbuttoned shirt shows his deliquent nature. “I like to just take it easy. Just cruise along, do nothing, and get good grades, you know?” He smiled confidently at the offer. “This is going to be an enjoyable class”, he thought.
The teacher didn't say anything. He merely yanked the student off his feet and took him outside. When they came back, the student looked like he was drowned, wet, pale and scared.
“Anybody else?” The teacher asked.
“WE'LL STUDY!!!” all the rest of the students shouted in unison. Not agreeing to do so can be deadly!

1.2 Why do you want to learn how to program? Old guy

The bell rang and the old teacher entered the classroom soon after. The old gentleman is in his 70s and it is obvious that he is passionate about the subject. The students are all eager to participate in the learning.
"Now, then," the teacher asked. "Before we begin, we should be learning about each other." His gentle manner is very reassuring. The students were happy to have him as the teacher. He came highly recommended by everybody. "So, how about you tell me the reason why you want to learn computer programming?"
"I want to learn how to write Minecraft" somebody said.
"Doom", said another.
"How about Call of Duty, or Battlefield"
The teacher beamed. "Well, well" he said, "These are all excellent reasons to learn computer programming. You can get ahead in the computer industry programming these games. I would be lying if I say that these are easy to do. You need years of computer programming experience to be able to program those programs, but I'm sure with perserverance, you'll be able to do it."
"Is it really that hard to program?"
"Do we need to be good at math?"
The teacher beamed some more. "Very enthusiastic students! I'm sure we'll do well. This class is what is known as beginning computer programming. It will build the foundation of which every computer program is built. Trust me that you will need to learn much in order to succeed. I hope you understand that some of the things you need to learn involves Math. You need a high degree of mathematic in order to be successful in computer programming." The teacher nodded his head sagely.
"All the problems being solve by computer involves math in some capacity, so it is important that you know your math skills very, very well." Some students become nervous. "Don't worry. I will teach you all the math you need in order to succeed in being computer programmer.
"Now let's talk a little bit about the evolution of computer programming, and we'll explore various computer programming languages that is optimised for maximum learning."
A student raised his hand, "You mean there's more than one programming language?"
The teacher smiled. "Yes, there are many. Don't worry, you don't need to learn them all. We're going to focus on the languages for learning."
"You mean BASIC." Said a student
"No, no BASIC." The old teacher looked rather disappointed. "Do you know that BASIC programming language actually caused brain damage?" The students are surprised. "It's true. A professor actually wrote a paper saying so. You're not going to argue with a professor, will you?" Of course, no student will.
"Well, let's go over the different languages available. You are lucky that you have so many computer languages to choose from. You mentioned BASIC, so let's talk about that for now."
BASIC stands for Beginner All-purpose Symbolic Instruction Code. Despite the name, it is a very poor language for beginners indeed. For one thing, GOTO causes programs to be so convoluted, that it resembles spaghetti." The student laughed nervously. "It's true. Spaghetti code is the ban of BASIC computer programmers.
"Furthermore, there is no structure involved at all. It makes it hard to read when everything is lined up to a straight line. Once you learn structured programming, you won't ever want to go back because the the only way to manage complexity is by structuring your program well, and you can't do it with BASIC. Not to mention that old BASIC interpreter is so slow, it's a miracle to get anything done.
"Now, the problems of Basic are so well known that several very smart people have come up with a solution. One of the better one is Pascal. Pascal is named after 17th century physicist. It's a very logical language and very structured. All the variables are typed. By that I mean that numbers and letters are different." He surveyed the class. A few students look confused.
"Consider the fact that computers are basically binary, ones and zeroes. Obviously, this causes confusion. By limiting and enforcing different data types, the program does not allow the programmer to just randomly enter code into the computer. No experiment is allowed!" A few students giggled nervously. "This obviously goes to a great distance in structuring your program. For the first time in the history of computer programming, you need to plan your computer programs, instead of just randomly type code in and hope that it will work.
"Let me emphasize this clearly: Hope is not a good ingredient in writing computer programming!" The teacher nodded his head sagely, as knowing from experience the folly of such activity. He was bringing years of experience into the classroom. The freshman students of FIShOil High school feel blessed.
"What about C computer language?" Asked a student.
"Ah, C computer language." The teacher nodded his head sagely, "It is a very popular language. In fact it influenced many other computer languages available today. Do you know that C++, C#, and even Java was influenced by C language? You have to admit that despite many shortcomings, C is indeed a very popular language! Do you know why C language is popular?"
"Because it's powerful?"
"Yes, absolutely correct. Indeed, it is very powerful. That's why professionals are using it." The old teacher looked at the students warningly. He was about to warn the students from erring to the bad path. "And yet, it is a very troublesome language, indeed."
"That's why people kept improving the language." As he looked over the classroom, every eyes was fixed to his, breathlessly waiting for what's next. "First, C++ added Object oriented capability, and yet, it is not enough! Then Java removed the most dangerous elements: Pointers. You can no longer use pointers in Java. In addition, Java programming language provides a Godsend of a feature: Automatic Garbage Collection. No longer are computer programmers beholded to managing their memory, those mundane activities are done automatically by the computer, as it should be. This frees up the person to concentrate on computer programming problems, instead of fighting the language just to get things done."
"So, we're going to use Java?"
"No, we won't," the old teacher smiled patiently. "We'll be using Python programming language. Does anybody ever heard of it?"
"I know of Perl", volunteered somebody
"Ah, Perl. I suggest that you stay away from it also. Unfortunately, all the follies of BASIC is present in Perl. Do you know that the language is so difficult to read, that it is often faster to write the program from scratch than reading the source code?" All the students just shaked their head. They simply didn't know. It's a good thing they have the old wise teacher to guide them through this.
"Python is very readable, strongly typed, object-oriented, and very, very powerful. And yet, it is simple to use. Even beginners have been able to create powerful programs with it, thanks to comprehensive libraries available. So, that is what we will be using.
"No pointers, no memory allocation, and definitely no GOTO!" The last word, the old teacher said sternly. It is very important that the students are guided well, so that they will prosper in the future.
"And now, let's take class roll." He picked up his rollbook and started calling students name one by one.


1.3 Why do you want to learn how to program? New guy

"So, as I understand it, you guys just started yesterday." The new substitute teacher does not look like a teacher at all. He looks more like some dumpy guy. A fashion challenged geek. "May as well start fresh. Losing a day isn't going to be that big of a deal.
"So, why do you want to learn computer programming?" He asked.
"I want to write Minecraft!" said a student. “Doom" said another. "CALL OF Duty" said another one.
"Gyah ha ha ha! Are you guys serious?!" He was laughing his head off. "THAT is why you want to learn computer programming? What a bunch of morons!" The students are shocked!
"If that's all you want to do, you definitely do NOT want to learn computer programming. Are you kidding me?" He was just off into his own world.
"Just use their level editor and be done with it! You do know that those games comes with their own level editors, don't you? Why do you want to bother learning computer programming for?" He was so obviously disappointed with the students.
"But the old teacher said those are good goals!" The student protested.
"Ha! That's because he's a teacher, and he can't say anything else to you. Too bad I'm not a teacher!" The students were confused. "I am what is known as Experienced Professional." He explained. "I'm a working professional and don't care what this mumbo-jumbo educational institution is teaching you. I'm only concerned with what works, and what's out there!"
"So you don't make games?"
"Of course, I do! It's just that if you asked professional computer programmers out there, they don't really make games. They make those level editors! The ones using the level editors are artists and designers. That's because artists and designers are hopeless when it comes to math necessary to build those modellers and level editors. On the other hand, software engineers cannot tell the difference between good design and total turkey! Therefore, by letting computer programmers build the tools, and artists and designers build the games, everyone benefits. Now you are telling me that you want to make games? Well, I suggest that you learn art and design, because if you're learning computer programming, then you'll never get there!"
The students were absolutely speechless! They never expected such harsh words coming from their teacher, although to be fair, he's not their teacher. He's just somebody substituting their teacher until he recovered well enough to resume teaching.
"Any question so far?"
"Well, then why do we want to learn computer programming?" Asked a student.
"What? You mean this is not a required class?" He looked shocked and disappointed. "Are you kidding me? Everyone should learn how to program!"
He was watching the class like a hungry hawk. It's obvious that he's looking for blood. "Are you telling me that you are so completely clueless about why you should learn this?"
"But if not for games..."
"You want to learn computer programming because you are lazy, and you don't want to work hard. Computer programming ... " he paused for effect, "is one of the easiest, if not THE easiest job around. I mean, all you have to do is sit around all day! How can you beat that?" That does make it sounds nice and easy.
"Of course, there's a qualification for that." He smiled. "That's true ONLY if you know what you're doing. Do you know how many people don't know what they're doing?" He asked rhetorically.
"Very little of them?" Answered a student.
He scowled. "90% of people don't know what they're doing!"
"Whaaat? That many?" The students are surprised. "Are you sure?"
"Judging from my college days, in the class of 50 students, the ones I consider know what they're doing are about 2 or 3. " He said glumly. "Another 2 or 3 SOMEWHAT knows what they're doing. The rest don't have a clue.
"Extrapolate that to 100% and a full 90% of students don't know what they're doing. Sad but true."
The students were shocked into their seats. They simply don't know what to expect.
"Anyway," The guy broke their silence, "I figure that we'll start you with the basics and make your teacher proud in having you as students. So, you're up on your text books?"
"Umm, yeah, we're learning Python."
"Whaaat? Python as first learning computer programming language?! Whose stupid idea was that?"
"The old teacher said it's a good language."
"Pshaw! What does he know about Python. Perl would be better!"
"But Perl is a read only language!"
"Oh yeah? Says who?"
"The old teacher said that it's faster to rewrite the program from scratch than it is trying to read it."
"Well, that's true in some circumstances, but that's not the fault of the language. It's the fault of the programmer. If the programmer decides to use the full language, magic variables and all that, then certainly it can be hard to read. The thing is, you're supposed to know the language well, and if not, have the decency to ask. If you don't bother learning the language, then of course, you can't read the code. That's true with just about any language including Python. Get real!
“Plus, Perl is so fast and easy to write, it's no wonder you can write it faster than to read it. I mean, imagine the ease of programming. You can, more often than not, write the program as you are explaining the steps to the computer. It can be written as fast as you speak! What other computer languages can make that statement? None that I can think of!
“This is because Python, being designed by a mathematician, has all the trappings of 'formalities', this rule, and that rule. Where as Perl, being designed by a linguist, means that it's very fluid and easy to write.
“The problem is that most people don't know what they're doing, remember? So, most people are having trouble explaining the steps, and of course, they'll be having trouble reading the mumbo-jumbo they've been putting into the computer!”
The students are simply shocked into silence. It's like everything that the old teacher said was wrong. What can they possibly be learning? “Is this true?” Finally somebody asked.
“In my experience, it's true.” The teacher said. “Of course, I do have several techniques in my arsenal as to avoid confusion. I maintain a programmer's journal, for example.”
“What's a programmer's journal?”
“Well, a programmer's journal is a journal, of course. What should go in there? All your thoughts about the problem, and potential solutions. All your attempts and gotchas. In some cases where the algoritm is quite advanced, I actually wrote a dissertation of the problem and the various ways to solve it. In other words, I'd be teaching the readers on how to solve the problem!
“This is something that most people just don't bother doing. They think that a well-commented source code is enough to be readable. Well, I'm telling you guys right now that IT IS NOT ENOUGH!” He said the later words with great emphasis.
“Program maintainers are usually polled from low-ranking personnel, and they don't have the programming skill anywhere near a professional. How can you expect them to be able to handle sophisticated problem? They can't! And yet so many project managers will just throw these rookies into the most complicated project without so much a guidance. No wonder they failed. What do you expect?”
“Therefore, a programmer's journal is a necessary ingredient in a project, not only will it tell you what to do, but also what not to do. The rookies will be able to grow just as the experienced professional grew when he tackled the project. The difference is, the rookie will grow much faster because all the wrong steps have been mapped out.
“In short, any project manager who doesn't insist on a properly written programmer's journal, and will accept a well-written commented code, perhaps with a little flowchart on the side, is a bad project manager who will doom the project into long development time, high frustration and turn-over rate, and a very, very expensive proposition, indeed.
“Do you know how many project managers are like that?” He asked rhetorically, “Most of them. In fact, I've never heard of any that requires programmer's journal, and only a handful computer programmers, professionals or not, are maintaining such journal.
“And that's why computer programming is so hard! Everybody will have to stumble to the same mistakes all over again. Wouldn't it be better if such mistakes are documented and therefore be avoided in the future?” All the students nodded their head. “Well, it's not being done that way. Too bad. You just have to stumble to the same mistakes just like everybody else!”
The students were confused.
“But, aren't you going to let us know what those mistakes are so that we can avoid them?”
“Nope. Not in the cards!” the teacher just laughed. “Pick any computer textbook available, do you see them putting in warning after warnings? Not on your life!
“You see, everybody makes different kind of mistakes, and it will fill a whole encyclopaedia to list those mistakes. What a waste of time. Why write all the mistakes down when each student will only experience a small fraction of it? Better to let the students fail, and make them learn from their mistakes! That's the fastest way to learn.
He winked, “Of course, there no need for you to go down the wrong path to begin with, so no Python for you! Let's start you guys properly and begin with a good development platform for beginners. Perl is definitely better than Python.”
"But Perl encourages rewriting,” said a student. “Don't you think rewriting from scratch is bad?"
"Of course not. In fact, there's a adage in computer programming: Prepare to throw one away. You will anyhow." The students are all speechless. "I'm surprised your old teacher doesn't know it. I don't suppose he's all that experienced, is he?"
“So, let's just use something that is fun, convenient, and easy to use. I have just the thing for you: Petit Computer. You're going to like it since it is BASIC and runs on Nintendo DSi!”
The students blinked uncomprehendly. “You mean we're not going to use a computer?”
“Whadaya mean 'we're not going to use a computer?' Didn't I just tell you that we're using Petit Computer? That's a computer right there! Are you some kind of stupid?” The teacher glowered.
“Ummm, but Nintendo is for games.”
“Of course, it is. You want to be computer game programmers, don't you? What can be better? Just use one of those computer game machine and be done with it! It's portable, convenient, with plenty of computer game examples around. It's a full computer game development in the palm of your hand!” The teacher scanned the classroom. “I can't believe you're not excited about it at all! There's no better development tools available for what you want to do!”
The students aren't convinced, of course, especially as their old teacher was pointing out just the opposite the day before, but as they feared they will anger the substitute teacher, they kept quite. Finally somebody spoke up, “What about C computer language? It's powerful enough for anything, isn't it? Why can't we make games with that?” Other students feared the worst. Thunderstrike time!
“Oh, C programming language,” the teacher mused. “What makes you think it's powerful?”
“That's what everybody says.”
“Of course, 90% of them don't know what they're talking about.”
“So, it's not true?”
“C programming language is actually not that powerful. Python is a whole lot more powerful than C. In fact, you can say that C programming language is downright primitive! It's very simple. Most people can learn it in about 20 hours. Of course, knowing the language is different than being fluent with it. It took me another 20 hours, for 40 hours total, before I get to be comfortable with it.
“The thing about C is that it's so simple and primitive, you have to do everything yourself. That's why you need to load a bunch of libraries in every C program. And you want to do that because C is what is known as 'portable' language. That means it can run on many different platforms without change. That is very useful to have when computers kept changing every year. But powerful? Not at all.
“People, for all their complicated thinking, are often single-minded about things. In this case, they're mistaking execution speed with power. C program runs very, very fast. However, that's because C program doesn't do anything you don't tell it to do. If you know Java programming language, you know that it does array boundary check automatically, so that if you try to access array outside what is declared, it will throw out an error. No such thing with C.”
“But isn't that desirable? Automatic checking, I mean.” asked a student.
“Of course, not. Automatic anything isn't desirable. Why would you want it?”
“So, we don't have to do it.” came the reply.
“Of course, you have to do it! Why would you not want to do it?”
“But the language does it for us!”
“You mean you want to let somebody else, in this case, the language programmer, do it for you?” He sneered.
“Yes. Wouldn't it be better that way? It'll be better than if we do it, after all.”
“No, of course not. It'll be better if you do it yourself. Think about it. How would he know when to check the array boundary? Well, every time you access the array, either writing to it, or reading from it, right?”
“Uh, yes. That's right.”
“That will slow the program down. You don't want to do it that way.”
“We don't? But what if we write outside the array boundary?”
“What I mean is that you don't want to check for the array boundary EVERY TIME you access the array. What you want to do is do a pre-emptive range checking to see that the range is within the array, THEN you access the array. By that time, you're sure that the access will never go past the boundary, so you don't need to check. Instead of checking the boundary a million times every pass, you just do it once in the beginning. Got it?”
Of course, the explanation went past the students' head. They don't even know what an 'array' is, much less anything about range checking. So, they kept quiet. Not that the teacher missed it. Their dumb looking faces betray all.
He sighed. “Oh, well, we'll get to it later. For now, let's just do a test. Everybody please get a piece of paper out. We'll do a test right now!”
“Whaaat?” The students can't believe it!  “But we haven't studied! You haven't taught us anything! How can we do well on the test?”
“What's that? You've never taken a test that you haven't studied for? Gya ha ha! Well, there's a first time for everything! You'll get it eventually, may as well be now! Clear out your desk! We'll start now!”
“Not even a roll call?”
“What for? Your name will be on the paper. I'll learn your names then. If not, you'll get zero. No problem with me.” The teacher then started writing some questions on the board, while the students trembled with fear for the worst.




1.4 Why would you want to learn how to program?

"So, you're here. I didn't know whether or not you'll be here.  I mean, you're not a teacher here, so I don't know whether or not you keep the same office hours as the original teacher.” A student was visiting the old teacher's office during “consulting hours.”
“Well, I have some work to do, so I may as well do it now, since I don't want to take it home with me.” says Ramstrong the teacher. “This place is just convenient, and it's available for use, so why not use it?”
“Of course. I was just wondering.” the student said.
“And you are? Your name, I mean.”
“I'm Peter Wu.”
“Nice to meet you, Peter. I assume that you have prior computer programming experience?”
“Ah, yes. How do you know?”
“From your questions. Not everybody is interested in computing cycles, you know.”
“Ah, that's true. Well, I do have a question.”
“Yes, what is it?”
“How come we're not using PC? That's what they're using everywhere else. In fact, some of the schools are using C#. Shouldn't we be learning the latest and greatest technology that will be relevant in the industry?”
“Of course, not! You're just a beginner! Besides, it doesn't matter much whether you're learning Basic, C, or C#. Why would you want one over the other?”
“For one thing, C# is as powerful as C++, and it doesn't have pointer.”
“Of course C# has pointer. What are you talking about? How else are you going to pass variables to the function?”
“Huh? C# has pointers? But, but, the book says it doesn't!”
“See what I mean about 90% of people don't know what they're talking about? Gya ha ha ha!”
“So, C# has pointers?”
“See, you want to pass parameters to a function. With C, it's pass by value, so you use pointers. With Pascal, it's pass by reference. C# is just like C, pass by value. So, how do you figure that works? What if you want to pass an array? Or a return value?”
“Well, they use something called 'REF'.”
“Short for REFERENCE, which is a pointer. References are pointers. Simple as that! C# has pointers. It's just that they don't call it pointers. They call it reference!
“C# has pointers?!” Peter couldn't believe it!
“Oh, one more thing. You don't use REF for parameter passing. You use IN and OUT for parameter passing. Which is stupid because it's just like REF, except you don't need to initialize them before using. Otherwise, it's exactly the same! How's that for unnecessary complexity?”
Peter was speechless.
“You'll learn it later as we go, but not all problems need solving. Sometimes, it's best if you can just avoid it in the first place. Take today's exam, for example.”
“You didn't really finish the exam.”
“No, I didn't. There's no point. You guys are so stupid, I'll have to start from the very beginning! Don't expect to be programming very soon.”
“Why not? This is a computer programming class.”
“That's the difference between me and other guys. I insist on teaching you the foundations you need. It'll take a while, but it'll be solid.” Peter can do nothing but agreed to that.

Saturday, November 9, 2013

Nanowrimo 2013 TOC

NANOWRIMO 2013
Simpleton Geek Teaches Computer Programming
Book 1
1. Introduction
1.1 I'm looking for Programming Class for Beginner
1.2 Why do you want to learn how to program? Old guy
1.3 Why do you want to learn how to program? New guy
1.4 Why would you want to learn how to program?
2. You don't know Arithmetic?!
2.1 Bases of Numbers
2.2 Mental Arithmetic
2.3 Multiplying large number with calculator
3. Show and Tell
3.1 Show and Tell is for Kindergardener!
3.2 Describe to me: A horse!
3.3 Describe to me: A hammer!
3.4 Computer Programming: Math vs. Language
4. Boolean Logic
4.1 Half full glass
4.2 Rabbit/Duck or Young/Old lady
4.2 NOT, AND, OR, XOR + parenthesis
4.3 The world as black and white
5. First Test
5.1 The dreaded exam
5.2 The answers for the test
5.3 The questions for the test
5.4 Logic vs Emotion
Nanowrimo 2013
Simpleton Geek Teaches Programming
Book 2
6. Platform
6.1 What is the best computer programming language?
6.2 C/C++/Java/Python/Perl/Basic/Assembly language
6.3 Petit Computer introduced
6.4 Why PTC?
7 Console Text
7.1 A weather predicting program
7.2 CLS, PRINT, LOCATE, CSRX,CSRY
7.3 INPUT + variable + array + pointer
7.4 Computer I/O explained
8. Panel Str
8.1 Do what you did, only different
8.2 CLS,PRINT,LOCATE,CSRX,CSRY
8.3 Debugging
8.4 Learning vs. Practice
9. Arithmetic
9.1 Simple calculator
9.2 Arithmetic: Add, sub, mul,div,mod
9.3 On GOTO + label
9.4 The first significant program
10. Branching
10.1 Don't use GOTO!
10.2 Many uses of GOTO
10.3 Many uses of FOR-LOOP
10.4 States/Modes and Iteration
Nanowrimo 2013
Simpleton Geek Teaches Programming
Book 3
11. Text Draw: PSET,LINE,FILL,RECT,MAP
12. Text Paint: PAINT, TRI, TRI-FILL, GSPOIT
13. Real Graphic: GCLS, LINE, RECT, FILL, PAINT, GSPOIT,COLOR
14. Trig and Polar Coordinates
15. Exam: Your very own paint program!

Monday, November 4, 2013

Nanowrimo 2013 has begun

And I am obviously late. By this time, I will be one week late into it. I'm still updating my simpleton blogspot. I'm trying to get in some Petit Computer materials. Some Nintendo materials.

Then Some How-Tos are in order.

Finally, I'll have the outline, characters, and resource book for the story.

And I still have to make a book for my last year's Nano.

Then I'm done.

To The Grind!