It seems like semicolon insertion is an example of browsers being liberal acceptors of slop. Good that the rules are codified by ECMA, much like HTML5's error recovery parsing rules, but I wouldn't omit semicolons on purpose.
HN user
domnit
Phase-change memory.
Psh, people have known for ages that marijuana can expand the mind.
(Sorry, that one was just too easy.)
In a real world program you would validate input and make sure you get something callable (with either technique). The only additional unexpected behavior is when there could be unexpected handle_xxx attributes. If we take for granted that the programmer defines the dict for the explicit dispatch table, though, we can also assume that the programmer defines the object for the implicit table.
As a dynamic language, Python already has similar tables built in. You can use something like:
getattr(self, 'handle_%s' % action)Schematic tables [http://subtextual.org/OOPSLA07.pdf] are an extension of this idea that can handle arbitrarily complex conditionals. Unfortunately, they only work in Subtext [http://subtextual.org/], an unreleased research language. Schematic tables take advantage of the 2-dimensional visual layout of Subtext (as opposed to linear text, like most languages); it would be very interesting to see something similar in text.
> here is an idea that can be easily implemented right now and that will cover the 100% of the web design community needs.
> If you think for a moment how exactly non-standard fonts are used in the web design, it will immediately make perfect sense. They are used sparingly for headers, menus and such and they are always rasterized.
Non-standard fonts are used sparingly precisely because they have to be rasterized.
Their claim is pathetic, based on hypothetical misrepresentation. I hope they save face and drop it, and maybe rethink how how many lawyers a community college needs.
I wouldn't put all those messages up there with my own copyright notice. Besides that, I only see profile pics next to a few cyclists, so that could use a fix. Seems like this could be useful to someone in that community--maybe try pulling out trends, the way Twitter does across the whole service.
Digg can avoid pissing people off with this by adding their own framebuster. If the frameset's HTTP referrer is Digg, then the DiggBar is a potentially useful toolbar. If the referrer is something else, it should redirect to the original page.
If you figure out the answer to this, politicians, PR people, and journalists will be knocking down your door. Once misinformation is publicized, it is very hard to correct. This can only be assuaged by making the public, through education or experience, less naïve and more likely to seek out the truth.
I like this game a lot. There are very few original abstract / geometric games. Tetris is a classic because there is nothing like it in the real world (and because it's really fun). Kudos on creating a new kind of speed puzzle gameplay.
Reading is another activity done in sedentary solitude. A seven-year old shouldn't spend all day reading or coding, and most wouldn't want to.
I wouldn't fret about how young to introduce programming to a kid. I learned to program when my dad worked from home one day and I asked him what he was doing.
They're new, so I don't want to dismiss them, but if their selling point is their larger-than-Google index, I'm not buying. On my sample query, I got a web proxy in both the first and second pages of results. It's easy to have a large index if you are showing the same thing in triplicate. Google does a great job of narrowing their large index to what the user needs to know. Nothing wrong with some healthy competition, but Google was right to stop (publicly) counting pages.
I'm not at the point where I need to disconnect my laptop, but during exams last week and the week before that I used this user stylesheet in Firefox:
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain(twitter.com), url-prefix(https://www.google.com/reader/), domain(news.ycombinator.com) {
body {
display: none;
}
}
It would have been easy to turn off if I had to (I didn't), but it worked great when I'd idly click a bookmark to one of these sites to be given a blank screen.This looks very interesting. I'm far from knowledgeable in this area, but I'd think radiation-created transient errors would be a serious problem with something this small.
You can fetch all of the comments by comment_link_id in a single query, then work with the result to recursively print the tree.
Learning a library is not the way I would recommend learning a language. At 12 years old, javascripter has no time constraint to build a product fast.
javascripter, learn about Javascript's language features. Learn about nested function and function passing. Learn about object-oriented Javascript and prototypes. Learn the difference between Javascript the language, and DOM, the thing within the language you use to add functionality to web pages. If you find that you are repeating things, write your own library.
Is this the first programming language you are learning? If so, it will give you a leg up when you learn a more conventional language like C or Java, because it will give your mind flexibility. If you already know a programming language, understand that different programming languages have different ideas about how programs can or should be expressed. (That's why there are so many languages.) It will sometimes be helpful to see how something in a new language is similar to a language you already know, but other times you have to just say to yourself, this is different, and I have to think a new way.
I haven't gotten through all of it, but I really like the New Turing Omnibus, by A.K. Dewdney. It's about computer science, not how to program, so it would be interesting to non-hackers, too. Even if you are familiar with all of its topics, it can serve as a reference and clarifying tool for CS concepts.
How odd.
I was meeting my dad in NYC, waiting for him in a Starbucks, gave him the corner it was on. He went to the Starbucks 1 block over. After waiting for me a while, he asked an employee if there were any other Starbuckses nearby, and got a whole list. See also the Simpsons [http://www.snpp.com/episodes/3G04].
You're right, I take back that it's a "bash", but it is informed by anti-gay culture. I don't want to get into a discussion about that, because it's very much besides the point. I only included it because I thought it betrayed the childish nature of picking on a piece of software for no reason besides that a beta release still has bugs.
If you ignore my criticism of the headline, the point still stands that it's the article is empty. All pre-release software has bugs that will be fixed in the final release, and browsers, including Mozilla's, usually have some layout bugs. These get fixed, so if people are looking for problems with a browser, they should look elsewhere.
What the advice misses is that even at an early stage, you need decisions in place that allow scaling. For example, if you buy 1 truck for your one-person shipping company, you can move 1 container at a time. Adding a second truck lets you move 2 containers. 37signals is smart--they built their software so that it could grow to 2 servers--but they left that out of their advice. There must be a path from simple to complex.
Ugh. "Sucks balls." Ignore gay bash and hesitantly click.
So new layout features of a beta browser release are breaking some layouts. I wonder if the author ever used a Mozilla pre-release browser.
S3 is pay per use, but it's for static data hosting. EC2 is pay-per-use virtual machines, but it's at the granularity of machines. If you need a bunch of real, or real-looking servers, that's good, but it's too expensive if what you need is shared hosting.
S3 is cheaper than NFSN, so if you have lots of big files, you can host www.example.com on NFSN and point media.example.com to S3.
(Grain of salt: I haven't used EC2.)
Thanks for the reply, avinashv--I almost took the article at face value. I should know by now to be wary of "Top n Xs" articles. Good to have both sides, anyhow.
George Saunders has a great study of Dubai in his essay collection, the Braindead Megaphone. He mostly focuses on the exaggerated class division between guest workers and the rich natives. The book is worth picking up for the other essays, too, but certainly if you're interested in an intelligent Western perspective on Dubai. He was there as a tourist and journalist, not a resident, though.
I use NearlyFreeSpeech.net <https://www.nearlyfreespeech.net/>, which I heard about from BugMeNot. It's pay-per-use, so it can be very cheap (equivalent to a few cents / month, except it's not billed monthly). If you have a spike in traffic, they'll handle that just fine, since each site isn't bound to a single physical server. That also means your site isn't slowed down if some neighbor uses a lot of resources.
Some drawbacks are that there's no FastCGI, so no Django or Rails, and you can't get your own IP address, even for money, so no TLS. Also, it's Apache 1.3, if you care. If you just need to run some Wordpresses, they do a bang-up job or running mod_php 5.
Another model for keeping out trolls is Metafilter's. They require a $5 donation when an account is created, and kick out assholes. Of course, this keeps out a whole lot more than trolls. It's certainly the wrong way to do it for most sites, but it works for them, and perhaps for others.