Friday, 7 March 2014

GWT tutorials

I am writing a series of short tutorials about working with GWT using maven. Progression is slow but I hope every week there will be something new coming up.

Here are what I have so far


source codes are available from my github repo, https://github.com/verydapeng/gwt-tutorials

feel free to comment

Monday, 3 March 2014

Java Immutable object and practical approach to learn Java

Let start with Java immutable object first. I will share my story on Immutable Object and thoughts on practical approach to learn Java.

Java Immutable Object

This is one of the first thing that you will know if you choose to learn Java. Immutable object is an object that cannot be changed once created in Java. A sample immutable class look like this:

public final class ImmutableObject {
 
 private final String value;

 public String getValue() {
  return value;
 }

 public ImmutableObject(String value) {
  this.value = value;
 }

}

There is nothing special about the above class except that once an object is created, it is read-only. There are a lot of Java classes that are immutable; for example String class, all of the primitive wrapper classes like Integer, Byte, Float, Double,...

How did I learn about Immutable Object?

Immutable Object is not taught in school. I only noticed it when I learn how StringBuffer is used to concatenate String. Here is one example:

public static String ugly(String foo, String bar) {
     StringBuffer buffer = new StringBuffer();
     buffer.append (foo);
     buffer.append (" ");
     buffer.append (bar);
     return buffer.toString();
}

This example is very simple and there is nothing fancy of technical aspect here. However, I want to share about my personal experience when I learnt this stuff. I kept wondering why they need to create StringBuffer, why don't simply do it like

public static String ugly(String foo, String bar) {
     return foo.append(" ").append(bar);
}

It will be much shorter and more convenient to work with String this way. The answer lies in Immutable Class. Because String is immutable, it cannot be changed. That why they include StringBuffer as a convenient way for developers to work with String. Then I started to question why we need to create Immutable class. After thinking about the rationale behind that decision for a while, I came to conclusion that they want to protect the parameter objects that being passed to method.

Here is example:

     String foo = "foo"
     String bar = "bar"
     String combo = ugly(foo, bar);

If the Java creator allow me to change String object like I wish, I may accidentally modify the value of the String "foo". Somehow, Java creators do not want that to happen. Curious about the found out, I verified this thought by asking my friend, Google. I only figured out one of the 5 reasons why Java have immutable object.

1. First and foremost, String is used in many critical functions. One example is class loading mechanism. If String is immutable, hacker can alter class loading mechanism on JDK to load the unwanted class. This msy hamper the security of system. Java was designed with security as the most important goal and they cannot let that happen.

2. Some data structure in Java like Hashtable or HashMap can use object as key, they will not want the key to be modifiable.

3. Immutable is thread safe. As they cannot be changed, developers do not need to worry about thread safe issue.

4. They can cached hashed code for immutable object because it is assured that object will never be changed.

5. String pool. This is built-in mechanism of JVM to save memory when creating String object. If you declare

String a = "someText";
String b = "someText";

there will be only one object created in JVM and two pointers are pointing to the same object. They can not cache it this way if they are not sure that the object is immutable.

So, what can we learn from this?

After this story, we can have some conclusions here

1. My Java in the beginning day is really suck. If you start to learn Java, you will need to go through this stage too.

2. There is no evidence that the Java creators did not think thoroughly when they created data structures and we can improve our knowledge by learning how they did that.

3. Questioning about things and trying to figure out rationale behind is fun.

I would suggest all of learners of Java to be more pro-active in their pursue of knowledge. When you start questioning about why things are created that way and taking initiative to find out yourself, you will pick up knowledge pretty fast. It doesn't matter whether you are right or wrong, as long as you try to figure out an answer yourself, you will understand concepts faster.

Through many years of observation, I conclude that developer take responsibility for seeking knowledge themselves will end up more knowledgeable and confident in work.

http://www.myrkothum.com/the-meaning-of-the-finger-pointing-to-the-moon/

May be most readers already familiar with the story of Finger pointing to the Moon. You will need to find the moon yourself, I can only offer a finger in this blog (actually, I used all 10 fingers to type this post).



Sunday, 2 March 2014

What you need to know to become Java Developer

The title say it all. Becoming a Java developer means you need to know how to write code and perhaps a bit more than that. So, what exactly should a person know or learn to claim him/herself to be a Java developer? I will try to visualize the answers in this article.

Technical Skills that Java developers should know



How is the diagram above?

It looks daunting but it's true, this are the kind of knowledge that a Java Developer should know. To be honest, there are more nodes I wanted to add into this diagram if there is enough space. You just have to count the amount of Java books in the market to have an idea of the amount of knowledge required? This may be a reason enough to discourage most beginners.



However, the good news is that you do not need to learn this in one day or even one month. It takes a long time for any of us to get exposed to all of these technologies. Most of the senior developers I know get all of these concepts well only through years of working.

No one can really excel in all these topics but Java developers still need to have a certain level of understanding of these fundamentals/concepts to cope well with daily work.

How should we move on?

It depends on who you are.

If you are a job seeker, email me to request a soft copy of this diagram. A nice and colorful diagram may help to justify pay check, I guess.

If you are a solid Java developer, counter check and provide me feedback if you find the diagram missing ny points.

If you are beginner, put this into a "What to learn" check list and do re-visit us often as we will slowly prepare the materials for you to learn. Also, be active in seeking knowledge yourself. We would like to share all of these knowledge with you but we are only mortals and our time is limited. Kindly remember that no one can help you more than yourself. A bright future do need hard work.

Embrace your new journey with all excitement and enthusiast!




Saturday, 1 March 2014

Java as a career

Most of the articles published so far are for developers with strong foundation on Java. However, from the precious feedbacks we received, there are people with little or no industry experience that also want to pick up Java on their own and start programming career. This is very interesting and we truly believe that everyone can learn programming on our own.

To make this blog more useful for beginner, from today, we will start to write more articles introducing basic concept and skills of Java programming. We also want to share some thoughts on what factors define a success career in in this field.

Who should take Programming as a career

From my own experience, programming career is rewarding if and only if coding is fun. If you find coding boring in school time then better do not give it a try, and even if you try the chance of progressing far is very limited. I have seen some brilliant people lagging behind in this career as concepts and technologies getting obsoleted too fast. However, if look at the positive side, working on the same technologies and concepts over 30 years is boring to dead. So, judge your self and choose a career that make your life more interesting. You may want to live, not merely exist.



Programming is fun because you are solving problem, figuring out solutions and exploring new ideas all the time. It is even better that you do not need to compromise your living standard to pursue a meaningful life when become a developer. The key point for a successful career is to set the expectation right. If you allow yourself to be a mediocre programmer, life will be tough. So, don't be mediocre, it is not fun at all competing at the bottom of the market. Dream big and always aim to be the best of all. Life will reward your efforts.



How much effort it take to be good at Programming



It depend on the how much effort you put in to self-training and also the works that you are exposed to. Generally, it should not take more effort than getting a decent degree, and it is much more useful in life. The tricky part is there is no the end where you can collect a certificate, claim your self to be an awesome developer and take a rest. Choosing this career means endless loop of picking up new concept and learning new skills.

In personal experiences, from graduation time until now, my knowledge slowly improve, but I still have more things that I do not know than what I know. However, you do not need to know everything in the world to be good at your daily work. As long as you understand fundamentals well, technologies should not be too tough to pick up, when you need it.

How to make use of this blog

We will not try to teach basic Java or to explain any basic Java concept like Object Oriented Programming, Polymorphism, Garbage Collection... They are kind of things that being taught in school and we cannot do it any better. If you happen to be not graduated from an IT school, download an online Java course and pick it up on your own. In this blog, we only cover what cannot be learnt in school but essential on daily work of a developer.

We hope the content we share here will be useful and bring fun for experienced developers as well as beginners. We also strongly suggest beginners to pick up industry skills even before graduation. Having broad view of major technologies and concepts in industry may greatly boost your chance of landing a perfect job.

Friday, 28 February 2014

Welcome aboard, Lim Han and Da Peng

I am glad to inform that we have two new contributors joining this blog, Lim Han and Dapeng. This end my streak of solo posting for one month plus. This help to ease my loneliness and bring this blog to new height given the experiences and expertises they own.

Let give me a honour introducing them to all audiences.

Lim Han 

Lim Han is a senior Java developer with 10 year plus experience. He took Computer Engineering degree from NTU. He is one of the widest experiences developers that I have ever met in my career. The amount of jargons that Han use in his daily life may be greater than my English vocabulary. In term of personal characteristic, he is warm, friendly and have high passion on whatever thing he do. He cycle to office, handling huge amount of projects, refuse to go home if there is any challenge in work and treat us free coffee when he is in good mood. He like to share his stuffs and has started his personal blog long time back.

In term of technical skills, Han is an explorer. He worship Elon Musk and is a hard-core Linux user. He keep himself updated with technical news everyday and know about any concept or new technology even if it is still incubation. Han is famous for finding any chance to introduce new way of doing in our daily work and bring us endless joy of asking him to fix infrastructure. With his career full of experiments, not only in Java but also on infrastructure, dynamic language, big data, ... I hope he will bring us fresh view of what is going on in the world.

Liu Da Peng

Liu Dapeng graduated on same batch with me in NTU and even working on the same project once. This is very surprise, given the negligible amount of time we spent in school. He has never failed to impress me with his technical expertises and talent on problem solving and innovation. In term of characteristic, he like new ideas, talkative and hyper-extrovert. Dapeng has strong interest in NetBean, JavaEE 6+ and opposing whatever design I propose. 

Few years back, we joined a start-up company and have fun building a system from scratch, which finally have the best load test of the world.

http://www.networkworld.com/news/2011/112411-largest-ddos-attack-so-far-253462.html

That happened when someone worried that our system is not reliable enough and helped to hire an army of hackers to load test our system. The load test peaks at 100 Gbps with 250.000 infected computers joining the show. The load test happened 2 weeks after I left, kudos to Dapeng and the team to hold the line and fought well. Due to this achievement, I found no one better to share with us about security and scalability.

Let warmly welcome both of them!



Thursday, 27 February 2014

The Answers to The Questions

Tony invited me to answer these multitudes of questions he posed in an earlier blog post and so I humbly offered some of my personal thoughts to these questions.


Name 3 improvements/revolutions in Java world that you are most impressed with

In the Java world, revolutions are overstated given the amount of backward compatibility they have with previous versions. The people behind the Java standards ensure that changes are always incremental and deprecated methods can survive at least 2 major revisions before being taken out. There's a reasonable amount of confidence that code compiled in Java 1.4 can still work with the latest JVM. So, if I would want to name 3 improvements that I feel impacted the Java world most, these are the following improvements that would be up there amongst the most impactful improvement

1. The popularization of the concept of Inversion of Control (IOC)

While technically not just a Java concept, the popularisation of the concept of IoC brought forward in the Spring Framework provided an alternative to the J2EE framework that has been standardised by Sun Microsystems. The concept of assembling components during runtime provided a means for applications to be written in a structured and cogent manner while reducing the amount of coupling between them. Many concepts from Spring has since made their way into the official JEE framework (together with major technologies like Hibernate)

2. The introduction of generics and annotations in Java 5

If there's any revolution to the language, this probably is it. While I would not necessary say I was impressed by it, I must say that it changed the way Java was written and it provided quite a fair bit of joy to people who are writing code using annotations while simultaneously inducing tears to those who had to debug code with it.

3. Enter the Lambda

Java 8 is going to introduce the concept of the lambda, a construct that is familiar to fans of dynamic languages while Java developers live in total oblivion to its existence. Millions of lines have been expended trying to write a Swing GUI Event Listener using anonymous inner classes like this :


        btnPrint.addActionListener(new java.awt.event.ActionListener(){
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPrintActionPerformed(evt)
            }
        }

it's now gonna look like this :


        btnPrint.addActionListener(evt -> btnPrintActionPerformed(evt));

Happy Days!


Name 3 ideas or technology trends that you believe will be popular in future.

I'm not much of a star gazer but judging from the current technological trends and patterns, I believe the following will become key drivers (or continue to become key drivers) in the technology space.

1. Migration of information from traditional locally based systems to cloud-based platforms

This is probably a no-brainer but I believe that the cloud-based platforms are going to continue driving technological trends in the next few years. We have cloud-based services, storage, applications, build environments, test environments, development environments etc...

If you are not familiar with virtualization and its accompanying technologies, then I believe you are falling behind the curve. I can argue that knowledge of major cloud platforms like AWS is particularly crucial for IT professionals who are part of a highly agile and evolutionary organisation.

2. Predictive Data Analytics 

This is probably the biggest buzz word in the past 2 years. So what if machines are not probably going to surpass human intelligence anytime soon ala I, Robot? They are probably gonna be analysing and mining more data than ever in the history of mankind with improvements in technology and hardware. Any business that is able to predict the behaviour of human will have an edge over their competitors. Thus, any technology or techniques that aid in performing this kind of complex data analysis is going to be popular.

