skysight-inc/HackerNews huggingface dataset:
Normally, gotos wouldn't _necessarily_ be bad, but at least one of these is really really bad.

Consider the function OALIoCtlHalInitRTC, lines 122 and 139-143. The last else block has no obvious terminator, but it looks like the else is empty because of the comment and the indentation. So the line after the label cleanUp is the body of the else. This means that if the if on line 131 is true, the cleanUp code never gets executed. Now this may be intentional (but I doubt it since the label is named cleanUp), but that should be documented in the code.

I consider this use of a goto to be legitimate, since it avoids duplication of the cleanup code (and the last thing you want is to have multiple similar blocks of code that need to be maintained/modified in tandem). This idiom often appears in the linux kernel IIRC. But this code is quite terrible since it doesn't use the idiom correctly, produces an unexpected execution path, is a problem to maintain, and is a problem to read. It seems that it ends up being a no-op since the line after the cleanUp label is a debugging line or something, but that doesn't make this a good practice.

But really, this isn't really a problem with the use of goto, it's a problem with the optional braces on single statement blocks in C. The goto and the label chosen just make it harder to spot. I've made it a habit to use braces around all blocks, even empty ones, to make the intent clearer and avoid this problem.
Prince of Persia's Game Design and Why the Gaming Market Saturation Should be 90% not 50%
I misread yegge. lisp isn't a popular language its more of a language where you either use for industry or you use for experimentation or both. I personally think it doesn't matter what you code in blub or not blub it just doesn't matter. What matters is if you ship or not.
Ask YC: Recommend a good chair?
I'm in the market for a good chair for under $200 (so no Aeron suggestions please).

Any ideas?
VoIP: Dead or Alive?
I like the fact it is search reliant, figure after you make you might like losing the other clutter.. Windows 7 looks good so far; I really hope microsoft advances in user experience not becuase I like them but becuase so many people use them
A Web Powered Revolution in Teaching
Start a "hacker house" with two YC founders
A friend and I are driving out to the Valley from Virginia for the winter YC round. I'm actually writing this from a car on I-40 in the middle of AZ.

We're looking to start a "hacker house" in Palo Alto. It'll be a 4 month lease January through April. We're looking for 2 - 4 other hackers. If you're interested, check out this page for more details: http://bluwiki.com/go/User:Sam_Odio/Hacker_House or you can email me: first name at odio.com
For most things I agree that showing is better than telling, but bias is different. If someone is in a position to judge whether my point of view is biased, then they already have a clearer idea of the truth than I do, so they don't benefit from reading my expression of that point of view. It's the people who don't already know what I have to say (or don't already know that it's false, if I am in error) who need to know how biased I am.

So I gave some information about my background, which I hope will give readers a better chance of forming an accurate idea of my state of objectivity and ignorance.
Why not use Web 2.0 to provide seamless advertising on other people's sites?
The idea is to modify other people's sites to incorporate your content. You pay the site owner whenever your content is viewed/accessed.

You could even make it so that you have to pay more if your additions hurt the site's overall traffic.

Note that if an advertiser doesn't like your web design or any other aspect of your site, they could try to improve it while incorporating their content.

An automated algorithm tries out competing additions and shows more profitable ones more often.

I suppose this could be quite disorienting for users when their favorite sites are always changing. But it would not be obvious whether those changes are coming from advertisers.
Some programmer eating habits are also ways to control blood sugar, often with a weight gain side effect.
13 Useful Rapidshare search engine
You yourself just answered why regulation can't ever work correctly: "The real world is simply more complex than that."

As a programmer you should know that extremely complex systems like the world can not ever be managed by a small group of super clever beings.

This has been the fallacy of each and every of "I'm smart you're not, I'll run things" philosophies originally invented by Plato and perfected by Marx.

The world is a complex system managed by 6 billion autonomous beings. Together these 6 billion autonomous beings for an extremely smart mega intelligence. While you, I and our "leaders" may be smarter than the vast majority of these individuals. Together though is another story.

I agree with your point about corruption as long as we assume the presence of a regulating entity. Corruption is essentially the markets way of calculating a price on overcoming social engineering.

But without regulators in the first place it would not exist and would simply be just other transaction between two or more parties.
give the man whatever he wants, i don't want to be banished to the negative zone.
Well, the other thing about a startup is that it just ... started up. You can't be a startup forever. At some point you're just a business that started up awhile ago, and obviously at 12 employees, 37signals can't call itself anything but small.
I had no idea that was there... I'm sure most people don't.
To hell with 98. They got the UI right with Windows 1.0. It was a tiling window manager, just like the one I'm using now.
so, an intelligent spam blog?
Why IT Managers are Hiring Based on Experience
You could require that at least 50% say of the site content originate from the owner of the site.
That's pretty blind advice. There's a lot of factors that go into success. One of them is timing.
I found out that I liked economics shortly after I graduated from engineering, before which I had a completely skewed and cynical view of economics and economists, informed mainly by writers of left-wing books (who generally aren't economists). Fancying myself as a bit of an auto-didact, I tried to self educate. I bought textbooks, read articles from the net, read blogs, etc.

But if you're anything like me, then you will skip over all the boring fundamentals and read the more advanced, but interesting sections. Economic literature is written in such a way that the literate layman can be fooled into thinking he understands the material. There are specific terms used by economists (eg. economic profit) that has an entirely different definition than the common one (eg. economic profit takes into account opportunity costs). So I'd be reading these articles thinking that I'm getting it, but really I was missing 50-80% of what the guy was trying to get at, because I just had no idea or training in economic thought.

I spent 5 years doing this. There was no watershed moment where I realised this was the wrong way to go about it. Ironically I actually became so interested in economics that I enrolled in a graduate diploma 2 years ago (which is essentially an undergraduate economics degree for people with a degree in something else).

In my first semester, I had to correct a shitload of misconceptions that I'd harbored over the years. It was like doing double the work - challenging the material presented against my ill-informed positions, then fact checking and reasoning out which was correct. I was wrong most of the time, but there are positions that I still hold that university economics hasn't beaten out of me (like infant industry protection - for some reason uni economists are all staunchly pro-free trade, and they really only gloss over the alternatives).

So 2 years on (and 1 year to go), I feel that I'm in a position to offer some advice about learning (mainstream) economics. If you go the self-learning route:

1) Make sure you get a good grounding on the fundamentals of micro and macro. Any uni textbook is probably okay... that free Intro to Economic Analysis book is pretty good (I used it as a second textbook for my intermediate micro class). But the bottom line is read EVERYTHING and don't skip stuff because it's boring. They are often the most important parts...

2) A decent book for a general audience is "Economics in One Lesson" by Hazlitt. If you don't know what opportunity cost is, then you'll never forget after he's drilled it into your head a thousand times.

3) If you're serious about learning econs, I'd steer clear of popular books like Freakonomics and the Logic of Life. They're fun and enjoyable to read, but not particularly rigorous and occasionally quite dodgy.
This idiot needs to purchase a cave somewhere and then move in.
Practically Brand New in Quiet Troy neighborhood (housing rentals/new york/271947)
Making that ">=" would make that entire "if" check redundant, since we already know it's at least 365 (because of the "while" condition)

I think the "while" condition should actually be

while ((days > 365 && !IsLeapYear(year)) || (days > 366 && IsLeapYear(year)))

(or perhaps some simplification that I'm too lazy to figure out right now)

And then the inner "if" condition can be eliminated. Thus the final code could be:

while ((days > 365 && !IsLeapYear(year)) || (days > 366 && IsLeapYear(year)))
{
if (IsLeapYear(year))
days -= 366;
else
days -= 365;
year += 1;
}

This seems logical and easier to understand than the original too.

Edit: if you want to get ternary-operator fancy:

while (days > (IsLeapYear(year) ? 366 : 365))
{
days -= IsLeapYear(year) ? 366 : 365;
year += 1;
}
Being a hacker and a sometime entrepreneur doesn't mean that I have to think copyright makes sense. These are quite orthogonal to each other, and I would lose respect for someone if I found that they'd believed copyright invalid until they wanted to make a living off of it.
Climate scientists: it's time for 'Plan B'
No. That's incorrect. That would cause the year to go up on Dec. 31st (day 366), turning it into day 0. In fact, what you want is to change the while to an if statement. If it really does need to run as a while statement (to add more than one year at once?), then the alternative would be a break statement after line 271.
Make sure your founder is also really committed to it. I had one co-founder who kept his daily-job, was married and then, after some months, gave up when we had deadlines and much harder work was required.
Talk to him now about vesting plan and make sure he is for the long haul. Good luck!
dgordon. When you grow from nothing to something 13 times doesn't mean too much. That argument is totally irrelevant.

There is no way we could have had the kind of growth we experienced post WWII if we had stayed on the gold or silver standard. The monetary system we use now is not perfect, it's just the best we have available.

But it's definitely broken. We need to fire some of the people who should have warned us about the crisis we are now in but didn't and then move on.

I feel very badly for those who have suffered unfairly, and this includes millions of innocents, but these things happen.
>...who took the US off the gold standard by stealing everyone's gold in 1933.

Yeah, right...(command-k Fort Knox)...Holy shit, you're right. He took everyone's gold and payed $20.67 an ounce, then printed dollars until gold cost 35 bucks an ounce. I'm dumbstruck...so blatant.
A startup is legitimately an investable opportunity for a professional investor. (Just because 37signals doesn't want money, doesn't mean that they're not a good candidate for a VC investment.)
You may be correct on some of this but I hope the results you are hopeful about do not happen. If you think things are painful and make no sense now, try projecting how painful and lost things would be with a civil war and following small Capitalist/Anarchist state reality. The dreamy "small Capitalist/Anarchist state" you imagine would be the minority, the Switzerland's. The majority of the world would be an uglier place.
aeron.

seriously though, ikea has some pretty good chairs for the price, imo. or see if you can catch a higher end chair on sale online somewhere.
If you've never experienced the Milky Way on a truly dark (ie: new moon) night, I highly recommend taking a camping trip.

It's amazing, and the longer you lie there and wait, the more of it you'll see.

It will put into perspective just how little we are in our galaxy. (And that's just one galaxy!)
golden handcuff
I used to live in a developing country, and it was amazing what you could see at night.
IDF Now Using Youtube
Yeah, it's sad how pervasive unnecessary light pollution has become in this country. In Manhattan, you could barely see half a dozen stars at night.
...since it avoids duplication of the cleanup code (and the last thing you want is to have multiple similar blocks of code that need to be maintained/modified in tandem).

Isn't that the definition of "when to extract code into its own function"?
The simple reality (IMHO of course) is that people have always used Windows because it was "what everyone uses" and "what the office uses" and "what my software runs on". If you see it from this perspective, the people who wanted something different have already left to some flavor of UNIX or Mac, so those remaining are looking after their cognitive investment in having learned XP.

When you think about it, its amazing that Microsoft continues to sell Windows at all. Software is free to copy (should the medium break) and never wears out, so if you have purchased and operating system and are happy with it, why should you ever pay for another one?

I've been fascinated with Microsoft defenders (fan boys? lackeys? towel boys?) for years, since they seem to gain nothing by promoting the status quo (except for those whose job is subsidized by Microsoft). So, that everyone has bought a copy of Windows XP, why Microsoft should continue to make revenue?

Also, can we please make Linux (or maybe Haiku) a viable desktop OS? While I don't mind paying Apple a premium for their OS, it must be more efficient overall to have a non-profit develop a free OS once. Most new OS features at this point are marginally useful eye candy.
Unfortunately, it's much easier to introduce new bugs when refactoring other people's code.
Well that was my thoughts before I actually did it.. Now that I have the experience, I would say that planning a bit before quitting is important too (that was my failure), also make sure you have sufficiant reserve money to bounce back.

So go do it, but don't jump in with wide-eyed optimism without planning exactly what you want and need to do (but of course be prepared to change the plan)
Why is it amazing? It's a one-checkbox option to get rid of 10 years of candyland-style aesthetic mistakes. The underlying OS has nothing to do with transparent windows and pastels.
I confess that I still haven't read all of General Theory (it's sitting on my to-finish bookshelf), but I really found it quite turgid and wouldn't recommend it to anyone without some economics background (not least because it'll put you to sleep). Besides, most of the standard formulations of Keynes' work were done by other people, eg. Hicks-Hansen put together the IS-LM model based on Keynes ramblings.

On a scale of turgidity, the General Theory is on a par with "The Road to Serfdom" by Keynes' contemporary nemesis Friedrich von Hayek. I willed my way through that one, but a 10 page cliff's notes version would probably have sufficed. On the other hand, Milton Friedman's works are actually pretty good reads (despite my reservations about some of his thought).
It is the installed base that is the double-edged sword hanging over any successful large-scale software product; both its greatest strength, and its greatest weakness.

In particular, the desire to maintain installed-base compatibility runs contrary to the need to make significant changes.

And even if the organization's software engineering practices and UI designs are excellent, significant changes inherently bring incompatibilities and broken applications.

The bigger and more successful your application gets, the tougher the problem.
Yes, because your severance pay might be worth waiting for. Find out what they've given others. Two weeks? Not worth it. Two months? Maybe.
Or "Save a battery's life and waste a lot of your own."
I'm not sure 24/7 pegging your blood sugar all the way to 11 is what they were thinking of as 'controlled blood sugar'...
37signals actually took funding.
Probably. But one can hope.
So you are proposing an API that allows the content owner to define what content gets displayed rather than the site owner?
Montgomery Burns was right! And we shot him for it!
A similar idea is this firefox plugin, TeX the World: http://thewe.net/tex/

Pros:
- Works on any site (I've only checked it out in gchat though).

Cons:
- Not as pretty (if it matters to you) and requires both sides to d/l firefox extension really (not for emails though).
Me too. But if anything is worth having a login, it's nytimes.com. Login once and you won't be prompted to login again.
I'm definitely going to learn more math this year. And maybe I would want to do something non web based but interesting.
The resulting site would be a combination of what the site owner created + advertiser modification(s) + automated selection of those modification(s) that users seem to like.

The actual technology to accomplish this is not obvious, but could take advantage of today's templating systems and web service APIs.

Vandalism would be detected automatically by observing user traffic and would result in a fine for the advertiser.
Because it's overgeneralized, useless, feel-good nothingness.
At the risk of sounding like a quaint, out-of-touch old man, I would actually prefer that it be at least mostly fully legal. If everybody freeloads, nobody makes Futurama or Pixar movies. As much as I believe in, love, and participate in open source software, I believe the forces that enable open source software scale poorly to other fields.
Here I am wanting no one to be hurt, and in return you hope I'll be hurt :(
Growing all the way to the largest economy in the world is irrelevant? I don't follow. Nor did I say anything grew "thirteen times."

"There is no way we could have had the kind of growth we experienced post WWII if we had stayed on the gold or silver standard."

What's your evidence?

"The monetary system we use now is not perfect, it's just the best we have available."

Again, what's your evidence? Why is this system better than systems based on precious metals (the choice of most civilizations to use money) or systems that, while they use fiat currency, do not allow (in theory...) arbitrary creation of such currency?

"I feel very badly for those who have suffered unfairly, and this includes millions of innocents, but these things happen."

These things happen because the economic decisions of those who govern guarantee they will happen.
Last I checked, there haven't been any major overhauls to the Gregorian calendar since C was invented. So why aren't we all using the same, fully-debugged date library yet?

Edit: Actually, I'm cutting it close :-). The last time we changed the calendar was in 1972, when we settled on integer leap seconds -- the same year that C was invented.
That may be hard to do if it's cleanup code, as the scope changes. Plus, it divorces, visually, the cleanup code from the main body. And there may be additional function call overhead (which may be avoidable by having the compiler in-line it). One reason to use goto is the style that all functions should have one entry and one exit. Even if the cleanup code was put into its own function, you'd still have to ensure that the function was called in all the right places before returning. Without gotos, the logic can become harder to follow through a series of if-else blocks.
Not sure it's a straw man argument, but your right. Many academic areas produce mostly papers & graduates. The Graduates pay to be produced.
So is a bootstrapped company that isn't taking investors and never plans to be sold but is planned to eventually grow to several million a year in revenue a startup?

Edit: Several can be up to 10 to 20 million. Technically this is more than the pay off to the founders of most successful startups, I believe.
Tell them you do not know it and cannot help. Offer to help with the OS you do use. My father is very happy using Linux (Mandriva).
Things We Should All Say More Often
there used to be a firefox plugin called bugmenot that would log into common websites for you using a database of stored login infos.

http://www.bugmenot.com/
China looks like an absolute economic powerhouse, if you only consider the factors in its favor.

The US looks like a global giant headed for complete irrelevancy, if you only consider the factors against it.

This has rather more to do with the selection bias than reality, though. The truth is much harder to ascertain, and while it's pretty obvious that it lies "somewhere between", that's not saying much either.
Another pro? It's also a Greasemonkey userscript, so you don't even need the extension if you're already a GM user.
Personally I think Linux is a viable desktop OS for many people. It has been my desktop for about seven years. I have moved two very non-geek users to it in the last two years and they are both quite happy too.

MS defenders vary. Some have invested time learning MS technologies. Others worship wealth and success. Others have simply had bad luck with other OSes and have lost interest in trying again.
As a side note, I found Crockford's <JavaScript: The Good Parts> book:

* annoying / boring to read
* unclear
* complete with obnoxious, counter-intuitive diagrams

Someone needs to make a Learning JavaScript book, Llama-style.
Can we hold off on the whole "cooling the globe" thing until it's not happening on its own, please?

One thing lost in all the global warming hype is that if you ignore the screeching and look at the situation with open eyes, an Ice Age is, quite simply, the worst case scenario, with no feasible amount of warming ever, ever coming close to how bad an Ice Age is. It's not even close. I would be very, very, very, very leery of people engaging in large-scale cooling efforts.
Your code doesn't really provide "proof." You've completely omitted the host's door elimination. I know in the end it doesn't matter, but if you already knew the answer you would code the simulation in the first place, right?
Question: why are stay_win and switch_win floats? Why not make them integers, and just do a conversion when you're printing the results out?

That way you can do increments with integers which should be cheaper.
Refactoring Finds Dead Code
The versioning system in MediaWiki definitely needs work.
In the case of clean up code where the duplicated code is usually specific to the current scope putting it in a function instead of a goto doesn't buy you anything really.
I wouldn't say this is the defining quality of a startup, but it is an almost inevitable consequence of the defining quality, which is growth. A fast-growing technology company will get acquisition offers, whether they seek them or not. And one that grows sufficiently large will have to go public, whether they want to or not.
It is even crazier if your 6-figure salary starts with 9 instead of 1.
Not really, since it was "most" not "all."
Sounds borderline, if several million a year is the upper bound on revenue.

Edit: I assumed by "several" you meant several. If you could actually get to 20m in revenue, that's starting to sound like a startup, assuming you had product margins rather than service margins.
This strikes me as border line crackpot. Regardless I'd rather take my chances with nature than put my fate in the hands of the people who think this is a good idea.
Climate coolness is good, if one is producing a lot of heat. With nuclear energy, within a few centuries, humanity could easily be producing one million times as much heat as it produces today. In such a scenario, it might be helpful to have less Greenhouse Effect.