Programming en Español - Part 3 | Wednesday, August 20 @ 10:37

(My final part of this series on the similar practices between programming and spoken languages. Part 1 Part 2)

4. Community

The final similarity I want to cover between Programming and Spanish is the social aspects of both. One of the things I've come to appreciate here in México is the value in community in both disciplines. I have found a better understanding of the languages I'm learning, and an excitement for both that could have been fostered no where else but in the communities I have infused myself in.

Both people learning a new spoken language, and those learning a new programming language can be a timid bunch (I speak these words from direct experience). We resist getting out and using what we are learning and what we already know for fear of being humiliated - our not-yet-perfect grasp of the language being brought to light.

This does happen, certainly. I have embarrassed in very efficient ways here, already. One might even be impressed by the sorts of things you can say by changing around a few letters in the Spanish language. It's a hard thing to get out there and use what you know, and it's very tempting to stay inside and read books and learn all you can about the language (be it spoken or programming) and then get out and use it only when you have perfected it.

In doing this, you miss out on one of the coolest things that comes with the challenge of learning something new: the community.

There are very specific benefits to getting to know people around you who are have already mastered (or are mastering) what you attempt to achieve:
  • 1. Encouragement
    One of the first benefits I can think of is the wealth of information that resides within a thriving community. People have struggled with what you're struggling with, encountered the same roadblocks, and have overcome them.

    People who have delved into the often frustrating journey of trying to expand their worldviews with new disciplines and have overcome (at least to a degree) are often more than willing to share what they've learned.

    This can be highly encouraging, and can offer a much-needed pat on the back you might need to press on.
  • 2. Learn from the best
    Some of the best programmers I know offer their services back to the community. They are giants among men, and offer their knowledge freely back to the community, because they want to see programming as a whole get better, especially in their language of choice. (Got to love a person like that).

    The same thing happens in spoken language. Some of the people I'm learning Spanish from right now have nearly (what seems like to me) mastered the language, and now are using their mastery to pass on the art of expressing themselves well to others.
  • 3. Common Cause The power of great minds working together to solve a unified problem is a beautiful thing, to me. Great companies have been formed and wonderful services rendered because people of like minds have come together to solve a problem.

    Language-centered communities are a large part of where this can take place.
So there you have it, my comparison of two very different, but surprisingly similar disciplines. My encouragment to you if you've been putting off learning a new language, is to jump in there and give it a try.

Find a community of people doing the same thing you're doing, and dive in there. Then, when you get good at it, give back it's a circle of life thing (sans talking animals).

I saw this keynote the other day from a small Ruby conference, and thought it was good. It's on community, and doing what you love. Check it out if you get a chance: Ruby Hoe Down 2008: Chris Wanstrath Keynote

Programming en Español - Part 2 | Wednesday, August 20 @ 07:22

(This post is a continuation of my now 3 part series on the nature of language and programming: Part 1) Yesterday I covered how both spoken and programming languages share a system of Syntax and Patterns, today I'll cover the third similarity the 2 disciplines share:

3. Optimization

I'm not going to lie, optimization makes me excited in Spanish and in programming. After diving into a language, learning it's syntax and then patterns, the next logical step is to learn and execute the best practices with the language. This concept expresses itself in 2 forms: brevity and native expression.

Brevity

This facet of optimization seeks to utilize the syntax of a language compress the statement to express the same thing with the least amount words.

For example, the iterating Ruby block we looked at yesterday can be re-written in a much :
Not Optimized: 
--------------
variable.each do |i|
  puts i
end
 
Optimized:
----------
variable.each { |i| puts i }

In Spanish, this can express itself through combinations of indirect and direct objects, like so:
Not Optimized: Él va a mover la cosa. (He is going to move the thing)
Optimized: Va a movérsela. (He is going to move it.)

Brevity, often times, indicates care in usage and knowledge of the ins-and-outs of a particular language. There's also a readability factor that plays into brevity. As all programmers know who have tried to dig into other people's code (or even our own, sometimes!), you can compress code to the point of not being verbose. We'll cover this a bit next in the next point...

Native Expression

At first, I was going to relegate this point to spoken language only, but I believe it holds true for programming as well. Let's take my example of "Optimized" spanish from above. At least in my part of México, the tacking on of indirect and direct objects on to the end of an infinitive verb is not usually preferred. It's not as verbose as the alternative "Se la va a mover" - same thing, just easier on the eyes and ears.

In the same way, though it is technically correct, some short-forms of programming code are just not as accepted as others, be it because of their verbosity or what have you, there are ways of expressing your point better.

This might seem frustrating to some. The concept of an "unwritten rule" of how to use languages better can seem daunting. How are we supposed to know which are better accepted, and more proper to use?

I'll wrap the series up tomorrow with this point. We'll talk tomorrow about the importance of a community when using both programming and spoken languages, how Unit Testing allows us to learn those "unwritten rules" and guidelines, and how observation of professionals (or in spoken language, the natives) for using the language the way it was intended and can be best understood.

