4 ms·
Thanks. This is a lot more helpful for non-math geeks than the two initial definitions in the article: > A Monoid can be defined a tuple (M, op, e) This defin
by pluma 9y ago
Thanks. This is a lot more helpful for non-math geeks than the two initial definitions in the article:
> A Monoid can be defined a tuple (M, op, e)
This definition lost me completely because I'm not even sure what "defining it as a tuple" is meant to imply. Based on your explanation it sounds like that is fancy talk for saying it is defined by having three properties.
> In a statically typed language, we can translate the notion of set into the notion of type.
The second definition again completely lost me because I'm not even sure what "set" and "type" mean in this context and being able to "translate the notion of set" is unhelpful when the definition using a set is the one I didn't understand in the first place.
I'm a programmer with over a decade of professional experience. I don't understand the article because I have no formal education in higher math nor in anything beyond basic computer science. Your explanation proves it's possible to explain these concepts with practical examples rather than academic jargon.
- equalunique 9y agoLeading up to monads, monoids are covered in this excellent presentation: https://www.youtube.com/watch?v=ZhuHCtR3xq8 https://www.youtube.com/watch?v=ZhuHCtR3xq8
- lou1306 9y agoA tuple is just an ordered bag of elements. E.G. a graph is a tuple (V, E) where V (vertices) is a set and E (edges) is a binary relation between vertices. Defining stuff as tuples makes sense, because then you can define the set of all such tuples (e.g. the set of all monoids for a given set M or the set of all graphs for the given vertices V) and formally reason about it :)
- ebola1717 9y ago> I'm not even sure what "defining it as a tuple" is meant to imply Yeah, in a computer science situation it's needlessly obfuscatory. It's literally just an interface with a "plus" method and an identity value.
- feanaro 9y ago"interface", "method"... One man's obfuscatory is another man's revelatory. It heavily depends on the "axiom set" you first learned about computer science concepts on. I would contend that "interface" and "method" are objectively more obvious concepts.
- Retra 9y agoIf you keep talking like that, you'll start to lose sight of the mathematics upon which your field was founded. Like when someone comes out with a fantastic new theorem about posets or monoids, you're probably going to go around thinking it doesn't bear any meaningful impact on your job. You learn both languages. You do it because the vast majority of human invention and ingenuity consists if acts of translation. Anyone serious about working with computers should understand that.
- ebola1717 9y agoMonoids and posets have very little structure, so you really aren't gonna get deep useful theorems out of them. Maybe you can make some clever reductions, but those are hardly deep theorems. I'm not arguing the underlying math isn't beautiful. I took grad level algebra and logic classes, so believe me when I say I know the math is awesome. But it just doesn't have any practical utility in programming, and more often than not just makes things more confusing. edit: Also, since I majored in math, with a focus on logic, I don't think I'll have any trouble with losing sight of the foundations :)
- Retra 9y agoWell, maybe not you personally then. :) But most programmers don't have a strong maths background, and yet it is a very relevant subject.
- pluma 9y agoSure. Convince me that the concepts are useful and I may be willing to invest the energy to learn the maths around it to extract more value out of it. But I'm a professional, not a CS student. I'm already spending my free time honing my craft and looking into new techniques and developments in software engineering. I can't afford spending yet more time on mostly orthogonal higher mathematics based on the hearsay of some guy on the Internet arguing it will allow me to understand a point somewhere down the line that might make me a better developer. This is exactly the same thing people say who come to programming from playing jazz music or artistic painting or figure skating. They all claim what they did before makes them a better programmer and they're probably even right. But that doesn't mean I should pick up figure skating as a hobby at this point. There are many different fields related to software development that can directly improve your performance as a developer. Not all of them are equally to all tasks a software developer might have to perform. I think it helps to have a mix of them, especially at the level of teams. There are times where the UX zealot can save the day and there are times where it's the one with the Master's degree in Metamathemagics. I wouldn't want to miss either of them, even they're mostly oblivious to each other's specialisation.
- bboreham 9y agoI found "tuple" to be an odd word, when I first came across it. Eventually I figured out it is a generalisation of "couple", "triple", "quadruple", etc. It's one of those things, but we don't want to say the number. (I just tried googling it, and the definitions I get are very maths-y and hard to understand)