Think BigData storage technologies that can store zillion bytes of data. (pick your favourite Distributed File Systems and NoSql database servers)

Think technologies that can sift through those zillion bytes of data. (Hello Hadoop!)

Think advanced algorithms in A.I and Machine Learning

When combined together, these technologies are able to push food ads to you even before you realised you are hungry (ok.. that could be exaggerating a bit)

So in order to truly capture the zeitgeist of our age, as IT professionals, it is our duty to be conversant at least in some of these principles, if not an expert in them.

3. Restful Web Services and the Systems Integration of the World

Web systems will connect to each other in greater numbers and the language that they will speak to each other will probably be JSON. It is a language that is concise and lightweight compared to the verbose XML that was all the rage a decade ago. 

XML and the various incarnations it lives by has proven too complex and heavy for it to grow organically in an IT system. The mere mention of SOAP instills fear into the minds of many. Ditto for SOA systems .. the mind boggling array of implementation standards that have germinated from the XML seed has made it such a huge deterrent to implementation that it is unsurprising that the people who are really doing the development work and not theorizing about standards have gravitated towards JSON instead.

Together with the concept of Representational State Transfer architecture proposed by Roy Fielding in this paper , web services are talking to each other with greater ease due to the implementation of this concept built on top of a standard that is already well understood (HTTP)

The growing popularity of RESTFul APIs will make the web the gigantic interconnected system that it was originally planned to be.

Name 3 major issues that you would want to elaborate about IT in Singapore and/or Asia.


1. Career progression in a software career is how fast you can get out of it.

In Singapore, a successful software engineer/developer/<put your favourite title> is someone who managed to work his way "up" the career ladder so he doesn't touch any development but instead focus on "managing" people or analysing business needs. It's interesting how much management needs to be done for people who are sufficiently intelligent enough to be developing software. Truth be told, it's highly unlikely that Singapore's going to have a Mark Zuckerberg or Larry Page/Sergey Brin given the general disdain for even doing the dreary work known as coding. In order for software engineers to excel in Singapore/Asia, the same amount of recognition given to good engineers in the States should be accorded to software engineers here. Truth be told, there is still a demand for routine IT work that makes the systems in corporations all over the hum smoothly. However, there should be distinction between software engineers who have the know-how, the agility and the rapid learning curve to embrace change and build strategic software Vs the software maintainers in charge of ensuring corporate systems run smoothly. Think about software that will enable businesses to leapfrog ahead of their competitors vs your typical payroll/accounting/HR software. In fact, I would argue that a better use of resources would be to outsource all these software to 3rd party vendors who will make these their strategic software.

2. There is insufficiently exposure/vibrancy to emerging technologies due to the tepidness of the scene here.

In Singapore, the technology / startup scene is relatively cooler than many parts of the world right now. Despite the flourishing startup scene all over the world spearheaded by Internet-based enterprises, Singapore has been relatively cool in spawning up companies that is hitching on this Internet wave. There's a general perception that good software engineers are hard to find over here. There is probably some truth in it given that most people in the IT software industry generally give up doing practical development work a few years into their work so that they take on a "leadership/management/consulting/business analyst" role. The myth and perception is that people who remain in development are generally not moving in their career. With this kind of perception, it's nearly impossible to get good people with sufficient experience and well-honed skills to develop systems. This would eventually lead to a brain drain in development on the higher echelons of development/technical experience as good software engineers get siphoned into alternate roles that pay better.

If more than anything, it is this mindset that will eventually set us back against other countries who have people with decades of experience in development and technical work.

3. Innovation is stifled

In a culture where deviation from the norm is scoffed at and where attempts to trail blaze are put down as fast as you can say SOP, it's hard for any disciplines that require a combination of technical prowess and creativity to thrive. I don't think there's any other technical disciplines that could come as close as writing code to being an art form. Truly, code can be written beautifully. Any developer worth their salt can tell you the difference between well-written and ugly code.

The education process in Singapore/Asia also plays a part in inculcating such a mindset. Rote learning and memorization to game the education system has become an economically valuable skill as compared to investigative and exploratory learning. We are trained to get straight As in the shortest amount of time. Spending more time to understand what we've learnt has been secondary to cut-and-pasting code so that we get our goals. No innovation can be made by merely aping the work of others.

