Sunday, October 21, 2012

Vote According to Faith


As a republican pastor friend of mine once pointed out to me, I am a very opinionated person. I will make no attempt to deny that characteristic, and by writing this blog post, I assume that trait will only become more apparent. Because I will here give my take on the presidential election that is coming up, and explain why I hope my favourite candidate will be re-elected.
First of all, let me defend my right to have an opinion, since this may not be obvious to everyone. I am a Norwegian citizen, and do not have a permanent residence in the United States. I have, however, lived in the US for the last three years during the undertaking of my bachelor's degree. More importantly, the United States is the leading nation of the western world, is the major player in the NATO military alliance, and has an enormous cultural, economic and political influence around the globe. The course that America is taking has had, and will have, a direct impact on the life of me and my family, my country and our common world.

Still, the most important reason why I am entitled to have an opinion is because the US represents me, whether I like it or not. The actions of America represent the actions of the entire Western World. The actions of America are by many also (mis-)understood to represent the actions of Christianity. I love my home, my heritage and my faith, and it is important to me how these are represented. Therefore, I have an opinion.

Secondly, let me make it clear that my opinions are not representative of Intervarsity Christian Fellowship, Woodland Hills Church, any other faith-society I may or may not associate with, or Jesus Christ himself; my political view is merely my personal opinion, though of course influenced by my faith and worldview. In fact, Jesus specifically stated that his kingdom is not of this world.

"My kingdom is not of this world. If my kingdom were of this world, then my servants would be fighting so that I would not be handed over to the Jews; but as it is, my kingdom is not of this realm."
 - Jesus (John 18:36)

"You know that the rulers of the Gentiles lord it over them, and their high officials exercise authority over them. Not so with you. Instead, whoever wants to become great among you must be your servant, and whoever wants to be first must be your slave – just as the Son of Man did not come to be served, but to serve, and to give his life as a ransom for many."
 - Jesus (Matthew 20:25-28)

The job description of a Christian, then, is not to pass laws against people, like politicians do, but instead to be a servant for the people around us. The job description of a Christian is not to participate in election campaigns to protect our rights or take America back for God; rather, the Kingdom of God is manifested whenever we pick up our cross and sacrifice in love for the weak and the oppressed. The job of the church is not to dictate a certain moral for people outside of the church, but to worship God by merit of how we live our own lives.

At this point I was supposed to tell you whom to vote for, and why. But that will be for another time. I temporarily persuaded myself to shut up.


Woodland Hills Church: The cross and the sword
Jeff Figearo's blog: The cross and the sword
Warrior of Agape: What has faith got to do with it

Greg Boyd on the difference between the two kingdoms:


Tuesday, July 10, 2012

Ten things that should be legal

It has been a popular topic for discussion in certain political circles lately, which bans are stupid, or if bans are stupid at all. It started with the leader for the social liberal youth party, Sveinung Rotevatn, who published a list of 21 things he wanted to allow. Now, I totally agree with his sentiment, but I could not agree less with most of the list itself. Therefore, I have created my own list of things I want to allow, borrowing some from Sveinung and bringing up some of my own.

Water Scooters
Water scooters are fun boats, and if people use them irresponsibly, we should stop the irresponsible use rather than the vessel itself.

Bringing liquids through airport security
Airport security is not at all proportional to the risk of terrorist attacks. We should start easing up the security hysteria by allowing passengers to bring their sunscreen and chocolate milk through security.

Breeding Rabbits
I see no reason why breeding rabbits for fur is any different from breeding any other animal for fur. If rabbits are tortured in breeding, we should stop the torture, not the breeding.

Segway
Moving from one place to another can be tiring for some people, so why not allow them to use a Segway?

Walking the dog without a leash in certain areas
The vast majority of dogs do not need a to be in a leash to behave properly. Every municipality should allow some part of their land to be free for walking dogs without a leash. For instance, Bergen could allow this on Løvstakken and Blåmannen. Of course, the owner of the dog will still be 100% responsible for the dog's actions.

Hunting with bow and arrow
Bow and arrow is an old and historic way of hunting. And The Hunger Games was an excellent movie. I vote that we allow it.

Right turn on red
It is effective, easy to learn, and is used in other countries with success. Why not give it a try?

Biking across a pedestrian crossing
Biking should be convenient and legal. No reason to have a law that nobody follows anyways.

Dual citizenship
In many families, the most natural state would be to have citizenship in more than one country. The disadvantages are few, and it works elsewhere. I say go for it!

Voting for 16-year olds
16-year olds are interested in politics, and care about the society, probably more than many older people do. I say we give them a vote.

Thursday, April 12, 2012

Distributed Laptop Orchestra

So, this semester I've been involved with this really interesting class at Carnegie Mellon: 15-323 Computer Music Systems and Information Processing. Taught by one of the creators of Audacity and Nyquist, Roger Dannenberg, the course aims to give the students a broad background in how music is treated programatically, to the point were at the end of the semester we can all co-operate to build a full-blown laptop orchestra application!
On Monday April 16, it is going to happen; the world largest distributed laptop orchestra is going to perform as a part of "Symposium on Laptop Ensembles & Orchestras" at Louisiana State University. Apart from LSU and Carnegie Mellon, five more universities in the US and UK will participate

Stanford University
Texas A&M University
University of Colorado
University of Huddersfield (West Yorkshire, England)
Queen's University (Belfast, Northern Ireland)

