Woman working with her laptop, analytic elements on screen
09.01.2024
Erika Vanhala

What insights can Matomo Analytics provide?

Matomo is an open-source tool that allows you to track and analyze the traffic on your website. It provides insights into various aspects of your website’s performance, such as the number of visitors, traffic sources, page views, and user behaviour.

Matomo analytics can tell you how many visitors your website has had during a specific time period and where these visitors are coming from. The data also reveals user behavior across different devices, locations, and even purchase transactions. Additionally, you can gain insights into how effectively different social media channels drive traffic to your website.

With Matomo analytics, you can uncover which pages your visitors are navigating to, how long they spend on each page, and their overall journey through your site. This valuable information enables you to enhance the user experience on your website, making it more appealing to your audience.

Data Analytics: The backbone of your online service’s development

With analytics, you’ll know where your site’s visitors come from, allowing you to tailor your marketing to those sources. Heatmap data visualises where on the page users exit and which links they click, providing concrete information on how to make your content more engaging. You can also create different versions of headlines, texts, or images, and determine the most effective version through A/B testing.

Tracking the effectiveness of marketing campaigns is easy, as you can see how many visitors your campaign brought to your website and how many of them performed the desired action, such as purchasing a product or subscribing to a newsletter.

Matomo’s reports are user-friendly, customisable to fit your needs, and informative even for internal stakeholders.

In my opinion, Matomo analytics is a powerful tool that provides valuable insights into your website’s traffic. It allows you to target your marketing accurately, enhance your website’s user experience, and make it more attractive to visitors, all while ensuring the protection of user privacy.

Matomo is a smart solution for organisations that want to safely track and optimise their website’s performance while owning their data.

Interested in how Matomo could fit into your website?

Let’s talk

  • This field is for validation purposes and should be left unchanged.
  • Fill in the form and we’ll get back to you shortly.

Author

Erika Vanhala

Project Manager
Woman and man looking at Matomo Analytics dashboard on laptop screen.
23.11.2023
Erika Vanhala

Data-responsible Matomo Analytics

Matomo is a web and site analytics tool particularly favored by public organisations, known for its GDPR-friendly features. Matomo Analytics provides a versatile and effective solution that helps understand the efficiency of your website and the behavior of visitors. In this blog post, we explore the benefits and possibilities of Matomo analytics.

Full data ownership and privacy

One of Matomo analytics’ greatest strengths is the complete ownership it offers over collected data. Unlike many other analytics solutions, Matomo does not share your data with third parties, nor does it utilise it for marketing purposes.

By using Matomo for site analytics, you communicate to your customers that you respect their right to privacy, without the concern of compatibility with international agreements. Matomo can be used either in a GDPR-compliant cloud service or installed entirely on your own servers.

Cookie-free tracking

With Matomo analytics, you can decide whether your website uses cookies. Opting for cookie-free tracking provides a better user experience by eliminating the need for visitors to click through cookie banners.

Cookie-free tracking relies on actual website visits, and visitors cannot be profiled as returning users. However, you can still track popular pages, user actions, and on-site purchases. Matomo avoids data sampling, collecting data equally from each visitor, ensuring reliable conclusions.

Customisable reports and user-friendly interface

Matomo includes all essential metrics for evaluating your website’s effectiveness. You can easily monitor page views, visitor origins, conversions such as form submissions, and much more. Reports can be visualised according to your needs. Reporting is intuitive, making data analysis effortless.

Open source and community support

As an open-source analytics solution, Matomo is freely available and customizable to suit your needs. Additionally, Matomo boasts a global, active community providing support and continuous solution development. You automatically receive all the latest updates.

Compliance with strict data laws

Matomo analytics is designed to adhere to the strictest privacy standards, including the EU’s GDPR, the U.S. HIPAA, and the UK’s PECR. Matomo enables legal data collection while respecting user privacy.

Matomo scales according to your needs, making it a smart choice for organizations with specific data processing requirements, such as the public sector, healthcare entities, banks, and insurance companies.

Interested in integrating Matomo into your solution? Contact us.

Author

Erika Vanhala

Project Manager
View for Mautic marketing report
19.10.2023

Mautic is an easy-to-use and efficient marketing automation system

Mautic is a versatile open-source marketing automation system that’s both user-friendly and scalable. With Mautic, you can streamline your marketing processes, deliver the right actions to the right audience at the right time, and effortlessly measure the impact of your efforts.

Mautic offers a comprehensive set of features designed to enhance your marketing efficiency, including:

Contact Management: Easily gather and manage contact information, such as email addresses, mailing addresses, and phone numbers.

Segmentation: Create custom contact segments based on criteria like interests or website behavior. This allows you to precisely target actions and adjust your strategy on the fly for improved marketing effectiveness.

Campaign Management: Create and manage multi-channel marketing campaigns, including emails and text messages, landing pages, and social media activities.

Automation: Automate tasks like email sends, landing page creation, and contact tracking, freeing up time and resources for other crucial tasks.

Lead Scoring: Assign numerical values to contact actions and profile data collected on your website. Leverage this data for lead nurturing and personalized campaigns, offering valuable insights for your sales team and internal stakeholders.

Reporting: Easily evaluate campaign effectiveness with customizable reports.

Four examples of using Mautic:

