Wednesday, April 25, 2007

Controller Testing in Zend Framework

Ouch, the previous post here was pretty bad. Messy design and it didn't even work correctly. A better guide on the topic is here:

http://tulsaphp.net/?q=node/40

Thursday, April 05, 2007

More on design patterns

Design patterns in the context of frameworks is a nice opportunity for me to take a break from my framework posts. I've been reading a bit on design patterns as a result of that previous post, and the poll activity on the Tulsa PHP Users Group.

In my readings, I came across this old post from the Loud Thinking blog re: Patterns & Practices over languages. Good stuff, and I'll recall my related personal experience.

Before joining SourceForge, I was okay in a few languages - Java, ColdFusion, WebMethods (shudder), Javascript, SQL, XSL/XPATH - and I was pretty good in one language - PHP. The first couple months at SourceForge were simply LOTS of PHP with a bit more architecture than I was used to - caching, entity objects, a Smarty view layer - but not much different than the PHP coding I had always done.

I was exposed to a pretty sophisticated Java architecture when I joined the Marketplace engineering team. But, my main task initially was to build a few simple wrapper classes that would allow our PHP scripts to communicate with the Java backend over STOMP to a message queue system (ActiveMQ, specifically). This would let us continue to write simple (display-oriented) PHP scripts which relied on the sophisticated Java backend for most logic. I still like that idea, and think it can work well if given proper time and attention.

But as we faced mounting time constraint pressure, and in the interest of leveraging our available talent pool, we stepped away from using STOMP and took out most of the PHP code - save for a proxy-type controller which speaks to the Java app server and some helper classes. We started using the Web MVC module of the Spring framework (in addition to the Core, Testing, Transaction, and Hibernate modules we were already using), and were therefore implementing everything, including display via JSP, in Java. So I poured over Spring reference material. (Highly recommended book)

It was quite a (beneficial) learning experience for me. As I learned (and accepted) the Spring approach, I found that I started to care less and less about Java - it just happened to be the language in which Spring is written - and I cared more and more about the ways in which Spring worked.

Those "ways" are, of course, design patterns. Inversion of Control, Object-Relational Mapping and Active Record, MVC, Front Controller, Command Controllers ... these are all just "ways" of doing certain things, solving certain problems, that are common to many systems. As I said, in learning Spring, I'm appreciating these patterns more than the Java language.

This is what lessened my resistance to frameworks, so much so that I became a fan of (some of) them! But, still having fondness for PHP, I started looking for PHP frameworks which work in the same ways that Spring does. But, it has really changed my perspective from analyzing languages based on syntax, (or types, or whatever) to analyzing languages based on the availability of design pattern implementations.

In this respect, and from my searching, I still think (though it may still be simple bias) that PHP is the best language available for the web. There are many PHP MVC frameworks (look at all the ones in the comments as well) which implement nearly all the best proven design patterns for the web. There's enough choice out there that PHP engineers can choose not only the design patterns to use, but also between many different styles of each design pattern. And of course, because PHP is so easy, it doesn't take an "architect" to craft their own style implementation of a favorite design pattern. (like the Active Record implementation I referenced in my last post.)

It was a big step for me to stop focusing on certain languages and instead focus on design patterns. I think it's been a big step upwards in my engineering aptitude/skill/whatever. And the more design patterns I learn, the more I realize there are so many others I don't know that could make my programming even easier. Sadly, I'm nowhere near the competence needed to recognize the "informal patterns" (i.e., unnecessary repetition/duplication) in my own code, but hopefully I'll get there.

For now, I'm still just learning my way into the topic and very glad I have an opportunity to do so.

Monday, April 02, 2007

Frameworks - 10 pounds of Design Patterns in a 5 pound bag (hopefully)

I was inspired to write this framework-related post when I read Dirk Merkel's "Practical Active Record in PHP" article from the latest issue of PHP Architect. Ironically, I was inspired because the PHP framework I'm most excited about (Zend Framework) has, AFAIK, chosen to use a Table Data Gateway pattern instead of an Active Record pattern, which I think is not quite as intuitive or easy to use. But a comparison of those two patterns is not only off-topic for this post, but well beyond my analytical qualifications.

Instead what I'd like to point out is the fact that all good frameworks should help programmers implement good design patterns. Programmers uncomfortable or unclear about frameworks might also be uncomfortable or unclear about design patterns, but design patterns are just ways of expressing common solutions to common problems, and frameworks can help teach good patterns. The web-proven ones that come to my mind first are MVC, Front-Controller, and Active Record, but there are many many more.

