11.04.07

Sorry, OpenSocial is closed

Posted in Uncategorized at 12:06 am by David Kellogg

Terry Chay seems like he’s holding back with his criticism of OpenSocial. What can I add about a Google project that is neither open nor social?

First, the list of exclusions.
Yahoo was not invited because Google thought of it.
Tagged is missing because Plaxo was invited.
Facebook was excluded because Myspace was invited.
Ebay was excluded because Google wants to destroy Paypal.

We need a moratorium on non-open self-proclaimed open projects. If you see “Open” in CaMeLCaps, it’s not open, it’s just Web 2.0. The terms of service do not appear “open.”

Google’s version of open is that you are open, and they benefit. Google wanted access to Myspace’s users to complement tiny Orkut, and Myspace complied. Google’s terms of service reads like a closed document. It starts out

“you may use the API as part of a commercial or non-commercial enterprise.”

But then it gets out of hand.

“Google may, from time to time and at its sole and absolute discretion …”

That’s not open, and and in what way does it include Plaxo and the others?

In the end, OpenSocial is just Google’s releasing their broken, easily-hackable Orkut code to the non-embargoed companies.

With these terms of service, can I, can you, add to their API? I really doubt it.

10.29.07

Why do all Ruby sites look alike?

Posted in Uncategorized at 11:10 pm by David Kellogg

Terry Chay has a running joke if he does not remember an Asian girl’s name, he just admits he’s a banana, and that to him, all Asians look alike. I think if you are a Ruby developer you can tell these sites apart but really, why do all Ruby sites look alike?

The Rails sites here appear to be templates for many other ugly sites. I will start with the worst, then I will get to the RoRing Rules.

Ruby sites gone not-so-wild

Big Patents has Big Text. Not surprisingly, they use CamelCaps. The site brags about some wonderful patent graph. Why don’t they show it instead of huge text?

Big Patents

This breaks every rule of good style. It is the anti-site. So ugly, it is almost charming. It follows the first RoR Rule, Big.

1. Big text
2. Colors that hurt
3. Grids rule!
4. White space overdone

Jobster. Find your dream job. It has many large words. Jobster uses colors that hurt. This image does not do it justice. Click on the link and visit the eye pain.

Jobster

LoanBack is a boring grid.
Perfect grid. Mechanical grid. I would love to look at eye tracking data for this. I have to read really hard and concentrate to see what the site is about. If I reached this through Stumble Upon, I would skip it, since I give most web sites 3 seconds before I try to leave.

LoanBack

This is another colors-that-hurt site, Economy in Crisis. Red white and blue never looked so bad. I like the stats on the left, though.

Economy in Crisis


Now for something completely different. Some sites take time to boil their message down to a few meaningful words and graphics. They make the point right away. They are not, of course, written in Rails.

LinkedIn promotes professional and college connections.

Linked In

In some ways I dislike the page, but it gets the job done with a non-grid triangle. The eye is drawn to singing up.

Facebook is about your social connections. Notice the blue, blue, blue, blue, green signup. It also gets the job done. It is also a non-RoR site.

Facebook

If you look at enough Ruby on Rails sites, they begin to look alike. There is no reason for the large text or gaudy colors, yet they proliferate. I begin to wonder if the framework that is Rails removes all hope for a creatively refreshing and different looking site.

10.19.07

It’s difficult to be an analyst

Posted in Uncategorized at 7:38 pm by David Kellogg

datasomething

Imagine you are an analyst, you know, those financial types with the predictions. You have a 4 pm deadline to produce a report, but you failed to do any work. What do you do? Just wing it.

According to CNET through Datamonitor,

Social-networking sites will enlist 230 million active members by the end of the year and will keep attracting new users until at least 2009, according to an analyst report. But investors are still wary–and for good reason, as long-term growth is by no means certain.

But it already is the end of the year! What a prediction. This takes an analyst to predict? And now directly from the report.

