Thursday, May 16, 2013

WOOOOOOOOT!



      Even though it’s a little sad that this will be the last official Computer Programming blog post for the 2012-2013 school year, I can’t say that the occasion is all that sad. For the reasons mentioned in previous posts, I can’t say how thankful I am to be writing this blog post (and still be in one piece; emotionally speaking that is). This year has been a very interesting experience. Although the majority of it has been spent trying to acclimate to different computer languages (both real and preparatory) the first two six weeks were completely different. Thriving in our Digital World was both basic and void of anything programming related. At the same time, looking back after almost six months of labs, quizzes, and project, the first twelve weeks don’t seem that bad. I did learn some things just not anything really related to software development.
After that “nightmare” (for some) ended, the class began to explore other preparatory programs like Scratch, Jeroo, Finches, Code Academy and Google Script (am i missing something?). While I can’t honestly say I’ve enjoyed any one of these units more than the other, some were more useful. I definitely could imagine the usefulness behind Google Script. The ability to manipulate emails, spreadsheets and documents has so much potential. Unfortunately, the understanding is very fundamental to the concept of computer languages. Essentially, that is what languages and scripts are for. Yet herein lies the problem. For some reason, I’m just terrible at figuring out how to do the tasks given the parameters of the language even when they are listed step by step as they are in the labs. It seems like that has been the running problem regardless of what language we worked with. Thinking back though, Scratch was probably the least stressful and most straightforward until the later labs or the ones that called for more complicated patterns. At the same time, it was probably a good (or necessary) transition. While I can’t measure how much better off (in the grand scheme of the course) I am because of those preparatory programs like Scratch and Jeroo, I’d like to imagine that I am better off for it. To continue with this positive theme, I believe this class has been beneficial in other regards as well.
If someone were to sit me down and force me at gunpoint to create a simple program using python, I might have to warn them to expect waterworks before getting to work. And then I imagine being able to figure it out only after an entire day in front of the computer with no lunch or water break. In short, I can’t honestly say I’ve learned or retained many of the languages we’ve explored this year. But I got other things out of the class like, the satisfaction that I’ve made it despite numerous emotional breakdowns and difficulties. In a sense, I’m a survivor! I lasted to the end and learned a thing or two about how this brain works. This class was a humbling experience as well as one that allowed me to gain new appreciation for classmates. I couldn’t have done any of those labs without the help of the people around me. So a thank you shout out to Mr. S for allowing students to interact with other classmates and for keeping an open door policy for students who might not be as quick to get the concepts as others.
I also appreciate the people behind Google (thanks Mr. T for letting us explore Google) and general web development  a lot more than I used to because now that I know my mind wasn’t geared for that and that I would never be able to do what they do. Thank goodness for job specialization in industrialized countries!
It’s funny because nowadays whenever I see something even remotely like a computer language (when errors are displayed on web pages), I internally freeze and try to get away from the webpage as quickly as possible. Despite all the bad feelings that I’ve mentioned so far, I’m glad this experience has happened to me in high school.  The chance to explore a course that isn’t a strong suit is invaluable. Furthermore, even though I can’t prove it, it’s quite possible that this course has altered my thinking patterns- broadened my cognitive horizons if you will. At the same time, thank goodness time-traveling is an impossible feat. There is no way I’m going back to August 2012 to relive this experience. No. Way.

p.s. Thanks Mr. S for the course support and the printer : )

Sunday, April 7, 2013

I think its time to...TURN THAT FROWN UPSIDE DOWN (a light exists at the end of the tunnel!))



