12
Jul 13

migration to joe’s datacenter

Did it again. However, this time I’m getting a dedicated server instead of cloud virtual servers based on one blog post.

Since I do not have virtual servers, my environment is rather limited.
So I decided to just go with apache instead of nginx and everything is vhost.

It’s been a few weeks since I migrated and everything has been so far so good.

26
Jun 13

faded images by category

Today someone asked me how to implement fading images by category. Triggering event should be “click”.
So I made a sample page for him and it took literally less than 10 mins to achieve the effect.

Here it is.

13
Jun 13

nodejs and forever

When I first learned nodejs, its version was something like 0.1.x. Also back then setting up nodejs application as service so that it keeps running continuously was a bit daunting job.

Now with nodejs v0.10.10 and forever, that issue is gone.

One thing I had a trouble with installing forever was “-g” option. This is what needs to be executed.

sudo npm install forever -g

using forever to start an nodejs app is easy as pie.

start your app
forever start yourapp.js

list running nodejs via forever
forever list

kill a nodejs app via forever
forever stop {indexnumber}

Even if you kill the process with kill {pid} your nodejs app will come back live, so you have to kill the app via forever.

good stuff.

note: when installing the latest nodejs I had a trouble adding repository “ppa:chris-lea/node.js”:

sudo add-apt-repository ppa:chris-lea/node.js

This guy’s post has the solution to the issue of add-apt-repository being not valid command.

sudo apt-get install software-properties-common

13
Jun 13

javascript frameworks: angularjs

Ok I admit that I lacked the latest javascript frameworks such as AngularJS or Backbone.js.
So I decided to do some digging around those frameworks starting with AngularJS as that’s the one of the questions interviewer want to ask about. I’ve asked multiple times already and was neglected to learn more about it until this morning.

First thing first. minified javascript file size is 82KB. Maybe I have not adapted to the new mindset that many users have high speed internet service so 82KB is small number to download? I still think that 82KB is pretty big file. That is another reason why I avoided those frameworks as much as possible. On the second thought, server side gzip will take care of that issue much since compression rate against static text files is pretty damn good.

Ok. going back to learning more on angularjs… will be back…

08
Jun 13

Genghis mongodb admin UI

Downloaded it, installed it and love it.
Simple and clean UI.

I was using mongoHub, but the app has stability issue on my mac and it would crash here and there often although it is a mac os native app.

I was quite impressed with Genghis.

their website

github

20
Mar 13

Look at your html page as xml data for the sake of SEO

I’ve been working on a script that goes to a URL and scraps some parts of data, which is pretty much a crawler or spider.

If all pages that the crawler landed were valid, my job would have been so easy. However, in reality many many pages are not valid and the script has to use regular expression.

This can be a good or bad thing for those web owners.

However, exposure is very necessary in terms of marketing for the site and valid html page means it has greater chance to get exposed by search engines such as google.com because valid html page will provide what search engine crawler wants more efficiently.

I believe engineers who work on those crawler have overcome many difficulties due to the invalid markup on a page. However, if HTML in a page is not valid (treating it as a xml), those smart engineers would have to come up with a logic to overcome that by using regular expression perhaps. That could be prone to mistakes so lead to scrapping only few from invalid HTML in a page. After all engineers are human and human make mistakes.

Also just for the same reason, if well formed semantic HTML is used, it will have higher chance to get exposed to a certain keyword typed by users.

That’s just my idea of how html page has to be constructed considering SEO and future use.

So my recommendation is this:

1. Treat markup in a page as data. Forget about presentation and such. Just make sure the data is valid.
2. Use CSS to visualize the data (= HTML markup) to appeal users

It’s quite simple after all.

04
Mar 13

Using .plist to get app-wide variables

In web application architecture, there is usually a file that has system configuration info.
In objective c development, there is a file called {name}.plist and it has some information regarding your application.

This is how you can get a specific information out of the file.


NSBundle *mainBundle = [NSBundle mainBundle];
NSString *myValue = [mainBundle objectForInfoDictionaryKey:@"myVariable"];

There you have it!

26
Feb 13

Battlestar Galactica: Blood & Chrome

I watched Battlestar Galactica: Blood & Chrome last night and felt it was too short. One thing I liked about Battlestar Galatica series was that the whole storyline weighed on philosophical views (and, of course, battle scenes). However, this short series did not have one (’cause it was too short).

At the end I enjoyed it because I am a huge fan of Battlestar Galactica. (I even liked Caprica so much)

Here’s link to amazon:
http://www.amazon.com/gp/product/B00BHNP3SI

24
Jan 13

PHP PSR-[0-3]

At my work place, we use PHP and CodeSniffer hooked up in Jenkins.
I liked the fact that PSR-1 and PSR-2 are approved by the committee.
The PSR0 standard is found at:
https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md

The PSR1 standard is found at:
https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md

The PSR2 standard is found at:
https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md

The PSR3 standard is found at:
https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md

p.s. Kohana 3.3 has PSR-0 and the migration from 3.2 to 3.3 is quite tough for me. It requires a lot of refactoring on my side…

11
Dec 12

safari emoji list

http://www.grumdrig.com/emoji-list/

This works on safari only. sorry chrome and other browsers.

« Older Entries
Newer Entries »

Copyright © 2014 web technologist
Proudly powered by WordPress, Free WordPress Themes