This value chain will continue crystallizing, until each element required to design, build, maintain, operate and exist in a social network can be supplied separately.

Global social networking will grow and then plateau by 2012.

It is not clear how these geniuses happen upon these numbers. So I sought to find out.

Datamonitor Europe
Charles House
108-110 Finchley Road
London

Dear Sir or Madam,
I recently read an article in CNET describing your research about social networks. Do you simply make up your predictions, or is it from painstaking research? How many hours did Ri Pierce-Grove Technology spend on research?

a) 100
b) 1
c) 0

Can you enlighten me on his research methods? Are there any predictions that you made in the past that surprisingly came true? Please hurry back, because I do not have time for serious research for my blog.

Sincerely,
David Kellogg

I have not yet seen a response. Those doing serious journalism certainly do not have time to check facts or question authority. Instead, they shuffle stories from business press releases in order to sell reports (It’s $1895. Buy Now.). I for one call them on it. It would be far more interesting if an analyst pointed out in 2003 that social networking sites had potential to attract a large audience. Instead, they opt for making predictions in late October about what will happen in two months. Good work, Mr. Ri Pierce-Grove Technology.

10.15.07

Can’t write SQL? Try Hibernate

Posted in Coding at 8:30 am by David Kellogg

The crazy thing about Hibernate is that it replaces the easiest part of the database, SQL. Hibernate sounds impressive, with its Spring framework and ease of use, but something is missing. It’s scalability.

hindenburg

Hibernate was never designed to scale. It was designed to be easy. What it does not do is federate databases, remap to new machines, migrate data and help you optimize your database. It falls into the usual Java mistake of first, placing all visible components in the programming language as Objects, then preventing you from using the best features of various databases. It corrupts MVC by placing the model in the controller and makes it more difficult to scale the databases separately.

What happens when you need to add a second database on a separate IP? A second session factory is necessary, which is essentially a second connection. If you try a single find on multiple databases, good luck. I read that multiple databases can be managed by a program called Castle, which is .Net only. I know there are other projects (like shards), but these will only be opaque solutions on top of Hibernate. Multiple databases make cross-db joins almost worthless. At that point, you lose the joy of Hibernate.

And what is the joy of Hibernate? Let me explain my travails.

Day 1:

I downloaded hibernate3.jar and its brethren. I launched quickly into the tutorial. The tutorial said it will take 3 days to jump fully into Hibernate. I thought, “That’s stupid. I can do this in a couple of hours.”

Day 3:

I finally finished my tutorial. And that was just the tutorial. It took quite a while to find all of the jars. The tutorial had errors. It claimed I could use “native” for the autoincremented column. I had to use “increment” instead. In the old days, a simple, useless SQL error would complain about your syntax. A quick trip to the MySQL docs solved this issue. With Hibernate, there is almost no way to debug it, because instead of a command line, you receive a stack trace for every little issue. I’m sure stack traces are loved by many Java fanboys, but really, won’t SYNTAX ERROR do?

After trying out the completely useless Java DB server, which never saved my persistent data, I switched easily to MySQL server. I hunted for my data. And hunted. In MySQL, my EVENTS table ended up in the worst possible database, “mysql”. Hibernate shows no respect! The mysql DB is for system information, not your stupid data. This is not good.

mysql> show tables;
+---------------------------+
| Tables_in_mysql           |
+---------------------------+
| EVENTS                    |
| columns_priv              |
| db                        |

Now here’s the killer issue. When my company grows, and I need 5 or 50 clusters, will Hibernate help me? No. A separate connection factory is necessary for each database, and each IP. All of the ease of use goes away when I add a second IP.

What does Hibernate replace?

SELECT * from events where name=’David Kellogg’

I could have written that in my sleep. Adding a column is not hard. SQL makes that easy. Mapping and casting in your code is not hard. What is so hard that it requires Hibernate? Not much really.