If software professionals are to really make meaningful progress in Singapore/Asia, we have to address these issues first.

If you need to share 3 lessons to your junior developers, what would you say?


1. Keep learning and exploring

It may sound cliched but in this industry, you simply cannot stop learning more. Read up on industry norms and practices. There are so many valuable online reading material that it will be inexcusable not to find new things to learn.

Read sites like InfoQ , Hacker News, Reddit, ArsTechnica etc.. for trends in technology and development.

There are also tons of resources that focus on teaching programming / development skills.

2. Wear a T-shirt persona to your self-development

A developer with a T-shirt character is an expert in a specific field e.g. Java/C#/Javascript etc development (depth of skill) while maintaining general expertise in a large number of fields .. (breadth of skills)

So a valuable member of a team is someone who can perform basic skills like setup computer OS/es , design simple pages using CSS/HTML while having expert level skills in Java development.

3. Attitude is paramount

I would argue that a developer with the right attitude would surpass a more intelligent developer in terms of contributions to a team. However, attitude is an abstract idea that makes it hard to distill into character qualities that are obtrusive.

If I could some sieve it into something more concrete, I would consider the right attitude to consist of the following:


  1. Perseverance in the face of obstacles or discomfort to achieve a greater goal. Someone who gives up easily on the first encounter with resistance would not make a good developer.
  2. Someone who considers his works with pride and would not settle for mediocrity.
  3. Someone who would take up challenges and not avoid them.
  4. Someone who is open to better ideas and not stick to dogma or their comfort zone.
  5. Someone who works to accomplish goals and not clock hours.

Name 3 common mistakes that developers tend to make.


1. Copy pasting code "that worked before"

This is subjective as there are many proponents of code-reuse but I would argue that this is not an example of code reuse. Rather, an example of code reuse would be refactoring code so that a method can be shared classes. Many times during the course of my career, I've seen people who copy and paste code from the Internet and pray that the same code work without truly understanding what it is trying to do. Most of the time, such an approach may work but when it doesn't, it's gonna be very trying to debug.

2. Inadequate understanding of multi-threaded concepts e.g. Thread Safety

I'm personally guilty of making this mistake as concurrency and thread safety is a tough concept to grasp and working on the level of having to ensure that your code is safe from deadlocks is not something that I do often. However, it's important even in day-to-day web development to understand how different threads working concurrently could severely impact how your code run if there are shared objects between these threads. So it is important not to make the same mistake I committed by having a thorough understanding of concurrency concepts if you are working in Java. For proponents of single threaded processing paradigms like Javascript or Node.js , I guess this isn't much of an issue.

3. Applying the wrong database solution to a problem.

Relational Databases have been around for years. People are definitely more comfortable writing SQL queries than tinkering with non-relational databases. However, as I've mentioned in an earlier response to technological trends, the era of BigData is upon us. Unfortunately, I've yet to be convinced how relational databases can function reliably and speedily with large database sizes. My team is now currently working with datasets that are not even in the terabyte range and we are experiencing timeout issues with MySQL when we perform queries (and that is with some degree of optimisation work we have done). Thus, I'm convinced that the out of the box MySQL definitely would not work and even with a powerful database server that has been tuned to death, I'm not sure if fitting a terabyte of data would even work practically even if the filesystem/table primary key size supports tables of that size. Thus, it's important to size up the use case for each problem that we have and select the most suitable database to address the problem. Martin Fowler's book seemed to have a reference to such a philosophy with the concept of Polyglot Persistence. I have not read this book yet but I'm definitely gonna be picking it up.

If you need to define you programming/design style in 3 points, what would you say?

I would say my development style would to be as concise as possible while maintaining a certain degree of flexibility. This might sound like a oxymoron given that flexibility is usually provided by increasing the amount of code but I believe that with simple rules of thumb e.g. code to interfaces (instead of concrete classes) and then relying on IoC or Dependency Injection for runtime assembly, you can create flexible code without the excess baggage.

I spend equal amounts of time developing in both dynamic languages (Python, Ruby, Javascript) as well as Java. I can't say I am partial to either as they all try to achieve the same goal, which is to provide a way to express code that form reliable, useful applications. Java provides a stable reliable way to navigate code within the IDE and with sufficient experience, one can be very productive when working with Java. However, the amount of concepts involved in mastering Java could be mind-boggling for a newbie.

