I find recursive programming to easily be the most confusing topic we have covered so far. In many cases it looks very simple when written out, but is fundamentally more difficult than any other topic that we know. I understand that they all follow the same format; first a base case and then a recursive step. However it took me almost the entire lab to rap my head around the recursive tree questions. They weren't extremely difficult, but it took a lot of trial and error before I could understand it. I realized the trick since each question had practically the same solution but with a different recursive return statement. This excitement quickly died when I tried to begin on assignment two. In the second assignment a Minimax strategy must be implemented which uses recursion. However, I had a hard time understanding how to put the strategy into code. There is no tree class to use yet it follows a very similar format to a tree. I've been googling tutorials and asking friends on how they have implemented their structure but I cant seem to figure out the recursive a part. I understand the base case very well but the recursive step confuses me. I'm sure after more research online and by going over the lecture slides I will understand soon enough.
Edit: So I kept asking myself how to code recursively without a class structure that supports recursion. However, I realized that I don't need such a class. I figured out that creating temporary game states can simulate this effect by running the same code under a changed game state. With this the recursion works perfectly. I'm happy to been able to work this out and once again proved to myself how confusing recursion can be. Aside from that I find the topic to be very interesting because of situations like these. The code that I have written looks so simple, yet there is so much thought put behind me. It boggles my mind what kind of crazy problems you can solve with recursion that is extremely tedious or even impossible with loops. I'm looking to doing more work with this topic. Rock on!
Wednesday, March 4, 2015
Saturday, February 14, 2015
Object Oriented Concepts
Before I start I would just like to say sorry for missing a post last week, I will try my best to continue keeping you guys up to date on my experiences with CSC148.
This weeks topic is object oriented concepts. So the few concepts we have covered so far are stacks, queues, and trees. Personally my favorite concept has been trees. Stacks and queues are pretty conventional and you see them everywhere, however, a tree is slightly more abstract. It is used to represent a hierarchy of importance and it is really interesting to see how that sort of data structure is formed. While a stack and queue can only point to one object at a time, a tree can point to as many as you set its maximum children to. I find the visualization of this object to be very interesting since you get a tree looking representation when you draw all the nodes and pointers the object has.
However, that being said, I have actually learned all of these data structures in the past. The only difference is that I learned how to create a binary tree as opposed to a general tree. This actually made it surprisingly difficult to initially understand the structure that was expected from the tree class. I was taught to use nodes as numbers and that you would organize smaller and equal numbers on the left child and greater numbers on the right child. Anyway, it ended up confusing me until I realized that there was none of that kind of sorting done in our implementation. I felt kind of silly but was glad to see we are doing something slightly different from what I know so far. I'm excited to see what is in store. Rock on!
This weeks topic is object oriented concepts. So the few concepts we have covered so far are stacks, queues, and trees. Personally my favorite concept has been trees. Stacks and queues are pretty conventional and you see them everywhere, however, a tree is slightly more abstract. It is used to represent a hierarchy of importance and it is really interesting to see how that sort of data structure is formed. While a stack and queue can only point to one object at a time, a tree can point to as many as you set its maximum children to. I find the visualization of this object to be very interesting since you get a tree looking representation when you draw all the nodes and pointers the object has.
However, that being said, I have actually learned all of these data structures in the past. The only difference is that I learned how to create a binary tree as opposed to a general tree. This actually made it surprisingly difficult to initially understand the structure that was expected from the tree class. I was taught to use nodes as numbers and that you would organize smaller and equal numbers on the left child and greater numbers on the right child. Anyway, it ended up confusing me until I realized that there was none of that kind of sorting done in our implementation. I felt kind of silly but was glad to see we are doing something slightly different from what I know so far. I'm excited to see what is in store. Rock on!
Sunday, February 1, 2015
My First Few Weeks
My first few weeks of CSC148 have been some what stale. I have a decent background in programming due to my experience with it during high school, and I haven't learned any new information so far. I have really have just been learning syntax for things I already know. The only new thing I have learned so far is the eq/str/rep methods that we now have to implement. Now while all the material has been smooth sailing so far, these methods gave me quite the headache on the first assignment.
So I've never coded methods like these in my life and like any bad student I didn't pay attention in class when talking about it. While these methods are super easy, I completely forgot about them until just a few hours before the submission time. So I spent the next hour and a half or so trying to figure out how to write these mystical methods with every source telling me to do something different. Sure enough, I figured there must be a proper example somewhere on the csc148 webpage. Just like I thought there was a few and they gave me a good idea of what to do. I wasted almost two hours before I finally understood it and fully implemented everything with just an hour remaining on the submission. Need less to say, I'm gonna be on top of understanding the new material from now on.
That's my interesting experience with csc148 so far, join me next week and hit me up in the comments. Rock on!
So I've never coded methods like these in my life and like any bad student I didn't pay attention in class when talking about it. While these methods are super easy, I completely forgot about them until just a few hours before the submission time. So I spent the next hour and a half or so trying to figure out how to write these mystical methods with every source telling me to do something different. Sure enough, I figured there must be a proper example somewhere on the csc148 webpage. Just like I thought there was a few and they gave me a good idea of what to do. I wasted almost two hours before I finally understood it and fully implemented everything with just an hour remaining on the submission. Need less to say, I'm gonna be on top of understanding the new material from now on.
That's my interesting experience with csc148 so far, join me next week and hit me up in the comments. Rock on!
Saturday, January 24, 2015
Why Should Computer Scientists Write?
Week #3
"I hate writing essays" is a pretty common complaint heard by computer scientist students. While I doubt there are many people that actually enjoy writing essays, its especially prevalent in the Non-English departments. This is understandable since the learning styles differ between departments. However, this is no excuse not to practice it.
While the logical skill set we develop through our main courses are more than important for us to have, I would like to address the need to be a little more fluent on our humanitarian skills. You see, being computer scientists is not all about being able to solve complicated problems and write efficient code. Being an effective programmer also requires skills that you cant develop to the same extent through your typical logic based courses. Here is a short list I came up with just off the top of my head:
1. Effectively communicating with co-workers
2. Good word choices in the code and documentation you write
3. Extrapolate important information from client requirements
4. Write professional word documents
5. Be able to present your work confidently and effectively
6. Everyday language skills
Need I say more? While some of these points may sound redundant they are important skills to have. Working on your humanitarian skills is more than useful in your ultimate goal of becoming a great programmer, and while it may be boring, its important. So next time instead of complaining about writing, just write! Rock on
"I hate writing essays" is a pretty common complaint heard by computer scientist students. While I doubt there are many people that actually enjoy writing essays, its especially prevalent in the Non-English departments. This is understandable since the learning styles differ between departments. However, this is no excuse not to practice it.
While the logical skill set we develop through our main courses are more than important for us to have, I would like to address the need to be a little more fluent on our humanitarian skills. You see, being computer scientists is not all about being able to solve complicated problems and write efficient code. Being an effective programmer also requires skills that you cant develop to the same extent through your typical logic based courses. Here is a short list I came up with just off the top of my head:
1. Effectively communicating with co-workers
2. Good word choices in the code and documentation you write
3. Extrapolate important information from client requirements
4. Write professional word documents
5. Be able to present your work confidently and effectively
6. Everyday language skills
Need I say more? While some of these points may sound redundant they are important skills to have. Working on your humanitarian skills is more than useful in your ultimate goal of becoming a great programmer, and while it may be boring, its important. So next time instead of complaining about writing, just write! Rock on
Thursday, January 22, 2015
Hi Welcome To My Blog
Join me for weekly blog posts for my slog. Hit me up in the comments so we can discuss what we learn in csc148. Rock on
Subscribe to:
Posts (Atom)