Sunday, May 19, 2013

This Year



                I have been tasked, now, with looking back on this long year of Computer Programming and reflecting on successes, failures, likes and dislikes.  It has been an odd twilight, a slow rush.  But in the beginning, there were only words- five words.  And those words were “Thriving in Our Digital World”.
                From the university, they promised, and it was apparent from the start that it hailed from downtown indeed.  No rest; no mercy; only the relentless explanation of how to use Facebook.  A search for clues, an elementary-school assignment wrapped in a current-issues shell.  But let us not deny that it was entertaining, that first project, back when we could find words to describe our hatred and, too, words that still expressed our praise.
                The second project.  It is hard to remember, now.  Photoshop, I believe; an ad campaign with another downwards silly cartoon introduction.  Yet that too we endured with pride.  Perhaps we were taught nothing, but we remained active.  Perhaps we were not delving deep, but neither were we still on the surface.
                We returned to the surface with Scratch.
                There was something else in between, I suspect; a stop on our ascent to the void.  But its horror, memory-wiping as it may have been, was nothing compared to the meowing black hole that was Scratch.  The true terror was that we were only slightly above where we usually burrow, in other classes.  The true bone-numb was the realization how little we could learn, if the deepest pits were so close to the surface.
                We returned to the surface with Scratch; and for all that it was new, it was not different.  It was not fast.  It was not hard.  It was only a cat.  There are benefits to an off period; but this was not an off period, for work continued, albeit mindless work.

                Jeroo was an explosion of light by comparison, though the class never fully recovered from Scratch.  We lived; we breathed the air of hope, though the grains of Jeroo soil intermingled with those of Scratch.  The programming units were designed as a slow ramp, to sail off at maze’s end.  At least Jeroo was short.  Besides, with Jeroo we began the long descent into that which is called Computer Programming; and for that alone we should be grateful to the leapers.
                So Winter Break; so full Python.   We slithered under the legbeat of the Jeroo and the clawscreech of the Scratchcat.  Let us not deny that we moved slowly; but let us not forget that we moved in the right direction.  New knowledge.  New knowledge of programming.  The banner of divine university torn in pieces on cooling magma, drowned and burned as one.
                From functions to lists to dictionaries we slithered, ever watching from squamate eyes the greater name.  Thriving in Our Digital World?  Who even came up with this?  A constrictor, that was the greater metaphor.
                But momentum regained could be lost again.  And there were only so many tunnels to dig in our domain.  We moved on to Javascript, to Code in the Browser, a simple exercise in altered syntax; and from there we flew into GoogleAppsScript.  GAS was terrible, a shadow beyond description.  It flew over the forest, denouncing all that was real.  Yes, it was learning; but it was also confirmation that not all programming was enjoyable or good.  Scratch was at least nothing; GAS was worse.  Fortunately, kindness spared me the full impact, and even as senioritis took full grip I retreated to the serpent- though all forward motion had been dissipated by the cloud.
                So let us summarize.
                If a five is perfect, and a one is abysmal, the phone number of the year was 332-34314.  Not a dream; not a nightmare.  Merely life.
                Merely logic (and the Internet).
                Let us wade through the waters of dusk.  Death to the slig!  This is ended.  Slow, at times; but I was only accidentally here, and my mind only partly.  Painful, at times; but in pain lies some strength.  Overall, a positive impression, but the margin was slim.

Thursday, March 7, 2013

Late Feb and Early Mar 2013



We’re switching to a slower format of blog posts: one per three weeks, rather than one a week.  That should make it easier to come up with enough material to write about.
Our topic has slid into the Finch robots last week.  The Finches are round, wheeled vehicles that look like they were made by Apple.  One can program them using Python.  In our case, the Finches’ utility was severely hurt by the fact that they kept getting stuck and slipping on the floor.  So the first program we put into the Finches, though theoretically perfect, was in practice useless.  I was absent for the second.
In addition, the Finches used Python, but were not programmed via IDLE- one had to use a separate interface, JES.  The result was almost a shorter repeat of the Jeroo unit in how disconnected our work was from the general Python course.  Also, we worked with partners, which- though useful- was also fiddly.  In sum, the Finches didn’t work particularly well.
The Finches were last week; this week belonged to strings.  Strings are a type of variable, basically a list of characters.  If a string variable is named, for instance, “hippo”, then hippo[x] will retrieve the character directly after the xth character in the “hippo” string.  (Thus, hippo[0] indicates the first letter of hippo.)  The other particularly useful command is “for x in hippo”.  This runs through a function of x for every x that is a character in hippo.
Strings are, in a sense, immutable.  There is no way to change a string, one character at a time, except by saying something like “hippo = hippo.Replace(1,a)”.  I haven’t actually used this function, but apparently it exists; and the fact that one can do stuff like simulating a Caesar code shows that, really, strings are just a bit trickier to change, not completely immutable.  In most cases.  I have no doubt that some part of the restriction on string alterations has, in the past, caused advanced students to curse the day Python was invented.

