Hey everyone!!!!!!! I’m soooooo far behind in EVERYTHING right now!!!!!!! I’m sooooooooo sloW!!!
And it’s because I don’t concentrate very well… So because I’m noticing that I will not be able to make an individual post for every single class I’ve decided to make posts of little bunches of classes where I’ll be discussing what we did. So why a picture of lady bugs? Because in one of the classes I’ll be discussing today we talked about debugging! But before we get into that let’s start from the beginning, shall we? Wow, my class notes are getting worst by the second… Let’s see.
On Jan 22nd, 2014 we apparently started the class talking about RAM which we all know means Random Access Memory. You know it’s funny ’cause in my notes I only have the RAM written down next to a doodle that looks like a target
and I have no idea what the professor meant by this. Plus underneath the target the word CPU is written down~~~~~~~~~~~ Egh…
So let’s go to the book for a sec. The book says that it’s called Random Access because the computer can immediately access the data in any memory location. About CPU (central processing unit), it says that it is the brain of the computer. Also that the chip of the computer is the CPU. So the processor is the brain but it is a very SIMPLE brain. Unlike ours I guess.
I think we’re complicated so our brain must be very complicated, lol. All the processor can do is follow instructions (like a human without self-esteem, self-worth or will power!) provided by the programmer, (the master). Anyway if you read the rest of the parragraph (pgs 6-7) you’ll see that the processor is kinda smart anyway because he can add, subtract, multiply and divide. He can also move things from one memory location to the other! So he’s quite the faithful and useful slave. I mean he can even interpret strings of 0’s and 1’s as letters and send them to an output device. How many of us can do that?!
O.k now comes the fun part/ the part that makes me have an identity crisis squared. On my messy notes I have the name of a website. Apparently the professor suggested that we should visit this website: code.org. So guess what I just did? I went to the website and
died saw a very inspirational video about why programming is superior to anything else and to any other career in the world!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Oh!!!! The website is apparently GLORIOUS! I say apparently because I don’t have the time to delve into the website right now but I did sign the thing to support the fact that ALL schools should teach computer programming. But the website seems GLORIOUS because it has a lot OF COLORFUL FUN TUTORIALS!!!!!!!!!!!!!!!!!!!!!!! GOSH! I WANT TO FINISH MY BACHELOR’S in this programming business!!!!!!!!!! But it’ll take waaay too long. Why am I even studying chemistry??? 😦 I’m such a loser!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Programming is superior. I’ve known this all along and now it’s so far away… Ever since I was a child (9 yrs old) my dream was to have my own website and ever since I had my ipod (2011) my dream has been to develop APPS!!!!!!!! So WHY????? Yeeeah, this was my reaction to the video I saw at code.org. Now I’m very depressed and I hate the future. Problem?
Now let’s take a breather and go back to class. After RAM/CPU/cool website we moved on to operating systems which took me back. A long time ago (2009) I took a very silly computer class that did not involve programming. We had to do an oral presentation on something involving computers and I didn’t know what to do it about so my friend James suggested I do it about Snow leopard, Apple’s 2009 desktop and server operating system for Macintosh computers. So I did and also for the first time thought about and realized what an operating system was so: THANKS JAMES! In class we talked about how these evolve throughout time and how something that wasn’t included 10 years ago is now included because it’s a resource everyone needs. Isn’t that kinda cool? Now the book says that an operating system allocates the computer’s resources to the different tasks that the computer must accomplish. The word allocate is waaaaaaaaaaay to fancy for me and maybe for some of you it is too. So let’s sub this word for designate and now the sentence makes more sense to me! Let’s see that written down: “An operating system designates the computer’s resources to the different tasks that the computer must accomplish”. Better? I think so.
Next I have this written: Why choose one language over the other? Learn a lot of programming languages. Yeah! I wanna learn Java!! There’s a tutorial on the website I spoke of earlier.
We moved on to talk about the history note you can find in the book. Babbage (how cool is that name Babbage = cabbage), began the first computer but he never finished it so other people had to finish it. Something even more amazing is that Ada Lovelace, a very lovely lady was the first programmer but she didn’t have a computer. W0W. She just blew my mind. Gogeous + smart!!!! Every chick’s dream.
But why was she able to do this and how? Because you don’t need a computer to program. You need to analyze and come up with a solution to a problem independently from the computer. Isn’t this what we learned an algorithm is?! O.k so here’s where I finish my notes for the 22nd.
January 24th, 2014
WHOOPS! Now here’s where things get real!
We did our VERY FIRST little PROGRAM!!!!!! About How many peas are in a pod and how many do I have if a such annd such number of pods! BEAUTIFUL!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! OOOH! But I gotta say it was quite the head-ache for me. Why? Because we did this program as part of a lab that we have to submit before tomorrow (
luckily I already submitted mine, what score will I get??!!?!) and we had to answer a bunch of questions but we only did the program in class however the questions required that we made small modifications to the program!! We were using emacs and I DIDN’T have emacs in my computer so I didn’t know what to do or how I was going to be able to finish my lab on time!!!! Luckily and happily and thankfully I have FRIENDS!!!!!!!!!!!!!! And these friends helped me come up with a solution!!!!!!!!!!! Especially my friend Emmanuelle who quickly tried to make a partial install in my computer (partial install is like having two operating systems on your computer at the same time. I needed Linux to have emacs but I have windows), however for many reasons the partial install was not plausible so I had to go home without emacs that day. Me = depressed. BUT my other friends were like: “Get a virtual box” and I was like: “I should”. So I told my friend Emmanuelle and he was like: “Yeah that’s what I was thinking we should try next” and I’m like: “Whaaaaaaa, you’re so smart!!!”. So first we downloaded virtual box and then ubuntu which is apparently an operating system related to Linux. So now I have a machine inside another machine, my laptop. That was how everyone explained virtual box to me. And thanks to this virtual box I was able to finish my lab on time! Oh, however after I got ubuntu then I had to go to their store and install emacs which is free!! Now I have to get to reading chapter 2 so I can do lab 2 and take some quizzes! All this was possible thanks to my friends! So: Thanks Rick, Alexander and Emmanuelle!!! Also, have you noticed how many times I’ve mentioned this class’ book? I didn’t buy it. My friend Emmanuelle is lending it to me. Thanks Emmanuelle! I’m soooo lucky to have such great friends! And they all have the same positive trait. They know how to program, lol.
I present to you my first program ever and my virtual box:
January 27, 2014
O.k so we finally get to debugging!
I don’t think I understood this part very well I wasn’t concentrating that day. Ugh. Before I get to what we did in class I wanna talk about what the book says on this matter. Why? It was cute. The books says: A bug is a mistake in a program and the process of eliminating the bugs is called debugging. The story behind it involves another lovely lady, the third programmer in the world:
love old people! The story goes like this, she was working on the Harvard Mark I computer when a moth caused a relay to fail. Hopper and the other programmers taped the moth in the logbook with the note “First actual case of bug being found”. Isn’t that cute? So why did I post pic of lady bug instead of pic of moth? Ladybugs cuter than moths. 😛
Back to class! The prof gave us a bunch of instructions. I’ll list them here so I can memorize them!!! 😉
To use debugger:
1. Prepare runnable program for debugging, use the command that does the compiling and linking in one go:
g++ -g -Wall -o MyFirstProgram MyFirstSource.cpp
-g = compile for debugging
2. Start emacs
3. open sourcecode file used in MyFirstSource.cpp
4. In emacs menu select Tools>Debugger (GDB)
5. Check in bottom line of emacs that last part is name of executable program made in MyFirstProgram
7. In emacs menu select Gud > GDB-UI > Display other window
***I’m pretty sure that was it because that’s where my instructions end. I have to try doing this again but just writing it again. Helped me understand what we were doing better.
Now I remember windows popped, there was like this thing divided in four panels and we had to find a symbol that looked like a stop sign. Then we had to hit GO, a green sign. Then we had to do something about “next line” but my notes are not that clear here. I really have to do this again soon. I wonder when the first test will be??!?!?!?!
Other things in my notes: There is no such thing as an empty memory location. A variable always has a value, if you didn’t put it there then it’s a garbage value.
The next class was about COJ but I had a huge problem w/ my account so I wasn’t able to post my problem. The good news is that I did solve the problem. The little program is in the university’s computer waiting to be posted. But I don’t think I’ll post that one I wanna make the program AGAIN!!! ON my laptop!!!!!!!!!! I’ll do it soon ’cause my account problem finally got fixed so I have to email my username to the prof!!!!!!!!
The class after that was discussing more slides and continuing with chapter one. I’m suddenly not sure if we finished it… I gotta write more notes… Shame on me—————–
Well this is it for today! I shall move on to my other duties. Chemistry duties.