Sunday, December 7, 2014

Solicitudes para la Universidad (porque los odio)

Solicitud
Yo odio trabajo extra.  Tengo mucho tarea en mis clases, y también necesito equilibrar presiones de familia, amigos y otros obligaciones.  Necesito más dinero para manejar el carro y salir con mi novia, entonces quiero un trabajo.  Totalmente, tengo mucho para hacer.

Entonces, no necesito más.  Otra vez, no necesito más.  ¿Escuchan las universidades a mi súplica?  La respuesta es un "no" rotundo.  En lugar de ayudarme y disminuir mi trabajo, ellos quieren que escriba un ensayo (o más) para todos y cada universidad.  Todos de las preguntas son un poco diferente, entonces tengo que escribir casi la misma cosa una y otra vez.  Estoy enojado y estoy aburrido.

También, muchas universidades me mandan a escribir todos de mis clases que he tomado y las notas que recibí.  No es necesario porque ellos necesitan verificar mis notas de todos modos.  Ellos van a ver mis notas y clases en mi transcripción, entonces ¿porque necesitamos poner cada clase en la solicitud?  Es demasiado trabajo sin sentido.

Websites como commonapp.org ayudan un poco, pero muchas universidades no usan el common app (MIT, UC Berkeley, Colorado School of Mines), entonces necesito escribir las mismas cosas cientos de veces.  "¿Donde vives?"  "¿Tus padres han asistido universidades?  ¿Cuáles?"  "¿Cuanto dinero ganaron tus padres?"...etc.  Es excesivo.

El gobierno debe obligar las universidades a usar el common app.  Es un buen idea, pero muchos no usan (y no entiendo porque).  Es una pérdida y es trabajo extra para estudiantes y las universidades.  Cuando estoy presidente del mundo, voy a cambiarlo.

Thursday, December 4, 2014

Porque me interesa la etimología (why etymology is cool)

Un árbol idioma / A language tree

Según el Real Academia Española, etimología significa "origen de las palabras, razón de su existencia, de su significación y de su forma."

Etymology is defined as "the study of the origin of words and the way in which their meanings have changed throughout history."

La etimología es muy importante para entender idiomas modernas.

To understand modern language, it is very important to understand etymology.

Etimología puede enseñarnos porque existe palabras y ortografías raros, y puede explicar la forma de las idiomas ahora.

Etymology can teach us why our language has strange words and spellings, and it can explain the form and function of modern languages.

Cacahuete feliz / Happy peanut
Por ejemplo, si quieres aprender un poco de la palabra "cacahuete", puedes buscar en el internet para entender más.  Este palabra es un poco raro porque no es similar de otros palabras en Español, entonces debes aprender sobre la historia para entender mejor.  Según Wikitionary, este palabra es de otras lenguas nativos como Tlalli y Cacahuatl.  Esto tiene sentido porque en España, no hay cacahuetes, entonces necesitamos usar una palabra de otra lengua.

For example, if we want to know the history of the word "equestrian", we can look on the internet to see what language it comes from.  According to the Online Etymology Dictionary, the English word "equestrian" comes from Latin "equus" (horse).  Many English words come from Latin and other Romance/European languages.  English has many different linguistic roots, so it is helpful to understand where individual words come from to understand the language as a whole.  English borrows many words from other languages.  The English word "abalone" comes from the Spanish word "abulón".  For a list of English-Spanish loan words, look here.

Para entender las lenguas, debes usar el internet para investigar palabras interesantes.  Una buena comprensión de etimología vas a ayudarte a comprender tu idioma primera y también como hablar otras lenguas que aprendes en el futuro.

To understand languages, you should use the internet to investigate interesting words.  A good understanding of etymology will help you understand your first language as well as other languages you may learn in the future.


Wednesday, December 3, 2014

Noticias de tech club

¡Buena noticia a todos!  El tech club, que ha luchado para existir, está floreciendo.  Hemos recibido un donación de muchas computadoras, entonces ahora podemos trabajar en lo que queremos.  Antes de hoy, no podíamos crear nada porque no teníamos computadoras libres.

En mi escuela, los estudiantes reciben computadoras gratis del distrito.  Podemos usarlas por un poco, pero están tantos cerrados que la mayoría de las cosas que puedes hacer con computadoras, no podías hacer con estos.  No entiendo muy bien porque la escuela no quiere que las usemos para crear apps, videojuegos y web sites, pero no podemos.  He preguntado la administración porque ellos restringen las computadoras, y ellos me dijeron "No podemos abrirlas porque necesitamos asegurar el red," pero ellos pueden tener seguridad aunque los estudiantes pueden usar sus computadoras.  Es un poco loco en mi opinión.

De todos modos, ahora tech club tiene computadoras que actualmente funciona.  Vamos a aprender a programar y ganar mucho dinero con nuestros ideas :)

Si quieres aprender a usar computadoras y hacer apps, videojuegos y web sites, debes ir al tech club.  Vamos a crear un sitio para ordenar comida en un restaurante.  También, vamos a programar robots, quadcopters y aprender a medir el cerebro humano con el muse (¡de veras tenemos un muse!).

