So this is not going to come as much of a shock to people experienced with CakePHP, but I’m just learning now and liking what I’m seeing. CakePHP 1.3 has a really nice set of conventions to work against and provides a seemingly pretty good scaffold for most typical webapps, so I’m thinking I’ll be making some more progress with that. Questions I still need to resolve include:
- Does it support jQuery easily enough (CakePHP uses Prototype/Scriptaculous as its default framework, but has provisions for using others)
- Is the Ajax-y goodness baked in enough?
- Will it really be flexible enough to accomodate my needs?
AS part of this I also ended up installing Xdebug, since that’s the default debugger for CakePHP. I must admit, the things I really like about it so far are:
- Ease of install (instructions here got me up and running and a couple of tweaks to my Eclipse PDT setup (which supports Xdebug out of the box – nice!) found here and here got me the rest of the way). The tailored install instructions that analyze your php.ini, provide the correct download and customized install instructions is the coolest thing for a newb like me to get up and running quickly! ;]
- Code coverage analyzer! I’m not sure if Zend Debug is able to do the same thing, but that’s way cool!
All in all, looks like I’ve found me a framework I can be happy with – finally! ;]
Posted on May 30th, 2010 by herbcso
Filed under: cakephp, frameworks | No Comments »
So I wanted to write about my woes with PHP ZendDebugger and the latest WAMP install. Bottom line: I can’t get it to work with PHP 5.3 yet. I believe this is an incompatibility in the debugger DLLs that I have been able to find for 5.3 – looks like the linkers used are incompatible with what WAMP is using.
So, here are my findings (in no particular order):
Hope that helps some of you!
Posted on April 6th, 2010 by herbcso
Filed under: zend | 2 Comments »
So I wanted to look up a Big Bang Theory episode yesterday and I noticed that Google found quite a number of pages referencing it. As a result, I got curious how many results each of the episodes would return. A few lines of Perl code later, here is the result.
(click the image to see a large version)

