Aggregator Adventures

27/05/2009

Howdy.

One day, when I surfed the web, I found an interesting site. This site has function like a normal blog, but the post written there was posted from various blog sources. Later, I knew that this blog is called aggregator. How this blog aggregator works? It works by collecting RSS Feeds from various blogs registered. The feeds then posted as normal posts in the aggregator. One of the differences is the article title linked to the “real” blog source.

Ilkomerz 41 Blog Aggregator

Ilkomerz 41 Blog Aggregator

When I knew that some of my friends also have their own blogs, I started to thinking about building this aggregator. The site that I found earlier is powered by Planet, a Phyton-based feed reader. I tried it, and ended up with failure. I just couldn’t configure and tested it properly. I didn’t have Internet connection and didn’t familiar with Phyton at that time. So, I tried to find alternative. I found WP-o-Matic plugins for WordPress. So I installed, asked my friends permission to grab their feeds, and hosted it. I called it Ilkomerz 41 Blog Aggregator.

Another problem arose. This plugin will automatically read and parse feeds from its registered blogs every amount of time. To make this fetching run automatically, it uses cron job. The WP-o-Matic has two options of cron job. The first one is UNIX cron job run by web hosting. Free hosting, like the one I use, doesn’t give cron job feature. So I go to the next option, web cron. It will automatically calling fetching script on the hosting.

I use the web cron option for some months until suddenly the aggregator was down. Well, it worked again when I send a support ticket to the hosting provider. I know that maybe it’s not because of the web cron spending too much resource. I suspected that because of the multi-user nature of the aggregator, the blog automatically sending email to the blog writer. The hosting may called it spam. So I killed the auto-email feature. I also shut down WP-o-Matic and switched it to manual fetching. I know that maybe it’s not because of the WP-o-Matic’s web cron, but I don’t wanna take the risk losing this blog for the second time.

Manual fetching was a pain. I must open my Google Reader, find if my friends have new post, and then login to the aggregator, fetching the post, and the post will showed up. I was thinking, there must be a better way to do this. Accidently, I found out that there are some webs that provide free cron job. One of them is SetCronJob. This site can calls the cron script url of the aggregator. So, I tried it yesterday. I registered the aggregator to the site. And now, my aggregator works well automatically. I don’t know what will come in the future, but I have a high hope for SetCronJob.

Do you have another opinions or experience? Feel free to share it.

Short Break

24/05/2009


Nobody likes you when you’re 23
And are still more amused by TV shows
What the hell is ADD?
My friends say I should act my age
What’s my age again?
What’s my age again?

(What’s My Age Again by Blink 182)

It has been a year since I paid for this domain. Hopefully with this new domain (at that time), I can improve my writing skills alongside with my own brand. I always wondering how it feels like if I had my own site. And now I have it, at least for the next two years (I’ve paid for the bill, Alhamdulillah..). I just can say that all the experiences I got from configuring this own site were totally awesome. I never imagine that there are so many new stuffs when I was digging deeper into this “blog development”. And there’ll be a lot more waiting for me.

I have my plan for the next year. I’ll strive to achieve it. Here they are:

Merchandise

I have a plan to give away merchandise to all of you, my readers. I always want to give a sticker with sidudun logo. Just like thedailywtf.com free sticker. I’m still looking the best place to print it. I have asked some of my friends, and they said that they love the idea. So just wait and see.

Going to college, Again?

Yap. I like to learn something new. By the time I wrote this, I have been registered as a post graduate student in one of university (in my country). I’m still waiting for the confirmation letter. And if it has confirmed, I will preparing the necessities and going to the college.

Looking for a job?

Yeah. As a matter of fact, right now, I’m unemployed. It’s not because of the global crisis. Nope. I just didn’t apply to anywhere, yet. I was on medication in this last six (or seven?) months. And I just spent my time blogging, babbling, and learning what I want to learn. Most of my friends have been enrolled as employee at various company (mostly in IT section). Here the jealousy comes to me. I want to get a job too. Maybe I’ll find it on my college time (Amien..). Or maybe you can help me? :)

Themes, themes, and more themes..

I really got into blog design. I started this blog theme creation about some months ago and I got addicted. I know that my theme maybe not the best theme in the world. But, I think they are good enough for me. Do you agree with me? I’ll still create new theme, just filling my 10,000 hours of experience points.

What else? One thing for sure, I’ll keep on blogging. My motives are clear: for fun and fame. So see you around the blogosphere…

P.S. 23 minutes before 23. I wanna be a better man.

The Copy Paste Tale

12/05/2009

Good day,

I’ve been in blogosphere since 2007. From my first time there, sometimes I found a lot of blogs saying that blogger mustn’t copy paste carelesly another article to their blog. They were saying that blog content is a creation that must be respected. It means you couldn’t just duplicated blog content without authorization, reference, or at least a trackback.

Trackback

Trackback