Para estar competitivo en el mundo moderno, necesitas aprender a usar computadoras y programar.  Si no aprendes, no vas a estar empleado por mucho más tiempo.  Creo que quieres un trabajo, entonces debes leer mi blog, ir a tech club y buscar en el red para aprender a programar.

Este video explique porque necesitas a aprender a usar computadoras (link):

Tuesday, December 2, 2014

IBM TrueNorth (y mi primero entrada de blog en Español)

Murphy, en todo su gloria
Hola mundo, me llamo Max.  Estoy aprendiendo Español en el clase de Sr Murphy.  He aprendido mucho en su clase porque él es un buen maestro.  Me gusta hablar y escribir en Español y quiero practicar mucho más, entonces voy a empezar escribiendo entradas de blog aquí en Español (y en Ingles).

Me interesan la tecnología, matemáticas y las ciencias, entonces a lo mejor voy a escribir de estos tópicos.  Sin embargo, trato a ser una persona muy equilibrada, por tanto escribo de literatura, las lenguas del mundo y arte también.

¡Tengo noticias emocionante!  IBM acaba de crear un chip de computa que simula el cerebro mamífero (como los humanos) se llama TrueNorth.  Este chip es radicalmente diferente porque funciona con neuronas artificiales.
Una neurona, de Wikipedia

En el pasado, hemos construido computadoras con "arquitectura de von Neumann".  Estos funciona con procesamiento información "en serie", o exactamente en orden uno por uno.  Pero nuestros cerebros, la mejor computadora en el universo que conocemos, funciona en paralelo.  Procesemos mucho información en el mismo tiempo, pero las computadoras que han existido solo podía interpretar una cosa en un momento.

Porque el TrueNorth puede entender muchos datos simultáneamente, el chip puede interpretar el mundo mucho mejor que computadoras ahora.  Con el TrueNorth, creo que podemos crear robots que interactuar con realidad como un animal, no una máquina.  Ahora, podemos construir robots que pueden andar, pero un perro puede correr en cualquier lugar con coordinación, una cosa que robots no (ya) puede hacer.  Con este chip, vamos a crear robots inteligentes, como "tars" en Interstellar.

Estoy animado por el futuro.  ¡Hasta la próxima!

Friday, November 14, 2014

My take on Fences

Set in the late 1950s in an poor black neighborhood, Fences is a poignant account of broken families, poverty and blackness.  A recurring theme in the play is that of boundaries (or, eponymously, fences).  The characters in the play are corralled into socioeconomic, racist and matrimonial/familial fences.  There is a sense that the characters are being 'held back' by real or perceived borders, and the act of defying these limitations and becoming something more is a powerful element of the story.

I have plenty of 'fences' in my life.  I have an intimate knowledge of how it feels to be restricted, abridged and censored.  I attend a school that provides every student with an incredibly powerful computing machine, and I'm forced to use it as a glorified typewriter.  The fences put around my ability to interact with the digital world are very real and very painful to me.  I constantly feel the presence of Big Brother watching my shoulder making damn sure what I do doesn't violate the precious Acceptable Use Policy.

My preferred topics of discussion are also fenced in.  It's taboo to discuss religion and politics in most scenarios, especially in Utah.  When I talk about what I really want to talk about, I alienate and upset people.  My classmates simply don't want to discuss fractals and the implications of the singularity.  I'm so excited about new discoveries in outer space and on our own planet, but most people would prefer to discuss the weather or who's going out with who.  I'm tired of being fenced in.

My parents love to build fences around me.  They have a very narrow and specific notion of success and will accept nothing less from me.  What if I don't want to go to an Ivy league school and slave away at school, studying concepts that I'll promptly forget after I take the test?  I'd vastly prefer to go 'do my own thing'.  I wish I could spend every night programming and researching and every day skiing and socializing, but my reality is studying and pleasing my parents.  I'm getting pretty sick of it, but at least I get to move out soon.

Speaking of moving out, I'm chomping at the bit to fully experience the fabled 'coming of age' everyone's always talking about.  I recently turned 18 and I can't wait to burn my childhood fences down.  So many things I couldn't do before are available to me now.  I can open my own bank account and sign my own lease.  I already started my own company, and I'm ready to pour my heart and soul into that venture.  I can't wait to see what the world looks like beyond my fence.

The play Fences really resonated with me.  I never understood the boundaries that a young black man might face in the late 50s, but I really empathized with Cory (a protagonist in the play) and his broken relationship with his father.  As a privileged white male I'm no stranger to struggle (ha ha), but I never knew what life could be like for a poor black family in that time.  I'm glad I read Fences and feel more knowledgable and worldly for the experience.  I would highly recommend reading this play to anyone willing to listen to my recommendation.

Tuesday, October 28, 2014

Alright let's Shakespeare a little bit

