Arrays - Why O(1) time access?

I was mock interviewing a friend of mine and a question came up: why can you access an element in an array in O(1) time? To answer the question, let’s step back and see how RAM works in computers.

Written on August 1, 2020
Read More

Managing BigQuery UDFs with Terraform

Terraform is a tool for building, changing and versioning infrastructure resources. Almost any type of infrastructure can be managed as a resource in Terraform. Terraform providers are responsible for understanding API interactions with your infrastructure. There is an extensive list of available providers that cover the most common infrastructure resources, and Google Cloud Platform Provider is one of them. There are cases however, when providers do not implement an API for managing specific resources for a given infrastructure. User-Defined Functions in BigQuery is one of the resources which is currently not supported by a GCP provider (Versions <= 3.0)

Written on February 7, 2020
Read More

Experiment driven sbt

sbt is a de facto build tool for Scala. It can also be used for Java or for cross-platform native builds. sbt uses only few concepts to support its build definitions - roughly speaking, it is mainly about tasks, settings and configurations.

Written on November 28, 2017
Read More

Docker unwrapped

Docker comes with great documentation. Sometimes though, with different components and tools, it gets less easy to make sense out of everything. I’ve tried to put together the most important parts.

Written on April 4, 2017
Read More

Recursive Procedure vs Process

Recursion is common to computer science and mathematics. We can see Recursion Theory also used in Logic or linguistics. While coding in Java, I’ve not been using recursion heavily, however while practicing FP languages recursion became my best friend.

Written on February 28, 2017
Read More

My Resolutions for 2017

I won’t be the first one to tell that 2016 was a hard year. Looking back though, I could accomplish almost everything I planned for the year. Without getting sentimental, I can think of the following wrap-up ;)

Written on December 31, 2016
Read More

The journey continues

I’ve started my journey in algorithms and data structures more or less three months ago. I am not there, where I wish I’d be, however I am satisfied with the process. My goal is to learn, what I knew before and what I know is incomparable, this keep me going.

Written on December 3, 2016
Read More

String deduplication in Java

It’s not a secret that String objects in Java consume a lot of memory (just a reminder that each character eats two bytes, yay!). We use strings everywhere, which is kind of natural, sometimes (and often) there are also duplicate strings all over the application. In java several distinct instances of identical strings will be created. This is not ideal and definitely not what we want.

Written on November 7, 2016
Read More

Working full time while studying

I started school when I was 6 years old, in 1996. I saw the very first computer in my life in 2002. I’ve managed to buy myself my own Pentium 3 in 2004, at the age of 14. In fact, I was one of the luckies back then in Armenia who had a personal computer. The internet connection with 100MB monthly limit gave me a chance to know about the amazing world of computer science, in fact that was the time I decided to become a programmer.

Written on October 16, 2016
Read More

The Java Shell

JDK9 is on its way. Meanwhile, the early access version is available for playing around and experimenting.

Written on October 9, 2016
Read More

Never accept a counter-offer

I guess we all have experienced a job change at least once. There might be different reasons to change the job; new opportunities, better salary, problems with coworkers and so on. I call it a trigger of a change. When it triggers, it’s hard to stop and there are two possible scenarios afterwards

Written on October 2, 2016
Read More

Choosing an HTTP Status made easy.

One of the important design decisions while building a RESTful API is to decide which HTTP Status to return. In theory, this should be easy, because there is a clear specification which describes each and every HTTP Status, so all is needed is to go through the protocol and find a status appropriate for the specific resource.

Written on September 25, 2016
Read More

Class loading in Java. Takeaways.

It is easy to find an answer to any kind of a question by searching it in web. I’m a strong believer that a good programmer tries to understand and analyze the problem, read documentation first before searching for an easy answer.

Written on September 14, 2016
Read More

red-green-refactor development style

TDD is not only a software development process, it’s a mindset and development style. I’ve been practising TDD techniques for a while, but only recently started to follow red-green-refactor approach, which has been described by James Shore more than 10 years ago and is more than actual till now.

Written on September 8, 2016
Read More

Natural testing with Kotlin

There are dozens of programming languages that are used to build a software which runs on JVM. Languages like Groovy, Scala and Clojure are the well known already and now the new cool kid Kotlin brings some more disruption into the Java world.

Written on August 31, 2016
Read More