<?xml version="1.0" encoding="utf-8" ?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:tt="http://teletype.in/" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"><title>Alexey Tcherniak</title><subtitle>I'm software developer with more then 15 years of experience. I focus on programming C# and WPF. In this blog I'll try to share my experience.</subtitle><author><name>Alexey Tcherniak</name></author><id>https://teletype.in/atom/perfolancer</id><link rel="self" type="application/atom+xml" href="https://teletype.in/atom/perfolancer?offset=0"></link><link rel="alternate" type="text/html" href="https://blog.perfolancer.com/?utm_source=teletype&amp;utm_medium=feed_atom&amp;utm_campaign=perfolancer"></link><link rel="next" type="application/rss+xml" href="https://teletype.in/atom/perfolancer?offset=10"></link><link rel="search" type="application/opensearchdescription+xml" title="Teletype" href="https://teletype.in/opensearch.xml"></link><updated>2026-05-06T09:28:08.987Z</updated><entry><id>perfolancer:do_rGJNqvQf</id><link rel="alternate" type="text/html" href="https://blog.perfolancer.com/do_rGJNqvQf?utm_source=teletype&amp;utm_medium=feed_atom&amp;utm_campaign=perfolancer"></link><title> Top freelancing platforms in 2023</title><published>2023-04-07T02:17:55.713Z</published><updated>2023-04-07T02:32:25.745Z</updated><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img2.teletype.in/files/1f/3f/1f3fc921-ac52-4ddb-ad2b-a77a685f72e5.png"></media:thumbnail><category term="freelance" label="Freelance"></category><summary type="html">Which freelance platform is best for me❔ 🤔 How would I determine where to start my freelancing journey and how all those freelance platforms are different❔😕</summary><content type="html">
  &lt;p id=&quot;oiVg&quot;&gt;&lt;strong&gt;Which freelance platform is best for me❔ 🤔 How would I determine where to start my freelancing journey and how all those freelance platforms are different❔😕&lt;/strong&gt;&lt;/p&gt;
  &lt;p id=&quot;ixct&quot;&gt;&lt;/p&gt;
  &lt;p id=&quot;nAy6&quot;&gt;&lt;em&gt;To those who are just thinking to try freelance work, these list would be help full. I try not only list best of freelance websites here, but also to review their pros and cons.&lt;/em&gt;&lt;/p&gt;
  &lt;p id=&quot;id7W&quot;&gt;&lt;/p&gt;
  &lt;p id=&quot;duIt&quot;&gt;➡️ If you like this content, follow me and subscribe to my &lt;a href=&quot;https://t.me/+enfM9Do5fU4zMmQy&quot; target=&quot;_blank&quot;&gt;Telegram channel&lt;/a&gt;&lt;/p&gt;
  &lt;p id=&quot;WCST&quot;&gt;&lt;/p&gt;
  &lt;hr /&gt;
  &lt;h3 id=&quot;Ku5I&quot;&gt;&lt;/h3&gt;
  &lt;h3 id=&quot;GS70&quot;&gt;🔰 Top 5 most popular freelance platforms to start from 🔰&lt;/h3&gt;
  &lt;p id=&quot;oT6D&quot;&gt;&lt;/p&gt;
  &lt;p id=&quot;XdDv&quot;&gt;&lt;/p&gt;
  &lt;p id=&quot;gmUI&quot;&gt;➡️ &lt;strong&gt;&lt;a href=&quot;https://www.upwork.com/&quot; target=&quot;_blank&quot;&gt;Upwork&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
  &lt;p id=&quot;dVCI&quot;&gt;We all know the most popular and large freelance hub is Upwork. Anyone who is looking for flexibility in their job should definitely check out this freelance platform.&lt;/p&gt;
  &lt;p id=&quot;lbfm&quot;&gt;With Upwork, clients can post jobs and wait for skilled freelancers to apply. Also they can hire workers who specialize in particular tasks contacting them directly or using the Project Catalog.&lt;/p&gt;
  &lt;p id=&quot;Dhfe&quot;&gt;To get started as a freelancer with Upwork, begin by creating a profile. Ensure it includes details about yourself, your expertise, and your work experience. You can wait to be discovered by clients or respond to job posts directly. Keep in mind that clients will decide whether you’re qualified by scanning through your profile.&lt;/p&gt;
  &lt;p id=&quot;ZquZ&quot;&gt;&lt;/p&gt;
  &lt;p id=&quot;xMSC&quot;&gt;✅ Major benefits of the Upwork platform are:&lt;/p&gt;
  &lt;p id=&quot;ShrG&quot;&gt;🔹 Payment protection for clients and freelancers&lt;/p&gt;
  &lt;p id=&quot;s895&quot;&gt;🔹 Get paid in variety of ways, such as Payoneer, PayPal or direct transfer&lt;/p&gt;
  &lt;p id=&quot;O8Fr&quot;&gt;🔹 Largest client base from all over the world&lt;/p&gt;
  &lt;p id=&quot;8w2F&quot;&gt;&lt;/p&gt;
  &lt;p id=&quot;gZlg&quot;&gt;❎ However, there are some disadvantages as well:&lt;/p&gt;
  &lt;p id=&quot;cZLu&quot;&gt;🔹 Relatively high service fee (10% + VAT)&lt;/p&gt;
  &lt;p id=&quot;QOVJ&quot;&gt;🔹 Competition among freelancers is very high&lt;/p&gt;
  &lt;p id=&quot;e1HL&quot;&gt;🔹 Being hired is especially difficult for beginners without reviews and feedback&lt;/p&gt;
  &lt;p id=&quot;kvls&quot;&gt;&lt;/p&gt;
  &lt;hr /&gt;
  &lt;p id=&quot;13e3&quot;&gt;&lt;/p&gt;
  &lt;p id=&quot;NDSL&quot;&gt;➡️ &lt;strong&gt;&lt;a href=&quot;https://www.freelancer.com/&quot; target=&quot;_blank&quot;&gt;Freelancer.com&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
  &lt;p id=&quot;t579&quot;&gt;Freelancer.com is another biggest player in the world of freelance with a global pool of more than 50 million users.&lt;/p&gt;
  &lt;p id=&quot;jFv4&quot;&gt;Clients can list jobs on this site and wait for bids to arrive, while freelancers can bid for jobs, providing additional information about yourself and what you can do for the project. Freelancer.com also has Contests, similar to auctions, where you can submit your bid and see other people’s public bids for the project.&lt;/p&gt;
  &lt;p id=&quot;o1pq&quot;&gt;As with Upwork, it can be hard to compete with more experienced freelancers – you may have to accept low-paying jobs as you build a reputation. You can also become a Preferred Freelancer and get access to higher-value projects and get invited to bid for exclusive projects.&lt;/p&gt;
  &lt;p id=&quot;zgLP&quot;&gt;The platform fee from fixed-price project is 10% or $5, whichever is higher, immediately charged before-hand. If you accept an hourly project, you only pay 10% fee when it’s completed.&lt;/p&gt;
  &lt;p id=&quot;gOCX&quot;&gt;There are additional expenses to succeed here: to become Verified freelancer, you’ll have to spend $99, and Preferred Freelancers must pay project fees at a higher rate of 15%.&lt;/p&gt;
  &lt;p id=&quot;w0WM&quot;&gt;&lt;/p&gt;
  &lt;p id=&quot;AYHS&quot;&gt;✅ Major benefits of the @Freelancer.com platform are:&lt;/p&gt;
  &lt;p id=&quot;Ml3G&quot;&gt;🔹 Very easy to use and straightforward for both clients and freelancers.&lt;/p&gt;
  &lt;p id=&quot;jXmh&quot;&gt;🔹 Very slick and fast design, convenient messaging between clients and candidates.&lt;/p&gt;
  &lt;p id=&quot;B8F2&quot;&gt;🔹 Freelancer profile can be verified and provide a lot of useful information.&lt;/p&gt;
  &lt;p id=&quot;dqH8&quot;&gt;&lt;/p&gt;
  &lt;p id=&quot;lAg0&quot;&gt;❎ Some disadvantages are:&lt;/p&gt;
  &lt;p id=&quot;kaHC&quot;&gt;🔹 Freelancer.com is probably more expensive than other platforms.&lt;/p&gt;
  &lt;p id=&quot;eQ1f&quot;&gt;🔹 Competition is very high, especially for newcomers.&lt;/p&gt;
  &lt;p id=&quot;2IUe&quot;&gt;🔹 There are more cheap one-time projects and fewer high-paid jobs.&lt;/p&gt;
  &lt;p id=&quot;v3wP&quot;&gt;&lt;/p&gt;
  &lt;hr /&gt;
  &lt;p id=&quot;QSHH&quot;&gt;&lt;/p&gt;
  &lt;p id=&quot;G7s4&quot;&gt;➡️ &lt;strong&gt;&lt;a href=&quot;https://www.fiverr.com/&quot; target=&quot;_blank&quot;&gt;Fiverr&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
  &lt;p id=&quot;9EHg&quot;&gt;The concept behind Fiverr is a stunning products catalog, where each item called Gig represent a simple unit of work, like a web page development, single page translation, a logo design, etc. Fiverr got its name from its $5 price tag that was on all the Gigs on its platform when it launched in 2010. Today, as a seller, you can charge anywhere between $5 to $10,000 for your Gigs. Fiverr charges you a 20% commission on every sale you make – including your $5 Gigs.&lt;/p&gt;
  &lt;p id=&quot;RWzJ&quot;&gt;From buyers, Fiverr charges a service fee of 5.5% of each payment being made. Purchases under $50 charged a service fee of $2.&lt;/p&gt;
  &lt;p id=&quot;tdwi&quot;&gt;Fiverr has 4 Seller Levels based on delivery time, customer satisfaction, and service quality: New, Level 1, Level 2 and Top-rated. You start as a new seller, which can offer as many as 7 active Gigs at a time. As you sell for 60 days and meet other requirements, you’ll be moved to the next level. Keep selling to achieve Top Rated seller level.&lt;/p&gt;
  &lt;p id=&quot;h0qc&quot;&gt;Best Fiverr sellers can apply for Fiverr Pro status. Only 1% of exceptionally talented, hand-vetted applicants earn Pro status.&lt;/p&gt;
  &lt;p id=&quot;NsBV&quot;&gt;&lt;/p&gt;
  &lt;p id=&quot;GO9P&quot;&gt;✅ Major benefits of the @Fiverr platform are:&lt;/p&gt;
  &lt;p id=&quot;2SmW&quot;&gt;🔹 Gigs are easy to search, understand and order. You can sell virtually anything. Clients get what they pay for.&lt;/p&gt;
  &lt;p id=&quot;8cHx&quot;&gt;🔹 Higher Seller Levels get more clients. Clients can filter out undesirable Seller Levels.&lt;/p&gt;
  &lt;p id=&quot;4bS4&quot;&gt;🔹 Fiverr Pro status allows to stand out of the competition.&lt;/p&gt;
  &lt;p id=&quot;jHpw&quot;&gt;&lt;/p&gt;
  &lt;p id=&quot;d0st&quot;&gt;❎ Some disadvantages are:&lt;/p&gt;
  &lt;p id=&quot;SyU0&quot;&gt;🔹 The service fee is expensive for freelancers.&lt;/p&gt;
  &lt;p id=&quot;xEDJ&quot;&gt;🔹 No freelancer screening process except Pro. Your competitors may have fake clients’ reviews and fake portfolios. Also, the catalog is repleted with incompetent and unresponsive sellers.&lt;/p&gt;
  &lt;p id=&quot;YBlD&quot;&gt;🔹 Clients can defraud or blackmail freelancers after they receive your work. Be careful!&lt;/p&gt;
  &lt;p id=&quot;BIqb&quot;&gt;&lt;/p&gt;
  &lt;hr /&gt;
  &lt;p id=&quot;QbJC&quot;&gt;&lt;/p&gt;
  &lt;p id=&quot;NTNI&quot;&gt;➡️ &lt;strong&gt;&lt;a href=&quot;https://www.flexjobs.com/&quot; target=&quot;_blank&quot;&gt;FlexJobs&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
  &lt;p id=&quot;I2xe&quot;&gt;FlexJobs aggregates jobs from other sources all over the internet. What makes FlexJobs special, is you won’t find job scams, too-good-to-be-true business opportunities, ads, commission-only jobs, or junk jobs on FlexJobs. Every job post is first vetted by a real person who spends as much as 30 minutes per job making sure it meets FlexJobs’ rigorous criteria before it is served up to you.&lt;/p&gt;
  &lt;p id=&quot;XGjb&quot;&gt;The service is not free, one month membership is $24.95 and it gets cheaper when you commit to a longer subscription. You can also often save on membership by taking advantage of a promotion and using a coupon code.&lt;/p&gt;
  &lt;p id=&quot;kvXJ&quot;&gt;When you find an interesting job listing, click on it and you’ll see the full details of that job. At the bottom of the page, you’ll see the icon that will take you to the company’s application page. Follow their procedure to apply for the job.&lt;/p&gt;
  &lt;p id=&quot;6u3j&quot;&gt;&lt;/p&gt;
  &lt;p id=&quot;yff2&quot;&gt;✅ Major benefits:&lt;/p&gt;
  &lt;p id=&quot;09wV&quot;&gt;🔹 No scam and fake job postings, hand-screened jobs only.&lt;/p&gt;
  &lt;p id=&quot;CLme&quot;&gt;🔹 Thousands of jobs, categorized by remote, part-time, hybrid, freelance options.&lt;/p&gt;
  &lt;p id=&quot;wmkS&quot;&gt;🔹 Free access to a large collection of FlexJobs skill tests and Learning Center with video courses.&lt;/p&gt;
  &lt;p id=&quot;WBrb&quot;&gt;&lt;/p&gt;
  &lt;p id=&quot;FaMC&quot;&gt;❎ Disadvantages:&lt;/p&gt;
  &lt;p id=&quot;ZeyC&quot;&gt;🔹 You’re paying for the aggregate service.You still have to apply individually with your resume for each job that interest you.&lt;/p&gt;
  &lt;p id=&quot;BtrE&quot;&gt;🔹 It’s not a dedicated freelancing site. It has different categories like remote, part-time etc. Expect to find ~2000 freelance jobs overall.&lt;/p&gt;
  &lt;p id=&quot;bNDo&quot;&gt;🔹 Monthly membership fee. There’s no guarantee that your dream job will be there waiting the very first time you browse the job listings.&lt;/p&gt;
  &lt;p id=&quot;N1BF&quot;&gt;&lt;/p&gt;
  &lt;hr /&gt;
  &lt;p id=&quot;lmET&quot;&gt;&lt;/p&gt;
  &lt;p id=&quot;b4Sj&quot;&gt;➡️ &lt;strong&gt;&lt;a href=&quot;https://www.toptal.com/&quot; target=&quot;_blank&quot;&gt;Toptal&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
  &lt;p id=&quot;wZ4f&quot;&gt;Toptal is a high-end freelancing website with only most professional vetted freelancers.&lt;/p&gt;
  &lt;p id=&quot;SWWO&quot;&gt;Any freelancer can apply to join Toptal’s talent network, but they must to pass trough a slow and rigorous screening process which is much harder than the vetting process at platforms like Upwork or Fiverr.&lt;/p&gt;
  &lt;p id=&quot;fRBo&quot;&gt;The key idea is that freelancers need to pass various tests for English language, skill reviews, a live screening, and test projects. Toptal claims they only accept 3% of the freelancer applications that they see each month.&lt;/p&gt;
  &lt;p id=&quot;Dbs4&quot;&gt;Toptal doesn&amp;#x27;t take any commission from freelancers. Instead, they add their service fee on top of the freelancer’s rate and present it to hiring companies as a unified rate. Average hourly rates of Toptal’s developers receive are $40-$75.&lt;/p&gt;
  &lt;p id=&quot;VVIX&quot;&gt;&lt;/p&gt;
  &lt;p id=&quot;6Dvm&quot;&gt;✅ Major benefits:&lt;/p&gt;
  &lt;p id=&quot;yrRf&quot;&gt;🔹 Expect top clients, no fraud, long-term projects.&lt;/p&gt;
  &lt;p id=&quot;ZX70&quot;&gt;🔹 Toptal provides access to elite talent. No competitors from low- or mid-tier freelancers.&lt;/p&gt;
  &lt;p id=&quot;KOjy&quot;&gt;🔹 You can select projects and set your rate, Toptal will negotiate on your behalf to get your desired rate and will take care of the rest.&lt;/p&gt;
  &lt;p id=&quot;DwiE&quot;&gt;&lt;/p&gt;
  &lt;p id=&quot;ZELo&quot;&gt;❎ Disadvantages:&lt;/p&gt;
  &lt;p id=&quot;ccoH&quot;&gt;🔹 Toptal is mostly about tech jobs. Writing, photography, music is not presented here.&lt;/p&gt;
  &lt;p id=&quot;G5bq&quot;&gt;🔹 Screening process is extremely complicated. Not many freelancers can pass all tests.&lt;/p&gt;
  &lt;p id=&quot;6gAP&quot;&gt;🔹 Hourly rates are typically not higher than you can expect working on other platforms, if you’re a real pro.&lt;/p&gt;
  &lt;p id=&quot;mXFl&quot;&gt;&lt;/p&gt;
  &lt;hr /&gt;

</content></entry><entry><id>perfolancer:functional_programming_in_csharp</id><link rel="alternate" type="text/html" href="https://blog.perfolancer.com/functional_programming_in_csharp?utm_source=teletype&amp;utm_medium=feed_atom&amp;utm_campaign=perfolancer"></link><title>Functional programming in C#</title><published>2023-03-24T15:03:15.260Z</published><updated>2023-03-24T19:01:20.271Z</updated><category term="mastering-c" label="Mastering C#"></category><summary type="html">&lt;img src=&quot;https://img4.teletype.in/files/b0/ae/b0ae5995-9798-4b55-b8d2-4c5001fd0759.jpeg&quot;&gt;Functional programming is a programming paradigm that emphasizes the use of functions as the primary building block for software development. While historically associated with languages such as Haskell and Lisp, functional programming is also becoming increasingly popular in mainstream programming languages such as C#. In this article, we'll explore what functional programming is and how it can be applied in C#.</summary><content type="html">
  &lt;figure id=&quot;sEEH&quot; class=&quot;m_column&quot; data-caption-align=&quot;right&quot;&gt;
    &lt;img src=&quot;https://img4.teletype.in/files/b0/ae/b0ae5995-9798-4b55-b8d2-4c5001fd0759.jpeg&quot; width=&quot;1280&quot; /&gt;
    &lt;figcaption&gt;Image by &lt;a href=&quot;https://pixabay.com/users/larisa-k-1107275/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=220058&quot; target=&quot;_blank&quot;&gt;Larisa Koshkina&lt;/a&gt; from &lt;a href=&quot;https://pixabay.com//?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=220058&quot; target=&quot;_blank&quot;&gt;Pixabay&lt;/a&gt;&lt;/figcaption&gt;
  &lt;/figure&gt;
  &lt;p id=&quot;I6Ju&quot;&gt;&lt;em&gt;Functional programming is a programming paradigm that emphasizes the use of functions as the primary building block for software development. While historically associated with languages such as Haskell and Lisp, functional programming is also becoming increasingly popular in mainstream programming languages such as C#. In this article, we&amp;#x27;ll explore what functional programming is and how it can be applied in C#.&lt;/em&gt;&lt;/p&gt;
  &lt;section style=&quot;background-color:hsl(hsl(0,   0%,  var(--autocolor-background-lightness, 95%)), 85%, 85%);&quot;&gt;
    &lt;blockquote id=&quot;pNXp&quot;&gt;Subscribe to my Telegram channel:  &lt;a href=&quot;https://t.me/+enfM9Do5fU4zMmQy&quot; target=&quot;_blank&quot;&gt;C# Panda Cook Book&lt;/a&gt;&lt;/blockquote&gt;
  &lt;/section&gt;
  &lt;h5 id=&quot;W3vY&quot;&gt;&lt;strong&gt;What is functional programming?&lt;/strong&gt;&lt;/h5&gt;
  &lt;p id=&quot;rdW0&quot;&gt;Functional programming is a programming paradigm that emphasizes the use of pure functions. Pure functions are functions that always return the same output for a given input and have no side effects. This means that pure functions don&amp;#x27;t modify any state outside of their own scope, which makes them easier to reason about and test.&lt;/p&gt;
  &lt;p id=&quot;MUqO&quot;&gt;In contrast, imperative programming, which is the dominant paradigm in C#, emphasizes the use of statements to change program state. Imperative programming often involves mutable state, which can make it harder to reason about the behavior of a program.&lt;/p&gt;
  &lt;p id=&quot;Kdxu&quot;&gt;Functional programming also emphasizes the use of higher-order functions, which are functions that take other functions as arguments or return functions as their result. This allows for the creation of more modular and composable code, which can lead to increased code reuse and maintainability.&lt;/p&gt;
  &lt;p id=&quot;5aLc&quot;&gt;&lt;/p&gt;
  &lt;h5 id=&quot;oylV&quot;&gt;&lt;strong&gt;Functional programming in C#, also known as C# Pure Functions&lt;/strong&gt;&lt;/h5&gt;
  &lt;p id=&quot;p7c4&quot;&gt;While C# is primarily an imperative language, it does have features that make it possible to write functional code. Some of the key features of C# that enable functional programming include:&lt;/p&gt;
  &lt;ol id=&quot;fITj&quot;&gt;
    &lt;li id=&quot;76qJ&quot;&gt;Anonymous functions and lambda expressions: C# supports the creation of anonymous functions and lambda expressions, which are a concise way to create functions without the need for a named method. This makes it easy to pass functions as arguments to other functions, which is a key feature of functional programming.&lt;/li&gt;
    &lt;li id=&quot;DbDd&quot;&gt;Higher-order functions: C# supports the creation of higher-order functions, which are functions that take other functions as arguments or return functions as their result. This allows for the creation of more modular and composable code.&lt;/li&gt;
    &lt;li id=&quot;nvuO&quot;&gt;Immutable data structures: C# supports the creation of immutable data structures, which are data structures that cannot be modified once they are created. This makes it easier to reason about the behavior of a program and can help prevent bugs related to mutable state.&lt;/li&gt;
    &lt;li id=&quot;GwlO&quot;&gt;LINQ: C# includes LINQ (Language-Integrated Query), which is a set of language extensions that allow for functional-style queries on collections of objects. This makes it easier to write code that is both concise and expressive.&lt;/li&gt;
  &lt;/ol&gt;
  &lt;p id=&quot;rFvS&quot;&gt;Does C# qualify as a functional language? I think, yes. With each new release of the C# language, we have seen a proliferation of functional features in C#.&lt;/p&gt;
  &lt;p id=&quot;4NSz&quot;&gt;For instance, C# 2.0 introduced the ability to pass and return functions as values for higher-order functions via delegates, and supported anonymous delegates to a limited extent. In C# 3.0 and 3.5, anonymous functions were improved to allow for true closures.&lt;/p&gt;
  &lt;p id=&quot;xuzJ&quot;&gt;Subsequently, C#’s LINQ functionality can be viewed as a unique take on Haskell&amp;#x27;s list comprehensions. Haskell is a statically-typed, purely functional programming language that utilizes type inference and lazy evaluation, which are somewhat similar to the type inference capabilities of C# and LINQ.&lt;/p&gt;
  &lt;p id=&quot;INjM&quot;&gt;Additionally, anonymous types in C# bear a resemblance to ML records, a feature of ML, a general-purpose functional programming language.&lt;/p&gt;
  &lt;p id=&quot;RtZb&quot;&gt;&lt;/p&gt;
  &lt;h5 id=&quot;3Lkd&quot;&gt;&lt;strong&gt;Benefits of functional programming in C#&lt;/strong&gt;&lt;/h5&gt;
  &lt;p id=&quot;5GDJ&quot;&gt;There are several benefits to using functional programming in C#, including:&lt;/p&gt;
  &lt;ol id=&quot;duy1&quot;&gt;
    &lt;li id=&quot;B89E&quot;&gt;Improved code maintainability: Functional programming emphasizes modularity and composability, which can lead to code that is easier to maintain and modify over time.&lt;/li&gt;
    &lt;li id=&quot;WgPf&quot;&gt;Improved code reuse: Functional programming emphasizes the use of higher-order functions and immutable data structures, which can lead to code that is more reusable.&lt;/li&gt;
    &lt;li id=&quot;2QtC&quot;&gt;Improved code safety: Functional programming emphasizes the use of pure functions, which are easier to reason about and test. This can lead to code that is less error-prone and more reliable.&lt;/li&gt;
    &lt;li id=&quot;WPRA&quot;&gt;Improved performance: Functional programming can lead to code that is more efficient, as it often involves the use of immutable data structures and lazy evaluation.&lt;/li&gt;
  &lt;/ol&gt;
  &lt;p id=&quot;zKkJ&quot;&gt;&lt;/p&gt;
  &lt;h5 id=&quot;1jiH&quot;&gt;&lt;strong&gt;Code samples&lt;/strong&gt;&lt;/h5&gt;
  &lt;p id=&quot;cL07&quot;&gt;Here are some code samples that demonstrate functional programming techniques in C#.&lt;/p&gt;
  &lt;p id=&quot;Lovr&quot;&gt;&lt;em&gt;Anonymous functions and lambda expressions:&lt;/em&gt;&lt;/p&gt;
  &lt;pre id=&quot;oiAQ&quot; data-lang=&quot;clike&quot;&gt;// Using an anonymous function to filter a list of numbers
var numbers = new List&amp;lt;int&amp;gt; { 1, 2, 3, 4, 5 };
var evenNumbers = numbers.Where(delegate (int n) { return n % 2 == 0; });&lt;/pre&gt;
  &lt;pre id=&quot;Sdcy&quot; data-lang=&quot;clike&quot;&gt;// Using a lambda expression to calculate the sum of a list of numbers
var sum = numbers.Aggregate((acc, n) =&amp;gt; acc + n);&lt;/pre&gt;
  &lt;p id=&quot;GSsD&quot;&gt;&lt;/p&gt;
  &lt;p id=&quot;ZiHE&quot;&gt;&lt;em&gt;Higher-order functions (read below about higher-order functions):&lt;/em&gt;&lt;/p&gt;
  &lt;pre id=&quot;BNyh&quot; data-lang=&quot;clike&quot;&gt;// Using a higher-order function to filter a list of strings
static Func&amp;lt;string, bool&amp;gt; FilterStartsWith(string prefix) =&amp;gt;
    s =&amp;gt; s.StartsWith(prefix);
    
var names = new List&amp;lt;string&amp;gt; { &amp;quot;Alice&amp;quot;, &amp;quot;Bob&amp;quot;, &amp;quot;Charlie&amp;quot; };
var filteredNames = names.Where(FilterStartsWith(&amp;quot;B&amp;quot;));&lt;/pre&gt;
  &lt;p id=&quot;hF1e&quot;&gt;&lt;/p&gt;
  &lt;p id=&quot;FbPH&quot;&gt;&lt;em&gt;Immutable data structures:&lt;/em&gt;&lt;/p&gt;
  &lt;pre id=&quot;raJu&quot; data-lang=&quot;clike&quot;&gt;// Creating an immutable list of strings
