Archive for September, 2005

My Politics

3

I took OkCupid’s Politics Test. Apparently I’m a Democrat, a social liberal and an economic conservative. The latter two sound about right, but I’d typically describe myself as a black hearted, small government, pro-business Republican bastard. I’ve never been a democrat although I voted for Kerry, which really was a vote against Bush. Basically, I’m a Republican but I don’t hate foreigners and immigrants. Which works out because I’m an immigrant myself.


You are a

Social Liberal
(80% permissive)

and an…

Economic Conservative
(61% permissive)

You are best described as a:

Democrat



Link: The Politics Test on Ok Cupid

Referrer Spam Targetting Pages Titled Referrer

1

I have a theory.

I keep getting more and more referrer spam. It was a minor annoyance at first, but now it’s large enough to screw around with my stats. And it’s not coming from a few IP addresses any more, it seems much more automated and comes from a lot of different addresses. It tends to come in blocks, so suddenly I’ll get 20 hits with referrer spam to the same page. The original fix of blocking the idiot’s IP address is no longer effective.

Here’s what I’ve noticed: the referrer spam goes primarily to the posts that talk about referrer spam. I thought it was cute, but there’s probably more to it than that. The spam traffic tends to come in a few days after the post, about the same time that article starts showing up in the major search engines.

My theory is that there’s an automated program in use that utilizes a group of computers, possibly a zombie farm, to target pages that contain the word ‘referrer’. The idea being, if the page has the word ‘referrer’ in it and is returned by a search engine, then chances are pretty good that it’s a log report of referrerers, and that it’s indexed by the search engine, and hence has the pagerank goodness that these spamming idiots are seeking.

Hmm. I searched for referrer on both Yahoo and Google and they return my page, but not a lot of actual referrer log pages. So that puts a chink the theory. However, it’s too much of a coincidence that all the referrer spam is going to pages that contain referrer in the title.

So this is my experiment. I’ve said referrer about as many times as I possibly could in this post, so we’ll see if I start getting referrer spam to it in a few days.

If you’ve seen anything like this or know more let me know.

Yahoo Mail is Excellent

3

I’ve been using Yahoo! Mail (the fancy new version) for a few months now (I work at Yahoo!), and I can tell you this thing is excellent. Quite a few people agree – PC Magazine, Wall Street Journal, and Paul Kedrosky, to name a few.

I’m using it right now with firefox 1.5 beta, and it works like a champ. On a good connection it’s very responsive, more so than Outlook. On a slow connection it’s still pretty usable, much better than other Web based mail. It’s also orders of magnitude better than Outlook Web. It’d be great if I could my work mail directly in my Y! Mail account.

Go sign up for the beta and experience the glory.

Excellent Ruby Resource

0

Ran across this presentation from OSCON 2005 entitled “10 Things Every Java Programmer Should Know About Ruby“. It’s really quite excellent. If you know Java and want to know more about Ruby, I definitely recommend reading this. Of course I should mention I don’t know Ruby, but this document has me very intrigued about trying it out. Just as I was getting to really like Python…

Ebay Does Buy Skype!

0

Turns out the rumors were true and Ebay actually acquires Skype:

EBay said on Monday it planned to pay $1.3 billion in cash and $1.3 billion in stock for the online communications company. It will make a further payout of up to $1.5 billion if certain financial targets are met.

Congrats to Skype and DFJ (who funded my last company). Good stuff.

So, do we read into this a very clever cohesive strategy from Ebay that most of us have missed, or simply concern about their main line business and a desire to diversify? The couple of ex-Ebay folks I’ve talked to are skeptical of the Very Clever Plan scenario, but maybe that’s why they’re ex-Ebayers.

As an end user, I’m not particularly thrilled about this deal. I use Ebay rarely, grudgingly. I use Skype often, gladly. My experience with Ebay has been continuous increase of fees and a requirement to know more about me than any other business I deal with. I’ll give you an example: I want to change my email address, Ebay requires me to give them credit card information. WTF?

Skype, on the other hand, has been a pleasure. They recently made calls to 800 numbers free. They allow me to use their system without knowing anything about me. Somehow I just don’t see these kinds of moves coming from Ebay. Maybe time to look at that Gizmo project?

AJAX and the clean Model-View-Controller

1

I’d like to say I’m a strong believer in MVC, but I’ve never quite gotten it to work cleanly for me. There are two problems it doesn’t solve for me, and those are the two that I’m looking for my pattern to solve.

First, there’s the issue of what to model in the Model. Do I model the back-end data/services/objects or the UI data model? Note that these are different. The UI model is inherently about what’s being displayed. The back-end model is about the inherent behavior of the back-end system. You can have 10 different UIs sitting on the same back-end. Separate, different.

