Code

"One Developer Is the Worth of Five JavaScript Programmers": What Haskell Is for

"One Developer Is the Worth of Five JavaScript Programmers": What Haskell Is for

Free course: "Quick Start in Python"

Learn more

Dmitry Kovanikov

An expert in his field has deep knowledge and many years of experience, which allows him to offer high-quality solutions and recommendations. His professional skills are confirmed by successful projects and positive client reviews. The expert constantly monitors new trends and changes in his field, which helps him stay at the forefront and offer relevant and effective approaches. Thanks to this, he becomes a reliable partner for businesses and individual clients striving for success and development.

Haskell developer at a London bank. Passionate about functional programming and actively shares his experience at conferences. For several years, he taught Haskell at ITMO University. Together with his partner, he founded the organization Kowainik, which supports open-source projects, offers mentoring for aspiring developers, runs a blog and a Haskell course.

Links are an important element of web content that helps users find information and navigate sites. They can be both internal and external. Internal links point to other pages on your website, improving its structure and helping users engage more deeply with the content. External links point to resources on other websites, which helps increase the authority and trustworthiness of your content.

Link optimization is a key aspect of SEO. Using relevant anchor text that accurately reflects the content of the target page can increase your site's visibility in search engines. It is also important to monitor link health to avoid 404 errors, which can negatively impact user experience and site rankings.

Building high-quality links is also related to a link building strategy, which involves obtaining backlinks from authoritative resources. This strengthens your site's credibility and helps improve its ranking in search results. It is important to remember that links should be natural and relevant to the topic of your content.

Therefore, links play a key role in SEO and user experience. Using them correctly can significantly improve your website's performance and search engine rankings.

I've been programming in Haskell for the past five years. I previously had experience with Java, and then, when Kotlin came along, I switched to it and was very pleased with it. To this day, I find Kotlin a convenient and attractive programming language. Recently, I turned my attention back to Kotlin and found that even after learning Haskell, it still looks quite appealing.

I've also worked on the front end using Elm, a functional programming language. While Elm has fewer features than Haskell, it handles the tasks effectively. I also have experience with PureScript. I use Kubernetes in my professional work, and I describe its configuration in Dhall, which also demonstrates my complete transition to a functional technology stack.

My work regularly requires writing Bash scripts, as DevOps-related tasks are often encountered. This requires knowledge of the command line and the ability to automate routine processes, which significantly simplifies infrastructure management and workflow optimization. Mastering Bash scripting is an essential skill for DevOps specialists, as it allows them to effectively solve various problems and increase team productivity.

I have had interesting experiences with the Haskell programming language. I've attempted to learn it several times. At university, during a course on mathematical logic, the professor insisted that "write Haskell; it's easier to solve problems." I tried it, but couldn't understand its advantage and thought, "What is this nonsense? It's impossible to program in it at all." Later, while studying functional programming, I encountered Haskell again, but even then it didn't spark my interest.

Eventually, I became truly fascinated with Haskell concepts. This fascination led to me being offered to teach a course on functional programming at ITMO, and I taught Haskell for two and a half years. By preparing lectures and practical classes, I immersed myself in the language at a deep level, which allowed me to create an introductory Haskell course. This experience not only enriched my knowledge but also helped spread the word about functional programming among students.

My friend, who invited me to take the functional programming course at ITMO, founded a company where development was done in Haskell. I joined his team and have since been actively using Haskell in my projects.

Prospects for Haskell in Commercial Development

Haskell is gradually gaining popularity in commercial development, and more and more companies are choosing this programming language. Most often, these are startups that are developing projects from scratch and have the freedom to choose any technology stack. However, there are exceptions: for example, the bank where I currently work has a significant Haskell codebase that is over twelve years old. This confirms that Haskell can be an effective solution not only for new projects but also for long-term support of existing systems.

Working with legacy code is a complex task, especially when it comes to rewriting it in Haskell. To successfully implement such a transition, it is necessary to involve experienced developers who have knowledge of both Haskell and software architecture. This will avoid a situation where the codebase is transformed into a new legacy, but in a language unfamiliar to most developers. It is important to ensure a smooth transition and maintain the readability and maintainability of the code so that the team can work effectively with the new system and minimize the risks associated with potential errors and misunderstandings.

Haskell has excellent compatibility with the C language, making it attractive to developers. Using several Haskell libraries, you can integrate and call code written in Java, C++, Rust, and even R. This functionality expands Haskell's capabilities and allows it to be used in various projects that require interoperability with other programming languages.

Haskell has two key features that distinguish it from other programming languages. First, it is lazy evaluation, which allows the execution of expressions to be postponed until they are actually needed. This approach helps optimize memory management and leads to the creation of more efficient programs. Secondly, Haskell supports strong typing, which ensures a high level of code safety, reducing the likelihood of runtime errors. These features make Haskell a powerful tool for developing complex and robust software solutions.

It's not a popular programming language. There may be no ready-made API or other solution for certain tasks, forcing developers to implement, for example, a JSON REST API for sending requests to various services. This requires greater flexibility and the ability to create unique solutions from the programmer, which can be both a challenge and an opportunity to develop skills.

