Thursday, February 26, 2015

The Problem With "Everyone Should Learn How To Code"

Every week another article comes out frantically telling us that everyone should learn to code, that coding is an irreplaceable skill in the 21st century skill set, that you can supercharge your career if you just spent 20 minutes a day for 21 days to learn how to code, or some similar nonsense. Even Obama has joined in, stating on a number of occasions that "Everybody's gotta learn how to code." While the intent is often good, I think these sentiments are dangerous for a number of reasons, but mostly because they cheapen coding and show a complete lack of understanding about what it is.

The problem with "everyone should learn how to code, just like everyone should learn how to read and learn how to do arithmetic" is that fundamentally, coding is not arithmetic. It's not even like arithmetic. It's not like reading. And by comparing coding to the fundamental skills that form the lowest possible foundational step of intellectual pursuits (e.g., you can't study comparative literature if you've never learned to read, and you can't be a mathematician if you don't understand numbers), we perpetuate the incorrect vision of coding that most non-coders have. Which is, to put it bluntly, that it's a specialized form of typing.

Nobody in their right mind thinks that taking a semester of calculus makes you a mathematician. Nobody would ever say that 20 hours of violin lessons makes you a violinist. Yet we continue to perpetuate the belief that coding is just "something that you gotta learn", and something that just a little bit of work will allow you to learn and become proficient in.

No. Not everyone needs to learn how to code. Nor is coding something that you can learn just by spending a scant bit of time.

Do I think everyone should learn what coding is about? Yeah, absolutely. Learning about coding changes the way you think in a positive way. It changes how you approach problems and how you see the world. It changes your mental patterns. Learning about algorithms and complexity theory makes you a more rigorous thinker, and this extends into all aspects of your life. Learning about the way that software engineers approach problems can help you approach problems in any sphere of life in a more logical and productive way.

But "coding" is not the same as "syntax", and this is where the disconnect often occurs.

For instance, in Korea, the general view of programming is that it's slightly above data entry, but management doesn't quite understand (nor care) why. That is, the managers decide the requirements, and they throw it over the wall to the programmers, who, having been relieved of the difficult part (i.e., determining the requirements), simply have to type it in. This is one of the reasons why there is so little respect for engineers in Korea.

The reality could not be more different. Coding is more akin to art. If I were to tell you I wanted to see a painting of a sunset behind a mountainscape, there is no one set path to follow in order to produce the end result. Similarly, given a set of requirements for the features that you desire in a product, coding is the art and science of turning those requirements into reality. There are literally an infinite number of ways that one could do so, and computer science (it's called "science" for a reason) is the field of study devoted (in part) to how to achieve this in the best way.

When Obama participated in the Hour of Code recently (which is awesome, don't get me wrong), he apparently actually spent about an hour to produce one measly line of code. That code?

moveForward(100);

Not very impressive. Does Obama "know how to code" now? Um, no. But he claims it's "not complicated"!, explaining it as follows:

"The basic concept behind coding is that you take zeros and ones, you take two numbers, yes or no, and those can be translated into electrical messages that then run through the computer…. So all it’s doing is it’s saying yes or no over and over again, and the computer’s powerful enough that it can read a really long set of instructions really quickly."

Yeah ... um ... that was a good college try. So now that you know how to code, Mr. President, can you explain to the class what actually happens when a user inputs her personal info and presses enter on healthcare.gov?

Look, coding is fundamental to the future. There is no modern hardware without software, and there is no shortage of stuff for software engineers to do. The world runs on software. But the danger of "everyone needs to learn to code" is in trivializing and misunderstanding what coding actually is. Becoming a competent software engineer is difficult work. Becoming an amazing software engineer is rare enough that there's an extreme shortage of them.

If "everyone needs to learn how to code" gets more people to try coding who would not otherwise, then that's great. But I'd rather see the initial focus be on getting people who wouldn't otherwise try coding to give it a shot, specifically women and minorities, because many of them can be amazing engineers but never even think to try.

Coding is hard. It's difficult, it's painful, and it's often frustrating. But it's rewarding, it's artistic, and it's a fundamentally creative endeavor. It is not akin to mandatory primary subjects such as reading and arithmetic.

The world needs more coders, and it needs them now. But let's give coders the credit they deserve, and let's treat software engineering like the art and science that it truly is.

Monday, February 23, 2015

English Lesson: "한국에 오신지 얼마나 됐어요?"라고 영어로?

I've lost count of how many times Koreans have asked me the question, "How long do you stay in Korea?" in those words or something very similar. Clearly this question is taught in every English class in Korea, because I hear it over and over again, so I just wanted to be very clear about something here:

DO NOT USE THIS EXPRESSION. IT IS INCORRECT.

This phrase is incorrect for a few reasons, but primarily because it sounds ambiguous to native English speakers. Specifically, there are probably two different questions that you really want to ask:

1) How long have you been in Korea? (한국에 오신지 얼마나 됐어요?)
2) How long will you stay in Korea? (한국에 얼마나 있을 거예요?/한국에 얼마동안 있을 계획이에요?)

