Back to Diablo 3… After 12 years

Finally, like all other people feel, it’s back. Diablo is back to let us kill again….

So long, I was still in high school back then.

The game is still awesome, even there were server issues all the time. Normal Diablo has been killed after 20 hrs…

I think the only defect right now is the new fancy “Auction House”. Oh, well, I understand the idea. It will be a great way to get more profit from those hardcore asian online game “farmers”. Many people become rich with similar games that allow real money trade.

However, if you can buy a Rare (Gold) weapon, or even Legendary weapon for like 10K…. The settings inside the game, like Black Smith and Jewel Crafting is meaningless…. I bought a high level Ruby gem for like 1K gold….

Oh, well, enjoy the game:)

If it runs on my machine, it’s my software

From Coding Horror:

“ When you run a business, if your software has a bug, your customers don’t care if it is your fault or Linus’ or some random Rails developer’s. They care that your software is bugged. Everyone’s software becomes my software because all of their bugs are my bugs. When something goes wrong, you need to seek out what is broken, and you need to fix it. You fix it at the right spot in the stack to minimize risks, maintenance costs, and turnaround time. Sometimes, a quick workaround is best. Other times, you’ll need to recompile your compiler. Often, you can ask someone else to fix it upstream, but just as often, you’ll need to fix it yourself.

    • Closed-software shops have two choices: beg for generosity, or work around it.
    • Open source shops with weaker developers tend to act the same as closed-software shops.
    • Older shops tend to slowly build the muscles required to maintain their own forks and patches and whatnot.

True hackers have come to terms with a simple fact: If it runs on my machine, it’s my software. I’m responsible for it. I must understand it. Building from source is the rule and not an exception. I must control my environment and I must control my dependencies. 

Unfortunately, people tend to blame others once there is something wrong:

“No, it’s not my fault, yeah!”

“It’s team XXX broken it, let’s open a ticket”

“You broke it, fix it”

Bla bla bla… They never really understand that if there is a problem, it’s everyone’s problem. If you don’t want to look at it, nobody else will too. Finally, it’s all about attitude.

Hacker will always try to understand the black box no matter it’s my code or it’s from another developer of another team, or it’s open source packages somewhere from Sourceforge. It’s not rocket science, just follow the code and be patient. Every C program will start with a “int main(int argc, char *argv[])”, ALWAYS.

Lunch Talk: Google’s 20% Time

Every Friday is our Roti day. There are usually some interesting discussions.

Our Conversation

Here is kind of the conversation last Friday:

Me: Oh, man, we should spend more time to refactor our code. They suck, and why we actually started to use C++ somehow? I think everything we have is written in C. Also the code is actually not bad at all.

Friend A: Yeah, I heard that they actually decided to use C++ to just have something fancy on the resume.

Me: Wow, really? Unbelievable… but if they don’t know C++, how they can use it correctly…

Friend B: I don’t mind to use C++, if there is a good reason… It doesn’t make any sense to choose something just because it’s good, that should be explanation that why it’s good.

……

Me: definitely, also, we should always choose the right method to do the right thing. There are many things that doesn’t make any sense right now, like our build system, why just spend a week and stop everything, just fix it completely. Then we never need to worry about it again.

Friend A: It will never happen… Management won’t think it’s worth to do that.

Friend B: (laugh), correct, there is no business value to do that at all. No customer will complain about build system (we all laugh)

Me: Very true, management won’t do anything that doesn’t have business value… but how they define business value? The thing we want to do probably will never have business value…

Friend B: If we can have something like Google, you can have 20%  time for your own to do whatever you want. How cool that will be… How much things we can get done…

Me: Indeed, many popular Google products are actually created from developer’s 20% time…

Friend A: Yeah, for sure, but it will never happen to us though… I remembered that someone mentioned this several years ago to the upper-management, the top management guy actually replied “I will never give people 20% of their time for doing nothing, never”

Long time silence….

So that’s where the talk ends. We all feel some sort of upset I guess. Let’s face it, that’s how a company usually works. If you ask me, it’s not surprising at all that any one in any management roles will say something like that. I told me wife this story and her action is “Indeed, I will say that as well. It’s the basic rule for any managers…”, However, my question will be if for an IT company, is this still true?

 

Why Google Does This?

Oh, Google, everyone has heard too many stories about them, their special offices, free lunch, dog in the office, and 20% creative time. All those rules are probably considered so wrong in a traditional company, but why it works for Google? Because engineers are the basic and probably the most recognized group in Google. They honor them. They respect them, and they know what they need.

As an engineer, I can totally understand what that means. I do my work not only for living and money. I also need to be passionated about what I am doing. I believe that I can always create something new, learn something new and work on something new. However, most time, your work won’t be exactly same as your interest. In that case, you probably will spend your spare time instead to work on your own, either for an opensource project, or having your own secret project, which won’t be any beneficial for the  company.

On the other hand, with 20% of your free work time, engineer will definitely try to connect their interests with the work… Usually, it will turn into something very interesting and potentially very beneficial to the company… Then, why every IT company didn’t do it?

Not For Everyone I Guess…

I think another important reason that Google dare to do this is their confidence of the engineers they have. Rudimentarily, you need to trust your engineers to be good enough to have this kind passion. I can see many people in my previous companies and current company that consider work just as work.  That’s probably the reason that Google’s hiring process is complicated and super tricky sometime. They are not only looking for people that works exactly like them, but treat work like them as well…

