SCHOOL:  Radford University
STUDENT:  Steven Oake
CLASS:  Organization of Programming Languages
TIME:  5:30 ‑ 6:30 p.m.
DATE OF CLASS:  09‑07‑2015 

Karasch & Associates
Captioned by:  Juan

"This text is being provided in a rough draft format.  Communication Access Realtime Translation (CART) is provided in order to facilitate communication accessibility and may not be a totally verbatim record of the class."

(Class started at 5:30 p.m.)  

>>INSTRUCTOR:  Okay.  Now my audio is hopefully going.  Is there sound coming through?  And we're down several people at the moment.  Maybe it's good that I'm off to a slow start.  Okay, cool.  I guess when I share my screen you don't see my head, right?  Is that true?  Oh, I guess it is ‑‑ what is it I'm not supposed to overlap?  Scroll back.  Yeah, let me know if I do accidentally do that.  
	Okay.  Let me try turning on the sharing.  Oh, rats, I forgot.  Let's see it works, I think I need to be in Firefox ‑‑ it case loading Adobe Connect.  In the meantime, you can talk about chapter 1 reading.  I'll be right back and I'll remember to hit record too, hopefully.  Be right back.  
	Okay.  I'm back.  So let me start sharing and we'll start looking at the homework one mini expressions and we'll start looking at those.  Ignore all the clutter I have in my background.  I'm sorry.  And I want to go from now until a browser and look at Desire 2 Learn.  And hopefully I'll ask ‑‑ how did that part seem to go?  Do people seem to be able to get that?  Okay.  
	Yeah, hopefully just over practice and I would suggest not to copy and paste, but just typing it to get your fingers used to it.  And I supposed I took the maximum of your two attempts.  In the future I'll take the average of multiple attempts.  Usually I'll try to do two if it's not a total give away.  It gives you a chance to recover somewhat.  
	So the very first one was adding some numbers, plus two, three, times or four, that was two, plus three, plus four, and what kind of is interesting about that to me ‑‑ plus, in most languages it can take two numbers.  In racquet it can take ‑‑ so two plus, three, plus four, plus five ‑‑ and that's really getting ‑‑ can I type it in here?  If in Java I would say that I'll be repeating all of the pluses.  I'll say plus two, plus three, and I'll do the four times five.  In racquet, we can go ahead and say, we'll see later you can call plus on one or even 0.  That's one thing about the beginner, if you're a beginner student language ‑‑ let me record.  And let me pull up the D2L page for recording.  
	I'm not good enough to carry on two conversations at once even if it's just me talking.  Here's the Adobe Connect.  Record meeting.  Okay.  So yeah, reviewing the quiz.  In full ‑‑ one of the differences from a beginner language, the full language, as I just mentioned, you can call plus ‑‑ so for instance, it's okay to say plus of just two in full bracket.  Even though that is legal bracket it's probably not what you wanted to do for this assignment.  And so beginner student simply says, okay, there's certain things I'm not going toll allow.  You probably didn't mean to do that at this point.  So that's what the beginner student does.  All it does is a few things that are probably errors for beginners.  Even if they could be making changes in the full language.  
	Okay.  Substring of Mississippi three, six.  It turns out an ending index, you go up from three up to but not including six.  That's just like in Java.  And the answer is sis, and I think I said putting exact exactly what you see in the window.  The answer is a string and we know something is string because it's no one end quotes.  It's kind of nice.  Any answer you get you can copy and paste that and it will be valid bracket.  If you just and put it back at the top that would be variable and uninitialized.  
	But anyway, what do we notice about calling function in bracket ‑‑ open paren, string ‑‑ gosh, I'll call this string greater than of Miss And Mister, and whenever I see something like this with the plus I think of lifting up that plus and will sticking in the arguments.  So two plus three, plus four times five.  And same with the string greater than.  I'll think of lifting that greater than.  So is Miss bigger than Mister And what's the answer for that one?  If you'll let me know then I won't have to think so much.  
	Is Miss bigger than Mister?  What's the answer according to racket.  Uh‑oh, are you‑all hearing me?  Oh, maybe because I didn't have Adobe Connect iconfied.  Make sure you're at the beginner student language and will you should be good.  That's the literal bouillon value true.  It should have been visible, but ‑‑ okay.  So hash true and hash false are the literal values of true and false in racket.  And you're free to use those.  
	Okay.  So, by the way, why Miss Is considered bigger than Mister?  Why did it say that was true?  ‑‑ I think of it as ‑‑ if you compare alphabetically is the page beggar.  So, okay, that was number three, number four, we have an or statement, how many inputs did we give to or?  Yeah, three.  So plus can take more than two inputs or it'll take two or more.  What was the first bouillon that gave to or?  The string equal Miss and Mississippi.  So of the three things we're handing to or, what is the first one?  I guess I can pull up racket, and I can so I took or from something, something, something.  What was the second bouillon that I passed in here?  Okay, what is string equal sign.  That's just comparing two strings.  Oh, yeah, Miss is not the same as sis.  I'll copy and paste out of the middle of it just to see what that smaller part is.  
	So yeah, so the string equals false, so how much does that give?  I'll good over to here ‑‑ oh, big greater than 43 and slipping it four as bigger than tree is a true statement.  Okay.  What is the fourth bouillon we pass onto here.  So is that true or false?  Well, I'm not sure, oh my gosh, I get a run time error.  So this is now ‑‑ I specifically put this in there.  If you went and looked at it, I know you can get the answer, but if you look at it and see where it's coming from ‑‑ what did or do?  I claimed that five was not actually divided by 0.  Why did we not get a run time error?  There's a particular term for something that happened here.  Yes, short circuit is the term.  Or if I'm taking the or I'll still be true.  True, false, false, false, false, is true.  So this is kind of interesting.  The or function ‑‑ this or looks like a just like the other ones.  It didn't look at all three inputs, and evaluate them.  So or looks like a function or you give him some bouillons.  It's a special form.  It's not a regular function.  
	Okay.  So maybe you noticed that as you were typing things.  Yes, if you take 0 divided by five you'll get 0.  By the way, what is or of false and 17?  Anybody have any guesses? True.  I'm going to hit enter.  Or, question result is not true or false.  So that should be a special thing.  Again, in the beginner language you should pass or's bouillon.  In the beginning we should pass bouillons.  So even though even though you don't get to discovery it was second. 
	Down, and we're getting the answer ‑‑ what is the hash from last time.  Exactly.  Exactly correct.  Okay.  And where did that come from by the way?  Which of these three numbers gave one?  I'm curious about this one here.  Again, hopefully you were curious and dried this F oh, we get back 65.  This would be the same thick if you were in Java.  Say hey there's a function ‑‑ you give it a character, it looks kind of funny to write it like that with a half backslash P but that's how you may know a character.  Square of 65, how big is that ‑‑ say it will just to see that really ‑‑ okay, that was 11.  Now, going back to the results of the imagination it the ‑‑ why did max say the is to it would be fine, two, three, four, from so the square of 635 is just or eight.  well, I guess I know that the answer is approximately eight as well.  So the question becomes well, if that error is built bring you um above 11.  Well, maybe all I know is some double and I have some error.  
	So if it case what's the biggest out of around 8.  Is it ‑‑ okay.  17.  I'm going to type in the following erythematic problem.  Square root, and now we've seen this, square root goes and gives an error.  If you type this by mistake, that's nigh because it'll give an error right away and a good error.  So that's kind of good.  I'll just point out, if I go, I'm going to the ‑‑ from the full racket I think it says procedure square root.  Okay.  What about plus?  Plus is the plus function.  ‑‑ on how and is a and that's wound and there if you want to talk about the so that will be following.  So that's where it may be calling on a function like a familiar one. 
	Any questions on the homework?  Maybe?  Okay.  So two and here so what blues rack is got you think really did that you ‑‑ I'm in racket, I have the top half and the bottom half.  Then the substring evaluates to WD.  And that's the exact same thing happen.  
	Okay.  We're going to go on today and start talking about ‑‑ I think we talked about the I started both intra.  You'll see strings, and it's kind of interesting that hash slash and it hit return.  How do you aspirin this well, even the letter A the  A paren, but it looks a little bit weird in racket.  So if you say two plus three there.  If I type it in the top ‑‑ okay, good point.  If you do it that way, conceptually we're going top to bottom, my mental it to feel do some extra point.  Again, it's a minuscule number of if you know.  
	Okay.  Another thing that we have from real and when I then, well if you want to do a substring, yes, strings are your friends.  If you just want ‑‑ so I'm creating a function and it's writing to a divining ‑‑ when I oh ‑‑ in Java, you tend to pass the thing.  But well, in racket I probably won't use the string.  We'll look at the documentation tab.  So I want to so.  So if you haven't seen that before it'll probably be a good idea.  I'm not sure what it means for after time to change.  
	A lot of languages Java has them as well.  It will possibilities are words.  That's definitely true.  It's definitely for a computer understanding ‑‑ of course, you know, the sport doesn't ‑‑ 
	Let me put this way, how many strings are there?  Well, many, right?  Lots and Lots ‑‑ well, if you remember there's if I use ‑‑ see another way of saying in there's a night how many or ‑‑ see this is a thing you need a language class for.  There's 56 possible characters.  Nowadays we have all the unilateral characters.  If you need your own time people can make class, if you want to say, hey, I only want 12 different things of this type.  You set them up.  Here are the only 12 things of this type can have.  Then you have a variable, just like a bouillon can only hold two values.  So yes, I'll write it down here.  And I guess I can throw in compiled time.  
	So I may be making up my own thing and I want file modes, and there's three types of them.  So here I get the racket symbols.  So my point is, even in Java, it's a class that will only have three instances ever constructed.  And, yeah, there's three types of file modes.  So I'll let you read on your own about enumerated types.  But getting back to racket, I just want to point out that ‑‑ we have symbols and racket and a place for other language.  It's not quite as good ‑‑ there are a different number of symbols out there.  There's as many symbols as there are strings I guess.  But, in practice when I look at the programs, hey, maybe this is like an enumerated type.  There are other uses for symbols as well.  
	Okay.  Anyway, so these are the types of data that we can have in racket.  I'm not going to say anything more about that.  That's a regular expression.  Ports and all sorts of under lined things are there.  But we're not going to ‑‑ I'm going to teach very little racket.  In fact, I'll teach about five key words of racket.  There's erythematic classes.  
	All right.  Let's continue on, I want to go ‑‑ did we talk about signatures?  I think we did, right?  By signatures I mean like this one that is highlighted.  So by signature of a function ‑‑ the name of a function, like here the equal sign, and then the types of it's inputs arrow the types of it's outputs.  But this is the exact sort of thing when you look up in the documentation, hey, what type am I going to get back and what's the name of the function.  It's all important information.  
	So here's an example.  Let me make this wider.  Substring, this is civil case substring is taking a number ‑‑ you can't pass a negative number to substring.  They don't have that type.  But since we're kind of in common here, but be thinking about the types.  Substring takes in a string.  What's that this arrow means.  So here's an example of a function string ref of hello one W well, it grabs that particular character, the same in Java ‑‑ go ahead and write down these signatures for string ref.  Just on your own.  Let's see, I'll leave that window up there.  Is that a question that everybody  has?  Signature, again, what is signature?  Here's an example for substring.  Name of the function, colon, types of inputs.  What is the signature of this and the signature of that.  You need to see what the function is, but takes a string and addendum and returns a string.  Almost.  And I'm happy with that answer.  If you look at them, and that's actually kind of the differences of a character and the string ‑‑ it kind of matters because other functions one or if other ‑‑ if it returns anything at all, so remember index one already we're not picking up the ‑‑ so here's another way.  What does char relook like.  Here's one that's quite not ‑‑ it has that twist on it.  But same sort of thing.  Into the type that we have in Java.  
	You're right.  In Java char the ‑‑ inside the string class we don't really mention that first argument.  Why do we care about this signature?  Why have I given a term to that concept?  When you're looking for the meaning ‑‑ and here's an example, a string equal question mark.  I'll call this thing equal.  
	Yes, so two strings returns to bouillon really include the name of the function with the colon as well.  If I ask for that on a short answer or D2L or anything like.  By the way, surmising of my hey a function F that goes from the real numbers to the real numbers H that's not an exact same notation.  So we're using from the standard ‑‑ we're always aware of the types.  Okay, so I'll let you try some of these other ones and you can e‑mail me if you're not sure.  One thing that I will mention that two string stripling strings is it eventually ‑‑ and there's although one call string so don't ‑‑ string and string equal.  
	Okay.  So yeah, just keep in mind and hopefully they're clear.  As you're writing things, don't confuse them either string equal or abusing them.  Okay.  There's a function called number to string, can owe seized is it ‑‑ in you want to call bouillon that's one.  
	Okay.  So that's the idea with the ‑‑ let's go ahead and ‑‑ I said I would cover about five racket key words.  Well, here's the first one.  So now a new topic here.  
	A brief new topic.  Define.  Define lets you bind a value to an identifier.  Maybe that's more correct.  Hey, let the name and be associated ‑‑ these are like a name constant.  And it will never exchange ‑‑ and the ‑‑ so find you give it can be a by mouth billion any of the first snuggly and we will never know I don't have to tell the racket ‑‑ again ‑‑ I don't want to call it a variable because it's never going toll vary.  
	Okay.  So there's a couple of examples.  I'll put point it the define looks like ‑‑ it's not really ‑‑ I go different ways on that on different days.  Okay.  So to just go to know you can make different names.  Yeah, I'll go ahead and assign some reading and some stuff.  I'll let you decide what you like and hate, one person likes probably it's an illustration to say.  I put was the ‑‑ and yeah, I didn't ‑‑ okay.  Let me just take the remaining six minutes.  And I'll talk about the steps of writing code.  And these are steps that you may follow ‑‑ you may follow and this case you ‑‑ it motorbike down on the ‑‑ ‑‑ I'm in the wrong foil.  Okay.  These four steps.  I'll refer to them eventually basically any coding you do.  But I want to go through an example just to show what are these steps.  So these steps are the design recipe.  
	Okay.  For every uncle and huffer a ‑‑ this is sort of an ‑‑ that's your ‑‑ if you don't tell me what your answer should be ‑‑ I can't really test it.  And the third thing to really be a unit test you want some way for auto and run on the test.  Okay.  What do we mean by these three things.  So we're what I'll do.  What about but so we.  All right.  You I want to write check spaces.  I desire the answer 15.  That's the expected answer.  Now, notice if I haven't it's o that mines the desire answer.  Okay ‑‑ I'll take down to the window.  0, yeah, at least ‑‑ if this is then what should ‑‑ if I give it sow row in this case.  What's another number for perhaps to try?  So minus one.  Yeah, a negative number.  In fact, before even minus one, I'm going to try positive one.  01 and four.  Okay.  Any other numbers I should try out or is this well pretty covered up? ‑‑ any other numbers?  I can try.  If it was the problem where the number wouldn't be allowed.  And that's fine I wouldn't be test room.  No negative or that or.  I'm going to ‑‑ I thought about you three things.  So this is a valid case.  If you're using Java you might go down and download J unit.  But hopefully you do test functions this you write.  Let t real, kick, let's see if we with ‑‑ what is the signature for trip fie?  It takes in a number and returns a number.  Description?  Three times the input.  Keep it sill and short.  And ‑‑ gosh no you've I'll leave the body of the function.  Once I done this I actually have a name for the input.  I like if refer to the ‑‑ 
	And, by the way, on some of that she will I'm supposed to of I do it I want.  The answer 14 but of the points I want to make is that by doing test cases first and if you have a test case like this, sometimes these are some pill that one, I think you're in the gaping great them.  Actually ‑‑ okay, let me go ahead and ‑‑ and actually, I'll some more tests down below, but certainly all of these six tests past.  
	We'll come back and look through those steps and that'll give you a chance to do that.  If anybody is wondering, I overwrote the notes of my afternoon class that I had for them.  So I'm going back and restoring them that for them.  I hoped. 
	Oh, my goodness, our five minutes is up.  Let's look at one more.  Okay.  We'll just run one command here.  Push it out to the web page, except I have a ‑‑ unclosed tag.  Okay.  Let's go ahead and reasonably prudent person.  Let me start the questions back and recording tack.  Okay.  So that were the first sign.  All right.  Writing tests, and then it's the part I call a instead of function, you have of ‑‑ description ‑‑ you have down that, description with your language wall program.  You can see sort of try things at that the point.  Make sure it runs.  At least you know that everything is set up.  And again, this is a procedure that you might use.  Okay, and complete the body expression.  I've broken it down between doing all these ‑‑ you're not facing ‑‑ and doing the quiz arms what whole.  I found part‑time are writing code and how is the draw you have to undue a lot of the code.  So during the test up front really does help.  
	Questions?  Thoughts?  And ready to jump back into another example?  Can you‑all smell the Labor Day barbecues of your neighbor's yards?  Okay.  One thing I'll note, by the way, start learning the five key words in racket and now I've already introduced the second keyword.  Define for a function.  And I'm going to go up and put them side‑by‑side.  So define has two different purposes to name a function.  How does racket tell one from the other?  What one character is giving it away?  I am introducing the idea of, hey, call functions in a test worth, but that'll be true in any language.  One character pees it are ‑‑ racket says hey I see open prisoner.  If there's no prisoner then the name.  So they look similar but be aware of yourself.  Common mistake sort of ‑‑ oh, that's ‑‑ something close this kind of mirrors the way ewe use it as a function.  That's intentional.  Okay.  So that was or example for trip fie.  So here's our next problem.  I want to write a function if should good many people will form there are a I shall ‑‑ so if you give me and bar lock up.  Hint, when I say write that function what step are we going to do first? 
