Coding Living

I survived a hacker attack!

I was attacked by hacker last week and I survived!

So good to be alive!


java code
Hacking codes

Start a new language

During my engineer career I’ve been learned kinds of programming languages, including C language, Java, PHP, JavaScript, jQuery, M68K Assembly, Visual Basic and so on. That means I gotta start a new thing from a scratch very often. So I develop a ‘system’ so that I can feel comfortable to start a brand new area.

The system includes 3 items: a whole picture, the common point, and a consultant !

start a new language
Programming TextBooks

a whole picture

Less unknown, less panic!

When I’m going to visit a new place, I check Google Map and even street view so that I can have a whole picture of the place. Doing that always makes me comfortable before my trip.

When I start a new language, I like to Google it and check Wiki first, and to study the introduction, overview and even the history of it. Doing that makes me comfortable and let me step forward without panic.

the common point

As the article I mentioned about program languages, I talked about the Logic of a language is what it truly matters.

If you’re good at one language, it’ll be easy to find the common point and utilize the thing you’ve already known to bring you to a new world sooner.

a consultant

Once you get a whole picture and find the common, you gotta go further and deeper. You start to encounter kinds of problems. A consultant here is NOT a real person. It’s a textbook, we call ‘A Bible’, means big, fat textbook that includes everything, every details so that you can get the information you want from it to solve the problem.

In a word, I usually buy 2 books in different sizes in the beginning. One is a small book with basic concepts, overviews and examples, which provides me with a whole picture, and release my anxiety. The other one is a big book which includes the information as much detailed as it can, so that I can check it as a consultant to solve the complicated problems I encounter.

Please Enjoy the ‘system’! Good Luck !

Coding Drumming Living

A long-term hobby

Life is full of frustrations, especially in learning new things. We feel frustrated because we care. We care because we want to be better.

Teach yourself
Teach yourself

SET your pace

When I teach myself, even my students, I like to focus on whether I’m moving forward today, no matter how big the step I made. We have a job for living, but having a hobby is for relaxing. Set your own pace, no rush!

Shoulder the weight

Another thing is also necessary to make you better.


Nobody loves pressure. Pressure is like medicine. It’s definitely a good treatment once you don’s abuse it.

Pressure can definitely make us concentrate on what we’re doing once you set an appropriate goal. To convey the pressure that you can handle to yourself and ensure you can make it later. Once you make it, you get the energy to keep moving again.

Size doesn’t matter!

Keep doing something for a long time is not that easy, even doing the things you love.

Set a goal, shoulder some weight, keep moving forward. Don’t care about the SIZE of the step you made. Even it’s a tiny one, it’s YOU MADE IT. You should be proud of yourself!


Programming Language

How many is enough?

I read an article about the ranking of the popular programming languages. It occurs to me that the ranking made me panic when I was a student. I was thinking if I gotta learn the more kinds of programming language, the better job I can get. But , how many is enough?

It’s about HOW, not WHAT!

As the way we use language in our life to communicate with people. Programming Language plays a role of communication between computer and engineer, software and hardware, device and device.

Precise expression matters!

If we want to make a restaurant reservation on the phone, speaking local language is much easier to make it. But if we got lost in a foreign country and try to ask for help, body language will be much useful!

programming languages
programming languages

There’s no ‘the MOST’ powerful programming language. It’s all about the product you or your company is going to develop. If the product is a web application provides with web service, Python, JavaScript and PHP could be ‘the Most’ powerful languages to you. If your company is an IC-Design house, Verilog should be the one.

Logic matters!

How many is enough? In my point of view, ONE is enough. If you are very good at ONE language, you’re definitely good at the logic of thinking and ‘speaking’ in the language. The logic is a fundamental to manipulate a language to do everything you want. Once you can ‘speak’ naturally in the language, you will be comfortable to learn another one.

In conclusion, If you want to speak like a native speaker, you gotta think like a native speaker first. Because the logic matters.

Coding Drumming Living

4 Stages to Greatness

I watched a Drumeo lesson features Dom Famularo. He mentioned 4 stages to be a great drummer.

The 4 stages are as below:

  1. Unconscious incompetent
  2. Conscious incompetent
  3. Conscious competent
  4. Unconscious competent

