more charting…
Posted by detour1999 | Filed under OO, google, nerdly, programming
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.
Posted by detour1999 | Filed under general, nerdly, programming
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.
Posted by detour1999 | Filed under OO, nerdly, programming, work
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…
first week down.
Posted by detour1999 | Filed under general, work
well. first week at the new job is done.
I can’t possibly express how excited I am for the time ahead.
There is really nothing quite like new and interesting challenges to make me excited about work.
awesome awesome awesome.
-d.
time to post…
Posted by detour1999 | Filed under nerdly, work
seems like I only ever seem to post when I get a new job.
yeah.
tomorrow’s a new day.
:giddy:
-d.
new job
Posted by detour1999 | Filed under general, work
so, yeah….
i’ve finished up the fourth day of my new job.
its kinda weird to be busy.
and kind of exciting.
more to be posted sometime when Im not about to fall asleep.
-d.
the end is nigh.
Posted by detour1999 | Filed under general, work
tomorrow is the end of my current tenure at this job.
i’ve been here for a long time (about 26.6% of my life right now…), so it’s kind of bittersweet.
good people will be missed.
new and different things starting soon.
werd.
-d.
css selectors
Posted by detour1999 | Filed under css, nerdly, xsl
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.
Posted by detour1999 | Filed under css, js, nerdly, 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:
- CSS
- DOM Scripting
- 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.
Posted by detour1999 | Filed under general, nerdly
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..