Wednesday, December 19, 2012

My Kryptonite... programming

Because of my tendency to want to work quickly through problems I never truly commit the amount of time towards working on programs that I need to and I've suffered greatly for that this semester. However, there is hope for me! I have found that whenever I am able to sit down and slowly go over problems I can generally work them out logically. When making up my worksheets this past week (with Kason and Danish) I was able to work out most problems where the code was already written by writing down each step as I went through it. Admittedly I would need some correcting here and there, but with my great mentors I was able to get back on track pretty quickly. So although its too late for me to get back on top of things especially in this class, I have at least been able to see that with the right mindset I can understand code and hopefully be able to eventually actually code in the future. And I'd like to apologize for my lack of zeal in this class and poor work ethic. This is (in my mind) uncharacteristic of me and its a shame that you'll now know me by this lack of effort.

Coding

So I'm not sure if I'll be able to form a question out of this but essentially I have a major issue with coding. I find myself able to generally understand what people are trying to do when they are coding for themselves. However, when I sit in front of the screen ready to type I never know where to even begin. Because of this I find it hard to do most labs and and fill in the space type worksheets. This block has been hard for me to overcome and really I haven't truly gotten there yet (although I guess that wasn't much of a shocker). I know there is a general format to follow such as after you start a class you add the instance variables, the constructor, modifier, accessor, and then the toString method. But I don't always know what explicitly to write. Another thing is I feel that the default and initialization constructors do the exact same thing so why have them both instead of just one? And I feel the modifier is too. So I guess my question could be why do we need those 5 methods I mentioned?

Arrays and Loops

I find arrays fun to work through once you decipher whats going on and the patterns created within them (for 2D arrays). However, I feel that arrays and 2d arrays are essentially the same exact thing except that 2d arrays add rows to the mix and need a tiny bit more code ( i.e. an extra pair of brackets [ ]). So my question is why are arrays taught as a separate class instead of being part of the 2d array lecture, and why do we even need to have arrays when 2d arrays can do the exact same things as far as I can tell.

Also, I find myself having trouble writing loops. I can understand them when I'm reading the code, but starting from scratch I never know where to begin or where its appropriate to use them. When do you want to use a for loop compared to a while or if loop?

References and Parameters

So I'm finally beginning to understand references and parameters... or so I think. And even though I only got a 7 out of 10 on my most recent retake of the quiz I at least was able to fully understand why I missed certain questions. I tend to want to work quickly through problems especially when it comes to math or other logic type subjects, and it is this that I think has been one of my biggest blocks in both understanding references & parameters and computer programming in general. So I've learned that by writing down my steps I can see whats going on which really helps for these kinds of problems. I'm still a bit shaky with aliases but I think I've got those for the most part as well. It can sometimes be hard to tell what is looking where once you start getting into longer codes. I enjoyed the 3 part question though on the quiz since it really does test your ability to keep track of all your variables while you go through the code.

Sunday, September 30, 2012

Week 4 (Sept. 17th-23rd): CodingBat

This week we learned strings which seemed to make sense to me during the presentation, but once we were released to work on the lab I found myself hitting a wall with what to do.  I was able to get individual sentences to work, but never get all of the boxes checked off at once.  Since I started on the ABBA lab, I thought maybe the others would be different and I proceeded to go look at the rest of the labs.  Unfortunately I was wrong and they increased in difficulty as they went along (as one would logically expect them to).  This ate up class time, so I never did get it during class that day.  I mentioned my problem to Kason later in passing, and he suggested that I was thinking too narrow and to try a broader approach.  I ended up getting back on at home to try and figure it out once again, and sure enough my problem was I was trying to specifically make a sentence instead of inputting variables for what I wanted to accomplish.  Once I made my code more generalized, which only took one simple change, I was able to check off all of the boxes and therefore finish that lab.  After figuring this out, the rest of the labs seemed to fall in line quite quickly and I was able to knock out everything else with relative ease.  Being able to figure this out was quite the confidence boost for me in regards to my coding abilities.

Sunday, September 23, 2012

Week 3 (Sept. 10th-16th): Methods


So I'm not quite comfortable with using methods yet, and had quite a difficult time when doing the Task lab.  During this lab I was able to get the first two parts done (course and favorite), but failed to figure out how to do the slightly more complex parts like wasted or count.  I feel like I must have missed out on something big since everyone else seemed to be on board with the lab.  This makes me think that I probably messed up the first parts of the lab as well, but honestly I'm not sure what exactly I'm supposed to be doing to edit these old labs.  So I guess my question would be, either how would I go about doing this lab or a more broad one like when would I want to use a method as supposed to writing out the code like I did in the original labs.  I'm aware drifting off during lecture is a sure way to miss key details which is what I'm afraid I probably did... however that is something I'm working on fixing!

Sunday, September 9, 2012

Week 2 (Sept. 3rd-9th): Input and Variables


So we learned how to use Inputs and Variables this week, and initially I struggled to follow along (being tired didn't help much).  I think my problem was that I tend to focus on what I'll need to type to execute a certain task and why its written the way it is, instead of why I'm typing it and what its designed to accomplish.  After the lecture and example, I was able to go back to the slideshow I get a better grasp of when to use certain commands.  The first day we had to begin working on our programs I spent most of the class working on the "Datable" lab.  But with more help from the power point and a bit from Kason I was able to put together a working program that I was quite proud of.  The next day I was able to use this lab as a template for my other labs.  My proudest moment however was when working on the gallons wasted lab I kept wondering why my program wouldn't work when I would input 7.5 in my program for the drips per minute, when finally after a bit of thinking back to last class I remembered the mention of doubles to get decimals and everything began to make sense.  I know it may seem like an obvious thing to those who are used to programming, but being the beginner I am it was an exciting experience to finally comprehend what I'm doing.