2012-07-29

First Experiences with Programming (Part 2)

I forgot to mention near the end of the previous post that the Korean girl pulled out a yogurt drink from her bag and gave it to me as thanks.

One of the better activities in class involved reading code in a previous student's program on the same ATM machine assignment and debugging it.  It compiled, but that's about it.  Something would go awry with the balance or reading from the text file after saving.  The initial hurdle was of course following the code which I found a little too compact for my liking  (and then the solution was to follow it more carefully).  It was rather easy for me to lose my place even though the blocks were indented...with like one to two spaces.  The program also received some hate for making use of try-catch statements which the course didn't cover yet (actually, this course would never get to that part of the book).  "All these comments are in the way!  Why did this guy do all this just to catch an exception and leave a comment saying to do nothing!  What an awful programmer!"

The professor releases the class early (he's done that several times), but we're free to stay and make use of the computers for the remainder of the regular period.  About five or six students were left.  When the professor isn't lecturing he'll usually walk around and check on people as they're engaged in small exercises that are supposed to take five to ten minutes but end up taking way longer than that.  When he arrives at my computer he starts talking about the student's program he gave us and even makes a correction on mine, something he said he found after spending half an hour on it.  It wasn't enough to fix everything, and now I don't know if I would have been perceptive enough to catch what he found.


When I get home I fire up the program and get to work on formatting the code to my liking (which I would recognize way later as the Allman style as presented in the book's code samples, but I've been experimenting with mixing in 1TBS as of late).  I'm sure I won't have that luxury in the future.  It's another two hours of re-reading before I spot the mistake I had been skimming over.  One misplaced line of code.  I send an email to the professor identifying what I fixed along with a before/after screenshot of the problem area.


We received the assignment on Thursday.  Tuesday rolls around, and I can't remember if the debugging task was ever an official assignment.  Maybe he gave up and turned it into a point of extra credit when no one else in the class showed up with an answer.  You'd think a classroom of mostly CS majors would be more enthused about something like this, but they may have merely been trying out the course just like I was.


The final project we did went over a chapter we skipped previously: the GUI, also called the fun chapter by the professor.  He said we'd get to learn about it if we did well on tests and whatnot.  I think he went over it anyway because there was hardly anything left to fulfill in the curriculum.  The topic was straightforward enough: create a GUI version of the ATM assignment everyone supposedly finished.  The professor came to me after class (I usually stay glued to the computer working on something) and offered an alternative assignment of creating a course grade calculator/manager.  I said I'd give it a try.

I drew some pictures of the interface with notes on the side describing the role of each screen and its components.  Saving/loading classes, adding grading categories and weight (along with an 'X' to remove it), forms of leaving notes for individual assignments or automated warnings for missing grades, and of course a grading calculator.  These were all fine and reasonable given the tools I was aware of, but I erred as soon as I pictured different screens.  I couldn't do it.  The book made use of private fields and methods and I didn't want to resort to using the static keyword with everything.  When I tried searching for something similar to what I was looking for I'd be smacked with new terms described by other new terms.  I was burning time, and after a few days I gave up and went back to the ATM assignment.  Which was a little good, because the people I helped earlier needed help again, and now my interests coincided with theirs.


There's a bit I didn't mention about the Asian guy.  Back when it was about the basic ATM machine program I said I didn't do much other than answer questions since he was busy.  Late assignments were still accepted, however.  We met up and I helped talk him through the project.  He had standards and wouldn't let me type the program for him, but I did type alongside him.  It was around this time that a third student would talk to me after seeing us in the study hall and later ask me for help.  This one will be the Indian guy who sits directly to my right.


I think I have some dates mixed up.  I remember receiving the ATM assignment on a Thursday and it was due a week later.  I wouldn't meet the Asian guy until the following Tuesday and then we'd talk over IRC.  When we got together for the assignment I'm sure it was on a Friday, but also before the assignment was due.  And he still turned it in late.  I think the professor gave an extension on it.


Back to the GUI assignment.  I helped all three and pretty much wrote the program three times, not including my own.  We even met together at one point, all four of us, while I typed out the Asian guy's project and answered questions about what I was doing.  I know he objected to me doing it directly previously, but he followed along very well.  As for the Indian guy, he sends me his small bit of code with new opening windows that don't replace the previous ones and expects me to finish it.  Well, he only asked me.  It wasn't a command or anything.  I didn't feel like I was in a position to turn him down, though.  You just want something that properly executes the functions?  You want a GUI full of static fields and endless pop-ups?  Fine, I'll give you that.  Less thinking for me.  It lands him a 95 anyway, and the professor asks him if he enlisted an upperclassman to do the work.


Not much to say for the Korean girl.  Made a version for her and moved on.  There's actually one more person I helped, and this time I'm the one who approached him.  He sat to my left and struck me as a decent and amiable person.  He seemed more easygoing and learned to do tasks well, but neglected to read portions of the book and didn't appear in class a number of times.  Still, I think it was his quiet nature (though he didn't strike me as a deep introvert) that drew me to him.  That makes the final assignment completed four times over.


