Category Theory for Programmers
bartoszmilewski.com
bartoszmilewski.com
> Implement, as best as you can, the identity function in your favorite language (or the second favorite, if your favorite language happens to be Haskell).
def identity(x): return x
> Implement the composition function in your favorite language. It takes two functions as arguments and returns a function that is their composition. def compose(f, g): return lambda *args, **kwargs: f(g(*args, **kwargs))
Testing these out: >>> compose(lambda x: x+1, lambda y: y-1)(0)
0
>>> compose(identity, identity)(0)
0http://mitpress.mit.edu/books/basic-category-theory-computer...
In other words, if you think this isn't relevant to the programming you do, it is likely that the programming you do is the exact kind of programming this was written to be relevant to.
If FP community would advocate big math curriculum for programmers with category theory at the top, hype would die fast.
And hell, you can be absolutely certain that I'd advocate a big math curriculum for programmers with category theory at the top. I don't know that the ROI is there for everyone, but I couldn't not recommend such a thing heartily.
Learn abstract algebra, as a programmer? Of COURSE that will help you.
Here's my heuristic for whether a problem makes a good example: whether or not it's the best tool for the job, would you write a program to solve it in C or Java or Go? If not, I'm skeptical it's solving a problem that exists outside the functional programming universe.
There are plenty of techniques that solve problems that only make sense within the particular ecosystem where you find them; lots of Java tools are like that, for example.
You need to study math more broadly to use category theory. These intros and books for programmers just give overview of concepts. You need to study mathematics more deeply to actually use it in programming. Advanced algebra is must.
This site has nearly black serif type on a peach-ish white background. The layout, type choice, and color scheme seems to address pretty much every objection that I've seen the "I can't read light-colored text on any background" crowd advance.
Edit: Here's a screenshot from my machine: http://i.imgur.com/W2QcLAp.png (Chromium 41 on Linux)
Can you explain exactly what makes the site unreadable for you?
What do you mean by "square alignment"? Are you talking about the full-justified [0] body text? If you are, then:
1) This confuses me, as this is exactly what the "I can't read light-colored text on any background" crowd says that studies show improves readability.
2) What about the full-justified body text makes it difficult to read?
If you're not talking about the body text, then what are you talking about?
Thanks in advance! :)
[0] http://en.wikipedia.org/wiki/Typographic_alignment#Justified
Kerning is a good thing, it increases readability. In a perfect world everything would be hand kerned for the best results, but that's not realistic. The compromise is automatic kerning, which isn't as good, but isn't too shabby. However, when you full justify text you're forcing the computer to abandon its best attempt at good kerning. Like newspaper on silly putty it gets stretched into spacings that aren't clean. Even if it leaves the spacings between letters untouched that forces it to make large and uneven spacings between words.
Some people might prefer that, and some people might prefer copy set to look like random letters. It's hard to have generalized rules that fit everyone. In general though I think it the standard position taught typography is to not justify text except in special situation.