Posts

Showing posts from October, 2011

Run IE6 as vm

Run ie6 as vm instance 1. install vmplayer http://www.vmware.com/products/player/ 2. get ie6 vm tar, unpack uing 7zip (you must have an ie6 tar created from os disks and packaged using vmware) 3. then in vmplayer go to that ie6 and open its vm file 4. play the new vm and open ie6 within that os 5. hit any url now 5. for local testing urls enter ur ip name as base url (type ipconfig in command line and us IPv4 Address. e.g.    http://75.101.110.170/frontend_dev.php/brand/holiday/videos

Ruby on Rails

Well, the time has come to get stuck into Ruby on Rails v3.0. I'm excited. So I bought 2 peepcode videos (basic I and II) and am watching them. I have rails and dev kit installed locally on my pc and we're ready to start coding. First, I have to say how similar symfony is to rails. Same folder structure, same tasks such as generating an app, use of yml files for configuration etc. Plus my experience creating Rest apis in my most recent project with backbone.js will serve me well with Rails. more to come...

Using Mercurial Hg to Pull and Commit

On my latest project I need to use Mercurial Hg as source control tool. I'm on windows so I use Tortoise Hg (who also prvide svn and cvs ui tools) One big difference thus far is committing to and updating from the repo is a 2 step process for Mercurial. When getting changes from the central repo, you must Pull the changes (changeset) but then also merge and commit then to your local (just pulling is not enough). You must commit your own local changes first before you can commit the pulled changes. Tortoise hg synch menu has an option to just pull all or view a list of pulls and decide what to accept. From the docs: Pull changes from the group repository into your repository,  TortoiseHg ‣ Repository Browser  or  hgtk log , choose the path to the group repository in the syncbar and then  Pull . If some changesets were pulled, merge those changes with your local changes and then commit the merge into your local repository. From the changelog viewer ( TortoiseHg ‣ Repository

Facebook app hosting on Heroku

Check it out here

Considerations when working with China team

For Benefit Cosmetics the first site launched in March 2011 was for China site. Hardworking, helpful people. Remind me a great deal of many Americans I've met. Some major considerations: - Language and time zone challenge collaboration. Our end of day in SFO is Chinas start. Many spoke little English and none of us Chinese. So language can be a challenge. Expect to work some late late nights, I did. - In my experience, some Chinese respond better to top down direction from their boss than as self starters. So if work is not getting done then you may get more success driving it from top down (just like it works here too!!) - China addresses are different: e.g. districts, subdistricts - Facebook, youtube, twitter not allowed and google is day by day. China has own versions. - China will typically use their own Chinese payment gateways (e.g. Alipay). Plus Chinese are more used to Cash on Delivery (i.e. not pay until delivered) - Currency symbol is different, but number format

css float is your friend

Many designs I see have text extreme left and right of page. Padding etc is not the way to go. The way to accomodate this is using css floats. The important thing is to float clear after your floating (otherwise layout goes awry). If you've floated both left and right previously then you'll need to clear: both otherwise you can use clear: left/right as appropriate

jQuery dialog setButton text, no title bar

There are 2 formats to pass buttons: as an object and as an array of objects. Using the latter you can set the button text attribute. This is the approach to use for localizing the text. e.g. (minor changes to protect) Here's the Gist Hide title bar: notice the dialog class noTitleDialog? Does as it says, css in the gist.

Backbone.js binding and unbinding (no free lunch)

For devs used to other thick client RIAs like actionscript, adding and removing listeners is second nature. But for js devs using an MVC library such as Backbone it may come as an unexpected surprise and be the cause of bugs. Event driven programming is a good way to go, add listeners, fire the event, handle the event. BUT you have to remember to remove the listeners if the listener is no longer interested or is otherwise being removed from play. If you don't it can be the source of errors and/or leaks. This is supported in Backbone.js with unbind(), you call it just like you do with bind i.e. // add listner to do save if user oks save on save dialog, as well as cancel saveDialog.unbind("updateOkd", this.updateOkd ); saveDialog.unbind("updateCancelled", this.updateCancelled ); ...and here's the bind // add listner to do save if user oks save on save dialog, as well as cancel saveDialog.bind("updateOkd", this.updateOkd