Nearly always the intended question is number 1, "How long have you been in Korea?", followed afterwards by number 2, "How long will you stay in Korea?". But the incorrectly stated question ambiguously sounds somewhere in between number 1 and number 2. So, don't ever use it again. This concludes the important part of the lesson.

---

For those who are curious, the original question sounds funny to native English speakers because of the use of the present tense "do you stay", since the intended question requires some sort of past tense. Trust me when I say that as written, this usage is incorrect. There are possible ways to make proper sentences with "do you stay", for example:

- When you come to Korea, how long do you usually stay? (한국에 오면 보통 얼마나 있다가세요?)

Until next time, happy language!

Sunday, February 01, 2015

How to Gossip in Korean

If I had to choose an aspect of Korean grammar that is absolutely essential yet is misunderstood or often misused by most foreign learners of Korean, it would be quoted/reported text. In other words, talking about what other people said. "She said she'd arrive by eight, but she's still not here yet." "They say it's going to be really cold tomorrow." "You asking me if I know what I'm doing?" "The teacher says to shut up and start doing your homework." Stuff like that. We use these expressions in nearly every single conversation we have, yet the way this grammar is formed in Korean is so different than English that I see many foreign learners of Korean simply give up and never learn it properly.

Lucky for you, today I'm going to teach you this grammar, and you'll find that it's really not so hard after all!

First off, forget the way this works in whatever language you speak. Because Korean is not English, it's not Spanish, it's not Chinese, etc. Those languages tend to work pretty simply:

First person: I'm going to the store at 3PM.
Direct reported quote: He says, "I'm going to the store at 3PM."
Indirect reported quote: He says he's going to the store at 3PM.

So, so easy. The only thing that changed between the direct and indirect quotes is the pronoun and the conjugation of "to be" to match the pronoun ("I am" => "he is"). Who said English is hard? ;)

Korean is a bit more complicated. In Korean, rather than simply changing pronouns, we need to affix a special ending to the verb stem in order to signify that we're reporting speech. This should come as no surprise, because the entirety of Korean grammar is built around verbs and the special endings they get. It's an agglutinative language, after all.

First person: 3시에 가게에 가요. I'm going to the store at 3.
Direct reported quote: "3시에 가게에 가요."라고 (말해)요. He says, "I'm going to the store at 3."
Indirect reported quote: 3시에 가게에 간다고 (말해)요. He says he's going to the store at 3.

Let's take a look at what's going on here. I wrote these in a way that sounds a little bit awkward, but is instructive.

Direct reported quote:

The direct reported quote is easy, and is very similar to English (which is why many English speakers use this form all the time, even when the indirect is more appropriate). It's used for reporting exactly verbatim what somebody else said. We put quotes around what the person said, and then we affix "라고" to the quote, and then add "he says", "she says", etc to finish off the sentence. Note that I put parentheses around 말해. The reason is that one or both are often left out. Just -라고 하다 literally means "does say so-and-so", so something like "3시에 가게에 가요"라고 해요 means "He says, 'I'm going to the store at 3.'" But Koreans like shortening things if they can, and since the -라고 is the important part in the construction, it's perfectly legitimate to leave off the "saying" verb completely:

Polite: "3시에 가게에 가요"라고요. He says, "I'm going to the store at 3."
Casual: "3시에 가게에 가요"라고. He says, "I'm going to the store at 3."

Indirect reported speech:

The direct quote was simple, but not nearly as useful as indirect reported speech. We almost never quote people directly unless we're acting out something that happened. We're often just naturally saying something like, "He said he's gonna be late." So, how do we form the indirect reported speech? Simply find the verb stem, add -ㄴ다고/-는다고 for verbs (no 받침: -ㄴ다고, 받침: -는다고), -다고 for adjectives (and 있다/없다, which often behave like adjectives), and -라고/-이라고 for nouns. Some examples will make this more apparent.

