Tag Archives: Own_Creations

Zookoda

I read about Zookoda at problogger. I investigate more about RSS 2 Email services and found this helpful link. I think I would have liked Yutter too, but I already had signed up w/ Zookoda, so I used it for one of my upcoming blogs.

I had another idea of “contextual” email subscription since a few weeks, but wasn’t sure how to handle a bulk of emails. Now, I think Zookoda might have a solution for me. Below is the message that I sent to them.

Hi,

I like the service so far. It is really simple and powerful.

I wanted to build a subscription system for my another website, but I think it will take up a lot of resources. Here is what I wanted and would love to see in Zookoda:

I have a feed with News articles and each article is tagged with a few tags. I wanted to have a tag based subscription. Ex: If I subscribe for the newsletter for the tag ‘ipod’, then I should receive an email (instantaneous or a digest) for all the News articles that are tagged with ‘ipod’.

I can easily send the tag to Zookoda, when the user submits the form with his/her email address. Zookoda should be able match that tag with what is in the feed and thus send the relevant post(s) to the subscriber. This system should also be able to handle multiple tag subscription and hence aa subscription manager (page) for the subscriber.

Please let me know if this is something you can provide.

Thanks, Gaurav

Initially, I wasn’t thinking of writing this application using feeds, but my internal db. Mapping the subscribers to the tags is hardly an issue with me. The only problem I have is handling such a huge amount of processing and email sending. My problem is that, I will have to create a custom newsletter for each of the subscriber and then email it to them. If there are only a few subscribers (less than a hundered), it should be OK, but if there are a several 100 subscribers, some kind of system would be required to send emails in batches.

Does anybody know of any software/service that can handle a huge number of distinct emails for each subscriber? How does the mailing list softwares handle the email sending?

Object Oriented PHP

I have had a strange relationship with Object Oriented Programming. I always wanted to program in OO, but for one reason or the other did not (or shall, I say could not.) I first started OOP with C++ while studying. The whole concept of OOP appeared to be complex and I could not see much use for it. I was happy with the good ‘ol functions and random code snippets. I wrote code in OOP for homework where it was must.

Then, I learned PHP from here and there. I forgot functions and started writing random code. If I had to reuse some code/functionality, I preferred copy pasting the 10 – 15 lines of code rather than writing a function. This was the time when I was learning PHP and trying to write “fun” scripts, which would echo viewer’s IP Address, play around with strings, etc.

Once I started taking apart some serious applications such as CMSes, Buletin boards, etc. I realized the importance of functions. It was so easy to change one line of code (in a function) in a 150 line script (which was one of 30 or so files) and see the change wherever that function was called. I realized how important was ‘include()’ in PHP.

After this, there was a time in my life when I started writing my own code and developing some applications/web sites completely by myself. I was happy with the functions but wanted to venture out with the new OOP PHP.

It all happened with one of my first projects (I guess an year ago?) While planning for the project, I decided to use classes. The planning phase passed, I started coding. When I was almost done with the coding, I realized there wasn’t a single class in my 9 – 10 file big project. Defiantly there were a lot of functions.

After a few months, I had another idea and started working on it. I remembered the pain from copy pasting ‘mysql_fetch_array’ etc. So, I again decided to code using classes. This time I had some success. I at least wrote a couple of classes. One of them was an abstraction layer over mysql. It made my life much easier with all those queries. It was more like plug n play.

Now, I am working on another project and I (firmly) decided that I would write the whole application in OOP. So far I have had 95% success, there are about 3-4 classes. This is an extensive project, which might include well above 50 – 60 files. Creating classes for certain tasks might be an overkill, so I would refrain myself from doing so. I think the classes have made my life much easier this time. I can see that the coding for the front end would be a piece of cake and defiantly much cleaner.

If OOP made life easier (my teachers told me that too), then why do I keep going to the un-organized coding? I thought about it a bit and came up with the most likely reason. I and may be most of the other coders get ideas instantaneously. There are times when I am sitting in front of the computer at 1:30 in the night and suddenly some wicked feature for my site would strike me. Instead of waiting, noting it down, planning, I would straight away jump and start writing the code in the fastest way I can. The fastest way generally is to write the code in an un-organized fashion. I would write a few lines and then look at the application (and feel happy) and keep doing this recursively until I achieve the feature that struck me. If I get addon ideas, I would keep appending them to the code that I wrote and never revisit the code to “beautify” it as it is perfectly functional on the web site.

I am sure a lot of other programmers do the same. I think it is time to change the habit and be more planned about the addons/features as I am planned about the initial project.

BTW for those of you who don’t know much about PHP OOP, here are a couple of tutorials about OOPing in PHP.

Spoono

PHP freaks

Why you should use Yahoo Publisher Network?

In my previous post, I suggested that Yahoo Publisher Network is evil due to its strange legal terms and the buggy code.

But now I am saying that you should use YPN atleast once, if you get approved. Why this change of heart? Does YPN pays a lot more than Adsense? Does it have a lot more contextuality to the content?

I haven’t been successful to use the Ads on my site yet, but I found the root cause of the issue. I was able to show Yahoo Publisher Network Ads on one of my test websites. Right now its just showing 0% APR for Credit Card and vonage.com Ads, but I can’t blame Yahoo for that, as that site doesn’t have any content (just comment spam)

I haven’t even observed a single impression in the YPN reports yet, but when I see my Google Adsense reports, I see a rise in my CPM, as compared to September’s CPM. The Avg. CPM from Sep. 30 – Oct 2 is 33% more than September’s CPM. This doesn’t mean that I am claiming that Adsense has increased my CPM after I have started using YPN, but pointing that it can be a possibility.

I have had higher CPM in the past than what I got in the last 2-3 days, so I can’t claim anything right now. I would suggest people using Adsense to try YPN atleast once, just to check if it affects your numbers. I am planning to rotate my Adsense and YPN periodically and get stats. I am not sure how long should that period be? Should I run Adsense for 12 hours and YPN for other 12? or should it be longer periods such as a week or a month?

I believe this scenario can be compared to the situation a few months ago, when Gmail was launched. Most of the free email providers were reducing the mailbox size and as Gmail entered the market, Yahoo and MSN increased their mailbox sizes to match Gmail. This is the power of competition…..

Here is Yahoo’s (quick) response to the email that I sent to them, followed by my explanation of the problem.

Sep 30 2005 14:36 PT
>
> Hello Gaurav,
>
> Thank you for your inquiry.
>
> We would be more than happy to help you resolve any display issues you are
> experiencing. At this time, we feel that we can better assist you by
> speaking to you directly, in order to obtain more detailed information.
>
> Please feel free to call our Support Team at (866) 785-2636, Monday to
> Friday from 6:00 a.m. to 7:00 p.m. PDT, and from Saturday 7:00 a.m. to
> 4:00 p.m. PDT.

—————————————

Hi,

Sorry, I was unable to call you guys, but I did find the problem.

Here is the bug (actually a compatibility issue.) I add my YPN code in a
HTML file which is being “imploded” by a PHP file. Then slashes are added
using “addslashes($theVar)” which adds backslashes before the characters
(‘), (“), (\) and (NULL).

When the whole thing is “print”ed it shows something like \’ as compared to
‘ . However the ” (double quotes) are printed fine (without leading
backslashes.) I guess there is some kind of confusion going on with code
while it is printed.

Here is the code snippet:

$tmpl_file = “path-to-file/header.html”;
$thefile = implode(“”, file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = “\$r_file=\””.$thefile.”\”;”;
eval($thefile);
print $r_file;

I’d suggest you guys to either give an option to the publisher to choose
between a single quote and a double quote, or just make it default as double
quotes.

I am using Ads provided by * another company * and they do use double
quotes, which works fine for me. If you think it is fine for me to change
the single quotes in the code to double quotes manualy, then do let me know.

Thanks
Gaurav

Is Rediff worth that much?

Its the time for Internet marketing….. after the success of Google’s Adsense and Adwords everybody seems to join the bandwagon. Overture is a live example of the same. The yahoo owned company has made its mark in the field of keyword based advertising.

Indian companies have also started following this model. Not too long ago, rediff launched its blog service, which can help it to promote it’s domain selling business as well as create a huge base for its new Ad Service – P4C. Now I see every other blogger living in India is using Rediff Blogs.

I have used Overture and Google Adwords. Overture charges min. 10 cents per click while Adwords charges min. 5 cents per click. Now according to Pay4Click by Rediff, they charge Rs. 10 per click which is a bit more than 20 cents. Isn’t that too high for PPC? The target audience is Indians living in India and Indians living abroad. I agree that it is a very specific audience but I still think those Rs. 10 aren’t worth.

I was even surprised to know that us.rediff.com doesn’t have a direct link to the P4C but in.rediff.com had it. Which prolly means they are targeting Indian advertisers who want to market their products in India only. Not only this, their rates are in Rs. and they haven’t mentioned $ rates, which again means they are targeting Indians living in India. I am not sure about the value of Rs. 10 in India these days? I am not sure about the average Google and Overture PPC rates, but it would be certainly around 50 cents – $1 (or more?).

So, to get the solution to the problem, I’ll need to ask someone living in India.