Overall, it was excellent practice for spotting different mistakes and thinking up new ways to handle algorithms.  I enjoyed attempting to teach the material and asking them to figure out what to look for based on the compiler error messages.  I warned myself not to get dragged into doing other people's work next time, though.  Also just as important was the wealth of social experience that came with it.  I made a point before in the keyboard cleaning post about eating out sparingly, but there were a few exceptions this spring.

It was strange for each of the three people who approached me to treat me out to lunch.  Aside from the free meal I'd normally skip it was a great opportunity to learn about, well, other people.  The Asian guy talked to me about his previous jobs, his daily routine, and his relationship of several years with his girlfriend and what to look out for.  The Indian guy talked about his concurrent jobs, his dreams, and how I should pick up girls (even as a casual friendship) seeing how I admitted to keeping to myself.  "It's easy, man, just ask her if you want to hang out.  See those two girls I was with earlier?  I don't even know them that well.  We just hang out."  He smiled quite a lot and held an optimistic view.  Also, the Asian guy didn't like him because he asked for math help in the past but didn't seem to care about learning.

The Korean girl went into a brief story of her life starting with the move to the US at 14.  She took ESL classes during high school, and what happened during college is fuzzy to me.  She mentioned cliques during high school (and probably college) comprised of people speaking only Korean, but she wanted to distance herself away from them and understand English better by making friends with pretty much anyone else.  Ah, my memory really is terrible.  I can't remember things people tell me that are important to them.  Why she said she didn't have any friends (or she had at least one?), why she worked for a few years before returning.  What job was it, again?  I was just there to listen.  Should I send a message and ask how she's doing?  I don't really send messages to people I've seen in real life.  I think I'll do it soon, before the fall semester is here.  I think.

Still more to go.  Another time.



Also, just because, I want to put up the original debug assignment.  The main program and the account class to go with it.  Aside from a few things it really is quite nice, I think.  The thought process and all.  I would have liked to meet the person (maybe I can ask the professor about contact).  There should only be two problem sections as far as I recall.  Maybe some extras concerning bad practices.

2012-07-25

First Experiences with Programming

Well, this time it's not so much about the subject as it is about everything that happened alongside it.

I don't remember ever growing up with a dream job in mind.  The most concrete thought I ever had was something to do with raising caterpillars.  I excelled in math, but maybe because I merely enjoyed calculating numbers in my head and finishing tests before everyone else.  Later on (around high school and up) I would harbor no love for it, but that was entering a period where I started to lose interest in everything to do with academics.  Anyway, I grew up with the vague notion that whatever job I'm taking, it'll be something math related.

Computer programming felt like a subject I naturally would have been willing to invest in, but I never had (created) the opportunity to be acquainted with it.  I finally took my first computer science course in the fall semester last year, and I can't say I remember most of it.  There were simple algorithms, a brief introduction to assembly language, a single class session on Python near the very end...and a whole chunk I've forgotten about that came before those.  I'm sure I'll pay dearly for that.  I have the book and study sheet somewhere.


Signed up for the next course under the same professor in the spring this year, and this one was all about Java.  In an attempt to change myself and build up new, good habits I read and answered the first chapter before the semester began.  It was all concepts and stuff; no coding save for one exercise at the very end which only served to make sure the IDE worked.  Of course, I just had to jump into the next chapter following that, and then a very peculiar thing happened: I cared about learning again.  From then on I made sure I stayed at least a whole week ahead of the course schedule (that teetered off near the end when I found more programming projects to occupy myself with).


The class experience was very different this time.  Normally I'd take care to be invisible to others, even neglecting to show up for my senior photo in high school.  I'd be fine sitting in class as a part of the silent majority while a select few answer all the questions.  The silent part held true for the first few class periods when I still lacked the courage to speak up, but there was no one consistently jumping up to answer the questions.  None.  If answers did come out they'd usually be incorrect even though it's right there, clear as day, in the chapter you're supposed to read before coming to class, but I'm a hypocrite to complain about that.  I've always neglected to cover the book, let alone thoroughly, until now.  After the dead silence the professor would sigh with disappointment.

