<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Anssi Piirainen</title>
    <description>The latest articles on DEV Community by Anssi Piirainen (@anssip).</description>
    <link>https://dev.to/anssip</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F309700%2F48467139-a072-44bc-998e-b507e6921088.jpeg</url>
      <title>DEV Community: Anssi Piirainen</title>
      <link>https://dev.to/anssip</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anssip"/>
    <language>en</language>
    <item>
      <title>The most effective way to learn a programming language</title>
      <dc:creator>Anssi Piirainen</dc:creator>
      <pubDate>Thu, 16 May 2024 11:33:31 +0000</pubDate>
      <link>https://dev.to/anssip/the-most-effective-way-to-learn-a-programming-language-ln</link>
      <guid>https://dev.to/anssip/the-most-effective-way-to-learn-a-programming-language-ln</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbt3ey25hltvo0kentfzr.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbt3ey25hltvo0kentfzr.jpg" alt="A bullish eagle (generated by DALL-E)" width="288" height="288"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Intro
&lt;/h2&gt;

&lt;p&gt;I decided to learn the Rust programming language, and here's how I did it.&lt;/p&gt;

&lt;p&gt;I started by reading a book about Rust. It’s a good way to begin, but it’s not enough. You don't really learn programming just by reading a book; you have to write code. So, I began writing a simple password manager in Rust. I'm not exactly sure how I came up with this project idea, but I think it was because I had been using several paid apps like BitWarden and Dashlane, and I wanted to see if I could create something to replace them.&lt;/p&gt;

&lt;p&gt;My setup for the project was pretty basic: I had read a bit of the book, but my knowledge was very minimal. Still, I managed to get started with the project and implement some basic features through a lot of trial and error. I had to look up a lot of things on the internet and read the Rust documentation. I wrestled a lot with the syntax, particularly with the Rust borrow checker. The borrow checker and Rust's memory safety features make Rust challenging to learn. However, what really surprised me was that when I finally got the program to compile, it actually worked and did what I wanted it to do. There was usually no need for debugging and troubleshooting—it just worked. This got me very excited about Rust. It’s a strict and tough language to learn, but once you get your code to compile, it’s very likely to work as expected.&lt;/p&gt;

&lt;p&gt;With my very basic understanding of Rust, I was able to implement a simple password manager that worked. I called it &lt;a href="https://github.com/anssip/passlane"&gt;Passlane, and I made it available in Github&lt;/a&gt;. It had all the features I needed: I could add, edit, and delete passwords. I could search for passwords in the vault and use them. I could also generate new passwords. I was actually using the program as a replacement for Dashlane.&lt;/p&gt;

&lt;p&gt;At this point, I stopped learning Rust for a few months and moved on to other hobby projects that interested me more at the time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Coming back to Rust again
&lt;/h2&gt;

&lt;p&gt;After a year, I decided to return to Rust and continue learning it. This time, I bought some physical books about Rust from Amazon. Armed with these books, I resumed reading and learning, and I also started working on the password manager project again. I began heavily refactoring the messy code I had written earlier. As I learned more about Rust, I replaced huge parts of the codebase. I delved into traits, lifetimes, error handling, and many other concepts. With each new piece of knowledge, I revisited the password manager codebase.&lt;/p&gt;

&lt;p&gt;When I learned about async programming, I realized that for my CLI-based project, I didn't really need async. So, I removed all async code and the Tokio runtime, which significantly simplified the code.&lt;/p&gt;

&lt;p&gt;When I studied error handling and the ? operator, I replaced all the unwrap() calls with ?. I embraced the Result type, implemented my own Error type, and used it throughout the codebase. This made the codebase simpler—and simpler is usually better.&lt;/p&gt;

&lt;p&gt;I also studied the Rust module system and refactored the codebase to use modules and much smaller files. This was another improvement.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This process of studying and then immediately applying my new knowledge to the fairly large codebase of my project was the core of my learning process. This approach really solidified my understanding. In my opinion, it's the most effective way to learn a programming language.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can see my extensive rewriting and refactoring in the &lt;a href="https://github.com/anssip/passlane/commits/master/"&gt;commit history&lt;/a&gt; of the project. I also significantly changed the functionality by switching to Keepass as the storage backend in version 2.3.0 of the app. This change was made to ensure users could trust that I was taking the right steps to keep their data safe. Additionally, I added support for TOTP codes (Timed One-Time Passwords) for 2-factor authentication.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusions
&lt;/h2&gt;