Building brand awareness: Craft personalized campaigns tailored to contacts at various stages of the buying journey, delivering engaging content that resonates.

Lead Generation: Utilize email forms and landing pages to collect registrations and engage interested contacts, generating leads and facilitating inquiries.

Sales Enablement: Design email campaigns to guide marketing leads into the sales funnel, ensuring alignment between marketing and sales objectives.

Enhanced Customer Service: Automate customer service processes, from managing customer data to responding to queries. Provide content that empowers customers to maximize their investment.

Mautic’s marketing automation system is a powerful tool for achieving your marketing objectives, adaptable to even the most demanding needs. Plus, it seamlessly integrates with Drupal solutions.

“Mautic is an excellent choice for clients who want to maintain control of their data, prefer open-source solutions, or work with a high volume of leads. The cost structure in a client-owned system is distinct from platforms like HubSpot,” says our CEO, Mikko Hämäläinen.


Would you like to learn more? Contact Mikko!

Author

Shopping carts, ostoskärryjä jonossa
24.10.2022


Drupal Commerce – when is it the best choice for an e-commerce platform?

The competition between different e-commerce platforms is getting more and more frantic, since digitalization is pushing companies to take their business over to the internet. Many a business developer may feel a bit overwhelmed when facing the multitude of choices being offered. How can you tell the best platform for your own business? What should be taken into account when making the choice?

It’s clear that you should use your business needs and goals as a starting point. What is the role of e-commerce for your company now and in the future? How much time and money can you invest in developing e-commerce? What about your customers? What are their expectations when they do business with you? How can those expectations be met and even exceeded? When you’ve done the groundwork, you will have a clear idea about your e-commerce concept, and mapping out suitable platforms gets considerably easier. 

For instance, traditional product retail probably benefits most out of highly productized solutions like Magento and hosted SaaS solutions like Shopify. For more marketing-driven commerce with an emphasis on content, the best choices are solutions based on a content management system like Drupal Commerce, WooCommerce for WordPress or Optimizely Commerce. Then there are the really heavy weight systems like the products from IBM, SAP and Oracle that are only used by very large companies in Finland.

Drupal Commerce

Since Druid has its roots in Drupal development, we have some input on Drupal Commerce in particular.

Drupal Commerce stands out with its customizability and strong features for content marketing and digital commerce. Explore the capabilities of Drupal Commerce.

Commerce can be seamlessly integrated into the Drupal content management system, enabling agile and unified management of both the online store and the website.

Drupal Commerce is used on over 80,000 websites.

The most customizable of them all

Drupal is often said to be capable of doing anything: everything is possible, and there’s a module for everything. This is true, as Drupal Commerce, being thoroughly modular, can be tailored to fit any business model.

Drupal Commerce is the most flexible e-commerce solution on the market, offering the necessary functionalities for all kinds of online sales without compromising freedom: the interface, system management tools, and design can be crafted exactly the way you want. The system is easy to use and doesn’t require technical expertise.

Sounds great, doesn’t it? Especially experienced e-vendors, who already know that ready-made solutions will not support their specific requirements, will most likely appreciate the flexibility Drupal has to offer. But customizability in and of itself doesn’t necessarily give value to a client, if the client doesn’t know what they want or need. That’s why we have drawn up some basic guidelines for you to compare with your company’s business development needs to see if Drupal is a match for you.

Why choose Drupal Commerce and when?

Drupal Commerce is worth considering as an e-commerce platform in the following cases:

You want a completely consistent user experience for both your webstore and your website.
Drupal Commerce is the only e-commerce platform that has been built on top of an enterprise level content management system. When you choose Drupal, you get a one-stop solution for a content management system and a webstore, which are seamlessly integrated together. You can manage the website and the webstore on a single system. For example, Magento doesn’t offer this: it uses partners for content management capabilities, and the domains for your webstore and your website are just linked together.

You want to emphasize content, not products.
When you’re not just about straightforward product sales but want to utilize marketing content to support sales, a content management system that includes an e-commerce system is a must. Drupal Commerce connects different sorts of content and products seamlessly together thanks to its versatile content marketing tools. Highly productized e-commerce solutions can’t manage this.

You want your webstore to be integratable with various background systems.
Drupal Commerce can integrate your webstore with virtually any system, for example marketing automation, product information management or customer relationship management systems.

Your company does digital commerce.
For instance, it could be a membership service or a subscription channel – any digital product. Compared to its competitors, Drupal Commerce offers more advanced tools to meet these needs, for example when it comes to managing licenses or files.

You have a large webstore and your budget nears six figures.
Drupal Commerce might not be the best tool for building small or simple webstores. Of course it works fine as a platform for more traditional webstores, but most of its true potential will be left untapped and it probably won’t be a cost effective solution. As a versatile and flexible system, Drupal Commerce can be used to implement the most complex of commercial intricacies and to create rich user experiences by combining commerce with content.

You want an open source solution.
When you choose Drupal Commerce, you won’t have to pay for license fees and you are not married to a single vendor. Open source allows for cost effective development and versatile extension possibilities. Thanks to its huge developer community, the system is of very high quality, very reliable and very secure. Closed systems are typically more limited when it comes to customizability, extensibility as well as layout.

