Archive for the ‘nerdly’ Category

google reader sharing: conjecture or inference.

I’ve been thinking a lot about google reader and the sharing fiasco over the past couple of days.

It seems to me that the new sharing feature doesn’t really work for anyone. For some, (who communicate primarily through their @gmail.com account) it was way too easy to share with their contacts [NB: I said "Contacts" not "Friends", that's a rather important semantic distinction.] For others (who don’t really use their @gmail.com address as their main email address) it became a series of emailing actual friends for their @gmail.com account. Personally, I had already bothered my friends once (a while back) for their shared items address… I didn’t need to bother them again for their gmail address.

In theory, better integration of friend’s shared items is an awesome idea. I was (and still am to an extent) incredibly excited about it. The problem is in the definition of friend.

The criteria for “Friend”ship in google reader is the ability to chat user@gmail.com to user@gmail.com. That ability comes about either by explicitly choosing to allow chat between users; or by exchanging emails. That is really the core problem with google’s implementation. Conjecture.

I’ve been wrestling with the idea for a while. In my mind, google’s implementation is based on flawed logic, but that flawed logic seemed to stem directly from trying too hard to apply DRY principles.

Say I had a dataset representing a person. I wouldn’t want to store both birthdate AND age. Age can conclusively be inferred by birthdate.

Say I had a dataset representing social interaction. I wouldn’t want to store social connectivity if it can be inferred from existing data, right?

In this case, no.

Given the age example, age can ALWAYS be calculated given a birthdate. Friendship can NOT be calculated based on email exchange. For example, 60% of my “friends”, according to google reader, are people I have bought used volkswagen parts from. Exchanging emails about buying used headlights does not infer friendship. Interaction, yes. Friendship, no.

Inference is good practice. Conjecture is not.

If you can’t get reproducible results ALWAYS (or at the very least, most of the time) it’s not inference… it’s conjecture.

Google Reader… sharing and such.

Oh google
Sometimes you piss me off with how you tease me.


As you might have heard (it’s all over the interwebs!) google integrated shared items with your friends. Like this social networking thing I’ve heard so much about…

Which is cool.

I mean, I’ve been reading certain friend’s shared items for a while now… but it’s cool that it’s so much easier to do it…

…only it’s not.

Now here’s the rub. The three people whose shared items I actually want to see everyday are not my friends.

Wait, what?

That’s not right. I’d venture that they are three of the people I talk to the most…

But, according to google, they aren’t my friends. (um… fuck you google, I’m self conscious enough as it is…)

So I checked out that handy link to “manage friends” and it said I had to be able to chat with my friends…

WTF?

So, I chatted (via google f’n chat…) with Harper about why he had friends and I didn’t (at least as far google is concerned…)

I was bothered all day about this.

While I was pissed about my lack of online friends (how sad…) I had an interesting conversation with Atkins and Harper about how anyone that would want to be taken seriously in the tech arena can’t really use a “major carrier” email address. detour@detour1999.com makes me more real (like in real life…) than detour1999@gmail.com. So, yeah… detour@detour1999.com is me on the interwebs…

And, I’m not an idiot… so I’m using google apps for email etc. Why? ’cause I love integration.

Most of my friends are the same way… they have their own domains and they (generally) have google apps handling the email (and here’s here this sideline starts to make sense) and thereby, the chat.
Now, in general we all have (one or several) domains and emails (usually collected into one main account), and a couple of jabber accounts… and 1 google account that is generally used ONLY for reader and google code. Why, because you need a google account for each of those things.

Oh, shit. That’s why I have no friends….

Yeah, google kicked some ass with integration. I can chat all day long with Harper or Bryan, but their not my friends… because I’m chatting with the wrong version of them.

So, yeah. I have no friends because even though me and all my friends all use google as the back bone for our online communication, apparently we are using the wrong flavor.

So, what the fuck was the selling point of google apps for domains? Oh, right… integration.
Well, realistically, I have 4+ (or something like that) google accounts. (work, this, a couple other sites, my companies site, my google account)… apparently integration isn’t a big deal there.

SHORT VERSION:
Google Reader will only recognize friends that you can chat with google account to google account.
Seriously… why can’t I associate my other google apps accounts with my main google account?

better charts than yesterday.

word.

More playing with the google chart API.

Second cut is somewhat more usable (at least for me).
Check out the “demo” (quotes, as it’s not much of a demo…)

    Limitations as it currently sits:

  • no support for lxy, venn, or scatter-plots. lxy and scatter should be available soon… I’ll go into the venn diagram stuff later…
  • scaling is in place, but kinda useless until I get axes marked correctly. That’s tops on my priority list for this.
  • Some extras still need implementation (chart background, image background, data point markers, etc.)

werd it up.

I am kinda pleased with how the code is shaping up. I haven’t had much of an opportunity in the past to play with inheritence and polymorphism in PHP (blah, blah, blah…).

Currently I have it set up where like so (in terms of inheritence):

    gChart (the base chart class)

  • gPieChart (has a simple set3D(bool) function)
  • gLineChart
  • gBarChart
    • gStackedBarChart
    • gGroupedBarChart

I will probably refactor that sometime soon. But, I’m happy with how it works currently.

I was concerned for a bit about how I would be losing the ability to change the chart type with one line of code (as I could [and did] with the first draft) by breaking chart types out into separate classes. The fact of the matter is that really, no one is very likely to be doing that anyway. So, better code at (perhaps) the sake of some usability…

My plan for next week: axes labeling, those last three chart types, and what’s left of the “extras”.

I put the latest class (gChart2.php) up on google code if anyone wants to see. I’m sure there are plenty of ugly things in there… I’m still getting used to a bunch of things.
-d.

ps.
Venn Diagrams. WTF?
according to the docs:
Supply one data set where:

* the first three values specify the relative sizes of three circles, A, B, and C
* the fourth value specifies the area of A intersecting B
* the fifth value specifies the area of B intersecting C
* the sixth value specifies the area of C intersecting A
* the seventh value specifies the area of A intersecting B intersecting C

Couple things…
Always three circles? No matter what? WTF?
The three circles are relatively sized, but the intersections are not? So nothing is to scale?
Like so: A=300, B=200, C=250, A∩B=10, B∩A=10, C∩A=0, A∩B∩C=0

…fucking nevermind.

those first three values (A, B, C) NEED to be scaled by the user. Anything over 100 will be 100. so, that example above, if those circles look equal, that’s cause they are. I should be able to have Venn Diagrams knocked out soon. UGH. Way too much time wasted trying to figure out wtf that “the relative sizes of three circles, A, B, and C” was supposed to mean.


Update: 12/9/07 21:26
Venn Diagrams are working and on that demo page.
I’m still non-plussed with the implementation. Whatever.
-d.

more charting…

alright.

I’ve been playing with a php wrapper for the google chart API.
My first cut of it kinda sucks. But here it is…

    Limitations as it currently sits:

  • only 1 data series per chart (yeah… I’m working on it…)
  • scaling is not in place yet (had it working, then introduced a bug in arithmetic somewhere…)
  • colors and “extras” haven’t been implemented yet. (They will be.)

werd up.

I will admit, it’s nice to use as an object.

More to come. My plan for tomorrow is: proper scaling, multiple data series, and all the “extras”.

(I put together a project on google code… I don’t have an SVN client on my mac yet, so I haven’t committed anything yet. I put the basic class in the downloads section, if anyone actually wants to see it.)

werd.
-d.

charts w/ the google chart api.

What if there was something that could merge a sad love for data (and the display thereof) and a disturbing affinity for the web and its development.

What if.

What … t f

Oh hell yes. A relatively simple API that will generate a simple .png of a chart based on data you pass it. Awesome.

so, I had some fun playing with it today.

It’s pretty damned easy to use and puts together some pretty nice results…

not too shabby, right?

Harper suggested I write a php wrapper for the api.

I told him it almost wasn’t worth it since the API is so easy to use. However, being the sad, lonely man that I am, I spent my friday night playing computers.

So, after playing with the API for a couple hours, I have some issues…

  • No support for negative numbers. None. WTF?!
  • Bar/Line charts only support numbers <=100

check it out:

Lame.

But, there are ways around most of these…

all data needs to be converted to a percentage. So, 1000|100|10|-10 would become 100|10|1|-1.

Negative numbers are still an issue… some people over on the Google Chart API Google Group were talking about adding a second set of data to mimic the x-axis to get the display of the negative number to kinda work.

I decided not to bother with that just yet.

So, I started working on a PHP wrapper for the API that took all of these things into consideration…
…which I should have kinda working this weekend.

-d.

oo thanks.

I’ve been thinking about object oriented development of late.

Ive been doing OO dev for about 8 years now… (C# for about 6 year, and VBA/VB6 for a couple before that, mostly windows apps.) I’m kinda ok at it.

Recently, i’ve been doing a lot more OO dev in other languages. (specifically js and php)
And it comes pretty easily…

…and I’ve been wondering why.


Also, it’s cold here in Chicago.and whenever it gets cold, I get sentimental and stuff…

…And i realized that I’ve been super lucky to have great co-workers to learn from.

so, that being said…
Jeff really realigned my thought process to an OO way of thought.
Mike and Rick help to make me passionate about doing OO as right as possible.
Brian got me thinking about OO on the web with a web appropriate language.
Harper gets me thinking about doing stuff outside of OO, and breaking my reliance on msft. (And gave me a shot at my new job @ skinnyCorp.)
Bryan refuses to ever take anything I say at face value, and forces me to really think about why we should do anything.

werd.

thanks guys…

time to post…

seems like I only ever seem to post when I get a new job.

yeah.

tomorrow’s a new day.

:giddy:

-d.

css selectors

okay…
here’s something I’ve been thinking about.
XHTML is just a specific flavor of XML, right?
Furthermore, valid HTML is almost valid XML (aside from some non-closed tags, like <hr>, <br> etc..)
CSS uses selectors to chose which parts of the markup to affect, essentially returning a set of nodes based on a selector.
XPath queries return a set of nodes based on that query.

Why can’t we use XPath queries as CSS selectors?

I know the obvious answer is that it doesn’t support it… I guess my question is why not?

I know, this sounds a lot like XSL…
but not.
I just want the selectors that XSL has for CSS.

Can anyone tell me why that’s a bad idea?
-d.

summary of work.

Well, I quit my job that I’ve had for the past 7 1/2 years…
It’s a really odd sensation to not have the same thing to do everyday…

Friday is my last day.

Until then I am supposed to write some sort of ReadMe file for the internal site I’ve been working on.
I should rephrase that.
I am supposed to write a series of ReadMe files on the aspects of the internal site I’ve been working on that no one else seems to understand.

Which is to say, three files:

  1. CSS
  2. DOM Scripting
  3. AJAX

I’ve been somewhat nonplussed about the whole thing. Frankly, I’m of the opinion that if you don’t know the basics of CSS, you shouldn’t be allowed anywhere near the back side of a website. Similarly, if you don’t know anything about the DOM, don’t go near DOM scripting. Especially not on a production site.

But, in the end, I want to leave here on good terms, so I’ve been working on the ReadMe files…

Here’s what I’ve garnered from writing the CSS one and the DOM scripting one. (more…)

sleep, or lack thereof.

Couldn’t sleep last night… shocking, I know.

Rah tried to help with the following
“Try to think of 100 colors.”

it helped for about 3 seconds while I wrote this in my head:

public string[] ListColors(int numColors)
{
ArrayList colorList = new ArrayList();
for (int curColor = 0; curColor < numColors; curColor++)
{
string newColor = Convert.ToString(curColor, 16);
newColor = FormatHexColor(newColor);
colorList.Add(newColor);
}
return (string[])colorList.ToArray(typeof(string));
}


private string FormatHexColor(string newColor)
{
string retStr = "#";
int leadLength = 6-newColor.Length;
for (int a = 0; a < leadLength; a++)
{
retStr += "0";
}
retStr += newColor;
return retStr;
}

yeah, I’m kinda lame..

(more…)