I should describe the professor a little more.  He was a little short, likely in his 50s, and he came with an Indian accent.  I can't call it that bad but those who were vocal with their opinions seemed to think so.  I'd miss a word every once in a while.  He had a good sense of humor and definitely held a deep passion for the subject.  His ability to teach it is another matter, which I can't provide an accurate estimation of as I always treated the class periods as a review session.  I could probably place some judgment if I paid careful attention and tried to imagine myself in the shoes of someone who didn't read the material, but that wasn't a concern at the time.  General consensus from the talkative groups would be that he does, in fact, suck at teaching.  Some of them would admit the book was great, though, but they didn't have the time to read through so many pages.  I guess it is a lot, but the pages aren't densely packed like a few other books I know of.


I eventually speak up to solve some of the problems.  Or attempt to speak up.  Without raising my hand, but that's like a weird thing now since no one else in the class is doing it.  I'm sitting in the back of the room one seat away from the corner, and it's a strange experience to articulate yourself when you normally don't utter more than 50 words a week.  A generous estimate.  I'm sure it's more like zero when there aren't any parents to greet.  Or two to say "excuse me" to that older gentleman while walking through the shopping aisles within the nice and spacious Costco.  It could be more as well if we count whispering fragments of words to yourself.  Probably not suitable practice for speech, though.  Sometimes the professor and I will be holding our own conversations since he doesn't receive the entire message from me. 


Pretty soon I'm regularly answering stuff, but I'll usually wait for the more interesting scenarios because I still don't want to be that deeply involved in talking.  If I raise my hand early and already solved some problems on the main computer before then I'll offer the spot as a last ditch effort to not hog all the fun.  There were certainly other brilliant students in the class (I remember one was a business major), but...it just wasn't their style to take the mantle.  They'd go up from time to time.  Performed wonderfully.

One of the later course assignments was to construct an ATM machine and interact with it through the console.  The professor wrote down on the board features to be included, and it was then that I opened my stupid mouth to ask about a function he mentioned earlier but didn't write down.  So he adds that and it's met with groans from the class.


