Really though... Is there some sort of clever reason why this person's blog is on a xxx domain aside from annoying people like myself stuck behind corporate proxies?
However, I personally love the idea of polluting .xxx with non-pornographic (and interesting) material because I think the entire idea behind .xxx is flawed and goes against the spirit of the Internet.
Freedom, and the assumption of freedom, should always be the default. If you choose to associate with people who seek to restrict your access to information (your freedom), then it is your responsibility to be vigilant.
edit: assuming you're not being sarcastic, can't tell.
Javascript is not a better language than others (in fact it's a far worse language), and it's downright insulting to put words in the mouth of someone like Hemingway to try and make yourself feel better.
No, but you must be among the few not getting the joke or not being stuck-up to see that IT IS a joke post.
I mean, "it's downright insulting to put words in the mouth of someone like Hemingway to try and make yourself feel better."
Really?
>Javascript is not a better language than others (in fact it's a far worse language)
Even if that was true (which is highly debatable, because a language is not just it's syntax, or even it's semantics), it doesn't have anything to do with the post (besides it being about Javascript).
return result;
}
That happy ending is not Hemingwayesque.I love to read. At some points in my life I have been able to read two or three books every week. I have spent years of time drifting through the endlessly multiplicating realities of prose.
However: since moving to the Valley, working full time whilst attacking various business and development side projects, I can usually manage 2-3 pages (immediately before bed).
Where do you find the time to read?
This is the coding equivalent of the garage musician who says, "Don't bother me with rules — I'm playing pure emotion here, man!"
Unfortunately, finding new languages that allow me to write how I feel is sometimes difficult because no one talks about raw emotion in code, or single-developer and one-off projects. I love Lua for this.
when i first skimmed the article i got down to that section, read the code, with a list of names, and expected something french and post-modern. was really surprised when i checked back to the title to see bolaño.
(if you haven't read him, i wouldn't start with 2666, but with the savage detectives, which is a really sweet, funny, smart novel. also, if you speak spanish as a second language, he's very easy to read in the original - a modern, simple, colloquial style, just like you're used to speaking.)
[edit: huh; i don't even remember the dream sequences at the start of 2666, so maybe my bad. will have to go back and re-read. edit2: oh, yeah, i do remember. ok... but there's nothing like that in any other book of his i have read. hmph. you might as well characterise his writing as a list of murders.]
Pamuk´s "Black book" is a 2 inch thick book of Istanbul streets descriptions, and... that´s it. I forced myself to finish it because I thought:"there should be something else, is not possible that all this is for nothing". I was wrong.
Using one-step equation to solve iterative problem is IMHO better (obvious speed benefits for large n, the only drawback is floating point imprecision), and deriving the equation requires deeper understanding of the problem than simply modeling the iterative equation with a loop.
The benefit would be there, if Dickens went one step further, and used Math.pow to get the result instead of loop (that is - assuming calculating the power is faster than doing a loop (but it should be - you can square a few times to get near the result instead of multiplying "by one factor" each time)).
function fibs(size) {
return f();
function f() {
... implementation here ...
}
}For example I am an engineer, so this comment is written like code. It contains just enough words to express my point, it's clearly structured and my goal is to make it easy to read.
That's okay writing, but far from great. Great writers can just sit down and write amazing text. I could never do that. I have to go back, read after myself and refactor.
I wonder if other engineers feel similarly.
My experience with writing is mainly with academic prose, but I think most literary authors work like this as well. Besides, I do think that different programmers will have different styles in the same way different authors have styles. In part it'll probably influence your choice of language, but there'll be variation within a single language as well.
Yes, people do. On the extreme end you have the stream-of-consciousness style. E.g., on the road was written on a typewriter with a series of sheets of paper joined together to avoid interruptions. I also think I remember Neal Stephenson saying in a talk that the writing should come out naturally, not sculpted word for word. When it doesn't, it's called writer's block; a programmer's block on the other hand is not really a thing.
Text is typically read linearly, so it's also easier to write that way. Code, except for the very simplest, jumps around from function to function so it's going to require some additional planning.
The main difference isn't the method, it's that writers usually get a lot more time to do their work.
Tangentially, I believe that learning to write better will make you a much better coder and communicator.
+1. I think that's why the Hemingway snippet works so perfectly. The tone both perfectly captures Hemingway's voice, and the design qualities of beautifully engineered code.
> I believe that learning to write better will make you a much better coder and communicator.
And again, yes.
Very few great writers can. Dickens wrote prolifically because he was paid by the page (actually, he published in 32 page installments, so he was paid for each 32 pages); which may be why he's so controversial. They often edit a lot to improve the structure of their work (unless they publish in instalments).
That second sentence sums up 95 percent of advice professional writing instructors give.
Also, both writers and programmers do a ton of refactoring. Most authors will go over their writing 2 or 3 time, eliminating words and sentences that are unnecessary, combining and shortening sentences to make them more readable, etc. A lot of refactoring happens in both.
"No surprises here. Code reduced to its essentials with no word or variable wasted. It’s not fancy; maybe its even a little pedantic - but that’s the beauty of Hemingway’s writing. No need for elaborate logic or clever variable names. It’s plain and its clear and it does what it has to - and nothing more."
I am not sure why he did not choose this style:
function fibonacci(size) {
var result = [0, 1], i;
if(size < 2)
return "the request was made but it was not good"
for(i=2; i<size; i++)
result.push(result[i-1] + result[i-2]));
return result;
}Perhaps because Hemmingway would care about performance?
-----
Slightly related: One year ago Javascript inspired me to write the javascript version of genesis:
Subordination is the key word, ie, limiting the amount of nesting. That's why the for quoted above is out, since there are two statements and an expression nested inside the for statement (i=2, i<size, and i++), and there are two sub-expressions nested inside the push call (result[i-1] and result[i-2]).
Going out on a limb, I'd say Hemmingway's writing is building up complex narrative using simple building blocks. The body of the for loop above is a single line, which does simple arithmetic, array indexing, and a method call all together. In contrast, each line in the while loop body does roughly one thing: first addition, then assignment, assignment again, then a method call.
To single out for loops in particular, they've always struck me as a little too obfuscated and messy compared to the benefits they provide. It's a large, awkward word that nevertheless remains a dependable part of everyone's vocabulary, so we let it stick around. But should we?
http://en.wikipedia.org/wiki/Shakespeare_(programming_langua...
You got that right.
or, well, Arc, which, I think, is already obese.)