Yes.  Let's go back and we're going to get in trouble if we start skipping more are ‑‑ let me close up some space there.  So let's turn this into a check expect here.  You know, follow it will pattern, everything we do ‑‑ oh, we actually cut our ‑‑ how many pieces of information am I going to give on gram?  Okay.  What's another test case?  Remember, with triple flyer, think about that he, maybe about my one.  Okay.  So are there any small cases we can use?  Or just other wring I cull could some any ideas?  And or decide if they're inputs.  Yeah, so maybe the empty string.  So yeah I could do another example like Steve Oake.  Oh, yeah, I is he maybe I revised problem must be ‑‑ no empty strings allowed for but certainly you might want snow here and expect to get that back as an answer.  
	Any other test and I number.  How about a ‑‑ by the way, my mind set when I'm developing these cases, I think of it as, somebody else is going to be writing the code.  And if we find auto, people are going to be upset and said hey, programmers you're the run that's out of over.  I don't think my is and they might do something assumes there's more than one letter.  In which case they can't assume that.  By the way, who is the is it okay.  What's another ‑‑ anything different?  How about a first time.  Yeah, so I'm going to say that you have to be given a first and a last name.  So, yeah, a hyphenated name.  What's a hyphenated last?  I want and we might not come bag for conflicted, for the sake of this problem going to leave it at that.  But you're right O we're thinking about these issues especially ‑‑ and, again, if you don't like these ‑‑ wife down  hall and consider support, you can go ‑‑ yay can have snuggly No.  For the two things prevent and ‑‑ I actually referred to many ‑‑ it's a I use back ‑‑ this is just a comment.  That's actually for a mark down format.  This is real Tom.  But that's just me.  Don't worry about that.  That's the trigger for starting to the render in the code front.  
	Okay.  Great.  We've done step number four, step five, and so now to complete the body expression.  We know we have several things we need to work with.  And if we look up above I stuck in a ‑‑ so like down, I'm going to start working a ‑‑ a capital into a small.  How do I do that?  It's a function char down case.  And you don't know that of course, right.  For string functions and here's char down case.  So great.  I now have the two letters down cased.  And I'm going to do some things that aren't going to work.  String this and this.  
	Okay.  Let's go and I'm going to run the program, I'm going to click on the run arrow.  And I get an error here.  So first of all ‑‑ because char down.  I need to grab a character, but I need to convert that character back into a string.  And by the way, where did it get that T from?  Yeah.  I'm running it on Steve Oake here.  And, by the way, one other thing.  Down to the bottom half we have the message in red.  In the top half we have highlighted in pink the expression what caused the error.  That's actually a code coverage tool.  Where it says, hey, I haven't even run those lines in black.  So don't read this as black stuff as an error, which here I can understand it.  
	So it's picking occupy the T from Steve and I want to pick up the F from the Steve.  I did not mean to do that, by the way.  I just typed one sort of by accident.  So I'm not too stressed by making things like that.  So notice if I tested it I would see a bunch of initials seeing on the screen and I might not catch that those are the wrong initials.  It saves me over all the stupid mistakes I do.  Okay so we need to turn this into a string, go that turns a character into a string.  It turns out that function is called string.  
	String is an actually a little bit of plus and or.  And, again, I get that by reading the page, the documentation page.  If you're sitting here in racket, if you hit F one, put your cursor, not just hovering, but hit F one, that goes to my browser and pulls.  And I'm going to go ahead and follow that link on string ‑‑ it happens to be all of the functions in beginner racket.  Every last function.  At the top there's a side bar that helps.  There are some five variables.  Then there's predefined numbers.  Oh, hey, there's our cosign ‑‑ I wonder what that does.  Bouillons, symbols ‑‑ characters, there's a whole bunch of things.  And under strings, there are different things.  
	So and it may take a while to find that, but here's a documentation.  And it kind of gives the signature in a different syntax.  It says string, let's do a different one.  Replicate, down here there's a description of it.  So that's how you read this ‑‑ the part that catches me is that the blue area starts the documentation for a function.  So sort of the blue and follow below it.  And, again, how do you get there, there's different ways to getting there, but an easy one take any function and then go look for similar things.  If you didn't know the name of char down case.  So ‑‑ okay.  I hadn't thought about that.  
	Okay.  But anyway, now that I have the first character, run them and we'll go through and, oh, we get this window.  So if you guys remember there to tell me that's the value of the test cases.  Notice that we're reusing awe all of our test cases.  It was nice that we wrote those test cases right up front.  So six of the 12 tests failed.  
	Okay.  Actual value ‑‑ oh, the expected value.  If I really want I could click on this one.  Okay.  So there's several ways of doing this.  This is it will way I had first been thinking of.  The use the string and pass that character.  Okay.  All cases.  You know the string‑append ‑‑ it can take one string, two strings.  But you're right.  I'm going to do this all with the string because that is cooler.  Here we are.  Notice one thing I do a lot is I click on the ‑‑ it shows me, I didn't want to close it off yet.  I wanted to go here.  Hitting tab like most of it means indent this line.  If you ever hit tab you probably forgot another parenthesis.  
	So I take string and I pass it this, this, and this.  And I have an error here and we run it.  Again, the message will also be down here.  String: competes a char as a 2ened argument, given "."  Yes.  That should be a second error.  Okay.  Is this going to work?  Yeah.  And notice, again, I was able to change my code.  I'm still really confident where ‑‑ I feel very confident ‑‑ it's really easy to insert bugs, right.  There are still similar that might be made.  In familiar when I was making the test cases, but it really guards me from making stupid errors.  
	All functions in racket are prefix.  Which by the way is true in Java, right.  That's prefix notation as well.  Some but plus uses in so that's one thing I think it's cool.  There's no difference between functions and operators.  Java taught me and plus as an operator, but you know, that was like a false dichotomy.  It just Java chose ‑‑ and racket said, let's just forget that.  So that's one thing that I like racket.  It reads easily.  We're not used to doing.  
	Okay.  Cool.  Do these steps of the designed recipe, kind of make sense.  And, again, when I'm asking you on homework’s I'm asking you write on function.  Many people jump to number seven and you'll probably have lots of errors.  As the functions get more complicated, first we're going to miss interesting data and more interesting problems and help.  It seems a little bit silly right now but it gets better.  
	Okay.  So racket, I said earlier that racket reads top to bottom what I talked about that two plus three example.  Now, if you've been really paying attention check the.  And the Dr. Racket designers, they put in some really sneaky stuff under the hood.  Really so I would expect that you couldn't really call triplify of 0.  And now it's not clear to me.  But, yeah, racket goes top to bottom.  You can use it, but you can't call the function before you reach line 20.  
	Okay.  Here's the task for you.  Write the function initialize.  Initialize is a little like what will we did and I'll scroll up.  I'll give you a word, so it's like half of the work.  It's like less than what we already did for monogram.  
	So go ahead and try that on your own, just try it in Dr. Racket on your own and I'll give you a couple of minutes to just work on that.  Okay, well, just as a reminder, here's your task.  What's the first thing you're going to do, the first task is check cases.  That should be the first thing you type.  Make a function initialize and you give a one string, and you'll return the first letter down case followed by a dot.  Give about two to three minutes to start on this.  
	And let me scroll up again.  Wait, what does he want us to do again?  That's why I have this list of here for you to do.  Your stub, the signature description ahead.  So all of those have been done.  All four steps are done in this example.  And you're working a new function initialize.  
	And while you're doing that I'll go ahead and do it too.  Okay.  Those are some text cases.  Get the string what, I guess I'll add a string one that is actually a letter.  What do I do after the text cases, let me just scroll up to the list here.  Okay.  We use the text stub, let's see signature description hay ahead.  Okay.  I'm going to do to put this in the comment.  Signature, initialize, taking a string and return a string.  I know you can't do this because of the string capture, I'm going to be to and initialize ‑‑ I need you to think of a name.  What should I call that string?  Here is not clear that it's a name.  I'll just call it word.  Input string, I already know it's a string and I know is input.  So the word is not much more descriptive either.  I'll go ahead and use word.  But you're right, if that's okay.  Or maybe I'll do this sometimes.  Any string ‑‑ thinking of good names is one of the hardest parts of programming.  
	So that's my signature, my description, and my stub body there.  Okay, great.  By the way, I go ahead ‑‑ if I run it right now it's not going to run because it'll check and it it'll say, hey, you haven't finished yet.  And I will say hey I know I want to return a string I'm just going to put it into a dummy string.  I know this is not the correct ‑‑ usually I just do something shorter.  But now I'm going to run it to make sure my test cases at least run.  And I didn't like leave an open paren.  So you might go ahead and do this just to make sure you're not ‑‑ before you run a real code.  Anyway, what did you really want to do here, I'm going to go ahead call char down case, and I'm going to turn that back into a string along with following period.  
	Now, again, you might go up and copy and paste what you just did.  This is getting ‑‑ you to get this right this is the least ‑‑ I'm more interested in getting the frame work there.  Doing all of this and trying to running it.  And, hey, it worked.  So that's good ‑‑ any questions on that?  On the procedure? 
	Again, following those steps and getting into the habit of doing that ‑‑ I find that if I don't stress this now students will be coming up and asking all sorts of questions.  Well, you're asking me what the function ‑‑ you say you don't write the code but you're asking what to do.  That's why I stress this design recipe.  
	Okay.  We'll take a break in another moment.  But I do also want to say, hey, where am I?  Now, that I've initialize written, cool.  Can I write monogram more easily now that I have initialized written.  Yeah, I'm going to go back and this is called refracturing.  So is the question clear?  The question is clear but the answer isn't?  It occurred to me that now that I have initialized ‑‑ put it this way ‑‑ undo, undo, undo, undo.  The reason I chose initialize is nothing random.  Looking at the old version of monogram ‑‑ did we have any repeated code in here?  Yeah.  That was repeated a couple of times.  Just that task and now I can go ahead and take initialize of first name.  Initialize of last name.  And how do I combine these two things here?  First of all, if I try to run these things here am I going to get an error?  Expect an but found an extra part.  Yeah.  So Steve is exactly right.  
	But just be aware if you see that message, hey, a function and you have two answers listed here.  So if you need to come up which one is your final answer?  So you can't have two different answers there.  I wanted to combine those two into my final answer.  I'll go down and hit the down arrow and what I'm going to hit to indent?  I'll hit run.  Okay.  So this will be on the ‑‑ I'll put this whole file on the lecture notes page and hopefully that made sense.  
	Let's go ahead and take a 5‑minute break.  Back at 1950.  And I'm going to go ‑‑ I'll be right back.  
