Programming Paradigms

Computer science is a relatively young field, and it has rapidly evolved ever since its inception. This becomes increasingly evident when you look at computer science being taught versus computer science being used. This is extremely apparent in the misnomer: computer science. CS is more technical art than science.

For a long time, computers had finite computational resources and memory. Today, our average consumer-grade computer is comparable to a super computer from 1985. Thusly, the twenty first century requires programming paradigms far different from those taught in the twentieth century. It no longer pays off to optimize the number of calculations or amount of memory your program uses, unless you are specifically performing mathematically intensive operations. This blog voices that sentiment much better than I can.

So programming now is about implementing an idea. Its easy to rise above the technical nitty gritty details and focus on the concept at hand. Then programming becomes a form of poetry, in which you express your ideas in a structured and rhythmic way. Programming, at a consumer level, is no longer about getting a machine to do what you want; its about empowering people.

Just like a poet spends many hours revising their verses and getting the words to say exactly what is meant, a programmer spends hours rearranging and improving code to fulfill their idea effectively. And like poetry, there are many genres and styles of programming. Unfortunately, programming is also like poetry in the way that many students get turned off to it by the experiences they have with it in school.

Programming should be taught with the main objective in mind: we are here to accomplish a mission. Writing mechanics are practiced and improved, but without an idea behind a poem or story, it is pointless. Algorithms are important, and so is project design and planning. But these are merely implements with which to express the programmer’s idea.

This is why the most successful software is easy to use, is powerful, or grants people an ability they didn’t have before. When you use a program, it doesn’t matter whether all the variables are global, whether the project was built top-down or bottom-up. The functional differences of some of the most disputed methods are miniscule. Optimization is a trivial concern when compared with the user interface. Is the parse speed of one file format more important than the support of a larger number of formats?

Kids want to be programmers because of coding heroes like Notch, the creator of Minecraft. But Minecraft isn’t well-designed. In fact, the program is a piece of crap that can barely run on a laptop from 5 years ago despite its simplicity. But the idea is gold, and that is what people notice. This is why Minecraft and Bioshock, and not COD, inspire people to be game developers.

However, functional programming is the CS taught in schools. Schools need to teach the art of computer science, not only the science. Imagine if writing was only taught, even up through college, in the scope of writing paragraphs. Essays and papers would just be a string of non sequiturs (kind of like this blog). Fiction would have no comprehensible story, only a series of finely crafted paragraphs. Only those who figured out the basic structures of plot, perhaps by reading books by others who had done the same, would learn to write meaningful stories.

In the future, everyone will be a programmer to some degree. At some point data will become so complex that to even manipulate information people will need to be able to interface with data processors through some sort of technical language in order to describe what they want. To survive in a digital world you either need software to help you interface with it, or learn the language of the realm.

Yet children are being driven off in droves because computers are being approached in education from completely the wrong angle. Computers are tool we use to accomplish tasks; the use of computers should not be taught just because “people need to be able to use computers in order to survive in the modern world”, but because children will be able to implement their ideas and carry out tasks much easier if they do have an expanded skillset on the computer. Computer skills should be taught in the form of “how would you go about doing X? Ok, what if I told you there was a much easier way?”

Advertisements

History is Cool

I’ve seen some talk about education pop up both on Twitter (Twitter is awesome) and in real life. It’s fairly apparent to many people that education ain’t what it used to be. Which is, to some degree, true. But the fact of the matter is that education hasn’t changed so much as the role that education needs to fulfill. I believe I’ve described in an earlier post the shift from industrial to post-industrial education, but I’ll reiterate.

After the industrial revolution, the demand for factory workers was high. Factory workers only need minimal education, about up to the elementary school level. These blue collar workers would become manual labor. Those who were smart enough went to high school, and became white collar workers. A select few of those people would go to college and become doctors, lawyers, scientists, judges, etc.

