Skip to content

Instantly share code, notes, and snippets.

@summivox
Last active December 14, 2015 11:50
Show Gist options
  • Select an option

  • Save summivox/5082207 to your computer and use it in GitHub Desktop.

Select an option

Save summivox/5082207 to your computer and use it in GitHub Desktop.
excerpts & thoughts from http://prog21.dadgum.com/ blog entries

http://prog21.dadgum.com/

感觉挺有意思的~

off topic: captcha=NNNB


If you have a small (small!) library or tool that does exactly what you need, that you understand inside and out, then you know if your needs change slightly you can get in there and make adjustments without pacing back and forth for a new release. If you have an epiphany about how to further automate things or how to solve difficult cases you didn't think were possible, then you can code up those improvements. Maybe they don't always work out, but you can at least try the experiments.

Mostly it's about developer sanity and having something well-understood that you can cling to amidst the swirling noise of people whose needs and visions of the right solutions never quite line up with your own.

所以虽然The Lisp Curse是不可避免的,但也不一定有害。与“手里拿把锤子,看啥都像钉子”相比,DSL/DSL-like approach似乎还是上策。


Linked lists are a worst case, potentially jumping to a new cache line for each element. That's damning evidence against languages like Haskell, Clojure, and Erlang. Yet some naive developers insist on using Haskell, Clojure, and Erlang, and they cavalierly disregard the warnings of the hardware engineers and use lists as their primary data structure...

...and they manage to write code where performance is not an issue.

个人觉得"figure out what you're trying to accomplish"可能更重要。


When I wanted to modernize my programming skills, I took a long look at Lisp. It's a beautiful and powerful language, but I was put off by the community. It was a justifiably smug community, yes, but it was an empty smugness. Where were the people using this amazing technology to build impressive applications? Why was everyone so touchy and defensive? That doesn't directly point at the language being flawed--not by any means--but it seemed an indication that something wasn't right, that maybe there was a reason that people driven to push boundaries and create new experiences weren't drawn to the tremendous purported advantages of Lisp. So I moved on.

Vibrancy is an indicator of worthwhile technology. If people are excited, if there's a community of developers more concerned with building things than advocating or justifying, then that's a good place to be. "Worthwhile" may not mean the best or fastest, but I'll take enthusiasm and creativity over either of those.

存在即有其合理性么……


The UNIX ls utility seemed like a good idea at the time. It's the poster child for the UNIX way: a small tool that does exactly one thing well. Here that thing is to display a list of filenames. But deciding exactly what filenames to display and in what format led to the addition of over 35 command-line switches. Now the man page for the BSD version of ls bears the shame of this footnote: "To maintain backward compatibility, the relationships between the many options are quite complex."

None of these examples are what caused modern computers to be incomprehensible. None of them are what caused SDKs to ship with 200 page overview documents to give some clue where to start with the other thousands of pages of API description.

But all the little bits of complexity, all those cases where indecision caused one option that probably wasn't even needed in the first place to be replaced by two options, all those bad choices that were never remedied for fear of someone somewhere having to change a line of code...they slowly accreted until it all got out of control, and we got comfortable with systems that were impossible to understand.

We did this. We who claim to value simplicity are the guilty party. See, all those little design decisions actually matter, and there were places where we could have stopped and said "no, don't do this." And even if we were lazy and didn't do the right thing when changes were easy, before there were thousands of users, we still could have gone back and fixed things later. But we didn't.

从来没搞明白过unix的渣渣表示给跪了 (mb)


Any significant app has user interactions that need prototyping, unclear and conflicting design options to explore, tricky bits of logic, API calls you've never used--hundreds of things. Maybe five hundred. And until you run those experiments, you won't have a solid understanding of what you're making.

因为我们越来越多地要跟dirty real world打交道……吧?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment