Monoid Design Pattern (C#)

  Рет қаралды 5,716

Raw Coding

Raw Coding

Күн бұрын

Пікірлер: 25
@quantum634
@quantum634 3 жыл бұрын
I dont see how this is useable when writing code hmmm 😑 A real example would have been cool
@RawCoding
@RawCoding 3 жыл бұрын
agree, the time to write up a good example takes more time than explaining the concept. Maybe one day you'll discover this pattern in your work. Here's a good example in haskell kzbin.info/www/bejne/eKDZhYSbebBqjqs he basically concatenates (adds) a list of predicates which in turn returns a predicate, so the example I showed is how to combine any functions together in haskell you get out of the box tools to glue functions together. But basically he creates a single predicate out of many predicates and that serves as text filtering. the point about the avarage javascript code is the fact that boolean conditions written like that require a code change to update, when you work against an array of functions that's a swing in the direction of depending on data and being able to update things dynamically rather than having to do code changes.
@pmcgee003
@pmcgee003 7 ай бұрын
There is an awesome talk by Ben Deane. Monoids are literally everywhere. DB updates, string concatenation, integer addition, vector addition, multiple INI files, ... kzbin.info/www/bejne/f3_RkqeqqtGon68
@J-Kimble
@J-Kimble 3 жыл бұрын
Yes!! Just learning about monoids in functional programming.
@RawCoding
@RawCoding 3 жыл бұрын
Nice!
@dkorobov
@dkorobov 3 жыл бұрын
This might be a good extension for the middleware where some function could be a sum of functions for “parallel” execution.
@RawCoding
@RawCoding 3 жыл бұрын
Yup
@viktorhh
@viktorhh 3 жыл бұрын
I would love to see a continuation to this series, with patterns displaying how you can implement custom map, bind, return, apply, with relevant examples. Any such plans? Thanks!
@RawCoding
@RawCoding 3 жыл бұрын
That’s up next, unfortunately no operator overloading for that
@viktorhh
@viktorhh 3 жыл бұрын
@@RawCoding So I've watched your Monad Pattern video now, great introduction! Would love to see more concrete examples on the subject since it's unavoidably abstract in nature. Any thoughts on continuing the FP track, perhaps just the basics? Also, you missed an easy win in this Monoid Pattern video: using Linqs Aggregate() which takes a monoidal operation. You could have made a list of your Function, and then Aggregate. Anyways, please keep the great content coming! I also have a final wish/request in case you take those.. compound patterns. I.e. examples of many design patterns used together, would be greatly appreciated! Thanks 😁
@RawCoding
@RawCoding 3 жыл бұрын
Thanks yeah the aggregate would be cool to show I just didn’t want to deviate from the idea. I can cover compound patterns but generally if you look at frameworks you’ll find them there.
@dudu2891
@dudu2891 2 жыл бұрын
This video is gold
@RawCoding
@RawCoding 2 жыл бұрын
Glad you enjoyed it!
@FXK23
@FXK23 3 жыл бұрын
Thanks so much that was great, just coding along makes it easier to understand. Would be nice, If we could select '.' as composition operator in c#
@RawCoding
@RawCoding 3 жыл бұрын
Ye operator overloading in c# is not very flexible
@mariomorazan9473
@mariomorazan9473 3 жыл бұрын
Love your videos man!!!!!!!!!
@RawCoding
@RawCoding 3 жыл бұрын
Cheers)
@g3ff01
@g3ff01 7 ай бұрын
The first part of the video was nice and clear, but the second part was confusing and hard to follow. The first confusing thing for me, was that I though that "int Add5(int a) => a + 5;" was itself a mondoid with the set of integers, while it is not, as it is not even a binary operation. Then for the second watch it started to become clearer that the monoid here would be the general concept of combining integer binary operations or something like that. However, that was a bit too much for 1 video in my opinion. There was a lot of not so used syntax and stuff used for a regular (OO) C# programmer (Func, generics, operator overloading, lambda expressions used to combine functions + the whole new mathematical concept... It was a bit too much for me (and I am not even a junior programmer, at least I don't consider myself as one already).
@nyendwa
@nyendwa 2 жыл бұрын
The link to your discoord channel is broken
@sunnypatel1045
@sunnypatel1045 3 жыл бұрын
My guy!!! Will you be doing more functional programming tutorials? Or maybe doing a video on building another restful app maybe with a cloud service like azure?
@RawCoding
@RawCoding 3 жыл бұрын
I want to do Clojure tutorials at some point in the future
@cocoscacao6102
@cocoscacao6102 3 жыл бұрын
@@RawCoding Why not an F# video? This video really surprised me :)
@RawCoding
@RawCoding 3 жыл бұрын
Because I don’t know f# and Clojure had one of the biggest impacts on my skills
@cocoscacao6102
@cocoscacao6102 3 жыл бұрын
@@RawCoding Fair enough. Wrong assumption since your videos are .Net realm... Keep on with interesting content. Functional subjects are rare
@sunnypatel1045
@sunnypatel1045 3 жыл бұрын
@@RawCoding Agree tbh F# is more functional and C# is currently adopting it. Clojure is too one of many skills I need to understand. Looking forward to your videos dude and keep up the good work!
Monad Design Pattern (C#)
20:07
Raw Coding
Рет қаралды 12 М.
Singleton Design Pattern (C#, Microservices)
15:22
Raw Coding
Рет қаралды 14 М.
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
How Monoids are useful in Programming?
9:24
Tsoding
Рет қаралды 50 М.
What the Heck Are Monads?!
21:08
ArjanCodes
Рет қаралды 77 М.
What is a Monad? - Computerphile
21:50
Computerphile
Рет қаралды 614 М.
5 Design Patterns Every Engineer Should Know
11:51
Traversy Media
Рет қаралды 943 М.
The Absolute Best Intro to Monads For Software Engineers
15:12
Studying With Alex
Рет қаралды 678 М.
Dependency Injection, The Best Pattern
13:16
CodeAesthetic
Рет қаралды 908 М.
Functional Programming - 22: Functor
19:21
Web Village Voyage
Рет қаралды 7 М.
What is a monoid? | #SoME1
8:46
All Angles
Рет қаралды 9 М.
What you should know about Threads in .NET
14:52
Raw Coding
Рет қаралды 8 М.
Prototype Design Pattern (C#)
12:30
Raw Coding
Рет қаралды 17 М.
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН