Live data from Hacker News

Programming 2.0

news.ycombinator.com

11–12 of 12 posts

Re: Programming 2.0

#11
post #9

Hum, holes I see in the argumentation: - The graph structure for the recursion case of fibonacci is easier to read. At least for this simple computation, I strongly disagree. Granted, I am influenced by Programming 1.0, but I don't see how things become much simpler than fib(i-1) + fib(i-2). - The damage calculation function is horribly factored. The switch statement is duplicated and should be joined or handled diff…

That's exactly what I thought about it, too. The example function is close to spaghetti and needs at least one helper function with a well-chosen name.

The previous example (if-then-else with a complicated boolean logic) has a similar problem: Nobody should write such a mess in the first place. Instead, give speaking names to terms like "a" and "!a & (b|c)". And with "speaking names" I don't mean stupid stuff like "isAandBorC", but something like "waterSuppyOutOfLimits". That way, humans no longer need to think in boolean algebra but in terms of the problem's domain.

He is focusing on the structural aspect of programming, making spaghetti code more manageable by easier dynamic investigation of (partial) special cases.

However, statements like "names are just comments" show that he's completely missing the linguistic aspect of programming. With well-chosen names you don't have to look at the low-level details to understand what's happening. That's what makes abstractions powerful.

Re: Programming 2.0

#12
Dataflow languages are certainly great for many application domains for which they aren't currently used.

Alternative visual layouts remain to be proven in practice. This is another of a long line of experiments in alternative ways of editing source code. They always tend to work great for smallish examples, then start to quickly become unwieldy. I mean at the end of the second video you can already see that table becoming huge even with just three types of attacks. Imagine a real game with dozens of them and more complicated logic. Your computation is now spread out over meters horizontally and you'd find yourself dizzily scrolling back and forth to try to understand it all. Yes, being able to focus the table can help alot and if you got good at it maybe it'd be fine, but it remains to be proven in a real system. I'd like to see a major application built atop the system first.

What'd be really great is if you could also see/edit a textual (or pseudo-textual) representation and go back and forth.

Post reply on HN