How to Remove Obstacles to Learning Math - <AUTHOR> http://ww2.kqed.org/mindshift/2015/11/30/not-a-math-person-how-to-remove-obstacles-to-learning-math <comment><USER2> 1\. 'Kids considered to be "gifted" suffer from ability grouping the most because they develop the ultimate fixed mindset. They become terrified that if they struggle they'll no longer be considered smart.'

2\. 'Removing the time pressure from math is another important issue for Boaler. Neuroscience research... has shown that time pressure often blocks the brain's working memory from functioning. This is particularly bad for kids with test anxiety. "The irony of this is mathematicians are not fast with numbers," Boaler said. "We value speed in math classrooms, but I've talked with lots of mathematicians who say they're not fast at all." '

I have experienced the truth of both of these points during my math education, and have recently started talking with professors (I'm an undergrad stat major) about the idiocy of timed exams in math. Timed exams test for speed, which is not something that matters in real mathematics (if you can prove a theorem in one week vs. two it doesn't really matter), and this can push people out of the discipline who would otherwise stay. As people discuss retention rates in stem fields, particularly with under-represented groups, I hope they will consider getting rid of time limits as an avenue of effective policy change.

<comment><USER3> I think STEM students should be writing more papers across the board. You shouldn't just solve problems and write down the solutions, you should be writing exposition on the methods you use, why they work, and what other options are available.

<comment><USER4> My writing ability developed in high school and college due to a few specific causes. 1: Being forced to write for my AP European History course in HS (the regular assignments were just lists of questions/prompts to be answered with a few sentences or a paragraph or so, it's amazing how valuable that experience was). 2: Writing proofs in advanced math courses (elementary analysis, abstract algebra, etc.) 3: Participating in usenet newsgroups (by far the biggest contributor).

P.S. I meant to point out the irony that English classes contributed comparatively little. Actually writing about something and putting in the effort to string together something coherent is what really exercises and builds writing abilities. It's nice to have some of the groundwork laid, but practice is by far the most important component.

</comment></comment></comment><comment><USER5> > Boaler said a big problem is that math teachers themselves are math- > traumatized. They came through a system very similar to the one in which > they work. Elementary school teachers in particular often feel insecure > about math.

This is incredibly important to understand. I know a number of middle grades teachers (not math or science) who "aren't math people". Their anxieties significantly hamper their ability to help their students when math-related things come up in class (statistics in a social sciences class, for instance). Or if a student wants to go to a trusted teacher for help outside that teacher's subject area.

Similarly, and this is really bad, they can't calculate students' grades! I've witnessed this one several times with a friend, and wish I could sit with her every time she worked out her grades so it will stop happening:

Test is out of 100 points. 10 points of extra credit. Calculate the students percentage as X/110\. WTF, it's no longer extra credit, the top score (110) is still 100% (instead of 110%), and now 90 points (should be 90%, an A-) becomes an 82% (B-)!

<comment><USER6> Math teachers in the US often don't have a math degree. Of course they feel insecure! - they are not really equipped to teach their subject well.

</comment></comment><comment><USER7> So much to say about this.

I absolutely refused to learn the times-table in school. Even to this day I struggle to add seven and eight. That one seems to confuse me every time. I think the long division algorithm is one of the most difficult things in mathematics, and they teach this to ten year olds! (or they did when i was ten.)

So, fast forward many years, and I started doing really well studying advanced mathematics in my undergrad. But somewhere along the line I hit a wall: most math textbooks are written ass-backwards for my brain. I really don't get maths by looking at equations. It has taken another 20 some years to move beyond this, and to not be shy about being a disaster when it comes to algebra. Because when it's about _shape_ or _process_ that is when I really start to move.

My research today is in theoretical quantum physics (finally doing my postgrad.) I've started to see that there are others like me out there: we often sound like nutjobs when talking about maths, because it's all a confused mess internally. But somehow from the chaos miracles emerge. This is in contrast to the heavily-linear-thinking types: these people produce sparkling sentences one after another, but often get lost seeing the big picture. The "nutjobs" are a minority, and are so easily criticized. But I sure wish there were more of us doing this hard stuff.

One of my favourite math lessons in school occurred when I was about six years old. The teacher had some coloured shapes scattered across the floor, some yellow, some red, some triangles, some discs, etc. She placed a big hoop around all the yellow shapes, and another separate hoop around all the triangles. But there was a problem with this scheme: what to do about the yellow triangles? She let us all stew on this for a few moments, and then the magic happened. If you place one of the hoops overlapping the other, the yellow triangles could inhabit both hoops at the same time.

<comment><USER8> Do you mind sharing math textbooks you like (undergrad & grad).

</comment></comment><comment><USER9> A lot of problems here. (1) "This study shows that all kids can learn math when taught effectively". Well, as the definition of "teaching effectively" is that students learn from it, this observation really isn't all that startling. We could do a similar study to prove that all children arrive at school when driven there. What would be startling would be if the same technique worked equally well with all students (and this one won't). (2) Ah, it wouldn't be a paper about educational techniquese without some Gladwelling (which I define as using a vastly over-simplified and facile interpretation of scientific findings in order to advance a puerile generalization). Yes, research shows that connections in the brain are modified when learning. It would be shocking if learning didn't have an effect on the brain. By FMRIs and other imaging is far,far too blunt to detail what is happening in any useful detail. Taking a scientific finding that "people seem to use these particular areas of the brain when learning" as justification for an entire philosophy of pedagogy is absurd. And, for the umpteenth time --- multiplying two numbers is no more "Mathematics" than learning how to drive a screw is "Mechanical Engineering". And encouraging children to explore driving a screw with a hammer, a pair of pliers, their teeth, a teammate and then having them do a class presentation on their findings does not help them in their later careers as mechanics. Far better to show them the most effective technique, let them practice it, and move on. "Exploration" learning is only effective when applied to skills that already have mental infrastructure provided by evolution. You learn your first language by exploration. You learn to walk by exploration. Riding bikes and mathematics were never evolutionarily selected for, so we have to learn them by, well, learning them.

<comment><USER5> > Far better to show them the most effective technique, let them practice it, > and move on.

This can work for the base levels of what most folks think as mathematics, namely arithmetic and algebra. But it starts falling apart as students get to more advanced algebra and mathematical topics. Memorizing a particular algorithm does _not_ lend to understanding mathematics. In particular, the parallels between algebra (and some arithmetic) and geometry are non-obvious and not easily conveyed via a series of exercises and then jumping to the next topic. See the visualization examples of `18x5` in the linked article. Letting students see the correlation between the numbers and the objects (squares and rectangles) greatly helps their understanding of the subject. _Discussing_ it reinforces this experience and gets them to see it beyond the exercises they've been doing, abstracting the concept beyond a handful of cases and to the general case.

> Riding bikes and mathematics were never evolutionarily selected for, so we > have to learn them by, well, learning them.