Personally, I believe that every IT company should think about this carefully and what kind of people you are looking for? What your company mission is? It’s just a business for some money? Or you are dreaming to change the world entirely? If you do, then why bothering to give your people 20% of their time? If you don’t trust them, then what a shame…

Anyway, this is probably just too ideal and won’t be realistic ever…

My Effective Mac OS X Lion

As a long time macbook pro user,  Mac OS X usually provides fairly pleasant experience (Certainly, I love Linux as well, but I have to admit, for personal computer, especially for laptop, its user experience is not even close to OS X). However, some changes in the latest Lion (10.7) makes me somehow a bit uncomfortable. Some features just don’t feel right (which is not like what Apple usually does at all). It seems like half-baked and no way to enable/disable easily. I totally understand that this is very subjective statement and Lion is still a great OS, but anyway, now, here is my tweak list for Lion. Hopefully, most of those things will be resolved with Mountain Lion.

Disable Spotlight Entirely

As a long time QuickSilver user, I don’t really have too many complaints with Spotlight since it’s introduced several years ago. It’s just a bit annoying that it will be scan all hard disks automatically, including my portable hard disks. The easy way to fix it is putting all directories that you don’t want to be scanned in privacy list (System Preferences -> Spotlight -> Privacy).

On Lion, this is not true anymore. After upgrading to Lion, mdutil runs like way more frequently than usual and I don’t really have any time machine disks… So I have to disable it totally. Here how you can do it:

sudo mdutil -a -i off

and you probably also want to remove Spotlight icon from menu bar. Here is how to do it.

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

Notice that once you do this, many applications that depend on the Spotlight won’t work anymore, like Mail, or Finder. Be careful before doing this.

Always Show Scroll Bars

I think this is something introduced in Lion. The default behavior of scroll bar is hidden now. It’s OK if you use the trackpad, but if you use a keyboard with a old fashioned mouse with a desktop machine (like a Mac Pro or iMac). It may confused you sometimes, especially in Finder. If you navigated to the very deep directory, it seems like no way to go back with your normal mouse that can’t usually scroll left and right. So it’s easy to fix this:

System Preferences -> General -> Show scroll bars -> Always

Now, you have your scrollbar back and it’s easy to go back to top directory easily.

Change Sidebar Icon Size to Small

This is pretty minor thing but also kind of weird comparing to the old version. You may notice that the sidebar font size seems like way bigger than Snow Leopard. On my Macbook Pro 15″, it looks just strange. Changing it back is easy:

System Preference -> General -> Sidebar Icon Size -> Small

Disable Repen Windows When Logging Back In

This is another new feature that I don’t really like that much. It sounds like a good idea from the first glance. However, it slows down my startup significantly and I don’t feel that it’s very useful for me. Especially I have to uncheck it every single time when restarting. Here is a hack that could do the trick for now. I really hope Apple will fix this problem in the next release.

Here is how you can disable it:

sudo defaults write com.apple.loginwindow TALLogoutSavesState -bool false
sudo chmod a-w ~/Library/Preferences/com.apple.loginwindow.plist
sudo chown root ~/Library/Preferences/com.apple.loginwindow.plist

The first command will change the setting, but Lion will tick the checkbox back again magically. So you need this nasty hack to change the permission of file com.apple.loginwindow.plist.

Forcing to Integrated Graphic Card Only

For Macbook Pro 15″ and 17″ that has two graphic cards, using the powerful graphic card will drain your battery super fast. Especially you can’t switch Graphic card mode anymore with Lion… On older system, it can be done in Energy Saver with login/logout, but in Lion’s Energy Saver, the option is changed to this:

What that means? If you don’t tick the checkbox, the powerful graphic card will be always used. If you tick it, the system will do it for you automatically. When it will switch? You will never know…

Fortunately, Cody Krieger has made a neat tool to let you have the full control of the graphic card. You can find it here.

Where Is My GCC? You have to Install It From Xcode

My favourite part of the OS X is how easy to install all development tools I need. It’s simply bundled in one mpkg package, and that’s it. One package installed,  you have everything. With Lion, XCode doesn’t come with all old command lines tools anymore. It’s still simple to install only if you know where to find it. Now, it’s two steps. First install XCode from App Store. Then open your XCode and go to Preferences. There should be a tab like this:

Choose to install command line tools. That’s it.

One last thing, if you are like me that rely on using terminal everyday. iTerm 2 is definitely what you should use instead of the default Terminal.app. It provides way more useful functionalities. It’s awesome.

How I Start?

This is the very beginning of my new journey, so let’s answer some basic questions for myself.

Why I choose to start to blog after so many years?

That’s right, like most guys, I am used to read all other people’s blog to learn new idea, get inspired and be illuminated. It is simply amazing to just see how much I learned through years. It’s more like a daily job to do right now (I know it’s also distraction sometimes, especially in work). Why not to share my personal stories as well?

I guess the answer is quite simple, laziness. No matter how brilliant your idea is, the only thing that prevents you to do it is yourself. We always have excuses, always. GTD is great tool, but if you can’t force yourself to start clean up your list, it’s still only a list.

So I started this blog to fight with myself, to remind myself not to be lazy, keep moving.

The website is ugly, How it’s done?

Yes, I agree. I am not professional website developer. I did hack PHP several years ago and actually it’s my first project in real world company. Quite good experience… This is only a good starting. I simply register a domain name, and install WordPress. This is done by modifying one of the free theme, ToolBox.

I am a believer of simplicity. So I removed most of the menus and useless elements from the site. Also, I like the menu bar on the left side. (my dock is on the left as well.) So here what I have after a night of hack… Well, it’s a start no matter what.