Friday, 3 April 2015

Last Impressions

Last Impressions
    With the course coming to an end, it's time to reflect. I've learned a great deal of new techniques and have become a better computer scientist in the process. However, it still feels like we've been covering basic ideas and I'm really eager to learn more advanced stuff which will play a part in industry related jobs. It's a shame that the strike had to interfere with the tutorials but I guess what can you do. Furthermore the assignments were for the most part challenging and Danny's style of teaching is pleasant. Reviewing for the exam won't be so bad due to the fact that all the resources to do so are available to us. On top of that, the strike having ended allows us to have a lot more help to catch up with what we need help in. I don't know if Danny teaches any more classes of a higher level but if he does, I hope to be in them. It's been a great first year at U of T, and I'm really glad I've chosen computer science as my major.

Wednesday, 25 March 2015

Revisiting CSC148: The Beginning

Revisiting CSC148: The Beginning
    Rereading my CSC148: The Beginning entry, a number of things come to mind. First and foremost I still stand with what I say in that entry. Csc148 has only gotten more and more technical. The rate at which new topics have been introduced in this course is a lot faster as compared to Csc108. Tutorials have been such a great help in terms of picking up new material and it's a shame that the strike had to affect them. The worksheets we've gotten in class are also helpful. The only downside being we don't have as much time working on them as we did for the ones we received in csc108. The tests however are easier to prepare for in csc148 for whatever reason. It may just be due to the fact that we get more exposure to the material and therefore that results in us doing better on the tests. I imagine that will also hold for the final exam. However, I did really like the fact that we could access lectures which would teach us the concepts in csc108. If that were possible in csc148 I would literally have no complaints. Overall, I still prefer csc148 over csc108. From what I've heard from classmates, they've said the assignments are in fact harder and require more work. They've also said that the tutorials are really helpful and tests a tad bit more challenging.

Friday, 20 March 2015

Unit Testing

Unit Testing
    This week we've been mainly focusing on unit testing and debugging. As such I've had some thought provoking questions I'd like to discuss. I'm quite interested into how the industry typically goes about these topics. I've heard of key words like version control which will learn about in CSC207 but besides that my opinion is that there must be some more complex but efficient debugging process. It would get to repetitive with our current system at least in my opinion. Plus with the sheer size of the software which the industry develops, our system wouldn't be able to manage all the interconnected components. That is, to make sure that things dependent on each other would still manage to work if changes are made to the base components. I'm sure we'll probably go further into these topics in CSC207 and CSC209. 

Thursday, 12 March 2015

Lab #8 and Test 2

Lab #8 and Test 2
    This week, we were presented with a further analysis of binary trees in our 8th lab. It consisted of managing an insertion method and a method which would delete the particular instance. In terms of our second test, it went a lot better than I expected. The first question which consisted of tracing trees and determining the maximum and minimum heights of the respective trees in different situations was pretty straightforward. If I recall correctly, the question was based on the fact that binary search trees can have up to and including two children nodes. So therefore the tree variations could include nodes with just one child or two children. The next two questions were very similar to functions we had previously worked on in previous labs. In fact I think the second question differed from the respective lab function by just about a single line of code. Overall, I think I did rather well and am happy at the amount of time I put in to prepare for the test. Furthermore, the fact that we can get more or less a free one percent mark from completing a survey in regards to our test is great. It is also very insightful as it shows us our weak points. 

Friday, 6 March 2015

Linked Lists and A2

Linked Lists and A2
    This week consisted of our linked lists lab and turning in our second assignment. In terms of our assignment, it was probably the hardest so far. Trying to figure out how to make the minimax strategy work as intended was probably the most challenging part of it all. The game itself was pretty straight forward to understand. More or less, everything fell into place once minimax was complete. In regards to the linked lists, they're just another data structure. This time the data structure is representative of a sequence. This sequence connects a bunch of nodes together, one node leading to one other node. Each node points to the next node and each node contains some sort of data. The reason they're so useful, to my understanding is that due to the simplicity of this sequence, nodes can be created and added anywhere in the sequence. Likewise, nodes can be removed at any point in the sequence. I'm curious as to whether or not there would be any benefit to the combination of abstract data types. What I meant by this is say there is a tree data structure. Then each node within that tree has its' data type be some sort of abstract data structure like a linked list for instance. I'm guessing it would only be useful in really specific cases and even then it would probably be more useful and beneficial to design a new abstract data structure. Thinking about it now, each situation can have an abstract data structure customized to be optimally perform its task. 


Friday, 27 February 2015

Abstract Data Types

