Your Website Is Boring.

We are a company specialized in…
We are a team of professionals that…
Welcome to our website! We made it to…

Zzzzzzzzzz….

Next time when you make your company or personal website spend less time thinking about that rounded blue corner that no one will notice and put some effort to make the entire site more interesting. Because, you know, there are few other billions websites struggling for your visitor’s attention. She does not care about you or your company, she cares about herself.

Message your visitor, not your ego and your site may just become a little bit less boring.

WordPress Plugin For First Time Visitors On Your Blog

I just wrote a simple plugin for WordPress which lets you display some text, HTML code and/or images to your first time visitors. It works with a cookie, so you know, some may see it more than once.

Enjoy the plugin here.

Use Ajax To Stop Spammers

Some time ago I wrote about how to stop spammers without Captcha. The technique described there works pretty sweet on several sites already, but there is a way to go even further.

The Problem

Well to be frank, the spam protection described in the previous post works at 100% already in several sites. But in theory if you use that tactic the spammers can easily go around it. They can build a script especially for your site which to check the value in your javascript function and place it in the hidden field.

Let’s make things better

Let’s involve some Ajax to make the spammer’s life even harder. What if instead of using a hardcoded value for the hidden field, you use a key/value combination from a database. When loading your web form, retrieve a single key/value pair from the database. Put the $key in $_SESSION so you have it after submit. Use the key for an ajax function like this (for easy ajax I use Scripaculous):

new Ajax.Request(“?action=ajax_retrieve_value.php”
{
method:’post’,
parameters: {ajaxkey: ‘<?=$key?>’},
onSuccess: function(transport)
{
var response = transport.responseText || “no response text”;
$(‘hidden_field’).value=response;
}
});

The script ajax_retrieve_value.php will retrieve the value corresponding to the key and the javascript function places it in the hidden field.

On submitting the form all you need to do is to run another query and see if the key which is in $_SESSION corresponds to the value coming from the hidden field.

If your ajax_retrieve_value.php checks $_SERVER[REMOTE_ADDR] and allow only the IP of your server, you are spam-proof. Without Captcha at all.

Stop Using PHP Template Engines Once And For All (Why Smarty Is Evil)

Do you know why PHP was initially created? I am sure you do, but many programmers have forgotten. The first purpose of PHP was to create simple dynamic web pages.

Who knows why (seriously, do you know WHY?) groups of PHP developers keep working on PHP template engines which are supposed to help separating the program logic from the design. One good sample of such useless effort is Smarty.

So Why Smarty Is Evil?

What exactly is Smarty and the similar template engines doing and why is it so bad for your programs to use them? Let me just shoot few reasons:

  • Adding one more language to learn. Smarty has its own language which has to be used in the templates whenever you need control flow structures etc. How exactly is this better than using PHP itself?
  • Putting presentation code in your logic. They claim to avoid that and at the same time require you to “load” all the variables before you can use them in the template. The absurdic $smarty->assign may take more lines in your code than you need for the program logic.
  • Messing Javascripts. Some of the template engines (you guesses it, Smarty again!) don’t let you write normal javascript code in the templates because that crashes their own parser. How convenient!

It’s hard to believe, but most programmers would visit Why Use Smarty page and take everything said there for real. However I prefer to think myself:

“Designers can’t break application code. They can mess with the templates all they want, but the code stays intact. The code will be tighter, more secure and easier to maintain.”

– Really? Designers can break the application code, because the templates (view layer if you use MVC) contain logic themselves. In no way the template engines protect you from that

“With presentation on its own layer, designers can modify or completely redesign it from scratch, all without intervention from the programmer”

– Big fat lie. The programmer needs to load all variables, prepare arrays and do presentation related work in the controller layer. The presentation is not on its own layer so the designers often need the programmer’s help.

“Programmers aren’t messing with templates. They can go about maintaining the application code, changing the way content is acquired, making new business rules, etc. without disturbing the presentation layer.”

– See all the points aboe. The programmers do mess with the templates.

“Templates are a close representation of what the final output will be, which is an intuitive approach. Designers don’t care how the content got to the template. If you have extraneous data in the template such as an SQL statement, this opens the risk of breaking application code by accidental deletion or alteration by the designer.”