You want a long term solution, which will grow and develop alongside your business.
You need to think about the future when choosing your platform. Precisely due to its flexibility, Drupal Commerce adapts to the changing requirements of your web service or business, be they new kinds of content, new ways of doing business, customer-specific customizations or an increase in volume.

Just like the founder and leader of the Drupal project Dries Buytaert noted in his State of Drupal speech in September: “Drupal is for ambitious digital experiences. It isn’t about how big you start, it’s about how you hope to grow.” 

Text is updated Aug 19, 2024.

Would you like to know more about Drupal Commerce? Contact us and we’ll see how it could serve the needs of your business!

Two women behing the screen at the office,
11.10.2022

Design process matters – here are three reasons why

Have you stopped to consider how your web service is actually designed and how design and development move together? Many teams assume the collaboration works smoothly, yet that is far from guaranteed. The industry still shows plenty of rigid and unclear practices that complicate work for both the client and the service provider.

A strong design process delivers a consistent user experience, clarifies project management and makes the entire workflow more predictable. You save time and money, but more importantly you gain a service that is easier to maintain and build on. At Druid, we have invested heavily in modernizing our design process so design, development and your business goals move forward in sync.

So what kind of process creates a genuine advantage? One that is agile, transparent and modern, producing these three key benefits:

1. Scalability

A contemporary design process builds the whole service around a design system. Instead of creating individual pages, we design the components that pages are made of. This keeps design and development aligned through shared component libraries and design tokens, reducing misunderstandings and speeding up delivery.

What’s the use of scalability? For one, the user experience of your web design will be consistent when the same components repeat throughout the service. A seamless and effortless user experience is a crucial factor in the digital world when you try to turn users into customers. Secondly, scalable design saves time and energy (and therefore costs), because you don’t have to design everything separately from scratch. This means more results with less trouble.

What about when you want to update the styles of your site? That is where a style guide comes into play. Style guides allow you to make site-wide style updates and to easily modify the styles of your components. And since all the changes are updated into all of the components at the same time, the consistency of the site’s styles can easily be maintained.

2. Cost-effectiveness

A strong design process keeps the work at the right level from day one. When design and development advance together, issues surface early and unnecessary over-designing is avoided.

Lightweight prototypes, early testing and AI-assisted validation help anticipate problems before they become expensive. The process ensures we design exactly what is needed, not what is nice to imagine.

We tend to create lightweight prototypes of the components we design before creating them for the actual system. This way you, as our client, get to give us your input at an early stage  – before modifications and changes are laborious and expensive.

3. Better basis for success

A well-structured design process creates a shared understanding of what we are building, why and in which order. You see how the design evolves, what kind of feedback we need from you and when decisions are made.

When everyone works with the same information, the project moves forward without surprises. Goals evolve naturally as we learn more about users and technical requirements. Transparency increases, timelines stay more realistic and collaboration becomes easier.

At Druid, every project starts with a design kickoff. Together with the client, we set goals, define success metrics and agree on how we work as one team. And as is fitting with the agile methodology, the goals and metrics may refocus or reform as the project progresses; the further the project develops, the more we learn and the wiser we become. 

As you can see, flexible and clearly defined design process can provide considerable advantages. How do we handle this in practice?

Contact us and we’ll tell you more!

Blog post updated 5.12.2025.
 

17.02.2022
Marko Korhonen

Technically speaking: Retro 2021

What did the year 2021 look like at Druid, from a technical point of view? What is to be expected this year? It’s time for a brief recap! I’ll go through where we are in terms of tech and tools, and share some of our plans and ideas for the future. Naturally, we always choose technologies according to each customer’s needs – technology is a good servant but a bad master. But it’s also important to keep our tech stack consistent and manageable. Proven and reliable open source solutions is the path of our choice.

Frontend: more and more modern JavaScript

Since we do web development, we use JavaScript – modern or vanilla – in all of our projects. The use of modern JavaScript frameworks has been increasing significantly during the past few years. Currently, we have +10 customer projects with modern frameworks. React and Vue.js are the most common ones, and we also use Next.js (React based) in one project and a Stencil based Design System for a customer who already uses it in 3+ projects. The solutions vary from full Headless solutions to embedded “widget” kind of components.

In addition, we use a modern JavaScript stack for theme and JS building (e.g. Webpack) in most of our Drupal and Symfony projects. In some of our new projects we are experimenting on Tailwind CSS, a utility-first CSS framework.

Backend: mostly Drupal…and something else?

Drupal still maintains its solid position as our go-to CMS solution. Last year we were busy with upgrades from Drupal 8 to Drupal 9, as version 8 reached its end-of-life in November 2021. Almost all of our Drupal 8 projects have now been upgraded.

This year, it’s time to say goodbye to Drupal 7. The end-of-life has been a long time coming, and it’s finally happening in November 2022*. We’ll be having at least four major upgrade projects to re-create Drupal 7 sites with Drupal 9 this year. Upgrading from Drupal 7 is a much more laborious effort than from Drupal 8, because the technological changes between versions 7 and 8 were substantial.

*Edit 24 Feb 2022: Drupal 7’s end-of-life has again been extended by one year to November 2023.

When Drupal 7 is gone, there won’t be major upgrades anymore. Drupal’s product development has shifted to a more modern continuous development process where new features and improvements will be released in a faster cycle, with less upgrade effort. Drupal 10 will be just another version of the same codebase as Drupal 8 and 9. I’d say we could just drop the number and call it “Drupal”.


