This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
blog:fall2015:nrossi3:start [2015/09/21 22:35] – [Tuesday September 25, 2015] nrossi3 | blog:fall2015:nrossi3:start [2015/12/07 16:32] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | <WRAP centeralign round box> | + | {{page>title& |
- | < | + | {{page>intro& |
- | </WRAP> | + | {{page>journal& |
- | ====== Introduction: ====== | + | {{page> |
+ | {{page> | ||
- | + | ~~NOCACHE~~ | |
- | My name is Nicholas Rossi. I am in the Computer Information Science program. I decided to choose this field because I always felt I was good with computer and I had also taken a programming class in high school that included BASIC and C++ and I really enjoyed it. My first semester at CCC I discovered I had much more to learn. I plan on finishing my 4 semesters at Corning then transferring to Binghamton University. | + | |
- | + | ||
- | + | ||
- | + | ||
- | ==== Tuesday August 25, 2015 ==== | + | |
- | + | ||
- | Today was the first day of class. We talked about the Lab46 website [[http:// | + | |
- | + | ||
- | This list must have:\\ | + | |
- | Display\\ | + | |
- | Insert\\ | + | |
- | Append\\ | + | |
- | Obtain\\ | + | |
- | Clear\\ | + | |
- | and Quit\\ | + | |
- | + | ||
- | Matt showed that the end of the list always needed to point to null for example\\ | + | |
- | MyList -> (3) -> (1) -> NULL\\ | + | |
- | + | ||
- | He also talked about doubly linked lists and Temporary (Tmp) pointers\\ | + | |
- | \\ | + | |
- | ==== Thursday August 27, 2015 ==== | + | |
- | + | ||
- | Today we went over some more pointers having do do with the grid-line of memory. We also covered some C which I desperately needed. Starting today I was vigorously going through the c book and programming as much as I could to try and get back into the rhythm of things. Unfortunately it takes longer than 2 weeks to relearn C. Totally should have attended Matt's lab. | + | |
- | + | ||
- | ==== Tuesday September 1, 2015 ==== | + | |
- | + | ||
- | Today coming into the class we had computers!! Some were still having problems but none the less were somewhat functional. Coming into a Linux system for the first time was interesting. Its something I really enjoyed, a nice change from Windows. Firstly we logged onto the system then used " | + | |
- | + | ||
- | ==== Thursday September 3, 2015 ==== | + | |
- | + | ||
- | Today we covered nodes which started with this crazy thing\\ | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | Crazy right? That could be a node we use. we also covered a list of the things we could have to make in here which includes: | + | |
- | create\\ copy\\ clear\\ insert\\ append\\ obtain\\ setpos\\ getpos\\ find()\\ swap()\\ sort()\\ compare()\\ empty()\\ RMlist\\ display f\\ and displayb\\ | + | |
- | + | ||
- | We talked about how lists are inserted into nodes and how to point pointers at certain nodes without losing other ones. | + | |
- | + | ||
- | ==== Tuesday September 8, 2015 ==== | + | |
- | + | ||
- | Today You could say was a bad day but it wasn't in my eyes. I rode my 1991 Harley-Davidson Sportster up to the college but unfortunately I had gotten a flat front tire on Denison parkway. I pull up to Chemung st. at the bottom of the hill and I'm calling people trying to figure out what to do. This nice man came and helped me. We used his compressor but it didn't work. Eventually he took me up to the college and I made it to class. In the 30 minutes I missed, Matt talked about the next project. I'll have to read up on it later. He then began to show us the de-bugger, and incredible tool fixing program problems. we used " | + | |
- | + | ||
- | There are 3 types of errors:\\ | + | |
- | 1. Syntax\\ | + | |
- | 2. Logic\\ | + | |
- | 3. Runtime\\ | + | |
- | + | ||
- | runtime errors are caused my things such as divided by zero and can also be caused by segmentation faults. | + | |
- | Segmentation faults - Accessing memory that you didn't allocate. | + | |
- | Matt likes to state this roughly as, " | + | |
- | + | ||
- | For syntax errors use the compiler to fix the problem\\ | + | |
- | Use the debugger for Logic and Runtime errors.\\ | + | |
- | + | ||
- | To start debugging start compiling with the following: gcc -o {name} {name of program.c} -g\\ | + | |
- | Then to run the De-Bugger type: gdb .//name// | + | |
- | + | ||
- | By typing help you get most of the commands but here are a few simple ones:\\ | + | |
- | List - lists the source code 10 lines at a time\\ | + | |
- | {enter key} - repeats last command\\ | + | |
- | List {Line Number} - Lists the code for that line number as well as a few lines above and below the code.\\ | + | |
- | step - runs one line\\ | + | |
- | display {variable}\\ | + | |
- | continue - resumes execution until break or program failure.\\ | + | |
- | print array - prints address of array | + | |
- | print&i - prints address of i | + | |
- | + | ||
- | *As for the result of my bike, I took it over to GoodYear with no success. I waited there in the parking lot for 1.5 hrs until my buddy picked me up with his trailer. We took it to the Corning Harley Davidson shop and they replaced the tube. I was at the Harley shop for 1.5 hours. I didn't get home until 5 and hadn't eaten anything since then. Despite that, It was still a good day. | + | |
- | + | ||
- | ==== Thursday September 10, 2015 ==== | + | |
- | + | ||
- | Today we went over more of the functions that the debugger can perform. The debugger is mainly used to backtrace an issue (normally a logic or runtime error) to find the point in which it breaks. | + | |
- | + | ||
- | Some controls are as follows: | + | |
- | print - Prints out the line from your program that you are currently on\\ | + | |
- | step - only executes one line, follows to next instruction\\ | + | |
- | next - skips over function\\ | + | |
- | continue - goes until next break point\\ | + | |
- | set var {variable} = {Number}\\ | + | |
- | + | ||
- | ==== Tuesday September 15, 2015 ==== | + | |
- | + | ||
- | Today we went over quite a bit in class so i'm going to start with this crazy picture: | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | These are the 2 ways you could move values to place another number in the node marked for 10. We talked wuite a bit about different levels of programming based on the results of dsi0 (unfortunately the program i didn't finish due to extreme lack of c knowledge). He categorized these different programs into 5 categories starting with -1 being the messiest and ending with 3 the cleanest. It really helped me learn more C and I would absolutely sit it on his C class to get more experience but with it being at 2:30ish and me getting a job real soon it doesn' | + | |
- | + | ||
- | Some extra C knowledge: | + | |
- | break; - Breaks out of a loop | + | |
- | + | ||
- | The cleanest version of his array looked as follows: | + | |
- | + | ||
- | for( i = 19; i = pos; i-- ) // make room\\ | + | |
- | array[ i ] = array[ i-1 ];\\ | + | |
- | array[ pos ] = input // | + | |
- | + | ||
- | Sln1:\\ | + | |
- | + | ||
- | make -c / | + | |
- | / | + | |
- | ... updates | + | |
- | + | ||
- | note: I really should try harder to start coding earlier. Problem is all my stuff is due on Wednesdays. data project, Physics lab, Physics Homework, all due Wednesday. I try to relax on Thursday and Friday then my weekend becomes super busy and i'm screwed on Monday... Hmmm I'll have to work on that. | + | |
- | + | ||
- | ==== Thursday September 17, 2015 ==== | + | |
- | + | ||
- | Today we went through the sln1 file we created on Tuesday. this included going through node, unit, and others (Node is located in sln1/ | + | |
- | + | ||
- | Sln1 contains these 6 mini programs: | + | |
- | 1. mknode()\\ | + | |
- | 2. cpnode()\\ | + | |
- | 3. rmnode()\\ | + | |
- | 4. node-app-arrtolist.c\\ | + | |
- | 5. node-app-display.c\\ | + | |
- | 6. node-app-display2.c\\ | + | |