As I’m sure many people know by now, congress is trying to pass the “Stop Online Piracy Act” (SOPA) bill in the House of Representatives and the “Protect IP Act” (PIPA) bill in the Senate. Much has been said about how both bills will do great harm to the Internet, free speech, and innovation. Here’s a great video that summarizes what the affects of passing these bills will likely end up being:


The bills are being lobbied hard by industry which includes such entities as the MPAA whose boss Chris Dodd, the former U.S. Senator from Connecticut now lobbyist, even noted [1] that if the Chinese censor the internet without a problem, why can’t the U.S.? If that wasn’t enough, those in the entertainment industry involved with getting the bills passed are playing hardball by hiring the congressional staffers who helped write SOPA/PIPA and making them entertainment industry lobbyists [2].

It’s important to take a stand and let your voice be heard. Without everyone’s support in preventing SOPA and PIPA from being passed then we are all going to loose while industry who lobbied for such bills will scale back the kind of innovation we’ve seen over the many years ever since the Internet took off.

And it’s not just innovation that suffers, but freedom of speech will suffer too. It seems fitting that while congress and industry are working hard to pass SOPA and PIPA, Hillary Clinton recently gave a speech urging countries not to stifle online voices [3]. And aside from China, you certainly don’t have to look very hard to see where voices in other countries are indeed being stifled online, such as those countries in the Middle East and Russia [4].

Recently, Laurence H. Tribe, who is a professor of constitutional law at Harvard Law School, weighed in on SOPA and noted in a paper [5] that SOPA indeed violates the first amendment. In his paper he makes a couple of key observations, such as Section 103(a) running afoul of the “prior restraint” doctrine (bold mine):

The notice-and-termination procedure of Section 103(a) runs afoul of the “prior restraint” doctrine, because it delegates to a private party the power to suppress speech without prior notice and a judicial hearing. This provision of the bill would give complaining parties the power to stop online advertisers and credit card processors from doing business with a website, merely by filing a unilateral notice accusing the site of being “dedicated to theft of U.S. property” – even if no court has actually found any infringement. The immunity provisions in the bill create an overwhelming incentive for advertisers and payment processors to comply with such a request immediately upon receipt

Mr. Tribe then notes how this is in direct violation of the Supreme Court’s standing requiring judicial determination to actually impose a valid final restraint:

The Supreme Court has made clear that “only a judicial determination in an adversary proceeding ensures the necessary sensitivity to freedom of expression [and] only a procedure requiring a judicial determination suffices to impose a valid final restraint.” Freedman v. Maryland, 380 U.S. 51, 58 (1965). “[P]rior restraints on speech and publication are the most serious and the least tolerable infringement on First Amendment rights.” Nebraska Press Assn. v. Stuart, 427 U.S. 539, 559 (1976).

Tribe then continues on with saying how SOPA can cause severe practical problems for sites like Facebook, Twitter, and YouTube:

SOPA provides that a complaining party can file a notice alleging that it is harmed by the activities occurring on the site “or portion thereof.” Conceivably, an entire website containing tens of thousands of pages could be targeted if only a single page were accused of infringement. Such an approach would create severe practical problems for sites with substantial user-generated content, such as Facebook, Twitter, and YouTube, and for blogs that allow users to post videos, photos, and other materials.

If that wasn’t concerning enough, then there’s a follow up about how web sites would effectively have to actively police themselves under the absence of specific infringing acts. This imposed monitoring goes against an existing law that does not require such actions (bold mine):

The bill’s harmful impact is aggravated by the fact that the definition of websites “dedicated to theft of U.S. property” includes sites that take actions to “avoid confirming a high probability of … use” for infringement. Absence of knowledge of specific infringing acts would not be a defense. Thus, the definition would effectively require sites actively to police themselves to ensure that infringement does not occur. In effect, the bill would impose the very monitoring obligation that existing law (in the form of the Digital Millennium Copyright Act of 1998) expressly does not require. SOPA would undo the statutory framework that has created the foundation for many web-based businesses.

