Wednesday, October 30, 2013

My github projects

I've been working on some github projects lately.  You should check them out at http://github.com/macsj200.

Sunday, October 27, 2013

Pan-American Stirrings

Good ol' Che

Ernesto "Che" Guevara was a dreamer.  An Argentine medical student turned revolutionary, he saw a better life for the once-great, now-downtrodden indigenous Latin American peoples.  In his politically-tinted autobiography, "The Motorcycle Diaries", Che offers a poignant firsthand account of the plight of his fellow Latin Americans.  Accompanied by a fellow medical student, Alberto Granado, Che traveled through the many countries of South America and was metamorphosed by the things he saw.  "The Motorcycle Diaries" is an account of that journey.

"The Motorcycle Diaries" is an impressively purposed book. Che wrote and published this autobiography to instil Pan-American communist sentiments in his fellow Mestizos.  Che believed the only way to achieve equality was to have a people's revolution; he explains this in "The Motorcycle Diaries".  He wrote this book to promote his ideals and to unite Latin America.  

This book was released during a time of turmoil in Latin America; political ideologies were being formed and implemented faster than the common man could keep up with, so Che published this book as a manifesto for the average Peruvian, Bolivian or Mexican.  Che wrote this using vernacular ("che" is Argentinian slang) language and Latin American idioms.  The fact that the original copy was written in Spanish makes it abundantly obvious that Che wrote this for downtrodden Spanish-speaking Latin Americans.  Che's style is an impressive one; he makes effective use of varied sentence structure and interesting vocabulary to keep the reader engaged, and he often mixes Spanish and English to create more accurate phrases or words.  Che's ability to subtly insert politics into his writings is a skill every political author should wish for.  Throughout the book, Che maintains an inflammatory if not revolutionary tone.  The point of this book was to make the plight of the common Latino abundantly clear, and to stir the reader to revolution. 

Over the last two weeks I read "The Motorcycle Diaries".  Overall, I enjoyed learning about 1950s Latin American culture and Che, but the book read more like a long description of scenery and social milieu than a story.  Therefore, I propose a new rating system: storypoints.

Storypoints are earned when a book effectively engages a reader through snappy dialog, interesting character development, nail-biting action scenes or various other storytelling devices.  A piece of writing that receives 0 storypoints is strictly informative or extremely boring.  Writing with 0 storypoints gets the Lorem Ipsum award (named after the famous boring and meaningless boilerplate text).  A literary creation that receives 10 storypoints earns the Maxwell's Worth Reading Award (shortened to Maxwell's).  A book that gets 20 storypoints is extremely riveting and earns the Harry Potter award.

Che's writings are, inherently, political, but he does not shove his agenda down the reader's throat.  Rather, he peppers his anecdotes with incisive political insights.  Che is ardently anti-establishment; he makes this clear through his bitter reprisals of Spanish conquistadors and the established ruling class.  Che uses carefully selected vocabulary to urge the reader to empathize with the "exploited" and "noble" native and hate the "idiotic" Spaniards that originally conquered Latin America, and the class that descended from them.

Che saw almost everything through a colonial lens.  He believed that all indigenous and mixed-race Latin American peoples were part of a larger "mestizo" class that had been beaten down and subjugated by foreign conquerors.  When describing the average Peruvian, Che regards them as a "once proud" race that was "defeated...by illiterate Spanish conquistadors".  Che makes his opinion of the Spaniards that first came to Latin America abundantly clear through his use of scathing adjectives like "idiotic", "banal", and "unfeeling" and by explicitly condemning them and all repressive authority figures.

"We constitute a single mestizo race, which from Mexico to the Magellan Straits bears notable ethnographic similarities.  And so, in an attempt to rid myself of the weight of small-minded provincialism, I propose a toast to Peru and to a United Latin America."


Alberto and Che in the movie adaptation
Che's anecdotes are interesting, sometimes dangerous and often comical.  Che described speeding through beautiful Latin American scenery with abundant clarity, earning him two storypoints, bringing him to a grand total of two so far.  He did describe a motorcycle crash (a few, actually), which would earn him storypoints except he glosses over the action and focuses more on "the beautiful gravel bend, by a little bubbling stream" that he fell on rather than the fall itself.  Because of the imagery there, I'll grudgingly give him another storypoint I suppose.  Che was an admirable elocutionist, and in his autobiography he offered many rousing speeches to the commoners, so he earns a storypoint there because said speeches are just so moving (see quote above).

Che and Alberto picked up various odd jobs to fund their passage through the South American continent.  During one of these jobs, Che worked for "a very strange person..whom [he] addressed with the utmost respect as Señora".  This "Señora" turned out to be a man.  Two storypoints for laughs.  Che also described how he and Alberto "executed a carefully calculated plan" to steal wine from their employers (another storypoint for attempted humor).

Che had a way of making the reader feel as though they are on his journey with him.  He described his intense hunger, cold and general discomfort in such a way as to make the reader empathize with his discomfort (a not entirely pleasant experience).  On a particularly unpleasant boat ride, he explained "the mosquitoes swarmed around us in clouds, worse than ever, as if taking their revenge on us for the fact that we would soon be out of their reach".  Because of this talent, I'll give him another three storypoints.


Monday, October 21, 2013

Python Intro Part Deux

Salutations!  If you're a returning reader, it's certainly nice to have you back.  If not, welcome!  You may want to look over the first portion of this tutorial.  This second portion will primarily cover Python function definitions.
A "function machine"
Functions are groups of instructions.  An example of a function in Plain English (tm) is "for each given value, double it".  The mathematical equivalent of this phrase is y = 2x.  In programming, we can define functions to do much more than simple math, but function notation in programming is based on mathematical notation so it is useful to reflect on this temporarily.  Now, let's get you defining some functions!

In Python, functions are defined by using the def keyword.  Here's an example of a simple function:
def double(n):
    return n * 2

double(5) returns 10

The above code saves the argument to the variable n and returns (spits out) n doubled.  So calling double(10) would spit out 20.  Functions can do more than math, however.  We can pass strings (a chain of characters) to functions and output data based on their values.  For example, let's define a greeting function:



def greet_user(username):
    print "Hello " + username + "!"
Let's try calling that function with a name:

greet_user("Max")

The above code will print Hello Max! to the console.  We can call functions with variables as well, not just with literals:
def chastise_child(childname):
    print "Stop that " + childname + "!"
first_child_name = "Freddy Mac"
second_child_name = "Fannie Mae"
third_child_name = "Barack"
chastise_child(second_child_name)
chastise_child(third_child_name)


The handy thing about functions is that you don't have to retype code every time you want to perform a similar action.  You might want to perform a complex operation on many different input values, and now you can with functions!

You can also define functions that take more than one input:
def multiply(first, second):
    return first * second
print multiply(5,10)
Inputs are separated by commas.  When passing values to a function with many parameters, order matters!  Consider this scenario:
def childinfo(name, eyecolor, age):
    return name+" has "+ eyecolor+" eyes and is "+age+" years old."
print childinfo(15, "John", "blue")
The output of that function call would be 15 had John eyes and is blue years old.  As you can see, getting the order of your parameters correct is imperative.

Sunday, October 13, 2013

Che's Challenges

Reading Che Guevara's translated autobiography has been an interesting experience so far.  It is quite evident that the author has some strong political thoughts and wishes for the reader to subscribe to his ideologies.  Che attempts to appear as though he is offering a fair and balanced point of view by self-critiquing, but when he reprises his ideology he uses phrases like "Were we too uncompromising...?".  He also recriminates supervisors and glorifies laborers.  On the oceanic leg of Che's journey he compares the "drunk captain" with "the sailors, who were the best".  Che obviously detests the "absurd idea of caste" and sympathizes with the plight of the honest, healthy, hardworking, average South American.

Che wrote this book to stir his fellow South Americans to action, or at least political consciousness.  The book is peppered with colloquialisms and Latin-American cultural idiosyncrasies that necessitate footnotes to clarify Che's metaphors or parables to outsiders.  Furthermore, the book was written solely in Spanish and only distributed to Latin Americans.  Che attempts to enlist the reader's emotions for his own cause by describing the plight of average Latin American workers, laborers and poor.  The author assumes the reader will empathize with Che's examples of the downtrodden worker because the reader is a downtrodden worker or lives in close proximity with one.  Che's message would not be nearly as powerful if he did not include these cultural familiarities with which the intended reader likely identified with.

Che is an expert in argumentation.  He subtly utilizes Ethos by offering a firsthand account of the corruption and classism of South America.  He offers a Bathos-ic appeal by describing how peaceful things were before governmental and societal exploitation of the common worker and illustrates a glorious future in which egalitarianism in all its glory is restored.  He uses Pathos by describing desperate situations that the reader might find himself or someone close to him in.  Peers are easier to empathize with than any other social group, and Che knows this.  Che obviously resents capitalism, governmental and societal corruption and despotism, and desperately wishes to overthrow the current system and install a more equal society.  Through effective argumentation and a compelling message, Che attempts to spur the common man into action and political revolution.