The parallax between then and now is obvious. As the demand for laborers has decreased and the demand for engineers has increased, more and more people are attending college. Unfortunately, the education system has not responded well to this influx. The collegiate system has become bloated as it tries to accommodate the new waves of people who need a college degree to get a decent job. The world has lost sight of the true reason for getting an education; although a person does get a certification as a result of attending college, their objective should be to learn.

Public education in elementary schools and high schools has also done a shoddy job of flexing its methods to prepare students for the constantly changing future. For example, children were discouraged from becoming artists 20-30 years ago, yet there is a high demand for creative people to create all sorts of digital media. As a modern example, elementary school curricula stress plate tectonics and other basic geology, drilling it into students’ heads year after year. That may have been necessary 40 years ago, when the theory was young and a majority of people still distrusted it, but now it is commonly accepted fact and there is no reason to stress it.

Not only is early education slow to change with the times, but it actively discourages children, intentionally or not, from learning some necessary skills. For example, the vast majority of people I talk to, even students at TJHSST (one of the top high schools in the country) haven’t seriously read a book (and certainly not for enjoyment) since the 3rd grade. The early grades have given them such a bad experience with reading that they dismiss all books as boring. This, quite obviously, is distressing. Disillusioned and lazy teachers teach interesting subjects like history and math in ways that turn children off, perhaps for life.

But history is cool. Yes, it’s also boring. But so is math, science, programming, reading, writing, foreign language, and sports. My point is, every subject has areas that are uninteresting to the uninitiated, and EVERY subject can be taught in a manner that makes you want to eat your own skull rather than listen to another second of it. The key to teaching a subject is show the student that it is awesome, and then start teaching the basics. Most importantly, though, make sure the student realizes that the field extends far beyond what they are learning right now.

Here are some examples of sweet historical events/times/people:
-The transition from Roman republic to empire
-The Battle of Agincourt
-The Fall of Constantinople
-The Mongols beating the crap out of everyone and being awesome
Nikola Tesla
Charles Babbage (way cooler than Tesla)

But not only are there examples of people who were incredible badasses, but even periods of history like the colonization of North America and the Middle Ages are inspiring. I find that whenever I read a textbook, my mind drifts off as I build a science fiction or fantasy universe which mirrors the status quo of that period in history.

But I digress. Essentially, learning is REALLY FUN. It can also be THE MOST BORING EXPERIENCE EV-OH MY GOD I JUST WANT TO TEAR MY FACE OFF WHY IS THIS SO UNINTERESTING.

Come on guys (yes, you). Step it up.

I’ll end with a quote from Saul Perkins: “My thesis is that 21st century parents should teach their kids three languages: English, Mandarin and coding. Software is so much a part of our lives to today that this is just a fundamental skill that people need.”

Traditional Values

As you may have heard, Dan Cathy, president of Chic-Fil-A, came out and denounced same-sex marriage, citing support for the “biblical definition of a family”. As you can imagine, this turned into a huge media firestorm, which consequently got the fast food chain banned from Chicago. Then Santorum and Huckabee decided to get behind the company’s statement and declared a “Chic-Fil-A day”.

“We are very much supportive of the family — the biblical definition of the family unit. We are a family-owned business, a family-led business, and we are married to our first wives. We give God thanks for that.”
-Dan Cathy

I believe the first thing to do when investigating this delicate situation is to look further into what exactly was said by Cathy. Most news sources are citing this interview. In it, Cathy states that the company is firmly based around Christian values. Just to clarify, I am totally on board with that. It’s pretty incredible that a huge company, especially a fast food chain, would have the balls to do that in this modern age of anti-Christian rage. Some examples of this support include being closed on Sunday and training employees in Christian values and excellent customer service.

While citing the Bible as providing a Christian definition of marriage is fine (it is quite clear on the subject that marriage is only between a man and a woman), I don’t think it should be used to dictate the law. And I really don’t think it is proper to cite the Bible as a reason against homosexuality. Not only is the good book’s stance questionable when it comes to gays, but it also has some other “values” that the company seems to disregard. Take for example, Leviticus 19:19.