Since spring break the class has learned about lists, 2D lists, and data structures in Python.
All about lists-
            Lists are the third most common type of sequences in Python after strings and ranges and it involves the storing of multiple elements as opposed to characters or integer. Elements can be integers or characters. They are like the less specific sequence in this programming language and mutable. Lists are also 0 indexed and use [] to access a given element or that memory location to call the ith element of the list, use the syntax a[i] where a is the variable that stores the sequence and i is the ith element in the sequence. In order to get a number of elements in the list (as opposed to hard coding), python has a len function. Advanced list operations include reverse, remove, index, append, insert and extend
            2D lists are a little different. Although this type of list is not predefined, it can be thought of like a matrix indicated by Rows encoded from left to right top to bottom. Altogether, this list of lists creates a data structure which allows the user to use math-like notation. One thing to note however, is the importance of order in which loops are written and the values assigned to the variables. Along the same lines, one can also work with text files in python. With special notation, one can write and read files in and to python.
Other data structures:
After experimenting with lists, the class moved on to work with dictionaries and tuples for the final unit in this course. Dictionaries in this programming language create associations between key and value like a mini variable of sorts. Although one can accomplish a similar task using lists, one is not restricted by having to use integer indexes when accessing the desired elements. Dictionaries are denoted by {} and [key] is used instead of [index]. One key difference between dictionaries and lists is the fact that dictionaries are unordered. Key are specified and do not depend on any explicit ordering. So, when should one use dictionaries? When one wants to store relational data as opposed to ordered data.
Good Riddance? Not entirely:
Okay, I admit it, I’m inwardly jumping up and down like a treat-obsessed dog at the prospect of washing my hands of python. But to be fair, I think I did learn a lot, if not about python then at least about my personal strengths and weaknesses. I’m not touching computer programming in college if I can help it. At least that’s the plan. After nearly six months of programming computer languages or dealing with conceptual programs meant to prepare you for the real deal, I have to say that I do appreciate the experience. Although the learning process was rather stressful and emotional at times (and I imagine will continue to be for the remainder of the year), I don’t doubt that the concepts we’ve learned in this class and the problem-solving skills have stretched my brain in some way.

Thursday, March 7, 2013

Darwin, I'm afraid we need to talk



Its nose is multicolored. Its body is gray. No, it’s not a duck. It’s a finch! The Finch unit was a really good break from python unit after python unit. Groups got to make the mechanical stingray looking thing with wheels ‘bird’ do tricks! Sure, the thing was a sophisticated Japanese robot by any means; it was still fun trying to make it turn around, restarting it when its nose stopped flashing rainbows and seeing how code translated into action. In short, finches are a great supplementary tool. I guess the correct analogy would be jeroo is to scratch as finches are to python. Well, sort of.  As far as difficulty goes, I think finch coding is a little bit easier than python. I especially enjoyed the group component to this unit. Officially working together with a partner is much less anxiety-inducing than independent work.  Unfortunately the unit ended much too early with the introduction of yet another python unit.
On the bright side, at least the past several labs have all included strings. In other words, this last python unit wasn’t completely brand new. Although I can’t say I’ve mastered what the class has covered so far about strings (such as the concept of adding strings together to form some sort of message such as in lab 07a), I don’t feel entirely incapable. From this week’s labs I’ve noticed that I have yet to fully understand how variables, input arguments, parameters and functions work together as a cohesive unit. I get some parts like redefining variables but if you were to ask me about how a parameter differs from an argument, well, I’m not sure you would get a satisfactory answer. In any case, at least the last two parts of lab seven were much less flustering. Did I mention how happy I am to be in this class as opposed to the AP class?
If I were a model student, I would be planning to study python during the break. Unfortunately, the senioritis bug has bit me and now i've got a pretty ugly rash spreading across my motivation. However, I’m not going to lie. I certainly don’t plan on studying python until my brain turns to mush and all my hair falls out. I think I’m going to take it easy but still try to retain some of what we’ve learned so I don’t come back feeling completely lost in the new unit. Aside from python, chilling sounds nice. So does going to Houston to visit my college and eating authentic Chinese food. Two whoops for the break! Hope yours is fantastic as well. 

Friday, February 22, 2013

General Thoughts