Having services and UIs differ is a valid and good thing. Look at all the interesting mashups. Does this mean you should explicitly not model the UI in your backend? The Model is just the back-end model? Or does the Model actually live in the client, and I’ve got it all backwards?

I think the point of the Model is to model the UI, but being primarily a back-end guy, first and foremost I’d like to have clean APIs to my services. Someone smarter than me will create a better UI than the one I’ll ship out of the box.

Hmm. So I’m going to model the back-end, and with Laziness as one of my first order principles of good design, I’m damned if I’m going to have two different models, so I’m going to neglect the UI model. But if I don’t model the UI data, who will? Feels like I’m not doing MVC right.

Ok, so the Model has me conflicted. Perhaps the View will clear it all up for me.

What is the View, exactly? In the Web world I tend to think of the View as the HTML. I think the point is to have the model be free of excess code, a nice pristine representation of the UI I can hand to an HTML guy to make pretty. Is this right?

But Views never are clean of code. They’re messy. They’re gooey. That’s their nature. Views change based on the state of the app, the nature of the data, etc. You must be able to express if/then/else, calculate things, do all sorts of messy nonsense. Perhaps someone smarter than me can do that cleanly, but I always end up with code and presentation all together.

Ok, so where am I now? I’m not sure what to Model, and my View is getting messy.

Well, the controller I’m ok with. I understand what that is. That controls state.

Because of all this, I can never get MVC quite right. I end up in PHP land, embracing the messiness. Throw the code into the template, mix in some of the controller in there too even though I know I shouldn’t. The MVC way won’t be clean for me anyway, so let me at least get the job done quickly. PHP is great at that. I think Dave Megginson is expressing a similar sentiment here?

Recently I’ve been playing around with AJAX, and things are becoming clearer.

My Model will be my services model, not my UI model. The two are very separate in very clear ways: they’re written in different languages in different places, one on the back-end, one on the browser. No problems there.

My View will be my code in the browser. It’s messy. It’s ugly. I really don’t like Javascript. But at least I know what goes there. The presentation code and the presentation are inexorably mixed together (the former manipulates and modifies the latter), and that’s just how it is, so I don’t worry about the cleanness. But it’s clean in that my interfaces to my back-end are well defined and not mixed in with my View.

How about the Controller? This one becomes a little more cloudy for me in practice, because I’ve separated out the View completely, so really I’m controlling my back-end state. Which is different from controlling my View state. It becomes more an issue of validating that the state as I know it on the back-end is the same as the state on the front-end. Or, more acurately, to validate that the state transitions the front-end requests are acceptable to the back-end.

There you have it. I’m on my third AJAX project / experiment, and I find I’m spending most of my time on the design of the APIs and the state transitions. That feels right. If I nail that, I can build a new UI completely independently. Better yet, someone else can do it. I know where all the code goes. Things feel clean.

I’m not really sure this is even the MVC anymore, or that I ever had MVC right, but it fits my brain better than other solutions I’ve tried before. And I’ve tried a few. Perhaps the problem is I’m applying MVC to the wrong part of the problem?

What do you think? Someone who understands MVC please set me straight.

Book Review: Freakonomics: Go Read It

1

Freakonomics : A Rogue Economist Explores the Hidden Side of Everything is an interesting book. It poses and answers a series of interesting, unrelated, marginally economic questions, such as why drug dealers tend to live with their moms and whether children’s names effect their success in life.

The most appealing aspect, at least for me, is that it’s driven by statistical instead of politically correctness. The questions themselves are generally quite interesting, and it’s written well enough to keep the pages turning. It’s what my friend would call a crapper, meaning you can read the whole thing in one sitting. It’s a short book.

No major complaints. Well, if I have to complain, I’ll bring up two: the lack of a unifying theme, declared early on in the book, actually did turn out to bother me a bit, because I wasn’t sure the book was finished even though it ended. Second, the chapter on parenting was very entertaining and enlightening, and appealed to the smug side of me that wants to believe the my lax attitude is just as good for the kids as the type double-A super moms that litter the neighbourhood. However, something got fishy at the end of that chapter: after spending a lot of time explaining that various factors are not important to the success of a child, as measured by early academic achievement, the ending casually drops a paragraphs on the success of children adopted by successful families, as measured by success later in adult life. The statistician suddenly changes the success criteria, leaving me feeling I’ve been paying intentionally misled to pay attention to the wrong criteria all along. In other words, if early academic success is not a great indicator of adult life success, as that paragraph seems to suggest, why have we been paying it so much heed for the whole chapter?

In any case, this is a good short read, I recommend it.

I Have a Dream…

0

Two angles on one reality colored by color:

http://www.hedonistica.com/archives/ap_racist.jpg