And to think that all of this is summarized in the first two pages of Tribe’s 23 page paper!

Hopefully this encourages you to take part against such aggressive bills. Without people being aware of the implications that SOPA and PIPA both have and not doing anything about it, those who fought to push the bill through congress win and we are all worse off for it. It’s even sadder since both SOPA and PIPA have hardly made a blip on broadcast news, and President Obama appears to not have made a formal statement about these bills and whether he would veto them if passed.

Do your part while you still have a chance — Help save the Internet by making your voice heard.

[1] MPAA Boss: If The Chinese Censor The Internet Without A Problem, Why Can’t The US?

[2] Shockingly Unshocking: Two Congressional Staffers Who Helped Write SOPA/PIPA Become Entertainment Industry Lobbyists

[3] Clinton Urges Countries Not to Stifle Online Voices

[4] Internet censorship in Russia

[5] The “Stop Online Piracy Act” (SOPA) Violates The First Amendment

The other day I was attempting to install the FFI Ruby gem when I got this rather interesting error message:

Building native extensions. This could take a while…
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.
/Users/fc/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb

checking for ffi.h… *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Looking at the error, extconf.rb is failing but I didn’t have access to the mkmf.log file to see what the issue might be. Thankfully FFI is open source (Yay open source!) so I grabbed the code from github and tried to execute the extconf.rb file directly. (The extconf.rb is used by Ruby to compile a Ruby C extension.) I got this same error message as before but now I could take a look at the mkmf.log file, which had the following:

package configuration for libffi is not found
“/usr/bin/gcc-4.2 -o conftest -I/Users/fc/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/x86_64-darwin11.0.0 -I/Users/fc/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/Users/fc/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe conftest.c -L. -L/Users/fc/.rvm/rubies/ruby-1.9.2-p290/lib -L. -lruby.1.9.1-static -lpthread -ldl -lobjc ”
checked program was:
/* begin */
1: #include “ruby.h”
3: int main() {return 0;}
/* end */

Weird. When I tried to run the gcc-4.2 statement in my shell I immediately got an error saying there is no gcc-4.2. A-ha, A clue! In fact when I checked using the which command it turns out there is no gcc-4.2 executable to be found. That seemed odd considering I have xcode installed on my machine. Looking at my /usr/bin directly and grepping for gcc this is what I got:


Ah, that’s right — I have xcode 4.2 installed which now makes use of LLVM. It’s prior versions of xcode that have the common gcc. This is why Ruby was failing when it tried to compile the C extension. With a quick creation of a symbolic link to the llvm-gcc-4.2 called gcc-4.2 that I placed in my /usr/bin everything worked as expected and I had the FFI gem properly installed on my system — Hooray!

In any case, I figured I’d capture this bit of knowledge so that if anyone else happens to come across this they won’t have to struggle so much finding help :).

Note that if you had a prior version of xcode installed on your Mac and then installed xcode 4.2, you’ll likely have both gcc-4.2 and llvm-gcc-4.2 installed. I had xcode 4.1 installed but I uninstalled it and installed xcode 4.2, which is why I didn’t have gcc-4.2. Either xcode will have to be updated to include the symbolic link or Ruby will have to be updated to compensate looking for llvm-gcc-4.2, specifically Ruby’s mkmf gem which is actually responsible for constructing the Makefile to construct a Ruby C extension.

During the weekend I happen to take a trip down to the Computer History Museum in Mountain View. If you haven’t been before I highly recommend checking it out at least once. It’s jam packed with interesting information to excite your inner computer history geekyness.

While touring the museum I came across a delightful quote by Donald Knuth:

Computer programming is an art, because it applies accumulated knowledge to the world, because it requires skill and ingenuity, and especially because it produces objects of beauty.

That Knuth — He always knows what to say :).