Ok, let's do some Shakespeare.
1. Which currently famous actors and actresses would you cast in the following roles, and why?
  • Cordelia - Only Sigourney Weaver has the raw and blunt honesty required to play Cordelia.  Her matter-of-fact but impassioned speeches are perfectly suited for Cordelia's contemplative monologues.
  • Regan - Regan requires a creature of remote beauty.  Uma Thurman can be icy cold but appealing simultaneously, so this is a good fit.
  • Edmund - Robert Pattinson has the dark, brooding appearance of a traitor.  Edmund and Pattinson would both suck you dry if given the chance.
  • Albany - Albany's kind of a non-entity in this play.  He's a positive influence for Lear, but he doesn't do much of significance.  For him, we need an actor that can fade into the background in an unexciting way.  I think Steve Buscemi could fill such a role.
  • The Fool - Hugh Laurie is the perfect fool.  In House, everything Hugh Laurie says has a double meaning and more significance than meets the eye, just as The Fool.
2. Which character (out of all of them) do you most admire and why?
At the risk of sounding trite, I believe The Fool is the most admirable character in the play.  He never acts in a duplicitous manner, though he is often hard to understand.  He starkly speaks and doesn't soften his words in blind deference to the king.  Like a fine wine, Lear's fool is an acquired taste.  Taken with enough thought, The Fool is arguably the most authentic character in the play.  The Fool is a refreshing break from all of the unclear motives and evilness in the play.
3. Aristotle believes a proper tragedy will evoke a catharsis in its audience.  Which scene induces catharsis?  Can you explain why?  (It will help to review the long definition of catharsis.)
King Lear is not a soothing play.  Throughout the work, terrible things happen and continue to happen.  There is no particular moment when the pressure and upset is relieved, but there is quite an epic conclusion.  The great death scene at the end where many major characters perish could be thought of as cathartic.  Though King Lear and Cordelia (the primary positive or empathetic characters) die, so does Edmund, which is moderately relieving.  I suppose the death scene could be considered cathartic, if for no other reason than some bad guys die.  It's also kind of relieving when King Lear finally dies, because at that point you know he's free of his madness.  As far as I can tell, catharsis doesn't have to be positive, just relieving.
4. When Lear and the Fool are leaving Regan's and headed into the storm, Lear is concerned about going "mad" (crazy or senile).  The storm is a symbol of the brewing madness in Lear's mind.  What aspect of aging frightens you, and what could symbolize it?

Madness is synonymous with the phrase "losing one's mind" for a reason.  More severe mental disorders manifest literally as a shattered psyche; multiple personalities existing in one consciousness.  Lear feels his will slipping away rapidly, and comes to hate and fear this process.  Lear regards the end of his life as something to be conquered and opposed, rather than a natural process to be embraced.  This internal conflict and inevitability of aging is symbolized by the large and tumultuous storm brewing outside.  Just as the atmospheric eddies are barometrically at odds, Lear is at odds with the very process of aging.

No one wants to get old.  Though there's no theoretical upper limit on the age of human cells, in practice people don't often live much past 100.  After life, there's no guarantee that anything else happens.  At all.  So, I suppose I'm most afraid of approaching death.  After all, isn't that what age is a measure of?  One's proximity to death?

Death is often symbolized.  It's a recurring theme in the human psyche, and many a famous artist has touched upon the subject.  If I were to symbolize death in its most haunting form, I would choose blackness.  Lack of sight and vision implies lack of general sensory perception, which is what I'm afraid death might be.  I want to be sure I'll 'continue', but age is certainly an obstacle. 
5. How does reflecting on King Lear (its story and/or particular characters) make you feel "uncomfortably at home"?

Shakespeare comes difficultly to me.  Languages, especially English, are contextual creatures: to fully understand them, one must understand the cultural background.  English is so fragmented and nuanced that a single word can have several meanings depending on pronunciation, spelling and emphasis.  I have very little contextual knowledge of Shakespeare's time, and many of his words appear foreign to me.  However, with an effective "translation" at my side and much effort indeed, I can comprehend The Bard's writing.  When I do bridge that language gap, the characters in King Lear come into sharp relief.

It is easy to empathize with the characters in King Lear.  The important ones are illustrated as nuanced and multidimensional.  Based on an odd formula of drama, emotion and madness, each character's motives are easily understood and sympathized with.  The characters in King Lear are just as human as you or I.  A rage terrible enough to gouge another's eyes out is comprehensible, if not actionable.  We all feel as if a storm is raging when we conflict with a process that comes from within.  We can love Lear and appreciate his folly (as pointed out by The Fool) at the same time; a process which is not easy, even with real people.

King Lear resonates in an uncomfortable way.  In the inhumanity of the characters, we see ourselves.

Tuesday, September 23, 2014

The Coding Process

A lot goes into the coding process, and it can be confusing.  That's why I wrote up this guide; to help newcomers navigate the sometimes-difficult process of bringing software live.  It's open-source, so if you have any changes or suggestions you're welcome to help out!  You should really follow the link, because the version here won't be updated.