If you want to fully grok the Active Record pattern, you should of course read code & articles - like the article I mentioned above, or perhaps this article, or any other resource on the subject. But, since design patterns are common solutions to common problems, you don't want to re-write Active Record code every time you use a database in your applications. Instead, once you know how the Active Record pattern works, you can look for a framework which gives you an implementation of the pattern with an interface you like.

This is a much better approach to learning design patterns, IMO, than to learn design patterns outside of a framework. I find that resources covering design patterns without a framework tend to be overly abstract. Pattern implementations inside frameworks tend to constrain their context to the framework's intended use. I.e., you can learn much more about MVC theory by first diving into setting up an example Spring Web MVC application than you can by reading an abstract MVC blueprints paper.

When writing an application with a framework, you might get the feeling that you're dumbing yourself down - that you're relying on the framework too much and therefore becoming dependent on the way it works, or locking yourself into an architecture you don't fully grok and therefore can't fully debug. While that's entirely possible, it's more likely that, given the framework is reputable and has a solid architecture, you're actually relying upon good implementations of well-proven design patterns, and learning all about them in the process. This is not only good for your application, it's good for you as a programmer.

Monday, March 05, 2007

frameworks, licenses, etc.

I came across this interesting and relevant blurb from a Dave Rosenberg post on not using GPL for open source projects:
Spring as GPL wouldn't make a lot of sense, just like SugarCRM as Apache wouldn't make sense. (A very dumbed-down explanation being Apache is for ubiquity whereas GPL is for commercial.)
I'll take a stab at the fully-fleshed explanation.

The reason Apache is for ubiquity is because, as a permissive license, it allows the licensee to do more with the software. Most relevant, it allows the licensee to build new software on top of the licensed software - a derivative work - but close-source the new software. This makes Apache-covered (or more generally, permissively-covered) software a suitable selection for a wider audience - those that won't (or can't) return their own contributions to the community AND those that will.

The reason GPL can be said to be a more commercial-friendly license (from a project admin perspective) is because, as a viral license, it requires that any modifications made by anyone must be returned as open-source software as well. So a potential competitor cannot "steal" your code (it is free for use anyway), but even furthermore, they cannot improve upon your offering without returning those improvements to you as well - competitors will actually help you.

Now, back to frameworks. Spring, Struts, Tapestry, Google Web Toolkit, Zend Framework, CakePHP, Symfony, Ruby on Rails - all of these use permissive licenses. The reason, of course, is that frameworks are intended to build other software. And that other software won't always be open-source. But it's important for any framework to have a strong and active community in order to enhance the framework itself, so you want ubiquity and popularity over "purity".

If Spring, or any other framework, were licensed under the GPL, then all software built on top of the framework would also have to be GPL. I won't say that this never makes sense - it could be the framework author's intention that the framework only be used to create more free software. It wouldn't make sense if the author intends for the framework to be used in as many software projects as possible.

However, most of the frameworks I mentioned are licensed under Apache License, Version 2.0 (or other similar licenses), and apparently incompatible with GNU GPL. This is just another GPL annoyance to me. These frameworks are clearly good free software, and have adopted a widely-used permissive license in order to foster popularity and community participation. I'm all for free software, but when I use any of these frameworks in a free software project, I'll be using a BSD license.

Monday, February 26, 2007

On Frameworks

Sorry for the long hiatus. I've been busy learning and doing things I've never done before, and its those things which I'm going to blog about.

I've also recently been changing gears as a developer from a scripting-style PHP programmer, to a more OO programmer (Sadly, in Java most of the time). In this transition, I'm starting to warm up to the idea of frameworks. I think I've been around enough to know at least some of the complaints lots of people have with frameworks. Over the next little while on this blog, I might bring a couple of those points up and try to lay out additional perspective on them.

Today's point:
"Frameworks are just big ugly factory factory factories too abstract and cumbersome to do any good." (example)

"If you want to develop a simple website with five to ten pages, limited access to a database, and no obligations to ensuring its performance or providing documentation, then you should stick with PHP alone. You wouldn't gain much from a web application framework, and using object orientation or an MVC model would likely only slow down your development process." (src)

The above statement from the Symfony manual pretty much lays it out, especially since the example critical article states the scope of the hypothetical project as, "...build a spice rack." For simple projects, OO and Frameworks are over-kill.

But I think the better metric for determining if a framework is appropriate is not in number of pages (indeed, frameworks often at least double or triple your number of files), but rather in scope of features and depth of functionality.

