Practical Web Programming

Monday, July 30, 2007

My Agloco Update

It's been almost a month since I wasn't able to login to my Agloco Viewbar at home because our DSL internet connection was stopped since my sister and her family migrated to Singapore last month.

My first update of my Agloco accumulated hour was on the 5th of June this year.

Right now, I have almost 300 hours to my account. I'm just wondering when will Agloco distribute the revenues to it's members. But then again, I have high hopes in Agloco. I know in time, I'm going to get my share of the internet. After all, I have nothing to lose because signing up is totally free.

If you don't know Agloco yet, you can visit this blog: Agloco Cash. Or you can sign-up here.

Saturday, July 28, 2007

My Second Adsense Check

Last May 30, I posted in this blog my first Adsense check. Well, yesterday, my second Adsense check arrived. According to Google Adsense, they sent my check on the 29th of June.

It took nearly a month before this check finally came into my hand. I was beginning to wonder if this will ever arrive. I was starting to become paranoid about it. I thought to my self, "What if somebody got the it and have it en-cash on my behalf".

The check was PHP 5,743.32 or USD $124.53 in amount (not bad). I was ecstatic when I received it. It felt like "WOW". I think I just deserve this. It took me endless hours and many sleepless nights just to tweak and experiment with my websites/blogs to make it earn more. Until now, I'm still far from my goal this year, which is $10 a day in Adsense earnings.

For the meantime, I'll just enjoy experimenting with my websites and blogs. And with this second check, I can now pay for my driving lessons.

Long live Adsense!!! (^_^)

Friday, July 27, 2007

Installing Tomcat and Apache Web Server in the Same PC

Since the beginning of this week, I tried to install Tomcat and Apache on the same machine and have them share the same default port, the port 80. After three days of "nose bleed", with the help of a co-worker, I succeeded.

For your information, when your install Apache web server, it uses the default port which is port 80, and Tomcat web server on the other hand uses port 8080. If you install them on the same machine, you have to put your JSP/Sevlets files in the Tomcat server htdocs, while your other websites, written in HTML or PHP for example, in the Apache server htdocs. And they have different URLs when you access them. Here's an example:

For websites hosted on Tomcat, such as JPS and servlets, you access your local web directory or htdocs like this:

For websites hosted on Apache, such as PHP, you access your local web directory or htdocs like this:

What I want is to access both by using only one URL, which is http://localhost/

If you are in a testing server or if it doesn't bother you typing different URLs for JSP/Servlets and PHP, this is just fine. But if you are in a production server, surely your users will be very much annoyed typing the port number (8080) when they access a website written in JSP or servlets. Fortunately, there's a solution, here's a step-by-step of what I did.

1) Install Tomcat and Apache
I installed Apache version 2.2.4 for Windows which I downloaded here and Tomcat version 5.5.20 also for Windows which I downloaded from here in "C:\Program Files\Apache Software Foundation" directory of my PC.

2) Add
I downloaded from here and add it in "C:\Program Files\Apache Software Foundation\Apache2.2\modules" directory.

3) Add
I created a file and put in "C:\Program Files\Apache Software Foundation\Apache2.2\conf" directory. Inside the file I added the text below:


4) Add mod_jk.conf
I also created a mod_jk.conf file and put in "C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf" directory. Inside the mod_jk.conf file I added the text below:

# Load mod_jk module
LoadModule jk_module modules/
# Where to find
JkWorkersFile conf/
# Where to put jk shared memory
JkShmFile logs/mod_jk.shm
# Where to put jk logs
JkLogFile logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the timestamp log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