Interacting directly with my classmates isn't something I would do.  It's a pleasure to talk about something you're interested in, but that only happened when they approached me first.  In light of the trouble I caused I sent an email via some online classroom thing that I wouldn't expect anyone to check, but someone did post a message there earlier.  I offered help explaining the concepts we learned and how it could be applied to the assignment (we weren't allowed to work together). 

I sent the message the same day we received the assignment which was on Thursday (Tue/Thur schedule).  No replies over the weekend, but while wandering the hall about an hour before class on Tuesday someone called out to me.  He had replied to my message half an hour ago and stumbled upon me in person.  We'll call him the Asian guy.  It was a busy week for him so I didn't do much other than answering questions over IRC.

The next person came to me Thursday that week when the assignment was due.  I picked up a new pair of shoes the day before so I'm getting used to the little settings, and on my way to the campus one of the shoelaces become untied.  I'm no shoe tying expert, and being the self-conscious person I am I didn't want to take my time trying to fix it out in the open.  I bend down to quickly tuck them in and walk carefully as to not whip them out and get them dirty.  I proceed inside the building and up two flights of stairs to the floor for teacher offices, then sit on a bench.

As I'm tending to the shoe someone comes out from the hall at the far end.  I think nothing of it; I'm sort of close to the stairwell doors and there's other hallways around me.  That doubt starts to go away as she walks past the doors and slows down in front of me.  I didn't know if she was looking at me but since I'm looking down I could tell her shoes were pointed in my direction.  She speaks up after a short pause.  It sounded like a small struggle for her; the words began with "um..." and her speech was timid.  I don't recall the exact details of the conversation, but basically she asked me for help with the assignment.  And forming words to send back without much planning is bad enough for me.  I end up redoing the shoe tying twice and slowly at that.  The conversation is over and we're waiting on me to finish up.  I'm not doing that bunny ear method or whatever either; I just somehow fail to give equal spacing for the tail ends of the shoelace and one of them will slip out while I'm adjusting the first knot because I apparently can't think and make use of my hands at the same time.

We travel to the library and I take a look at the work of my classmate now known as the Korean girl.  For the record, the Asian guy is Chinese, but...I don't know, it sounds worse to refer to him as the "Chinese guy."  Probably due to old encompassing stereotypes?  Anyway, the assignment covered the chapter on methods which she said she didn't get to fully read.  I try my hand at teaching the material (the IRC episode doesn't count) but there's 45 minutes until class.  I ask her if she wants to turn it in late.  No?  Okay, I'll finish up the program myself.  Nothing fancy.

The professor was really lenient about late penalties, though.  Like a 90 / 100 for something weeks late.  Perhaps it was the collective will of the class?  I'll continue later. 
     

2012-07-19

Dream Journal

I don't know much about dreams; it's on my to-do list for conducting further research.  One day I decided to put the ones from memory down in writing as well as any others I would be fortunate enough to recall as I wake up.

I think I tend to get caught up in imaginations too much.  Daydreaming, escapism, that sort of thing.  Perhaps, then, the experience of a genuine reality within dreams makes it that much more enticing.  Even the ones bordering on nightmares still contain the significant, fascinating element of exploring another world.  The unknown out there is such a strong draw.  Other times the dreams don't reveal much of a setting, and my interest will be directed towards the entertainment value and cause for these visions.

Upon waking there's that lingering altered perception of the world.  Like taking back a piece of the dream with you.  It's...really something.

I don't have a strong command of the English language.  I've yet to reach the level of illustrating what the mind sees.  It feels like a bit of a futile attempt to try and describe what's out there with this limited vocabulary of mine.  Sometimes there's not enough going on, or the majority of the dream revolves around the scenery, or the recollection is broken enough that you're only left with snapshots to follow a general story.  For now I can only hold on to the reminders, and one day I'll be able to create a photograph of the memory.

2012-07-17

Keyboard Cleaning

Took a health course earlier in the summer, and I suppose that made me more conscious about a number of things, again.  Temporarily.  Just like going to the dentist and brushing and flossing afterwards with renewed vigor for about a week.  This course ended nearly a month ago, though, but I typed up a reminder on the sticky note to clean the keyboard which remained there for a few weeks.  I only had vague recollections about dirty hotspots I heard about in the house.  Two days ago I went ahead with the task.

A Toshiba KB-2971 specimen.
I've known this keyboard for as long as I can remember; I don't think any other existed before it in my life.  I also don't remember ever seeing it get cleaned, but the early days are a blur.  In 2006 I stayed exclusively with a laptop but moved back to the PC in early 2011, inheriting some stuff from my father.  I ended up using the keyboard for everything I did, except when playing STGs.  Then I'll hop over to this scissor-switch keyboard:

I should eventually remove the rest of the plastic.

The initial cleaning began with the surface.  Mostly dust that mixed together with some stuff and moisture to form noticeable slightly thick gray strands.  There was also the occasional small splatter of a reddish brown substance on the side of a few keys.  I couldn't reach between the keys very well and eventually decided to pull them all out.  I don't think I've ever seen pictures of the insides of dirty keyboards before, and I'm sure there's a lot worse out there than this, but it was a terrifying sight to behold nonetheless.

Chips and chili?  What the

After viewing it several times the shock value is all but gone.

Since I tend to be self-conscious the second thing I'm going to do is say is that I don't eat chips and dip regularly.  And me, making a careless mess like that?  It couldn't be!  I wouldn't mind having some chips and dip right about now, though.  I think it's been a year or two.  Of course, this doesn't really matter.  Doesn't matter that I weigh 106lb or average one to two meals a day; I still usually eat unhealthy.  Who cares though!  Apparently the only thing that's important to me is leaving the impression that I don't snack a lot anymore.  Skipping whole meals is clearly better.  And not eating out more than a few times a year, but that's another story for later. 

I feel fortunate to be underweight, though.  At least that's one less thing to be depressed over.  And the fear stays with me that since I don't have the will to eat enough the situation could flip around and I won't be able to prevent my overeating.  According to the health book I'm anorexic thanks to this fear (among other things), but hey, I can't really read into self-diagnosis.  Right, so what do we have for cleaning tools?


Not the most adequate.  The Q-tips couldn't travel along the edge very well because of those outcroppings, and I had to withdraw with the wipes plenty of times to keep from accidentally dropping any dirt into the holes.  It would have been nice to do this with the keyboard upside down, or perhaps I could have thought of stuffing something into the holes.  Cleaned each key, cleaned the wire things under some of the keys (and tried not to wipe off too much of the gel thing in there), started on the keyboard surface, took a break, resumed.  Took about two and a half hours not counting the break.  Feels like some rather poor time efficiency.


You can see the plastic protrusions in the upper right catching the light.  That was the first key with a wire going across it that I pulled out (well, levered with the handle of a spoon), and I unfortunately did so in the wrong direction.  Forgive me, keyboard.


I've recently come to realize how much I appreciate this keyboard.  All that sentimental value...I hope I can continue to use it for a while longer.