During the past couple of weeks, the material we've been going over is classes, subclasses and inheritances. One of the issues I encounter was understanding how to break down the problems we were given and to turn them into classes. I understood the problem if it was simple like making a Cash Register class but for the class in the lab #1 I had trouble understanding how to break down the problem. What I found that helped after reading over the lab I would highlight what things we need to include into the class. Afterwards I would writing out actions or functions that the class needed to do on a piece of paper to understand how many functions I would need. The last thing I would then do is take each function and write a method out of it. Through this process I was able to understand how to write classes. I'll continue to use this process in the future weeks and reflect on the results.
Saturday, 31 January 2015
S1: First Impressions
For today, I'll be sharing my first impressions for the first couples weeks of CSC148. In the course, a lot of students have experience in coding in high school so I was worried about getting caught up in material since I didn't take any computer science courses in high school. I did take CSC108 but I still wasn't confident with my skills so I was happy to hear that they would have a computer science Ramp-Up lectures for students who hadn't coded in awhile or hadn't taken CSC108. The lecture did help a lot cause I could review material I had forgotten about but what helped me the most understand previous materials is going to the CSC help centre in the BA building since I could receive more of a one-to-one session with problems I encounter.
Thursday, 22 January 2015
Why Geeks Should Write...
A common perception of computer programmers is that they're
tech savvy, and intelligent in fields such as computer science and mathematics
but many perceive writing as not as important for computer programmers and I
admit myself that I used to think that too. Writing is one of the last things
you would think of when it comes to computer programmers since for most people,
they believe all programmers do is type code, but writing code is a language
and like any language in order to master it you need to practice writing. In
order for readers to understand the language, it must be written in a way for
others to understand. For coding, there are various ways to write a code for a
function just like there are various ways to write a response to a topic. What
separates a bad code and a good code is how well the ideas are understood and
communicated to the reader. A blog I read last night that I really enjoyed is
the following:
It really emphasized the importance of writing and its role
in being able to communicate to readers. My favourite part is the blogger's
advice to students just like us and how writing is a very big part of computer
programming and even for businesses seeking to hire being an excellent writer
is a qualification that's sought after.
Now by practicing
writing, you may be able to identify ways in which you can improve your coding and
give yourself ideas that will help the readers understand your code but also
help you to identify codes in which you could simplify for readers to
understand which in turn will help your codes overall. I noticed for myself
when I was tasked with a problem and I attempted it without thinking through
the problem and writing out my steps it was very difficult to get a code that
would work well and I'd end up with an unnecessary complex code with errors for
many cases. Instead if I wrote out my steps and planned what I was going to
write, it helped me to organize my thoughts and produce a simpler code that
worked and was easy for others to understand. For example, one of the problems
I encounter was to write a code that returned the total number of a specific
letter in a word. At first I found it difficult because I wasn't sure how to
start off the code but what I did was write out step by step what the code
should do. I first wrote that I needed to identify the letter in the word, then
count how many there are and proceed to return that number. By doing this, it
helped me to break down the problems into parts which would then help me understand
how to solve the function better. The
best part was that it took half the time it would take me if I had tackled the
problem head on.
I was actually
reading through this other blog and something I found really interesting that
the blogger Mark Dalrymple did was when debugging he kept a notebook where he
had jotted down important things he noticed such as errors. Here's a picture of
some of the notes he took:
http://www.bignerdranch.com/img/blog/voices-aolserver.png
(January 21,2015)
By writing these out, it helped him in his problem solving
and the debugging problems he encountered. I believe this is an idea I will
start to incorporate into my work.
If you guys want a further read his blog is the following link:
http://www.bignerdranch.com/blog/adventures-in-debugging-keeping-a-log/
The main point
I'm trying to convey is that for coding, it's important that you are able to
express yourself in a way that's easy to understand for programmer or people
who are seeing your code for the first time which is why writing is such an
important factor that goes into coding. I hope my advice and the experiences
I've shared will help you out as well.
Subscribe to:
Posts (Atom)
.png)