Dec 22, 2012

Tips for Smart Phone App Coding

Mainly two ways to show different interface due to different devices:

1. Load matching stylesheet

<link media="screen and (min-device-width: 481px)" href="not-small-device.css" type="text/css" rel="stylesheet">

2. Add media queries in CSS

@media screen and (min-device-width: 481px) { ... }

Viewport Meta Tag Options

1. Make the viewport width match user's device-width

Dec 13, 2012

Moving wordpress site to a new address

Suppose you've built a wordpress website on www.abc.com/one, now you want to move it to one.abc.com --

Step 1. Create your subdomain and folder on your server. You don't want to destroy your original wordpress folder,  so you should use a different name, or alternatively you may rename the old folder before creating a new folder/subdomain.

Step 2. Move all files under the old folder to the new one. Be attention not to move the folder but the files under it, since you want to use one.abc.com as your root folder.

Step 3. If you're using a different database for the new location, make sure that the database is accessible. Check the configuration in "wp-config.php" to get your database name and password.

Dec 4, 2012

Tips for Facebook Social Networking




Having been working on my personal blog for many years, I think I am not a complete newbie in this field. I have a Facebook fan page which has over 8500 fans, and the number remain increasing though I now have very few time to maintain it. I ran another fan page for my company, whose fans reached as much as 1000 within 3 months. I have the confidence to make a new-created fan page's fans reach 100 in a week, if enough free time, and if I was allowed to use my mother tongue.

Social networking is a time-consuming work that requires lots of practice and patience. No one can become an expert without actually doing it, and you may find social networking for different events, companies, and websites, demands different ways to do it. The result varies depending not only on your efforts, but also on many factors like the base number of your targeted audience, current trends, the resources you own, etc. For instance, two fan pages, A and B start from the same day. A is a famous singer's fans club, and B is for collecting moral examples in our city. I should expect the former one will grow much faster. But if A is not an official page and  B is run by the government, the situation may change.

Oct 14, 2012

Keep prototyping simple

I find those "powerful prototyping tools" so pointless.

Before I became a web developer, I was a website editor. I learnt how to design user interface when my superior required all the people in our department to participate in the building work of  our company website. That year a software Auxure was imported to Taiwan and was recommended by many "experts" in the industry. I tried it, not bad. Using it you can actually generate javascript files demonstrating a bench of beautiful effects.

Auxure has so many amazing features allowing UI designers to show how this interface is working. But to be able to do that, you need to spend time studying it, and there is definitely a learning curve. Auxure can be one of the hardest "wireframing tool" I've ever known. One of my partners (after I became a freelancer) was so excited when she firstly experienced this. She kept asking me questions about how to manipulate the layers to make the effects exactly the same as jQuery UI could do. Finally I said to her, "Well, after you spend so much time to make it work like a functioning website, it's still not a website. I still have to write all the codes. Though you don't need to explain what results do you want but instead I have to explain why we'd better not to do that on a real website.  No mater how fancy your prototype is, the result makes no difference. I believe you can save the time you spend on building these effects by talking to me."

I just found it too complex and unnecessary. A prototype is a prototype. If the tool enables people to communicate effectively, I would love to embrace it. But if the advantage is merely seen?

Oct 2, 2012

Upgrading GoDaddy Hosting to PHP 5.x

I found the PHP version too old when I install a new wordpress application on my server. The PHP version was 4.3, ’cause it was a long time since I bought this host service from GoDaddy and haven’t updated yet. Fortunately, there is an updating solution. The Unix server provided by Godaddy allows users to install essential software as they have needs.

To upgrade it manually, create (if not exsits) a .htaccess file in the root folder of your website server with the content below:
AddHandler x-httpd-php5 .php

AddHandler x-httpd-php .php4
Save it, done.

Still like the instructor told us, GoDaddy is apparently not a good choice for hosting, since its C-Panel UI design is totally horrible. When I firstly bought an 1-year plan from GoDaddy, I was surprised that I had to wait 2-3 hours everytime after setting a new sub-domain or modifing some lines in .htaccess file. I also had a hard time finding where their domain management panel was. Everything was so frustrating. The No.1 reason driving me away was that most IPs of GoDaddy servers are banned in China, which could be a problem if you have a marketing plan in that country.

So I switched to Bluehost.com though I still have a few websites hosted on it. Some websites are occupied and sadly I have no time to deal with the coming issues if I'm gonna move them. But I will do it sooner or later.
Hi, I'm Kero, a web developer.