On the other hand, dynamic languages like Python and Ruby can easily be picked up and they have a very natural language style of coding which expresses succintly what Java might take 3 times more code to express.

I'm also a believer in using the right language for the right problems. For example, right now I'm also looking at using a little R in my quest to master machine learning concepts. For interaction with hardware or low level devices, I think it's hard to avoid using C. I'm not as experienced in these fields but if I need to solve a problem in these domains, I will not hesitate to polish up my rusty C programming skills.

Wednesday, 26 February 2014

Self Interview

As many of us have been in the industry for quite a long time, I believe each individual has an interesting story to tell. I did share my thoughts and my colleagues did that as well. However, would it be more useful if we write down our story and let ideas spread out and discussed? It will benefit others and benefit us as well.

To begin, I will come up with some questions and volunteer myself to be the first to answer. Hold your breath, my friends, these questions come to you soon!

1. Name 3 improvements/revolutions in Java world that you are most impressed with.

2. Name 3 ideas or technology trends that you believe will be popular in future.

3. Name 3 major issues that you would want to elaborate about IT in Singapore and/or Asia.

4. If you need to share 3 lessons to your junior developers, what would you say?

5. Name 3 common mistakes that developers tend to make.

6. If you need to define you programming/design style in 3 points, what would you say?

Now, let I take my turn!

1. Name 3 improvements/revolutions in Java world that you are most impressed with.

My first candidate for this will be the resurrection of Reflection. If you happen to be one of the guy from the early day of J2EE that last until now, you must have gone through major self-upgrade plus re-thinking of practices and designs. The way we developed Enterprise applications in the past and now are simply too different. The differences do not simply come for syntax change, it is also come from change of concepts and philosophy. There was a time when I revisited a book of design patterns for J2EE and hardly found any of the popular design patterns in the past managed to stand the test of time. I would say the modern design concepts (IOC, AOP, POJO,...) would never be real without reflection.

The second candidate I like to mention is the Lean Software Development. Originally, I plan to put Agile Software Development but later decided to switch to Lean Software Development (LSD). Agile is cool but LSD is even more awesome, it is the cure of Java world from the mess we created earlier. Early days of Java witness bloated framework plus the factory style of Java development. Some smart people may already knew that this way will not work but to be able to convince the whole world to walk away from Water Fall is impressive. I still got chance to experience the Water Fall style in the beginning of my career and I am happy to confirm that LSD is much more natural and effective way of working. Developers have better chance to voice out and contribute toward final goal. I would never take a single chance to go back to old style working environment.

The last candidate that I would like to mention is Asynchronous Programming. I would like to include AJAX as well because it is more or less the same concept. Asynchronous allow us to do work concurrently and free user from waiting for background process. This idea shape up most of the improvements on client side and also help to boost performance on server side. I bet that it will be much more popular in the future because of multi-cores CPU.

2. Name 3 ideas or technology trends that you believe will be popular in future.

My first bet would be Data Analytic. You do not need to be a developer to know that Google give everything for free but steal your information. It is quite obvious that information is money. We, the one who build the system get first hand access to this money and let it slip through our finger almost all of the time. So, this need to be changed soon. The margin for software development is brutally compressed in the last few years, thanks to the competition from China and India. The greener pastures is the combination of data analytic with software development. With this model, developers do not only offer application, they also help customers to understand more about consumer behaviour and provide data to aid business decision.

My second bet is Artificial Intelligent. Same thinking as above. If you develop dumb application as others, then who is going to offer lowest price will get the contract. This price war will sooner or later put pressure to developers working life and make work life balance seem more like a fantasy. The only viable exist strategy is to stay in front and deliver what the rest of the world does not deliver. I find AI is one of those things. Again, you may notice that Google is already on the front line of this. Google Prediction API is solid and Google give you the ad that somehow relate to your online activity. Definitely, there is no one sitting there to monitor you but from the data collected, Google application tweak itself to fit you better. Sooner or later, people will adopt this idea and you will find yourself being spied on all the time.

The last bet is the popularity of UX Design (User Experience). I am impressed with the UX Designer that working together with me. The projects meetings are in Asia and Euro but they fly her there to join meetings. The way UX Designer analyse consumer, creating persona and manage to produce that design that fit each persona well is amazing. That make what they teach me in Information Architect course seem suck. Contradict to my original thoughts, it is not that bad to have duplication of data in your interface. Consumers don't care; so, developers should not care as well. However, any saving of mouse click for potential users do count and increase the chance of user come back to your site.

3. Name 3 major issues that you would want to elaborate about IT in Singapore and/or Asia.

What I feel upset about IT industry in Singapore/Asia is that our mindset are locked. Software house is still treated as a factory that produce code instead of TVs or cars. Developers are white collar worker that suppose to follow instructions and produce products. Agile is rooted but it grow here much slower than other parts of the world. It is proven that the old style of coding do not work. What have we learnt from Facebook, Twitter, WhatApp, Google,...? In this industry, the winner is the innovators not the hard-working people. Innovators work hard but working hard does not produce innovation. OT do more harm than good in the long run as it suck out the happiness in developers and unhappy people are less innovative.

Another concern is the way we think about management here is different from what I saw in Western world. From what I have seen, they treat management as one profession and one kind of boring task that someone need to take to let the developers focus on innovating. It have nothing to do with hierarchy or corporate ladder. It may be surprise at first but it seem more naturally this way. Project Management is the combination of resource planning, organizing meeting and none of it need a hierarchy to work. Giving manager more than what he need to do task is redundant and less efficient. The better way is the self-managing team as developers are educated and goal-oriented people.

The last concern of mine is the standard of developer in the market is too low. I got a feeling that any one can pick up a book like "Learning Java in 7 days" and step into labour market. This make interviewing very tedious and it is a hard work training new staff.

4. If you need to share 3 lessons to your junior developers, what would you say?

So, to every person who choose Java as career, I would emphasizing on understanding fundamental. To be honest, this is not what I observed people like to do but this only make it more important. Following instruction only make you a follower but understanding fundamental give you confident to make changes when needed and this is what we really lack here in Asia.

Another advise I would give is to take any chance to be creative on your daily work. If you do not have fun while working, office hours is long and tired. Unless you are super hero that devote life to make business better, finding a balance is crucial in long term. And remember what I say earlier, innovation make people happy and happy people innovate better.

The last thing I would say that presentation skill paid off. Do not think that communicating with computer is enough. Even if you have good ideas, if you cannot manage to let other people feel the greatness of your idea, it may not have a chance to be tried on. Moreover, effective team require effective communication. I do pairing everyday and I would prefer to pair with extrovert over introvert people.

5. Name 3 common mistakes that developers tend to make.

My first vote for this is Thread Safe. This is one of the thing highlighted in any Java course but I keep seeing people making this mistake. May be no one represent it to them like StringBuffer is threadsafe and StringBuilder is not.

The next vote is for scalability. I often see people writing method like getAll() instead of get(from, to). The problem that you do not know how much data you will have in DB in the future. Therefore, this kind of code is like a time bomb that willing to explode in the future.

The last mistake I would vote for is the trend of over-use of Ajax. Ajax do shine but only when you use it with a proper amount. Ajax to maximum should not be the way to go. I would recommend the resurrection of Facade pattern in client-server communication. The code is a bit hard to write but if you look at debug console in your browser, the effort is paid off.


6. If you need to define you programming/design style in 3 points, what would you say?



Look at the picture above, this is my illustration of DDD (Domain Driven Design). There was one time, I was tasked by my boss to build a system that can be extensible to serve mobile, serve web or any other protocols in the worlds. To do that, I build the core with POJO and nothing else. I would call it my PRECIOUS.  I would let the MVC framework or whatever things I add on top of this core do the translation so that the world can communicate with my Precious.

Another thing that I like to organize packages by layer rather than business logic. Simply speaking, service sit next to service and DAO sit next to DAO. It go against one of the guideline I read that all class in one package need to be related. However, organizing package this way make my AOP simpler to write.

People complains that I like to rewrite code. I would defend myself that I like to fix logic bug. I count inefficient or not so natural code as logic bug. Handling with logic bug reduce my efficiency and cause bad mood, so I will always try to eliminate whenever I see it.

I like static type language and like to make the fullest use of IDE. People say dynamic language cool and help to speed up the learning curve. I personally do not need this. I already gone through 10 years of coding and have plenty of samples to clone. I will not need longer time than a ROR developer to start new webapp. Moreover, most of my applications are heavy weight-lifting category and this is where static type language shine.

Last words, I hate long code, if got time, I will try my best to shorten it.