The real issue is that Hibernate is a framework. A framework is like a Minnesota bridge. When one beam collapses, the whole bridge falls down. Once you change one item beyond what the framework allows, the framework becomes brittle, and collapses under the weight of ease of use.

10.05.07

Business 2.0, dead and gone

Posted in Uncategorized at 9:51 pm by David Kellogg

Business 2.0 bites the dust after the current issue. The real culprit, strangely enough is the web. I’m a subscriber, and I can barely open this issue, I’m so disappointed. This reminds me of when I received my Virginia Magazine, I did not touch it for weeks because of the black ribbon on the front. How depressing. I knew it was a memorial issue for the Hokies. I’m witnessing the death of a cool magazine, and I killed it.

busin

I killed it because I am an unpaid, unskilled writer attracting readers. And what’s my salary for this? Free!

It’s a shame because Business 2.0 had the guts to cover tiny companies that Fortune ignores.

It seems that after the AOL debacle, Time wants to distance itself from all things tech, including Netscape, online music sales, and Business 2.0. The Time execs never had the balls to get it right. Business 2.0 was all about those who chose to take a high risk to start their business, everything Time and Fortune deplore. That risk was written up so casually, it made you feel like everyone was doing it. Time did not want to take the risk of building this magazine during such a steep decline in print ad sales.

At least some magazines are taking some risks. The normally stodgy Virginia Magazine had an article about streaking the Lawn at the University of Virginia. Every student by tradition is supposed to streak the most hallowed patch of grass, the stepped quadrangle enclosed by Mr. Jefferson’s original, inspiring grounds. The magazine pointed out the first record of streaking, from 1937.

“A couple of them forsook their pajamas and rushed pell-mell, Adam and Eve fashion up to their rooms. And to think that a nudist colony is in the making at Virginia. That’s Jeffersonian Democracy for you.”

Fortune is a train wreck of writing lately. My last Fortune issue boasts “The greatest economic boom ever” and “Gates conquers China.” Oh, don’t hold back the hyperbole. I just don’t care. I wonder if there are any trends Fortune picks up on before they become mainstream. At some point Fortune lost its way by stopping reporting on how companies became great and started talking about the lifestyles of the rich and famous.

I declined to renew my subscription to this Fortune crap. And just to make matters worse, Time decided to send me several free Fortune issues, as if I wanted more garbage to take out.

All of this is being replaced by guys like me. I am part of the cult of amateurs, sucking advertising dollars from dead tree versions at a formerly high margin business, to a series of focused amateurs.

I wish the staff of Business 2.0 well. I hope it is replaced in some medium by a publication with a similar outlook of forward-looking businesses.

10.02.07

Why I switched to Rails and back to PHP in one day

Posted in Coding at 12:25 am by David Kellogg

Rails Logo

I love Rails, I think. During the 3 hours and 3 minutes I spent with r0r, I began to anticipate, then love, then loath this simple application. What I expected to be a fun 30 minutes turned into a grueling 3 hours, including a crying baby and a nearly crying back-end developer.

Yes, Ruby on Rails made my baby cry.

I decided to run Rails before deciding its fate in my coding repertoire. I think Terry rejected Rails based on far-too objective reasons of speed and reported scalability. As a sensitive guy, I can appreciate the subjective love people have for Rails. Since Rails is an Ogre, and an Ogre is made of onions, I pealed this onion to see its insides. Here is my minute-by-minute diary.

8:36 fink install Ruby. The assault on Rails has begun. Will it be easy? I don’t know a lick about Ruby. By the way, a ruby is a sapphire doped with chromium. When even a green laser shines on a ruby, it shines with a beautiful red.

As you can see, I had stars in my eyes.

8:38 Ruby is compiliing. Soon this wonderful package will be mine.
8:39 ‘gcc’ running. ‘as’ running. The excitement is building!
8:40 I will skip a straight-off download. Instead I will use ‘gem’.

Little did I know this ‘gem’ would be a 3 hour ordeal.