In order to determine this, see if you can identify some useful objects in your project at all. Anti-OO heads might correctly argue that objects aren't *required* so there aren't any to identify, whereas OO-heads might correctly say there are objects in every project - which is why I added the "useful" qualifier.

A useful object, IMO, is an object that reasonably encapsulates properties and behavior - i.e., an object whose properties or behavior will be re-used in multiple areas of the project - the common examples are DB, logging, emailing classes etc.

Now, if there's only 1 or 2 useful objects (e.g., spice jar and spice rack) in the entire scope of the project, OO is applicable, but maybe unnecessary, and frameworks are counter-productive (they tend to introduce upwards of a dozen or more support objects with which you also have to deal).

On the other hand, if there are half a dozen useful objects, it is helpful to handle them all in a consistent way so that you can be sure of responsibility scope, standard interfaces, access levels, coding styles, blah blah on every object in the project. OO and frameworks are meant to force you to do this. I think the main point of pain most PHP programmers have with frameworks is that forcing bit, which is what we find cumbersome.

This doesn't have to be the case. A good framework should align with your own style, and help you adopt OOP quickly and easily, without getting in the way of your non-framework, non-OO code. The framework should be instructional, but unobstrusive. In short, if your experience with frameworks is that they are forcibly cumbersome, check around for a different framework - that's why there are so many options (Zend Framework, CakePHP, and Symfony seem to be the biggies for PHP). When looking at frameworks, read thru their documentation and tutorials - the objects and logic should make sense to you, not confuse you.

However, you will probably never find The Perfect Framework, unless you write it yourself (bad move). More than likely, you will have to climb the learning curve for some framework, letting it force you to adopt some new coding practices. I think PHP programmers are a bit spoiled in that PHP has such a shallow learning curve that a framework's learning curve seems daunting in comparison. (Contrast this to Java where learning by framework is probably the easiest way to learn Java?) But really, once you grasp the core "Aha!" features of a framework, the rest tends to fall into place.

Climbing this learning curve is usually the point at which a PHP programmer finds the framework to be too abstract. Why is the Controller class hierarchy 5 levels deep? Why is there an interface defined if it doesn't DO anything? I think the natural inclination of PHP programmers is to try to grok the framework by reading code. This isn't as straight-forward in OO frameworks. There's lots that goes on with OO frameworks which is implicit in the design of the objects (and the mechanisms of OOP) rather than explicit in the code. I would encourage PHP programmers to stick with it - it's necessary to brush up OO skills to fully grok any framework. But again, if you find a certain framework's code and design totally illogical, it's probably not the one for you.

All I've really done so far is explain WHY frameworks are cumbersome and abstract ... but do they do any good? It's easy to just point to Ruby on Rails as proof that frameworks can be awesome, but I'd also like to point out some of the specific reasons why this is so. (I may explore these in depth later)

Standardizing your code. This is a biggie, IMO. When you do script-by-script, ad-hoc programming, your mood, caffeine levels, circadian rhythms, or any number of other factors might change the way you write code from minute to minute. This is Very Bad for maintaining the code later on, when you need to change something and realize not only is it duplicated in dozens of locations, but each one has a slight variant in how the code is run, which means you can't just find-replace it all. Ouch.

Less "plumbing" code. Now this of course relies on the idea that your project NEEDS plumbing code in the first place. Again, if your project is small, it probably doesn't need plumbing code, and adding a framework full of plumbing code slows you down. An example of "plumbing" code is DB-access code. Any object in your project which accesses a database needs it, so it's nice to have a standardized method for doing it. And if you have a dozen objects of your own to write, why not wire them up with a framework's db-access plumbing code.

Productivity. This is not apparent while first learning the framework, but adopting a framework should boost your productivity. As stated above, you will be writing little (or no) plumbing code, instead focusing on YOUR code responsibilities, and relying on the framework for others.

Testability. Arguably not a feature of ALL frameworks, but good frameworks tend to employ good OO design, which forces YOU into better OO design, which makes your code testable via mocking objects and the like. This is another one of those things that probably turns PHP programmers off at first, but if they take the time to learn it and do it, the rewards more than make up for it. Writing tests first forces you to think about how other code will interact with the code you're about to write. And if you continue to write tests, you build up an entire battery of tests which help to keep you from inadvertently introducing bugs in the future. Tests do add some time onto your development, but they give you a great deal of quality, and confidence to modify code down the road.

