Simple Bot Stopper

I have some older ASP code that I use for capturing support requests.  It’s a pretty basic HTML form, but it gets the job done.  Unfortunately, I’ve been having a lot of trouble with spammers whose robots were hitting the site a few times a day and entering bogus trouble tickets.

Yes, I could add a CAPTCHA to the page.  Here’s a neat one that also helps digitize books: http://recaptcha.net.  I really don’t like CAPTCHAs though and I wanted to keep this as simple as possible.

I’ve written a few bots myself (for good, never evil) and I know that they typically only scrape the HTML from a page.  I figured I could add some dynamic HTML using javascript and the bot wouldn’t know what hit it.  So far, it seems to be working.

 

Javascript to add a hidden field:

<form action="result.asp" method="post">
<script type="text/javascript">
document.write("<input type='hidden' ");
document.write(" name='bot' ");
document.write(" value='N' />");
</script>

Then I just check for the “bot” field in the result.asp page:


If Request("bot") <> "N" Then
  Request.End()
End If

This will stop the stupider bots and I don’t have to change the user interface.  If you have better suggestions, I’d love to hear them.  In fact, I’d love to retaliate against these guys.  Can we fix the spam problem in Web 4.0?

 

Reference Lookup: Dictionary, Thesaurus, Encyclopedia, & More
powered by PostRef

Twitter Broken Link Workaround

Whenever a Twitter user changes his or her profile image, the url to that image changes.  This results in a broken link for many Twitter applications.  Twitter applications must either cache the image before it changes or resync with Twitter to avoid broken links.  Most Twitter developers have come across this little annoyance and have figured out the best approach for their app.

In building a new application, I couldn’t resync the data and I didn’t want to cache the images.  Instead, I created a little CSS workaround that will display a static image if the profile image link is broken. 

Many browsers display an ugly icon when an image link is broken, however, using CSS, most browsers will simply ignore the missing image if it is used as the background for an element.  Displaying the Twitter profile image as a background seemed like a good workaround, but it still wasn’t good enough.

To ensure that a blank space is not displayed after a profile image is changed, I’ve placed a static image underneath the original Twitter profile image.  When the image is first displayed, it will show the Twitter profile image, however, when the user later changes their profile image, breaking the old link, the static (generic) image will display instead of a blank space.  This isn’t a perfect solution, but it’s a good tradeoff until Twitter decides to implement static urls for profile images.

Here’s the sample code:

<div style='float:left;margin-right:10px;width:60px;height:60px;
background:url(http://static.image.com/picbg.jpg) no-repeat top;'></div>
<div style='float:left;margin-left:-70px;margin-right:10px;width:60px;
height:60px;background:url(http://s3.amazonaws.com/profile_images/000000/profile_image.jpg)
no-repeat top;'></div>

 

Reference Lookup: Dictionary, Thesaurus, Encyclopedia, & More
powered by PostRef

The Island of Dr. Mozilla

If I want a religious experience, I’ll visit a church. I’d rather use critical thinking in my tech life. Yet, I seem to constantly come up against uncompromising devotion to particular tools or operating systems. From the “Visual Basic is a toy language” crowd, to the “you deserve to get hacked if you’re using IE” mob.

Preferences are great. I prefer a number of tech tools over others. You may not have the same preferences, and that’s okay by me. I’m not going to belittle you for your choices. If I have an opinion against the use of some technology, I’ll backup my opinion with facts. Otherwise, you enjoy your preferences and I’ll enjoy mine.

I’m not picking on Mozilla for this piece. They just happened to have a name that worked well here.

Dr. Mozilla: What is the law?
Sayer of the Law: To loathe and ridicule all Microsoft products, that is the law. Are we not geeks?
Tech Mob (in unison): Are we not geeks?
Dr. Mozilla: What is the law?
Sayer of the Law: To use all manner of keyboard shortcuts and indecipherable command words with zeal and pride, that is the law. Are we not geeks?
Tech Mob (in unison): Are we not geeks?
Dr. Mozilla: What is the law?
Sayer of the Law: To look upon those who may have less technical expertise than ourselves as objects of ridicule, that is the law. Are we not geeks?
Tech Mob (in unison): Are we not geeks?

 

Reference Lookup: Dictionary, Thesaurus, Encyclopedia, & More
powered by PostRef

Now You’ve Seen Everything

Exercise for the mind can take many forms.  While writing a Twitter client in Excel may not be your idea of a fun challenge, it sure is mine.  So, I’ve decided to attach my latest mini-project, “TwExcel,” to this post.  I appreciate the suggestion from Jason Ryan to call it “Excreet,” but in-the-end, I had to go with my gut (wow, so many puns there).  Anyway, feel free to download and enjoy TwExcel.  It actually does work and you can fully trust the Macros :).

 

Download TwExcel.xls

 

Update:  Make sure you save the file to your machine.  If you click on the link above and run it over the Internet, the macros will fail.  I don’t know why, that’s just the way Excel works.

 

twexcel

 

Reference Lookup: Dictionary, Thesaurus, Encyclopedia, & More
powered by PostRef

Top 10 List of People to Unfollow on Twitter

I must give credit to Ike Pigott (@ikepigott) for the idea of a "Top 10 People to Unfollow" list.  Although I can easily think of several individuals I’d like to place on this list, I figured it would be too mean to actually call them out by name (and possibly result in a libel suit).  So the list below contains ten archetypes that I’ve noticed on Twitter.  I’m sure there are many others, so feel free to add your own in the comments section.

1) The Pimp - The pimp is always looking for avenues of self-promotion.  If almost every tweet is a reference to a blog post and even conversations end in links to posts, you’re following The Pimp.