“Keep my decrees. Do not mate different kinds of animals. Do not plant your field with two kinds of seed. Do not wear clothing woven of two kinds of material.”
-New International Version

Wat. Guess you’re going to Hell for wearing those polyester-cotton blends. In fact, it seems that Chic-Fil-A employee uniform shirts are 55/45 cotton/poly.

“…a deep blue, ¾-sleeve, 55/45 cotton/poly woven shirt with stain-protection and wrinkle-resistant treatments, and flat-front, 60/40 cotton/poly pants with soil-release properties.”
Nicole Rollender

And that chicken Chic-Fil-A is serving? Bet that was bred to be the meatiest chicken possible.

“We are proud to have many long-standing relationships with our chicken suppliers, who highly value their association with the family farms where the chickens grow. Often these farms are diversified – they raise a variety of crops and livestock. Our suppliers follow strict animal welfare and nutrient management practices.”
Chic-Fil-A’s website

But wait! Many, including myself, would argue that when Jesus makes the New Covenant, the Mosaic Law no longer applies to Christians. Ok, so that nullifies any argument made with the Old Testament. And by the way, those arguments tend to cite the destruction of Sodom and Leviticus 18:22 and 20:13.

“You shall not lie with a male as one lies with a female; it is an abomination”
-Leviticus 18:22
“If there is a man who lies with a male as those who lie with a woman, both of them have committed a detestable act.”
-Leviticus 20:13

Ok, so where in the New Testament is homosexuality denounced? In fact, the subject is only mentioned in 3 passages: 1 Romans:26–27, 1 Corinthians 6:9–10, and 1 Timothy 1:8–11.

Do you not know that wrongdoers will not inherit the kingdom of God? Do not be deceived! Fornicators, idolaters, adulterers, male prostitutes, sodomites, thieves, the greedy, drunkards, revilers, robbers—none of these will inherit the kingdom of God.
-1 Corinthians 6:9–10, NRSV

Now we know that the law is good, if one uses it legitimately. This means understanding that the law is laid down not for the innocent but for the lawless and disobedient, for the godless and sinful, for the unholy and profane, for those who kill their father or mother, for murderers, 10 fornicators, sodomites, slave traders, liars, perjurers, and whatever else is contrary to the sound teaching that conforms to the glorious gospel of the blessed God, which he entrusted to me.
-1 Timothy 1:8–11, NRSV

Two of these passages, specifically those in 1st Corinthians and 1st Timothy, only mention homosexuals in passing, if at all. The offending terms are placed in the middle of a generic laundry list of undesirable people. This is the equivalent of using the term “gang banger” to refer to any sort of any delinquent. Moreover, the translation of the Greek to “male prostitutes” and “sodomites” is questionable. Here I cite from William O’ Walker.

“The Greek word translated as ‘male prostitutes’ is the adjective malakoi (plural of malakos). This adjective means ‘soft,’ as in a ‘soft’ bed or a ‘soft’ pillow. When applied to people, it can mean ‘lazy,’ ‘self-indulgent,’ ‘cowardly,’ ‘lacking in self-control,’ and the like. When applied to males, it generally refers to what are commonly regarded as feminine-like ‘weaknesses:’ such men might be regarded as ‘soft,’ ‘flabby,’ ‘weak,’ ‘cowardly,’ ‘unmanly,’ or ‘effeminate.’ But to call a male ‘effeminate’ might or might not carry implications of homosexuality.”
The Fourth R

He goes on to explain how the terms “arsenokoitai” and “malakoi” could be interpreted in many different ways.

People have assumed that malakoi does refer to homosexuality in 1 Corinthians primarily because the next term in the list is arsenokoitai (defined below)—the assumption being, of course, that the two words are somehow linked in meaning because they appear side by side in the list. This, however, is by no means necessarily the case. “The greedy” and “drunkards” are also juxtaposed in the list, and it would be difficult to see any link between them.

