Week 9 - Brushing Up With CodingBat
Java Practice
This entry covers Week 01 of CST 338 Software Design.
This week had us solve functions in Java on CodingBat to brush up on our coding
skills. One notable consideration when approaching these problems is
understanding what they’re asking to begin with. My take was to take a step
back and look at the whole picture.
First, before reading the instructions, I glance down
at the function to make a mental note of the return types and parameters to see
what types I’m working with. Then I look back up at the instructions to see
what the specifications are. The section below the instructions gives great
examples of how the code should work. This section is quite helpful when the
instructions aren’t easily explained with words.
The next step I take is determining the logic required
to turn the inputs into the desired outputs. I generally divide the problem
down into more manageable steps here and I work on one solution at a time. This
is the trial-and-error part of the work where I just tackle it from different angles.
This is also where most of the work is generally done. At the end, I
re-evaluate my code to see if there’s anything that could be minimized or made
more efficient.
Some of these were very simple one-line solutions, but
some of them needed more thought and took a few more tries for simple mistakes
I would make. For the simpler problems jumping straight into the code without
much thought seemed to suffice. But I found that for the more difficult
problems, this approach wasn’t as viable, and I needed more of a strategic
approach. This might be looked down upon, but I did use outside resources as a
crutch when I really needed to. Some of these were very simple but as I
progressed through the content, they got more difficult, and I often had to
look up the Java syntax since I’m not a native Java speaker so-to-speak.
Regardless, I’m sold on the relevance of the language and I’m looking forward
to sharpening my skills.
Comments
Post a Comment