2

I like to think I write good maintainable Java code, using best practices, design patterns and try and get good test coverage with unit tests.

Recently whilst looking for a job, I came across a couple of job adverts that have references to "scalable" code.

So, my question is, what is considered to be "scalable" code?

8

As Robert mentioned in a comment, what they mean is that the software performs well under increasing volumes of load.

Any programming language has potential for code that performs or scales well and code that performs or scales poorly.

However, Java is an interesting language to be picky about in regards to scaling perhaps because of its popularity and low barrier-to-entry.

I see two reasons to be concerned about developers who claim expertise in Java but make poorly performing or poorly scaling software:

  • Commonly taught - every IT, SE and CS curriculum that I have seen teaches Java first. At least in the US, it's the de facto programming 101 language. Not a bad idea since it teaches the basics of control flow such as loops, functions, arrays, I/O etc. and allows for a "warming" into OOP.
  • It is popular and heavily marketed.

One of the dangers of garbage collected languages is that you do not need to understand how a computer works to make software with it. You can even make software that performs fairly well without understanding memory management, CPU registers, GC algorithms, etc. these days. However, if you want the software to scale, you need some understanding of these concepts (not necessarily an expert however).

For example, you write code that selects a bunch of data from a database table and then load it into an ArrayList in Java. You try it in development and it works great. Try it in QA, it works great. Run it in production where the table has 2 million rows instead of the 10 rows from development and 2,000 users are selecting from it at the same time, suddenly your database CPU spikes up and your app servers run low on memory. How would you handle this?

Not the answer you're looking for? Browse other questions tagged or ask your own question.