친구가 오후에 도서관에 간다고 해요. My friend says in the afternoon he's going to the library. Since the verb is 가다, the stem is 가, so we add -ㄴ다고 to get 간다고, and we're good to go.

Quick note on Korean grammar versus English grammar: While "says going" is totally not a valid sentence in English, "간다고" is a completely proper sentence in Korean. The only thing a Korean sentence needs to be complete is a verb. And the ending of the verb tells you how the verb is behaving. So:

간다고. I said I'm going.
간다고. He says he's going.
간다고? Did you say you're going?
간다고? Did you say he's going?
간다고? Did he say he's going?

OMG, how do I know who said what? Well, obviously we need context to understand which meaning is correct, but this is the beauty of Korean - you can express a complete, meaningful statement in one word!

Here's one with an adjective:

선생님이 숙제는 진짜 중요하다고 하셨어요. Teacher said as for homework, it's really important. (i.e., "Teacher said that homework is really important.")

Since 중요하다 is an adjective, when we strip off the -다 to get the stem, we simply add -다고 to make it into reported speech. Also, note that for the actual "speech" verb, we match the tense with the speaker. Since 선생님 is an honorific, we use "하셨어요". Note that we do not have to match the other verb with the subject, i.e., 선생님이 숙제는 진짜 중요하시다고 하셨어요.

And again, we can remove everything but the verb to form a totally valid sentence:

중요하다고! He says it's important!

And now one with a noun:

학생이라고 해요. She says she's a student.

As for the final verb, so far we've been using 말하다 (says), 하다 as an abbreviation for 말하다, or leaving it out completely since the reported speech is clear from the 다고/라고 part. But if you like flourish, you can change the final verb to any speech-related action, like "shouts", "yells", "whispers", etc.

그 여자를 많이 사랑한다고 고백했다. He confessed that he really loves that girl.

In this example, we also show how the final speech verb can indicate the tense of the actual speech that has taken place. That is, 고백했다 is in the past tense, emphasizing that he "confessed" rather than "confesses". The tense of the final speech verb can be whatever you want, e.g., "사랑한다고 고백해야겠다" (I really need to confess that I love her), "사랑한다고 고백하면 ..." (If I confess that I love her ...), "사랑한다고 고백할게" (I will confess that I love her), "사랑한다고 고백했을 때 ..." (When I confessed that I love her ...), etc. The possibilities are endless.

The reported speech verb can also take on a tense:

늦게 온다고. He says he's coming late.
늦게 올 거라고. He says he will come late.
늦게 왔다고. He says he came late.

Combining, both the reported speech verb and the final speech verb can take on tenses:

늦게 온다고 했어. He said he's coming late.
늦게 온다고 (해). He says he's coming late.
늦게 왔다고 (해). He says he came late.
늦게 왔다고 했어. He said he came late.

All slightly different nuances, but constructions we use in English all the time.

So, why is this so useful? Well, as a learner of a foreign language, unless you've got magical powers, you probably are not always 100% sure of what people are saying to you. With the indirect reported speech form, you can now confirm what people are saying by asking, "Are you saying X"?

가: 이게 뭐냐? 진짜 맛없다. WTF is this? It tastes really nasty.
나: 뭐라고? 맛없다고? What'd you say? Are you saying it doesn't taste good?

How incredibly useful is this?? First off, "뭐라고?" is now possibly your most useful Korean phrase. It literally means "What is/was said?", so if you say it to someone who just said something to you, it means "What did you say?". It's casual, of course, so be careful, but you can make it more polite by adding a 요: 뭐라고요? Or with the honorific, 뭐라고 하셨어요? So useful. But be careful with tone of voice, because it can easily be misconstrued as argumentative, as in, "What'd you say??"

The second sentence of the reply, 맛없다고?, is asking if the first person said what you think they said. Note that this is more natural than just asking directly "맛없어?", which means, "Is it not delicious?", which is a weird thing to ask when that's what they just told you.

And of course, other than simply confirming what you think people said to you, you can now begin to talk about what other people said. Time to gossip away!

Next time: Reporting on questions, commands, and suggestions. Plus more abbreviations. In the meantime, the best way to practice this amazingly useful verb form is to start confirming what Korean people say to you. And, you know, gossip about what people said, if that's your thing. :)