Categories
How-To TechBiz

Stealing Your Js-kit Ratings for Fun and Profit with Ajax

Want to steal your js-kit data back now? Get the source.

Keep reading if you want to learn more about getting your data if it’s hidden in Javascript and can’t be scraped.

TechCrunch enthusiastically blogged about Js-kit, which TechCrunch bills as “Web 2.0 for lazy people,” more than a year ago. The first time TechCrunch blogged about js-kit’s commenting system, and then the 2nd time, the site blogged about the ratings system.

Js-kit is great because you just paste two lines of code into your blog or website and then kapow, you have a ratings and/or commenting system with 0 money spent on coders.

But all your ratings data is hidden in a sea of javascript that cannot be easily scraped.

Imagine you’re a long-time customer of js-kit. It’s two years later. You need to do some web analytics on the ratings. You’re wondering, “How do I steal all of my data for Js-kit?”

I emailed Js-kit this past Wednesday asking them to how to access my ratings. So far no word from them.

But if you’re like me and have watched The Matrix a few too many times, and sometimes dream that you are Neo, then there’s hope for getting your data. I found an easy way to get your Js-kit data that they won’t share with you.

1) Alter your js-kit ratings code so that it has a dom id.

Js-kit ratings code looks like this:
<div class="js-kit-rating" title="" permalink=""></div><script src="http://js-kit.com/ratings.js"></script>

Change it so that it has a unique id. In this example, I use “js_stuff”:
<div id="js_stuff" class="js-kit-rating" title="" permalink=""></div><script src="http://js-kit.com/ratings.js"></script>

2) If you don’t already have it, add prototype.js to your library of scripts. We’ll need prototype’s Ajax class.

3) Create a javascript function for snagging js-kit’s rating. The gist of this function is to dump the innerhtml of the id, js_stuff, and pass it to a script that parses it and snags the ratings.

4) Create a script used for parsing the ratings and saving it to a file or database.

You can see the js-kit rating snagger in action along with source code.

Categories
TechBiz

A Comparison of PHP Frameworks

I ran into a great summary comparison of PHP Frameworks. I just started using CodeIgniter because it allows me to rapidly prototype facebook apps.

Categories
TechBiz

What Website Best Expresses The Idea that There is Order in Chaos?

The subject says it all. Any takers?

Categories
film TechBiz

Follow up to Full Movies on Youtube

In my last post, I talked about finding full feature length movies on Youtube. The only genre where I can watch a movie from beginning to end is historical fiction. Movies like Elizabeth and Pride and Prejudice are on youtube in their entirety. My only guess for the reason why is this: Historical Fiction movies don’t really make bank, so the studios don’t feel threatened by their “dead” movies being on youtube. Instead they see it as free advertising.

Categories
film TechBiz

Full Movies on Youtube?

I’ve noticed that you can view entire movies on Youtube. Can you guess which genre?

I’ll list 5 genres.

sci-fi / fantasy
drama
comedy
historical fiction
film noir

I’ll let ya know my findings next week.

Post your responses here.

Categories
TechBiz

What Is Work Productivity?

Just wanted to share this post on /. :

“In France, we often do work less than 40 hours a week. Less work also means better productivity. There surely is a “balancing point”, but if it exist, it is different for every person, and is not constant with the time.”

Believe it or not, there is actual research done on this–not that anyone ever pays attention to the results. If I recall correctly, it boils down to something like this:
– Productivity is low for the first 1-3 hours of a day as people get into the swing of things
– Daily productivity mostly goes up, but drops toward the end of the day (possibly because people are consciously “winding down”)
– Productivity per worker hour peaks somewhere around a 30-hour week.
– Total sustainable productivity per week peaks at around a 45-hour week.
– Around 50 hours and up, fatigue builds up over time until burnout kicks in. Sustained work weeks of 50 hours are likely to be getting less TOTAL WORK done than sustained 35-hour weeks.
– Work weeks of around 80 hours are sustainable for maybe a week or so before catastrophic loss of total productivity occurs
– Anything much more than 80 hours likely results in immediately LOWER productivity, as fatigued workers make mistakes that take more time to fix than the extra hours provide.

From this, one can conclude that European schedules are more likely to maximize individual productivity (more work per hour), while American schedules are more likely to maximize organizational productivity (more work per person). One can also conclude that any manager who demands sustained work weeks of 50 hours or more is incompetent and a fool; the management equivalent of the kind of programmer who creates so many bugs he provides a net negative productivity to the team.

In practice, actual work hours are lower than they appear; most salaried workers are prone to finding numerous ways to not work while at work, largely because in many office environments physical presence is seen as more important than actual productivity.

I suspect the best balancing point would be something like four 9-hour workdays per week. Longer days to minimize the productivity drain of mornings, but a shorter total work week to allow occasional bursts of extra effort without creating long-term burnout.

Categories
TechBiz

More People Should be Using Sparklines

  5-Year Close High Low
Cisco 19.55 80.06 8.60
EMC 13.05 101.05 3.83
Sun 5.09 64.32 2.42
Oracle 13.01 43.31 7.32

If stocks look this beautiful, just imagine how beautiful your web analytics data, or twitters would look like when you beautified it with sparklines.

Categories
TechBiz

XSS in Facebook’s groups?

Can anyone verify this rumor?

I’m told that altering a group’s name is a possible way to do XSS.

Categories
How-To TechBiz

Facebook Applications

There’s an interesting article on how to build a viral facebook application at Inside Facebook. Articles that frequently update the newsfeed and minifeed, and make use of the invite feature in the API become viral facebook apps.

For some sample facebook application, check out my source code.

Categories
How-To TechBiz

More MySQL 5.1 Benchmarks: My Code is Faster? And Slower? WTF?

I decided to benchmark the code that builds out the partitioned and non-partitioned tables.
The results are very perplexing.

table-type insert select
non-partitioned 34% 1.02%
code-partitioned 26.98% 96.87%
mysql-partitioned 38.89% 2.03%

Code-partitions are fast on the inserts.

MySQL Partitions are fast on the reads.

This seems to suggest a complicated MySQL master-slave set up where you just have code partitions on the Master and MySQL partitions on the slave. It’s probably not worth the effort setting up, so I’ll just go with the MySQL partitions and work on finding ways to make the MySQL code work faster.

What do you folks think?