In addition to Drupal, we have done multiple Symfony projects. They are mostly apps or tools where there is no need for a CMS: time reservations, digital signing, data enrichment, questionnaires, launching sites and APIs. Did you know that also Drupal is just another “app” created with Symfony? On the JS side we are interested in test driving NestJS which seems quite similar to Symfony in terminology and logic. Synergy!

Anything else on the horizon for us? Well, we are planning to test some JavaScript headless CMS solutions to see how they compare with Drupal feature-wise. Serverless is on the table when delivering these apps. I think Serverless is like using a taxi to get from point A to point B instead of owning the car and filling the tank by yourself.

Hosting

Our hosting comes in many forms of Kubernetes. It’s good to not put all the eggs in the same basket so we have sites and apps running in a few Managed Hosting services. But we also have sites on customer’s own environments, e.g. Azure, Google Cloud Platform and OpenShift, and still some sites and apps that are running on customer’s virtual servers.

Tooling and DX

To control all this, one needs tools. And boy, do we have them.

Last year PHP got versions 8 and 8.1 which both improved the language and the performance yet again. Also Composer (the package manager for PHP) got V2 which is way faster. These two combined are actually saving the environment on their part as the energy impact will be smaller!

We have many in-house tools here at Druid. We have aimed for consistent tooling across our projects regardless of whether we use Drupal, Symfony, WordPress, Node8-16, Docker, host, and so on. We run our local development on Docker containers with Stonehenge. We use Make based tools to command our local projects in a common way.

For GDPR-compliant data handling in projects, we created a GDPR dumper solution (which is worth another blog post). For custom environments which our customers might have, like Azure or plain virtual servers, we have our own Druid flavoured Docker images where we run Drupal or PHP apps. As to CI/CD, we are quite omnivorous: mostly Github Actions with Gitlab CI, Azure Pipelines and Jenkins as toppings.

/r/random

New Remote Development tools are something I’m interested in testing this year. It seems there are solutions coming from left and right: Github Codespaces, Jetbrains and Gitpod, to mention a few. With these solutions, the projects are running in the cloud and your IDE is just a window to that. No more running projects on your old war horse laptop!

We are also doing some interesting product development that has something to do with launching sites in high volume. More about that later on – stay tuned!

New experiments

We always keep our eyes open at Druid and like to test new, interesting tools and technologies. Twitter is my source of shiny new tech to experiment on. Below are some new ones, and some that have been trending for a few years already, that we are testing or would like to test. What do you think of these? Any other must try tech that you can recommend? Let me know – you can find me on BlueSky!

Do you also have an interest in some of these technologies? And some experience too?

We are looking for new Druids to build a better web with us. Maybe you could be one of them?

Author

Marko Korhonen

Platform Engineering Lead
17.11.2021

My experience coming from C++ to JavaScript

Having been with C++ for a long time, I’d become comfortable with it. I’d use it both as a scripting language and for building complex desktop applications. Adding Qt gave me powerful tools for creating user interfaces; and I had access to OpenCL for accelerated computing, OpenGL for real-time graphics, OpenCV for image processing, etc. For my needs, this ecosystem worked very well for a long time.

But over time, pressure mounted for me to expand into the web development sphere. So I started learning JavaScript.

In this post, I’ll go over some of the experiences I had coming from C++ to JavaScript, including some of the things that went well and some that didn’t. I’ll try to give a few pointers to people who’re planning to do the same, and hopefully some perspectives to JavaScript developers who might be interested in C++.

First impressions

I had some prior familiarity with HTML and CSS from using them to style Qt components and from dabbling in simple web pages, but I’d never done anything with JavaScript. By this time the language was a couple decades old; the specification was up to about ES9.

JavaScript’s syntax is very similar to C++, to the point that the differences feel dialectal. You get your familiar statements like if, for, and switch; you define functions much the same way (just with dynamic typing); and especially if you’ve written C++ in a procedural style, your program flow may be very similar.

But although the syntactic similarity can ease the transitioning from one language to the other, it’s in some ways a hinderance: things can appear familiar but end up working in an unexpected way, quickly landing you in one of the pitfalls of JavaScript.

The initial pitfalls

There were three notable pitfalls I got to experience when getting started with JavaScript:

  1. Behavior of array indices
  2. Deep vs. shallow copies
  3. The ‘this’ keyword

They all had to do with what on the syntactic level looked like familiar concepts from C++ but in practice turned out to work quite differently.

Behavior of array indices

On the surface, indexing arrays works the same way in C++ and JavaScript: given an array array, you can access its elements with array[0...n]. And this indeed holds true if you only use (positive) integers for the array index. But as soon as you do something like array[x / 2], you’ll run into divergent behavior.

In C++, the result of x / 2 – where x is an integer – is an integer. When you write array[3 / 2], you’ll be getting array[1], and you’re probably very used to it being this way.

In JavaScript, different rules apply. First, the language has no integers, only floating-point numbers. Second, array indices are converted into strings. That means 3 / 2 produces the floating-point value 1.5, which means array[3 / 2] gives you array["1.5"], which in turn will equal undefined in the likely case that the array has no element with the key “1.5”.

For example, in C++:

const std::array array = {10, 11, 12};
// array[1] == 11
// array[3 / 2] == array[1] == 11

In JavaScript:

const array = [10, 11, 12];
// array[1] === array["1"] === 11
// array[3 / 2] === array["1.5"] === undefined (oops)

This isn’t a big problem at the end of the day because you can coax the index value into an integer (e.g. array[Math.floor(3 / 2)] === array["1"]). However, unlike a C++ compiler, a JavaScript engine probably won’t warn you about using a floating-point value as an array index, so until you notice it manually, you’ll get a silent NaN propagating in your program from what at first glance looks to be well-behaved code.

Read more about arrays in JavaScript here.

Deep vs. shallow copies

In C++, I had gotten used to being able to deeply copy plain structs with direct assignment:

struct pod_structure
{
    int array[3];
};

pod_structure object = {10, 11, 12};

// This copies by value, i.e. makes a deep copy.
pod_structure objectCopy = object;

// Since the copy is deep, modifying it doesn't modify the original.
objectCopy.array[0] = 99;
// object.array[0] == 10
// objectCopy.array[0] == 99

This didn’t translate well to JavaScript, where objects are copied by reference:

function data_structure(array) {
    return {
        array: [...array]
    }
};

const object = data_structure([10, 11, 12]);

// This copies by reference, i.e. makes a shallow copy.
const objectCopy = object;

// The copy is shallow, so modifying it modifies the original.
objectCopy.array[0] = 99;
// object.array[0] === 99
// objectCopy.array[0] === 99

I remember being somewhat stunned when I first ported a piece of C++ code to JavaScript and saw that making a deep copy of a plain data structure was actually a bit of a rabbit’s hole. Direct assignment typically but not always copies by reference (JavaScript makes no syntactic distinction between data and reference, so you’ll need to know the spec), certain methods like Object.assign() create copies that are partially deep and partially shallow, and semi-official deep-copying kludges like objectCopy = JSON.parse(JSON.stringify(object)) also have their pitfalls (e.g. JSON.stringify() will silently omit JSON-incompatible data).

One way to get around this issue – a way I ended up favoring – is to use immutable objects, so that you don’t need to care whether a copy is a reference. If you want to modify an object, you create a new immutable object with those modifications, and references to the original object remain as they were. The downside is that this isn’t fully straightforward to accomplish either – you could use the standard Object.freeze() method to make an object immutable, but since it doesn’t freeze nested objects, you’d have to go an extra mile to ensure true immutability down the whole property tree.

(As of late 2021, although the landscape of deep copying in JavaScript remains somewhat messy, support for a standard structuredClone() method has begun to land in browsers.)

The ‘this’ keyword

C++ and JavaScript both provide a this keyword, and in both languages it represents a reference to a particular context. But the mechanics of it can differ in painful ways.

In C++, this evaluates to a pointer that refers to an instance of the class (or struct) in which it’s used:

struct object
{
    object* self()
    {
        return this;
    }
};

object instance;
// instance.self() == &instance == 0x...

// Can't use 'this' outside of a class context.
std::cout << this;
// Compiler: ^~~~ error: invalid use of 'this' in non-member function

In JavaScript, this refers to an execution context and has a much broader domain both functionally and in what values it can represent:

function say_this() {
    console.log(this);
}

const object = {
    initial_this: this,
    say_this: function(){console.log(this)},
    say_this_arrow: ()=>console.log(this)
};

console.log(this);
// "Window {...}"

console.log(object.initial_this);
// "Window {...}"

object.say_this();
// "{initial_this: Window, say_this: f, ...}"

object.say_this_arrow();
// "Window {...}"

say_this();
// "undefined" (in strict mode) or "Window {...}"

new say_this();
// "say_this {}"

say_this.call(document.head);
// "<head>...</head>"

The this of C++ is semantically telling you, “this instance of the class”. The this of JavaScript likewise appears to say, “this context that I’m in”, but means to say, “this branch of execution”, which in turn depends on factors that aren’t visible in the local semantic context. So if you use this inside an object in JavaScript, you might expect it to refer to the object itself, but in reality it may refer to (a) the object, (b) nothing, or (c) anything, depending on how the object is being accessed. For this reason, especially if you’re used to how it works in C++, it’s very easy to mess up this in JavaScript.

I’d recommend ignoring what you know about C++ in this regard and even to avoid using JavaScript’s this altogether until you’re sure you understand what it would do – and why so – in the particular situation you’d use it in. Otherwise it’s too easy to be creating fragile, hard to understand code.

Read more about JavaScript’s this keyword here.

Time to refactor?

After a while of building things with JavaScript, I’d become settled into certain patterns, some of which I later felt best to move away from and some that I chose to keep. Among those patterns have been:

  1. C++-isms
  2. Compensating for the lack of static typing
  3. Easing into the messy package ecosystem

C++-isms

One of the things I most often have found myself refactoring in my early JavaScript code are its in-code interfaces. Often they’ve had a contextually unpleasant C++ tinge to them; they’ve felt clunky or out of place in JavaScript.

For example, since C++ doesn’t allow named function arguments, you only declare paremeter names in the function signature and then call the function without re-declaring the names:

int sum(const std::vector<int> &numbers = {}, const int initialValue = 0)
{
    // ...
}

sum({1, 2, 3}, 5);

