AAAAAAAAAAAAAAAAAAAAAAAAAAAAh!!! Believe it! I skipped a WEEK without making a POST!!!!!!!!!!!! How irresponsible of me! But I had good reasons. I was super busy failing tests. I always have all my tests in a row. Which is extremely dumb because my brain can’t process so much. But, oh well! The date is not up to me sooo…….. 

Let’s get started! Last week I was reeeeeeally busy wirth lab 4 so……… Hmph… Oh and I have to get started on 5 asap. But I must read chapter 5 first. That’s how I roll. I always read the chapter before I start the lab. Luckily these chapters don’t take me that much. I just took a Physical Chem test and guess how many chapters I read? one out of FOUR!!! BECAUSE they take me SO MUCH TIME I CAN NEVER FINISH!!!!!!!!!!!!!!!!!!!!!!!!!!! But these chapters are nice! I can finish them in one day. 

Once again I’m not writing the dates on my notes so I’ll just write about the latest things we’ve been taught. So until yesterday we were on chapter 4. Chapter 4 is ALL about functions. So we talked about parameters. And what are parameters? Well it’s a name you find on the function declaration. The slides liken parameters to place holders but the prof told us not to think of the as that. But to think of them as assignments. I know. I said this last time I just noticed. Since I already talked about this I’ll go on with parameters, their names have to convey the variables they will represent. For example if you have a program that calculates something but to get something you need a whole bunch of other somethings then your function declaration would look like this: something_func(int something_a, double something_b, string something_c). The parameters need to have names that match the variable names you’ll be using when you make the function call so you won’t get confused but otherwise you can name them whatever you want and it’ll still work… The slides call them formal parameters, but why formal? I’m not sure but I think it’s to distinguish from void. Which is something we’ll be discussing later. Something that I don’t get very well yet…….. Going back to parameters, names have to convey because that way there won’t be any clashes if you use the same parameter name in diff functions. This is completely true because sometimes you need to use the same things on diff funcs and if the par names convey what they represent then you can just name them all the same way and it wont be a problem really.This involves programming decisions! And we are making them!! 

Now the next thing we talked about on my notes was Pseudo code and I really liked this part so I’ll expand. According to the slides Pseudocode is a mixture of English (or any other human language) and the programming language in use. Pseudocode simplifies algorithm design by allowing you to ignore the specific syntax of the programming language as you work out the details of the algorithm. The slides also mention that if the step is obvious, we use C++ to write it down and that if it’s difficult we use English or any other…

But the prof gave us better advice. He told us to avoid making it look like C++, why? Because Pseudocode frees your mind. He says Pseudocode MUST be freestyle to allow your creative power to flow freely! After his powerful words I’m starting to look at program like some kind of BEAUTIFUL art. You know cause art = creativity. Anyway the thing is that you don’t want to restrict yourself thinking about: “How do I write this in C++?”. No ’cause how are you going to know what to write if you haven’t solved the problem?! Anything is allowed in Pseudocode, I will now present you some examples of what my Pseudocode looks like and what they are:

drawings:

Image

These were some little drawings I made for Problem 4 from lab 4. This was the most challenging yet fun problem. It was great because it was about time travelling and I L.O.V.E that topic! (I know…… it’s impossible!!! Still fun!) Anyway, the first time I did the problem it was completely wrong and I had a hunch so I showed it to the prof and he gave me SOME MYSTERIOUS LEADS and reasons! Then I left his office because his office hours were over and because I can’t think very straight with people around me… I’ve said this before… But then when I got “home” and sat on the sofa, it HIT me!!!!!!!!! I just have to add 24hours when the result is negative!! And I was so happy I got to writing Pseudo code to see if it would work and when I did this I realized I was missing more details and corrections on my source code if I wanted to get the right difference between future and present time!

 

Another thing you can do in Pseudo code is scribbles:

 Image

ImageThe wording of this problem was difficult so I had to do these arrows showing what I was going to use to calculate things, I’m not sure if I got it right in the end… I feel like I did lab 4 in a hurry… blaugh…………………… Uuuurrr.. I’ll prolly end up doing the same w/ lab 5……………………………… I only have one more week to go before it’s due…………………

More scribbles (literal scribble):

 

Image

Math, human language & other:

Image

Image

 

 

Image

Image

 

O.k! Yay! Enough Pseudo code.

Piece of advice from prof: Learn to estimate. You can test whether some output is plausible w/ estimation. Estimation is the key!!! Why do I suck at it then??? Urgh..

Anyway… This is it for today! I’ll prolly write more tomorrow! Bye!!!!!!! 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s