Posted on 1 Comment

ShareThis WordPress Plugin Broken – Easy Fix!

I recently added a ShareThis link ShareThis.com to each of my posts. I chose ShareThis.com because it seems to be very robust while leaving a relatively small footprint on the blog and appears relatively unintrusiveness and benign. Of course, some folks will be quick to point out that the tracking features and having the icon linked back to sharethis.com is very intrusive and anything but benign. In this instance, I don’t see it as that big a deal. One of the attractions to ShareThis.com was its WordPress plugin making setup as easy as going to the website to generate the widget code, then inserting that code in the settings box on the admin screen in your WordPress blog. But it didn’t work.

At ShareThis.com, a publisher generates a script that looks like this:

<script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=abcdefgh-ijkl-mnop-qrst-uvwxyz012345&amp;type=wordpress&amp;embeds=true&amp;post_services=facebook%2Cdigg%2Cdelicious%2Cybuzz%2Ctwitter%2Cstumbleupon%2Creddit%2Ctechnorati%2Cmixx%2Cblogger%2Ctypepad%2Cwordpress%2Cgoogle_bmarks%2Cwindows_live%2Cmyspace%2Cfark%2Cbus_exchange%2Cpropeller%2Cnewsvine%2Clinkedin%2Cfriendfeed&amp;headerTitle=Thank%20you%20for%20sharing!"></script>

After updating, the code will have a 2nd publisher id appended to the end. With two publisher ids, ShareThis will not register your site nor collect statistics.

<script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=abcdefgh-ijkl-mnop-qrst-uvwxyz012345&amp;type=wordpress&amp;embeds=true&amp;post_services=facebook%2Cdigg%2Cdelicious%2Cybuzz%2Ctwitter%2Cstumbleupon%2Creddit%2Ctechnorati%2Cmixx%2Cblogger%2Ctypepad%2Cwordpress%2Cgoogle_bmarks%2Cwindows_live%2Cmyspace%2Cfark%2Cbus_exchange%2Cpropeller%2Cnewsvine%2Clinkedin%2Cfriendfeed&amp;headerTitle=Thank%20you%20for%20sharing!&amp;publisher=a1b2c3d4-ijkl-mnop-qrst-u4w2y10a2r4d"></script>

After reviewing the plugin code, I realized the way ShareThis generates the script must have changed overtime. Crowd Favorite wrote a great plug-in but it expects the publisher=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx to be at very end and if it does not find a publisher id at the end, it puts one there which is why you will end up with two publisher ids. To fix this, simply move the publisher id to the end of the script before pasting the code into the ShareThis settings box in the WordPress admin:

<script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#type=wordpress&amp;embeds=true&amp;post_services=facebook%2Cdigg%2Cdelicious%2Cybuzz%2Ctwitter%2Cstumbleupon%2Creddit%2Ctechnorati%2Cmixx%2Cblogger%2Ctypepad%2Cwordpress%2Cgoogle_bmarks%2Cwindows_live%2Cmyspace%2Cfark%2Cbus_exchange%2Cpropeller%2Cnewsvine%2Clinkedin%2Cfriendfeed&amp;headerTitle=Thank%20you%20for%20sharing!&amp;publisher=abcdefgh-ijkl-mnop-qrst-uvwxyz012345"></script>

Note: In the settings box, the &amp; will be converted to just & but the code correctly uses &amp; with the post. Your code will still be xhtml compliant.

Posted on Leave a comment

Questions from a wanna be Buddhist

When the day is spinning out of control, would stopping for 15 minutes of Daimoku help or make you feel 15 minutes more behind?

Buddhism is about revitalizing humanity, and transforming the world we live in from one dominated by greed, anger, and stupidity into one of peace and happiness. [Source, Jason Jarrett of A Buddhist Podcast, A Buddhist Podcast – Bodhisattvas of the Earth, 2:46-2:58]

Posted on Leave a comment

I need my batcave!

I love telecommuting! I’m a huge advocate of telecommuting. I think we will find great societal benefit to having a group paradigm shift and having at least half our workforce work from home. Imagine if suddenly companies only needed half (or less) of their existing infrastructure needs. Less electricity spent heating, cooling and lighting them. Fewer monolithic roads needed since fewer people are commuting. Who can telecommute? Accountants, lawyers, sales people, technical people, IT people, customer service, technical support, and so many more. Basically if you work from a desk, all your collaboration can be done online or in weekly onsite meetings. If you have to lay hands on materials like at an assembly line, then unfortunately that is more difficult to do remotely. Barack Obama encourages telecommuting and so does the US Patent Office. Ask your employer to let you work from home to save the environment, make you a happier more productive employee, save the company money, and spend more quality time with the family while simultaneously getting more work hours in for the boss.

Now, the downside! To be a successful telecommuter, you need a batcave; complete with a secret passage. The kids and animals cannot know about your batcave. Nor can the wife! It must be impossible to find. Now where’s my butler?!

Posted on 4 Comments

Active Thermite at WTC to Fuel Conspiracy Theories

Like the questions surrounding JFK’s assassination, I don’t think we will ever have definitive answers to what happened on September 11, 2001. Scientists, some who have since been released from their university or laboratory jobs, have released a paper "Active Thermitic Material Discovered in Dust from the 9/11 World Trade Center Catastrophe" which will likely have conspiracy theorists once again presenting their arguments that the plane alone could not have destroyed the World Trade Center.

We have discovered distinctive red/gray chips in all the samples we have studied of the dust produced by the destruction of the World Trade Center. Examination of four of these samples, collected from separate sites, is reported in this paper. These red/gray chips show marked similarities in all four samples. One sample was collected by a Manhattan resident about ten minutes after the collapse of the second WTC Tower, two the next day, and a fourth about a week later. … The red portion of these chips is found to be an unreacted thermitic material and highly energetic. [Source, Bentham Open Access,Active Thermitic Material Discovered in Dust from the 9/11 World Trade Center Catastrophe]

For more information on the super-thermite, read The Raw Deal.

Today on Reddit, the question was posed "2,740 Americans died in 9/11, justifying the removal/restrictions of many of our freedoms. How many people died to give us those rights in the first place?" Within the answers, this illuminating comment:

It’s sort of a nationalistic cliche to say that soldiers fight for our freedom but what they really fight for is the sovereignty of our government, which happens to guarantee us certain freedoms.

When we say a soldier died fighting for our freedoms, what we really mean is that he died in a war which threatened the loss of some or all of American sovereignty to a foreign or domestic power which would likely guarantee less rights than the present government.

This distinction is important because in the history of American wars, very few have definitively fallen under that category – and even in those cases, preserving the rights of American citizens was ancillary to sustaining or expanding the sovereign power of the U.S. government.

[Source, Reddit.com, 2,740 Americans died in 9/11, justifying the removal/restrictions of many of our freedoms. How many people died to give us those rights in the first place?]

We now live with a generation that has never known the feeling, the freedoms, we had prior to September 11, 2001. There is a different feeling. I felt more secure! I wish my youngest children could know that feeling and could experience true trust. I have lived with a tension since 9/11 that I had not known prior. The tension is not from a fear of terrorists; they’ve always been around (well, at least from the 1960s First U.S. Aircraft Hijacked, May 1, 1961 and at least 1800BC for the rest of the world). The fear is from my own government! Prior to 9/11 the police were different; now everyone should fear the police.

Question: “The police are here. They want to talk to me. What should I do?”

Answer: “Make no statement to the police under any circumstances.”

– Supreme Court Justice Robert Jackson

[Source, Brasscheck TV, Why you should
never talk to cops
without a lawyer
]

The terrorists won.

The point of terrorism is to cause terror, sometimes to further a political goal and sometimes out of sheer hatred. The people terrorists kill are not the targets; they are collateral damage. And blowing up planes, trains, markets or buses is not the goal; those are just tactics.

The real targets of terrorism are the rest of us: the billions of us who are not killed but are terrorized because of the killing. The real point of terrorism is not the act itself, but our reaction to the act.

And we’re doing exactly what the terrorists want.

[Source, Bruce Schneier – Security Expert, Refuse to be Terrorized]

Whether the terrible incident of September 11, 2001 was foreign or domestic terrorism, whether it was solely the plane or the plane timed with well placed explosives is irrelevant. Our society has dramatically changed, some say irrevocably. We were a better America when we could trust our government. We were a better America when the police were not the enemy. We were a better America before Civil liberties were taken away.

See also: Timeline of Terrorism dating back to 1800BC and History of Terrorism 70s to 2001.
See also: Professor Says "Cutter Charges" Brought Down WTC Buildings (Issue #18 & 19, May 1 & 8, 2006)

Posted on Leave a comment

URL Shorteners Causing a Stir

The Internet is in an uproar this morning. This uproar will probably be done in the next couple of hours for all but a few select people like the programmers at Twitter and Delicious. The debate? Are URL shorteners good or evil?

URLURI shorteners take a long URL like http://realityme.net/2008/08/21/can-you-rely-on-twitter-for-breaking-news/ which search engines love for the embedded keywords and reduce them to as few characters as possible like http://tinyurl.com/43abj6 which search engines may or may not like. Joshua Schachter has posted about the evils of URL shorteners with a plethora of comment from people on both sides of the fence. Dave Winer, who pioneered RSS, says that URL shortners are risky. Basically the concern is that we are creating a situation where broken links may abound on the Internet. Since two URIs go to the same place, content is being duplicated in search engines and bookmarking services and since some of these services use 301 redirects while others use 302 redirect we have no good way of crediting the link to the source. (301 means the uri has been permanently moved to a new uri, ie. the original long uri, and 302 means that the uri has been temporarily moved meaning the search engine or bookmarking service should record the short uri as the permanent resource). Other concerns revolve around archiving and longevity of these shortening services. If Twurl goes out of business, most of my shortened uris will break. As an example of this, Twurl.nl is no longer Twurl.nl but is now Tweetburner. After reading this analysis of uri shortening services, I don’t think I will be using Twurl/Tweetburner anymore anyway; I love their stats but a 302 redirect is deplorable.

To shorten or not to shorten, that is the question. A proposed solution is that publishers should automatically offer their own shortened URLs which could hurt your searchengine-fu. Personally I am going to keep my long URIs but I think I’ll switch to bit.ly or tinyurl.com while they are using 301 redirects (that is until the day they decide not to use 301 redirects…letting other people control your data is confusing isn’t it?!).

Aside: A URL is a subset of a URI. There is some debate about whether URL has be deprecated or not. See Yuri not Earl.

Update: 5 Reasons Why URL Shorteners Are Useful

Posted on Leave a comment

ZZZzzzz Programming

I’m not sure how many different careers allow you to work in your sleep. Probably most of them when you come down to it since our dreams seem to be where we work out our issues. As a programmer, I have solved a variety of problems in my sleep and I love it! Last night I lay down with this complex conditional statement I was going to have to write to finalize yesterday’s coding. I woke up at 4am knowing how to solve the problem in one line of code. Now that’s the way to start your day!

Posted on Leave a comment

The Perfect Job Pet Project

I took my 15 minutes on my pet project in bed as I drifted to sleep. No computer was necessary. The question of how to write the application had to be answered. ColdFusion or PHP? I have hosting for both. This question only applies if I am going to totally custom design the application from ground up.

Custom designing a web application can be compared to redesigning a kitchen. You have skills. You can buy tools and wood at Home Depot. A professional might choose different places for equipment and materials. You could draw rectangles on a piece of paper and build your own cabinets but you will probably make some mistakes that a professional carpenter has been trained to avoid. When your cabinet sags oddly in the middle you might apply a hack by wedging a length of 2×4 under the sag. A professional would never do that but no one is going to see your hack so what does it matter? That is until you try to install an appliance under the counter and realize your counter cannot be used with that appliance due to the accessibility issue created by your 2×4. In the end you will probably have spent the time and money doing it yourself and then time and money to have a professional repair your installation. Of course, at this point you resent the professional because so much money is being spent. A less expensive option would be to purchase pre-built (open source) cabinets. These should mostly fit your situation and you probably have the talent to install them yourself although paying a professional to install the pre-built cabinets will guarantee they are installed correctly and don’t fall off the walls.

Laying in bed thinking about the path of least resistance and picking low hanging fruit, I ruled out a custom application despite having the talent to build it. A custom application will take much longer to launch and there is no guarantee that The Perfect Job will get traffic or produce income. Although there is plenty of open source in the ColdFusion community, I will rule it out and limit myself to the PHP open source community. This narrows my decision to WordPress, Joomla, Drupal, and Django (a web application framework..so this is still custom programming). There are plenty of other options but no sense in making the list too long. A comprehensive list can be found at http://cmsmatrix.org/.

I have more experience in customizing Drupal than I do with Joomla or Django. Drupal is a powerful CMS and many consider it a real CMS while WordPress is frequently dismissed as "just a blogging platform." However, Drupal hits a server kind of hard. I don’t pay much for hosting and you get what you pay for so I will rule Drupal out to avoid having increased hosting fees due to too many CPU cycles or memory usage. Once The Perfect Job is getting more attention, I can always upgrade the hosting and reconsider Drupal.

The choice is quickly becoming self-evident. Joomla gets a lot of positive press. It is a split from the Mambo development. If I am not mistaken, Scripps Networks is a fan of Django and that alone should be a reason to experiment with and learn Django. The fact that they are a major online publisher adds more reason. However, I am far more familiar with WordPress customizations than Joomla or Django. The path of least resistance is undeniably WordPress.

So in less than 15 minutes, I was able to come to a firm decision to write the features of The Perfect Job as part of a WordPress installation. The next 15 minutes will come this evening or this weekend and will be to closely read the WordPress licensing agreement to see if the coding I do for The Perfect Job will have to be released into the open source community or not.

Posted on Leave a comment

What do I do?

I often get the feeling that most people have no idea what I do down in this dungeon. Here’s a sample:

In the next hour, I will write, test and prove some php and JavaScript+jQuery to present a table of data, allow a user to click a delete icon, use a modal to prompt for delete confirmation, then remove the data from the database and the row from the table without a page refresh. Will work in IE6, 7, Chrome, Safari and Firefox.

This is also a micro-milestone. I often write these down, although I rarely publish them, when the number of tasks I have is overwhelming, or I have coder’s block, or I need motivation. Giving yourself small, achievable milestones can lead to great productivity.

Update: Had a digression. To get the new code to work I had to upgrade jQuery’s UI from 1.5.3 to 1.7.1. This was well worth the effort. They’ve done a great job with 1.7.1!