var immutableList = ImmutableList.Create(&amp;quot;Alice&amp;quot;, &amp;quot;Bob&amp;quot;, &amp;quot;Charlie&amp;quot;);&lt;/pre&gt;
  &lt;pre id=&quot;7Oye&quot; data-lang=&quot;clike&quot;&gt;// Adding a new string to the immutable list returns a new list
var newList = immutableList.Add(&amp;quot;Dave&amp;quot;);&lt;/pre&gt;
  &lt;p id=&quot;FmcJ&quot;&gt;&lt;/p&gt;
  &lt;p id=&quot;miwY&quot;&gt;&lt;em&gt;LINQ:&lt;/em&gt;&lt;/p&gt;
  &lt;pre id=&quot;ZMAq&quot; data-lang=&quot;clike&quot;&gt;// Using LINQ to calculate the sum of a list of numbers
var sum = numbers.Sum();&lt;/pre&gt;
  &lt;pre id=&quot;vuCt&quot; data-lang=&quot;clike&quot;&gt;// Using LINQ to filter a list of strings
var filteredNames = names.Where(n =&amp;gt; n.Length &amp;gt; 4);&lt;/pre&gt;
  &lt;h5 id=&quot;wvrB&quot;&gt;&lt;/h5&gt;
  &lt;h5 id=&quot;ZZUf&quot;&gt;&lt;strong&gt;Real-life example 1&lt;/strong&gt;&lt;/h5&gt;
  &lt;p id=&quot;WGE4&quot;&gt;A real-life example that demonstrates how functional programming can be used to manipulate data in C#: this example calculates the average temperature in a list of daily temperature readings.&lt;/p&gt;
  &lt;pre id=&quot;uQ6c&quot; data-lang=&quot;clike&quot;&gt;using System;
using System.Collections.Generic;
using System.Linq;

class Program
{
    static void Main(string[] args)
    {
        var temperatureReadings = new List&amp;lt;double&amp;gt;
        {
            23.5, 24.3, 26.1, 25.7, 22.8, 27.3, 28.5
        };

        // Using LINQ to calculate the average temperature
        var averageTemperature = temperatureReadings.Average();

        Console.WriteLine(&amp;quot;The average temperature:&amp;quot;);
        Console.WriteLine($&amp;quot;{averageTemperature:F1}ºC.&amp;quot;);
    }
}&lt;/pre&gt;
  &lt;p id=&quot;VMJJ&quot;&gt;In this example, we have a list of daily temperature readings, which are represented as double values. We use LINQ&amp;#x27;s &lt;code&gt;Average&lt;/code&gt; method to calculate the average temperature, which returns a single &lt;code&gt;double&lt;/code&gt; value. We then print the result to the console.&lt;/p&gt;
  &lt;p id=&quot;S9tF&quot;&gt;This example demonstrates how functional programming techniques, such as the use of higher-order functions and immutable data structures, can be used to create concise and expressive code that is easy to reason about and maintain. By using LINQ, we are able to write code that is both efficient and easy to understand.&lt;/p&gt;
  &lt;p id=&quot;EnN9&quot;&gt;&lt;/p&gt;
  &lt;h5 id=&quot;KuvX&quot;&gt;&lt;strong&gt;Real-life example 2&lt;/strong&gt;&lt;/h5&gt;
  &lt;p id=&quot;8Rcs&quot;&gt;Another real-life example that demonstrates how functional programming can be used to manipulate data in C#. This example calculates the factorial of a given number using a recursive function.&lt;/p&gt;
  &lt;pre id=&quot;mHFA&quot; data-lang=&quot;clike&quot;&gt;using System;

