A rose by any other name would smell as sweet. And a web browser lacking basic web compliance by any other name would also smell.
With it’s release of Internet Explorer, Microsoft has once again heralded it’s intentions to make the Internet less than it could be. Not much has changed yet, despite Bill Gates’ departure.
I know it’s snarky and not constructive to say. But how long is Microsoft going to drag it’s feet on standards compliance for the web? IE8 is the first browser to be - by Microsoft’s estimation, at least - fully CSS2 compliant. That’s a nearly ten year old standard and most browsers are moving on to CSS3. Not that any of us can really use the CSS3 technology without going through backflips to support the perpetual legacy technology that is IE.
According to the IE8 home page, the big improvements in this new revision include a speed boost. Interesting, inasmuch as IE7 represented a huge step backward in performance. I call this a lateral move at best. They’re also touting IE’s ability to leverage RSS feeds. Here again, this is six or seven years old, nothing new.
Finally, Microsoft touts it’s security. Well, that’s just silly. Microsoft made the security gaps that made viruses so much a part of our lives and so far, their solutions have left much to be desired. Especially since their solutions to problems often involve more code, rather than fixed code; they paper over a security flaw with still more features, all of which necessarily have the potential to become security flaws themselves.
Internet Explorer and Microsoft Windows, generally, are regrettable facts of life for web developers. But in my private life, I’m more and more thankful to be running Ubuntu Linux, warts and all.
cforms contact form by delicious:days
June 2, 2009, 2:39 pm Code Drop #1: Completed
My project’s a long way from being done, but I’ve decided to go ahead and by my domain name and deploy what I have into it. I’m still not telling you the name of the site, though! I just feel much better knowing that the domain has officially been taking and no wildly bad luck will result in someone else owning the name and making me cry a lot.
cforms contact form by delicious:days
May 18, 2009, 7:13 am WP Version 2.8 on it’s Way
The WP folks are announcing the latest version of WordPress will be released some time later this month. Granted, there’s not a lot left in the month and they’re only just beta testing now, but nevertheless they plan on releasing this month. The new features are exciting to contemplate, but especially helpful to us developers is the new Widget schema:
via Version 2.8 « WordPress Codex.
WP_Widget is a class that abstracts away much of the complexity involved in writing a widget, especially multi-widgets.
They’ve basically created a new class from which all new plugin widgets can be produced. This is, as noted, especially helpful when you want to have more than one instance of the plugin on the page at any one time. The process for this has previously been laborious enough that I haven’t bothered to write any such thing into any of my plugins. Of course, such labor-intensive duplication is silly when you use a language capable of near-OOP programming and apparently the powers that be WordPress now agree.
cforms contact form by delicious:days
May 15, 2009, 10:22 am How Do You Rate?
I’m continuing to work with my CakePHP project and have run across some interesting math problems I thought I’d share that surround ratings and popularity ranking for the site.
The hypothetical new service provides a social network sensibility to local civic participation, allowing users to vote on the importance of issues and comment on them. The ranking system is a simple up-or-down voting system, held in the database as either a 1 or 0, depending on the vote.
So, being a social networking site, it is important to provide some rankings in order for people to know what’s hot and what’s not on the site. These rankings are: newest, highest rated, most popular and most active. Highest rated and most popular differ in that the highest rated issue is purely a function of the ratings system, whereas most popular needs to take into account how many people have commented. Most popular and most active differ in that most active is merely an indication of how many votes and comments a given issue has. Newest is obviously a function of time and therefore a straight-ahead dB query.
So, how to arrive at the other ratings? This seemed more obvious at first, but it got more complex as I went. I determined that the best thing to do was to get out the old spreadsheet and start laying out some numbers. Initially, I thought the highest rated function aught to be purely a count of the “yes” votes on each issue. But such a system does not take into account the power of the “no” votes. The solution was to divide the number of positive ratings by the total number of ratings. This gives you a percentage of the positive ratings, so one positive rating out of five makes an overall negative rating (20% positive), whereas one positive vote out of two is much more strongly weighted (50%).
This is not an entirely satisfactory, since a single positive vote can launch an issue to the top of the ratings board. There is also the issue of two or more pairs of ratings and positives equaling the same average, such as “4 ratings, 2 positives” and “2 ratings, 1 positive.” But since the ratings are not the only criteria, it’s acceptable to over-rate low numbers. The issue of matching averages will have to be dealt with in a sorting correction.
The next step was to determine the most popular issues. In this case, I opted to multiply the rating by the number of comments. This is a more satisfactory result overall, except that no matter how many comments an issue gets, if the rating is 0, the popularity is also 0. The solution to that is to add back in the number of comments, which has the effect of pushing up the lowest numbers without unduly affecting the higher popularity numbers.
I think I’ve gotten a decent handle on how to jiggle the numbers and get out of them what I think is most important. I’d be interested in hearing from any statistics experts or other folks with experience in this type of thing how they would change my metrics system to be more accurate.
cforms contact form by delicious:days
May 13, 2009, 12:24 pm I Think I’m Making Progress, I Guess I’m Making Progress, I Must Be Making Progress…
The last few weeks have been absorbed in some freelance work for a local marketing company, which is a nice change of pace. But that also means I’ve not been able to get at my new pet project in that time, which has been a bit of a downer.
And since that new project is CakePHP driven and I’m only really learning the platform, time away from the project means knowledge lost or at least deeply buried. That makes getting back into it something of a challenge.
And indeed, I took the better part of the last two days figuring out a problem which turned out to have been rather obvious. Obvious, that is, if you know where to look. But with all that out of the way, I’m starting to make some decent progress on the project and am hoping to get something that at least looks nice by the end of the week.
Because more than one recruiter has said they want something like this to point to as a portfolio item. Everyone seems pleased with the direction I’m going in: they like what the project’s aim is. Sorry I can’t share that on this blog, but until I’ve got my domain name in place, I don’t want to screw myself.
But I really like the layout I’ve chosen for this project: very clean with big, friendly fonts to draw in the less-technical. The project is supposed to be about lowering the bar of participation in government, so it’s important not to cram too much information on any one page.
Hopefully by week’s end: a preview of my new CakePHP-powered web site!
cforms contact form by delicious:days
April 27, 2009, 8:30 am A Simple JS Confirmation Button
Because someone asked me and because I haven’t seen quite the same solution out there on the nets, I’m posting this really quick for the benefit of those who need a quick submit button confirmation. If, for example, you want to prompt users to confirm whether or not they wish to delete an item out of a form, you can use the below JavaScript function to get it done. The function is designed to serve as confirmation for many different types of events, so it’s quite flexible:
// confirmButton: simple function to test user response
function confirmButton(message) {
var conf = confirm(message);
if(conf) {
return true;
} else {
return false;
}
}
To us it, I use my trusty Unobtrusive JS action loading function like so:
addEvent(editsubmitbtnz[i], 'click', function() { return confirmButton('Are you sure you want to edit this feed?'); });
You could also add the function directly to the button like so:
<input type="submit" value="Delete This" onclick="return confirmbutton('Are you sure you want to delete this feed?');" />
The result is a JavaScript function that will halt all action on the screen when you hit the submit button that the function is assigned to. It prompts the user to say whether or not they agree with the statement passed as a reference to the function, then pass that value (true or false) back to the page and either submit the form as normal or cancel the operation.
cforms contact form by delicious:days
April 14, 2009, 9:02 am Building My Professional Network with Ping.FM
I’ve been struggling for the last couple weeks with a new plan to garner more exposure for my website and for the things that I do in the web design realm. Well, after much consternation and perspiration, I’ve achieved what I sought out.
Of course, we all know that working the social networking channels is fast becoming the way to professional success, regardless what your professional goals may be. It’s almost unheard of for someone not to have their own blog, LinkedIn.com profile, Twitter account and goodness knows what else. Getting those services to talk to one another is not as obvious, however.
In my case, I really want to be able to post articles on my various HolisticNetworking.net blogs and have them appear as status updates to my LinkedIn account. That way, when I’m active on my site, I’m active on LinkedIn, thus my status should be bumped to the top of my connection’s update roles.
My solution - which I’ve actually been using on my political blog for some time - is Ping.FM. Ping.FM takes the trivial update services of many major social network services and allows you to combine your updates in one location. Update your Ping.FM status and it cascades through your various networks.
Meanwhile, WPing.FM is a plugin for WordPress that allows you to update your Ping.FM status under a number of conditions on your blog, such as saving a draft of a post, publishing or updating that post. I’ve installed this plugin on the blogs I most want to be seen on LinkedIn. And after much consternation, I’ve discovered that it does indeed work, just with a wicked lag I can’t figure out.
I’ve checked my error logs and this doesn’t appear to be a problem on my site. I’m guessing that some of the services I’ve chosen to ping are relatively slow in responding. Ping.FM points out that until all services have responded, the ping is not considered complete.
So, maybe I need to trim my list of services to just LinkedIn, Twitter and Del.icio.us. But either way, this is going to be a huge improvement to my professional online persona which I recommend to all of you out there who are looking for a way to boost your profile.
cforms contact form by delicious:days
March 29, 2009, 7:11 am SyntaxHighlighter Evolved
I’m a big fan of Viper007Bond’s plugins, so when I saw he was releasing a new version of his SyntaxHighlighter, I had to give it a go. Especially for this website, it’s always been a challenge to find just the right code highlighter to properly display my code. What follows is an experiment with the new plugin, based on some CakePHP code I’ve been working on.
<?php
class MetrosController extends AppController {
var $name = 'Metros';
var $helpers = array('Form');
var $components = array('Uuid', 'Cookie');
var $uses = array('Metro', 'Pothole', 'Town');
// Cookies:
var $cookieName = 'PHpatrol';
var $cookieKey = 'has82js737hak2';
var $cookieDomain;
// Add domain name dynamically:
function __construct() {
parent::__construct();
$this->cookieDomain = '.'.$_SERVER['SERVER_NAME'];
}
function index()
{
$this->set('metros', $this->Metro->find('all'));
print_r($this->Cookie->read());
}
function add()
{
if (!empty($this->data['Metro']))
{
$this->data['Metro']['ID'] = $this->Uuid->generate();
if($this->Metro->save($this->data['Metro']))
{
$this->flash('Your Metro has been updated.','/metros/');
}
}
}
Looks good! I’ve thrown some random highlighting in there just to see how it works.
cforms contact form by delicious:days
March 23, 2009, 9:06 am Using Ping.FM as a Job Search Tool
I’m just playing around with hooking up Ping.FM to my blog so that I can update my Twitter, del.icio.us and LinkedIn profiles with the latest from the blog. It’s a good idea to keep recruiters and hiring managers abreast of the things you’re doing and saying on your professional blog. That way, they see your name and associate it with what you do.
It’s just one more way to keep your name fresh in the minds of those people who may be able to help you further your career.
cforms contact form by delicious:days
March 13, 2009, 9:30 am Creepy Uncle Google’s AdSense Plan
I can’t imagine how much worse this could possibly be. Google’s new plan, announced on it’s AdSense blog, is to allow it’s widgets to read site user’s cookies and advertise to them based on their browsing preferences. To restate: visitors to your website will have their cookies read by a third party and then they will see ads based on their own search history rather than your website’s content.
Let’s walk through the reasons that this is a bad idea:
While its certainly true that Google’s AdSense ads very often make almost no sense to your site’s content in the first place, there is at least a keyword similarity which, while not always actually relevant, at least provides some amusement for you and your audience. But with Google’s new plan, content completely unrelated to your site will appear on your site - without so much as even the veneer of relevance.
Ads featuring Spider Man comics on a breast cancer site are bad enough - they’re non-sequiturs, but basically harmless. But consider what happens when a person browses to TownHall.com or RedState.com - two politically Conservative websites - and then browses to TalkingPointsMemo.com: they see a bunch of ads supporting Conservative causes or promoting Republican politicos on a site that’s supposed to be Liberal. The reverse is just as bad, of course.
The person browsing your website may not be savvy enough to know that their cookies are being read. As a result, they question your dedication to a cause based on the advertisements that seem to directly contradict your stance.
And maybe worse than that, what happens when the politically active user browses to a mainstream news website? Now that news website is advertising for politically-biased goods and services. That’s not a good precedent to set.
There are lots of other scenarios which are just about as bad. One such scenario might be a user browsing porn sites and then visiting a child abuse website. But honestly, I’m sure Google must have thought this part through, right? Right?
And what about a shared computer for a family? Does a user with kids really need to see Dora the Explorer crap on WebMD? What about the reverse? What adult content - not necessarily porn - do you want your kid to be introduced to by Creepy Uncle Google?
This one’s pretty clear-cut: Google is making changes to it’s own code for advertisement that violates Internet user’s privacy. We just got done illegalizing SpyWare not too long ago, now Google wants to start snooping your cookies again? How can this not be illegal?
And here’s the real joke: they expect us as web masters to make changes to our own privacy policies because of their illegal behavior. That’s right: Google makes the changes, you wear the egg on your face. And clearly, if they want you to update your own privacy policy, there must be at least some potential legal backlash. And since they sent you an email, well, it’s not their fault anymore. You’re on your own.
All these things being equal, it’s hard to imagine most reputable web site owners really being comfortable with this new advertising regime. Irrelevant content on your site, violating the privacy of your users, potentially being open to litigation for someone else’s wrong doing. This is not a good scenario.
So what does that leave us? Well, the only people who don’t care about irrelevant content would have to be Sploggers and other black-hats making money off Google Ads. After all the talk about not wanting to reward these types of websites, Google goes ahead and launches a new program which cannot possibly benefit anyone else.
This is not going to happen, I can almost feel it. The backlash is already pretty fierce. Once news of this program makes it’s way to the main stream news, it’s done for. Google, my advice to you: don’t be evil.
cforms contact form by delicious:days
Next Page »