The Coding Process

  1. Define your project
    • Clearly state what you wish to accomplish
    • Make sure this objective has measurable goals!
  2. Explain your MVP (Minimum Viable Product)
    • This entails the core functionality of your application
    • What does your app need to do work?
    • This is the 80 in the 80-20 rule
  3. Break code into small chunks
    • Make user stories - small detailed explanations of the user's point of view when interacting with your app
    • Example: The user clicks on the button in the center of the screen and an alert appears
    • User stories should be limited in scope
    • User stories are rated in difficulty to facilitate project management
    • User stories don't just have to be for the frontend! The API is a user interface too.
  4. Write a design doc
    • This resembles a program in structure
    • Higher level than actual code
    • Make a comment skeleton in program files explaining what the code should do
  5. Start coding!
    • This should be a minimal amount of work
    • You should have the code already spelled out in the design doc
  6. Know when to stop
    • Don't go for 100% perfection - you'll never finish!
    • Once the MVP is operational, stop coding and review
  7. Review
    • Make sure the app is operational
    • Check for errors, bugs, codesmells and crashes
    • If any fixes need to be made, spell them out clearly now so they don't cause problems later
  8. Code some more
    • Fix any problems revealed in the review process
    • Minor improvements, bug fixes, etc. - no major changes should happen at this point
    • Go back to review when this is done, unless nothing needed changing (highly unlikely)
  9. Review one more time!
    • Come on, I know you didn't look hard enough for that bug. Trust me, you'd rather find it sooner rather than later.
  10. Finalize and start production
    • Bring your app live!
    • No changes should occur at this time
  11. Start the maintenance process
    • You didn't review your app well enough before. I promise.
    • You'll need to make fixes and changes to your app during its lifetime.
    • Follow established criteria for the update cycle.

Contributions

I gladly welcome updates to this manual! Please, fork and submit your changes upstream.

Thursday, September 18, 2014

Tech Club Meeting September 17, 2014

Hey everybody, in case you missed the meeting on September 17th or just want to review the material we covered, here's the video.  We decided to build a breakout-style game in javascript and I covered some programming basics.  We used jsfiddle.net for our demos.  Please make accounts on github and trello if you haven't done so already!


Wednesday, September 10, 2014

Object Orientation


Here's the audio version of this blog post:



These are objects
What is an object?  In real life, a lot of things are objects.  Plants, bicycles, cars, pets, bananas, thoughts, really anything!  Even people could be considered objects (bear with me here).  The question "what is an object" raises some philosophical issues, but it is clear that objects play a large role in our daily lives.

Because objects are so pervasive in our perception of the world, we can say we experience life in an object-oriented way.  For example, take the sentence "I'm going to the store".  Here, "I" refers to the person object that is going to the store.  The store could be interpreted as a destination object, which implies that there is also an origin object.  The subject of our example may plan on driving his car object to the store, or riding a bike object.  At the store, a person can buy food objects.

This example again raises the question, What is an object?
Let's define some criteria for object-ness:

  • An object must have characteristics
    • Tangible characteristics:
      • Color, size, weight, location
    • Non-tangible characteristics:
      • Emotions, personality traits, powered on, powered off
  • An object must have actions
    • Things that it can do or things that can be done to it
      • Run, walk, eat, drive
      • Power on, power off
      • Paint (change color)
      • Grow
  • An object must be identifiable
    • It must be a distinct entity
      • I can have two pens of the same model, but I still have two different pens
Notice how we never specified that an object must physically exist.  Our criteria for an object could include thoughts, conversations or mathematical formulas.

Because objects are so omnipresent in life and the human experience, things we create will reflect this object-oriented way of thinking.  Humans can easily think of problems in terms of objects, so we created many software tools to describe and interact with objects.  Programs that simulate icebergs melting or control aircraft scheduling patterns can be developed in an object-oriented way.

Not how it is
So, this means when we write most programs, it is easiest to write them in an object-oriented way.  This results in minimal effort on the programmer's part.  Well designed object-oriented programs read more like a description of the real world than arcane source code.









Alright, let's see some code.

class Pig:
    #definition for Pig object
    def __init__(self, weight, age, name):
        #a pig has weight (lbs), age (years) and a name
        
        #assigning parameters to pig object
        self.weight = weight
        self.age = age
        self.name = name
    
    def oink(self):
        print "Oink!"
        
    def sayHello(self):
        print "Hello, my name is " + self.name + "."

#make a new pig named Spider pig that weighs 40 lbs.
#and is 3 years old
SpiderPig = Pig(40, 3, "Spider Pig")

#make spider pig introduce himself
SpiderPig.sayHello()

#make spider pig oink
SpiderPig.oink()

Here's a link to an editable and runnable version of that example.

The programming language I used to write that example is called Python (named after Monty Python's Flying Circus).  If you want a more in-depth introduction, check out my blog posts Python Intro and Python Intro Part Deux.  I also wrote an introduction to Java, another object oriented programming language.

Monday, September 8, 2014

Argument Unpacking in Python (holy balls!)

Hey y'all, I'm here to teach you about Argument Unpacking.  Please, try to remain in your seats.
Woah that guy just got Argument Unpacking













So I had to do some screen scraping (follow that link).  Yuck, right?  Except no, I get some weird sick pleasure out of screen scraping (I volunteer to do it).

(Skip this if you know what screen scraping is)
So in short screen scraping is when you translate a hard-to-traverse website into a nice data structure like json.

Anyways, I was writing a screen scraper for the paint mixer.  I made classes for my data templates (yay go me).  At first, I thought it would be easy to just iterate through the table cells using BeautifulSoup (a very cool and excellent Python html parser).  That was not good.


for cell in cells:
   if cellNumber == 0:
    try:
     cardNumber = cell.contents[0]
    except IndexError:
     cardNumber = None
   elif cellNumber == 1:
    try:
     firstName = cell.contents[0]
    except IndexError:
     firstName = None
   elif cellNumber == 2:
    try:
     lastName = cell.contents[0]
    except IndexError:
     lastName = None
   elif cellNumber == 3:
    try:
     email = cell.contents[0]
    except IndexError:
     email = None
   elif cellNumber == 4:
    try:
     balance = cell.contents[0]
    except IndexError:
     balance = None

^^^ Holy Mother that is bad

I knew Python just had to have a better alternative to this (the word pythonic is a thing, talk about a language dating itself), so I did me some googling and came upon a glorious find: argument unpacking.
This is going to be you in a few sentences











The Astute Reader (tm):  Wow, that traversal Max was talking about seemed really array-like!  I bet there's an easier way to do that!
Me:  Gee thanks captain obvious!  You don't think I was lamenting that with every line I wrote?  I knew I was so close!
The Astute Reader (tm):  Ok, that was an obvious lead-in to Argument Unpacking.  Let's have it, then.

Ok, here it is...drumroll please.

I have a method that takes 6 parameters:

def method_with_lots_of_freaking_parameters(x1, y1, x2, y2, x3, y3):
 print "Haha I'm not even going to use those arguments!"

And I have a list with those parameters stored just itching to be passed to that method
superswaglist = [5, 1, 3, 6, 6, 6]  #wow this is super contrived huh?

Without Argument Unpacking, this is how you'd have to call that method
method_with_lots_of_freaking_parameters(superswaglist[0], superswaglist[1], superswaglist[2], superswaglist[3], superswaglist[4], superswaglist[5])  #puke

But with this blessed tool (In the Name of Python We Pray), we simply call

method_with_lots_of_freaking_parameters(*superswaglist)  #wow such ease
I couldn't agree more
This tool condensed 56 lines of code into one for my screen scraper tool.  Be excited.

PS If you want a tutorial on screen scraping let me know in the comments!

Thursday, September 4, 2014

Tech Club primer

The Beautiful
I recently started a Tech Club at my school.  It's super awesome, and you should go.  If you're interested in science, the future, academia or art, you'll have a place here!  Tech Club is a group of like-minded individuals that love to discuss the future and the possibilities modern technology provides.


You do not need to be a 'computer person' to enjoy Tech Club.  If you're interested in discussing the future and imagining things to come, you'll fit in just fine!







To get an idea of what Tech Club is all about, watch this video:



And this one:



Here are just a few projects we might work on:

  • A game
    • a board game (chess, monopoly, not already an app)
    • Chess engine (AI)
    • one ai learns lots of games
  • Public forum (on canvas)
    • a qa system
  • Moodle...
    • old version of canvas
    • mobile end of lms
  • Online dance ticketing system
  • Better version of canvas
  • Math stuff
    • visualization
    • numerical analysis
  • Fractals
  • Recreate twitter or facebook for fun
  • bio printer
  • quad copter stuff
  • bluetooth control app
  • music listening stuff
  • new iteration of social media
    • gps on gopro
    • online db of experiences
  • PowerSchool screen scraper
    • stay signed in
  • zupas...
    • app to simulate sandwich assembly
    • sell to zupas
    • (quizlet)
  • Booster juice ordering app
  • online bus tracking system
    • schedule online

If you're interested in attending, fill out the Tech Club Application.  There's zero commitment involved in signing up, in fact, we encourage drop ins!

Wednesday, September 3, 2014

The Catcher in the Rye (6)

The Catcher in the Rye is an exemplary book about the difficulties of growing up.  Moving on in life is never easy, and the turmoils of adolescence do nothing to ease this burden.  Everyone is glad to move on from that awkward, hormone-controlled phase of their lives.  This is what makes The Catcher in the Rye so relatable: everyone has a hard time during that part of their lives.  Though the novel refers to some specific historical constructs, this book is timeless and has a universal appeal to kids and adults alike.

Why is growing up so hard?  I think it's because of all the rapid changes everyone experiences.  Life seems to accelerate tenfold when stepping up from middle school to high school.  Everyone's growing at a rapid pace, mentally and physically.  This is emotionally taxing, to say the least.  Lots of people are pushed to the breaking point, while others rise to the challenge.  Eventually, though, most people make it through relatively unscathed.

The Catcher in the Rye offers an interesting perspective into adolescence.  Holden obviously acutely feels the drive to grow up and be an adult, much as every other person begins to crave freedom and privilege during adolescence.  Though there exist much worse teenage experiences, many people don't have nearly as hard of a time as Holden.  In either camp, people can relate to Holden.  He's so sensitive and likable, the reader can't help but root for him.  To truly understand this book, the reader must empathize with Holden.

Every teenager should read The Catcher in the Rye.  It can be used as a field guide explaining what not to do, but many positive messages can be obtained from it as well.  I can't imagine that adults can fully appreciate this book to the degree that someone going through the process of growing up can.

The Catcher in the Rye (5)

After sprinting away from Mr. Antolini's house, Holden starts to crack up a bit here.  He fears that he is about to disappear when crossing the street, so he pretends to talk to his deceased younger brother in order to...not disappear?  Anyways, after muttering to himself for a while, Holden proceeds with his emotional breakdown.  Walking through the world as if numb, Holden finds his way to his little sister Phoebe's school and decides to try to visit her.  While waiting to make contact with her, Holden feels physically ill, as if he is about to vomit.  When he finally finds his sister, he is about to collapse.  He tells Phoebe he is leaving for a long time, and shows her a suitcase he was toting around.  She begs him to let her go with him, and he refuses.  She becomes very upset and refuses to talk to her brother, again.  He pretends to give up, and walks towards the zoo, in full knowledge that his sister will follow him.
Sure enough, they arrive as a pair at the zoo, and Phoebe finally begins to warm up to Holden again.  She and Holden bond for a while, until it begins to rain.   Holden remains outside without any protection and gets soaked, but feels a sense of euphoria at seeing his little sister so happy.

After the rainstorm, the chapter ends.  A very short chapter, the last one, follows, serving as an epilogue of sorts.  Holden explains that after the zoo and the rainstorm, he got very sick and had to go to a different school.  However, he makes it abundantly clear that the reader is not to focus on these details, rather, the reader must finish the story themselves.  I like to think Holden went on to live a happy life and everything worked out for him.  What about you?

I think much of this book is about moving on from the death of a loved one.  Upon finishing the book, I was struck by the bittersweet feeling of moving on.  I think, in the end, Holden figured out how to deal with the loss of his younger brother and learned to move on.  The same numbness and bittersweet feelings are abundantly present in the novel The Perks of Being a Wallflower.  The protagonist of The Perks of Being a Wallflower, Charlie, also lives life at a rapid pace and to the extreme, and also has a very difficult time with the death of a loved one.  Charlie and Holden are both quite young at the time of the novel, and are both very sensitive.  Both Charlie and Holden eventually learn to move on and grow in the process.

The Catcher in the Rye really resounded with me.  I've never experienced the traumatic death of a loved one, but I feel better prepared for that inevitability having read this book.  I made a deep and personal connection to Holden.

The Catcher in the Rye (4)

After Holden's messy date, he calls up an intellectual friend and arranges for drinks later that night.  Then, another insight into Holden's psyche that helps us to empathize with him.
Anyway, I'm sort of glad they've got the atomic bomb invented.   If there's ever another war, I'm going to sit right the hell on top of it.  I'll volunteer for it, I swear to God I will.
(Salinger 141)
This internal dialogue comes right after Holden reveals that his older brother was in the army "for four goddam years."  Poor kid.
Holden and his friend meet up for drinks.  They talk.  Holden gets mad.  They part ways.  Spotting a pattern, anyone?
Holden gets extremely drunk and reminisces about his dead younger brother.  Holden suddenly decides to go visit home and see his little sister, Phoebe.  He wakes her up, and they have a conversation, which turns to why Holden is home so early.  His sister finds out he was kicked out and refuses to talk to Holden.  He coaxes her back into the conversation, and they discuss various heavy issues.  They bond for a while, when their parents show up and Holden bolts out of the house.  Without a place to stay, Holden turns to old friends, Mr. and Mrs. Antolini.  Holden falls asleep, and wakes up a few hours later with Mr. Antolini patting his head.  This is deemed "perverty", and Holden freaks out and bolts again.

I have to agree with Holden, something about this event feels a little rapey.  This reminds me of a similar scene, albeit from a totally different angle and perspective, in the book The Art of Racing in the Rain.  The scene where the younger niece comes on to the older male protagonist leaves just as bad a taste in this reader's mouth.

I tend to take life at a high speed, and often fail to appreciate the present.  Holden has a similar problem.  His wild and crazy antics are a reflection of his need to appear adult-like, just like myself.  I, like Holden, need to slow down and appreciate the small things.  Adulthood ain't easy.

The Catcher in the Rye (3)

Guess who's back (back back) back again!  Will the real Holden Caulfield please stand up?

Where last we left our intrepid hero, he had two older women hanging on to his every word (or so he wished).  This was in a dive bar.  Flip forward to Holden inside a cab.  He has an utterly ridiculous discussion with the cabbie regarding the survival of fish in the nearby often-frozen duck ponds.
Holden: "All right.  What do they do, the fish and all, when the whole little lake's a solid block of ice, people skating on it and all?"
Cabbie: "What the hellaya mean what do they do?  They stay right where they are, for Chrissake."
(Salinger 82)
...and so on
After a decidedly unpleasant cab ride, Holden arrives at Ernie's (another lame bar), where he proceeds to lamely pick up on chicks.  It doesn't go well.  After a protracted, even herculean effort, Holden concedes defeat and heads to a hotel.  While Holden rides up the elevator to his room, the bellman Maurice starkly asks him
"Innarested in a little tail t'night?"
Shocked, the surprised Holden eventually says he is indeed innarested.  In about 45 minutes, in bursts a hooker into Holden's hotel room.  She attempts to initiate "relations", but Holden just wants to have an innocent chat (this kid is actually pretty sensitive).  Upon discovering this, the girl leaves.  Holden believes all is well, until some time later the girl and Maurice return to his hotel room, demanding an exorbitant price for the encounter.  Some arguing occurs, and Holden is roughed up a bit.  He goes to bed with injured face and pride.

After this episode, Holden schedules himself a date with an old friend, Sally.  They go to see a "show" (movie?) and confess their love for one another.  After that, they go skating and have a fight about their future together.  Holden says something mean and Sally starts crying.  Poor Holden.

Holden is a terrible ladies' man, but he doesn't seem to understand this.  Holden also doesn't understand that he's too young to be acting like this, drinking and flirting and smoking and whatnot.  Holden definitely ought to be a little more wary of people like Maurice.  He, like Willy in Death of a Salesman, is unable to confront the truth about himself.  Holden is clearly a sensitive guy, so if he just reflected on his process and really thought about it, he would get the girls.  Holden needs to take a step back and get a reality check on himself, just like Willy.

I think we all delude ourselves into thinking we are more mature than we really are.  I know I'm guilty of this.  I always feel so grown up at my current age, but I know I will feel even more adult-like a few years into the future.  At fifth grade, I thought I was on top of the world.  I'm sure you know what I mean.  To truly understand myself, I need to take a step back and view my maturity and development objectively, just like Holden.

The Catcher in the Rye (2)

Hear ye, hear ye!  I have yet another riveting update to share with you regarding my obligatory summer reading book, The Catcher in the Rye.  Last we left off, we discovered that the brooding teenage Holden has a good reason to be sad: his younger brother died of leukemia.  Flip forward a few more pages, and we are planted into a flashback involving Holden and one of his classmates.  Holden and Stradlater (the alpha-male classmate dude) get in a rather nasty fight about a girl, and Stradlater drew blood.  Holden and Stradlater obviously feel bad about the whole thing, and seem to just want to move on rather than hold any grudge.  It's hard to say what Holden really wants out of this relationship with Stradlater, because they were previously something that could have been interpreted as friends.  I guess Holden's just having a hard time.

Enter Ackley, the questionably hygienic "older" kid that no one seems to like.  Holden, ever the gentleman, is at least moderately polite to Ackley, most of the time.  After some antagonistic dialogue with Ackley, Holden heads off campus to the train station.  On the train, he meets the mother of one of his classmates and acts all adult-like with her.  Holden eventually arrives in New York, where he goes cruising for chicks at some random bars.  Surprisingly enough, he does meet some (significantly older) women, but they don't hit it off.

Holden awkwardly hitting the town reminds me of the Hogwarts students romping around Hogsmeade, except the Harry Potter kids seem to know their place a little better than Holden does.  Both Holden and Harry Potter and co. seem like they don't really know what they're doing outside of school, but Holden seems a little more streetsmart.

I'm not really a rebellious kid, but I can understand what Holden is trying to do.  His taking off and hitting the town is an attempt to seem grown-up, wild and interesting.  We can all relate.

The Catcher in the Rye (1)

This summer, I'm reading The Catcher in the Rye. So far (as of page 40), the main character, Holden, seems to be yet another angsty and apathetic teenager that doesn't really like anyone or anything. His parents seem to have shipped him off to some sort of boarding/reform school because of some trouble he's gotten into in the past or something. Apparently this didn't really help things, because the first few pages reveal that Holden got kicked out of school (again?). After supplying some (intentionally vague) background information, Holden visits one of his sort-of favorite teachers. The visit is super awkward. After that unfortunate encounter, Holden sort of gets into a fight with one of his semi-friends from school (this is a flashback).

He seems like an overly mopey and judgmental kid until he reveals that his younger brother died of leukemia, at which point you feel like a complete douche for judging him. This mopey I-hate-school-and-don't-understand-changes-happening-in-my-body-and-around-me phase is a pretty common occurrence in teen/YA books. I suppose it's mildly evocative of Ender's Game. Ender, like Holden, has a tough time making friends. I bet those two could have a great mope sesh together.

I can completely empathize with Holden, except for the dead younger brother thing. I feel pretty bad for him as far as that goes. But the whole teenager thing? Ya, I'm living it right now. I hate school too, man. *hugs

Friday, August 22, 2014

What's so great about meanjs?

Yarr
(Note: this is a more technically-oriented article, and I plan to write another, more accessible version in the near future)
I'm sure you've heard the hype: "Node is taking over.  Batten down the hatches, me hearties."  And they're right.  With the new fullstack javascript frameworks that are coming out (namely meanjs and meanio), node, angular, and all their buddies are taking the development world by storm.  To implement a basic blogging service with user accounts, passport authentication, a complete json api and more is as simple as typing
yo meanjs
The way things are going with things like alchemyAPI, node robots and web sockets, us developers will be out of a job some day, which leads me to my point: meanjs is the greatest thing ever (so far).  So, what is meanjs, exactly? (I apologize in advance for all the mean puns)



  • What "mean" means
  • What mean means for me
    • I don't have to learn 4 (four)  flippin' different languages!  Back in the good old days, people needed to learn PHP and SQL for the backend and JavaScript and ActionScript on the frontend.  This process was further complicated when other tools and frameworks emerged, like Java Applets.
  • Wait, how does meanjs change that?
    • From the meanjs site: "MEAN.JS is a full-stack JavaScript solution that helps you build fast, robust and maintainble production web applications using MongoDB, Express, AngularJS, and Node.js."
    • "a full-stack JavaScript solution"
    • You only have to learn one programming language!  That is a very big deal.
  • So why should I use meanjs instead of rolling my own full-stack js framework?
    • One word: boilerplate
    • meanjs is distributed via a yeoman generator
      • This tool autogenerates content common to every fullstack js application, thereby infinitely expediting the development process
      • It even comes with bootstrap ❤ (a beautiful html and css boilerplate compilation)
  • yeoman generator
    • The meanjs yeoman generator generates static boilerplate code fine, but it also generates application-specific modules for you as well
      • The crud module generator automatically generates frontend and backend modules for segments of your application.  However, this is no simple ajax.  In fact, every crud module generated is turned into a REST endpoint, so your entire site interacts using public (or private, should you choose) api calls.
      • This means the api won't get neglected: the usefulness of the application is directly related to how good your api is
      • How to use the crud module generator:
        • yo meanjs:crud-module modulename
  • So, how much does this meanjs thing cost me?
    • Nothing, it's free and open source software (github page) thanks to the superheroic efforts of Amos Haviv :-)
  • Ok, I'm ready to learn this framework.  How many years will it take?
    • Don't make me laugh.  If you've got a good deal of determination, and the ability to reason through problems, you can be up and producing within 2 months.  The framework is, after all, only in its infancy
This framework is so exciting because anyone can pick it up and be superheroic while working with it.  I want to teach everyone that will listen how to code.  With these modern frameworks that make programming so accessible, I plan to share this knowledge with historically underrepresented demographics in computer science, and to level out the playing field for the future.  Frameworks like this will change the world.

Tuesday, August 19, 2014

How to use OAuth with MEANJS

Nodejs logo
Hello, this is a short tutorial on how to use OAuth with meanjs.  It can be followed using another framework, but there are some mean-specific tips in here.  You probably do need node, though.







  • To use oauth with meanjs, you should find a library that has already implemented the handshaking for you (googleapis and Twit)
  • A note about OAuth 1 vs 2:
    • OAuth support is fragmented
    • Lots of node libraries support both
    • Not all services support 1 or 2
  • Note: if you plan on using user-based authentication along with application authentication, it is much easier to use the existing passport integration that meanjs already has in place
    • This makes obtaining session tokens much easier
  • Most often, these libraries will provide easy-to-use interfaces (APIs) where keys are passed as a config object
    • demoTwit.png
    • All you need to do is put in your keys where they are needed
  • To get access tokens, most of the time you need to create a new app
  • These instructions are pretty straightforward usually
  • The callback url can be found in config/env/development.js under the object whose service name you are using
  • Note: if you use a non-standard port on your app, you must specify that port in the callback url (127.0.0.1:3000/callback/)
  • A note on twitter’s api app creator:
    • For some reason, twitter doesn’t like localhost to be in the callback url, so you need to specify localhost using 127.0.0.1 eg
    • 127.0.0.1:3000/auth/twitter/callback
  • This will give you one or two application-specific tokens or secrets
    • These application-specific keys are used to authenticate your app
    • If you need per-user authentication as well, read on
  • To fill in the per-user authentication tokens, you need to interface with passport and the existing meanjs framework for these things
    • These session keys can be obtained from the user object after authenticating eg
var providerData = req.user.providerData || req.user._doc.additionalProvidersData.twitter;

   var T = new Twit({
       consumer_key: config.twitter.clientID,
       consumer_secret: config.twitter.clientSecret,
       access_token: providerData.token,
       access_token_secret: providerData.tokenSecret
   });

  • The branch googleApiDemo of my fork of extra-mean has a demo of something like this, feel free to use it as an example
  • Any questions?  Leave a comment or email me at macsj200@gmail.com