zlacker

[return to "The Sierpinski triangle page to end most Sierpinski triangle pages"]
1. 8_hour+0n[view] [source] 2013-10-08 20:16:35
>>pr_fan+(OP)
Is is just me or is the code source really hard to understand? It's cool that you can represent such complex shapes with just a few lines of code in Mathmatica, but without comments and with all the single letter variables, it's hard for me to follow what's going on.
◧◩
2. pflats+gp[view] [source] 2013-10-08 20:37:09
>>8_hour+0n
I agree, but do realize this is written for a mathematical audience, not a CS audience. It's reductive, but it's not that reductive to your average math major/grad student.

Code by/for mathematicians is particularly ugly to a professional programmer. There is significant historical (pencil & paper) precedent for what single-letter variables represent in a given context. For a mathematician, ConstantArray[0, {m,n}] reads more cleanly than ConstantArray[0, {cols,rows}].

Similarly, seeing variables like p1, p2, p3 is off-putting to me as a programmer, but I still immediately recognize them as 3 arbitrary points in a triangle.

◧◩◪
3. Jonnie+gd1[view] [source] 2013-10-09 12:21:51
>>pflats+gp
But why pick two letters, m and n, which are pronounced almost exactly the same way? That broke my brain so badly at uni on so many occasions, especially with non-native-speaking lecturers :(
[go to top]