I’d port code like that to JavaScript almost verbatim:

function sum(numbers = [], initialValue = 0) {
    // ...
}

sum([1, 2, 3], 5);

The result isn’t outright bad, but in neither case does the call to sum() tell the reader what the arguments mean. The person could assume that the list of values provides the numbers to be summed, and maybe by convention that 5 is the sum’s initial value. But they’d need to look up the function signature to be sure.

By finagling with JavaScript’s syntax (in this case, object destructuring) you can have named arguments:

function sum({numbers = [], initialValue = 0} = {}) {
    // ...
}

sum({numbers: [1, 2, 3], initialValue: 5});

I think the call to sum() now looks and feels more like JavaScript. Even if you disagree or prefer the C++-like way, you’ll probably agree that the C++-style call is more obscure about intent. Besides being more explicit, the destructured version is more flexible to call: you can re-arrange the arguments, and default value initialization doesn’t require a certain argument order either.

Compensating for the lack of static typing

I’d been in the habit of using assertions in C++ to ensure – among other things – the validity of arguments passed to functions. Since JavaScript doesn’t support static typing like C++ does, my asserting extended naturally to checking arguments’ types as well. Something like this:

function func(arg) {
    console.assert(typeof arg == "number", "'arg' must be of type 'number'");
}

Sometimes I’d feel I was being overly pedantic writing type checks in a language made to be dynamically typed. Not to mention each assertion took up more lines of code, required more time to write, and needed to be maintained when the intended type of an argument was changed. Maybe it was an anti-pattern?

Well, I’ve so far decided not to refactor away assertions from my JavaScript code. In fact, I still keep adding them to new code. Consider the following:

function func(arg) {
    console.assert(typeof arg == "number", "'arg' must be of type 'number'");
}

const array = [1, 2, 3];

func(array[1]);
// Runs OK (arg === 2, which is fine)

func(array[1 / 2]);
// Assertion failure (arg === undefined, the array has no key "0.5")

func("1");
// Assertion failure (arg is not a number by strict comparison)

The second call to func() makes the mistake of assuming that integer division in JavaScript results in an integer. The assertion immediately catches the mistake.

The third call to func() is OK in the sense that the function could probably implicitly cast the string into a number and then execute correctly. But still, the function expects a number, so its receiving a string indicates that some other part of the codebase is misbehaving (maybe it’s passing along a stringified number directly from a network response). In my opinion it’s probably better for the long-term reliability of the application that you’re alerted to this.

That said, these assertions are just a roundabout way of shoehorning in a kind of static typing. A more elegant way might be to use TypeScript, which provides an additional syntax layer over JavaScript that includes native-like static types. With TypeScript, we could leave out the manual type assertions and let the TypeScript compiler handle type checking:

// The argument is now of a TypeScript-specific 'number' type.
function func(arg: number) {}

const array = [1, 2, 3];

func(array[1]);
// No errors from TypeScript (the call is OK)

func(array[1 / 2]);
// No errors from TypeScript (but the index bug goes undetected)

func("1");
// TypeScript error: Argument of type 'string' is not assignable to parameter of type 'number'

I’ve used TypeScript for only a short while, but so far my impressions of it are mixed. Introducing static typing can increase the reliability and readability of your code, and TypeScript’s interface system may get you to think about and define your in-code interfaces more clearly. On the other hand, its type system doesn’t always feel solidly integrated with JavaScript, and from what I’ve seen it can add considerable complexity and/or compatibility issues to your build process.

Easing into the messy package ecosystem

Among the biggest elephants in the room has to be JavaScript’s sprawling package ecosystem.

As a C++ developer, I was used to working at low level, carefully managing the dependencies of my applications and often introducing no dependencies at all besides the standard library. By contrast, JavaScript is a high-level language where a typical project may depend on hundreds or thousands of external packages, and whose developer base seems more accepting of abstracting away the lower-level details behind those external dependencies.

When learning React, it’s typically recommended to use the create-react-app project bootstrapper. It sets up a React development environment in an automated way, saving you the trouble of manually doing the boilerplate. The downside is that it also makes your development environment dependent on over 1,500 extra packages.

When I started learning React (I was still fairly new to JavaScript overall), I thought the amount dependencies introduced by create-react-app was absolutely nuts. Why would a hello-world app need hundreds of miscellaneous dependencies? I chose to go against the grain of every React tutorial and learn it without packages or package managers:

<div id="react-container"></div>
<script src="react.development.js"></script>
<script src="react-dom.development.js"></script>
<script>
    const container = document.getElementById("react-container");
    const component = React.createElement("span", {}, "Hello world");
    ReactDOM.render(component, container);
</script>

In this vein, there are no extra packages required, and I didn’t even need to install a package manager. I could build full React apps this way, and they’d be lighter-weight and potentially more secure (or not). But I’d also be missing out on quality-of-life improvements like…

// Creating a nested element with plain React.
divWithChild =
    React.createElement("div", {},
        React.createElement("span", {className: "label"}, "Hello world")
    );

// Creating the same element with JSX syntax (dependent on a transpiler).
divWithChild = (
    <div>
        <span className="label">
            Hello world
        </span>
    </div>
);

…not to mention I’d perpetually be working uphill and against the grain, because create-react-app and the like make things much easier, and most fellow JavaScript developers will be of that opinion.