It lists the number of results returned for each episode as a measure of relative popularity. Interesting… By the way, I had to cut out the pilot episode because it turns out that the NSTA pilot’s certification requires you to know about the Big Bang Theory… Huh, who knew!? ;]
Here is the Perl code for the previous Big Bang Theory chart. In case you’re interested… ;]
Edited 2011-11-12 to improve the Perl code, removed dependency on having video files to pull titles from and pull from the Wikipedia Big Bang Episodes list article instead.
#!/usr/bin/perl
use strict;
use warnings;
use LWP;
use Data::Dumper;
use File::Find;
use GD::Graph::bars;
use GD::Graph::colour qw(:colours :lists :files :convert);
use List::Util qw /max/;
my $googleAPIkey = 'INSERT-YOUR-KEY-HERE';
my $googurl = "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=";
my %results = ();
my @csv;
my @episodes = &getEpisodeList();
foreach (@episodes) {
if (!($_ =~ /pilot/i)) {
$results{$_} = dosearch($_);
push(@csv, [$_, $_, $results{$_}]);
sleep 10; # Sleep for a while to avoid triggering quota issues
}
}
my @values;
my @keys = sort(keys(%results));
my $key;
foreach $key (sort(keys(%results))) {
push(@values, $results{$key});
}
my $maxYVal = (max @values) + 100;
print $maxYVal;
my $graph = GD::Graph::bars->new(800,600);
$graph->set(
x_label => 'Episode',
y_label => 'Popularity',
title => 'Popularity of Big Bang Theory Episodes',
y_max_value => $maxYVal,
transparent => 0,
bgclr => qw(white),
fgclr => qw(black),
textclr => qw(black),
x_labels_vertical => 1
) or die $graph->error;
my @data = (
[@keys],
[@values]
);
my $gd = $graph->plot(\@data) or die $graph->error;
open(IMG, '>BigBangTheoryPopularityChart.png') or die $!;
binmode IMG;
print IMG $gd->png;
close IMG;
open CSV, ">BigBangTheoryGraphData.csv";
foreach (@csv) {
print CSV join(",", @$_), "\n";
}
sub getEpisodeList() {
my @episodes = `curl http://en.wikipedia.org/wiki/List_of_The_Big_Bang_Theory_episodes | grep '
\\([a-zA-Z0-9 ]*\\).*/\\1/' -e 's/]*>//g' -e 's/"//g'`; return @episodes; } sub dosearch { chomp @_; my ($term) = @_; $term =~ s/ /+/g; my $agent = LWP::UserAgent->new(); my $search = "${googurl}The+Big+Bang+Theory+${term}&key=${googleAPIkey}"; $agent->timeout(1800); print "$search\n"; my $response = $agent->get($search); die "Cant't get $googurl -- ", $response->status_line unless $response->is_success; my $resp_content = $response->content; # print "$resp_content\n"; if ($resp_content =~ /"estimatedResultCount":"(\d+)"/) { print "$1 results\n"; return $1; } else { return 0; } }
Posted on October 4th, 2009 by herbcso
Filed under: Uncategorized | No Comments »
Just tried out Ubiquity – somehwat of a crossover between Greasemonkey and Quicksilver with roll-your-own mashups underneath it all… ;] Great of you want to use your keyboard more for Firefox. Possibilities are staggering!
Posted on August 28th, 2008 by herbcso
Filed under: browsers | No Comments »
So it’s almost at the end of download day, and I have to retract what I was saying yesterday. I guess Internet impatience got the best of me… ;] So of course, the good folks at Mozilla had the smarts to make sure they’d be ready for the storm of requests and it looks like their infrastructure only got weak knees for a little while at the start. Recovered nicely thereafter and at about 1:35pm EDT time FF3 showed up. I proceeded to happily download to my various machines and think this is much less of a drag now… ;]
spreadfirefox.com shows 7,389,769 downloads at the time of this writing, so I’d call that pretty successful – at least pending the next world record attempt. Since this is a new record, we’ve got no other benchmarks to compare it against, but I’d call that some pretty significant interest that will be hard to replicate!
Posted on June 18th, 2008 by herbcso
Filed under: browsers | No Comments »
So, here we are, 20 minutes after the start of FF download day and already http://www.spreadfirefox.com/ is down. mozilla.org is up, but the download link for FF 3 RC3 is unreachable, never mind the fact that the final FF3 isn’t visible anywhere yet. Hrmph.
Update (1:30pm EDT): Alright, so the RC3 is downloadable again, but FF3 Final still nowhere in sight.
Posted on June 17th, 2008 by herbcso
Filed under: browsers | 1 Comment »
Alright, so while the to Zend or not to Zend question is still under debate, I’m also looking at some AJAX-y goodness. There are several I’m looking at. Now, please do keep in mind that this is my personal preference only and does not reflect a wider standard. These are my opinions related to what I need to use these for. Flame on, if you like! ;]
GWT
- Pros
Obviously a nice framework, lots of support and has some good depth to it. - Cons
Needs a JSP container (e.g. Tomcat) so that disqualifies me since my server setup will not have this available.
dojo
- Pros
Lots of widgets, loads of things already done for you. Very extensive and seems to be pretty cohesive in its approach. - Cons
I tried to like it, I really did, but bottom line was that the examples just seemed a little behind the times (using old versions of the framework) and I ran into a couple of errors in FF 2.0 (although to be fair that might have been due to some other issues).
Prototype + script.aculo.us
- Pros
Nice and tight “framework” (more of a toolkit set than a framework, really), very fast and small. - Cons
There are fewer ready-made widgets that are part and parcel of the base tool set. Oh, I know, I could download a boatload of widgets from various places, but it seems these are all just ever so slightly different in their implementation details and quality of implementation, I just don’t feel like giving myself that headache. I’m a one-stop-shop kinda guy (for now ;] ).
YUI
- Pros
Big-name support, lots of features. Reasonably intelligent about what can be included and what not, should help keep size down. - Cons
Well, can’t think of any yet… ;]
Looking at this list, looks like YUI will be my choice. Time will tell whether this was a bad idea or not. ;]
Posted on April 25th, 2008 by herbcso
Filed under: AJAX, coding, frameworks | No Comments »
I am currently evaluating whether to use the Zend framework in the development of the site. Any suggestions/feedback/practical experience sharing welcome. I don’t want to get myself tied down to a large, cumbersome and potentially inflexible framework (which Zend at least claims not to be, but not having used it yet, I’m not so sure).
Posted on April 23rd, 2008 by herbcso
Filed under: coding, frameworks, zend | 1 Comment »
Welcome to the new trackmypop.com. This site will allow you to enter information on how many sodas you have consumed. The idea will be to provide charts, usage data, a forum to discuss consumption habits, etc.
I personally am addicted to Diet Mountain Dew and thought that if I was to track my usage, I might be able to figure out how to reduce my intake. I started doing this using an Excel sheet, but that quickly became cumbersome. I’d like to be able to provide this service as a Web 2.0 site, and ultimately also a mobile service in order to allow for quick entry of how many sodas you’ve consumed so far.
I’m a programmer exploring web technologies and see this as a learning opportunity for myself. Feature requests are welcome, but please do be aware that I am doing this in my spare time and will not always be able to respond quickly.
The code for running this site should be released as Open Source when I’m ready to have a first bundle ready to go for people. Right now this is just an idea with nothing concrete behind it yet – so I’ll keep you posted on development progress here, for now.
PS: In case you’re wondering why it’s “Track My Pop” (instead of soda) – thank my wife, who’s from Pittsburgh and had me thinking about pop.
Posted on April 22nd, 2008 by herbcso
Filed under: site updates, welcome | No Comments »