– If the programmer puts SQL statement in their view layer, then they simply need some education. Using simple PHP templates you can and should keep all the logic away from the presentation layer. You don’t need Smarty, Fast templates or similar misconceptions.

So How Do You Go Without Template Engines?

PHP is template language itself. You don’t need another one. Just separate your logic from your presentation. Keep your logic in a php script, then your presentation in HTML template. When you need control flow in the HTML file, just use pieces of PHP code.  It’s really as simple as that. In your PHP script you can use include  or require to display the template. All the variables which are in the scope of the script will be available in the template as well. No loading required, no messy presentation code in the controller layer.

If you need samples, just let me know (hint, use the comment option).

Honesty Sells

How do you sell yourself, your services or your products?

There are many approaches, but surprisingly most people go with one – blatant self promotion. I guess I won’t surprise you if I told you self promotion and hype no longer work.

There are several well known online marketing “gurus” who own huge mailing lists and send hyped emails to their subscribers on regular basis. Guys like Ewen Chia and Mike Filsame do make huge sales and profits although all they sell is crap and their promotional methods are close to spam.

It won’t work for you. Guaranteed.

If you think you can do like them and sell a lot, sorry to tell you – you won’t. There are many reasons why these guys can sell using hype – they have reputation, they have huge email lists and their potential customers are desperate newbies in the “make money online” market. Unless you have the same, you won’t have any success.

If you are a freelancer or small business owner targeting prospects with above average intelligence, you should try different approach.

People want genuine suppliers.

No matter if you sell copywriting services, software consultations, e-books or potatoes – unless you are a very well known name, most buyers want to know they deal with credible person.

How much do you add to your credibility when you claim being the best (or your product being the best), giving the best price, offering outrageous money back guarantees or monkey “bonuses”?

I’ve seen freelancers who bid on $50 project and claim to be a company with 200 designers and developers. Imagine if someone believes them.

Next time when selling your skills or products you can raise your credibility along with the sales process just by being honest. Saying that you have no experience with something, explaining that your resources are limited to X and Y and being upfront about why you are interested in the deal and why is your offer exactly that is unlikely to push your buyer away. It will make them feel they work with real and genuine person.

“Why” is the most important question in business and “because” is the answer that will make you close that deal if you are honest. Try to cheat and you just lost the buyer forever.

A little story…

Some time ago I worked with a friend on a site about high yield investments. We had a small section recommending investment opportunities to the readers usually having referral links. Once he smelled something phishy with the top performing investment program we decided to add a warning. The warning was saying something like “We have reasons to doubt in this program. We advice you to think carefully before investing and if you have large funds in it, better get some money out”.

After releasing the warning we expected most people would withdraw their money and no new investments will go in. Instead of that the investments and commissions doubled.

Makes no sense? Think again. People value honesty. But no, it is not that they were rewarding us for being noble. Here is what one of them told us:

“You are warning us about potential problems. So you are honest. If there were very serious problems, you would warn us to get out. So this opportunity should still be good”.

I would guess that even without talking to anyone, just by putting myself in their shoes. Do that more often and you can change not only your business, but your personal life too. Too bad empathy is not taught at school.

Honesty sells. Empathy helps you know when, why and how much honest to be.

Why E-commuting Is The Best Way To Expand Your Business?

Back in 1875 one person invented a tool that changed the world in the way that Internet is changing it today. This smart guy arranged an agreement with two other men to invest in his invention. The three men formed a company to explore the new opportunities.

By 1914 the new company locations included Antwerp, London, Berlin, Milan, Paris, Vienna, St. Petersburg, Budapest, Tokyo, Montreal, Buenos Aires, and Sydney. A century after its founding this company became a multi billion dollar business with annual revenue of more than $50 billion. Today this business server more than 920 million customers and has more than 125,000 employees.

Read more »

How To Stop The Spammers Without CAPTCHA? (Case Study)

You know the CAPTCHA images (called also Turing codes) are used everywhere – on blogs, forums, registration and contact forms – to stop spammers. They work almost perfect.

But they are boring.

The Captcha can significantly decrease the rate of feedback (comments) you get on your blog, the contact inquiries you receive, the registrations on your membership site or even the orders on your e-store.

They are discriminative to people who can’t see well and often confuse these who are not used to them.

Some Captcha-s are hard to be “decoded” even from a well seeing person.

By rough estimate requiring the users to enter Turing code can decrease their participation with up to 50% percents.

There are some other methods to stop the spam bots, which are less discriminative than the Captcha. For example some blogs will ask you “How much is 1 + 5″ or “Is the fire hot or cold?” to check if you are human and not a bot. These methods are good, but they also require the active participation of the user and can push them off.

The Elegant Solution To Stop Spam Bots

I implemented this solution for a site which was using custom coded by me CMS system. There were no Turing codes or any other tools to prevent from spamming and the site quickly get flooded with spam comments.

Let me take you straight to the solution. It sopped 100% of the spam comments:

  1. Create a hidden field in the feedback (comment, registration or whatever) form
  2. Add Javascript code which fills some specific value in this field when the document get loaded
  3. When the form is submitted, check if the hidden field has exactly the value which should have been filled with the Javascript code. If it does not have it, then the comment is spam.

Here is an example:

<script language=”javascript”>
function cheatSpammers()
{
//give the hidden field some meaningful name, like for example “website”. The spambot
//will fill it with some crap or will ignore it document.getElementById(“website”).value=”http://google.com/”;
}
</script>

Now in the body, start the function:

<body onload=” cheatSpammers();”>

Then in the contact/comment form, add the hidden field. We will not make it “hidden”, to avoid smarter bots which can mark such field as suspicious. Instead, we’ll make it hidden with CSS:

<style type=”text/css”>
.websitefield
{
display:none;
}
</style>

<input type=”text” class=”websitefield” name=”website”>

This is VERY simple and it works 100%. The spam bots cannot run Javascript. Only browsers can do.

Of course, if a spammer write a spam bot especially for your site, they can just take the value from the javascript and fill it. But the spammers use generic bots for many sites, so this simple solution works perfectly.

Do you have even better ideas how to outsmart the spammers? Please share!

Freelance Resources and Tutorials

Here I’ll give you some useful web sites which can help you in your freelance business. This is not a complete directory or anythign like that. It contains only sites that I am using myself (or have used in the past) and have helped me a lot.

1. Web Development Tutorials

2. Web Design Tutorials

3. Free Web or Blog Hosting

4. Payment systems

5. Freelance sites

6. Communication

7. Script resources

7. Web Directories

Read more »

Payment Systems For Feelancers

I have lost some freelance income because of inability to receive my payment in an easy way. Sounds weird? Maybe it is, but this is a real problem for many programmers who are not living in US or West European countries.

Here is the full story in short. I was contacted by an old customer who was happy with my work on a project we’ve done through RentACoder. He asked why should I pay 15% fee, we already know each other, let us do the work outside. I agreed, we started the project and completed it successfully. It was a small project for $100.

The payment time came, but… I realized there is no good way to receive $100 from USA to Bulgaria. He wanted to pay me with Paypal, but Paypal does not work here. I was not able to accept his credit card either. He was too busy to go out and search for Western Union office. So we ended up with online bank wire which costed me about $35. That was 35% of my payment – I felt robbed! Read more »

Guru.com Review: Maybe the largest, maybe the strangest freelance site

Visit URL: Guru.com

Overall Impressions

Guru.com is by no doubt a huge site. By their own words it is “The world’s largest online marketplace for freelance talent”. I don’t know this it is the truth, but even if it is not, it’s pretty close to the truth.

Guru.com contains more than hundred job categories of all business areas. This is what makes it unique – all the sites I have seen are concentrated mostly on computer related jobs. Guru.com has categories on everything that can be done per freelance contract – from the well known computer stuff, to legal advice, business consulting, engineering, interior design and marketing.

I have never felt too comfortably on Guru.com however, most probably because of it’s a bit strange member’s area, bidding system and messaging. For me it is a bit weird, quite different from the control panels on the other sites and a bit confusing. Read more »