I think easing into the apparent craziness of the JavaScript package ecosystem was the hardest part about transitioning from C++ to JavaScript. It meant no longer understanding certain aspects of my programs at lower levels. On the other hand, I wasn’t supposed to be working at low level with a high-level language to begin with, and I could be more productive by accepting that.

Future outlook

In my opinion, having first learnt C++ can give you an edge in becoming proficient in JavaScript. C++ offers a lot of freedom but requires a lot of responsibility; it motivates you to try to write well-behaving code because the alternative is a compromised application (or worse). If the motivation to build reliable code carries into JavaScript, it can elevate your work above some of the quirks of the language that might otherwise negatively affect the quality of your work – or at least you might get bitten by those quirks less often.

But experience of C++ can also be major baggage. You might be used to having lower-level control over your programs – for instance, insisting that dependencies be kept to a minimum. In the higher-level JavaScript this may become an anti-pattern that holds you back from being as effective of a developer as you could be.

I personally still use both languages. C++ gives me high performance, syntactic power, and few restrictions. JavaScript gives me first-class networking, a huge platform to distribute on, and a powerful GUI system in the triad of HTML5/CSS3/JavaScript; it can be an expressive, creative language and I often have fun using it.

01.11.2021

Working at Druid, according to Druids

In the spring of 2021, we asked our people how they feel about working at Druid, what they value in work, and how they see themselves and their co-workers. Here comes a summary of the answers. Hopefully this will give you an idea of what it’s like to work with us.

Most of the Druids, over 70%, work with software development, the rest with something else such as sales or project management. So in general we can say that Druid is a very developer-oriented company packed with deep knowledge of software development. People really enjoy problem solving and finding solutions.

How is work and management at Druid?

We have a lot of long-term employees a low turnover. Why is that? What makes people stay? Not surprisingly, the answer lies in our culture. Freedom and flexibility, a relaxed atmosphere with nice and helpful co-workers, interesting projects and opportunities – for us, these are the ingredients that make up an attractive workplace. This may sound clichéd, since so many companies are advocating these things nowadays, but our greatest strength is our culture, which actively nurtures these values.

Quite logically, our people consider company culture to be the most important factor at work, along with flexible working hours. Other important factors for us are professional development, the possibility to work remotely, our team and colleagues, and the impact of our work – doing work that matters.

Druid is a self-organized company and we are exploring the Teal philosophy. In practice this means that we have a high level of autonomy and we are accountable for coordinating work with each other. Decisions affecting the whole company are made in swarms that anyone can join or set up. Currently we have over 10 active swarms ranging from tech to strategy, from billing to recruitment. Outside the swarms, any individual can make a decision to fix an issue or complete a task by first seeking advice from others.

What are we Druids like?

We describe ourselves and our co-workers as relaxed and easy-going, skilled and talented people who are passionate about what they do. It also seems that we have two types of people at Druid: those who want to focus purely on coding and don’t want to be disturbed, and those who want to be involved in developing the company and really value Teal and what it represents. And both are totally ok.

Druids have a wide range of hobbies and personal interests. The most popular free time activities seem to be making and listening to music, gaming and coding as well as spending time with family and friends. And the list goes on. We have people who are into art, baking, cars, carpentry, climbing, cooking, fishing, hiking, gym and sports in general, Japanese culture and martial arts, motorcycling, movies, travelling, reading, sailing, walking and yoga.

When we go deep into what really matters in life, our people value honesty and integrity, freedom, fairness, equality, and family. These are the values that unite all of us Druids as human beings.

Edit: Our CTO Marko would like to add that ice hockey belongs to our hobby list as well 😀

If you feel that you can relate to these thoughts and could see yourself working with us, don’t hesitate to get in touch. We are always interested in getting to know new colleagues!

Author

18.10.2021
Mikko Hämäläinen

Battling developer shortage with educational cooperation

Without today’s juniors there wouldn’t be tomorrow’s seniors. This very much holds true within any specialist field, but it still feels like the truth about healthy workforce structure has been forgotten in today’s knowledge work.

As a company that cooperates a lot with public sector organizations, it must be said that sometimes it’s exceedingly difficult to get newcomers to the software development field actually hired into projects. Project teams are picked based on CVs in close fought competitive tendering with winning bids invariably going to teams made up of 10 year veterans with black belts in coding. You can’t get beginners hired to gather valuable experience even if their fees were next to nothing.

The board of the Code from Finland association, lead by their chairman Janne Kalliola, laudably pointed out in their opinion piece in Helsingin Sanomat that strict competitive tendering criteria are exacerbating the developer shortage and are holding back the growth of the industry.

Even though experience is valuable and valued, the programming industry needs new skilled workers now more than ever. The way we are trying to affect the industry is through educational cooperation and by hiring junior software developers ourselves.

Cooperation with the Helsinki Business College

A versatile content management system like Drupal, which is aimed at large clients, requires a constant source of experts. Fresh software developers are often enthusiastic open source contributors, and their careers will benefit from Drupal’s large international community. Being an active open source developer could well act as a stepping stone to an international career in programming.

In Finland, Drupal programming education is offered by our longstanding partner, the Helsinki Business College. Our collaboration during the years has been varied: we’ve taught in their courses, coached teachers in the use of Drupal, organized company visits and taken in interns whenever possible. When things work out, we are happy to offer permanent jobs to the interns. Many HBC students have graduated to working life through us.