WordPress has its own trackback system. If a blog content leave a reference to another blog (usually as a link), the referenced blog will be notified. The notification itself usually came as a comment on the referenced post.

I didn’t believe that someone could do something like that. Just duplicating blog content without reference or a trackback isn’t ethical to me. I wasn’t believe until couple days ago. Someone just copy-pasted my writing. For your information, I also write at another blog. In that blog, I wrote a tutorial on how to build your own WordPress blog. I divided the tutorial into several posts. Each post referenced (or link) to the previous and the next step of the tutorial. So every post got a trackback from another part of the tutorial.

My posting there got a trackback from another blog. It used to be the usual trackback. But when I checked it out, I found out that the other blog has my post written on it. Just exactly as what I wrote them. The trackback was sent from the link that I created to link my tutorial. So if I didn’t divide the tutorial and create referenced to the part, I’ll never know that someone copy-pasted my post. This other blog didn’t bother giving a reference to my post (not to mention my own trackback).

I was furious. But I controlled my emotion and write a comment to that blog. I wrote as polite as possible, telling him to give a reference to my post. The comment saved as moderated. I couldn’t expect more, and I left it.

The next day, an email came to my inbox. It’s from the copy-pasted guy! He said (I translated and edited some part of it):

I’m really sorry for the repost.
I’ll delete the post right away. I just doing your tutorial, thanks for the article.

From the tone,  I guess he freaked out. So I calmed him and explained that I just need him to give a proper reference to my post. That’s it. I think that was the ethical way. And I didn’t hear from him anymore. The post also disappeared from his blog. I dunno if he is still blogging or not. If he’s not, maybe it’s my mistake too. Somehow, I’m feeling sorry for him. But at least, I got my own lesson.

Do you have any experience like this?

Blorange: a New Theme

06/05/2009

Hi..

Couple days back, I’ve got some inspirations for my blog design. So today, I created this theme: Blorange. Unlike the usual, I used some images for email, rss feeds, and search button. I played with some colors: variation of black and orange.

So, how do u think? Any suggestions?

Just Another Function

03/05/2009

Howdy,

People are good at learning by examples. It’s just like when one of my friend asked for my help. Her clients want to make an interface for data entry using Access (you can contact me if you need one ^^). They will use it to store survey data. They gave her an example from the last survey, hoping that she will make the new one based on that example. In fact, the new interface must exactly like the previous (or the example given).

So, we created the visual interface first. After it done, we must add some functions that prevent accidently alter to data entered. I must admit that this is my first experience writing code in VB. Have no choice, I dug deep into the example code. Not so long after I found this code:

Public Sub closeRecord(txt1 As Boolean, txt2 As Boolean, txt3 As Boolean, txt4 As Boolean, txt5 As Boolean, txt6 As Boolean, txt7 As Boolean, txt8 As Boolean, txt9 As Boolean)

idResponden.Locked = txt1
noPlot.Locked = txt2
Luas.Locked = txt3
JenisTanaman.Locked = txt4
Umur.Locked = txt5
Kecamatan.Locked = txt6
Desa.Locked = txt7
Dusun.Locked = txt8
Catatan.Locked = txt9

End Sub

This code used to set the appropriate text field’s status so that the entered data can’t be altered. Not until the user click an edit button. If the user click the edit button, the locked status will be set to False and the data can be altered.

This closeRecord function has nine parameters (really long for a function right?). Every single parameter set status for one text field. So if the interface has twelve text fields, the function will catch twelve parameters. See another function that called the function from before:

Public Sub RecordOff()

closeRecord False, True, True, True, True, True, True, True, True

End Sub

How many True parameters are there? It’s not my place to judge this is a bad code or not. I was just thinking about another variations from the function.

The first variation that came to my head was setter-like function in OOP. Assuming that a text field is an object, we can split the function into nine function. Every function sets their own text field. It will looks like this:

Public Sub closeIdResponden(status as Boolean)

idResponden.Locked = status

End Sub

And all the other eight function for all of the text fields. It offers more flexibility. Just in case if we want to set just one of the text fields and not all of them. But, it’ll be less effective if we don’t want to set just one text field in the whole program. For this case, the function above will be called like this:

Public Sub RecordOff()

closeIdResponden False
closeNoPlot True
'and all the other seven

End Sub

Then, I came up with another idea. According to the function uses toward the whole program, all of the text field except the first was set to the same status. So, why we don’t just set the other eight text fields. Here is the code looks like:

Public Sub closeRecord(status As Boolean)

idResponden.Locked = False
noPlot.Locked = status
Luas.Locked = status
JenisTanaman.Locked =status
Umur.Locked = status
Kecamatan.Locked = status
Desa.Locked = status
Dusun.Locked = status
Catatan.Locked = status

End Sub

So it will just set the other text field well. The flexibility of the code will decreased, but it is okay for the whole program.

The point here is if you could decreased the flexibility as long as it will make the code more effective and didn’t violate the whole code. Just like the old saying, the right man for the right job. It’s just another function to me, what about you?