Abstract Data Types
    Up until this point we've dealt with a number of abstract data types such as stacks, queues, trees and binary trees. The stack is simple enough to follow. You add some number of elements to the stack. Then when you remove them, the first one to be removed is the last one to have been added to the stack. Or essentially last in, first out. As with queues, they run on a first in first out basis. The first element to be added to the queue is the first one to be removed. Comparing the stack with the queue, my thought is that each abstract data type is situational. That is, dependent on the circumstance, one may be more beneficial to use than the other. The tree as I understand is to be thought of as more or less a representation of an upside down tree. Such that each place where a new branch branches off is considered a node. Furthermore, a binary tree is a specific type of tree where each parent node can have up to and including two children nodes. The nodes in a tree then can be their own data type. Again, each data type is better suited to different circumstances. Traversing the trees brings us a whole bunch of options. We have traversals such as preorder, inorder, and postorder. Essentially, how preorder works is it displays the root node's data, traverses the left subtree recursively while displaying the current node's data, and then traverses the right subtree similarly displaying the current node's data. Inorder and postorder are simply just variations of the steps in preorder. In inorder, it traverses the left, displays the data of the root, and then traverses the right. For postorder, it traverses the left, then it traverses the right, and finally it displays the root's data. In the end, these concepts aren't too difficult to understand. 


Thursday, 26 February 2015

Object Oriented Programming

Object Oriented Programming
    The whole concept of object oriented programming I find to be a life saver. Being able to create your own data types not only saves time but also simplifies everything. I can only imagine how horrendous it would be trying to create some huge software just with lists and dictionaries. Having all those variables floating around, not necessarily being connected to each other would become overly confusing. Having techniques such as inheritance possible gets rid of the need of rewriting the same code as seen in our assignments and labs. So far we've done class inheritance with the introduction of subclasses but I'm sure such concepts such as object inheritance will come in handy. In fact, I think it would be widely used rather than creating a new data type each time when you only need to change a few things. Creating a basic "super" object with which you then inherit to create various other sub objects. We can virtually customized any type of data structure to match our needs. This week, learning more about recursion; it really lets us do so much when dealing with abstract data types. For instance when we traverse trees, otherwise we'd have to use so many loops rather than a couple lines of simple code. I'm sure what we've learned about object oriented programming doesn't nearly cover the scope of it's entirety. I haven't had the chance to work with a procedural programming language so I can't compare and contrast the two as I've only worked with Python and Java but I'm sure each has their own benefits. If I were to guess, I'd probably say that the procedural languages are for times where you need to be closer to "computer" language or byte code.

My Thoughts On Recursion


My Thoughts On Recursion

               Tracing recursion has been really interesting to say the least. Essentially compacting a method like that will be very beneficial. Being able to replace having to use all those for loops to get a simple task done makes this a life saver! Of course I can't say grasping the concept has been easy. The fact that we'll have to trace recursive methods on our test is what's worrying me the most out of all the concepts we've learned. However, all these new concepts we've been learning and will learn are what really make this class interesting. I'll just have to put the effort in to get the concept down but in the end it'll be worth it. From my current understanding, we define what a base case returns and by doing so the recursive part of the method always starts with the inner base case of the input. From there it works its way further out of the input until it can no longer do so. At this point it returns the answer. The whole concept I find to be really clever!

CSC148: The Beginning


CSC148: The Beginning

               Having had the privilege to have Professor Heap first semester for my CSC165 course, I've been very excited for CSC148. Compared to CSC108, lectures have been more technical and hands on. I can see why it would be called Introduction to Computer Science as opposed to Computer Programming. The tutorials themselves are really detrimental to gaining a solid understanding of the curriculum. The whole hands on aspect is something that CSC108 lacked. When I was working on assignment one, the techniques I had used in the tutorials directly helped me. Saying such is an understatement! The tutorials were a huge help doing the assignment and gave me a grasp of the fundamental concepts required in the assignment. In regards to recursion, the concept is rather confusing but will probably clear up with more practice. It seems very practical and time saving however so it'll be of much use to learn.  As for the test, I feel pretty prepared as we were taught really well by Professor Heap and our T.A.'s alike! All in all I'm really glad I decided to become a computer scientist and am looking forward to what else the class has to offer.

Why Should Computer Scientists Write?


Why Should Computer Scientists Write?

               In movies, computer scientists are portrayed as these hackers who program all day, have minimal contact with the outside world and are.. well.. geeks. I'm here to say this is a huge misconception. If I were to compare a computer scientist to another field I'd compare it to an artist. Our programming languages and software are our paintbrushes. What we create requires ingenuity, and imagination. It's a form of expressing our ideas, and what better way of sharing ideas than writing? I don't want to say that the perspective I gave at the beginning is completely wrong, because quite frankly it's not. Sure we program a lot but communication is probably the most important thing for a computer scientist. We have to work together create software and expressing our ideas is integral to the software's creation. Hence through writing we get the spread of ideas. We can get our thoughts on paper and begin to formalize our ideas. Writing down how we proceed to solve a certain problem is like how an architect sketches the structure to a building. Getting that game plan down whether it's in pseudo code or words helps serve a great deal. By far, doing this before jumping in and programming saves lots of time which would be spent on figuring out how to integrate all the moving parts. The whole open source concept is based on the spread of ideas and it's very successful. With how we're all connected through the internet, teams of people working on various projects from various locations have to be on the same page. Hence, computer scientists must write to be able to work together. For instance imagine having to find a bug in code that someone else wrote, the only catch being they didn't comment any of their code. Or trying to gain potential investors without having any sort of documentation about your software. It's preposterous just thinking about it. There's no way around writing as a computer scientist. Writing makes computer science better. It's how we learn the concepts, how we teach others the concepts and so on.