After watching the video, I was wondering which stage I am. Stage 1?, Stage3?. The interesting thing is that we may be on 4 stages at the same time, but on 4 different areas. I am a software engineer, programming is what I’m good at. So I could be on stage 3 or 4. As an electric bass player, I’m still a beginner , so I could be on stage 1 or 2.

It doesn’t matter which stage you are. The point is how to be CONSCIOUS, to be aware of things, to sense things when you learn.

Be a teacher and teach yourself!

Purchase an iPhone stand and start videotaping yourself. Check the video for thousand times as a Grammy judge, and criticize you in your play, including your gestures, body motion, balance, timing, dynamic, energy …etc. That will develop your sensibility.

You can also show the video to your friends, your teacher or band member, and ask for the TRUTH! The truth is always cruel, but it’s the only way to pull you out of the stage 1 (Unconscious incompetent). That will provide you with different point of views so that you can be a better teacher to teach yourself next time.

Try to be a great teacher, and teach you to be great!


HEX Code

Hex is abbreviated from Hexadecimal. It’s widely used by programmers and computer system engineers. To laypeople, Hex code is considered as an untouchable issue that is as much complicated as Quantum Mechanics.

In fact, Hex code already has a very popular and practical application in our life for many years.


You definitely used a similar function by your phone, computer or other electronic device. The color you picked is represented by 3 individual 2-digit Hex codes for the setting value of RGB ( abbreviated from Red, Green and Blue).

Hex is simply a new way to count!

Don’t be scared! It’s simply a new way to count.

If you can count 1 to 10, you definitely can count 1 to 16. The concept of Hex code is to collect and group things by 16. We gotta use A, B, C, D, E and F instead of 10, 11, 12, 13, 14 and 15, because a digit can only be represented by a character.

Try to count 1 to 16 by HEX way, it would like: 
1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F and 10(a carry here)

Notice that there's a carry when we count to 16. 
So the number becomes 2 digits to 10.

11 is NOT Eleven

Let's count 1 to 17 by Hex way this time, it would like:
1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F and 10(a carry here), 11

There’s still one thing that I haven’t told you. ‘0x’ is a mark MUST be put in front of a number to represent Hex code. As the example, you have ONE group (0x1, 0x2, 0x3, ….0xD, 0xE, 0xF and 0x10) with one left (0x11), so we can say you totally count 0x11. That’s 16 + 1 = 17.

Dose it make sense to you now ?

Let’s take a challenge to count more, like 44.

It would like:
1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10 
(First group is done),  

11, 12, 13, 14, 15, 16 ,17, 18, 19, 1A, 1B, 1C, 1D, 1E, 1F, 20
(Now we have 2 groups, it's 16+16=32) 

21, 22, 23, 24, 25, 26, 27, 28, 29, 2A, 2B, 2C
(We finally count to 44, it's 16+16+12 = 44). 

As above, we know 44 is 0x2C in Hex.

If you are interested in this topic, please take a look at Wikipedia. There’s much detailed information there!

Try more counting, and enjoy the new way to count!


Program Variable

Variables are drum BAGs!

Drum bag is important to drummers keep their drums safe, especially during a gig tour. But if you have a 22″ bass drum, there’ll be no way to fit in a 18″ drum bag! On other hand, if we put all 10″ and 12″ Toms into 20″ or 22″ bags which are original for bass drum, that does not only waste money but also your room space.

Drum bags
Variables are drum bags

time flies!

Decades ago, the hardware of computer, such as CPU, RAM, Hard Disc, Main board …etc., is extremely high cost. The constraint of hardware also extremely affected the development of software.

At the time, as a software engineer we had to consider not only the run-time efficient of programs but the compiled size of codes. So, choosing suitable size of variables during programming was a fundamental task.

Now a days, ‘Giga’ is already the basic unit of memory space and the speed of CPU frequency. For this reason, software engineers are more comfortable to deal with the annoying stuff, like the efficient, the size and the scalability. But they probably omit the details of programming at the same time.

Be aware of the size

Even the project of Moon-Travel is going to be reality in the near future, I still believe that being aware of the size of variables is basic and a good habit to software developer.

Devil is in the detail. In my engineer career, I encountered a lot of strange and wired bugs. Most of the bugs were the causes of overlooking the details. If we can spend time in studying something we don’t know, not skip it and pretend it’s not important, we’ll obtain something in return in the future. All efforts will pay off!