Most people see computer programming as a science, an area involving analysis, logic and theories. While i don't disagree with that at all, I also think that the area can be described in other metaphorical terms. One can liken computer programming to an easel, Python to a canvas and the human developer to the artist. In summary, its another dimension for the left-brainers to play god in. Unfortunately, this whole Bruce Almighty thing isn't working out or me. I find myself forgetting fundamental "rules" like how to call a value that was previously returned. I also find myself forgetting obvious things when code errors pop up. My only consolation? Ain't touching this world in college! But i digress. As the six weeks is coming to an end, there are some things that i really enjoy about the class (unfortunately, its not the content). The grading policy's great! Not in the sense that students can score relatively well without a complete grasp on the content, although that does make me smile, but in the sense that there is less stress about it. The class is great as far as an introductory course goes and the grading policy is more lenient on those who are beginners. Plus, students in the class are all at different levels and assignments are set up so that students are less competitive with each other. Its a nice break from the typical LASA class. My only hope as of now is that by the end of this semester, i will have developed better problem solving skills which can be applied in other areas that i'm naturally stronger in.

Friday, February 15, 2013

Good things

    I'll admit it, i'm no natural at Computer Programming, programming languages or anything tech related. But lets not dwell on the negatives. Despite having a hard time getting the first function of project two down, i did it! Yes i had some help but hey, i think i'm finally getting the hang of things (as in how things are supposed to work, what the function of the main function is and the component element of functions). On the bright side, i learned a very good problem solving tactic from both Kailey and Averi. In short, if you're stuck, don't dwell on it, move one and do the things that you can do and then come back to the hard stuff. I thought this was an excellent approach to the lab. Allow me to explain. Both Kailey and Averi thought that the second function was difficult after they had completed the first. Thus, they skipped to the third function, maximizing their productivity without getting all caught up on the second function. How does this tactic apply to me, you ask? Instead of getting all hung up on the seemingly impossibility of the second function (i guess i am being a little melodramatic) i moved on to the main function and practically finished that one! This leaves an entire day devoted to figuring out how to graph the function! Realistically, will i still need help from my best buds and the teach? Almost without a doubt. But am i getting something out of the class? Yes, one hundred times over yes.

Saturday, February 9, 2013

Troubleshooting

Highlights from this week:
-Decision control in python relies on Boolean logic anything not false (zeros (0,0.0) empty sequences, false sequences and nothings) are true.
- learned about conditionals (there are three; and,or,if with the if statement being the most common) which checks whether or not a statement is true as a condition for running. Just like in jeroo, if statements that contain elif statements offer the user more control over the code.
-comparison operators such as <,>,=<,>=,==,=! also evaluate true or false
-nested conditionals are confusing to read. Python allows the user to simplify by using comparison operators
-while loops may be used to repeat certain sections of code until a defined condition is met
                   
          ex. a=0
         while a<5
          means that this loop will continue to run until a is equal to five.
-for loops are a lot like while loops but they are preferrable to while loops when it comes to listing things
          ex. for variable in range (1,50) will assign the numbers 1-49 to variable

Lab:
-Finished with lots of help. Realized that one of my problems was not reading the pre-lab or the lab thoroughly enough to understand the task which, as you can imagine, doesn't help. I need to slow down. Thank goodness Mr. Tessler was willing to help me...Hopefully i can start to do more of the lab on my own next week. Mini-goal for 2/11-2/16, SET!


Sunday, February 3, 2013

GRHHHH

      The most difficult part about this first project is solving the syntactical errors. I guess this week was the first time i realized how intricate coding is. One letter off or one space too many can lead to dysfunctional line of code. Although this isn't a new discovery, working on the project this week allowed me to see how much like binary general coding is. You either have the code right to a tee or not at all-- there's no middle ground. However, not to be a debbie downer, there are a few things i think i can learn from this week's assignment. For one, I'm not very detail oriented. Otherwise, a common error for me wouldn't be a missing colon at the end of a function definition. For two, I'm not that great at computer programming. Even though it was the first project every in which students had to write from scratch, i needed a lot of help besides consultation from previous labs and power points. I don't know what i would do without the people around me but i'm thankful that they were so willing to help. I wonder what the likelihood of me being able to help them out is....