&lt;p&gt;My conclusion is this: When learning programming, you should write code as much as possible. At the same time, read books and documentation. Use AI and chatbots to ask questions. Asking for help from tools like Copilot and ChatGPT can be very effective ways to learn, but that’s a topic for another blog post.&lt;/p&gt;

&lt;h2&gt;
  
  
  The project
&lt;/h2&gt;

&lt;p&gt;I have my password manager &lt;a href="https://github.com/anssip/passlane"&gt;available in Github&lt;/a&gt;. At this point in time, I’m quite proud of it. Check it out and let me know what you think!&lt;/p&gt;

&lt;p&gt;--&lt;br&gt;
This post originally appeared at &lt;a href="https://anssipiirainen.com/post/learning-rust/"&gt;anssipiirainen.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>rust</category>
      <category>cli</category>
      <category>programming</category>
    </item>
    <item>
      <title>Moved my blog from Squarespace to Hugo and AWS</title>
      <dc:creator>Anssi Piirainen</dc:creator>
      <pubDate>Wed, 22 Apr 2020 07:33:52 +0000</pubDate>
      <link>https://dev.to/anssip/moved-my-blog-from-squarespace-to-hugo-and-aws-4jnj</link>
      <guid>https://dev.to/anssip/moved-my-blog-from-squarespace-to-hugo-and-aws-4jnj</guid>
      <description>&lt;p&gt;A week ago, I decided to set up a new website for this blog. Somehow I always have the urge to learn something new. Just programming with the same old tools and languages becomes boring, and something new is needed to spice up my life.&lt;/p&gt;

&lt;p&gt;This year I have been blogging "a lot". Writing is an area that I want to keep on doing also in the future. Up until this point, my blog was in Squarespace. I felt that I wanted to improve my blogging workflow: It should be easier for me to work on, and the result should be better looking and friendlier for the reader. I also wanted to learn something new while building my new blogging "platform".&lt;/p&gt;

&lt;p&gt;I ended up building this website using &lt;a href="https://gohugo.io/"&gt;Hugo&lt;/a&gt;. Hugo is a static site generator and provides a developer-friendly "hands-on" experience for the user. It's a totally different experience than the GUI centered approach that Squarespace offers. With Hugo, everything happens in a text editor and in the command-line interface.&lt;/p&gt;

&lt;p&gt;Hugo is implemented using the Go programming language. I am interested in learning Go, and one big reason for choosing Hugo was to get some exposure to Go.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deployment
&lt;/h2&gt;

&lt;p&gt;This blog is deployed in Amazon S3 using Hugo Deploy. It's using Cloudfront as the CDN. &lt;/p&gt;

&lt;p&gt;I used a nifty trick to enable a piece of URL rewriting using &lt;em&gt;Lambda@Edge&lt;/em&gt; to enable directory index documents. For example, the path of this page is &lt;code&gt;/post/new-blog-site/&lt;/code&gt; and this needs to be mapped to &lt;code&gt;/post/new-blog-site/index.html&lt;/code&gt; because the actual page &lt;code&gt;index.html&lt;/code&gt; file recides in that path in the S3 bucket. With a quick web search, I found out that this can be achieved using a &lt;a href="https://aws.amazon.com/blogs/compute/implementing-default-directory-indexes-in-amazon-s3-backed-amazon-cloudfront-origins-using-lambdaedge/"&gt;Lambda script that is deployed and runs in all Cloudfront edge locations&lt;/a&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  The result
&lt;/h2&gt;

&lt;p&gt;As you can see from the looks of this site, this is quite bare-bones. It looks nerdy. Just like I wanted it to look like 😄&lt;/p&gt;

&lt;p&gt;I have direct access to the CSS files, which is great, because I also want to improve my styling skills. &lt;/p&gt;

&lt;p&gt;The page templates are there available for hacking whenever I feel the need to work on the site layout or on additional features. I could integrate a mailing list to this site eventually, for example. The &lt;a href="https://golang.org/pkg/text/template/"&gt;Go page templating system&lt;/a&gt; seems powerful.&lt;/p&gt;

