Stefan Rusek | No more 24 for me

No more 24 for me

Saturday, January 10, 2009

It has been about a year and a half since the previous season of 24 ended. In the past I might have been planning a big season premiere party tomorrow, but I've been doing some thinking over the past 19 months. I still think that 24 is a an incredibly exciting show and love to see Jack Bauer fight to save thousands of lives, but this year I am making a stand: I will no longer watch 24.

A little over two hundred years ago, a bunch of people got together to design a government unlike the many that came before. They felt strongly that the government should not have unlimited power. They shared a common belief that all governments everywhere should have limited power, and checks on the power they are given. This emphasized the idea that there were certain powers that a government should never be given. Thus for over 10 generations, the United States has stood as a lighthouse shining a light of human rights throughout the world.

There have been dark periods in the history of the US, where the government and its leaders have marred its human rights record. Yet, no period has been darker than the past eight years. In this short time, we have fallen from the high place of global respect and influence to a pit where despots around the world can torture with near unaccountability, since the US can no longer call them out for their wrong doing, and when others point it out, they can point at the US and say "If they can do it, so can we."

I do not blame 24 for making the world less safe, but far too many people think there are situations where torture is acceptable and that torture leads to useful intelligence. 24 has certainly helped to spread the idea that torture is both acceptable and useful. In the real world, many intelligence professionals have stated that torture gives less information than using more humane approaches. To make matters worse, we have tortured far more innocent people than guilty, people from whom no useful information could ever be obtained. None of these people have been given a fair trial, so not only do we treat them cruelly, but we deny them due process.

I have no great influence in Washington, so I cannot make the sweeping changes we need. I can hope that our new president will take action, but until then I can remind people what has happened, and I can refrain from watching shows that glorify torture.


Stefan Rusek | ASP.NET MVC Views in Xronos

ASP.NET MVC Views in Xronos

Tuesday, December 09, 2008

With the release of Xronos v0.1 comes an overhaul of how it works with ASP.NET MVC. First I removed the ASP-like syntax. The syntax was familiar, but it turns out that the syntax did not actually do anything helpful, because (pr) ends up making cleaner code. If that was the only change, then writing views in Xronos would be pretty lame. The new system is modeled after ASP.NET MasterPage system.

Enabling the ViewEngine is the first step toward using Xronos with ASP.NET MVC. Add a line to the Application_Start event in your Global.asax.cs file, before the call to RegisterRoutes(). The ViewEngine constructor takes any number of path names to files to compile immediately.