8:44 gem: command not found
8:46 fink install gem unsuccessful.
8:50 Looking at README. Looks super easy.

That’s the README of gem, and no, it is not super-easy. That was a dumb thing to say. What I did not know was that the very latest gem required a self-update before it could be used. Otherwise, it spews errors, such as command ‘<' not found. Syntax error. Grrrr!

8:52 dirs for models and views. Fools!

This is really stupid. There’s this pattern-like thangy that requires a model, a view, and a controller for every stupid web application. It’s a dumb idea, because it reduces problems sometimes, but always separates documentation of an app into 3 places. What a waste. Some stupid prof probably came up with that MVC thing.

8:56 Ethan just woke up.
9:01 Gave Ethan Mylicon. I hope it helps.
9:15 Ethan back to his mom.

Rails made my son cry. I hope DHH feels sorry.

9:17 ruby setup.rb
9:18 Oops. sudo make me a sandwich.
9:19 Compiling gem. Couldn’t they just write the installer in Perl?

The gem thing is no gem. Gem is the retarted-ruby-app-installer. It’s even slower than YUM, and makes me wonder how fast and scalable their CPAN-like server is.

9:24 ERROR: While executing gem … (Gem::GemNotFoundException)
Could not find rails (> 0) in any repository

Really? Rails not in any repository? Maybe I should just self-update gem first. That totally makes sense, since I just downloaded the latest gem!

10:43 Gave Ethan to Rebecca for his final nightly feeding
10:48 Updating gems. Why does this take so long?
11:42 Checking my Twitter. A PHP guy is following. He’ll be sorry after he finds how I love rails!
11:44 alias rails_hello_world=’rails hello && cd hello && ./script/generate controller welcome hello && echo “Hello World” > app/views/welcome/hello.rhtml && ./script/server -d && firefox 0.0.0.0:3000/welcome/hello’

Rails works! My server is alive! Actually, I do love Rails at this point, but it will all come crashing down in just 4 minutes.

11:48 Time for a stress test.
11:52 100 r0r welcome pages in 13 seconds
11:55 effects.js does not download until prototype.js is done
11:56 apache loads 100 in 5 seconds same Welcome page
00:00 Firebug says 1.82 seconds to load Welcome page in r0r

The truth is free. Rails is sooooo slow. 2 seconds to load a 7kB page is really sad. Prototype.js has to load before effects.js can load. This is a truly horrible app. Apache runs 2.6 times faster in my stress test. I’m sure there are r0r wienies out there that will complain that I didn’t load this or that customary app to accelerate my pitiful speed, but really, out of box, Ruby on Rails is a failure. I’m back to PHP and Apache.

12:52 Now I’ve had 52 minutes to reflect on this application.

Rails suffers from trying too hard. Yes it is easy, despite my wondering through the forest for 3 hours, to install Rails. Its problems of speed and inflexibility show right away. Maybe no one but I noticed the Javascript loading order.

If you wanted to correct something in a framework, you would have to re-write the framework, which destroys the whole point of coding inside the framework. A framework like Rails is like a dictatorship. PHP and library-oriented languages are all about freedom. Perl is freedom. Linux is freedom. Maybe Ruby is freedom. With this MVC trash, Rails is like a straight jacket. Dictatorships and straight jackets serve their purpose, but not in my coding universe.

I can has ur Rails

09.22.07

AJAX closures done well

Posted in Coding at 9:31 pm by David Kellogg

First what is a closure?

A closure is a function that returns without completing itself, and which still holds local variables at their old state. It’s pretty neat and handy when you see what they can do. Here’s an example of the town of Tinyville, population 5. A new resident moves in, but the census starts before he signs a lease.

var population = 5;
function fun(count) {
 return function() {
  alert(”count is “+count);
 }
}
setTimeout(fun(population), 1000);
population++;
document.writeln(population);

Result:

6
Alert: 5

The six is written to the screen, but the old value of the population is saved by the setTimeout and the closure function, fun.

Closures are so important that reading the wrong tutorial will doom the AJAX writer. Here’s an example from Apple’s AJAX tutorial,

req.onreadystatechange = processReqChange; // DOOMED!!

req is a global variable. That’s really bad, since the chance to use a closure has past and no more than one request at a time may occur. So much for asyncronous. One alternative is to tag each outbound url, such as “http://localhost/ajax.php?population=5″. That will save the state, but that’s not as good as saving whole objects or sets of local variables. The MDC tutorial at Mozilla gets it right. Here’s the crucial line with my population variable injected.

httpRequest.population = 25;
httpRequest.onreadystatechange = function() { alertContents(httpRequest); } // BETTER

Why is this better?
You can tack on any variable to httpRequest and it will be separate from other requests. For instance “httpRequest.population=5″ is a valid way to preserve needed variables. Later the population is used.

if (httpRequest.status == 200) {
 alert(httpRequest.responseText + “population is “+httpRequest.population);
} else {
 alert(’There was a problem with the request.’);
}

One final reason to use closures is that AJAX is asynchronous, so you are not guaranteed to receive responses in the same order as the requests were dispatched. This makes using a closure especially valuable.

09.20.07

Semantic Web, please go away

Posted in Uncategorized at 11:32 pm by David Kellogg

I’m tired of hearing how the semantic web is the big thing, the meta-web, the solution to all things. It’s not. It likely will never get off the ground, and if it does, it will be of very little use. Here’s why.

Read-write has an article about how the semantic web failed so far and how should it change to gain traction. I largely agree with it. While eggheads support the semantic web, real people are getting things done without it.

The semantic web cannot succeed. I will use Read-write to prove it.

Read-write uses three HTML meta tags for this article written by Alex Iskold. One is author, which is listed as Richard MacManus. The other is description, which has a Digg link, hardly a description of anything. The third is copyright, which goes to MacManus, but not Iskold. I’ll trust the last is correct. This is typical of the web.

Unlike most semantic web supporters, I have crawled the web for 4 years, now. The first thing you learn when crawling is not to trust servers. If it says UTF-8, don’t trust it. It says it is written in Chinese, you better test it against a real language detection module. The same is true for Read-write, here. Two out of three fields are incorrect due to copying by machines.

The semantic web suffers from malice. We have a long tradition of keyword stuffing, cloaking, gateway pages and other malicious devices. Web spammers will only use the semantic web to spread disinformation. It may list Brittney Spears ringtones in the description, but the page offers viagra.

The semantic web requires a network to exist before anything else starts. Crawlers and indexers will not spend time parsing semantic web information until there is a critical mass of correctly formated pages. Site owners will not move until the indexing makes use of the semantic information.

Usually when someone trashes the semantic web, microfomat goons come out of the woodwork to sing its praises. Yet, microformats suffer from the same fraud and incompetence as the semantic web. Plus the network has to appear out of whole cloth.

So what is good, if microformats and the semantic web are doomed to failure? Freedom. Someone should have the freedom to create whatever page he wants using any method (Flash, JS, AJAX), and guys like me will have to divine its purpose. No one should have to try hard to describe a page’s purpose. Finding the purpose is the hard work that keeps me employed.

09.11.07

MyBlogLog

Posted in Coding at 3:37 pm by David Kellogg

I just joined myBlogLog. I hope it works well. So far, I cannot see the widget. Maybe it will appear soon.

OK. It appears to have worked. See the sidebar on the right. Nice.

08.25.07

Minekey widget

Posted in Uncategorized at 9:41 pm by David Kellogg

Here’s my minekey widget.
There’s no magic here. I added my Stumbleupon favorites stream, Boing Boing and TechCrunch, and a nice cheery widget was created for me. These guys want to host a Lunch 2.0. I was looking for something like this.

« Previous entries · Next entries »