&lt;p&gt;I can now write the blog posts without leaving my favorite text editor, Visual Studio Code. I write my blog posts in Markdown which is a format that Hugo directly understands. Previously I had to copy/paste all text to the post UI in Squarespace website, and now, with Hugo, my workflow is more straightforward: The markdown file sits in Hugo's content directory all the time when I work on it.&lt;/p&gt;

&lt;p&gt;I just found out that there is a Grammarly plugin for Visual Studio Code. I use Grammarly for checking the spelling grammar of my posts. The VSCode plugin seems a bit flaky at the moment, but it could be a great addition to my workflow. &lt;/p&gt;




&lt;p&gt;&lt;em&gt;This post originally appeared in &lt;a href="https://anssipiirainen.com"&gt;https://anssipiirainen.com&lt;/a&gt; on 21th March, 2020&lt;/em&gt;&lt;/p&gt;

</description>
      <category>blogging</category>
      <category>webdev</category>
      <category>aws</category>
      <category>html</category>
    </item>
    <item>
      <title>Best career options for ageing developers</title>
      <dc:creator>Anssi Piirainen</dc:creator>
      <pubDate>Fri, 17 Jan 2020 10:31:26 +0000</pubDate>
      <link>https://dev.to/anssip/best-career-options-for-ageing-developers-1dp2</link>
      <guid>https://dev.to/anssip/best-career-options-for-ageing-developers-1dp2</guid>
      <description>&lt;p&gt;Originally posted in &lt;a href="https://anssipiirainen.com/"&gt;Anssi's blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The half-life of a programmer is short. According to this New York Times article from 1998, only 19% of programmers are still working as programmers 20 years after they started their career as a programmer. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Six years after finishing college, 57 percent of computer science graduates are working as programmers; at 15 years the figure drops to 34 percent, and at 20 years — when most are still only in their early 40’s — it is down to 19 percent.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This same phenomenon is still alive today. Programmers drift away from their original work and move to management and other roles that have little to do with the programming profession.&lt;/p&gt;

&lt;p&gt;I have always thought that this is sad. In my mind, management is something that almost anyone can do. It does not require any special skills or knowledge. Take a 2-month course in project management, and you will be able to do a reasonable job at it. Contrast that to the art of programming, which is a specialised skill that requires years of studying and practising before you can call yourself good at it.   &lt;/p&gt;

&lt;p&gt;Sadly, some of the best programmers get “promoted” to management roles. In this blog post, I explain some of the benefits of staying hands-on with programming throughout your whole career.  &lt;/p&gt;

&lt;h2&gt;
  
  
  Learning strategies
&lt;/h2&gt;

&lt;p&gt;Things change a lot in the IT industry, and the career of an IT professional requires constant learning throughout the whole career.   &lt;/p&gt;

&lt;p&gt;Let’s consider two different strategies that you can take when it comes to learning new technology during your career.    &lt;/p&gt;

&lt;p&gt;The first strategy is to stay on the same technology platform and hone your skills in it. &lt;/p&gt;

&lt;p&gt;The second strategy is to take more significant leaps and choose to keep current with the latest development trends and innovation, regardless of where it happens. &lt;/p&gt;

&lt;h3&gt;
  
  
  If you got it, flaunt it
&lt;/h3&gt;

&lt;p&gt;Let’s consider the first option first. You have some hard-gained experience on platform X and you want to keep flaunting that. This platform might not be the most fashionable right at this moment. It’s not where the most action and innovation is happening right now. Take Java, and consider that as an example. Java is still the most popular language today, but one would argue that it’s no longer the most fashionable one. It’s not the place to be where the innovators are at the moment. But because it has been hugely popular for many years, it will undoubtedly be in high demand for 40 years to come. Because of this reason, you will not be out of work if you choose to continue working on the Java platform.  &lt;/p&gt;

&lt;p&gt;Surprisingly, even COBOL which was created in 1959, continues to be relevant in some industry sectors. Apparently, Cobol developers are still in high demand. If you now Cobol and money is your primary motivator, it makes sense to continue and exploit this opportunity until it dries out. They are predicting that Cobol will stay a significant language for the next 20 years.  &lt;/p&gt;

