Last 2 months I spend looking for a job.
My job position expectations were:
- Java Developer
- Full Stack Developer
- Team Lead Developer
During my search I visited some companies and had some interviews.
I would like to share with you my experience and the freshest interview questions that companies ask developers like me TODAY.
Feel free to put your interview questions in the comments below!
So here is the list…
Senior Java interview questions
- why java is the fastest platform in the world? what makes it so fast?
- database denormalization techniques
- sharding, picking a shard key, hash-based or territorial key, UUID as key generator
- why split java memory into 3 parts (eden, survival and old gen)? what is the benefit, why not using only 1 part
- why primitives in java? there are autoboxing alternatives, what is the benefit of primitives?
- how to write durable, fault-tolerant server on java? which protocol to use? reasons to use / not to use RMI?
- what is the benefit of using column databases? give an example where column database like HBase or ClickHouse by Yandex would be a good fit
- is there any graph database currently available for production usage? what graph database is good for?
- how you may “touch” or look at actual object (in bytes) located in the heap using java? is there a way to store your memory outside heap?
- if you would be asked to create event-based system like an airport dispatcher, what criteria would you use to pick a good framework / solution? what would be the most important / focused thing in your architecture?
- why some developers say that pull-based event systems are better than push-based? what is your opinion?
- why RISC consumes more RAM but is faster than CISC?
- what are the bean scopes in Spring you know?
- how to create thread-safe singleton in Java if you would need one? (best answer is inner class)
- what data structure better suits to find 5 first max / min elements in 1_000_000_000 elements? (initially unsorted)
- complete sequence:
3 12 27 ? 75(48)
- complete sequence:
1 2 6 ? 1806(42)
- deep analysis of
LinkedListcomparison (including CPU cache behavior)
- explain how
display: flexworks, how width is calculated?
- what is event-delegation, what problem it solves?
- what DOM-optimisation techniques you know, what are the most important ones?
- how to organize CSS classes in a project, what do you think is the best way to write CSS rules?
System design questions
- Think of URL-shortener service arhitecture: how would you shorten URL’s? where will you store URL associations? how much time would you hold bindings? how would you treat same same URL’s / hashes?
- Tell about stratagies to test code. What unit / integration tests are good for? How would you test code in a startup project where everything may change very quickly?
- What is fail fast / fail safe systems? Cons and pros of each. Example of fail-fast in java. Which one do you prefer?
Many companies asked to do a test task before the interview or sometimes after the F2F talk. Here are some of the test tasks I was asked to do
- Write a reusable utility that will provide synchronization mechanism similar to low-level DB locking. It will be used by entity repository components like
repository. Utility should prevent contradicting changes on same entities to overlap, for example thread should not be able to
Item1is already updating by other thread. It should be possible to
GETduring update – in this case the previous (not-updated) version of
Item1should be returned (like using
- Write a RESTful API for some
Entity(not naming the real name and it doesn’t matter). You should implement
DELETE /entity. Also there are some number of validation rules for
PUT. Please provide your task in a form of github repository and please describe steps on how to install and run your app.
(if you dont know how to write cool and nice RESTful API – check out my tutorial part 1 and others!)
- Given a websocket
stocks trading serverwrite a trading bot that will listen to
priceupdates on this server and will
sellproducts based on some
upperprice limit; the bot should be as profficial as possible
- Write a smart contract on Etherium platform for real estate safe purchase. Consider all cases for both sides – physical client and property provider.
The complexity / challange of this task was to create a separate module that will work anywhere, independent on element position or whether it’s already in DOM or added later.
Some companies were very interested in my awareness of the buisness that they are doing. If was important to read about the industry and competitors. I was asked to tell about latest news in the industry, about the main problems and ideas to meed them.
Some of the questions were really funny 🙂
What is the integer code of
space symbol in ASCII ? (32)
Do you believe in Future? (as a code organization pattern)
Thanks for reading this, hope I gave you some insight on what’s going on in java/js interviews today!