That's about it for now. I've actually enjoyed the Spring framework a good deal in my Java work. It inspired me to go looking at ZF, Cake, and Symfony, which I think are also pretty good frameworks for PHP. If and when I need to build a sizeable PHP project of my own, I'm sure I'll be using one of them, or something similar.

Saturday, December 30, 2006

Franchising, open source, and "methods of doing business"

After reading Asay's post on this subject, I think this is a great idea, and very pertinent to things we're doing now at SourceForge. I don't think there's an open-source company out there making this their primary business model. Dual-License, support, merchandising, patronage .... all of these seem to have at least 1 exemplary business - maybe MySQL, Red Hat, Firefox, and Eclipse respectively?

As he says, this is somewhat present in some of the various open-source certification programs out there, and the single comment on the post asks if franchising is "a mere 'Certification program' that entitles a company to provide professional suport/developemnt of a product/service with the support of other vendor/provider. Is my assumption correct?" I think this assumption is only partially correct.

Franchising is a little bit more - "a method of doing business wherein a franchisor licenses trademarks and tried and proven methods of doing business to a franchisee in exchange for a recurring payment, and usually a percentage piece of gross sales or gross profits as well as the annual fees" according to Wikipedia. (emphasis mine) Most (all?) existing open source certification programs are only about tried and proven technical skills. One of the biggest lessons the open source software industry is teaching is that "methods of doing business" are much harder, more important, and more valuable to get right, in terms of making money.

I do think there's room in the community for some big franchising companies, and I think they could really help the uptake and adoption of open source software in many markets. However, I don't think "franchising" is the only method which can inject those "tried and proven methods of doing business" into the open source software community.

IMHO, this - to provide tried and proven methods of doing business to the open source community - is and should be the mission of SourceForge Marketplace. In our case, we cannot (and should not) "license" the methods, but rather we should provide all the tools necessary for anyone, from a single person to an enterprise, to easily implement any methods they want. If we can do this, it will benefit me, SourceForge, and the open source community.

Thursday, December 21, 2006

Reports of the death of the Long Tail have been greatly exxagerated.

People sure are making a stink about this post (with a questionable set of data, IMO) which purports to demonstrate that the Long Tail of web traffic is actually shrinking. Nick Carr has an excellent response explaining why the Long Tail is not shrinking, but rather, the economic value of the Long Tail is merely concentrating. This all falls within the scope of Anderson's previously asserted effects of the rise of the Long Tail - content aggregators will become (apparently ARE) the biggest winners in the phenomenon.

I'd like to expand just a bit on his explanation of how Myspace & Facebook are actually Long Tail websites - i.e., they aggregate the Long Tail of millions of personal mini-websites.

It should also be noted that Google, Yahoo, eBay, and craigslist are other Long Tail websites. Google and Yahoo are built on the long tail of search words (and subsequently related ads!), while eBay and craigslist aggregate the Long Tail of products for sale online.

So, of the top 9 sites (We all know pogo.com is not really in the top 10, right?), 6 are Long Tail sites? Well, even aol.com can be labeled as a Long Tail website, considering that their real list of top 10 searches are for those other Long Tail sites.

That leaves only msn.com and live.com as non-Long Tail sites in the top 10, right? Without the search data from those sites, it's hard to know for sure, but they could likely be similar to AOL - a mere entry point to the other Long Tail kings. Additionally, I've long suspected msn.com sneaks onto the tops of these lists merely for all the visits coming from IE browser users that haven't changed their default home page.

The Long Tail is NOT shrinking on the web. It's growing and the winners are exactly who was predicted - big-time aggregators.

Monday, November 27, 2006

Tivoisation & rational FUD

Most of the stuff I've read or listened to from RMS is full of populist rhetoric, which I don't really find interesting. Some of it is priceless, but to me it's not usually worth the effort of sifting thru all the preaching to find the gems.

However, I very much liked his talk from the 5th International GPLv3 conference. In this one, he seems much more to-the-point. It's a very good explanation of the modifications in GPLv3 and the intentions behind them. (All of which are Noble and Good, but I think some of them are too far-reaching.)

One such modification/issue is "tivoisation." Stallman spells it out:

"They [Tivo] provide the users with source code and the users can then modify it and compile it and then install it in the Tivo. That's where the trouble begins because the Tivo will not run modified versions, the Tivo contains hardware designed to detect that the software has been changed and shuts down. So, regardless of the details of your modification, your modified version will not run in your Tivo."

I'm going to make a somewhat personal analogy to explain why I'm okay with the above scenario. I agree it's a reduction of freedom, but I'm okay with that (as I am with just about any other voluntarily-chosen freedom reduction).