In January of 2022 we will take the next step in our collaboration as we become the cooperation partner for the React & Drupal Full Stack Web Developer study program at HBC. We want to take active part in familiarizing students with the everyday life within the software industry, as well as the Drupal community and naturally with us as a company.

As a partner we will help HBC to specify the practice project carried out during the studies, and I will work as the project’s product owner for the development teams. At the end of the study period we hope to snag as many skilled developers as possible as interns, which will hopefully lead to them becoming gainfully employed developers in the industry.

Maintenance work provides all-round experience

Even though the public sector’s attitude towards novice developers is hardly enthusiastic, competitive tendering shenanigans won’t be the end of anyone’s career. The comprehensive maintenance and small scale development services we offer are of key importance when it comes to getting junior coders employed. Most of our interns will find themselves under the care of our Magical Support team and will later be employed as part of the team.

We at Druid don’t consider the maintenance services we provide as a necessary evil but rather a significant source of our revenue. Over 95% of our clients move to maintenance at the end of an implementation project, and the amount of work done under the maintenance contract is often manifold compared to the original project.

Our multilingual and multi-skilled team is responsible for ensuring that our clients’ websites remain functional, secure, and up-to-date in terms of features. The technical skills required in these tasks range from the comprehensive knowledge of large Drupal systems to creating modern JavaScript and React code. Is there a better place for a newcomer to the industry to get a feel of the diversity of working life?

We at Druid have helped bring to life a number of success stories whose main star has been a motivated fledgling software developer. Those are the stories we yearn for. That’s why we want to offer a solid stepping stone to working life to as many people as possible.

Author

Mikko is the CEO of Druid with more than 20 years of experience in content management and customer experience development. He helps marketing and business teams harness the potential of technology, and his true passion lies in digital customer experience management systems

30.06.2021

Druid Tech Survey 2021: the technologies we use and like

At Druid we’ve decided to establish a tradition to keep a record of the technologies we use in our projects and to take note of the technologies we would like to use more in our work.

It will be inspiring to review statistics in the coming years and see what kinds of turns we have taken along the way in terms of technology stack choices on our quest to create top quality digital solutions. And it’s always interesting to look back on history to check what has become obsolete, what tech we have chosen instead and why.

We started this spring by conducting our very first tech survey. We asked our software developers about the technologies they are currently using and the trends and languages they’re enthusiastic about. The answers gave us a deeper insight into the range of technologies we’re using and what we think will stick with us in the foreseeable future.

Technologies we use now

Since the company’s foundation in 2012, Drupal has been the main technology we’ve relied on in our projects. It is still the case, as almost 80% of our developers are engaged in Drupal-based projects. Around a third of the developers build digital solutions using the Symfony framework.

When it comes to frontend, state-of-the-art Drupal frontend solutions based on Vanilla JS and jQuery, as well as building custom themes and templates with Twig, JS and CSS, are in heavy use currently in Drupal.

However, we see the growing importance of JavaScript frameworks and already use some of them whenever they fit the project goals. More than 65% of our developers work with JS based technologies. A quarter of our frontenders are currently involved in building and supporting the React Apps. Less often we use Vue and Angular.

To summarize, the most popular languages and frameworks we use today are PHP, Drupal, JavaScript, Symfony, TypeScript, React, Vue. But of course, regardless of the tech we use in our projects, the focus always lies on security, scalability, usability, accessibility, and high performance.

Technologies we would like to use – and to avoid

When it comes to personal preferences, we see a surging interest in JavaScript, both for backend and frontend parts.

Backend frameworks and languages

In backend development, some of us still see themselves doing projects with Drupal and Symfony. However, the number of people who would like to switch to JS based backend and serverless architecture has grown significantly, while interest in Drupal is slowly going down. Both serverless and headless architecture were mentioned in the survey as promising directions. API based solutions and ecommerce have also gained steady interest.

Frontend frameworks and languages

As to frontend development, the role of JS technologies is definitely growing in our current projects. React, Vue, and Angular have already become part of our business solutions. This is also reflected in the survey results. Interest in leading-edge React and Vue is strong among our frontenders while Angular has lost its former popularity. The survey also demonstrates a rising interest in TypeScript.

Things to avoid

The majority of our developers answered that they are quite flexible, quick to learn and ready to work with whatever suits the project best. But not surprisingly, they would rather avoid any obsolete technologies. Some are not enthusiastic about working with Drupal 7 anymore as it’s reaching end-of-life soon and a much better, up-to-date Drupal 9 version is already in use – and the upcoming release of Drupal 10 isn’t far away either.

Open source, open attitude

At Druid we want to make the digital world more functional with every line of our code – with open source and an open attitude, as our motto goes.

According to the survey, more than half of our developers are members of online developer communities, and some of them contribute to Drupal or at least are active members of the Drupal community. In addition, half of our developers said they participate in meetups, hackathons or webinars.

We have always been focusing on building reliable code and high-quality, long-lasting digital solutions that add value to the customer’s business. The right choice of technologies is necessary to deliver a good product – but technology as such is never the priority, customer needs are. And those needs guide everything we do.

PS. If you have matching skills and interests, take a look at our career site. We are hiring 😉

Author