Monoid Design Pattern (C#)

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

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 4 ай бұрын
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
@dudu2891
@dudu2891 Жыл бұрын
This video is gold
@RawCoding
@RawCoding Жыл бұрын
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
@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.
@g3ff01
@g3ff01 4 ай бұрын
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).
@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!
@mariomorazan9473
@mariomorazan9473 3 жыл бұрын
Love your videos man!!!!!!!!!
@RawCoding
@RawCoding 3 жыл бұрын
Cheers)
@nyendwa
@nyendwa Жыл бұрын
The link to your discoord channel is broken
Monad Design Pattern (C#)
20:07
Raw Coding
Рет қаралды 12 М.
Prototype Design Pattern (C#)
12:30
Raw Coding
Рет қаралды 17 М.
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 269 #shorts
00:26
Who’s the Real Dad Doll Squid? Can You Guess in 60 Seconds? | Roblox 3D
00:34
Fake watermelon by Secret Vlog
00:16
Secret Vlog
Рет қаралды 32 МЛН
What the Heck Are Monads?!
21:08
ArjanCodes
Рет қаралды 74 М.
What is a monoid? | #SoME1
8:46
All Angles
Рет қаралды 9 М.
Being Competent With Coding Is More Fun
11:13
TheVimeagen
Рет қаралды 102 М.
Decorator/Wrapper Design Pattern (C#)
16:01
Raw Coding
Рет қаралды 13 М.
What is a Monad? - Computerphile
21:50
Computerphile
Рет қаралды 606 М.
Why I Don't Like Singletons
29:05
The Cherno
Рет қаралды 87 М.
Okay but WTF is a MONAD?????? #SoME2
18:18
TheSTEMGamer
Рет қаралды 68 М.
5 Design Patterns Every Engineer Should Know
11:51
Traversy Media
Рет қаралды 940 М.
Singleton Design Pattern (C#, Microservices)
15:22
Raw Coding
Рет қаралды 14 М.