NeckRelaxr:  New Blog Post:  Neck Relaxer big online sale!  http://tinyurl.com/xi8xs

NeckRelaxr:  New Blog Post:  Have you had your neck relaxed? http://tinyurl.com/xi8xs

NeckRelaxr:  @trumommy You must be tired after putting your kids to bed.  I’ll bet your neck could use some help: http://tinyurl.com/xi8xs

 

2) Ultra Extreme - These people are not bad, they’re just overachievers.  If you lead a regular life, you might feel a little inadequate after reading their tweets.  Unless you enjoy feeling like more of a lazy slob than you already are, lift that forefinger and click the Unfollow button.

IronMarathon: Finished three miles.  Preparing for bike ride up Mt. Tam.  Breakfast after that.

IronMarathon: @skyhigh Are you ready for our jump over Sonoma this weekend?

IronMarathon: Back from kite boarding.  Heading out to the bungee platform.

 

3) T.M.I. Freak - This twit isn’t afraid to let it all hang out.  Whether it’s a bodily function or a random thought about killing everyone in the office, there are no limits or filters here.  Unfollow, or you may become an accessory.

jax:  I wonder how many calories there are in a booger.

jax:  Listening to Dr. Demento, "Dead Puppies aren’t much fun."  Heh, heh.

 

4) Granola - Granola never met a cause he didn’t like.  If a cause somehow pits Granola against "The Man" and the corporate elite, he is there.  It’s best not to tweet about eating meat, driving a car, or most other normal activities when Granola is online.

grummer256:  Heading over to the square right now.  It may be a sit-in or a walk-out.  Not sure yet.

grummer256: @student5 Dude, stop using blue ink.  Black absorbs light & is more eco-efficient.

 

5) The Professor - The Professor is an intellectual who imparts his wisdom to his followers.  He’s quick to guide you to the "correct" world view and is always willing to lend a sarcastic remark.

moreorless:  Well color me red with your sanguine remarks. [chuckle]

moreorless:  @ladyluck Of course your theory would be impossible to prove since that event occurred 25 years prior. ;)

 

6) Troll Stalker - What can I say about this one?  There’s always at least one troublemaker in the bunch.  The Troll sneers at your earnest tweets and belittles your achievements.  Don’t bother arguing with a troll, they will always get the last word.  If you cross a troll, he just may turn into a Stalker.  The Stalker will follow you on Twitter and every other social media site known (or yet to be created).

 

7) Ideologue - The ideologue is not really on Twitter to discuss anything.  His mind is already made up and he’ll show you how wrong you are with copious links to extreme blogs and YouTube "proof."  The Ideologue is usually an extreme hater of one thing or another.

amerika:  What a complete idiot.  "Bush stumbles on White House steps": http://youtube.com/dkdkdk

amerika:  @mekkey It’s the Republicans and their "Commander in Thief."

amerika:  Filling up the VW from Bush’s Blood Pumps.

 

8) Sports Dude - Maybe you like sports, but which sport, and which team?  Make sure you and Sports Dude are a perfect match or you will get way more play-by-play detail than you bargained for.

cubsfanatic: The ball just left his hand. #gocubs

cubsfanatic:  It looks like it could be a slider. #gocubs

cubsfanatic:  No swing on pitch number one.  Get set for pitch two! #gocubs

 

9) Antisocial - Antisocial uses social media a lot, but that doesn’t mean he has to like it.  He may be one of the top Twitter users, but he spends much of his time poking fun at other people’s use of social media.

kvetcher:  Hey, here’s an idea, pick up the phone and call someone.

kvetcher:  MySpace use is up 50% while library use is down 75%.  #dumbasspeople

 

10) The Attendee - There are two things that this twit loves, Events and Hashtags.

lolgirl:  Livetweeting the Social Sirens Conference. #socialsirensconf

lolgirl:  Tony Seaver of "Be Your Best" is speaking. #socialsirensconf

lolgirl: You can be successful, but you must believe in yourself. #socialsirensconf

lolgirl: Never give up, but sometimes pause. [favorite!!!] #socialsirensconf

 

There you have my top-ten list of twits to unfollow.  Did you see yourself in there?  If so, it was completely unintentional. :)  Can you guess which one I am?  I’m not sure where I fit best, but I do know, "Dead Puppies" by Ogden Edsl really is a great song. 

 

Reference Lookup: Dictionary, Thesaurus, Encyclopedia, & More
powered by PostRef

prisoner-entertaining