This morning while eating breakfast, an article titled “After Steve Jobs: What We Can Learn From The Nest Thermostat” immediately caught my attention. Specifically this:

In a side conversation I had with Tony [Fadell] a few weeks ago, he confessed that when he started at Apple he didn’t think that the intense attention to detail was all that important in producing successful products. He now sings a different tune, and the near perfection of the Nest launch is a testament to that. Based on what we saw Tuesday night, Nest is using creativity and focused intuition to build a company that will rival Apple in the excellence of products, services, and experiences.

To then be followed up with this:

And this bodes well for Apple. If its DNA can strike out on its own and produce a company like Nest, I’m becoming more convinced that Apple has a good chance of continuing to make the most compelling products in the world, even without Steve Jobs’s guiding hand.

It definitely makes me feel all warm and fuzzy inside :).

As more people start to adopt statecharts to help organize application logic and manage the app’s current states, a question begins to appear about what, if anything, are SproutCore’s controllers useful for? After all, application logic that used to be located in controllers is now being yanked out and placed into individual state objects. This would appear to make controllers redundant. But is that really the case? If so, then what does that mean for classes such as SC.ObjectController, SC.ArrayController and SC.TreeController? Should they simply be removed from SproutCore altogether? To really answer these questions and know where a statechart begins and controllers end, we first have to understand what controllers really are, and, more specifically, what controllers are with regard to SproutCore.

Read the rest of this entry »

I admit it: I have neglected to directly talk about something that people who have been using Ki end up running into, and it’s about “pivot state” errors. This is something that I have been asked about a few times, and while I do describe what the error means, I, for some darn reason, just keep forgetting to write it down for others to learn about. Well know more. This sad lack of information shall end now.

Read the rest of this entry »

When developing Ki for SproutCore, the main goals I aim for are the following:

  1. Follow the principals laid out in David Harel’s seminal paper Statecharts: A Visual Formalism for Complex Systems.
  2. Make it intuitive to take a statechart diagram and translate it into code, and vice versa.
  3. Help reflect code that is simple, modular, extensible and maintainable.

In addition to the above, Ki needed to integrate well with SproutCore itself, meaning that it contained the all necessary functionality allowing a statechart to respond to actions and events propagated from various parts of SproutCore, and, in order to function, required the minimal amount of effort to add a statechart to an application.

Read the rest of this entry »

I just wanted to post a quick announcement about a special SproutCore meetup I’ll be giving on February 24th at Liberty Noodle in downtown Toronto. If you want to learn about what SproutCore is, how it works, and why you may want to think about using it for your next awesome project, then please come on out. There will even be demos of the framework used on real projects!

For more information, please check the meetup annoucement here.


A few days ago there was a post on the SproutCore Google Group by an individual asking if his code could be reviewed by people in the community. Given the request, I checked out the code from github and began to go through it. In a nutshell, I was reviewing a small SproutCore application that allows you to simply log in and log out of the application. The application makes use of Ki, a statechart framework, in order to keep track of what state the application is currently in. In addition, there are two custom views. One view represents a toolbar displaying whether you are logged in or logged out, and another view that represents a login form. The login form view also contains logic that will fake the log in procedure.

Read the rest of this entry »

I just wanted to send a quick thanks to everyone who swung by my lil’ old blog to read up on all things related to SproutCore. According to my WordPress year-end stats, my blog was visited 43,000 times in 2010. The most viewed post by far was my recent Why Does SproutCore Have a Run Loop and When Does It Execute? post. The next three most viewed posts were:

  1. Creating a Simple Custom View in SproutCore: Part 1
  2. Creating a Simple Custom View in SproutCore: Part 2
  3. Creating a Simple Custom List Item View: Part 1

So it would appear many of you are looking for information on how to create custom views and trying to understand SproutCore’s underlying mechanics. I’m certainly glad to help those out, and I hope to provide more information for 2011.

If you do have comments or questions, please feel free to e-mail me at

Happy New Year!