My wife is a budding professional photographer (could be full-out professional if I ever finish her website!). One day I floated the idea to her of giving all of her clients (in addition to photo print packages) all of their photos in digital form on a CD so that they could do whatever they want with them - modify, copy, print, etc. She had a ready and pertinent response...

If one of her clients had a CD full of high-quality digital photos, and then made crappy modifications and walked down to a crappy photo print shop, they'd have some crappy photos. When one of their friends goes over and sees a bunch of crappy photos, they're bound to ask, "So, who took all these portraits?" and not, "Why do these photos look like crap?"

So, it's in her best interest NOT to allow modifications and printing - she has rational fear, uncertainty, and/or doubt about giving the digital source files to clients. The same might be said for Tivo. If someone has modified their Tivo box to look like crap, stop working, or whatever ... it reflects badly on Tivo to anyone else who might see that behavior as Tivo's doing. Tivo has rational FUD about giving all that freedom to its customers.

Like I said, this is not a "maximum-freedom" scenario, and I don't mind that the goal of GPLv3 is to maximize freedom, rather than maximize popularity. But I think GPL zealots would do well to consider that the prevalence of these kinds of situations and motivations induces some people into some legitimate FUD about some GPL stances & clauses. Like, maybe Tivo has more FUD about using GPL in the future, now that they're getting bad rep in the Free Software camp.

Wednesday, November 08, 2006

The Long Tail (of|and) Open Source Software

I've been wanting to write this post for a while now, so it's going to be long, and it's probably going to take a while to finally get it out the door.

I'm a big fan of The Long Tail - both the book and the blog. Chris Anderson has had a couple of posts dealing with the long tail of software - one about JotSpot, and one about AppExchange. I agree that both of these companies/products are very much centered on Long Tail software.

However, I've want to try to make the point that open-source software is very Long Tail-ish, and has actually been so long before these newcomers were even a twinkle in their respective entrepreneurs' eyes. I also want to show how open-source can be a better (maybe the best) platform for Long Tail software. (Though I think both JotSpot and AppExchange are Very Good platforms.)

One thing I'd like to use in support of my opinion is some actual data...

A nice long tail graph showing the top 100 SourceForge projects, and their total # of downloads on the y-axis. I think this is a crude, yet reasonably accurate, way to show demand for open-source software. Though this graph shows a tail, it is only the top 100, which is actually only the head. I'm using it here to show the SF equivalent to Amazon's "Harry Potter phenomenon" - a couple of super-hits that dominate even the small head of lesser hits. At SF, we call it the "eMule effect."