For most tasks, ready-made solutions already exist that meet my needs. I found almost everything I needed for the job. There are ready-made tools for interacting with databases such as PostgreSQL, as well as solutions for integrating with Amazon and Google services. In addition, libraries for working with the network, parsing popular formats, and many other useful resources are available. These tools significantly simplify development and improve the efficiency of working with data.

Finding qualified Haskell developers is not an easy task. Although many specialists are familiar with this language, truly experienced programmers are significantly fewer. In addition, not all companies have practical experience working with Haskell in production, which makes it difficult to recruit beginners - they simply have no one to learn with. At the beginning, a company will still need to invest in experienced developers who can form the core of the team and establish effective workflows.

One ​​Haskell Developer vs. Five JavaScript Programmers

At my previous job, I had an interesting situation related to Haskell. The startup had a Node.js server running, with ten developers working on it. They wrote 300,000 lines of code and 600,000 lines of tests. This is due to the nature of JavaScript: ensuring reliability requires significantly more tests than actual code, which ultimately led to a doubling of the testing volume. Unfortunately, the company could not offer competitive salaries, which led to other employers actively poaching JavaScript developers, resulting in a shortage of specialists in the market.

The new CTO decided to rewrite the project in Haskell. At first, he created a small server, which, after two years of operation, did not fail. After that, he hired two developers, including me. Within six months, we successfully rewrote all the code in JavaScript, replacing it with Haskell.

The new server launched without errors and demonstrated high stability in production. Using static types, compiler advantages, and other features of the Haskell language allowed us to quickly develop and implement new features. This ensured the efficient operation of the server and contributed to its reliable operation.

Java implements static typing, but Haskell's type system is much more powerful. Haskell offers a number of additional features that allow you to effectively model domain-specific problems and significantly reduce the number of errors in code. Using Haskell's powerful type system contributes to greater program reliability and robustness, making it the preferred choice for developers striving to create high-quality software.

Our CTO, in conversations with other startups, often shares information about how quickly we implement new features and how many releases we make. At the same time, he mentions that behind all this is a team of only two people. The reaction from people I talk to is usually the same: "That's impossible; such tasks require at least ten people. Two programmers can't handle that amount of work." Many simply don't believe it's possible.

Our server is now running twice as fast, which has allowed our company to significantly reduce our Amazon cloud costs. By optimizing resources, we have achieved high operational efficiency, which has had a positive impact on our budget.

Haskell Community and Conference Speaking

I actively support the Haskell community by developing open-source projects, teaching courses, mentoring beginners, and participating in conferences. However, over the past year and a half, due to the pandemic, most events have been held online.

Various conferences are regularly held in the Haskell world, among which the academic ICFP conference stands out. However, the Haskell Implementors' Workshop deserves special attention, as participation is not limited to academics. Here, anyone can give a talk or listen to the speakers' discussions, making the event accessible to a wide audience. The Haskell Implementors' Workshop promotes the exchange of knowledge and experience among developers, which contributes to the development of the community and the popularization of the Haskell language.

In 2017, I attended ICFP as a spectator, and in 2019, I spoke at YOW! Lambda Jam in Australia. At this event, I shared my experience creating a logging library, developed jointly with a friend at our open source organization. My talk focused on the practical aspects of using this library, its advantages, and the opportunities it opens up for developers.

Since the conferences moved online, I have participated in Haskell Love twice. Most recently, I presented a talk on the TOML parsing library, and last year, a colleague and I discussed our own static analyzer for Haskell. These events have become a great platform for sharing experiences and knowledge within the Haskell community.

In 2020, we developed the Learn4Haskell course specifically for the Hacktoberfest event. The course includes detailed explanations of theoretical material and practical exercises. Participants learned the Haskell language, completed all chapters of the course, completed four pull requests, and received a Hacktoberfest T-shirt. Although the event has ended, the course is still available to everyone. You can take it at any time and deepen your knowledge of Haskell.

Nowadays, participation in international meetups has become accessible thanks to online formats. On December 14th, at Functional Fest Online, I will present my presentation on the Haskell backend architecture developed at the company where I previously worked. I previously shared my knowledge at a meetup in Amsterdam, where I discussed an alternative standard library for Haskell. I actively strive to participate in events and share my experiences as long as my energy allows.

I co-founded an organization, Kowainik, with a friend. We work on numerous open-source Haskell projects and maintain a blog with tutorials and detailed guides. Our goal is to mentor newcomers, helping them develop and contribute to open-source projects. We strive to create a community where everyone can gain support and knowledge in Haskell programming and participate in interesting developments.

I maintain my Twitter, projects, and blog in English, as the Haskell community is global, and this allows me to receive more feedback. Although Haskell does have a Russian-speaking community, it is quite small. Using English helps me engage an international audience and share experiences with developers around the world.

On our blog, you'll find a popular post about programming patterns in Haskell. This material generated a lot of interest from readers, so if you're interested in learning this programming language, be sure to check it out. Programming patterns in Haskell can significantly improve your skills and understanding of functional programming.

A selection of resources for Haskell developers from Dmitry

Read also:

  • Must read. 5 Fresh English-Language Articles about Haskell
  • Orthodox PHP Developer: The Big Bang Is Proof of God's Existence
  • How to Install Redis on Windows Without Docker