It will definitely be a late night for our friends on the east side of the Atlantic, as the concert starts at 20:30 EDT (New York -time). That equates to 01:30 BST! And at that time, I will sit on the stage at UC McConomy, eager to hammer notes and sounds out of my keyboard. I expect my fellow europeans to be the same.

The previous CMU laptop orchestra
I also hope the laptop orchestra will actually work. That piece of software right there is running my code - I do not want it to crash with such great universities watching and participating.

If you can't come to McConomy to hear the Carnegie Mellon -version, you should tune in to the live stream from LSU!



If you are interested in the source code for the project, it is available as open source. In fact, you can even download the code and participate yourself! There are instructions on how you should use the system online as well, so I will not go into details here; but I'd still like to give a brief technical overview of the project, and discuss some of the interesting challenges:

(At least to me, they are. But I take no offence if you stop reading now :-)

A performer's computer is connected physically to a live PA system in each of our 7 locations via mini-jacks on the headphone port; our software contains sampled sounds it will loop or play once, depending on the nature of the sound, and it can also generate a few waveforms.

(In order to do this, we must know how to generate, process and play back music in real time on the computer. The music is generated in blocks of bytes, each representing a very short time of sound, by the standard of an ear; this block is then pushed into the computer's music playback buffer, and then the next block is generated. This must be done on a high priority thread, to prevent any lagging. That kind of stuff is what you learn in this course.)

After the music is pushed out to the analog mixer, it is mixed and sent two places: a) To the local speakers, and b) as a soundstream to LSU.

In the local mixer, there is then one input channel for each performer, as well as a stereo input coming from LSU. The stream from LSU contains all the sounds from LSU as well as all the sounds from the 5 remaining locations. Thus, there will be some pretty significant latency issues; speed of light is only so fast, and there is lots of network jitter as well. The sound from LSU will then have some latency, and the sound from the other universities will have an average of twice that latency. This also has the consequence that the performance will sound different at each location, depending on the local mix and also on the varying latencies.

Roger Dannenberg, conductor
(play picture as sound)
So how do the performer know what to play? It certainly can not be very rhythmic considering the constraints discussed in the previous paragraph. But it should be somewhat synchronised, to create at least some sense of structure. To do this, we have created a conductor interface.

The conductor (Roger) will be able to send various conducting messages through a special mode in the software. These messages will appear in the window for all the performers, so that the we can play according to the conducting; variable parameters controlled by the conductor include

* Intensity
* Dynamics
* Pitch (high/med/low)
* Play/stop/fade in/fade out
* Music language/Sound architecture
The performer interface; top half is determined by conductor
Note that the conductor can send different messages to different universities, or "orchestras" as we cleverly named them in the software. There is also a chat system based on an hierarchal form, so anyone can send chat messages to anyone, everyone in a single orchestra, or everyone in the federation of orchestras.

To make all of that work, there is a lot of network logistics going on. The network is organised by nodes and supernodes; all nodes are connected to a supernode, and all supernodes are interconnected. When sending a message from a node (say, the conductor node), the message is first sent to the supernode, then from the supernode to the correct supernode(s) (if applicable) and then from the supernode to the individual node(s).

But, how do the conductor node know at what IP address its supernode is? To do this, each node will register with a special server (currently running at CMU) when they start up. This server will inform the node of what IP its supernode has, or if there is no supernode yet. If there is no supernode yet, then the supernode will initiate a connection when it is set up. In this fashion, as soon as a node is registering with the server, the server will provide information about all the nodes with which it should connect; if the node is a supernode, this includes all nodes in his orchestra, as well as all the other supernodes.

In addition to this, there is a clock synchronisation protocol running, and there is also a performance monitoring system that keeps track of how much data is being sent to and from each node. My contribution to the code has mainly been on this performance monitoring system. It basically collects information of all messages going in and out of a node, as well as the latency to the closest "parent" node (where the node containing the original clock is the uppermost parent; this should be the supernode at LSU).


In sum, this is going to be pretty awesome, and I'm looking forward to celebrate the anticipated huge success of our concert. Wish me luck, and tune in on Monday!

CMU School of Computer Science: Laptop Orchestras in Seven Cities Unite Via Internet for First-of-its-Kind Concert
15-323: Computer Music Systems and Information Processing
LSU: Symposium on Laptop Ensembles & Orchestras

Tuesday, March 13, 2012

Electronic and Computer Music

I made up my mind: I dropped this class. There was no fun in it anymore, and this electronic music stuff just became too much nonsense. Our next assignment was to create a piece of "Music Concrete," a french style of creating music based on recording various non-musical sounds and clipping them together in some random fashion and then claim it to be "music." The assignment coming up after that was all about creating noises artificially, and then do the same to them. No, I'm glad i dropped it.

However, I did get to create these two pieces for my first assignments:

Saga

Holmes

Amusingly, shortly after releasing these tracks on Soundcloud, I was contacted by a guy named Ryan Kintz (from a company called "Afton Feedback") who asked me for booking information. This was of course too good to be true, and after a bit of research I found out that Kintz makes a living basically by charging bands for giving concerts.
The Rex Theater, Pittsburgh
Some people called it a scam, but at least it seems like a pretty fair scam.

I would love to play at The Rex Theater sometime, mr Kintz, but only if you could convince me people would actually come. Also, I probably need more than a soundcloud account and an internet connection in order to actually give a performance. Some ridiculously oversized headphones, a broken record player and a sidekick with blonde spikes would do good for starters.

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.