Monday, November 22, 2010

Use the jQuery, Luke!

If you're asking me what's the most useful thing I ever come across when developing websites, my answer will be jQuery. In fact, that's one of the top entries in my to-do list when doing website projects. So important and so useful to me, that it has saved my life!!! Well, actually it's not THAT dramatic really... but with jQuery, it makes implementation faster, easier, and fun-er, thus giving me back those precious long-lost portion of time to get more family time, more game time, and--of course--more sleep.

How so? Quoted from their website:

jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.

......say what???

Allow me to break it down so it's easier for you to understand.

Wednesday, October 27, 2010

Can't Verify/Link Google Webmaster to Google Analytics: "We weren't able to verify your site"

Last week I set up a blog mirror at Blogger. Since it's free, and it's useful to add more channel/exposure to my site, so why waste it?

Anyway, I added the posts, created the pages, linked it to my Google Analytics account, and everything were checked. Monetization was also set up properly. And lastly: added it to my Google Webmaster Tools and tried to do verification via Analytic. Result? Big red fail:

We weren't able to verify your site:
http://behindthecodes.blogspot.com/

What's going on here??? Apparently lots of people are also in loss.

My Analytics account were good, and I could see the data from this new blogspot site coming in. Also to be able to link to my Analytics, Webmaster said:

You can use this option if your site already has a Google Analytics tracking code that uses the asynchronous snippet. You must be an administrator on the Analytics account.

... and both were fulfilled already. So the problem was neither on the Analytics site nor my blogspot site. Well Google, thanks for your simplistic and unhelpful error message :(

Anyway, the problem turned out to be due to the placement of my Analytics tracking code: I put the code before the closing BODY tag, where Webmaster expected it to be in the HEAD tag. So off I went: edit the HTML code of my blogspot template, move the tracking code to end of HEAD element, and tried verification again. It worked!!!

So as a summary, I just want to give this solution (fix) to the world:

In Google Webmaster, if you want to verify/link your site to your Google Analytics account, make sure you use the asynchronous tracking code (ie. the latest one from Google), and make sure you put it in the HEAD section.

Hope this helps!

Friday, October 22, 2010

Use XAMPP to serve data-driven personal websites

Related to the previous post on serving websites using a Windows 7 computer , my friend was asking if it's possible to host PHP-based data-driven websites (using MySQL as the data storage) on his Windows 7 computer. Well, why not? Let's talk about this a little bit....

Thursday, October 21, 2010

Use IIS to serve websites from your Windows 7

Thursday, 11PM. I was cleaning up my desk, getting ready for my lunch break, when the Marketing Manager stepped into my office.

"Ohai! All ready for your gaming expo?" I asked her casually.

"Yep, pretty much. We're also set for a survey-slash-raffle program, where our booth visitors can fill in their contact info and play a jackpot-machine minigame to get into the instant raffle."

"That sounds gr---" I tried to reply, but she kept on going.

"It's a flash webpage, and we're using Microsoft Access as the database storage. So we'll run everything off the browser on our two laptops. They both are running on Windows 7."

Suddenly I had a funny feeling down my brain. "Sooo... you want me to copy the program files to our website?" I asked, trying to guess where this talk led to. "No problemo!"

"Actually, THAT'S the problem..." she told me, sighing. "We won't have any internet access in the expo. And we're leaving by 3..."

Aha! So my feeling was right. Being a helpful coworker, I gave her a promise worthy of the next Presidential candidate: "Give me your laptops, and in 30 minutes I'll make it work locally."

And there she went, dashing to her office and back, presenting me with 2 high-end laptops and a big wide smile on her face.

So how did I tackle this? With the help of Microsoft's IIS, it's super easy! Follow these steps, and you can do it too!

Wednesday, October 20, 2010

Hello, World!

Hello, and welcome to my blog site.

Currently I host this at 000webhost.com (for free!), with domain name in namecheap.com. Asides from occasional hiccups related to the free hosting account, it's been pretty okay. I just need to remember to reconnect the FTP before saving my files, or else the save will fail. Well I know it's free, but still... free or not, this I think is not a good way to show one's reliability. (I hope 000webhost is reading this... :D)

Edit on 11/23/2010: I finally fed up with 000webhost's free hosting quality, and moved to Namecheap hosting instead. Now it's more stable, and so far no downtime.

Anyway, I hope you like my blog site. Please enjoy my posts, click on the ads (please please please :D), leave some comments, etc. Oh, please give me suggestions as well on how to make this a better blog site.

Thanks!