Archive for November, 2008

Monetizing Your Site: Programmer to Programmer

November 29th, 2008 by ScottK | No Comments | Filed in Stuff

We are programmers, we love to look up from our code base and announce to the world “Hey look at what I found out!1!” We love to point out others work and say “Look at what their doing over there!” Or maybe just putting out widgets and plug-ins is enough satisfaction to keep us going; hoping that everyone will enjoy them.

Invariably we’ve all seen or posted the infamous “Donate” button in hopes that someone will recognize our work. Occasionally someone does make a donation and we are happy. Not that we are really counting on it though. We just love our programs, right?!?

So how then can we as programmers still continue to contribute to the community and be rewarded for our continued work, without being labeled as a shill or a sell out?

As a previous internet marketer I’ve had to handle the questions of how to make money on the internet. As a programmer I just love to code and, right or wrong, love to let everyone know via this blog on what I’ve found. No I don’t expect to make any money of these discovery’s and plug-ins; but boy would it sure be nice.

From my perspective of an affiliate marketer and programmer I do believe that there is a mix that I would like to share with you on how to gain a little more reward for the work that you do. You don’t have to look like you’ve sold out or only do it for the money either.

On Site Advertising:

Whether you choose to have advertising on your site is completely up to you. You must know that no more than %20 of your page can be devoted to advertising. Anything more than that makes it look like an advertisement. This along with with other images can lessen the credentials of what you are trying to say. If your site depends a lot on random flickr photos don’t dilute it with %20 of advertising banners.

Advertising placement doesn’t just go willy-nilly anywhere either. The best results are when you place them in-flow with your website. Placing a 468 x 60 banner at the break between your post and the start of your comments section will produce better results than if you placed the advertising in your footer section. On a blog it’s easy to find the natural breaks, between pages box and archives box, etc.

Try some placements for a while then mix it up. Eventually, and with correct stats reporting, you’ll find the right placement. Try different sizes as well. Two 120 x 60 may fail because it makes the site look busy, when one 468 x 60 banner will work best.

Don’t go grabbing just every advertiser that comes along. The advertising that you display on your website needs to be completely targeted to your readers. If your site is 100% devoted to Microsoft programming, chances are that they will not purchase Apple or Linux products/services. Find the Microsoft related advertisements, anything else would be a waste of your page.

What you write about is your target, if you wouldn’t purchase the product chance are your readers won’t either. If you can find any advertisements that suite your needs then maybe you shouldn’t display the ads.

Don’t make it harder on yourself. Find websites that will help you locate the advertising that you want to display. Yes you can go from site to site seeing if they offer affiliate programs, but you may not find well paying opportunities, or even worse, they don’t collect conversions correctly so you pass them traffic and they don’t pay.

Personally I use two sites regularly for all my affiliate opportunities: LinkConnector and LinkShare Corporation . Both of these two companies have regularity performed for me in accurate statistics and communication on when a merchant has decided to end early or otherwise when an opportunity is ending.

Tracking Software:

Originally called openAds I’ve upgraded to openX .It’s written in PHP and once set up allows me to create merchant (Linkshare and LinkConnector) merchants and create the advertising campaigns. It also allows me to rotate advertisements for the viewer. It’s truly become a lot more powerful over the original openAds as it allows for geoIP locating as well.

You could of course “hard code” your advertising links into your system, but then you become reliant on yourself to remove them once the opportunity has ended, naturally or early. Using openX I can specify when to end during creation plus I get advertisement rotation.

Link embedding:

Maybe you hadn’t noticed in the previous paragraphs but I certainly embedded the affiliate links from LinkConnetor and LinkShare. If you already clicked on them and joined then I got paid for referring you. Maybe now you’re a little upset at me for doing so, but that the point of this post. I neither talked goo or bad about them, only referring to you that they are there to be used for your purposes.

By me referring them to you, and you signing up, why shouldn’t I make a little something something.

Whenever I use a product, read a book, review others work I try a little to see if they have any affiliate links I could use to send others their way. Whether they do or don’t doesn’t sway my decision to write a post about them. However if they do have affiliate links to use then I consider it a little payback for research and or trying their product.

I will say one of the issues I have with embedded links is the search engine optimization of them when using providers. I f you don’t use “exactly” what the advertisers want you may wind up using “Get your affiliate money here” text links during the course of your post. That could be totally different from the flow of the post and makes it look like a shill. If you can work it into the natural flow of your post or are fine with that then run with it.

Infamous Donation Button:

PayPal has made it easy for others to donate to our effort in producing topics and reward us well for it via the donate button. However I will contend that having the button striclty in my sidebar did absolutely nothing for me. It seems to be all about “location, location, location”

There certainly value in using this but careful consideration of where it goes is needed for full impact. Maybe out of pity would you click the donate button after reading the post about how the writer had a bad day at work and you with loads of money. Or would you be more inclinded to click the donate button as it appears on the settings page of  a great plug-in that you are using?

Personally I’ve never gotten a donation from my web pages in general. Having created several WordPress plug-ins I include the donate button on all the readme.html pages. That has worked a little. The user then knows where to go for the button without remembering which site they got the plug-in from, only that they liked the plug-in and can easily reward the creator.

Another good placement for the donate button is when you use auto-versioning. All my plug-ins check in from time to time to see if I’ve updated them with a newer version. If I have the user is alerted to this fact and asked if they want to upgrade. Of course I have and they want to upgrade they are redirected to the page with the donate button.

I always give the user the ability to not donate and upgrade, but certainly if they have found it valuable then a small donation is made. I know this sounds contrary, but I hate nag screens. “You used this free stuff and I’m going to pop up this screen asking for money every so often till you pay” More times than not I ditch it. Asking for a donation over nagging works more times and creates better users.

Amazon Stores:

I happen to read a lot of technical books and subequently post about them. One of the great places to find the books I read is Amazon.com. So what I’ve done is create an Associate account at amazon and create a store just for this website.

When I read a book and make a review of it I link to the product I’ve placed in my store. If my reader after reviewing the post and deciding to purchase the book then I get a little something something for it. No there is never a contract to review the book or market it. Just the love of further expanding my skills.

If you are like me that reads a lot of material that can be found on Amazon then a little side money can be made that way. You certainly don’t have to write about everythng and link to your store just those that are important to you or you feel are important to your readers.

Don’t let the term “monetizing your site” fool you. You don’t have to sell out or de-grade your credability to make a little money doing the things you love and write about them. Go ahead and do and say what you always have without compromise. However keeping in mind that there are opportunities to make a some side income for your efforts without having to seem like selling out.

Tags: ,

Object Thinking

November 29th, 2008 by ScottK | 1 Comment | Filed in Stuff

Back in the days when I was building equipment and processes they usually started with managers coming to me and presenting their concept of what they needed. From there I would break down the concept into their functional pieces and individual responsibilities.

Time and time again I decomposed concepts in this fashion and it truly became second nature to me. Each piece was tangible and each piece only has a small set of what you could do with it, and you couldn’t change it. of course you could always build a new item to extend the capabilities of several general items.

Moving forward, when I started working with “traditional” computer programs I took to OOP because it continued to feel right. I still continue to break down a concept into objects and let each of them handle the tasks I needed them too. I’ll admit though when it came to software I wasn’t decomposing into object well enough, or even realized what and why I was doing it.

I just completed reading Object Thinking by David West. For me it was one of those pivotal reads of my career. I’m not someone who can easily read and learn, I’m learner by doing, but Mr. West’s writing style made it easy for me to read Object Thinking and immediately pick up the ideas.

In Chapter 2 the philosophical context of Formalism and Hermeneutics was introduced, and subsequently used throughout the book.

Formalism in short is the belief in “logic and order”. “All that is bad in software arises from deviations from formal descriptions that use precisely defined tokens and syntactic rules.” (51) I’ve seen this belief in all the software projects I’ve worked on.

Hermeneutics is the belief that “the world is more usefully thought of as self-organizing, adaptive, and evolutionary with emergence properties.” (53) In software, new opportunities emerge that hermeneutics expect and understand will happen.

The comparison between formalistic and hermeneutics is only a small part of the book but sets the stage in understanding how to think like a object.

When thinking like an object you first need to understand the problem domain that you will decompose. Objects need to be fine grained by natural behaviors and responsibilities, if an object appears to have to much responsibility it can probably be seperated into other objects. Object need to be composible so they can be combined in many ways to form other composite objcets.

There are tools in order to help think like an object. Class-Responsibility-Collaborator cards as examples are used in the book. Each object is described on a simple 3×5 card noting only responsibilities of the object. Also included are any collaborator objects that are needed to help the object complete it’s function.

Yes that the intent of the small cards with limited space to assign responsibilities. Having to many responsibilities to assign means maybe the object needs to be redefined, or broken down into other objects. The cards are needed only during the definition phase to help us in our thinking.

When starting to work though, throw the cards and notes out. As Mr. West implies, when we can think like an object completely in our head while working we truly have Object Thinking.

When it came to object thinking in the mechanical world it was easy form me. All the fundamental objects were already built and I just needed to put them together correctly for the equipment. In software though this wasn’t necessarily true. While I still attempted to decompose the problem into objects but needed the help in understanding what I was doing.

It’s clear to me that only a week after finishing the book my programming has clearly taken a turn in a new direction. My class have become smaller and easier to maintain. I can also see the natural joins and when to split responsibilities into new classes. All in all Object Thinking is definitely a book on my desk for quick reference and not the bookshelf!

Tags:

Finding The True Domain Using Ruby On Rails

November 3rd, 2008 by ScottK | 3 Comments | Filed in ruby

So here’s the problem your Ruby on Rails takes on url and another url. You then need to compare these two inputs to make sure they reside on the same domain. http://techraving.com has the same true domain as https://news.techraving.com. However, http://news.techraving.com does not reside on http://www.yahoo.com. What about http://localhost:8080 as being the same domain as http://localhost:443/index.html.

You could write an overly complication set of methods to start detecting string positions, or even incorporating a bunch of gsub regexs to try and weed out the unwanted components. Or you could take the easy route and call the URI module.

The URI module easily breaks the string url into it’s different parts which you can use to further refine using array’s into what you need for comparison. Taking these two domains:

http://www.techraving.com/about/

http://news.techraving.com/about/

We need to find out whether they are on the same domain. So:

first_domain = URI.parse("http://techraving.com/about/")
second_domain = URI.parse("http://news.techraving.com/about/")

Now first_domain and second_domain are both distinct instances of the URI object. The next step is to let these objects return us the host by calling “host”:

>> first_domain.host
=> "techraving.com"

>> second_domain.host
=> "news.techraving.com"

That was a lot of work already done for us. But we are not done yet! we still need to find the true domain. Or if you notice that would be the last two index of a possible array. So let’s split into an array:

>> first_array = first_domain.host.split(".")
=> [ "techraving", "com"]

>> second_array = second_domain.host.split(".")
=> ["news", "techraving", "com"]

So the array’s are what we expect in that the last two are the parts we need. Now how best to grab them. Easy enough!

unless first_array.size == 1
  first_true_domain = first_array[first_array.size - 2] << "." << first_array[first_array.size - 1]
else
  first_true_domain = first_array[0]
end

unless second_array.size == 1
  second_true_domain = second_array[second_array.size - 2] << "." << second_array[second_array.size - 1]
else
  second_array_true_domain = second_array_array[0]
end

Now why can the array size equal 1? That’s because:

>> local_array = URI.parse("http://localhost:80").host.split(".")
=> ["localhost"]

and,

rent a car bulgaria>> local_array = URI.parse("http://localhost:8080").host.split(".")
=> ["localhost"]

Both are 1 array size and yet the same domain.

So now that we have that out of the way why the index subtraction in the indexes. Because array.size – 2 returns the domain name and array.size – 1 returns the generic top-level domain we can know put the two together by concatenating these two with the “.” to get the true domain.

Now (first_true_domain == second_true_domain) comparisons can be made without sub-domain or port problems. And a ton less string position/replace code.