Sunday, February 26, 2012

Why do we work?


My heart is in the work
 - Andrew Carnegie



Update: Full video now available! See end of blog post.

There was a great event today! A group called the The Veritas Forum* had invited four professors with different perspectives to discuss the meaning of work, the universe and everything. One of the professors was my employer David Kosbie, whom I have been working with for three semesters (or four, if you count the semester when I took his course), and he presented a "pragmatic humanistic" view on work ethics. Along side him was the Christian, Mike Smith, and the agnostic Marie Norman. Paul Johnston was moderating the debate.

* The Veritas Forum was sponsored by InterVarsity Christian Fellowship, Asian Christian Fellowship, Newman Club, New Life, Knowing and Understanding the Passion of Christ, Graduate Christian Fellowship, Lutheran Student Fellowship and Fellowship of Christian Athletes. Co-Sponsors were the Student Senate, Student Life, Student Affairs, Life Matters, Impact, Agape, Awareness of Roots in Chinese Culture, Society of Women Engineers, Asian Student Association, Lambda Sigma and the Muslim Student Association.

The conversation, as it was called, was great. All of the professors had great insights and stories, and I could nothing but agree with all of them. Of course, I was familiar with Kosbie's strong work ethics, which I keep in high regard, but I was also deeply impressed by the views of professor Smith and professor Norman.

Kosbie was the strongest defender of hard work, which in his experience leads to greatness and fulfilment. However, being motivated by grades, money or status is ridiculous; no, hard work must be motivated by that inner passion that is somewhere inside of there. The hard work we do at Carnegie Mellon is not the goal in and of itself, but it is what we choose to do with the tools we learn here that brings the greatness about. For instance, only this last week, Kosbie had received e-mails from several former students involved in great projects were they applied their programming knowledge to save babies. That is fulfilment and life quality right there, and it is possible because of the hard work these students pour into it.

At the other end of the conversation was Marie Norman, who brought up the point that the second most common regret on our death beds is "I worked too hard." She argued that it is important to find a healthy balance between work and leisure, and that the most important things in life might not be related directly to work, but perhaps to play, rest and family. When asked if her view on work would have any application in personal relationships, she said that some distance might be good sometimes in marital relations as well. You get a different perspective if you put work a certain distance away, and that distance may even help you do your work better when you are there.

Paul Johnston had a short anecdote in which he philosophised over the noun work as used in his field of study, music. In music, you create a work, and you can read and comment on someone's works. Funny thing is, when you perform a work, you play it...

Mike Smith presented a view on work which was very strongly dependent on his Christian faith. As opposed to other religions and the concept of "karma" found in most world-views in some form or another, Jesus says that we by grace are accepted without respect to our works. Whereas the idea of karma dictates that you are judged according to your works, grace doesn't put that kind of fear-like pressure on people. The motivation for doing any work at all is then found in the joy of it. He illustrated this by a quote from the movie Chariots of Fire, where a Christian runner responds to accusations of him caring more about his work than about his faith:

"I believe God made me for a purpose. But he also made me fast, and when I run, I feel his pleasure."

The questions that were asked afterwards were also tremendously great. I don't even understand how people come up with such great questions! For instance, a question addressed to Kosbie was "What if you keep working hard, but never see any success in your endeavours?" Such a great question! Another great question was "how should your philosophy on work be reflected in your personal relationships?" In response to these and other questions many more interesting topics were brought about, such as the community that hard work will create (for instance, Kosbie's class has a very strong community).


By the way: I recorded, mixed and mastered the soundtrack of the video above. Great times with Kwadwo and friends. Also: great job catching Kosbie on film, Kwadwo!
Also: Kosbie just recently won the Herbert A. Simon Award for Teaching Excellence. We (CA's and tutors and everybody) are all very proud to be on his team. Congrats, David, you deserve it!
Thirdly: (or fourthly?) Great job, and thank you so much to everybody who volunteered to make the Veritas Forum happen. I'm so glad I know you all! Thanks also to the panelists for making this such a great and honest conversation.



CMUVeritas
Kosbie.net
Department of History: Marie Norman
Heinz College: Mike Smith
School of Music: Paul Johnston
Wikipedia: Chariots of Fire

Wednesday, February 8, 2012

Boarding Airplanes Simulation

In lack of anything deep to write about, I decided, wait... In spite of the overwhelming amount of deep topics to write about, I decided to write about this project I'm doing in one of my classes: I'm writing an airplane boarding procedure simulator. It is only a small project, and it is due this Thursday. It is nothing big, just fairly interesting.

(Strangely, there has also been a request for technical material on the blog)

If you have ever travel by air on a regular basis, you most certainly have wondered at some point or another why boarding the plane isn't more efficient. Well, I certainly have. Whenever I have to wait for a guy to store his luggage in the overhead bin, and there is plenty of room behind him, I get this sense that I should have boarded first. But how much time can we possibly gain by boarding in a non-randomized order? Well, this simulator aims to compare different strategies.

To start off, let us create a plane with seats and an aisle, and then let the aisle extend out of the plane and up to that boarding arm hallway thing that takes passengers between the airplane door and the actual terminal building. Then we fill up this arm with a line of passengers; each passenger is given a ticket, either at random, or sorted by whatever algorithm.

Now that we have lined all the passengers up outside the aircraft, each passenger will try to move towards their seat; at first, however, only the very first person in line can actually move! So what do the other people do? Well, they wait until the person in front of them has moved away, which of course takes some time. Then the next thing to consider is when a man has reached his row, he will use extra time to sit down, holding up everybody waiting to get past this point, and also holding up those waiting to get to a row that is occupied by the line of people waiting to get past that man who was sitting down. Now, if the man has a window seat, it may take longer if there is another passenger sitting down at the aisle seat...

It all turns out to be a big scheduling problem, but it is also a somewhat interesting model; each individual person exists inside the plane (in the aisle or in a seat), but it is also the actions of the individuals that change the state of the plane. The individual persons themselves will schedule their own actions based on their target seat and their environment, and some actions (i.e. movement) will change the state of the plane as well as the passenger. Actually, it turns out that most actions are simply to schedule a rescheduling while waiting for something to happen. It is like, writing down in the calendar that one ought to update the calendar. It all got juggled up in my head, at least...
I do have it working by now, but not elegantly, and I haven't generated any interesting line orderings yet. We'll see how it goes. Also, it has clearly been a while since the last time I used Java, so referring to the notes of my old introductory course has been invaluable. So what is the most efficient way to board a plane? I might find out tomorrow.