# Send servlet for context to worker named locworker
#JkMount /* locworker
# Send JSPs for context /examples to worker named locworker
JkMount /*.jsp locworker
JkMount /*.war locworker

5) How to Test
Create a JSP and HTML files with the source codes below and put it in your Apache web directory or htdocs (no need to add those files in your Tomcat web directory).

<title>Test Page</title>
out.println("Hello World from JSP!");

<title>Test Page</title>
Hello World from HTML!

Now test if it by accessing it through this URL: http://localhost/test.html or http://localhost/test.jsp. You should see the both web pages without error.

Thursday, July 26, 2007

How To Crash Windows Vista With Two Fingers

Almost all of us who uses a computer, knows how shortcut keys eases our navigation. But don't you know that you can crash a PC running in Windows Vista operating system just by pressing some shortcut keys. The Window Key + E keys, which in Windows XP and Windows 2000 is the shortcut key to open the Windows Explorer, crashes the Windows Vista operating system.

According to a news article from Softpedia:

Windows Vista can be completely killed by pressing a simple combination of just two keys. All you need to crush Microsoft's latest operating system and put the much-applauded Wow at an end is two fingers. This issue has been reported independently of Microsoft, and the Redmond company has failed to issue any official comment at the time of this article. The immediate question which comes to mind is if the problem is a security vulnerability or a simple bug.

Pressing the Windows key together with "E" will start Computer in Windows Vista. Keeping the two keys pressed will open a large volume of Computer windows. Want to crush Windows Vista? Nothing could be simpler. Just keep the two keys pressed for more than 20 – 30 seconds.

I'm itchy to try this. One of my co-worker, rex, has a new laptop that runs on Windows Vista. I'll try this experiment on his laptop tomorrow. (^_^)

Search Engine Friendly Design

If you want your website to be search engine friendly, you should focus on the design of each of your page. Make it as easy for them to crawl your site. Google, Yahoo and other search engines use bots or spiders to visit and index your website. They do not reveal when and how they crawl a site, it's their sort of business strategy. But when and how they do it, you should optimize your website's pages because you'll never know when they going to do it.

When optimizing your site, you should not only focus on the main page but rather all the pages of you site. This way you can maximize your potential to get listed in organic searches.

A search engine friendly design focuses on four areas, title tags, meta tags, main body text, and spider friendly navigation.

A) Title Tags
The title tag a short description of your page and can be seen as the caption of your page at top left corner. When making your title tag, your most important key word should go first. Don't use the same title for multiple webpage and make it no more than 60 characters of 6-12 words.

<title>Joel Badinas dot Com</title>

B.) Meta tag (Keyword and Description tags)
Meta tags are tags embedded in the HTML of your page, at the top just after the Title tags.

When writing your Meta Desciption tag, write it in sentence structure and should be 150 characters or below or 25-30 words. It must contain you most important keywords.

<meta name="Description" content="This blog is about my ramblings, make money online tips, programming stuffs, blogging tips, views and my everyday life"/>

When writing your Meta Keyword Tags, use keywords or phrases. It should be 100-250 characters in length. Start with your most important keywords or phrases and the proceed with the less important ones.

<meta name="Keyword" content="ramblings, make money online tips, programming stuffs, blogging tips, views, everyday life"/>

C.) Main Body Text
The main body text is the contents of your web pages. In the body text, scatter your keywords near the top of the page, be careful not to overdo it or else search engines might think you're spamming your contents with your keywords. 3 to 5 times of occurrence is considered fine. Use <h1> - <h5>, <b> tags to highlight those keywords.

To see a live example, visit my apple recipes page in my online recipe website. Notice how I highlight my keyword, apple recipes.

C.) Spider Friendly Navigation
The navigation in your website is the menus and URLs that leads to other pages in your website. When a search engine spider crawls your website, it will follow whatever URLs it will find in your website. If some of your URL isn't working, the spider can't access it and will lead to some of your pages not being crawled and indexed.

Tuesday, July 24, 2007

Go Organic With Traffic

Organic traffic is traffic coming from unpaid searches through search engines such as Google, Yahoo and etc. You can achieve such by optimizing your website so as it is search engine friendly, also known as SEO or Search Engine Optimization. It involves applying proven, and legal(as far as search engined are concern) techniques applied to websites to generate more traffic and in turn create successful conversion in terms of sales.

Organic traffic comes with time unless you have enough money to buy it. Meaning, if your site is new and you don't want to purchase traffic or advertise your site in a paid advertisement, you have to wait days, weeks or months before you site gets thousands or even hundreds of visitors per day through search engines.

However, you can speed up this 'procees of maturity' for you site by applying proven and effective techniques to generate traffic. But that too requires hard work. There's no magic trick in it. You have to experiment what technique or combination of techniques is effective to your site. This means that you have to apply SEO or other techniques to your site and leave it for a couple of weeks and while you are wait there checking your traffic statistics.

One very good qoute that you have to remember always as a webmaster is: 'Contents is King'. This means that if you want you site to generate a good amount of visitors and make them come back for more, you have to stuff your site with good and informative contents. Remember that almost all internet surfers browse the web in search of information. If your site can provide what they are looking for, they will leave you site at once the never come back again.

My blogs and other websites rely mostly in search engines for traffic. And so far, I have a steady flow of visitors. The good thing with it is, you don't spend a penny for the traffic that you get.

Saturday, July 21, 2007

Blogger's Corner: Amrit Man Dangol

Today's feature blogger is Amrit Man Dangol. He is a medical transcriptionist based in Nepal and likes to play basketball. Read on to know more about him.

NameAmrit Man Dangol
Describe YourselfA descent and quality blogger
Main blogDa Ugly Devil's Heaven
Main Blog DescriptionInformation about sports mostly basketball, people, places, and cultures of Nepal, news and reviews of cool website and products, news about latest technology and product in the market.
Other blogsNone
Q & A
1) When and how did you start blogging?I started blogging long time ago but I did the serious blogging from the February of 2007 only. I started as but I bought a domain name and used all the posts in that domain.
2) How many blogs do you maintain?Currently, just one, but I am working on couple of others as well.
3) What is your primary reason for blogging?It would be generating money of course and sharing my thoughts and reviews with the community and sharing the knowledge that I have to others.
4) How many hours you spend blogging everyday?May be around six hours or so.
5) How do you market your blog?I work for
6) Do you monetize your blog? How?Same as question number 5. I work for for my income.
7) If you were to write your very last blog post, what it is about?May be about basketball or Nepal.
8) What is the biggest blogging mistake you've ever done?I haven’t came up with such blunder mistakes as of yet.
9) If you are allowed to read only one blog, what should it be?Humor.
10) What advice can you give to other bloggers?Just blog from your heart and don’t write nonsense in your blog. Try to gather as much information as you can and display it to your blog. Don’t do fake news for a buzz. Just keep working hard on your blog, well that’s what I am doing. Lets see what future brings to the bloggers.

If you want to be featured in this blog, please visit the Blogger's Corner Campaign post.

Friday, July 20, 2007

Hacking The Blogger Template

Obviously, Blogger is one of the most famous blogging website today. This blog is even hosted by it.

Understanding the tags is a key to successfully hack the Blogger template. Since I started blogging May of last year, I have been hacking the Blogger templates to fit my desired design. In fact, this blog's template was originally a two-column template. I edited it to create the third right-most column.

Template hacking or template editing is not really difficult. You just have to know a little bit of HTML and CSS and have time to experiment and your on your way to being a Blogger template hacker. If you don't know HTML and CSS, find time to read good books or search the internet for good resources about the topic.

Many bloggers, especially newbies, have been asking me how they can customize their blogs. So as a way of helping them, I decided to post in my free source codes blog the Blogger tags and their definitions. You can read it on this link: blogger tags definition.

Thursday, July 19, 2007

Find of the Day

While I was browsing the internet this morning when I came across this two website that catched my attention.

Is It Normal. This is a website member-based website where in a member can post any question about anything under the sun and other members will answer to your question. You can find questions and answers from members ranging from intelligent to stupid and funny ones.

Googlism. In this website, you can search for a word or phrases and it will query Google and return all the phrases and sentences that contains the word or phrases you searched for. If you are curious what Google think about your name, go to this website and search for it.

There's still fun website out there. If I found one again, there's definitely a space for them on this blog.

Wednesday, July 18, 2007

Network Down

This morning while we're presenting one of our programs to our users, the network suddenly went down. (Gggrrrr) I had a hard time organizing that audience (I am the project manager for this project) and we were just interrupted by this network problem.

For more than an hour, the office operation of our company went stagnant. All of us prayed that it will last for five hours so that we can take the day off with pay. (^_^). But sadly, before the noon break was over, the network went online again.

Here's the email of our network administrator.

This morning at around 11:10AM, the output circuit breaker #2 of APC 16KVA UPS suddenly trip-off,
which affected the network devices in our Ponciano-Admin Main Network Distribution Frame.
The network connection was restored at about 12:20PM.

We apologize for any inconvenience the loss of network connectivity might have cause you ,
our valued customers.

Thank you.

We had to schedule the program presentation in the afternoon, and I spent more than 30 minutes calling our audience to come and attend. Fortunately, the presentation went well.

Tuesday, July 17, 2007

Time To Say...

...cheese. The day's task is done. It's time for another task...

...posing front of the camera.

Monday, July 16, 2007

Feeling Refreshed

Yesterday I was tired as an old dog. I received calls here and there, asking for assistance and updates for their systems. I think this is one of the drawbacks of being a programmer. At times you are free, and at times when your seat is about to warm, here comes another call from a user.

In my experience as a programmer, users calling for assistance due to errors in the programs is just one effect caused by poor program designs. If you design a program well and identify and handle major problems during the development phase, you got yourself a lot of free time for other value-added work.

Today, I feel refreshed. I think I rested good enough because yesterday, after office hours, I went home early and went to bed early (a very rare occasion). (^_^)

Sunday, July 15, 2007

Drawbacks Of Being A Programmer

I admit, programming is enjoyable for me. I can't imagine myself doing another job than programming (or at least very related to programming, analysis or consultancy).

There are many perks of being a programmer. One of which is you get to surf the internet, update blogs, a chance to make people's work easier and many other things. But mind you, there are also many drawbacks of being a programmer.

Here are some of my list:

1) Maintaining Other Programmer's Program

Maintaining other programmer's program is not really difficult if it's programming style follows the basic characteristics of a "good" program: (1)reliable, (2)maintainable, (3)user-friendly, and (4)meet functional requirements.

If you are tasked to maintain a program that do not meet this basic requirements and the coding is style is so college-like, it makes you think, "What is this? A college final project". (^_^)

2) Nervous(or Idiot?) Users

I have encountered my complains from users where in they said they can't login to the program, it turned out that they forgot their password. The worst is, if the user's PC is in another building and when you get there, all it needs is a system reboot. (GRRRRRR)

3) Limited Resources

It is very frustrating for a programmer to not being able to do his job due to limited resources. When I was a programmer at a research project, the first month I don't have my own PC because they're still purchasing it. It makes me think, "What am i doing here?"


4) Demanding Users

A do-this-do-that type of user always irritate me. They think just sitting there in front of the PC the for 8 hours is easy.

I'm sure there are more drawbacks of being a programmer that I didn't mention here. We'll, it's all I can remember. If you know one, please add it in the comment section. (^_^)

Wednesday, July 11, 2007

ESRI or Manifold?

Looks like it's not only me who is having a dilemma of what web programming language to learn. Our sections is having difficulty also in choosing what web programming language to use in our software development. Should it be JSP or ASP.

Since our department's primary goal is to create mapping and GIS softwares, we searched for a software that we can use to leverage our mapping software development. After a long time of searching on the internet, ERSI products and Manifold was shortlisted. ERSI product was the first choice because it supports both Java and Microsoft technology, but the drawback is it is so expensive. So we resorted to Manifold.

All was well until we consulted our network department. They said, they are upgrading our company's enterprise server from Microsoft products to Linux because of security problem and high cost in Microsoft products (Windows servers). Our problem again started because Manifold supports only Microsoft's ASP or Active Server Pages and Microsoft products do not run on Linux operating system. Until we come up with a good solution to this problem, we still cannot make a conclusion of what web programming language to use.

Monday, July 09, 2007

Adsense Resources for Newbie Bloggers

If you are a blogger, then you must know Google Adsense. I was introduced to blogging and Adsense at the same time.

Adsense is one of many ways to monetize your website. All my blogs and websites are monetize using it. I particularly like Adsense because of it's ease of use. It's like plug 'n play to your blogs and websites.

If you are serious about monetizing you blogs or websites, here are some free resources for you.

1) Beginner`s Guide To Google Adsense. If you are really new to Google Adsense, this beginner's guide is for you. In this guide you'll read the basics techniques.

2) Google Adsense 101. In this resource, you can read the some answers to your question about Google Adsense, including increasing Adsense earnings.

3) How To Build A Website. If you are feed-up with blogging, then you might want to build your own website. This guide will teach you the step-by-step towards your first website.

I hope this resources will help you earn your first Google Adsense dollar.

Web Programming Language Dilemma

Last Saturday, I attended an informal training for JSP. It was conducted by one of the developer from other department in our company. It was our second Saturday session.

Last June 22, I started reading about JSP using the book JSP Web Development. Then I shifted my focus back to PHP, which I already knew and have been using for about a year now. My reason was, I want to master first the PHP language before moving on to JSP. When our Saturday session for JSP began, I'm having a second thought again if what should I focus more, JSP or PHP. Any suggestions? (^_^)

I have already developed websites using PHP, online recipe collections, smart coder and online guide to name a few. JSP is a new language for me, although I have already a background in Java and other web programming language, this would mean a new start for me, that's why I'm having this dilemma. (^_^)

Friday, July 06, 2007

TGIS Again

Whew. Thanks God it's Saturday again.

This week has been a busy week for me. Programming projects here and there. User calling for assistance here and there. Well, I'm a programmer. I have less right to complain when users are being idiots when using a program. (^_^)

Anyway, last Thursday, we went to Panabo to present a program for our user there. I met one my former officemate, Joel Deguito, who is already assigned there.

Jojo, as most of his co-workers call him, is a self-tech programmer and a newbie blogger. He told me that he is an avid reader of this blog. And that he picks meaty lessons from my posts. And as a form of appreciation for being a fan of this blog, I'm putting his link in this post.

To Joel Deguito, keep on blogging man.

Tuesday, July 03, 2007

Online Recipe SEO Success

Last June 30, I blogged about the initial success of my free source codes blog. This time, it's my other website, online recipe collections.

A Brief History
This website has been online for about 8 months now. I don't really market this aggressively except for putting it's URL in my signature sections of my emails. I rely mainly in search engines for it's traffic.

Since the site was fully index by Google, Yahoo and other search engines, I've been enjoying good amount of traffic from those search engines. But I noticed that some of the recipe categories pages do not appear in organic searches. Further studying revealed that I was because of the URLs I used. Instead of the actual names of the categories and recipes (Ex: appetizers, bread, cakes, etc), I used the ID's from the database tables (Ex: 1, 2, 3, etc).

In search engine's point of view, appetizers, breads and cakes are more relevant than 1, 2 and 3 when a user searches for recipes.

Although my website's contents is optimized for every recipe categories, it lacks one key optimization point, the URLs.

To counter this weakness in SEO, two weeks ago I recode this website (I use PHP) to display the category and recipe names instead the ids. Here's an example:



The Result
This morning when I check my sitemeter, I was very excited to see that my online recipe collections website more than doubled it's visitors. The keywords before that I don't rank well in searches suddenly become my traffic sources. Let's see if this big adjustment I made well bring more traffic to this website.

Monday, July 02, 2007

My Life In The Past Two Months

The past two months, May and June, had lots of things happened to my personal and blogging life.

Last May 5, I was wed. Although I didn't mention about it until now, I posted our reception video and some pictures here. It was also during this month that I decided to enliven this blog. I even bought my own domain as a sign of my commitment to update this blog often.

Last month, June, was a record breaker so far for this blog. I post an average of three post per day for the whole month of June. It was also during this month that I changed the primary reason of my blogging. I also launched my blogger's corner campaign. I also bought my own camera for my blogging and personal use. During also this month, this blog made it's first milestone.

At the later part of June, I decided to delete my four low traffic blogs and concentrate on a few ones. I also create a free source codes blog that I think suits my job as a programmer. This new blogs is steady gaining traffic and Adsense revenue. Also, according to Google Adsense, they sent my second check last June 29 (I received my first check last December 2006).

For the two month that passed in my personal and blogging life, all I can say is: Whew, keep blogging kabalweg.

Recent Post