User Tools

Site Tools


opus:fall2014:jsylves2:journal

Data Structures Journal

August 27, 2014

Yesterday was the first day of class so there wasn't any new concepts introduced. The main sticking points were that since this class will be challenging it'll be important to draw pictures and get a good nights sleep. We mostly went over the syllabus and talked about how if you're going to miss class then you should let Matt know beforehand. Next class he said we'll set up the IRC and start reviewing pointers and structs.

August 28, 2014

Today in class we went through the tutorials of setting up an IRC and our repository. I learned that if I want to reconnect to the session I have to type screen -r at the lab46 prompt. One thing I'll have to remember is to always commit to the repository after any and all updates. We didn't get to reviewing C today, so we'll be starting that next week.

September 4,2014

Today in class we started playing with pointers. We created two programs that displayed values of certain memory addresses. I think I understood most of the programs I would just need to play around with pointers more to get a better idea. At first I couldn't remember what dereferencing a pointer meant but Matt cleared it up for me. Next week we'll start going into structs.

September 12, 2014

This week we started playing with creating nodes. Matt used the analogy of a kid holding a balloon and the balloon being the node. You can create infinite nodes but they have to stem from the first node. Sort of what Liam said like an A1, A2 and so forth. The node is created using a global struct containing members. The members so far have included just a character value. I learned the usage of typedef where it acts as a shortcut for what you're dealing with. When you start a new node you first have to set it equal to NULL but I don't remember why. One concept I'm struggling with how these nodes will apply when dealing with actual data. I think I've got a good handle on how to create new nodes but actually applying them might be difficult. I'll just have to play with it.

September 20, 2014

This week Matt introduced the node0 project to us. Node0 is basically asking us to display the values of certain nodes from the input. Matt also showed us the whole Makefile thing and the new way we're going to be doing our programs now. There's new directories like bin, testing, and lib. Each containing certain important parts of the program. We also talked about the multiple functions that we're going to be making that will allow of to manipulate nodes pretty much how ever we want. For linked lists, there will be functions like insert where you can insert a node before a specified node. Basically giving an overview of the multitude of ways to structure data.

September 28, 2014

This week we were introduced the node1 project and made some code for the insert function. I learned what the free() function does. From the notes I took, it deallocates what it pointed to. I remember understanding the insert function as I was following along with Matt making it. I didn't display the values when we were making it so I could go back now and display them to get a better understanding.

October 6, 2014

From my notes, it looks like we went over the what the sll0 project entails and ran through the steps of debugging sll-debug.c.

To debug (from notes):

Step 1

  • compile with debug support
    • gcc -g -o sll-debug sll-debug.c

Step 2

  • launch the debugger (gdb)
    • gbd./sll-debug
    • (gdb)

Step 3

  • Segfaulting? Find out where:
    • (gdb) run
      • it will display line where segfault occured

Step 4

  • Set break points and analyze
    • break 55
    • run

Step 5

  • Check variable status
    • print tmp2→next→value
    • print tmp→value
    • print tmp2
    • print tmp

Step 6

  • Setup auto display of variables
    • display tmp2→next→value
    • display tmp→value
    • display tmp2→next
    • display tmp2
    • display tmp

Data Communications Journal

August 27th, 2014

Yesterday was the first day and instead of spending the entire time going over the syllabus we jumped right in to learning SDL. We're learning SDL to eventually be able to make a pong game. In the tutorial on Lazy Foo' we started to make a program that displays a hello world. The next lesson in the tutorial had a colourful background to add to the hello world. I'll have to review the tutorial because I didn't entirely understand the second lesson.

August 28th, 2014

Today Matt and I finished up to the fifth lesson from Lazy Foo' on SDL. One of the lessons had us specifically hit the x button to exit out of the window instead of using the delay. We tried to use a gif for one of the lessons and it didn't work because there's other steps involved for using gifs. Might play around and try to make a gif work to better understand SDL. There's still some parts of the lesson I'm not entirely confident in my understanding.

September 4, 2014

Today I almost finished lesson 8 which includes using the arrow keys to move something on the screen. Matt was saying everything up to this lesson is the important stuff needed for creating our pong game. Going through the tutorial started to remind me of the shoveling bob game for the EoCE last year. I think I have a good handle on what's been going on throughout the tutorials with some little things not fully clicking yet.

September 12, 2014

Last class we finally started making the pong game. We started with just moving one white paddle on a black screen. The paddle wasn't moving fast enough so we made it so when we held down the keys the paddle would stop moving when we released the key. Next we made it so if the paddle exited the screen then it would reset or loop around. The next step was to add another paddle and be able to use another set of keys to control it.

September 20, 2014

This week I had gotten the second paddle to come in and accounted for some collision detection between the paddles. I've gotten a ball into the mix but I haven't gotten to move how I want to. Not sure how I'm going to make that happen yet but I think I have a good idea of what's going on in the program so far. Was getting a little confused keeping track of how the collision detection worked so I started to get the ball involved.

September 28, 2014

Matt unveiled the new shiny version of the pong game using a directory tree? Since there's so much to this game, it'll be easier to work through it with using that method. Although, ever since we started working on it this way, I've been struggling to gasp it all. I plan on going in to talk with Matt about it more so I can get a better understanding of the code he gave us. Other than that, I'm enjoying working on the game.

October 6, 2014

Don't exactly remember everything we did last week. I do remember going through the directories with Matt and Connor. Connor was separating sections of the code with comments to make sense of everything.

opus/fall2014/jsylves2/journal.txt · Last modified: 2014/10/07 15:39 by jsylves2