Edit: Part 3 is now available.

Programming en Español - Part 1 | Tuesday, August 19 @ 07:32

(This was one long post, but I've decided to split it up into 2 parts, it's for your eyes. You're welcome. )

Friday marked my 3-month anniversary here in Mexico, and I've been reflecting recently on my path of adaptation in this culture, and more specifically, with the Spanish language.

To be fair, I did take 2 (required) years of Spanish in high school, but those years were a joke. I'm pretty sure I wound up with barely passing grades, and almost nothing stuck with me, minus the oh-so-classic "Yo tengo un gato en mis pantalones" (which, as shocking as this might seem, isn't funny here). I didn't really get language back then.

When I would an encounter a rule or new vocabulary, it just wouldn't click.

What's different, now? Granted, I'm not fluent yet, but I'm making progress every day, and am at the point in the learning experience where I feel confident that it's only a matter of months before I feel comfortable with the language? Why is this?

It all started in early 2000 with Visual Basic 6.0. Then C++, VB .NET, Javascript, PHP, and now Ruby.

My background in programming has undoubtably given me an edge to jump-start the Spanish learning process, there are at least 4 concepts from programming that have helped me:

1. Syntax


All languages - whether spoken or computed - have syntax, which is defined as grammatical rules for expressing what you intend to convey (my paraphrase, sourced from dictionary.com). We ignore things like this in our native language. Syntax says "you put this part of speech here, that part of speech there" to form the kind of thing you want to say.

The syntax for describing a noun in Spanish is different than in English. To talk about, say, a red car for example you would say: "El carro rojo" (literally - the car red).

Admittedly, I used to think this was the most foolish thing ever.

However, I now understand this as the syntax for the Spanish language. In PHP you would use:
<?php
 
  function car{
    $color = "red";
  }
 
?>

In Ruby, the syntax is different:
def car
  @color = 'red'
end

It's just the way the Syntax works. Both are right (though one is prettier than the other, but that's another post for another time ), they're just using different rules. I totally get that.

2. Patterns

Patterns come next in the list of similarities, and are inextricably linked with syntax, because we construct formulas (or patterns) with them.

For example, the spanish phrase "You/She/He/It is going to [verb]..." is a formula, or pattern. The form looks like this:

Ir (a verb needing to be conjugated, to go) + a + [verb]... In other words:
English: I am going to run.
Spanish: Voy a correr.
Formula: Ir + a + [verb]

And in Ruby, the pattern for iterating through an array looks like this:
variable.each do |i|
  puts i
end

Cool, huh? You learn the syntax for the pattern, learn the pattern's function, and then you can apply it in real life.

Edit: Part 2 of this series is now up!

Reason #11 to visit Mexico | Friday, August 8 @ 09:27

I'd like 2 of the best tamales I've ever had in my life and a liter of Coke please.

That'll be $2.40 please.

AT&T Makes Babies Cry | Wednesday, August 6 @ 10:19

AT&T Makes Babies CryEnjoy seeing toddlers in distress?

Does injustice make you smile?

Want to make a living explaining terrible business practices to the common man?

Come join the AT&T wireless team!

As most of you know, about two months ago I moved to Guadalajara to pursue some mission work and figure out life. Well, when I left I still had an existing AT&T contract that I had signed two years prior. I moved in May and the contract was due to expire in June, so I was just going to let it lapse, pay June's fees, and then the contract would terminate and that would be that. A perfect plan...

...or so I thought.

I called them up today because I received a bill for service in July (for 0 minutes, no less; my AT&T phone hasn't been on since I got here), which was confusing because I was sure that the contract was done with in June, so I decided to give my good friends at Angst,Terror,&Trembling a call.

AT&T: Thank you for calling AT&T where we take money from little old ladies and orphans, how may we help you?
Brian: Hello, I'd like to know the ending date of my contract.
AT&T: Well, it says here that your contract ended in June.
Brian: That's what I thought, however I received a bill for service for the month of July.
AT&T: Yes sir, we have record of that.
Brian: ??? I thought you said my contract had ended? I signed a 2-year contract, and you said my contract had ended. You said it! With your mouth!
AT&T: Sir, that's not the way it works. After your contract ends, we continue to bill you monthly until you call in and cancel your service.
Brian: But...I...signed a two-year contract. [Tears begin to flow. A sad song on a single violin plays and I curl up in the fetal position]
AT&T: Sir, I'm going to have to ask you to calm down, don't make me call security.
Brian: Wait, wha...

The actual conversation I had with an AT&T employee. Word-for-word.

Ok, so I made that last part and most of the rest up, but you get the point. For some awesome foolish reason, when you sign a contract with AngryTired&Tortured, you sign a contract for "At least 2 years" instead of "For a total of two years".

I sure wish I would have known this. If this is a common practice in the wireless industry, it's a shady practice that I believe most people don't know about, and it's another way that the cell phone companies mickel and dine you.

Ugh, I hate being mickel and dined...
Next → Page 1 of 2