Here I've chopped off the top 2 super-hit projects, and I've expanded the observation window to 2000 projects at once. (I can't go much higher than a 2k window due to technical limitations on the workstation machine I used to create these graphs, and this window size still demonstrates what I want to demonstrate) But notice how the expanded window size, though still small relative to the whole data set, displays a more pronounced tail shape.




Beginning where the previous graph stopped, this one is showing projects ranked 2000-4000. So, while moving down into the tail region of SF projects, the tail-ish nature of the data is starting to smooth out to a more linear demand curve.








Here's the end of the tail - all the way out at project rank ~62,000. This is, of course, the essence of The Long Tail - that there is at least SOME amount of demand for even the most niche or obscure products. (I should note, however, that SF.net has 130,000 registered projects. So nearly 50% of the projects have no downloads - most likely because those projects have not released any files ... yet?)





So, I think the above data and graphs are sufficient to demonstrate the Long Tail nature of open-source software (assumming SF.net projects are a valid representation of the larger open-source body of software). But why would open-source be a better platform for Long Tail software? To answer that, I'd like to use some of Chris's own ideas.

For the purposes of this argument, I'm calling the "best" platform whichever platform is most aligned with the 3 forces which add economic and cultural significance of The Long Tail. Because, as these forces work, they maximize the value of all Long Tail consumers.

1. Democratization of the tools of production. This is an easy win for open-source over JotSpot or AppExchange. In both cases, the tools of production are held in the hands of single companies. JotSpot or AppExchange tools are tied to their server, their tag language, etc. For open-source software, nearly every tool you could ever need is totally free. The tail can be lengthened much faster this way. I doubt JotSpot or AppExchange will have 100k+ custom applications within 10 years. (Though they don't need to for their more-limited purposes.)

2. Democratizing distribution. Another easy win for open-source. All JotSpot or AppExchange products are married to that distribution channel. And in those cases, it isn't simply "the internet" - it's specifically those application domains on the internet. If you want more access to those niche products, you're locked into the JotSpot or Salesforce.com distribution channel. Not so with open-source, which can be found in many places, and isn't locked into any of them. I wonder how far one would get trying to take their AppExchange software product solo before Salesforce.com sued?

3. Connecting Supply and Demand. The only force in which open-source is not a clear winner, and therefore, IMO, the most pressing need facing the open-source community. However, I would point out that neither JotSpot nor AppExchange have demonstrated an ability to perform this well, given the tiny sizes of their "tails" - JotSpot with only 8 add-on applications, and AppExchange with only 400.

So, trite but true: 2 out of 3 isn't bad.

And I think it should be publicized how open-source software has already created and sustained a Long Tail of software for many many years now.

Thursday, November 02, 2006

Windows EULA

Okay, just so people don't get the idea that I'm a supporter of Microsoft-style EULA's (though I'm also not a big supporter of GPL-style EULA's)...

Paul Thurrott is a man, just like you, except he has roots and fronds because he is also a plant. (Thanks to Tycho for that word-play)

Matt is funny and accurate as usual, so I'll continue on from Matt's thoughts.

Paul uses the same tactic with the other "newer, bigger than ever!" restrictions...Re: "Windows Transfer Rights" he says:
What's more amazing is that the number of people who actually try to do this is incredibly small. Since you can't transfer a copy of Windows that comes with a new PC anyway, less than 10 percent of all Windows licenses are transferable at all. And of those, only a tiny percentage of users have ever tried to even transfer a Windows license once. The only people that really need to do this regularly are hardcore PC enthusiasts who change their machine configurations regularly. In short, this new restriction isn't all that new and it won't affect any mainstream users.

To me, this just highlights the fact that Microsoft really doesn't give a crap about "developers, developers, developers, developers" anymore. Try calling up Microsoft with a technical programming support question sometime. We had a problem with .Net Framework for Windows CE a couple years back and when our main .Net engineer called MS, they basically said, "Tough. We'll try to get around to it in the next service pack."

I also like his similar "rebuttal" to the "Adding and removing PC components" issue.
Fewer than 5 percent of PC users ever open a PC case let alone perform major hardware surgery. But if you're one of those guys who regularly upgrades your PC's hardware, you'll be happy to hear that instances of forced reactivation because of hardware upgrades are less frequent under Vista than they were under XP. More to the point, this is another one of those issues that only affects a tiny, tiny percentage of Windows users.

More to Paul's point - new restrictions aren't really restrictions because most Windows users won't be affected. Uh, sure .... that makes all kinds of sense. Maybe thousands of developers, power-users, and enthusiasts are small in comparison to the entire Windows user-base ... but that doesn't really change the fact that these new restrictions are indeed that - restrictions.

I also have to rip into Paul for the notion that hardware upgrades are less frequent under Vista than Windows XP. I don't think he and I have been reading the same industry comments. So maybe it's not Vista's shiny new algorithm, but the fact that most Vista users (at least 90% are OEM, remember) users will have to buy a new computer just to run Vista?! Again, that's just a whole bundle of sense from Mr. Thurrott.

Tuesday, October 24, 2006

Matt Asay agrees with me

He didn't even know this, but Matt Asay and I agree that the freedom(BSD) > freedom(GPL). Matt sums up nicely what I've been writing recently:
Forcing people to share's one's version of freedom is not...free.
This is exactly how I feel. And some people might say, "Well, that's fine. But how can we all co-exist with differing versions of freedom?" And to that I would say, by having the kind of legal system which enables a variety of contracts which convey those different freedoms and stipulations over our creations.

Some bonus cherries with this approach is that people are dynamic. Their values and opinions are in a constant state of flux. Many (most?) people tailor their principles to match circumstances. Under the variety-of-contracts system, people can use different contracts at different times on different projects for different purposes. Like Asay thinks of the GPL, I think a CC-BY-NC-SA licensed product is like a bomb for a (would-be) competitor.

So someone can tactically employ CC-BY-NC-SA and CC-BY-ND simultaneously to create a dual-license business model. Imagine that - more variety among licensing principles and terms makes good business sense.

Thursday, October 19, 2006

fun followup

As a fun followup to my previous post, I thought I'd illustrate the same point using this very cool Creative Commons comic. After reading the comic, you should have a clearer idea of what the CC licenses are all about, right? In addition, I like the spectrum perspective shown in the opening and closing panels, as well as the 2nd-to-last panel explaining "Public Domain."

So here are the (rough) analogies I draw:

Copyright => Copyright EULA's
CC:Share-Alike => GPL, EUPL, etc.
Public Domain => LGPL, etc.

As I see it (and maybe Creative Commons sees it...?), Public Domain, and not GPL, is the extreme opposite of Copyright. With that in mind, my order of preference is from most-free to least-free:

1. Public Domain, LGPL, etc.
2. GPL, EUPL, etc.
3. Copyright, Windows Vista License, etc.

Addition:

I also just read a descriptive scenario whereby new CCPLv3-SA licenses are incapable of ENFORCING their copyleft doctrine down the chain of recipients.

See, if I was Sam, I would just put work A into public domain and stop worrying about it. And if first recipient, Dave, wraps it in TPM, creating d[A], then that's Dave's work now. 2nd-recipient Bob may like d[A] more, but it's up to Dave to give him permission to modify d[A]. Bob can always come get A from me with no strings attached.

Friday, October 13, 2006

closing [loopholes|business models] in OS licenses

I started out by reading Matt Asay's take on the EUPL. And I read just about every article or post to which he linked. Asay says that the GPL, for better or worse, "leaks like a sieve." I can only conclude from his statement, "I really like the way it [EUPL] closes the ASP loophole without closing off everything else, as well" that Matt dislikes at least the ASP "loophole" in the GPL.

(Disclosure: As an employee of SourceForge.net, I am dependent on an ASP model, like Google's or Yahoo's, for my livelihood.)

But I'd fall into the camp which thinks the "leakiness" of the GPL is a positive rather than a negative. In fact, I think even the GPLv2 is a bit too strict for my liking. As I understand it, when you distribute (old-school) any software which you received under a GPLv2 license, you must license your own modifications under GPLv2. Emphasis added to stress this point - any mechanism that sets up a "you must _____" condition places an inhibition on the recipient, not a freedom.

Apparently, the HPL, EUPL, and GPLv3 take this same inhibition and make it even more invasive. Under these, when you "communicate" (new-school) any software which you received, you must license all of your own modifications under the same license. The "communicate" term is defined in every license (or an equivalent principle is established) to prevent a person or corporation from using such licensed software to distrubte services (SaaS) without releasing all their own modifications or enhancements to the software.

I'm fine with these kinds of licenses, I suppose. I just don't happen to share this kind of perspective - feeling betrayed or cheated if someone enhances my software but doesn't give their stuff back to me. IMO, their work and labor went into those enhancements so I'm fine with them licensing their stuff however they want. I rest easy knowing my stuff will always be LGPL and (theoretically) usable by anyone. I'll admit this a pretty individualistic perspective. But then isn't the open-source community just made up of individuals. Why do we need someone like the EU or FSF to tell us how to feel, or what's best for ourselves?

I think the majority of people in the open-source community don't mind that Google and Yahoo (and SourceForge) modify some open-source software but don't distribute all those modifications when they "communicate" that software via their SaaS websites. Combine that with the fact that some of these extra-invasively-viral(?) licenses prevent other business models besides just the ASP one, and I can't imagine these licenses will be very popular. (Indeed, GPLv3 has already been ranted upon by more than a couple open-source supporters.)

Tuesday, September 19, 2006

open source revenue

I ended up reading this post because it talked about SourceForge (albeit the Enterprise software).

First, I don't agree that "serious" numbers are "multi-billion dollar" numbers. For one thing, of the 120k active information industry corporations which filed tax returns in 2002, only 264 of them received $0.25 billion or more in that year. (source) Personally, I can only think of 5 software giants which actually break into billions in terms of annual revenue - Microsoft, Oracle, SAP, Electronic Arts, BEA. There are probably some others but I'd be willing to bet it's no more than a dozen or maybe two dozen.

So one point I would make is that software revenue doesn't have to be concentrated in order to be serious. After all, the 119,476 information corporations that make <$50 million per year (under which VA Software falls) can account for, very roughly, $188 billion of annual revenue.

The second point I would make is that the nature of open-source is such that its value is hard to quantify with $. Different people may value an open-source software package at $1 or at $200 or at $2,000. But they all pay $0 for it, so it's hard to measure the value, but it's obviously not 0. I realize this has nothing to do with revenue, but recognition of this fact is a prerequisite to building a good open-source business model, which has everything to do with revenue.

Finally, one goal of open-source is to lower the cost of software to users. In principle then, open-source companies shouldn't be as big as proprietary software counterparts. The goal of open-source is to grow the economic pie while at the same time requiring a smaller slice for the software industry. This is directly opposite to proprietary software which desires more and more money to pour into the software industry - whether or not the economic pie is growing at all.

Basically, revenue-focused analysis is not simple in the open-source world.

Tuesday, September 05, 2006

(some) economics of open-source

Either fittingly or surprisingly, I came across a great blurb re: economics of open-source while reading The Long Tail.

George Gilder:
In every industrial revolution, some key factor of production is drastically reduced in cost. Relative to the previous cost to achieve that function, the new factor is virtually free. Physical force in the industrial revolution became virtually free compared to its expense when it derived from animal muscle power and human muscle power. Suddenly you could do things you could not afford to do before. You could make a factory work 24 hours a day churning out products in a way that was just incomprehensible before the industrial era. ... The whole economy had to reorganize itself to exploit this physical force. You had to "waste" the power of the steam engine and its derivatives in order to prevail...
From there, Chris picks up:
That suggests a way to put this in an economic context. If the abundant resources are just one factor in a system otherwise constrained by scarcity, they may not challenge the economic orthodoxy. They are then like learning curves and minimized transaction costs - drivers of production efficiency that serve to lower prices and increase productivity but do not invalidate the laws of economics.
So, how about open-source?

The open-source "revolution" has, among other things, made a factor of production virtually free - software programs. It costs someone somewhere maybe $0.000001 to produce another copy of ajaxMyTop and send it to another user. But, Information Technology and Information Systems (effective ones) involve more than just software programs. Open-source does not invalidate the laws of economics in IT.

In light of this, there are 2 very different lessons to take away.

For those who think open-source is economically infeasible, the analogy demonstrates that thriving markets can and do operate on virtually free goods. It merely takes some learning to understand where and how to charge money.

For those who think open-source is just a first sign of an inevitable economic reversals, the analogy shows that economic principles continue to hold. It is rather market actors and their perceptions which are upheaved.

MST3K is back!

One thing superior about this approach is that Mike can do any movie he wants to since he's not re-distributing any copyrighted material. It actually works pretty well. I set the laptop on the coffee table, start the DVD, and then start the mp3 when Mike says so. What a great mash-up.

Sunday, September 03, 2006

Camino is fired. Firefox is re-hired.

Okay, while I admit it's very cool to browse the web with a native Mac-style interface, I can never go back to using a browser without plugins. I mean, even IE7 supports add-ons. Camino is the kind of project that only an Apple myrmidon would (or can!) love. There's absolutely NO way to justify tossing plugin architecture out of a product just so you can get the spiffy razzle-dazzle of Mac OS X inside your browser.

So while I'm easily an Apple convert (I have bluetooth'd an Apple logo over to my Razr to serve as my mobile wallpaper), I'm not a zealot.

P.S. I'm not sure why I don't use Safari.

Sunday, August 27, 2006

Technorati?

I must be the last blogger on earth to register at Technorati...but here it goes anyway.

Technorati Profile

Wednesday, August 23, 2006

Ghost in the shell | Free Software Magazine

Ghost in the shell | Free Software Magazine: "
For centuries we have relied on books and other external memories, but the Internet, through the ease of searching, has invaded our actual thought processes. There are things I think I know, but I don't. What I know is how to instantly retrieve them when my global external memory is attached. As I become reliant on this kind of extended identity, losing my Internet connection is like a lobotomy�I feel an almost physical sense of loss as a portion of my intelligence is removed. I've become dependent on a new brain center that isn't located inside of my body.
"

I'll admit I was just surfing around looking for something to blog when I came along this. It really struck a chord with me. I'm an internet-addicted cyberpunk. And I'm a huge fan of Ghost in the Shell, and I recently read Synthetic Worlds by Edward Castranova.

I think it's obvious that our online identities are inextricably linked with our physical identities. But not just because our physical selves use physical interfaces to act as our virtual counterpart. Like Terry points out, when we use an interface so much, the boundaries between self, interface, and "avatar" start to blur. Sometimes even so much so that the online avatar feels more real than we ourselves feel at times.

In any case, this was also a test of a nifty firefox extension I came across for blogging. I'll be testing a couple of these soon so there might be a few more random posts in the future.

Thursday, August 10, 2006

Software Engineer, SourceForge.net

I have accepted a job offer from SourceForge.net. I'm thrilled to death. This is basically my dream job. I won't say anything else beyond that until I get with them re: blogging etiquette. Hopefully I'll blog a little more frequently since I'll have cooler activities to blog about.