ViewEngines.Engines.Insert(0,
    new System.Xronos.Web.Mvc.ViewEngine("~/Views/Shared/Library.x");

Normal pages are simple to create, just write a (render) function that prints out your HTML:

(defn render [] (pr 
    "<html><head><title>" (get viewdata "Title")  "</title></head>" 
    "<body>Yay! it works</body></html>" 
))

This is fine and all, but most of the time you want a bunch of views that share a common layout. If you are familiar with how master pages work in ASP.NET, then Xronos master pages will be very familiar to you. In the master page file you need to have a (render) function and a params variable defined.

; ~/Views/Shared/Site.Master.x 
(def params) 

(defn header [] ... ) 
(defn footer [] ... ) 

(defn render [] 
    (header) 
    ((:body params)) 
    (footer) 
)

Then in your page you simply specify that you are using a master page and the content of the params.

; ~/Views/Home/Index.x 
(def master "~/Views/Shared/Site.Master.x") 
(xronos/refer 'mvc) 

(defn renderItems [] 
    (dorun (map blog/renderItem (get viewdata "Items"))) 
) 

(def content {:body renderItems})

Since Xronos compiles each file in its own namespace, each page is isolated from each other and cannot access any other functions unless your library puts them in an accessible namespace

; ~/Views/Shared/Library.x 
(in-ns 'blog) 
(xronos/refer 'mvc) 

(defn renderItem [item] ... )

At the moment Xronos only supports writing views. Sometime soon-ish, I hope to make it easy to write entire MVC apps in xronos. In the meantime, it is still an awesome language to write MVC views.


Stefan Rusek | Big update to the blog

Big update to the blog

Monday, December 01, 2008

This weekend, I pushed a huge update to the blog. There are two new features: OpenId and commenting.

OpenId support means that if your OpenId provider supports profile information (I already know openid.net does, and that some of the big names don't), then you can authenticate seamlessly with OpenId. Sometime soonish, I'll put in some updates to make it so users can edit their info on my blog, and then I won't need to require profile information from the OpenId provider.

If you don't use OpenId for your authentication, then you can use this blog as an OpenId provider. Your OpenId is http://stefan.rusek.org/User/<username>/.

Comments are now allowed on all posts if you are logged in. Please be polite and considerate. I will delete comments that I feel are inappropriate.


Stefan Rusek | A Eulogy for Escupito - or Pito's Story

A Eulogy for Escupito - or Pito's Story

Tuesday, November 25, 2008

He loved to sleep on my back.

On the evening of November 24, 2008, our cat, Escupito, passed away. In my life I have known and loved a number of pets, and a few have been great friends, but the best friend of them all was Pito. This is the speaking of his life.

For me, his story began when his grandmother joined our family 12 years ago.I was 16 years old and living in Woodbury, Tennessee when my step-brother John came to live with us. With him came a cat. This cat had a name before she lived with us, but we all called her "John's cat" or just "that cat." One night, I woke up and she was licking my head. I misunderstood her attempt at affection, so I started calling her Escupe (the Spanish word for spit). This cruel joke eventually lost its meaning as we grew accustomed to and accepted her. She never became a beloved member of our household, because she was wild and skittish, but when she had a litter of kittens, we kept one and named her Escupita. Escupita was my mom's kitty and  Escupito's mother. Later Escupita had a litter of her own. My family's love for silliness meant that we called the whole litter "the Escupita-itos" (or "Los Ita-itos" for short). Soon all but two of the Ita-itos had new homes. These two male kittens were sweet and grew up together. Then one day, one disappeared and only one remained. This kitty was eventually known simply as Escupito.

Escupito lived the Golden Rule. He was never mean, never snappy, never bit, and if he scratched, it was by accident. At first, I was not  sure I liked him, but as I got to know him, I found that he loved anyone who got to know him -- and anyone who got to know him could not help but love him back. Dottie, my sister's Jack Russell Terrier, would groom Escupito, because he found she enjoyed to be groomed first. They would often lie down on the couch and cuddle up together in the light of the warm afternoon sun. Since I was away at school, I only saw him intermittently for a few years, but shortly after Aneta and I were married, we came to live with my mom for six months. Aneta had just come from Poland and was not comfortable with English on a daily basis, but Escupito never cared. It was during this time that Aneta took to calling him Pito and it stuck. They became close friends.

When we got a place of our own, we still came to visit my Mom every week, and when we walked in, we would say, "Hello Pito!" He would respond with the most musical meow, and it sounded as if he was saying, "I am so glad to see you!"  We soon moved to New York, and Pito stayed behind in Tennessee. A year later, my mom asked me if we wanted to take Pito to live with us in Brooklyn, and we were glad to have him become a permanent member of our family.

In New York, Pito met many of our friends, and none of them could resist his charm. Sometimes it seemed like Jannine came over to hang out with Escupito rather than us. At first, our New York cat, Lusia, hissed at him every chance she got, but we knew this was normal and knew that, in time, she would grow to tolerate him. I remember very clearly the day she stopped hissing at him. She ran up to him hissing, and he lifted up his paw and whacked her on the top of her head. It didn't hurt her, but Aneta and I laughed at how deftly he had routed her attack, and she stopped hissing. In a few weeks, it was common to see them grooming each other or snuggled up asleep.

When we decided to move to Poland, there was no doubt in our minds that Lusia and Pito were coming with us. We also decided that Aneta and Lusia would go to Poland to find an apartment a month before me and Pito. We had taken our things down to Tennessee to store in my old bedroom, so Pito The last picture of Pito we tookand I were all alone in Woodbury once again. Each day, he was my constant companion, and as I worked he would curl up in my lap. When we finally arrived in Poland, I settled into my new schedule of working from home. Most days I primarily interacted with Aneta, Lusia, and Escupito. Each day, he was a constant source of happiness and joy.

While his death is a source of awful sadness for both Aneta and me (as we have both known Pito's love at our loneliest), we count ourselves lucky to have known and felt the happiness he brought to our lives.

* All images in this article are Copyright Aneta Tarasiuk-Rusek 2008


Stefan Rusek | Facebook is Way Ahead of Everyone Else

Facebook is Way Ahead of Everyone Else

Wednesday, November 19, 2008

The other day, I was talking with my friend, Nathan, about Facebook. I don't use Facebook a ton, but I do use it more often and more consistently than I ever have in the past. I believe the much-hated new UI has a lot to do with it. The big complaint about the new UI is that it hides a lot of Facebook features. When I say a lot, I truly mean all but the 3 or 4 main Facebook features. At the same time, they did add one new feature: you can now reply to other users' statuses. So they basically traded 98% of Facebook for Twitter. The interesting thing is that even though I am not convinced the new UI itself is much better, I find I use Facebook more than before, because of vastly simplified user experience!

Now hidden in the depths of Facebook, among the many missing features is the Facebook API. The majority of Facebook API apps are total crap! This is where Facebook is ahead of the curve, because they have already realized this and made it super hard to find the apps. MySpace and every other social network out there was left scrambling to add their own API. And guess what? The majority of those API apps will be crap too! In fact, the majority of API apps for anything are going to be crap. (The best you can ever hope for is that an API will make it easier for the company itself to add good features to the product.) So Facebook made their API and has realized that even though it is a great idea from a PR perspective, it totally sucks from a quality perspective. Since the apps appear to be a part of Facebook to the average user, but are usually much lower quality, the user sees Facebook as having dropped in quality.

This I think is the most interesting "feature" of the new Facebook UI. It tells us that the Facebook people know that as much fun as I had playing Knighthood a few months back, I eventually got tired of it sucking and quit using Facebook for a while. I didn't just quit Knighthood, but I quit Facebook too. Since then Facebook has Twitterified itself, people are being more social than ever, and Facebook has put the "social" back into social networking.

< Previous Page 3 of 5 Next >