I haven't posted in a little while. Feeling frustrated with my brain not clicking on Harvard CS50x pSet 2. Imagine, I have 11 assignments more. Maybe I'm about to have a big break through. Starting to negatively self talk. "Only smart people can do this", "Why are you learning this anyway, it's just a distraction … Continue reading Brain Barriers
Author: callum
Command Line Arguments
When Dave started talking about this: int main (int argc, string argv []) I had zero idea what he was going on about. Now I think I understand a little more. This is just to allow you to add things to the command line, instead of running the program then adding things. All about efficiency...I … Continue reading Command Line Arguments
CS50x – Week 2
Here are some things Ive learnt so far: You can create a function in the program. You need to teach the program about the function. This is done by writing void chart (int score); at the top. [ ] These brackets store an array. In this example it is storing 3.Although not shown above, in … Continue reading CS50x – Week 2
CS50x pSet1 Cash Done
Here is the final version of the pSet1 Cash problem. I couldn't work out how to use the % operator. I may come back to revise the problem if in the future it becomes clearer. #include <cs50.h> #include <stdio.h> #include <math.h> int main (void) { float input; int cents; int coins; //Prompt user for an … Continue reading CS50x pSet1 Cash Done
Stuck on pSet1 “Cash”
Im stuck on the cash problem. Feeling my brain is starting to synthesise with a lot more information. I get nervous when I start a problem out on my own. Nervous for typing on a keyboard in private. It's the inner voice saying "you'll never get this, you'll never understand". Anyhow, Here I am in … Continue reading Stuck on pSet1 “Cash”
pSet1 Mario
Ive finished the pSet1 Mario project to build a pyramid of #. I added some notation for my benefit. Sometimes I get lost in what happened so noting and scribbling acts as a review.
Tired and Confused
Trying to setup github repository. Can't even read through the instructions to setup the CS50 lab. Feeling frustrated. Listened to a podcast today where Michael Phelps was interviewed. He said he "hates" the word can't. Maybe I'll think about this as I think about how I "____" understand how to setup the above!
Make a Function Inside the Code
In C, we use: #include <stdio.h> #include <cs50.h> to tell the computer to access these libraries written by someone else at a previous time. We use: int main (void) as a function. The left-side is the input. The right-side is the output. The example I am working on today is as follows: #include <cs50.h> #include … Continue reading Make a Function Inside the Code
C on Sandbox
Here is what I learnt today: { int i = get_int("Integer: "); printf("Hello, %i\n", i); } I want an integer, so I set the variable to "int". Then I set it's name to "i". You need to set the function of the variable. I do this by using "get_int". Then, to display on the screen … Continue reading C on Sandbox
Understanding Variables
Continuing with the Harvard X CS50 course. I've started taking notes, even writing all the code examples down in my notebook. I feel it's helping become more familiar with the concepts. I am understanding variables a little more, as in this example: (int i = 0; i < 50; i++); This means, The variable or … Continue reading Understanding Variables