&lt;p&gt;There might be good money to be made if you stay on a legacy technology platform, but this could be a boring strategy to take. The chances are that you will not enjoy this! A better option would be to keep learning new things because that is a way to stay motivated in your work. Let’s explore that option next. &lt;/p&gt;

&lt;h3&gt;
  
  
  Learn something completely new
&lt;/h3&gt;

&lt;p&gt;Some of us want to keep up with the latest technology. We get bored if we need to work with the current tools and frameworks for more than a year or two. We want to learn new programming languages, new programming paradigms, and new tools and libraries.   &lt;/p&gt;

&lt;p&gt;If you are one of the few, who has not given up for the temptation to become a Manager, you have likely kept on learning all the time, and that has kept you motivated to continue in a technical career.  &lt;/p&gt;

&lt;p&gt;There is a study of StackOverflow data that explores the relationship between ageing and programming knowledge.   &lt;/p&gt;

&lt;p&gt;We observe that programmer reputation scores increase relative to age well into the 50’s.&lt;/p&gt;

&lt;p&gt;According to this study, your programming related knowledge increases with age. Programmers can learn and acquire new skills and knowledge well into the age of the 50 and older. Learning is not only a privilege of the young.   &lt;/p&gt;

&lt;p&gt;You can move into a completely new technology platform if you want. It can require significant investments of time and effort to learn the latest technology, but rewards of learning can be marvellous. You will be again in a place where the primary action is and where the bets of startups and innovating companies are. This kind of leaps in learning can be extremely motivating. &lt;/p&gt;

&lt;h2&gt;
  
  
  Go to Management
&lt;/h2&gt;

&lt;p&gt;It feels like a promotion when you get an offer to be a manager. You have worked hard to become an excellent developer, and the management has noticed this. Your boss knows that you are the best in your team. One day there is a management position that the company need to fill, and they offer this position to you. What do you say? The job is challenging, and if you accept to take it, you will not have too much time for programming any more. Do you accept the offer and become a manager?&lt;/p&gt;

&lt;p&gt;I decided to say “yes” when my boss asked this question from me some 20 years ago. I never wanted to be a team leader, but still, I accepted the job. It feels like promotion, and as an ambitious person, it was too hard for me to reject the offer and challenge. That said, I have never regretted making this decision. I learned a lot by taking the time to learn Scrum and in doing my best to lead a development team.   &lt;/p&gt;

&lt;p&gt;All the time, I tried to keep my hands dirty in programming. I had my side project with, and that kept me busy during my free time. Despite my efforts to stay hands-on with programming, I was not learning programming related things as much as before.   &lt;/p&gt;

&lt;p&gt;One can argue that my programming career was in decline because of my decision to go to the dark side of management. The temptations of the dark side are the reason for the short half-life of programmers. If you stay in a management role for too long, and you can no longer compete with the young fresh-out-of-school developers that are coming to the workforce.  &lt;/p&gt;

&lt;p&gt;In my case, things turned out good. I decided to leave my day job and start my own business, and that again involved a lot of coding.  &lt;/p&gt;

&lt;h2&gt;
  
  
  Embrace the benefits related to your age
&lt;/h2&gt;

&lt;p&gt;At the age of 40 or 50, you will have more time in your hands than before. Consider the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Your kids are already teenagers or adults. They might have moved out of the house already. , In any case, they are not spending much time with you any more.  This is great :-) &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Your marriage has gotten old as well, and your partner does not require much attention from you any more. This is also great. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;During your 20-30 years of professional life, you have gained a lot of expertise. You know about corporate politics, how businesses operate, how to do teamwork, how to recruit new people, how to train junior workers, etc. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You have the &lt;em&gt;soft skills&lt;/em&gt; that the younger workers are still missing. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At this age would be the perfect time to start a business. According to research done in 2018, The Average Age of a Successful Startup Founder Is 45.&lt;/p&gt;

&lt;p&gt;The founders of successful startups are indeed this old, and we need to debunk the myth of the young entrepreneur. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Relative to founders with no relevant experience, those with at least three years of prior work experience in the same narrow industry as their startup were 85% more likely to launch a highly successful startup.  &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I realise that the startup game is not everyone, but for anyone who has dreamed of having a business of their own, this could be the perfect age to pursue that dream. You have more time than ever in your hands to make it happen, and on top of that you also have the work experience to increase the likelihood of success. &lt;/p&gt;

&lt;p&gt;I started my first business at the age of 37. My open-source side project hobby started getting so popular that it made it possible for me to earn my income from it. I quit my day job and pursued my Flowplayer project full time as a business. This adventure as an entrepreneur lasted for ten years, but then, after some twists and turns, I exited from Flowplayer two years ago.&lt;/p&gt;

&lt;p&gt;Today, I’m working as a Freelance developer and enjoying my work more than ever before. I’m again focusing almost entirely on programming.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusions
&lt;/h2&gt;

&lt;p&gt;Being a programmer is great, and your career can take many shapes and forms. You can continue programming for as long as you want. You have the potential to learn new skills and gains knowledge for as long as you need. Starting your own business, or switching technology platforms, are options that you can basically at any point during your career.  &lt;/p&gt;

&lt;p&gt;Just do it and enjoy the ride!&lt;/p&gt;

</description>
      <category>career</category>
      <category>startup</category>
    </item>
    <item>
      <title>Why you should learn Functional Programming</title>
      <dc:creator>Anssi Piirainen</dc:creator>
      <pubDate>Mon, 13 Jan 2020 06:32:05 +0000</pubDate>
      <link>https://dev.to/anssip/why-you-should-learn-functional-programming-3h2g</link>
      <guid>https://dev.to/anssip/why-you-should-learn-functional-programming-3h2g</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally posted in &lt;a href="https://anssipiirainen.com/blog/learning-fp"&gt;Anssi's blog&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;The first 10 years of my programming career, I was doing Object-Oriented (OO) programming in Java. I pretty much mastered the art of Object-Oriented programming as I had learned the design patterns to help me in coming up with class structures that avoid code duplication, and are flexible and adaptable for future change. My code was full of classes.&lt;/p&gt;

&lt;p&gt;Things started changing when I picked up JavaScript, which did not force me to put all my code into classes. In my first JavaScript projects, the codebase still resembled the ones that I had been putting together with Java. I was not using classes, but despite this, some of the files still had a look&amp;amp;feel of a class. The code had modules that grouped functions that were somehow logically related to each other, just like a typical "service" class in Java would have.&lt;/p&gt;

&lt;p&gt;Today I have programmed in JavaScript for more than 5 years, and my coding has evolved a bit. I have started to think of my programs as data processors. There is always some data that needs to be processed. I think about what kind of processors and functions are needed to transform the data. My studying of Functional Programming has profoundly influenced me, and this data-centric approach arises from this studying and learning.&lt;/p&gt;

&lt;p&gt;In this blog piece, I explain why it has made sense for me to study FP and why you should also learn it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Benefits
&lt;/h2&gt;

&lt;p&gt;Experienced functional programmers can tell you about the many benefits of functional programming:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Functional code is easier to understand&lt;/li&gt;
&lt;li&gt;There are fewer bugs&lt;/li&gt;
&lt;li&gt;The code is more compact&lt;/li&gt;
&lt;li&gt;Some even claim that it's easier to test and debug&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I agree with these claims. The difference between paradigms is easy to see If we take a non-trivial programming challenge that has implementations both in a functional and in a traditional imperative style.&lt;/p&gt;

&lt;p&gt;Imperative implementations for a complex problem can be hairy with nested loops and nested if-then-else statements, class inheritance structures and all the things that we typically see in imperative programs.&lt;/p&gt;

&lt;p&gt;Have you ever studied a big object-oriented program that was done by an experienced OO practitioner? One that is well-factored to use classes with clear responsibilities. One that does not have any duplicated code and is &lt;em&gt;DRY&lt;/em&gt;. Factoring code into classes with distinct, clear responsibilities removes code duplication. This kind of designs can include several hundreds of classes. It can be tough to see how this program works and how the different classes work during runtime.&lt;/p&gt;

&lt;p&gt;A well-factored functional implementation, on the other hand, might look scary when you first look at it, but after a little bit of studying, you should be able to understand the pieces (pure functions) that it has and how those are composed together.&lt;/p&gt;

&lt;p&gt;You can understand each function in isolation. You can trust that the program does what is promised.&lt;/p&gt;

&lt;h2&gt;
  
  
  Challenges
&lt;/h2&gt;

&lt;p&gt;Contrary to what I just said in the paragraphs above, functional programs can be &lt;strong&gt;hard to understand&lt;/strong&gt; for programmers that are not familiar with the functional style. Functional code can look quite different than the imperative counterpart. You cannot see many occurrences of elements that you are used to seeing in code: There are not many if statement, or for loops, for example.&lt;/p&gt;

&lt;p&gt;All you can see is a bunch of small functions and weird-looking &lt;strong&gt;compose()&lt;/strong&gt;, and &lt;strong&gt;pipe()&lt;/strong&gt; calls that might make no sense to you are not yet familiar with these concepts.&lt;/p&gt;

&lt;p&gt;There is a learning curve to understanding FP. First of all, you need to study the basics, and once you know the basics, you can start ramping up your knowledge little by little. There is a lot to learn before you are a master FP practitioner. I have been on this learning streak for one year now, and I'm still at the beginning of my journey. I'm sure that I'll reach the master-level status someday if I just continue working hard towards that goal.&lt;/p&gt;

&lt;p&gt;I have a 10-year history with object-oriented programming using Java. I was a huge fan of the Eric Evans' book Domain Driven Design and took it's teachings about Entities, Services and Value Objects seriously. I have implemented thousands of classes using the patterns explained in the Domain Driven Design and the GoF Design Patterns books. Because of this background of mine, FP made little sense to me when I first looked at it.&lt;/p&gt;

&lt;p&gt;I found debugging functional code to be challenging. Where do you add your breakpoints, when all you have is a list of functions linked together using pipe? Debugging is another area where you need to learn new tricks because the old ones don't work with FP. Luckily there are &lt;a href="https://itnext.io/debugging-functional-javascript-545b6ea59660"&gt;plenty of strategies&lt;/a&gt; for debugging functional code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learning Functional Programming
&lt;/h2&gt;

&lt;p&gt;Why would you take the effort and learn FP? I guess the most important reason is that learning it makes you a better programmer. You can benefit from knowing about FP even if you continue doing object-oriented programming. Making functions &lt;em&gt;pure&lt;/em&gt; and favouring immutability are great habits, no matter what your primary programming paradigm and programming language are.&lt;/p&gt;

&lt;p&gt;You don't need to go full-on with functional and scare your co-workers by coming up with code that is so full of currying [link] that you need a degree in Indian cuisine to understand it. I would recommend Kyle Simpson's book &lt;a href="https://www.amazon.com/gp/product/B0787DBFKH/ref=as_li_tl?camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=B0787DBFKH&amp;amp;ie=UTF8&amp;amp;linkCode=as2&amp;amp;linkId=8829f80951edd7eec8b8f1178e11ac86&amp;amp;tag=anssipiiraine-20"&gt;Functional-Light JavaScript&lt;/a&gt; to get you started. It provides a pragmatic, balanced way of doing FP in your JavaScript projects. It is the book that got me started with FP.&lt;/p&gt;

&lt;p&gt;Ramda is an excellent functional toolkit library for JavaScript. You need something like it to ease your life. It contains the functional "primitives" that you can start using in your real-life projects.&lt;/p&gt;

&lt;p&gt;Mastering FP takes time. I'm at the beginning of my journey, and my journey so far has looked like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;I read the Functional-Light JavaScript book and got excited&lt;/li&gt;
&lt;li&gt;I started sprinkling in FP to my daily projects. I started making my functions pure and started avoiding mutating my data.&lt;/li&gt;
&lt;li&gt;But then I got busy with daily projects, and my FP learning ambitions got sidelined...&lt;/li&gt;
&lt;li&gt;Then luckily, I became less busy again, and my FP learning was back on track.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I think it's essential always to study and learn more. In this profession, it's a must. If you stop learning and improving, more ambitious programmers overshadow and take over you. Eventually, you give up programming and become a Manager and, for sure, that is a scenario that every self-respecting programmer wants to avoid :-)&lt;/p&gt;

</description>
      <category>functional</category>
      <category>javascript</category>
      <category>ramda</category>
      <category>career</category>
    </item>
  </channel>
</rss>
