Around "In[115]" I became convinced that the wolfram blogging team has a meth problem.
I'm always blown away by the wolfram blog visualizations and variety of data sources, as well as the occasional mathematical gems they drop! But seriously, don't do meth.
It reminds me of many systems I've seen where you really need to be a developer of the platform to intuitively make use of it for non-tutorial problems.
As a Wolfram employee: I really think we should start indenting and formatting the code in the blog better, have some kind of gist rather than those hideous images.
I'm sure that that blob of code would much more legible if it was better formatted.
As the token programmer in a big group of (now graduated) math major friends, the first thing I did when sitting down to help them with Mathematica was completely reindent their code, which was always followed up by "Wow! It looks so much better now!" Is it perhaps endemic to the culture of the language?
I think it's somewhat endemic to the notebook interface where your code grows by accretion from a oneliner function.
Whenever I help novices with their code I ask them to transform all their cells that are not oneliners into code cells which require manual indentation.
I think that is the main reason behind the comments here. The mathematica language takes some using too, and its syntax definitely is on the weird side of functional. However, do you expect this kind of complex example to be a paragon of clarity in any language? Picture what this would look like in haskell, ipython, R or javascript. Do you think "oh yes of course I will totally be able to do that after 2 hours using the platform"?
As to the question if you have to be a developer to write that kind of code, of course not, but you do have to be an experienced developer on that platform. I for one really like Mathematica despite the closed source and the offputting look of the source code, exactly because you can do the sort of magic shown here and actually get there pretty quickly.
It's a lot easier to write Mathematica than it is to read it. I've come up with some retrospectively-horrific functions that were intuitively easy to write - just keep piling on the functions, really. It's like the standard mistake when children learn maths of writing "If x=-1, then x^2+2x+1 = (x+1)^2 + 5 = 5" when they mean "x^2+2x+1 = (x+1)^2; then (x+1)^2 + 5 = 5": Mathematica makes it very easy to write in a completely unreadable stream of consciousness.
An ability to switch back and forth to a sort of "graph" view would be tremendously helpful, as most people tend to have a better ability to process visual information rather than a stream of text
> It's a lot easier to write Mathematica than it is to read it.
+1. And it gets even more easier to read (“read”? :-) when you can select pieces in FrontEnd, with multiple mouse clicks or a corresponding hotkey. I got so used to it that I actually developed phantom pains in my editing of Html or TeX (or whatever, for that matter).
This example may not actually demonstrate what its originators may think. It's possible they think it shows that Mathematica can solve virtually any problem, however esoteric. In fact, it shows that Mathematica can be a hacker's dream world, creating solutions so complex that readers are left in awe of their sheer irreproducibility.
Concisely, the example says, "See what you can do with Mathematica if you're us?"
This is my reqctioe to every Mathematica blog post.
They nerd to write posts that walk through how a beginner could learn to do this stuff without a 15-year career at Mathematica, or it's all sizzle and no steak.
I like Mathematica... while their magic functions don't exactly work for much outside of their demo's, it gives good fodder for open source projects to eventually borrow from. IPython would not be where it is right now with its killer notebook interface and interactive plots if it were not for them borrowing some key ideas from Mathematica.
> while their magic functions don't exactly work for much outside of their demo's ...
I write and solve a lot of differential equations, and of the choices available to me, Mathematica solves more and is easier to use -- compared to the alternatives Sage and IPython. But it's way expensive compared to Sage and IPython, the latter two of which are free.
> IPython would not be where it is right now with its killer notebook interface and interactive plots if it were not for them borrowing some key ideas from Mathematica.
Don't forget Sage. Sage was modeled after Mathematica (but open-source and collaborative), IPython was modeled after Sage (but much more lightweight).
Sage is huge and getting larger, lots of specialized code for various esoteric mathematical fields, IPython has a smaller footprint and is in some ways easier to use.
I believe that Sage was modeled after Magma, which isn't important, but I highly recommend this long blog post by William Stein[1] talking about his motivations, the problem of basing academic work on closed source software, and in the case of Magma, the potential politics of even being able to get the software.
I agree, I've read that piece, it's very worthwhile, especially with regard to the issue of being able to publish the mathematical methods built into common math environments.
Have you had any concerns yet about data provenance? Granted, I've only done queries right on Wolfram Alpha itself (and not with an api), but figuring out precisely where the original source data came from is sometimes pretty hit-or-miss.
Must be nice to live in the cognitive dissonance where you think your fragile, kludgey, application specific solutions are somehow stabile, well designed, universal tools.
I'm always blown away by the wolfram blog visualizations and variety of data sources, as well as the occasional mathematical gems they drop! But seriously, don't do meth.