There are many ways to learn and to teach. Teacher-tell, student-regurgitate is one method. And it works for some (many) subjects, at least in getting facts and figures into students heads. Teacher-tell, student-explain gets the students past thinking about facts and thinking about whys and hows of the world. (You can expand tell beyond spoken word to shown, demonstrated, etc.) Teachers can take it further by starting on a mathematical topic, and directing the student conversation and discussion towards understanding (I think this is the example I'm looking for, graph theory for eight-ear olds: [http://jdh.hamkins.org/math-for-eight-year- olds/](http://jdh.hamkins.org/math-for-eight-year-olds/)).

<comment><USER10> To supplement this comment, How to Solve It by Polya is a nice little handbook on the education of mathematics. I'm reading through this at the moment and I've learned quite a bit. It's especially useful to see how I have unknowingly applied some heuristic to a problem I've solved in the past.

As a side note, I'm finding both Calculus Made Easy and Concrete Mathematics incredibly useful. Thanks for the suggestions.

</comment></comment></comment><comment><USER11> Every child can easily learn all the math they would need in life.

Inability to understand math does not come naturally to any child. It is something that must be taught by specialists at intense effort and great expense.

</comment><comment><USER12> I found this video on Hungarian math education (elementary) fun to watch: [https://www.teachingchannel.org/videos/teaching- elementary-m...](https://www.teachingchannel.org/videos/teaching-elementary- math-hungary)

</comment><comment><USER13> High school math was hell for me.

The teacher would explain something on the board. Everyone but me would say 'Ohhh, I see' or similar (think Bart Simpson and the 'RDRR' gag).

The teacher would explain the concept to me again. I still wouldn't get it. I got a 'Really?' look from the teacher, who then walked off.

So I wasn't a 'math person'.

Then halfway through a thesis I encountered some math that I had to understand and use, or give up the thesis.

I discovered I could some math after all.</comment>


Compiler Design in C - <AUTHOR> http://www.holub.com/software/compiler.design.in.c.html <comment><USER2> If you are interested in a printed version of a great beginner's compiler book, I can highly recommend Andrew W. Appel's "Modern Compiler in C". There are also versions of the book written for SML or Java. I have read and partially implemented the C version and I really enjoyed the book, basic enough to follow yet full-featured enough to be useful.

The book starts with parsing (I prefer PEG or Pratt parsers for their simplicity (and tool independence) to be honest and skipped some of that chapter) but then goes into semantic analysis, type checking, code generation, optimization passes, even mentions basic type inference.

There is some code online at [http://www.cs.princeton.edu/~appel/modern/c/](http://www.cs.princeton.edu/~appel/modern/c/) .

<comment><USER3> Great book, though I recommend the SML version over C or Java for a clearer illustration of the concepts in code. Viewed side by side, the SML code looks concise and obvious vs. the long and wordy C/Java code. It just seems to lend itself better to the task, in that some of the pattern matching burden is already handled by SML.

<comment><USER2> Totally agree, ML-style languages are great for writing compilers.

</comment></comment></comment><comment><USER4> This book appears to be more of a "compiler-compiler design in C"; it goes through how to write a lexer and parser generator, _then_ writes a compiler using them, and I think the resulting compiler is a bit of a letdown: it does not much more than translate C into a linearised subset of C, and so the IMHO more "interesting" and important parts of the back-end like register allocation and instruction selection are completely absent.

It's a good if somewhat outdated book if you're interested mostly in parsing and lexing, but for all the claims it makes in the preface about being practical instead of theoretical and all the source code presented throughout, I found the lack of actual Asm code generation (or any mentions of this compiler being able to compile itself) disappointing.

Parser/lexer generators also seem to have fallen out of favour for the creation of actual compilers, both big and small, at least for C-like languages; techniques based on recursive-descent (RD) are quite popular now.

On the "big, production-quality" side, gcc used a generated parser but moved to a handwritten RD-based one, and Clang always used RD. EDG's front-end, used in Intel's and other commercial compilers, is also handwritten RD. On the small "toy compiler"/hobbyist/experimentation side, there's TCC/OTCC, CC500 ( [https://news.ycombinator.com/item?id=8576068](https://news.ycombinator.com/item?id=8576068) ), C4 ( [https://news.ycombinator.com/item?id=8558822](https://news.ycombinator.com/item?id=8558822) ), SubC ( [http://www.t3x.org/subc/](http://www.t3x.org/subc/) ), and many others, all based on RD parsers.

In fact I can't think of any C compilers at the moment that are using a generated parser/lexer...

<comment><USER5> Care to expose any good book explaining more modern approach for compilers from the practical point of view (including RD)?

<comment><USER4> Practical Compiler Construction: [http://www.t3x.org/reload/index.html](http://www.t3x.org/reload/index.html)

This explains the SubC compiler I mentioned in the original post.

</comment></comment></comment><comment><USER6> Great book! I have spent hours reading it multiple times soaking all information I could.

It was one of the first books about compiler design that I got hold of, back when Internet access was only available at the university.

</comment><comment><USER7> I had this book at University. It made a good companion text to our main textbook, the dragon book. The dragon book covers a lot of ground, and is very interesting, but Holub's book is much more practical, with everything illustrated with real code examples (if my memory is correct). This was a big help when learning and made compilers a lot more fun. It's well worth reading.

It's interesting that most of the content is still just as relevant today. Coding styles change over time, and definitely the popularity of languages has changed, but the theory is still just as useful.

Off topic, but we had the 'International' edition of this book. Many publishers at the time did this, I'm not sure why. The explanation was that it was to make it more affordable for us, although the prices were still high. They were soft cover editions with plain covers (this book had a red cover with only the title and author, in white). The linked page is the first time I've seen the real cover. This is probably an early example of regional pricing, much like DVD region codes. They could charge more in USA and less in other territories I guess.

<comment><USER8> Mine was also the international edition, with dark blue cover. Not having been a CS major I bought a copy out of curiosity on how a compiler is made, since it seemed a lot more approachable than the famous dragon book. I admit I was a bit overwhelmed at the amount of code it took to build a compiler. Glad to see the book again in its entirety.

</comment></comment><comment><USER9> His book the C Companion [1]

Really helped me get a deep understanding of C. Sadly, I haven't touched C for such a long that I've forgotten most of it. I highly recommended it for anyone who has a basic knowledge of C and wants to get deeper.

[1] [http://www.amazon.com/C-Companion-Allen-I- Holub/dp/013109786...](http://www.amazon.com/C-Companion-Allen-I- Holub/dp/0131097865)

</comment><comment><USER10> Can somebody recommend a book that covers recent techniques implemented in LLVM?

<comment><USER11> The good intro to compilers is Engineering a Compiler. It focuse more on optimization then most intro books, and its all SSA.

If you want to go all in on SSA optimization, there is a book called Static Single Assignment Book and its written by a hole list of compiler writers. Its not finished but there is still a lot of information.

You can find it here: [http://ssabook.gforge.inria.fr/latest/book.pdf](http://ssabook.gforge.inria.fr/latest/book.pdf)

Or you can go with the classic, Advanced Compiler Design & Implementation. See here, [http://www.amazon.com/Advanced-Compiler-Design- Implementatio...](http://www.amazon.com/Advanced-Compiler-Design- Implementation-Muchnick/dp/1558603204)

All of them will teach you a lot about LLVM.

<comment><USER2> Speaking of SSA and optimizations, I just remembered that Andy Wingo (core contributor to Guile scheme) has a treasure trove of great articles, e.g. a fun intro to SSA [1] or CPS as used in Guile [2]. His blog is totally worth just browsing around.

[1] [http://wingolog.org/archives/2011/07/12/static-single- assign...](http://wingolog.org/archives/2011/07/12/static-single-assignment- for-functional-programmers)

[2] [http://wingolog.org/archives/2014/01/12/a-continuation- passi...](http://wingolog.org/archives/2014/01/12/a-continuation-passing- style-intermediate-language-for-guile)

<comment><USER11> Yes. His posts are a great. He is working on a VM and I do to so I follow his work closly.

</comment></comment></comment></comment><comment><USER12> How I love these 90s style book covers, color palettes :)

<comment><USER4> I agree, there were more interesting/amusing cover illustrations than the abstract, generic ones on the bulk of compiler and computing books today. That's how the Dragon Book got its name too.

Related article: [http://www.globalnerdy.com/2007/09/14/reimagining- programmin...](http://www.globalnerdy.com/2007/09/14/reimagining-programming- book-covers/)

<comment><USER12> Speaking about covers, Forth Programmer's Handbook comes to mind :)

[http://www.amazon.com/Forth-Programmers-Handbook-3rd- Edition...](http://www.amazon.com/Forth-Programmers-Handbook-3rd- Edition/dp/1419675494)

<comment><USER13> Check out this one: [http://ecx.images- amazon.com/images/I/61wk1jiBkRL._SX258_BO1...](http://ecx.images- amazon.com/images/I/61wk1jiBkRL._SX258_BO1,204,203,200_.jpg)

</comment></comment></comment></comment><comment><USER14> I think that these days, if you're writing a compiler, it would be better done in one of * c++ to leverage llvm (afaik c++ is the best way to do that) and lots of existing code * some sort of ml, because ml is really good for lots of the things compilers need to do * self-host, because the compiler may be the best large-program workout your fledgeling language is going to get

</comment><comment><USER15> In the same vein, see "lcc, A Retargetable Compiler for ANSI C": [https://sites.google.com/site/lccretargetablecompiler/](https://sites.google.com/site/lccretargetablecompiler/)

</comment><comment><USER16> What real world experience does Allen Holub have with compiler design? As far as I can tell, he has not contributed to gcc, LLVM,or written any toy compilers like TCC.

</comment><comment><USER17> why use c? its a horrific, logically incongruent lang

<comment><USER18> I know what you mean, man. Lots of n00bz, ricers, and fanboiz will claim C is the fastest, most efficent lang because you can get "close to the metal" and "tweak". In reality, any code beyond trivial complexity will benefit much more greatly from algebraic rectification, which can only be done with certain languages that are amenable to formal analysis.

<comment><USER4> Until I see an award-winning 4k/64k demo written in one of these ultra-high- level languages, I stand by my opinion that C is more efficient.

<comment><USER19> Check your facts. A large majority of award-winning 4k/64k are written in C++.

<comment><USER20> his point is still valid though</comment></comment></comment></comment></comment>


If You Spend Your Time Wisely, A Week From Now You Will Realise That You Are an Idiot - <AUTHOR> http://docs.google.com/Doc?id=dcfqz3h7_226gbbhd7dx

<comment><USER2> All right, here's where I see the problem with the current way that HN displays the source URLs of submitted articles. To say (google.com) is the source of this submitted article is misleading. Yes, I did mouse over the article title to see the full URL, but this behavior prevents rapid viewing of the newest submitted articles in the most user-friendly way.

P.S. I'm not sure I agree with the advice in the submitted article, either.

<comment><USER3> I just noticed that I've started assuming that "google.com" articles aren't from google, but one of the services it hosts (not just docs, there's also google groups).

Given the likely trajectory of growth of google docs etc, this is probably not a bad shift, to start seeing "google" as a hoster (like aol or tripod), rather than an entity itself. They are diluting their brand.

</comment></comment><comment><USER4> Yes, you may come across a cool idiom to use in your code by procrastinating and reading blogs. You may also come across a cool idiom by coding, looking at your code and thinking: how could I do this better; share your code with someone you could learn from, or read a book or two on your language of choice.

Don't make excuses for your procrastination. Accept that procrastination is sometimes just a fun alternative to what you need to get done. Luckily, the end of the article shies away from the bombastic title.

</comment><comment><USER5> But how would I find this article if I didn't read HN? :-)

<comment><USER6> Which also brings up the fact that browsing HN raises my awareness of my ignorance... across the broad range of Hacking topics that impact my work: topics that I don't know I need educating about until I read about others struggles and revelations. [My own weak coding practices won't expose to me their weakness -- except through expensive errors.]

</comment></comment><comment><USER7> little offtopic, https plz:

<https://docs.google.com/Doc?id=dcfqz3h7_226gbbhd7dx></comment>


The Trachtenberg System for mental arithmetic - <AUTHOR> http://en.wikipedia.org/wiki/Trachtenberg_system <comment><USER2> This sounds awfully interesting but the wikipedia article itself is a mixture of poorly written, obscurely written, and unwritten. Is there an article that lays it out a little more humanely?

<comment><USER3> Try this:

<http://mathforum.org/dr.math/faq/faq.trachten.html>

</comment></comment><comment><USER4> I was gonna say I knew Michelle Trachtenberg was smart and cute, but developing a speed-mental-math system would put her squarely in Winnie Cooper territory.

I was kind of disappointed to discover it wasn't that Trachtenberg.

</comment><comment><USER5> I have an indian edition of this book - [http://www.amazon.com/Trachtenberg- Speed-System-Basic-Mathem...](http://www.amazon.com/Trachtenberg-Speed-System- Basic-Mathematics/dp/0313232008). I highly recommend exploring this method - its quite easy and the rules are simple to remember.

</comment><comment><USER6> Please excuse this lengthy trip down memory lane.

In Texas high schools there is -- or perhaps was -- a mental math competition called "Number Sense." Eighty problems in ten minutes, ranging from 12 + 72 = ____ to geometry, trig, and calculus problems. Training requires lots of tricks, memorization, and practice. My coach had accumulated a file of close to a hundred practice tests, including the tests for most of the official state, regional, and district competitions going back over ten years. One of the best Number Sense competitors I knew actually missed some meets because she failed Spanish -- she spent all day taking practice tests during her other classes.

(Caveat: I graduated fifteen years ago and have no idea how things have changed since then.)

There are (or were) a couple of other math competitions, and both also focused on speed and rewarded mental arithmetic skills, though to a lesser extent. One was calculator-based, and was a little silly since doing well depended quite a lot on your ability to punch buttons quickly and accurately. (RPN was a must, and very, very few competitors used anything other than an HP.) You had thirty minutes to do eighty problems, of which sixty were boilerplate button-punching problems called "crankout." (You could save a few seconds here and there by doing some mental math, and a few of the crankout problems on each test were series that you could recognize as, say, e^1.26, and you could save yourself a few seconds by just punching 1.26 e^ on your calculator.) You'd do the "crankout" perfectly (hopefully) in 10-15 minutes and spend the rest of the time on the word and geometry problems. Having a fast, accurate "crankout" was the key to success, which made the calculator competition by far the stupidest of the competitions, though it was also the most exciting from a sporting perspective, since you could tell by the sound of the keys who was fastest and when each competitor finished the "crankout." The competition was also superbly paced; usually, the competition ended while each competitor was trying desperately to figure out a problem that was neither routine nor unattainable for him or her. As with Number Sense, training for Calculator meant lots of tricks and practice, and my coach had dozens of practice tests she had collected over the years.

The last competition was simply called "Math" and gave you forty minutes for only sixty problems, which seemed luxurious. Typically, if you were good, you would blaze through 50-55 problems in 25-30 minutes and then tackle the harder ones that remained. None of the problems required math beyond simple calculus, but on every test there were problems that would confound the average "A" honors calculus student.

This all sounds terribly silly, and it was. I considered it a sport for my mind, with all the benefits of a sport: camaraderie (such as it was,) fitness (of the mental kind,) and an opportunity to excel and attract positive attention to myself. It might seem irrelevant to my academic and intellectual development, and in an ideal world it would have been just a distraction. In reality it was a godsend. High schools do a terrible job, pretty much a nonexistent job, of challenging talented math students with advanced or difficult material. You're rarely going to find a high school teacher who learned anything beyond calculus, let alone remembers it, let alone was any good at it. Letting us train the hell out of less-challenging math was the only way to compensate. It rewarded kids who studied and learned more, which was nice, since even honors classes didn't differentiate much between a good student and an excellent one. By the time I took calculus, I already knew a lot of calculus from training for competition. It didn't matter that my honors calculus teacher (who had an engineering degree from a local university) didn't seem to get the basic concepts of calculus and probably never did. (To be fair to him, he didn't volunteer to teach calculus, and to be fair to the system, he was the worst calculus teacher the school had had in the past decade, and they found somebody else to teach calculus only a few years later.)

Although the competitions didn't contain any advanced material, they did provide some stimulating puzzles. The puzzle of optimizing one's approach to the competitions -- optimizing problem solutions a la Trachtenberg, optimizing test-taking skills by tackling the problems in the optimal order, and optimizing practice time by figuring out what tricks to learn and which tables to memorize -- was the closest thing to engineering that I did until I got my first software job. The test problems sometimes brought new ideas to my attention and pointed out areas that I had overlooked in my classroom study. Obviously, this is a pretty stupid way of educating kids, but it existed where I grew up, and it was better than anything else that I could share with other people. For everything else, it was just me alone with a book, with no one to talk to when I felt proud or frustrated.

Anyway, I thought I would describe this curiosity since the subject of mental math came up. FWIW, the Trachtenberg system as described in the link seems primitive compared to the bag of tricks that I learned from the yellowing self-published pamphlet that my coach kept locked in a cabinet, but it is more practical for people who don't want to "train" as they would for a sport. The best Number Sense competitors dropped a lot of the shortcuts that they relied on when they were beginners as they got better at raw computation. It was common to memorize the squares up to 30x30, and a few memorized the multiplication tables up to 20x20 (or so they claimed.) Memorizing the squares up to 25x25 and the digits of the fractions over 6, 7, 8, and 16 were fundamental skills taught to freshman. Logarithm tricks were less common, but the best competitors used them. Who would do that stuff nowadays except to excel at a "sport?"</comment>


Hacking browser copy/paste to support Excel compatible clipboard in a web page - <AUTHOR> http://labs.nereo.com/slick.html

<comment><USER2> We did this many, many years ago in an IE6-specific financial reporting application as well. At the time, the JS grids were 1) poorly written and 2) expensive, so we ended up biting the bullet and writing a grid in-house.

Funny to think that less than ten years ago, you could still get away with targeting IE6 _only_ and it would be considered a reasonable decision for enterprise software.</comment>


Universal SSL: Encryption all the way to the origin, for free - <AUTHOR> https://blog.cloudflare.com/universal-ssl-encryption-all-the-way-to-the-origin-for-free/ <comment><USER2> kinda sorta mostly beating EFF to the punch?

AWESOME! this makes the world a better, safer place....and especially after showing some love to djb the other day, this is pretty excellent news.</comment>


CoffeeScript: zero benefit, lots more frustration and hassle - <AUTHOR>

got my first exposure to CoffeeScript this weekend through a Railscast on Backbone.js. The tutorial is unfortunately done with coffeescript where I had the pleasure (multiple times) of typing the code exactly as it is in the tutorial and then watching it not work. Strangely, I retyped the code the same way several times and then it started working. If I copied the code from the lesson files, it sometimes didn't work. But then if I typed it out it did. No explanation. It's taken me 36 hours to work through two 15 minute RailsCasts and I'm not even done yet!<p>Why use javascript or jquery where you only have to worry about getting the code right when you can use coffeescript and have the extra worry about valid code not working at all? It's definitely much better for beginners. <comment><USER2> Your complaint is vacuous at best and trolling at worst. You give no indication of what kind of errors you encountered, and it doesn't seem like you really looked into the problems you did have.

There are some very valid criticisms of CoffeeScript, but you've raised none of those nor brought new ones.

</comment><comment><USER3> Forget about the railcast, you should start here <http://coffeescript.org/>

For me CoffeeScript make JavaScript much more readable, that single benefit alone already worth the efforts.

</comment><comment><USER4> Yeah, this programming stuff is really tough. How about a nice game of Farmville instead?

It's normal to be frustrated when learning new things, but the savvy student recognizes the problem lies in him or herself, not in the topic they don't yet understand.

Try harder, or stop complaining. Blaming the compiler is a novice response, and will garner you no sympathy.

(Hint: it's probably the significant whitespace.)

</comment><comment><USER5> 1) If you typed it once, and it didn't work, and you typed it again "exactly" the same way, and it worked, then you didn't type it exactly the same way both times. 2) I actually agree that CoffeeScript is pointless. But not for the same reasons as you. You see, I'm a good programmer.

</comment><comment><USER6> I'm not exactly in the same boat, in that I love the __idea __of CoffeeScript, but I've got too many years of JS habits that CS asks me to break.

I'm pretty productive with JS, and even if I'm not writing things that change the world, I feel like I'm busy enough that there's never been a good time to effectively relearn a language that I already know.

On the same token, it always chafes me a little bit when I see people ask questions on StackOverflow in Coffee. I might have been able to help them if they hadn't, but seeing it in Coffee, despite being 'plain old' JS, means that I can't.

Still though, I appreciate the value of it. The main reason I work in Python is for readability. I completely get the value, and I consider it worthwhile, but until Coffee hit some form of critical mass (even if just on the teams I'm working with,) then it just doesn't quite make sense for me.</comment>


Digital Music - <AUTHOR> Can anyone suggest alternative options of Artists generating profits from Music created at the expense of manipulative, greedy Record Labels taking a large chunk of earnings? A new system Digitally without the need of Record Labels? <comment><USER2> [https://en.wikipedia.org/wiki/DistroKid](https://en.wikipedia.org/wiki/DistroKid)</comment>


FISA Court Rejects Catch-22 Secrecy Argument in FOIA Case - <AUTHOR> https://www.eff.org/deeplinks/2013/06/public-first-secret-court-grants-eff-motion-consenting-disclosure <comment><USER2> The EFF has been carrying an immense amount of weight throughout all of this. I'm not sure I can name another organization that has done so much. Their budget desperately needs to be expanded dramatically.

<comment><USER3> We can help them do exactly that:

[https://supporters.eff.org/donate](https://supporters.eff.org/donate)

<comment><USER4> I donated money and bought some stickers on Friday. They can definitely use our help! The EFF also helps us in our fight for jailbreaking rights.

</comment></comment></comment><comment><USER5> The relevant quote from the book written by Joseph Heller:

 _" The girls were crying. 'Did we do anything wrong?' they said. The men said no and pushed them away out the door with the ends of their clubs. 'Then why are you chasing us out?' the girls said. 'Catch-22,' the men said. 'What right do you have?' the girls said. 'Catch-22,' the men said. All they kept saying was 'Catch-22, Catch-22.' What does it mean, Catch-22? What is Catch-22?"

"Didn't they show it to you?" Yossarian demanded, stamping about in anger and distress. "Didn't you even make them read it?"

"They don't have to show us Catch-22," the old woman answered. "The law says they don't have to."

"What law says they don't have to?"

"Catch-22."_

<comment><USER6> It's great that Snowden is a pivotal character in that story too!

<comment><USER5> However Snowden of the book unfortunatelly for him contributes the content of his dismembered guts:

[http://en.wikipedia.org/wiki/Yossarian#Snowden](http://en.wikipedia.org/wiki/Yossarian#Snowden)

 _Captain Korn gives to General Dreedle is that Snowden died in one uniform, and his remains were soaked into Yossarian 's, and all of Yossarian's other articles of clothing were in the laundry. General Dreedle says "That sounds like a lot of crap to me." Yossarian replies, "It is a lot of crap, sir."_

</comment></comment></comment><comment><USER7> This is good to hear, but you have to really worry that there are people in the government who argued against it.

If the CIA wanted to do some _useful_ domestic spying it would be far more beneficial to do their operations on these people. They are clearly a larger threat to democracy than any mere terrorist could ever be, and they are already INSIDE the system.

</comment><comment><USER8> "Secret court" and "secret law"

What an absurd concept and a sad place for the US to be.

<comment><USER9> There is no secret law. FISA, the law which authorizes surveillance, is a public law approved by Congress.

Courts make secret decisions all the time, especially when surveillance is involved. When a local police department gets a wiretap on a mob boss, it happens secretly. If a detective oversteps in the midst of a larger investigation, it's quite likely that the ruling about the particular use of surveillance would be sealed.

The question here is not whether we have courts that make secret rulings. It shouldn't surprise anyone that judicial oversight over in-progress investigations would be secret while the investigation (and related investigations) were in progress.

The useful policy question is what the scope and length of the seal should be. For FISA, it seems that the scope and length is "everything, and forever". We can do better than that.

<comment><USER10> Actually the USA does have secret laws.

Ask for the law requiring ID to travel. Nobody will show it to you. A decade ago an activist sued to try to see it, the case went to the 9th circuit, and he lost. Without being allowed to see the law.

See [http://papersplease.org/gilmore/](http://papersplease.org/gilmore/) for verification.

<comment><USER11> Not that I agree with the concept of the law in question, a private airline does have the right to require that you present any ID of their choosing to fly on their planes. They have the right to refuse you if you choose to not follow their rules.

There is room for debate on whether the airlines should be creating their rules based on laws for the TSA that are then not publicly displayed. But the thing is, if the law pertains to the airlines and not the public then that's the sticking point.

Let's say that the lawmakers had decided that said law involved national security and that gives precedent to keep the law secret to those it does not directly affect. The law, which we haven't seen, likely only pertains to the airlines directly and not the passengers. The airlines are informed of the law that tells them they are required to request ID. It's likely you couldn't even sue in that case because you wouldn't have standing.

The thing is, this type of law likely no longer applies. These days, in the U.S. at least, you typically do not have to show ID at the counter to get your tickets or at the gate to get on the plane, which was done in the past. They might ask to verify you should be getting the tickets you are requesting, but likely they won't resist much if you refuse. Recently you only need a credit card to identify yourself to get your tickets from the automated kiosk. Now you have to show ID to a government agent at the security gate to get past. That's the rub, they are now requiring that you show ID to get past the security gate, not to get on the plane. You are not being restricted from traveling by not showing ID, you are being restricted on entering a certain part of the airport for not showing ID. If you can get past the security gate, you are free to enter the plane.

Therefore, you cannot claim the government is preventing your right to travel for refusing to show ID at all. They're just not letting you go down a certain hallway in a building for refusing to show ID.

Any law can be written to do anything you want that easily passes Constitutional muster if you think things through.

<comment><USER10> _Not that I agree with the concept of the law in question, a private airline does have the right to require that you present any ID of their choosing to fly on their planes. They have the right to refuse you if you choose to not follow their rules._

The ID was purportedly required by the TSA, not by the airlines. And so cannot be justified on the right of the airline to set rules that they want as a private entity.

<comment><USER11> I totally agree, that's why I believe the requirement was shifted from the airlines' responsibility to the TSA directly. Now you are not being asked for ID to travel, you are being asked ID to pass a security gate.

<comment><USER12> > I totally agree, that's why I believe the requirement was shifted from the > airlines' responsibility to the TSA directly.

No, it was shifted as part of the general shift of security responsibilities to the TSA so that the airlines (who don't have sovereign immunity) wouldn't be responsible for future security incidents, that would instead be the responsibility of the TSA (who does enjoy sovereign immunity except to the extent Congress chooses to waive that immunity.)

<comment><USER11> I agree with this as well. Such as shift can have more than one benefit.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER13> "In fact, it took EFF longer to figure out how to physically file a motion with the FISC than it did for the FISC to dispatch with the DOJ's arguments."

</comment><comment><USER14> Ignorance of the law is no excuse.

This is obviously a problem for people who wish to be law-abiding citizens if the laws themselves are secret.

Having too many laws for a single individual to keep track of can be nearly as good as having secret laws, when it comes to keeping people ignorant of the law, and thus making it easy for the government to persecute anyone they don't like by prosecuting them.

I read once about a defense attorney who played a game while riding along with a police officer. They would follow a car, and the policeman would win if he could point out a legitimate reason for which he could make a traffic stop, if he was so inclined.

The officer won every time, usually within a few blocks.

I saw a video [1] which noted that possession of a lobster can be illegal: "It doesn't matter if he's dead or alive. It doesn't matter if you killed it or it died of natural causes. It doesn't even matter if you acted in self defense! Did you know that? Did you know it could be a federal offense to be in possession of a lobster? Raise your hand if you did not know that. [audience raises hands] There's the problem!"

I don't think this situation is due to a conspiracy to take away our freedoms, on the principle that we needn't ascribe malicious intent when mere laziness and incompetence will suffice. Basically the law is a codebase with lots of sometimes-circular dependencies, which isn't refactored nearly aggressively enough, so the cruft accumulates. Taking into account that in the US the "initial commit" is hundreds of years old [3], there are ~50 forks, and it's still a fast-moving target, it's not surprising that the sheer amount of complexity is more than any one person can appreciate; even after decades of study and practice, AFAIK even the best professional lawyers are basically ignorant of the law in other specializations, and even within their own specialization they sometimes need teams of lawyers and paralegals poring over legal texts to find out exactly what the law says about their particular case.

[1] The quote occurs at about 6:55 [2] in [http://www.youtube.com/watch?v=6wXkI4t7nuc](http://www.youtube.com/watch?v=6wXkI4t7nuc)

[2] The entire video is witty and informative, and it's something that everyone should watch at least once.

[3] Maybe it's more like _thousands_ of years old -- if you go back through English law, there are probably things that go back to the Norman conquest in 1066, or Roman Britain even earlier.

</comment><comment><USER15> There can't be a democracy with "secret laws". I hope people will see that through whatever excuses the administration will try to launch next.

</comment><comment><USER16> As well the FISA court should reject that argument.

<comment><USER17> It's a surprise because it's one of the few times the FISC has said no to the gov't.

<comment><USER16> Well, except for that one time when the court said a part of the law is unconstitutional and the government refused to mention the specifics of that ruling. ;)

</comment></comment></comment><comment><USER18> So the fight is for public disclosure of a decision of which the outcome is already known?

<comment><USER19> I believe the decision was know as in we know that they ruled some parts of the law were unconstitutional. But if I understand correctly, it wasn't released what parts of the law were unconstitutional or why they were unconstitutional. This was for public disclosure of that information.

</comment></comment><comment><USER20> The ABA ought to threaten disbarment of any government lawyer that argues something so unamerican.</comment>


New Tesla movie starring Ethan Hawke - sahin-boydas https://youtu.be/UQ7U_pft3Qw <comment> da-x Nice! Looking forward to it.

The bundling of 1980's synth music is also nice. Why I find synthwave so alluring, perhaps it promotes nostalgia which chronologically depicts times that are most farther than the horrors of the 1940's _and_ the troubled times of present day 2020.</comment>


How many of you own and love your Macbook Air now? - <AUTHOR> http://www.maheshsubramaniya.com/article/2008-i-hated-macbookair-now-loving-it.html

<comment><AUTHOR> some ofmy fellow devs are mac owners and some linux and rest windows. But how many of you are MBA owners and like the same way as MBP?</comment>


With new Fit technology, Nike calls itself a tech company - <AUTHOR> https://techcrunch.com/2019/05/09/with-new-fit-technology-nike-calls-itself-a-tech-company/ <comment><USER2> As a former Fuel Band owner, I wouldn't trust Nike and "tech" in the same room. I'm still ticked off about the "we'll support Android in a few months" bait and switch they pulled. The tin foil hat on one shoulder says it's because Tim Cook was on the board, but the more rational side says its because we developers are fundamentally lazy, and its easier to support one platform than the hodgepodge of Bluetooth implementations across Android. The deceit is what gets me.</comment>


Airbnb: Sunsetting React Native - <AUTHOR> https://medium.com/airbnb-engineering/sunsetting-react-native-1868ba28e30a <comment><USER2> This is well time as we have been evaluating moving from completely native for iOS and Android to Reactive Native for our app. I am really hoping that we don't because I think we probably would run into most of the challenges they hit.</comment>


Stackoverflow: Are there any famous one-man-army programmers? - <AUTHOR> http://stackoverflow.com/q/529757/47846 <comment><USER2> Dave Cutler.

It's a bit of a shame that the world at large doesn't get to see his code in NT. It is by far the most gorgeous C code I've seen. In fact, in the beginning, there have been times when I used to look up his code just to feel inspired (think of it as 'code inspiration').

Getting to meet him and work in the same team as him for the last few years has definitely been the highlight of my Microsoft career.

Also, my wife (HN username:arithmetic) will tell you that getting a autographed copy of Showstopper was one of the best gifts I've gotten her :)

<comment><USER3> And that is not the whole of his career. If I am not mistaken, NT is the third os in which he has been the head dude: RSX-11/m, and VMS being the other two.

<comment><USER2> Yup. He also wrote a compiler book in the 80s. He once gave me a mini-lecture on old architectures from the 70s and how 'we kids had it easy these days'. It was awesome, even if I didn't catch any of the content until he started talking about x86 :)

<comment><USER3> Cool.

Do you recall the title of the book? I am unable to find any reference to it.

<comment><USER4> Perhaps this? <http://www.amazon.com/dp/0932376193>

<comment><USER3> Thanks much.

That turns out to be one of the better engineered compilers, at least according to David Conroy (author of MicroEmacs, author of the first handful of compilers for Mark Williams, hardware engineer for DecTalk and who should be on this list).

</comment></comment></comment></comment></comment></comment><comment><USER5> I'm surprised to see Markus Alexej Persson (aka Notch) missing from that list for Minecraft. Between doing the coding and art, he's demonstrated that he can basically do it all.

<comment><USER6> Instead of being surprised to see an answer missing, why not add the answer?

<comment><USER5> Because I'd have to make an account to answer this one question, while I'm already a member here at HN.

<comment><USER7> There's not much to creating an account if you use OpenID. Two clicks from the login page, IIRC.

<comment><USER8> Good spot to observe how OpenID doesn't make people any less likely to bother logging in

</comment></comment></comment></comment></comment><comment><USER9> > Chris Sawyer [...] RollerCoaster Tycoon [...] entire game was written in > assembly language.

That is quite humbling to say the least.

<comment><USER10> Really? Around the time of RollerCoaster Tycoon (and beforehand) games were written in Assembly language. I was writing games in assembly language back in the 80s and early 90s.

Certainly if you wrote games for the Atari ST, Amiga or any of the 8-bit platforms you would've written it in assembler. Compilers just weren't efficient enough at producing the fastest code possible at the time.

<comment><USER11> It's particularly odd because he was writing for DirectX/x86, and thus had lots of power compared to the contemporary console hardware. Wolf3D(1992) used C; Ultima 7(also 1992) used C++. RCT came out in 1999, when this transition was essentially complete, with the possible exception of a few holdout platforms, e.g, Game Boy Color.

On the other hand, Sawyer did have some rationale to continue going all-ASM, since he had been building up the engine code over the course of the decade, and when he first made it for Transport Tycoon(1994), hand-optimizing the rendering code was probably the only way to achieve a smooth high-res isometric renderer.

<comment><USER10> You raise a valid point - certainly for the Amiga 500 you knew you only had a certain number of platforms and CPUs and you could even make snap judgements like, "No-one's going to run Stunt Car Racer on a top-end Amiga 3000." - thankfully cookie didn't and Stunt Car Racer was awesome regardless of platform, but Mercenary on the other hand was never built with an 060/66 Blizzard board in mind and was impossible to play.

I think the PC world encouraged the use of higher level languages as waiting for VBL's became more important than squeezing all the juice you could because of the potential variations.

Thanks for your comment, it's inspired a new sense of respect for 486 progrmamers (25/33/50? SX, DX? - we can't worry about that, we have TIE fighters to render!)

</comment></comment></comment></comment><comment><USER12> Also, I know some programmers who generally program best if just left alone to do their job, instead of trying to get the 'team' to decide everything. Left to their own devices, they end up with the 'right'* answer in much less time than if forced to argue design with a team and then work with a team to implement it.

I know others that work best in a team and definitely benefit from talking out the entire design beforehand, and then coding pieces of it together.

So yes, there's a very good chance that those programmers who think they work better alone actually do work better alone. It's probably experience talking, and not just hubris.

* (Yes, I know there's no 1 'right' answer. The answers they come up with are always as good as they get, though.)

</comment><comment><USER10> I'm so surprised Fabrice Bellard is so far down. The guy is absolutely one of the greatest developers I've ever ever had the luxury of reviewing the code of.

By comparison, DJB is a force of nature when it comes to programming, but reading his code can be a little difficult (try understanding qmail's source base as an example). I have to admit though, _why's is the most readable of all truly great code, despite the fact that it's at least mostly in ruby.

<comment><USER13> Agreed, and if you're talking about an _army_ , DJB is a wonderful example. Not only can he write iron code, but he can successfully sue the government when they try to restrict it, _while representing himself_ : <http://en.wikipedia.org/wiki/Bernstein_v._United_States>

That, and teaching a course where the class uncovers 44 Unix security holes is quite impressive: [http://it.slashdot.org/story/04/12/15/2113202/DJB- Announces-...](http://it.slashdot.org/story/04/12/15/2113202/DJB- Announces-44-Security-Holes-In-nix-Software)

<comment><USER14> Wow. Hearing about this guy for the first time. Inspiring ....

</comment></comment></comment><comment><USER15> Basically every independent game developer.

</comment><comment><USER16> I believe Bill Joy has to make the list.

From wikipedia:

"Some of his most notable contributions were the vi editor, NFS, and csh. Joy's prowess as a computer programmer is legendary, with an oft-told anecdote that he wrote the vi editor in a weekend. Joy denies this assertion.[2] Joy's accomplishments have been sometimes exaggerated; Eric Schmidt, CEO of Novell at the time, inaccurately reported during an interview in PBS's documentary Nerds 2.0.1 that Joy had personally rewritten the BSD kernel in a weekend."

"Joy was also a primary figure in the development of the SPARC microprocessors, the Java programming language, Jini / JavaSpaces and JXTA."

"BBN had a big contract to implement TCP/IP, but their stuff didn't work, and Joy's grad student stuff worked. So they had this big meeting and this grad student in a T-shirt shows up, and they said, "How did you do this?" And Bill said, "It's very simple — you read the protocol and write the code."

<comment><USER17> > "How did you do this?" And Bill said, "It's very simple — you read the > protocol and write the code."

Love it. Reminds me of the Feynman Algorithm mentioned here on HN a few days ago. Regarding how Feynman came up with so much brilliant, groundbreaking work, that the steps he supposedly followed were:

1\. Write down the problem.

2\. Think real hard.

3\. Write down the solution.

</comment></comment><comment><USER18> I posted it on the page but one guy some here might like:

L. Peter Deutsch for writing the PDP-1 version of Lisp at the age 12 (he was the son of an MIT prof and was hanging out with MIT Hackers back in the 60s) he also wrote Ghostscript

<comment><USER19> And he wrote one of the first JIT code generators for Smalltalk-80 while at ParcPlace.

</comment></comment><comment><USER20> Dan Ingalls, implementor of Smalltalk isn't on the list.

</comment><comment><USER21> My answer was James Clark: he did groff, sgmls, expat, and important parts of the XML and Relax NG specs among others.

<comment><USER22> Yes. James Clark's most impressive work was nsgmls, which was a correct and comprehensive SGML parser (one of the few that ever existed). The annotated SGML standard was 688 pages long, and it was still missing huge amounts of critical information.

I know some truly amazing Lisp hackers—some of the most productive programmers I've ever met—who considered nsgmls an amazingly and slightly disturbing feat.

</comment></comment><comment><USER23> I will go with a real-life example. A person that I know of.

Ishaan Chattopadhyaya IMO, not many outsiders know of him but he single- handedly rewrote MapQuest Search.

</comment><comment><USER24> <http://en.m.wikipedia.org/wiki/Why_the_lucky_stiff> nuff said.

</comment><comment><USER25> How about X-Plane creator Austin Meyer?

</comment><comment><USER26> I'm sad to see that there's not been any mention of Geoff Crammond (Revs, The Sentinel, Stunt Car Racer, Formula One Grand Prix). He was singled out even 'back in the day' for being the ultimate one-man army when it came to game development.

</comment><comment><USER27> Flavien Brebion, not quite famous but is making a highly anticipated sci-fi game. [https://secure.wikimedia.org/wikipedia/en/wiki/Infinity_%28M...](https://secure.wikimedia.org/wikipedia/en/wiki/Infinity_%28MMOG%29)

</comment><comment><USER28> Casey seems to be the one-man programmer/sysadmin of Ravelry: [http://codemonkey.ravelry.com/2011/02/12/ravelry-in- bullet-p...](http://codemonkey.ravelry.com/2011/02/12/ravelry-in-bullet- points/)

</comment><comment><USER29> Lennart Poettering - Creator of Avahi,pulseaudio, systemd <http://0pointer.de/lennart/>

</comment><comment><USER30> Gabest of mediaplayer classic, whoever that may be. Avery Lee of virtualdub.

</comment><comment><USER31> [http://www.google.com/events/io/2009/sessions/MythGeniusProg...](http://www.google.com/events/io/2009/sessions/MythGeniusProgrammer.html)

</comment><comment><USER32> Don't know about famous, but this guy seems like a one-man-army-programmer. <http://www.losethos.com/>

</comment><comment><USER33> fabrice.bellard.free.fr - <http://bellard.org/></comment>


Host Your Static Website on Amazon S3 - <AUTHOR> http://aws.typepad.com/aws/2011/02/host-your-static-website-on-amazon-s3.html

<comment><USER2> Couple this with tools like Jekyll or nanoc (with JavaScript-powered comments, perhaps) and you can easily roll out powerful static sites that are dynamic locally. I can see this getting a lot of use because it makes it so easy to rig up new sites right from the shell. It was already _pretty_ easy but the ability to create a new "site" by merely creating a bucket on S3 reduces the friction even more.

(Perhaps too easy, even.. Rig up a domain registration API, content generator, and an S3 uploader and you could have a script pumping out auto-generated "content" sites all day without any hassles right from your terminal window.)

<comment><USER3> I think for many personal websites Jekyll[1] style static website generation is going to become very popular. Previously you were always limited by a few dynamic parts of your site such as comments, newsletter registration and questionnaires but now between services like Disqus, MailChimp and Google Docs, you really don't need to pay for any of that anymore. All the dynamic parts of your site are external.

The only cost now is hosting the website at S3 and those costs are substantially lower than competitors. NearlyFreeSpeech[2] is the closest web host to S3 that I can think of and their prices for storage are $10/GB ($0.01 per megabyte month) whilst S3 starts at $0.140 per GB. If your site gets hit incredibly heavily Amazon S3 will also handle the load transparently. If you find that your site is becoming popular in Europe or Asia than it's also supremely easy to push your site from S3 to CloudFront.

I wonder how far you can take this though? How complex a site can you set up using only static hosting and external dynamic services like Disqus, MailChimp and Docs?

[1] <https://github.com/mojombo/jekyll/wiki> [2] <https://www.nearlyfreespeech.net/services/hosting>

[EDIT] As TeHCrAzY said I ovestated the cost of bandwidth transfer but whilst bandwidth falls rapidly it still falls slower than S3 (at ~10TB of transfer it approaches S3's starting price). More importantly I realised I undestated the cost of storage - it's $10/GB and not $1/GB making it closer to 100 times more expensive than S3.

<comment><USER4>
        Previously you were always limited by a few dynamic
        parts of your site such as comments, newsletter
        registration and questionnaires but now between
        services like Disqus, MailChimp and Google Docs,
        you really don't need to pay for any of that
        anymore. All the dynamic parts of your site are
        external.

Is there any good external forum system (google group isn't it due to spam)?

<comment><USER5> You can just use HN with my little Ycomments hack:

<http://will.m.aier.us/ycomments>

</comment></comment></comment></comment><comment><USER6> You've been able to do this for a while now with CloudFront serving your S3 buckets - I'd suggest the few extra cents per month for the CloudFront CDN service is probably a better way of managing static Amazon hosted sites...

(curiously, the domain name I experimented with this on late last year is strangely appropriate here: <http://www.damhik.com/> )

<comment><USER7> That's not entirely true. With cloudfront, you were able to set that when you goto <http://example.com> that it would send you to <http://example.com/index.html>. However, it would not support you when you accessed <http://example.com/dir/>. That would not redirect to <http://example.com/dir/index.html>.

</comment></comment><comment><USER8> That sound you hear is the collective groan from every oversold cheapo shared hosting company owner.

Unlimited hosting for 5 bucks? How's world class with a CDN for 45 cents?

<comment><USER9> Plus, Amazon doesn't say "unlimited" and then turn around and say "haha oops there are pretty low limits after all!" when you get Slashdotted. Their pricing is transparent. The cheapo shared static hosting providers are now officially the living dead.

<comment><USER10> Unless they rebuild their cheap static hosting company on top of s3 with some value add. Worked for heroku very nicely.

</comment></comment></comment><comment><USER11> Are cheap static sites really that big of a break-through? Whether a site is 50 cents a month through Amazon or $20/month for dozens through Linode (with the option of non-static), doesn't seem to matter that much to me when most people spend well over $20/week for coffee. The lowest-paid programmer in the US can make $20 in an hour. Anyways, love all the services that Amazon puts out and this is definitely a nice option, but I don't see it as exciting news on an individual basis. Anybody agree?

<comment><USER12> Agreed. I think it's less about cost, and more about scaling. Not to have to worry about scaling is interesting.

<comment><USER11> Definitely, I can see the potential, particularly in terms of building services on top of this feature. Will be interesting to see how it is leveraged.

</comment></comment></comment><comment><USER13> I think is this bigger news than it seems as this enables many other new services to now be built on top of S3.

<comment><USER14> Yep. Just wait until Dave Winer gets going with this :)

<comment><USER15> He already is on it: [http://scripting.com/stories/2011/02/17/howToMapADomainToAnS...](http://scripting.com/stories/2011/02/17/howToMapADomainToAnS3Bucke.html)

</comment></comment></comment><comment><USER16> It's still impossible to host the root domain of your website on S3/CloudFront or serve it through an EC2 Elastic Load Balancer.

www.mycompany.com - OK mycompany.com - needs an EC2 instance and Elastic IP

This is because the only way to point your domain at Amazon is with a CNAME record and DNS does not support default CNAME records. It can only work if you add your CNAME record to the 'com.' top-level domain, which is impossible. See <https://forums.aws.amazon.com/thread.jspa?threadID=32044>

<comment><USER17> That is easily solved by doing a permanent redirect (301) from mycompany.com to www.mycompany.com. Many DNS providers such as Godaddy.com have a free redirect service just for that purpose.

<comment><USER18> Do they? I have to look for that, I've been sending all those to a server of mine for that purpose, but if that server goes down or shuts down or anything, my redirects will stop working. Thanks for the info!

<comment><USER19> See <http://www.wwwizer.com/> , hosted on EC2 btw last I checked.

<comment><USER16> I'm thinking of making a paid version of this, with multiple IPs in each region. I registered rootredir.com. Are any of you interested in this? How much would it be worth to you per month?

</comment></comment></comment></comment></comment><comment><USER14> May I say "awesome" and "finally"? That's awesome. Finally.

<comment><USER9> Speaking of finally, I wonder when they're going to add proper support for "Content-Encoding: gzip". Last I checked, people would upload gzipped content and add the Content-Encoding header on top, which is inconvenient and doesn't support browsers that can't handle gzipped responses.

<comment><USER20> Honest question: which browsers can't handle gzip'd responses?

<comment><USER21> IE6 has problems with cached Gzip files: basically it forgets they're Gzipped in the cache and then drops the Content-Encoding part of the file. So it loads garbage as far as the JS interpreter is concerned.

</comment></comment></comment></comment><comment><USER22> So, who is going to be the first person to create a new static hosting provider built on top of S3?

</comment><comment><USER18> Or use App Engine and get pretty URLs, stats, etc as well:

[https://github.com/stochastic-technologies/static- appengine-...](https://github.com/stochastic-technologies/static-appengine- hoster)

</comment><comment><USER23> Do they also give you the server logs? e.g. access.log

<comment><USER24> Yes, s3 buckets let you specify a bucket for logging and they include things you'd expect like IP address, referrer: [http://docs.amazonwebservices.com/AmazonS3/latest/dev/Server...](http://docs.amazonwebservices.com/AmazonS3/latest/dev/ServerLogs.html)

</comment></comment><comment><USER25> So now you could build a pretty serious web application with frameworks like Backbone.js and host it for pennies, very cool.

</comment><comment><USER26> I ported my site to jekyll last night and moved to S3 for hosting. Then I realized that my .htaccess file wouldn't work so I couldn't redirect some links I wanted to keep.

I'm mostly a product guy, and the entire experience of setting up jekyll was exhilarating.

S3 was pretty easy to set up for hosting.

[http://iamnotaprogrammer.com.s3-website-us- east-1.amazonaws....](http://iamnotaprogrammer.com.s3-website-us- east-1.amazonaws.com/)

But, I moved the site back to linode for htaccess to work. <http://iamnotaprogrammer.com>

</comment><comment><USER27> Maybe this is a good place to ask about an idea I've been toying with, but I'm not sure about the security implications of.

I have an app that generates user content, little chunks of audio. I don't want to get into running some server infrastructure just to let users share their content on facebook/twitter/... so what about letting the app upload an html file to an s3 bucket, with the data embedded in the file and a bit of javascript for an audio player UI? Practical?

<comment><USER18> If the html file is self-contained, sure. Basically, if you can serve it from a static directory and have it work, it'll work on S3.

</comment></comment><comment><USER28> <http://sociablelabs.com> has been doing this for a little while now and I've been pretty happy with the performance,

</comment><comment><USER29> This could be useful if your site has an extended outage one day. Create a bucket called "mysite.com" and another called "www.mysite.com" and put your failwhale page in it (set to be the root page). If your site goes down and you know it will be down for an extended period (ouch), you can change your domain's DNS entries to point to s3.amazonaws.com. Then at least your customers will have an explanation.

</comment><comment><USER30> It would be great if someone could build a routing service (ala .htaccess on the cloud), so that we can make use of S3 without breaking the URLs.

</comment><comment><USER31> How's www.mydomain.com vs. mydomain.com handled?

Do I need to create two S3 buckets with duplicated content?

<comment><USER25> Its pretty easy to redirect mydomain.com to www.mydomain.com (or the other way around) through your domain registrar these days.

<comment><USER32> ...or you have your domain registrar doing the redirection for you automatically when setting up the DNS for S3:

[http://iwantmyname.com/services/developer/setup-custom- domai...](http://iwantmyname.com/services/developer/setup-custom-domain- amazon-s3)

</comment></comment></comment><comment><USER33> This is awesome, _but_ there is one thing I wish could be changed.

I currently host my (Jekyll-powered) site with S3/CloudFront. The error pages is awesome, but it only works if accessed through S3, not CloudFront.

<comment><USER34> The article talks about custom 4xx error pages - what more do you need?

<comment><USER33> If your site is accessed through CloudFront, those custom error pages don't come into effect... as I clearly said.

</comment></comment></comment><comment><USER35> This is perfect for auto-scaled hosting a Cappuccino app, so the server cluster can be focused only on the backend.

</comment><comment><USER36> it's almost a CouchApp :) <http://couchapp.org/page/what-is-couchapp>

</comment><comment><USER37> I gotta give Amazon props for extending their products along the lines that their customers clearly want. The only problem is, given the wikileaks affair, I don't trust them.

Maybe this is silly. It is certainly not like they're likely to pull down any of my stuff. And I do have some largish files hosted there for convenience, but I'm wary about becoming dependent on them in any way.

(Wikileaks was hosting their webpage on amazon, not the leaked cables themselves. Amazon pulled their account without having gotten a court order or giving them any warning, and they weren't hosting anything illegal there anyway.)

<comment><USER38> I am not an Amazon supporter but come on, do you think if you were hosted on any other US service, rackspace or what have you, that they would keep hosting you while the us govt was pressuring them to shut you down?

<comment><USER37> Thats the thing about integrity. You never know if someone has it until it is tested.

This same question could be asked about any hosting company that hasn't been presented with such a request.

I'd be interested in hearing about hosting companies that have, and that stood up to them.

The US is supposed to be a country of rule of law. They should need to get a court order.

<comment><USER39> Dreamhost has a reputation for being pro-free-speech, and there are some anecdotes online that support this. Their TOS are also on the more friendly side, from what I've seen. I've also been quite pleased with their hosting in every other respect.

(disclaimer: founder is an old college friend)

</comment></comment></comment></comment><comment><USER40> Exactly!

Sometimes I just want to create some static pages, but I was forced to use either CMS or things like wordpress.

Now I guess there is a solution which is also super reliable.

AWS is just amazing.

<comment><USER41> _> Sometimes I just want to create some static pages, but I was forced to use either CMS or things like wordpress._

Wtf?! To create static pages, I open Emacs and type there. No need of a CMS or Wordpress to create an HTML page!

Then to host it:

      scp page.html email@example.com:~/public_html/

and you're good to go.

Hosting a website on S3 is nice, but it's not simpler than what is already possible if you own a server. If you don't already own one, I'm not sure setting up an AWS account + client code is easier than creating a new VPS account. I surely would prefer to set up a Linux VPS, which is an environment I'm confortable with.

Regarding the costs, I rent one private (not virtual) server for 20 euros/month, and host several (static and dynamic) sites on it, so it's actually cheaper than going the AWS road. Uptime last time I logged: 560 days (aka reliable enough for me).

<comment><USER42> You misunderestimate the ineptitude of unwitting sysadmins such as myself. It takes me days to set up a VPS. It took me a good few weeks to figure out how to get Django working. I screwed up my latest VPS so badly that I had to scrap the thing and start again.

Some people really suck at these things.

 _> Regarding the costs, I rent one private (not virtual) server for 20 euros/month, and host several (static and dynamic) sites on it, so it's actually cheaper than going the AWS road. Uptime last time I logged: 560 days (aka reliable enough for me)._

S3 will cost literally pennies for hosting a simple static website. A VPS is orders of magnitude more expensive.

</comment></comment></comment><comment><USER43> s3 is the new geocities:P

</comment><comment><USER44> As entrepreneurs at what point do you decide that Amazon is "too big" and do you decide to stick with smaller service providers? Is your use of Amazon strictly a commodity provider?

<comment><USER45> What do you mean by "too big"? I guess what I'm wondering is what about that would motivate switching to smaller providers.

<comment><USER44> This probably deserves a separate discussion.

As an entrepreneur do you also use other entrepreneur's/start-up's services or just rely on the big (market share) players in the market? A startup is hard so do you go out of your way to help support other smaller service providers?

If you have an opportunity to support competition in the marketplace by not flocking to the lowest price(Walmart) but paying a bit more for a smaller service, do you make that sacrifice?

Knowing that NearlyFreeSpeech.Net appears to offer similar functionality, why choose a larger provider like Amazon if you have the mindset of a founder?

<comment><USER46> No part of the mindset of a founder requires you to select inferior alternatives out of empathy for the people who provide them.

</comment></comment></comment></comment><comment><USER47> This is nuts. It's nice to see the internet being increasingly commoditized -- hell, Amazon has commoditized _people_.</comment>


A Million-user Comet Application with Mochiweb, Part 1 - <AUTHOR> http://www.metabrew.com/article/a-million-user-comet-application-with-mochiweb-part-1/ <comment><USER2> Yeah, libevent with http support scales crazy. I did a 4-5k req per second demo application last year. It took me about 25 minutes to write it (that was what shocked me most.)

Also a libevent server would probably fit the L1 cache. The data might fit in L2 depending of a function of overall throughput, message sizes, and of course the size of the L2 :)

<comment><USER3> Very interesting. A couple of questions for you, in no particular order.

1\. Have you used libev? I read that it's comparable, and in some ways superior to libevent, but I'm not sure why. I haven't found much documentation, though. Do you know if it also has some kind of HTTP server built in?

2\. If I understand libevent correctly, it just uses a highly efficient mechanism to watch the file descriptor corresponding to a server socket (epoll, kqueue), and when data comes in on the socket, it runs a handler. If the handler is small and efficient, then in theory it will run faster than code which has several listener threads because thread context switches take time, and because it becomes more difficult to take advantage of the CPU's cache. Is this really still true in e.g., recent Linux kernels with NPTL? Also, would you run two libevent app instances on a two-core CPU?

<comment><USER2> 1\. No experience on livev, only libevent. 2\. libevent is an abstraction layer providing a single API for many event based subsystems. So you can write ANSI/POSIX C code with it portable and at the maximum available event i/o layer.

I doubt any implementation on NPTL or any threading mechanism can get close in performance to this. The overhead of managing threads is big.

About multiple cores, I don't think it is necessary. The CPU work should be minimal. If there is something else you need to do as backend, maybe it can be on a separate process and use fast inter process communication, say sharing memory (rfork is a good start, for example.)

</comment></comment></comment><comment><USER4> The benchmark is very misleading as it's very cheap to open connections, especially when using non-blocking IO...

A good post about real-life performance of different comet frameworks: <http://cometdaily.com/2008/03/14/comet-gazing-maturity/> They range from 1000 to 20.000 users pr. node.

</comment><comment><USER5> I'm curious, does anyone know if this has been implemented somewhere and has actually been profiled?

Just because something can open a million connections doesn't mean it's stable enough to be a million-user application.

<comment><USER6> You would need a _lot_ of ram to service a million users on a single server and actually do something useful with them. Input/output buffers alone would amount to a lot (Several gigs most likely)

I've run things up to around 50k in practice (Not erlang, java).

Stability isn't an issue really, mainly ram.

<comment><USER2> The memory issue is Java. Not for event-based C. (Don't believe me, go to the language shootout and see Java vs. whatever and look at the memory use.)

Also what does "a million users" mean? A million open connections? How many requests active simultaneously?

One million simultaneous HTTP requests would sure eat a lot of memory, but who does it that way? It's stupid. The kernel handles socket buffers for you. Each processor core can only read one socket at a time. So as long as you don't take too much longer to respond requests you should be fine.

Plus with things like event based libraries you can just place a read on the socket for at least X size to "wait" till the basic of the request is fulfilled.

I don't know what they are trying to do, it all depends on what the server does. For pure messaging across connections it should be an order of magnitude better in C/libevent. But as I say, I need more info.

<comment><USER6> Yes java adds some overhead, but you still have the low level buffers.

A million open connections we're talking about. All active, connected.

Agreed, c/assembly would obviously reduce the memory footprint. But is the extra work worth it? I'd say not for most apps.</comment></comment></comment></comment>