Nov 12, 2016 · 2 minute read · Comments
elm
As a newcomer to Elm, I’d like to share a list of resources I’ve found helpful while learning this interesting programming langauge:
Official Elm guide - introduction to Elm, detailed, strongly recommended for beginners to understand basics of Elm language, explanation of terms and function
Official example applications- very helpful from the beginning too, interactive examples show how the code works in preview, possibility to change the code and see changes on the page
Read On →
We're looking for developers to help us save energy
If you're interested in what we do and you would like to help us save energy, drop us a line at jobs@enectiva.cz.
Oct 22, 2016 · 1 minute read · Comments
git
One can explore git and discover something new every day. One of my recent discoveries is the --merged option of git branch. As the name suggests, it allows you to list all branches which have been merged as of a specified commit. Conveniently, it defaults to the current commit, so by running:
git branch --merged you can list all the branches which have already been merged up to the current commit.
Read On →
Oct 2, 2016 · 3 minute read · Comments
golang
Nearly every piece of software is composed of multiple components which work together to provide a set of functions. The division into components has many benefits, one of which is smaller scope of tests, but to fully leverage it we need to be able to isolate the components in the test environment. Every programming language provides different tools to accomplish this isolation.
Let’s look at an example in Go. One of our programs includes a registry of devices represented by a serial number.
Read On →
Sep 4, 2016 · 2 minute read · Comments
ruby
Recently, we switched communication between our internal backend services to use SSL/TLS. In cases when have Go talking to Go the switch from HTTP to HTTPS proved very simple.
There are, however, instances where Go talks with Ruby. After the success with Go, we prepared everything, set up parallel HTTP and HTTPS endpoints to ease the transition and limit the downtime.
Everything went well until we switched Ruby code to use the HTTPS endpoint.
Read On →
Aug 5, 2016 · 3 minute read · Comments
ruby-on-rails
Since Rails 5 was released a month ago, we took some time to upgrade to Rails 4.1.x to not be so far behind.
Upgrading Rails is always a pain because it is connected to almost every bit of the application and you never know what will happen. Changes between 4.0.x and 4.1.x are documented and make for a good starting point, although, not everything is covered and there were three significant surprises.
Read On →
Jul 25, 2016 · 4 minute read · Comments
sql
As the amount of data Enectiva.cz handles grows, we need to find better ways to manage it. After auditing our database, we discovered a pattern which allowed us to reduce the amount of data stored by tens of percent.
In order to take advantage of these potential savings, we had to change SQL queries used to access the data. This entailed a set of performance tests for various prototypical scenarios. One such scenario is: when was the consumption data last updated?
Read On →
Jul 14, 2016 · 3 minute read · Comments
postgres
Postgres employs various types of locks to control shared access to data. Most often, Postgres takes care of using the correct lock on its own, but the API is public and application developers can leverage them as well.
There is, however, one type of locks not used by Postgres itself: advisory locks. They are intended only for applications and Postgres does not enforce their use — it only provides functions to manipulate them and automatically cleans them up at the end of the session.
Read On →
Jun 26, 2016 · 3 minute read · Comments
golang
Recently, I watched all the recorded talks from last year’s (2015) dotGo conference as a way to learn something new about the language and where it is heading. You can watch 17 different talks on many aspects of the language, but there are two talks which stand out.
The first one is Peter Bourgon’s talk about microservices and the tooling available for building them. Go is a backend language and often gets applied to the behind-the-scene processing which overlaps with a possible domain of microservices.
Read On →
Jun 19, 2016 · 2 minute read · Comments
rubytesting
We’ve been using RSpec in testing of Enectiva since the beginning because of hwo expressive it is and how it helps us to structure test cases.
One of the features which makes the later possible are shared contexts and shared examples. We use them quite often and, admittedly, there’re test files which take it to the extreme. However, there are valid use cases for both shared context and shared examples and it’s worth understanding them.
Read On →
May 15, 2016 · 6 minute read · Comments
postgres
Enectiva deals with non-trivial amounts of data on daily basis. That’s not uncommon in any way, in the grand scheme of things it’s still nothing. However, it’s in the region where you need to think about the data and can’t just slap it into the database without performance suffering.
We are not Postgres experts but we take time and effort to learn about it so that we can leverage it efficient.
Read On →