Saturday, January 26, 2013

And everything ends in a question mark

  I feel rather fortunate for being able to work on the project before its officially assigned. However, this good feeling is often overshadowed by my newfound realization of my understanding of the language. Although the project was introduced as a tool which would help quiz averages, i have found the project to be an assessment tool of sorts. In short, the results aren't pretty. According to my lack of progress within the hour i got to work on the project, it seems that i need to strengthen my understanding of coding syntax, the use of output/input variables (as well as arguments) and etc. The list is quite daunting and aside from looking over previous labs and slides, i dont know how to improve.
    The task as hand is surprising at best and undeniably intimidating. The comprehensive nature of the assignment definitely amps up the difficulty. In the project, students are expected to "to help an angry bird choose its trajectory so it can hit a pig located at a certain distance d and at a certain elevation h from the bird's position." Unfortunately, or fortunately, however you see it, in this first hour alone i've made some discoveries.I don't read very thoroughly. Instead of reading and understanding the hint,i tried to find velocity on my own. sigh. Its times like these that I feel like a genius.

Sunday, January 20, 2013

How to Function

Functions in python are similar to functions in Jeroo. They are defined by the word def followed by the name and then the arguments
ex. def myster(a,b):
Anything included in the function must be written after the definition and indented and when functions are to be used, they need to be called and the call needs to follow the same indention as the definition. Arguments within the call must also be written out
ex myster(a,b)
Regardless of how you define a variable before a function, variables are bound at the call site. In other words, previous variables are forgotten. In the words of the powerpoint "Variables used in functions but defined outside of the function can be changed"

So why you functions or what can you do with functions?
1. they can make code easier
2.they can be used to define local variables (a. a new variable altogether or b. redefining a variable previously defined outside of the function to substitute its value)* these variables are then bound or set within the function
3.define new functions (act as a stepping stone for another function. similar to nesting?)

Lab issues:
So, this week's lab. I gotta say, it wasn't the most straightforward to say the least but i think next time i should open two skeleton documents, get rid of all the notes in one and work on that in order to mitigate any confusion that comes from the text....hopefully the i can focus better on the task. In general, although i feel like i understand functions, i still need to practice more so that defining variables will become more like second nature...maybe tomorrow...maybe : )

Saturday, January 12, 2013

s is for snake?

Nope, no reptiles or creepy crawley snakes to report this week. Just Python, another computer language that looks almost like a natural language.

Recap:
Just as in in Jeroo, code in python consists of functions (ie. print), statements ( print("argument")), loops, and conditionals. Anything enclosed in "" are called strings. Numbers in this language can be categorized as integers or floating and are expressions. As far as variables go and completing tasks, Jeroo is actually very similar to python, at least on the conceptual level. Some differences i really took note of during the lecture is that when assigning variables and so on, the right side is evaluated first and then stored as the variable toward the left of the equal sign. Though i don't know whether or not this is an important deal, it nonetheless was a linguistic nuance that stuck for some odd reason. Furthermore, apparently the tutorial also suggests that one not ought to confuse the equal sign as something which equivocates both sides of the statement. Am i slightly confuzzled. Why yes. Fortunately, i now have python on my computer which means i can practice...because, as the old saying goes, practice makes perfect.

Some basic numerical operations to remember:
OperationSymbolExample
Power (exponentiation)**5 ** 2 == 25
Multiplication*2 * 3 == 6
Division/14 / 3 == 4.666666666666667
Integer Division//14 // 3 == 4
Remainder (modulo)%14 % 3 == 2
Addition+1 + 2 == 3
Subtraction-4 - 3 == 1

chapter 1 of "Non-Programmer's Tutorial for Python 3," down. Next up....break time. : )