class Program
{
    static void Main(string[] args)
    {
        Console.Write(&amp;quot;Enter a number: &amp;quot;);
        int number = int.Parse(Console.ReadLine());

        int factorial = CalculateFactorial(number);

        Console.WriteLine($&amp;quot;The factorial of {number} is {factorial}.&amp;quot;);
    }

    static int CalculateFactorial(int number)
    {
        if (number == 0)
        {
            return 1;
        }
        else
        {
            return number * CalculateFactorial(number - 1);
        }
    }
}&lt;/pre&gt;
  &lt;p id=&quot;ex4w&quot;&gt;&lt;/p&gt;
  &lt;p id=&quot;jTAc&quot;&gt;In this example, we ask the user to enter a number, which we then pass to the &lt;code&gt;CalculateFactorial&lt;/code&gt; function. This function uses recursion to calculate the factorial of the given number. If the number is 0, the function returns 1 (since the factorial of 0 is 1). Otherwise, it multiplies the number by the factorial of the number minus 1.This example demonstrates how functional programming techniques, such as recursion, can be used to solve complex problems in a simple and elegant way. By breaking the problem down into smaller subproblems, we can write code that is easy to understand and maintain.&lt;/p&gt;
  &lt;p id=&quot;JM3v&quot;&gt;&lt;/p&gt;
  &lt;h5 id=&quot;gvm5&quot;&gt;&lt;strong&gt;Higher-order functions&lt;/strong&gt;&lt;/h5&gt;
  &lt;p id=&quot;N12U&quot;&gt;Higher-order functions are functions that take one or more functions as arguments, and/or return functions as results. They are a fundamental concept in functional programming and provide a powerful way to abstract and compose code.&lt;/p&gt;
  &lt;p id=&quot;75ce&quot;&gt;In C#, a higher-order function is simply a function that takes a delegate or a lambda expression as a parameter or returns a delegate or a lambda expression as a result. Here&amp;#x27;s an example that demonstrates how to define and use higher-order functions in C#:&lt;/p&gt;
  &lt;pre id=&quot;doct&quot; data-lang=&quot;clike&quot;&gt;using System;

