Featured Posts

Notes from An Event Apart Boston 2012 I had a great time at An Event Apart Boston, 2012. Ill post some photos soon. The conference avoided deep dives into code in favor of showing WHY you would do reactive design. As Eric Meyer said "My...

Read more

Judging the CT Student Innovation Exposition (E-Commerce)... Want to know what the next 10 years will look like? Ask a high school student. Their creativity isnt limited by their knowledge of what we currently call technological limitations. They have a vision of...

Read more

The Value of Feeling Appreciated as an Employee in... Whether you’re a new employee or the vice president of the company, everyone wants to feel valued, even appreciated, in the workplace. Not only does it improve morale and make the workplace a more pleasant...

Read more

The difference between classic and motion tweens in... Here it is: If you're used to doing things "the cs3 way" then you can continue to do so with the classic tween tool. It works the same way as you remember, using key frames as normal, but you cannot...

Read more

PHP: If (equal to AND not equal) - eliminate form spam... Just learned a great function of PHP thats already made my forms a lot better. A while back I wrote an article about eliminating form spam without captchas by using css to hide a text input box for bots...

Read more

twitter

Breaking News

  •  

Use Underscore and !important to defeat IE6 bugs

Category : Coding and Database, Slick Code, Technology

http://modxcms.com/about/team/rthrash/css-hacking-important.html

http://www.wellstyled.com/css-underscore-hack.html

First Meeting with Gray Screen Developement Process

Category : Around The Office, Coding and Database, General Web Info, Great Tutorials, Technology

I had my first in person meeting with a new client yesterday, The Autism Society of Connecticut. This is the first project I’m using the gray screen development process for and I LOVE it. The process is much more straight forward and we covered in detail almost all the pages in the site objectively. Because I had the whole site mocked up we could see potential problems that would otherwise not have been evident and we were able to completely rework the navigation from the way it was in this first round of revisions.

We’ll see how it works in the next round and make more revisions on it I’m sure, but this was awesome in a first meeting. I’ll build out the backend as a gray screen using developer notes instead of actual database functionality.

NewFangled, hats off to you for bringing this technology to my eyes. You broke the industry. If you dont know who these people are, click the link and check out Process >> Prototyping. You wont be disappointed.

PhoneGap – An open Source HTML/JS framework for SmartPhone, Blackberry, and iPhone applications

Category : Coding and Database, SmartPhone, Technology

Ever wanted to create a program for you iphone but didn’t want to write it in C+?

With this new framework you can develop programs for smart phones and their kin using native hardware features (screen shake or tilting for instance) with nothing but HTML and JS. This is currently a free and open source project under the MIT licensed and should hopefully stay that way.

5 Years ago you could sound really cool by talking about flash. 2 years ago you got to sound cool developing flash programs that worked on the odd Nokia phone. (deploying these programs in any sort of a meaningful way was a whole norther task all together, but being able to do it at all was step 1.)

I think the next milestone is looming overhead: learn JQuery or MooTools well enough that you make flash developer’s jealous and deploy your program in a way that actually works. SWEET!

What’s with the hate on comments in code?

Category : Coding and Database, General Web Info, Technology

I was always in the mindset that you should always comment your code. It makes it easier to go back in later on and figure out what you’re doing to power the site, easier for someone else to reverse engineer it should something happen to you or the business arrangement, and it allows for freeware code like SWF Object to circulate as comments in the code for those who would look.

Recently, I’ve heard from a few different sources, Lesley, our advisor from More Visibility included, that comments, especially ones with urls, hidden code, or actually any code period is a no no for SEO, and increases load time, and so should be removed.

If the comments are relevant I don’t agree with either of these points as that the potential benefit is not equal to the potential loss, namely ownership and accessibility. I guess my point is, if you had to reduce website load times there are plenty of other ways to do it.

Form spam: BE GONE!

Category : Coding and Database, Great Tutorials, Slick Code, Technology

I started getting emails last month from the forms on one of my client’s websites. The spam came as a long string of links in the comments section of one of the forms. The idea for this type of spam is, I think, to boost search engine ranking by increasing the clicked rate to your site. It is easy enough to detect and delete but still, its quite a pain to delete 10-12 emails a day. Not to mention there is a more malicious form of form spamming that I was lucky enough not to have been attacked by where the spammer inputs php code into the form fields which tricks your mail server into sending bogus messages from your return address. This has had the effect of some sites being blacklisted from search engines for spamming, but I hear that google and others are going to be lenient on this in response to the rise in form spam in the recent months.

So there was the worst case scenario and to avoid it all together we needed to add some sort of form validation. Client side java script could be used, but if the spammer simply turned off java script, we’d me back to a naked form, so although useful to make sure humans are using real email addresses (with the @ symbol) it would be useless to stop a bot.

The next step would be to use a captcha, but I hate these things and good OCR software can read them better then people with poor eye sight so this isn’t the best answer either. New captchas are evolving into fill in the blanks, picture description, and general questions (“whats the letter after b?”). Machines will not understand the question and thereby cannot guess the answer.

But still, this is slightly intrusive because it requires the user to think. Sometimes that’s enough to put people off. I wanted a solution that eliminated bot generated spam without encumbering the real users at all.

My solution was code the PHP mailto into an if statement that checked the value in a hidden field. If anything had been entered into this field then we can deduce that it was not filled out by a human (who would never see this field) so the request fails the php if statement and the mail command is never fired.

However, the PHP code will still look like the page email was sent. This is important as it lets the spammer think everything has worked. After putting this into play spam on our forms has effectively ended. I say effectively because I read somewhere that some people actually sit an copy and paste this sort of junk into forms by hand. What a waste. No one reads it anyway.

I just wanted a solution that freed up my client without affecting his customers.

The HTML/CSS looks like this:
<input style=”display:none” type=”text” id=”email” name=”email”>

PHP:
$test = $_POST["email"];

if ($test == “”) {
mail($mailto, $mailsubj, $mailbody, $mailhead);
}

Currently I’m working on a great book by: Steve Krug called Don’t Make Me Think.

Update: August 1st, 2008:
To eliminate the “random blanks” I got from users pressing the back button and non javascript browsers I modified the above code to include a few more conditions. Read the next article on using the IF equal to AND not equal to function in php to find out more.