Monday, February 18, 2013

11-17 February 2013


Python continues.  This week was review- the first day of class was a set of labs that was exclusively review-focused, the second a review project.  We re-focused on “if”s, “for”s and “while”s.

The exercises continued to be random, creating a break from the heat index-focused exercises of the start of Python.  The lab was a collection of random stuff.  The project was more focused; it created an exponential population growth simulator, including graphics.  I have not finished the project; it appears we will, however, have two of three days next week to work on it.  (The problem is with the graphics- those keep failing.  I’m not sure why, as graphics is the part of Python that makes the least intuitive sense to me by far.)

Beyond that, there isn’t much to report.  We’re staying the course, albeit certainly speeding up some.  (Speeding up is common to many classes; the reason is usually that teachers expect the students to remember everything they’ve learned as well as on the day they learned it, which is true near the beginning of the year but an exaggeration towards the end.)

Saturday, February 9, 2013

4-10 February 2013


I missed a day in Computer Science/Programming this week due to circumstances outside my control, making this a one-day week.  Still, it was as productive as any other week- that is, I did the assignment.

The assignment had to do with some rather random tests on numbers- a test of divisibility by 3, a test of divisibility by 3 xor 5, and a test of whether the number is 60 (and, if not, whether it’s bigger than 0/50/100).  That is to say, it was a rather odd exercise designed to test our ability to use:

* If statements.  These are the simplest- if a Boolean variable is “true”, certain lines run.  If it’s false, one can use elifs and elses to further divide up the options.

* While loops.  While a certain Boolean variable is “true”, certain lines run over and over again until it becomes “false”.

* For loops.  These allow one to run certain lines that include a variable for given values of that variable.  That is, the lines run a given amount of times, each time with a different value of the basic variable.

Whichever one of these is used, it is vital to include a colon at the end of the line- for instance, “if n==1:”.

Sunday, February 3, 2013

28 January- 3 February 2013


This entire week was spent working on Project One of Python.  It was a synthesis of functions and graphics of the sort we had learned in the preceding weeks; as such, we didn’t actually learn anything new this week.  The project involved creating a program to aid in the launch of projectiles from catapults for a given target and angle by giving the necessary velocity; this was done using a formula for projectile motion.  Then, we graphed the flight path as if it was a straight line.  Finally, there were two extra-credit problems- one involving the determination of whether a fish was ascending, diving, or actually random noise, and the other involving the determination of whether and by how much a car was speeding.

We spent three days on this; for me, and several others, it took 1.5.  I’m not sure if this is due to a disparity in problem-solving speed (though it’d be odd to have such a big gap) or simply because of overcompensation for the possibility of slowness.  In either case, I think the near-absence of homework as a means of making work up is severely hurting this class’s pace.  Which is OK; I’d much rather have a relaxed pace than tons of homework.

Saturday, January 26, 2013

21-27 January 2013


This week in Computer Science, we continued our examination of Python.  In particular, we studied graphics.  We used a graphics library to draw a graph of the temperature and heat index.  Yay.

The phrase which most sums up the week is “from graphics import *”.  I forgot what this line did the first time on a quiz, and later we used it in the lab.  For clarity: this line imports the graphics library and allows one to use its functions, like “import graphics”, but allows one to- later in the program- write “draw.something” instead of “graphics.draw.something”.  I’m not even sure the syntax with “draw” is correct; it’s astounding how quickly one forgets the rules of syntax.

So we’re progressing, though I’m not sure how quickly.  The pace has slowed down to one lab per two class days.  At the very least, though, we’re undoubtedly learning something (Python) that we didn’t know before.

Monday, January 21, 2013

14-20 January 2013


This week, we delved further into Python, despite an interruption from the symphony.  This interruption led to us concluding only one lesson in two days, namely functions.  Functions are the same as Jeroo methods- a few lines of code that are first defined and can later be called on multiple times.  I do not, however, understand the value of- as in our examples- putting everything in functions and then calling the main function once; it seems unnecessarily confusing, even if it does hold some value for error detection.  Still, if it stood the test of time….

I will not go into the mechanics and syntax of how functions work, but I will note that, unlike in Jeroo, functions can be of variables.  That is, a function can have inputs and an output both, as well as doing something in its body whenever called.  The indent of three spaces reappeared, symbolizing organization- an indented line might be part of a function’s definition, etc..  Finally, we “wrote” a program that calculated the heat index and then printed out a string based on its numerical value.

Overall, we seem to be progressing quickly towards the parts of Python with no Jeroo analogues.  That seems like a good thing.