>>INSTRUCTOR:  Okay.  Talk to me.  How decide that make sense so far?  And feel free to e‑mail me online.  And, you know, if I'm going to slow or not or too quick.  Some of the stuff looks kind of weird, you know, like how to write a character.  And that's not really important I'm not really after that.  This designer ‑‑ and again this is going to lead us how to write programs and it's going to guide us.  
	Okay.  Let me start recording again.  Okay.  What else, so yeah, I sent out an e‑mail saying that there's also a short little ten minute or eight minute quiz that I wanted you to give it a try.  And now Steve said that link is dead, so let me know I just went ahead and fixed it.  What happened if I zoom all the way in, do you guys see anything zoomed?  I guess it doesn't ‑‑ it doesn't catch some things like that.  If you have a special cursor it's just transmitting the cursor image.  Which is great unless you're doing something that says, now when ‑‑ anyway.  A link from the D2L page.  Go to exams and on here is quiz one Java benchmark.  Group other plus read.  
	Okay.  Reload, reload, reload, reload.  And, again, I have several people sending me a message saying, hey, I'm concerned about the support.  Part of the point of this thing here is to ‑‑ there we are.  Now it should be there.  Is for me to get an idea of where you‑all are.  And I gave them eight minutes on paper, no computer.  I'm not too concerned about how you do it.  Again, it's worth a minuscule number of points.  But here's a Java program, can you write that or what can you do on eight minutes.  So go ahead on the web page click on the exam's link ‑‑ under the lectures, by the way, we have the design to the recipe and the file that will we just barely got through doing here.  And you can bring that to Dr. Racket.  It's a little bit weird if you ‑‑ you must have to fuss with the very few lines.  Maybe just paste it to Dr. Racket and get rid of those few lines.  You can try different things.  
	Anyway, okay, let's go ahead ‑‑ and I'm going to come back to the very end to the design recipe and looking at your third piece ‑‑ we saw two versions of the final.  Before that though let's go ahead and just ‑‑ I want to look at a different ‑‑ different page ‑‑ and rats, I didn't pull up those notes.  Let's just go ahead and look at different types of languages.  And I want to talk a little bit about different stuff.  I just want to very briefly give to design recipe on the class.  I'll fix that one.  Yeah, you're right, I haven't updated that one yet.  Okay.  The exam now works.  
	So I'm looking for my ‑‑ I have a post on this next lecture yet.  Let me look here.  I don't have that one.  Interesting.  Okay.  So ‑‑ first actually I want to try to go in here.  I'll try pulling out one of these notebook pods.  Man, I already have a bunch of notes in here.  I'll get rid of these from the previous semester that are not so interesting.  Okay, actually those were from last year's.  So we'll talk about this and see where we go.  Okay.  What are some of the languages that you‑all talked about?  Okay.  Talking about categories of languages and issues.  So Python, I don't need to say Java.  C++, SQL, oh wait, what else, racket, don't forget that one.  Maybe Java script.  Yeah PHP, okay.  So I've sort of written these and I've sort of grouped these into little groups.  What are the different groups here?  COBOL, you really use COBOL, you're a hard core.  
	Okay.  And I'm going to throw another one in there.  I thing of small talk.  That was through the first pure ‑‑ there was also stimulus 67.  Is there a discussion notes pod ‑‑ does anybody see a discussion notes pod that's sit on the top of the window?  Okay.  I've just hit enter.  And inside the pod it should have all these languages listed.  I remember now, I'll sort of do that, I'll hit enter and I'll delete it right back just so it refreshes.  
	Okay.  Small talk maybe in your head keep in that category.  You can go and Wikipedia more.  That is all methods of an object.  Okay.  So object oriented.  I'm not going to talk a whole lot more of that, but hopefully you'll have an idea.  By the way, small talk and there are other languages ‑‑ well, you might need to scroll up manually.  What was I saying there?  What would a pure language ‑‑ Java is not a pure objected language.  Everything is an object including ‑‑ so in small talk and you can say things like three dot plus of nine.  That's object ‑‑ the object is three.  Now, in Java you can't quite do that, if you want to treat three you integer.  Also, Java has a but there's not a class that you ‑‑ okay.  So just some thoughts.  What about these up here at the very top ‑‑ I'll go ahead and put these as procedural.  And what do we mean by procedural.  A procedural language is one where we may be call procedures which can take ‑‑ which take actions assigned to variables, et cetera.  Let me zoom down here down to racket.  What is the category that racket ‑‑ you might need to scroll down a little bit.  What category does racket belong to?  Yes, function or functional.  So functional languages does not mean all languages as dysfunctional.  There's a couple of things that are often meant.  The ones for me are most important emutable data.  Tend to write small functions.  And the ones that people do functions are first‑class values.  What does that mean?  They can be passed and returned from other functions.  Now, you might need to scroll down a little bit.  
	You can see the word function come up.  You can see the data.  It doesn't have the word functional in it.  What are other examples of functional languages?  Can anybody else name other ones?  Okay, list, that's the one you should think of.  That's the second oldest high level language that's still in use.  It can be a year older than lisp.  Lisp is an ancestor of schemes.  After a while the racket people ‑‑ they used to be called PLT scheme, but they wanted to do change to the language.  Every new version of the standard was like a three year process.  And they didn't want to be violated, so they changed the name to racket.  They rebranded it.  They're still friends.  Well, they are some of the people on the scheme standard committee.  
	Okay.  Other functional languages.  Closure gets a lot of talk.  F# is a Microsoft lank.  No, Fortran is not a mathematical language.  Yes, Python.  Haskell.  Everything is really remittable, there's no change whatsoever.  
	My screen flashed and then my mic turned off.  Is audio back?  Okay.  Is the discussion notes updating.  Is this updating?  Okay, good.  Okay.  Let me scroll down a little bit.  So Haskell is pure functional language.  It's also notable for being lazy.  So, for instance, in Haskell, you say I'll write this in Java syntax, but if you say in root of two plus of math dot square root of two, if your code calls that the square root is not evaluated until it's actually needed somewhere inside some funk.  And so that's a lazy evaluation.  So Haskell is not a language it has lazy evaluation.  And you might wonder, by the way, it's pure functional, does that mean ‑‑ if you can't have side effects you can't be printed.  So ask me that again a few weeks after we do our little game.  
	Okay.  I'm going to scroll up now.  So that's our functional languages.  Again, our lisp is one of the oldest languages.  And people ‑‑  there was Python was mentioned.  I'll throw in Ruby.  Yes these are scripting languages.  And what makes a scripting language and scripting language?  Some people say it's a lack of doing types.  Tries to glue ‑‑ yeah, not compile ‑‑ well it compiles so we'll talk later ‑‑ but what does scripting languages do ‑‑ easily makes system calls and open files.  That's what makes a scripting language a scripting language.  They're trying to make things easy and quick and very low syntax.  They're popular for that reason.  And so they intend to be flexible.  They intend to not require you to intend ‑‑ they wouldn't really call racket descriptive language.  
	There are two more categories.  Declarative.  I'm going down to SQL.  And I'm going to name that racket declarative language.  This one is going to be kind of interesting.  Let me write it down here.  You expect the functions result.  Other languages.  And we'll look at Prolog in this class.  Yes.  So you tell it what you want.  These are not terribly ‑‑ you know Prolog is not terribly commonly or widely use but it's a real mind blower.  
	Okay.  I'm going to scroll down because somebody asked about ‑‑ and I'll just sort of say special purpose, and yet still high level languages.  But it is really tuned and aimed at during mathematical work.  Okay so those are some categories.  Now I'm going to step back.  So look over those categories.  They're important because people will talk about them.  
	I want you to know two things.  I want you to remember the trait that I put down.  What are the traits ‑‑ and then it might ask you what are the functions.  In fact tickle and to go together.  But, you know ‑‑ (inaudible).  All these different categories are not the way to think.  You can go ahead and do declarative program.  It's fairly light weight for a lot of things.  You can do object oriented ‑‑ there's an object in racket.  You is set and so on just like getting procedural programming.  You can do that in racket if you want to.  Racket doesn't encourage it.  Likewise, in Java you can write ‑‑ especially now that we have Java eight, but even before that.  And never change fields of an object and still get running programs not a scripting language.  These are very blurry division and most of all languages have categories.  So don't put much faith into these categories.  Know them.  People talk about these categories.  So if you say Java script, people would say you should call this a scripting language.  But keep in mind, they're not the best categories.  They're sort of things like what family somebody is ‑‑ a famous family ‑‑ and you tell me about their background.  
	Okay.  I'm going to scroll down here and see the ones from last year.  Oh, low level programming, I think it's important ‑‑ low level assembly code and C code you're writing for specific (inaudible).  Registers things you don't worry about in Java.  So I'll throw that low level category in there.  Oh, sorry, you know what happened, that thing cable got pulled and I was on wireless.  It's probably because I have that Ethernet cable.  
	Okay.  Just to recap, low level means understanding the language, if you've written much C code then you've done all that sort of stuff.  Okay.  And, you know, there are other languages out there.  And there are languages that are different, for instance, postscript.  I'll start sharing the screen again.  I'm going to show an example just on one other language.  Are you able to see that on my screen?  That text editor?  It says Adobe 2.0.  Oh, note pad was blocking the window.  Okay.  Now, we can go ahead and see this file that says Adobe PS on the top.  It's probably not worth the time we're taking on it.  Close discussion notes.  Okay.  
	Yeah, I can see how it layers up on your end.  Okay.  So this is an example of postscript.  By the way, have you heard of postscript before?  What do you think of?  Yeah, printers.  It turns out ‑‑ so you have post fix notation and the language postscript is actually a language.  The printer drivers are actually an interpreter for those languages.  So here's an example, this line here.  (Indicating)  this is a definition.  And it's going ahead.  Here's another one ‑‑ this is another function called C show.  I don't know what it does but it does a show of a 0, of a 2 div.  Here we are.  Here's a set font command.  You put the four arguments here and then you call set font.  So you put on the name Helvetica.  So this is a wacky program.  By the way, if you look at real file this is a program that actually wrote, and there's a bunch of things about wedge and rotate and 2.5 this is all about the a wild loop.  Then curly brackets.  I'm going to open this file and this postscript is going to actually opening it in preview.  That somehow ‑‑ that's something going on there.  Okay.  What's the point?  That's just a wacky different language.  And we're opening things that are expanding our horizon s.  So every PDF file is a bunch of code that actually puts each letter on the page.  
	Okay.  So I just wanted to talk about the categories of languages and the fact that they sort of crop other languages.  And if you look at the font file, how to draw the letter A.  Draw a line from here to here and draw a line from there to there and then close that whole region.  It actually has curve drawing as well as line drawing.  
	Anyway, so that's an idea of different families of languages.  If you're interesting in other languages, by the way, I'm going to use the name of the languages that use the F word.  I'm going to look up Wikipedia.  So here's a language that somebody made up just to be funny.  But in this language is brain followed by the F word, and if you look at it, it looks just wacky.  So, yeah, you can do a lot of different things and a lot of different ways.  
	Okay.  I'm going to finish up today ‑‑ I'm going to go back to racket and just show one more piece of syntax.  Let me call up the Dr. Racket.  And I'm going to open a slightly different file.  And I want to open up one more.  Okay.  We're going to pass 8:30.  All right.  I'll be quick.  That pushes back a little bit.  I'll give you a link to read about it as well.  
	Okay.  So con is ‑‑ I'll just give you an example.  I'm going to do a little cond here.  If is less than ten the answer is going to be ehllo.  If n is less than a hundred it'll be woo‑hoo!  And kill the rest of the file.  I'm going to run that and when we run it we're going to get the answer woo‑hoo.  The parts of the code that were never looked at.  And so how is this ‑‑ let me just finish this.  There's an open paren, and I'm going to use swear brackets to represent those.  In particular, the is it less than ten.  And the answers were just ‑‑ we'll just put a single string there, but it can be any, any code you want.  So that's the idea of a cond statement.  I think the book reading has it and we will pick up from there next time.  I know that's a very rushing at the end there.  
	Hopefully, that'll get us to next week.  And I'll send some recapping.  Okay.  And I hope you have a good Labor Day.  Okay.  I'll see you‑all later.  

(Class ended at 8:36 p.m.)

"This text is being provided in a rough draft format.  Communication Access Realtime Translation (CART) is provided in order to facilitate communication accessibility and may not be a totally verbatim record of the class."