But even if malakoi and arsenokoitai are somehow linked in meaning, it is not at all clear just how arsenokoitai should be translated. It comes from two Greek words: arsen, which means “male” (as opposed to “female”), and koite which literally means “bed” but by extension can be a euphemism for sexual intercourse (like “going to bed” with someone). This would appear to suggest that arsenokoitai refers to males who “go to bed” with other males. But Dale B. Martin has pointed out that the meaning of a compound word cannot necessarily be determined by breaking it apart, looking at the meaning of each of its parts, and then simply combining these meanings to determine the meaning of the compound word. As an example, Martin cites the English word, “understand,” which has nothing to do with either “standing” or “being under.”

Numerous other examples could be cited, but I want to mention one that is closer to the topic under consideration. The word I have in mind is the vulgar term, “mother-fucker.” We know what this word means literally. But when people use it, they typically are not referring to someone who has sexual intercourse with his mother (or even with someone else’s mother). In fact, the word normally does not refer to sexual activity at all. The point is, however, that its original sexual meaning is often not apparent in its actual usage. And the same thing may very well be true of the Greek word arsenokoitai. It is a rare word. According to Martin, though, when the word does appear independently, it is typically found in conjunction not with sins of sexual immorality but rather with sins related to economic injustice or exploitation. … We often use sexual language to talk about things that have nothing to do with sex. For example, someone might say, “I really fucked up!” without having sex in mind at all. Or think about how we sometimes use the word “screw.” If I say, “I really got screwed on that business deal,” I’m not talking about sex, but I am talking about exploitation. … The bottom line is that we simply do not know what the word meant or how it was used in the first century.

In a way similar to how slave traders quoted parts of the Bible that, out of context or interpreted in certain ways, seemed to legitimatize their actions, those opposed to homosexuality or homosexual marriage could easily use these passages to support their advocation of the “traditional” family.

Leaving those passages aside for now, let’s examine what Paul says about homosexuality in his letter to the Roman church. In short, homosexuality is not mentioned as a sin, per se, but as punishment by God for idol worship. I’m not sure what the Bible has to say about Masochism, but if it does forbid the enjoyment of punishment, then why are anti-gay groups only targeting gays? They should also go after the greedy (recording industry), gossips and slanderers (news corporations), and God-haters (anti-Christian groups). Also those who disobey their parents.

“For although they knew God, they neither glorified him as God nor gave thanks to him, but their thinking became futile and their foolish hearts were darkened. Although they claimed to be wise, they became fools and exchanged the glory of the immortal God for images made to look like a mortal human being and birds and animals and reptiles.

Therefore God gave them over in the sinful desires of their hearts to sexual impurity for the degrading of their bodies with one another. They exchanged the truth about God for a lie, and worshiped and served created things rather than the Creator—who is forever praised. Amen.
Because of this, God gave them over to shameful lusts. Even their women exchanged natural sexual relations for unnatural ones. In the same way the men also abandoned natural relations with women and were inflamed with lust for one another. Men committed shameful acts with other men, and received in themselves the due penalty for their error.

Furthermore, just as they did not think it worthwhile to retain the knowledge of God, so God gave them over to a depraved mind, so that they do what ought not to be done. They have become filled with every kind of wickedness, evil, greed and depravity. They are full of envy, murder, strife, deceit and malice. They are gossips, slanderers, God-haters, insolent, arrogant and boastful; they invent ways of doing evil; they disobey their parents; they have no understanding, no fidelity, no love, no mercy. Although they know God’s righteous decree that those who do such things deserve death, they not only continue to do these very things but also approve of those who practice them.”

-1 Romans 1:21-32, NIV

As for the argument that homosexuality is somehow a “sin against nature” or otherwise unnatural, I find it interesting that such an argument would be made in the first place. First of all I’m not even sure what that is supposed to mean; would a proponent of that argue that anything specifically human is a sin against nature? In that case, homosexuality wouldn’t even fall under that category, since animals also show homosexual behavior. On the other hand, technology, speech, and writing actually ARE sins against nature.

But why hold up animals as a standard for behavior? Animals eat their children sometimes, but we don’t do that. At least not usually. Well, think about it this way: animalistic behaviors in humans can be divided into three categories; necessary, unnecessary, and harmful. Necessary behaviors are things like breathing, eating, pooping, etc. Unnecessary are things like playing. Both of these categories are legal. Harmful activities, like killing, raping, cannibalism, and infanticide are, with the last one being an exception, illegal. Since innocent homosexual behavior is neither harmful nor necessary, I see no reason to think it any more unnatural than playful behavior.

Of course, I digress. When Dan Cathy said that his company adheres to Christian values and he supports the “biblical” definition of a family, he wasn’t denouncing homosexuality (although I’m sure he has some beef with it). After really thinking about the controversy, I don’t actually see any conflict of interest.

All Cathy is saying is that he and his company stand behind one definition of a term. The government might stand behind a different definition. Activists may support another. The point is that if I announce “I believe that marriage can only happen between two people of the Caucasian race, regardless of gender” (which I don’t), that doesn’t mean that I can legally discriminate against married couples that fit a different definition. In fact, what I think doesn’t matter to anyone, until I make actions based on those opinions.

Obviously, whether or not the government thinks gay marriage should be legal is a MUCH bigger deal. And while we’re on the subject, I might as well give my two cents.

The only reason marriage exists in the legal system at all is because of tradition; but while its there, it might as well serve its purpose. When you think about it, the only possible reason the government should care about whether two people are symbolically bound together in an arbitrary ceremony is that children are born afterwards. The difference in taxes and other legal differences as a result of marriage are merely helpers to this function; marriage is not for the taxes, the taxes are for marriage. The government needs to ensure that children are being raised in an environment that will not turn them into criminals.

Based off of this definition of why legal marriage exists, one could make the argument that gay marriage should not be legally recognized because two people of the same sex cannot produce children. But by the same logic, a marriage in which one or more of the partners is sterile should also not be recognized legally. But of course both straight and gay married couples have the option of adoption. Following this line of reasoning to its conclusion, allowing gay marriage but disallowing gay adoption is paradoxical and a waste of government resources. The two rights should, by necessity, come bundled together.

Thus, the only remaining line of defense for those opposed to gay marriage and/or adoption would be that children raised by a gay couple are somehow deficient when compared to those raised “traditionally”. In response, I quote Judith Stacey, a professor at USC and holder of the Streisand Professorship in Contemporary Gender Studies. From the sound of the article the quote comes from, homosexual parenting is actually beneficial in many ways.

“We found that despite the ‘no differences’ mantra, many studies do report evidence of some intriguing differences, and even of some potential advantages of lesbian parenthood. A difference is not necessarily a deficit.”
Judith Stacey

Zones of Thought

I recently finished a book by Vernor Vinge called Children of the Sky. It was the sequel to A Fire Upon The Deep. They are part of a continuing series called the Zones of Thought series, which has overtaken the Known Space (by Larry Niven) series as my favorite series of books.

The series is based on the premise that the galaxy is divided into these so-called “Zones of Thought”. They dictate the level of automation and intelligence physically allowed in that region of space. They are an inherent property of the galaxy, but their boundaries can shift, either slowly over thousands of years or rapidly in “zone storms”. They radiate out from the center of the galaxy.

A map of the Zones of Thought

A map of the Zones of Thought

The zones are as follows:

At the center of the galaxy are the Unthinking Depths. Intelligent thought is impossible, and computers fail. Humans turn into animals.

Beyond the Depths is the Slow Zone. The speed of light is the ultimate cap on speed and hyper-intelligence is impossible. Computers cannot become sentient.

Above the Slow Zone is the Beyond. In the Beyond, faster-than-light travel and communication is possible, and automation becomes much more capable. The Beyond falls into layers; FTL drives increase in capability as you get “higher”. Machines built in the High Beyond will work less efficiently or fail in the Low Beyond. Most of interstellar civilization exists in the Beyond.

The highest Zone is the Transcend. The Transcend is the subject of much study in the Beyond in the field of Religion. This is because the Transcend is populated by hyper-intelligences called Powers that are essentially gods. Products manufactured in the Transcend are often sold to the Beyond, such as anti-gravity fabrics, machinery, etc. Powers sometimes interact with Upper Beyond civilizations by sending “emissary ships”.

A Fire Upon The Deep is based around a malevolent Power that is awakened from an archive in the Low Transcend that is the subject of a human expedition. The Blight, as it is called, proceeds to wipe out local civilization in the High Beyond. Only a single human ship escapes from the “High Lab” in the Low Transcend, and it carries a portion of the archive that, if reunited with the Blight, will destroy it. The Blight recognized this (it had been defeated in a similar way long in the past) and set out to destroy the Countermeasure.

Another human group figures this out and, with some help from another Power that is subsequently murdered (nobody is quite sure how Powers work) by the Blight, escapes the Blight’s invasion and travels to a world at the bottom of the Beyond where the ship carrying Countermeasure has taken refuge. The Blight pursues them, causing havoc in that part of the galaxy.

In the end, Countermeasure uses some strange Transcend technology to harness the system’s star (it actually goes dark for a little) and cause a massive Zone storm that extends the Slow Zone to engulf the world and the Blight (30 light years out from the world) and much of the Beyond in that part of the galaxy. This traps the Blight and the humans in local space, giving the humans a century or more to build up the technology of the civilization on the planet before the Blight builds ramscoops and comes to destroy its nemesis once and for all.

What really interested me about the book was the world the humans become stranded on. It is inhabited by an interesting alien race. Each alien is composed of 4-8 individual “members”, and so they are referred to as packs. Each member is a dog-like animal that communicates with the others using “mind sounds”. This raises some interesting consequences; for one, two packs cannot get extremely close to each other without losing consciousness; it is very hard for packs to work collaborate and thus it is hard for new technology to be made. Their civilization has been stuck in a medieval state for a long time. Packs also live for a very long time. They replace old members either through inbreeding (within their own pack) or by breeding with another pack. The only way for a pack to die is if all of the members die, which pretty much only happens in combat (or sickness). Packs can also split into two or merge. Also, each member contributes different aspects of personality to the pack. This means that packs can be planned, called broodkenning. Essentially, people can be “built”. Of course, when the first four humans land on the planet, all hell breaks loose.

The four humans from the High Lab are a family, with a small boy and a adolescent girl. The two parents are killed in an initial attack launched by the militaristic northern kingdom the humans set down in. A pair of traveling packs see the attack and kidnap the wounded girl, taking her back to a more understanding, peace-loving kingdom (ruled by “Woodcarver”) in the south. The boy is captured by the northern “Flenserists”. He doesn’t realize that they are malicious though, and ends up befriending a pack that was built entirely from puppies (usually such packs become autistic). The two are manipulated by Flenser and start communicating with the human rescue expedition. Woodcarver’s kingdom has a dataset from the girl, and they use it to build cannons and prepare for war with Flenser in the north. However, Flenser has the support of the rescue party (since they don’t know that Flenser is evil). Eventually Woodcarver defeats Flenser in a battle just as the rescue party arrives.

Vernor Vinge always creates interesting aliens. There are others in his series, such as the Spiders in A Deepness in the Sky and the Skroderiders (sentient plants, essentially), who are space traders in A Fire Upon The Deep. I draw a lot of inspiration from his stories, both in character design and plot creation.

%d bloggers like this: