I’m Dzung Quang, and This Is How I Work

Being inspired by series How I Work of Lifehacker, I create one about myself :)

Dzung

Location: Odense, Denmark

Current gig: Working for Novitas - an ERP consulting firm in Denmark. Currently, I’m working on their latest starup. All the while also working on a ton of ideas and contributing to lovely open source world on Github.

Current mobile devices: HTC One.

Current computers: Macbook Pro 15” ( for work ); Hackintosh Box (for Gaming and Photo Editing)

One word that best describes how you work: Passionately.

What apps/software/tools can’t you live without? Doesn’t have to be tech.

A bottle of water - seriously I drink a lot. On the software side: Vim (I do write everything in Vim), for RSS Reader I use Feedly and I have no special need for reading PDF files other than the default one on Mac OSX. And sure, Terminal where I do most of developing works.

What’s your workspace like?

At work: We have a good adjustable desk, so it’s pretty comfortable if I want to stand. I’m always with a couple of waters and I have my headphone on when I want to concentrate on difficultt tasks.

Anywhere else: I put important files on Dropbox, docs on Google Docs and dotFiles on Github if I really need it. And sure I work with my Macbook.

What’s your best life hack?

Do two most important things in the early morning and creating your own rules of living. And playing when people work and working when people sleep.

What’s your favorite to-do list manager?

I use Evernote for all sort of writing ideas and keeping track of todolist everyday.

Besides your phone and computer, what gadget can’t you live without?

My camera

What everyday thing are you better at than anyone else?

Being passionate and being supportive.

What do you listen to while you work?

I listen to different kind of music and change it frequently. Sometimes I listen to one song repeatly and at the time I write this post I listen to The telephone box, it inspires me in traveling and freedom. I often discover and listen to new songs on Soundcloud or Youtube.

What are you currently reading?

The Art of Start by Guy Kawasaki.

What’s your sleep routine like?

It depends, I can do very late night. But I did have a good sleep routine of sleeping at 11 and waking up at 5. It was enjoyable and I’m working on recreating this good habit of mine.

What’s the best advice you’ve ever received?

Too much to list. But if I list one, it would be : “Big ideas start small”

Fill in the blank: I’d love to see _______ answer these same questions.

Joel Gascoigne, Gordon Ramsay and Guy Kawasaki

Is there anything else you’d like to ask

Schedule your time, and listen to The four hours work week by Tim Ferris and it will change your life.

ngAnimate Is Awesome !

I intend to write a post about angularjs new module ng-animate, but this slide is so much informative. Beside that, I totally agree with @gsklee point on ignoring IE in the new web world in the case you want to show the awesomeness of animation

How to Analyze Php’s Code Using HipHop-PHP

Maintaining MagePlus - a better version of Magento CE is a fun experience. Because it’s a big code base with a lot of minor bugs and errors but it still works …. This is not something unexpected from a big codebase like Magento since it was not developed with a well tested and testable code. But what really interests me is how we can analyze minor bugs like syntax and typo errors fast. @rlerdorf - one of the contributor of Mageplus has a simple command from hiphop-php to save the world:


hhvm --hphp -t analyze

--------------------------------
File       : lib/Mage/Connect/Loader/Ftp.php:98
Reason     : UseUndeclaredVariable
Snippet    : $out
Line       : return $out;

--------------------------------
File       : lib/Mage/Connect/Packager.php:293
Reason     : UseUndeclaredVariable
Snippet    : $cachObj
Line       : $p = $cachObj->getPackageObject($chanName, $package);

--------------------------------
File       : lib/Varien/Db/Tree.php:441
Reason     : UseUndeclaredVariable
Snippet    : $pID
Line       : } elseif ($aId != 0 && $pID == $eInfo[$this->_pid]) { // if we have
after ID
}

Since I really want to try to install but it comes out that hiphop-php is quite hard to install and it’s only available for Linux at the moment. Let me know if you have any other lightweight tool which can do the same thing, I’d be very appreciate about that.

The original post is on Github.

Magento - Translate the Right Way

There are two sources of translation in magento:

  1. one is saved in core_translate table. This will be created when you use inline translation.
  2. the other is saved in CSV.
Database’s inline translation cons:
  1. tranlsated text is limit to 255 characters by default
  2. if you have the same translation of one text in the core_translate table and csv file, magento will pick the table’s one which is very frustrated when you are working with csv translation and you don’t know why it doesn’t work.
CSV’s translation pros
  1. Portability. This is important because it’s a big chance that you will reuse this translation in another magento setup.
  2. User friendly. I always hand my csv translation to my translator and she/he will take care of its content. So it should be something easier for them to work with and csv editing is easy.

So the best workflow is turning on the inline translation and gets the original text there and put it into your csv file. If you work this way, everything works beautifully and more importantly in a correct way. Teach your translators and help them working the right way together, everyone benefits from it.

The World Is Talking About Recruiting

Since the world is changing a lot these days: Real hackers want to be entrepreneurs. That means the labour market will be lack of quality workers. So, companies have to change the way its work as well as recruiting to get the best guys out there to get shit done the way they want.

Stripe tells their story about forming one of the best engineering team on Silicon Valley.

Github keep recruiting remote workers and it scales perfectly of their working system.

37signals is writing the next great book about Remote working and I cannot wait to get it.

How to Open File With Custom Application in Mac OSX Terminal

I’ve just discovered an useful command to open a file with custom application in Mac OSX terminal. Normall if we open a file in terminal, we will use open command, but it does have something more interesting which is -a flag ( think a as application ). Now I want to open video file with my MplayerX application instead of Quicktime, I just do this:


open -a MpalyerX 

For the sake of my laziness, I create a simple alias for it:


mp() { open -a MplayerX $1 } # I'm zsh user
mp 

Always Use CDN

Instead of having your own version of bootstrap or jquery on your localhost, you should use provided Content Delivery Network - CDN instead.

Why ?
  1. Boost your website speed. If we have same site A and B using the same jquery from Google CDN, so if they visit one of their site, the browser will not download the lib again in the other since it is cached by browser. And CDN like Google or NetDNA are already out there for long time, so if your site uses same CDN, your customers do not have to download that lib again, and it saves one http request per lib so it is faster.

  2. Boosting your development speed. You do not have to download libs everytime you bootstrap your project. Just make a good template and then start making thing. If you work mostly with angularJS or backbone, just create a template then git clone. Bump, done !

Disadvantage

What if the CDN server is down, you are talking about Google and big guy like NetDNA. Their down time is really low which is close to 1% or 0%:

NetDNA : status http://www.bootstrapcdn.com/uptime.html

But it is dependable, some big companies combines all the script together to one file so it only takes one http request. Beside their network is fast and most of them are core of the internet.

For the small and medium companies, it is best to use CDN in my opinion. Because it is fast to bootstrap your project, it is lightweight so the only thing you need to do is copy and paste.

Beside using the library, you can setup your own CDN to handle all static files.

Popular CDN

Google CDN: https://developers.google.com/speed/libraries/devguide

bootstrapcdn: http://www.bootstrapcdn.com/

cdnjs: http://cdnjs.com/