class Program
{
    static void Main(string[] args)
    {
        Func&amp;lt;int, int&amp;gt; square = x =&amp;gt; x * x;
        Func&amp;lt;int, int&amp;gt; doubleSquare = Compose(square, square);

        Console.WriteLine(square(3)); // Output: 9
        Console.WriteLine(doubleSquare(3)); // Output: 81
    }

    static Func&amp;lt;T, T&amp;gt; Compose&amp;lt;T&amp;gt;(Func&amp;lt;T, T&amp;gt; f, Func&amp;lt;T, T&amp;gt; g)
    {
        return x =&amp;gt; g(f(x));
    }
}&lt;/pre&gt;
  &lt;p id=&quot;KYhH&quot;&gt;&lt;/p&gt;
  &lt;p id=&quot;bsPe&quot;&gt;In this example, we define a higher-order function called &lt;code&gt;Compose&lt;/code&gt;, which takes two functions &lt;code&gt;f&lt;/code&gt; and &lt;code&gt;g&lt;/code&gt; as arguments and returns a new function that is the composition of &lt;code&gt;f&lt;/code&gt; and &lt;code&gt;g&lt;/code&gt;. The &lt;code&gt;Compose&lt;/code&gt; function works by taking an input value &lt;code&gt;x&lt;/code&gt;, applying &lt;code&gt;f&lt;/code&gt; to it, and then applying &lt;code&gt;g&lt;/code&gt; to the result of &lt;code&gt;f(x)&lt;/code&gt;.&lt;/p&gt;
  &lt;p id=&quot;egiO&quot;&gt;We then define two functions &lt;code&gt;square&lt;/code&gt; and &lt;code&gt;doubleSquare&lt;/code&gt;, which are both of type &lt;code&gt;Func&amp;lt;int, int&amp;gt;&lt;/code&gt;. Then &lt;code&gt;square&lt;/code&gt; simply squares its input value, while &lt;code&gt;doubleSquare&lt;/code&gt; is the composition of square and square.&lt;/p&gt;
  &lt;p id=&quot;h2pB&quot;&gt;Finally, we call &lt;code&gt;square&lt;/code&gt; and &lt;code&gt;doubleSquare&lt;/code&gt; with an input value of &lt;code&gt;3&lt;/code&gt; and print the results to the console. The output shows that &lt;code&gt;square&lt;/code&gt; returns &lt;code&gt;9&lt;/code&gt;, while &lt;code&gt;doubleSquare&lt;/code&gt; returns &lt;code&gt;81&lt;/code&gt;.&lt;/p&gt;
  &lt;p id=&quot;399G&quot;&gt;Higher-order functions are useful for abstracting and composing code. They allow you to write generic and reusable code that can be applied to different types and contexts. Higher-order functions are also useful for implementing common patterns such as map, filter, and reduce, which are widely used in functional programming.&lt;/p&gt;
  &lt;p id=&quot;oxB6&quot;&gt;&lt;/p&gt;
  &lt;section style=&quot;background-color:hsl(hsl(0,   0%,  var(--autocolor-background-lightness, 95%)), 85%, 85%);&quot;&gt;
    &lt;blockquote id=&quot;D2RF&quot;&gt;&lt;strong&gt;Did you know, Functional programmers never die, they just return. 😉&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This joke is a lighthearted play on the unique features of functional programming. This is a pun on the fact that in functional programming, functions often return values rather than changing state or producing side effects. So, when a function has completed its task, it simply returns a value and goes out of scope. This is in contrast to imperative programming, where functions may change the state of the program or produce side effects that persist beyond the function&amp;#x27;s scope. The joke also implies that functional programmers have a special ability to gracefully exit the program when their task is done.&lt;/blockquote&gt;
  &lt;/section&gt;
  &lt;p id=&quot;5hBX&quot;&gt;&lt;/p&gt;
  &lt;h3 id=&quot;Zxck&quot;&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/h3&gt;
  &lt;p id=&quot;uSOb&quot;&gt;While C# is primarily an imperative language, it does have features that make it possible to write functional code. Functional programming can lead to code that is more modular, composable, and maintainable, while also being more efficient and reliable. By embracing functional programming techniques, C# developers can create code that is easier to reason about and test, and that can be more easily modified and extended over time.&lt;/p&gt;
  &lt;section style=&quot;background-color:hsl(hsl(0,   0%,  var(--autocolor-background-lightness, 95%)), 85%, 85%);&quot;&gt;
    &lt;blockquote id=&quot;1GUW&quot;&gt;Subscribe to my Telegram channel: &lt;a href=&quot;https://t.me/+enfM9Do5fU4zMmQy&quot; target=&quot;_blank&quot;&gt;C# Panda Cook Book&lt;/a&gt;&lt;/blockquote&gt;
  &lt;/section&gt;

</content></entry></feed>