skysight-inc/HackerNews huggingface dataset:
Generally speaking, I would agree that if there's any alternative at all, you shouldn't use threads. But when you do need them, you really need them. And I don't think they are nearly as difficult to program as most people make them out to be.

My guess is that people get scared off because the failure mode is so daunting. It's easy to write a threaded app that works fine for simple tests, then fails miserably when used under load. When that happens, it's nearly impossible to isolate a good test case for debugging. That's enough to scare off most people.

Another reason threads haven't become more popular is because operating system support is generally poor. It's rare for API documentation to say anything at all about multi-threading. There are common-sense rules for adding threads to Mac programs, but I discovered them more or less by trial an error, rather than anything I read in Apple's documentation.

BeOS not only had good support for threads, their use was in fact required in all GUI programs. Every single window runs in its own thread. That forces you to get good at multi-threading in a hurry.

The biggest mistake people make is creating too many locks. The most common failure mode is where thread A is holding lock 1 and is trying to acquire lock 2, while thread B is holding lock 2 and trying to acquire lock 1. A former boss (who worked at Be, as a matter of fact) suggested you can solve this one by always acquiring the locks in the same order everywhere. I say a better method is to never hold more than one lock at a time.

The best way to do that is share pretty much nothing between threads. Write each thread as if it were a separate program, as much as possible. Have the thread get new work out of a queue, and place finished work into a different queue. That way, you're guaranteed to never hold more than one lock at a time.

Successful multi-threaded programming requires a lot more discipline than normal. Failure to follow this rule means you'll be getting those impossible-to-debug lockups.
You should check out the Week magazine too for lighter, quick reading.

http://www.theweek.com/home
What became of the personal robot?
So if Saddam decided to throw a nuclear bomb at some country, all Iraqis would have been responsible for this? And you advocate wiping them all out? Is the president, in this case, any different from a terrorist? Particularly an unelected president - one who cannot be said to represent the members of his country.

People don't 'deserve' death because someone in their neighbourhood did something bad.

It is attitudes like 'countries deserve to be ruined' that cause world wars. The U.S, without being provoked, declared war on Iraq and caused the death of 600.000 Iraqis. Do 600.000 U.S citizens now 'deserve' to die?

Think before repeat things, even if you grew up hearing them.
Actually, they are religions! Didn't you know?
Social Media for Beginners
This is correct, but gmail is growing faster.
As an emacs user, it would be sorely missed.
Computational modeling of collective human behavior: Example of financial markets
I am halfway through it, and I like it.
Ask HN: Resources for learning Java?
After 2 years of coding exclusively in PHP, I'm making the transition to Java and would like your suggestions on what are the best resources for learning the language.

If you are a Java dev, I would like to hear your story. How did you learn the language? What helped you the most? Any advice you can provide is appreciated.
Unfortunately, if you "fire" your credit card company by paying off your balance and canceling the card, you also reduce your credit score, leading to potentially worse terms for your next loan.

As stated in the original article, the second-worst kind of credit card user from the issuer's POV is the one who immediately pays down their balance each month, without ever incurring interest or late-payment fees.

This is possible only because of the altogether too-cozy relationship between the credit rating agencies and card issuers. I think any regulation of the lending industry should start with the credit rating agencies, and move on to the banks only after they've established effective oversight and consumer protection in that space.

(Incidentally, my disgust with the normal lending practices in the credit card market is the reason that the only one I will carry is a small-limit emergency card issued by my local credit union. Since they're a member-owned not-for-profit institution, I have far more trust in their desire to serve my financial needs, rather than trying to screw me over for a buck.)
good luck shashank!
To plug his last-gen (not current) laptop into the new screen. They only put DisplayPort on the new display which is ridiculous. It's literally only compatible with the new MacBook/Pro. You can get an adapter one way (DisplayPort -> DVI) but not the other (DVI -> DisplayPort).

The display is about 3x overpriced anyway, it's not like it will be a hot seller.
Here the wsj is sticking to what it knows how to do; talk about big companies. The companies polled regarding raises averaged 21000 workers (13.5 million / 640).
blasdel > but on the meteor contest (which is the alioth people's favorite)

Which of the "alioth people" told you the meteor contest was their favourite?

blasdel > you linked to rankings (one where PHP's wart is omitted), not results

If it's their favourite then why do you think "the alioth people" don't include meteor contest in their ranking?

Yes, compare language implementations directly one-against-another for all the benchmarks.

As thomasmallen is so keen on the old Pentium 4 machine, compare PHP with Ruby Core 1.9.0 ;-)

http://shootout.alioth.debian.org/gp4/benchmark.php?test=all...

(Disclaimer - Obviously the benchmarks game webpages are written in PHP)
I'm less social awake than she is in her sleep.
http://java.sun.com/j2se/1.5.0/docs/api/

This got me through my college Java courses.
> spend time with my wife

Trying to off-load your wife on other people? tsk, tsk
Make it into a ritualized behavior. A 5 minute routine that says "and now I'm going to make this task my main effort".
I cannot however, understand why someone who finds CS boring would major in it.

Just pointing out that CS can get boring sometimes, too. There are plenty of fields and subjects in CS which just aren't going to be interesting to everyone majoring in it.
I can't believe my tax dollars go towards this shit.
In summary: They're a bad idea because they're extremely hard to get right. You'll almost certainly create a program that works at most 99% of the time, and you'll never figure out what happened to the other 1% (my words, not Ousterhout's).

He suggests events as a simpler alternative. I would add: Unless you use a language with convenient concurrency semantics like Clojure.
Some people tend to see it as a meme. It's not THAT far from a religion. Except, i didn't see any C++ programmer kill in the name of Bjarne Stroustrup...Yet.
An interesting article which ends on positive note, with the OP giving a scenario for how the countries in the vicinity of Congo could form a common market, similar to the early EU/EEC that would be a way out of poverty and conflict.

I'm afraid he's a bit too optimistic though about the ability of the US to influence the region in a positive manner through diplomatic efforts, while preserving quotas and tariffs on agricultural goods and minerals; the main export products of Sub-saharan Africa.

To enable any country to lift themselves out of poverty, first give them the ability to trade with the rich.
If people can hack computers, people will be able to hack robots (should they be able in any way to respond to commands, which they'd better). This is a frightening prospect.
Years ago, I used Bruce Eckel's Thinking in Java:

http://mindview.net/Books/TIJ4

I liked it a lot at the time. No idea if that's the best thing out there now. I haven't seen the latest edition, as I haven't had to touch Java in several years.
If you already have experience programming (which you do) try the following: First read the wikipedia page on the language. Download a medium-sized open source project, start at main() and try to understand what it does. Then, google for features/syntax you don't understand; read comments; have the api docs open; google for languages gotchas; google for techniques you don't understand. Once you do this enough to be comfortable with the language (Shouldn't take more than a few days), try to write something on your own. Either recreate what you already wrote or try to create something just outside what you feel is within your means.

I tend to learn languages a lot faster and in a much more thorough fashion when I approach it this way.

edit: this has nothing to do with java per se, but I find it is valuable to me when trying to pick up a new language.
this is total nonsense. Maybe for the php crowd that know only garbage collected 'trivial' languages, but for anyone that has a CS degree, threads are not difficult at all. Imagine trying to write a SQL Database without threads, or many many other applications. Locking isn't all that difficult if you think it through - that used to be called design, but today, that just means what color is the drop shadow box :)

Locking order is important to prevent the classic deadlock, but there is nothing inherently 'too hard' for programmers in using threads.
I think "if you wave your hands about usability, if you are the only user, and you don't give a rat's ass about performance," is sufficient --- Ur-Scheme took me a few weeks, and the source and target languages were fairly different, and I hadn't done it before. It compiles its subset of Scheme about 100× slower than gas assembles assembly language.

If you have actual compiler-writing tools then it doesn't have to take weeks or even days to write a compiler for a simple language --- if you don't care about performance, if the backend language isn't too much of a pain in the ass, if error reporting is not a major concern.

Thing is, though, performance doesn't matter any more. Oh, sometimes it does, yes. If you're writing a C compiler for a computer manufacturer, it certainly does. (Tip: port GCC instead.) But all those people who are using Ruby or Python or Perl or PHP? They aren't going to care if your compiler generates code that's 10× slower than it could be, because it's still 10× faster than what they're used to, and you can probably get them not to care that your compiler executes a million instructions per line of code that it compiles.
Avent Isis iQ Uno Breast Pump Avent Breast Pumps
Handheld breast pumping becomes stress-free with the Avent Isis iQ Uno Breast Pump (SKU 471). With seemingly unlimited suction and speed settings, the iQ Uno gives new moms a customized ability to easily change between manual or electric breast expression.
Why does it work best for small tasks? His example tasks are 5-8 pomodoros long.

In my opinion, no self-help guide applies for everyone; we all have our own strengths and vices.

It seems that this one is designed to help build concentration and minimize interruptions by defining concrete "work unit" blocks, thus helping to build discipline in fighting off distractions (internal & external).

I don't feel strongly about his views on the perception of time, but it's not that important to the whole article.
A view from the time machine. That is the 1995 view of threads. Much of it is still true, some of it isn't.

I would recommend that anyone using threads run their program through the Helgrind tool from the Valgrind folk. It does a nice job of noticing if you missed a lock on a shared variable by instrumenting and analyzing your program at run time. (It caught me on one in my most recent program. I knew I hadn't started any threads when I made the access, still I should have had a lock there in case I later changed the initialization order.)
So, what's the big deal? Get a display that works with your MacBook. If everything you own needs to be from Apple then get the discontinued 23".

I don't think the price is unreasonable for a 24" LED-backlit display. What are some cheaper models with the same specs?
Huge Security Flaw Found In Microsoft Web Browser Internet Explorer
Thanks! I'm glad my page was helpful. I'm working on a much simpler compiler than Ur-Scheme now. I call it StoneKnifeForth.
If you have an iPhone, it has a nice timer app built in (not necessarily directed only to you creativeembassy, but to the general, largely iPhone-using HN public)
Maybe not in eir early- or mid- 20s, since nowadays at that age it is hard to even have enough familiarity to be able to define the major open problems (most of my colleagues focus a lot on devouring book to try to get ahead of this curve). Still, major work is generally done by one in eir late 20s or early 30s. It has long been the case, and still continues to be (Green and Tao proved their famous theorem at the age of 29). Hardy lamented that math is a young person's game. The book "A Beautiful Mind" discusses how Nash's 30th birthday was a gloomy one, since it generally means the end of one's major contributions to the field. You can't even win the Fields medal unless you're under 40.

Now, of course there will be counter-examples, but these are not the majority, and generally come in those fields where you have to digest a great amount of material and push your way through for long stretches of time (grad students and post-docs also tend to figure prominently in these cases)
Pay the balance down to zero, and because of the strange quirk in the FICO scoring system, stop using it, but don't close the account. "Problem" #1 solved.
Gizmo Finally Introduces A Browser-Based Phone And Ringing Links
Except that as of right now, it's only for HD content that has been purchased from the iTunes Store. But it's only for specific content from a specific location. A HDCP monitor isn't required for anything else.

(I know it's a 'not my problem' issue, but if you want something to happen start blaming Big Content since this is their idea. Do you really think the all the low-level engineers at Apple really want to go through all this effort to benefit the consumer?)
This will go down as a classic piece of programming humor.
> Bond's don't change rate when the company get's into trouble the cost of new bonds goes up.

That's not true.

Many commercial bond and loans include covenants that cause changes (loan gets called, interest rate changes, etc) when certain things (sales revenue, money in bank, etc) happen.

Some even tie their interest rate to external factors, like LIBOR.

And, biz credit lines do get pulled.

> Loss of a job reduces credit worthiness even if you make all your payments.

It's unclear if you find that wrong or not. Job loss may well affect future ability to repay even if you're current now.
Ask HN: Multiple asset hosts with s3 = impossible?
I'm trying to get multiple asset hosts working with s3, but it looks like it isn't possible. I'm finding this hard to believe, and looking for a workaround.

The problem seems to be that you can't have multiple domains pointing to a single bucket:

http://developer.amazonwebservices.com/connect/thread.jspa?threadID=27295

Possible workarounds include:
- Uploading files to multiple buckets and pulling from them randomly
- Uploading files to different buckets and pulling from them with a hash key
- Setting a CNAME to point all alternate asset hosts at the primary one
- Using Amazon's CDN

Any other ideas? I can't imagine that someone on HN hasn't figured this out already.
...then this photo proves that Dick Pick must have been the Messiah:

http://jes.com/gfx/people/csn_1983_11_28_antigrav_dick_001.j...

(Sure don't mean to offend anyone, just a silly hacker joke.)
I recently wrote a bit of code which throws off a monitoring thread before launching an external process. If the process crashes, the monitoring thread kills the Windows dialog saying it crashed, and continues as normal.
> Sarbanes-Oxley

Only if you're public in the US.

If you're not holding deposits/selling insurance, it's unclear why you'd have financial audits by govt organizations.

You'd have to deal with the restrictions on offering credit though.
No, the 90 minutes is the time to explain the compiler, not to write it, as Marc explains at the beginning of that excellent talk.
You only short with a little of your account, and you keep it constant, i.e. you always stay mostly in cash and 20% short. Paulson, Chanos, etc. didn't set up their pessimistic portfolios so they gradually go down if the prediction comes true, not so they get wiped out.
If this isn't exaggerated, this is amazing news. In my opinion nuclear power is the only solution that we have to our energy problems.
Ask HN: multi-window SSH client alternative to putty?
I've used putty for years for connecting via SSH. Often I like to have multiple putty windows open, sized, and positioned so that I blanket a third monitor with 5 individual putty windows/sessions. Is there another client which better manages a setup like this?

Hopefully one that:
-opens child windows within the parent
-can tile child windows
-remembers child window positions
-remembers passwords

I've tried 'Poderosa' but it's buggy and seems to have fallen by the wayside in terms of active development.

If there are alternatives that fit the bill, that aren't free or open source, I would be interested in those as well...

thanks!
Sure. The question is, would people pay for it?

I would, and it seems like I'm not the only one.
that should be a typo, i think he was referring to the franco-prussian war of 1870.
The bit about Judaism and C reminds me of http://www.lysator.liu.se/c/ten-commandments.html
Actually, in my experience, PEGs make parsing not complicated. What kind of visualization tools have you found helpful in manipulating the AST? So far I've found equational reasoning (in my head or on paper) much more helpful than visualization in writing code to manipulate ASTs. And code generation from ASTs does not require a lot of effort when it is not especially difficult; it's really just a tree traversal or two. (As you point out, with optimization it can become arbitrarily difficult.)
I quite like Piet (as in Mondrian) http://www.dangermouse.net/esoteric/piet.html
It's a language where programs are abstract pictures.

Also http://99-bottles-of-beer.net/ is a nice site to see some implementations (though not Piet, sadly). Malbolge is especially impressive.
What if We Replaced iTunes With the Cloud?
San Francisco, Seattle included in list of "at risk" cities for DTV transition
Bannination of slavery was pretty bad for busness as well. Well, some of the businesses anyway.
This sort of thing seems to work well when you have a lot of well defined work to do.

But what do you do if your work is not well defined or clear cut? Sometimes slowing down, taking a step back, looking at the big picture, and thinking outside the box produces much less work with much more impact. Then you don't need your timer nearly as much.
I feel the omission of smalltalk is just further evidence of it's true strength considering it inspired so many of the attributes of the other religions yet still persists unknown to the masses as the true religion with no religion behind all religion.
You're in Dallas, too?
Python uses PEPs:

http://www.python.org/dev/peps/

The first few describe some of the processes used. AFAIK Guido still has the final say.
What does that make javascript then?
Why not rotate log files based on size?
well. someone doesn't like Perl.

Sheesh!
One usefuyl criteria is that which will affect a group of customers rather thank a single person.
It doesn't need to be black-and-white. If you aren't thinking at all about running the business then you're going to go through a lot of unnecessary pain. Better to hire developers (who aren't blind to production issues) and then maybe more developers and then a good, forward-thinking, cooperative sys admin (a rare beast, unfortunately).

If you pretend that production is a mere afterthought then you're likely to end up being Twitter. Successful, yes, but scrambling to stay in business (I'm not talking about the revenue model issue here).
I'm launching gigbayes.com though it's more like a public beta/alpha at this point since I figure I'll change it a lot depending on the feedback I get.

Perhaps you're right that it doesn't look professional enough for major blogs to cover.

What is involved in "approaching them as a company"?
Geek Holiday Gift Guide - Gifts for Less than $200
Noncompete agreements shift some power from employees to owners of capital. A jurisdiction that forbids noncompete agreements will tend to be less attractive to owners of capital and more attractive to employees. But a business generally requires both employees and owners of capital. Whether jurisdictions that forbid noncompete agreements are more attractive to a certain kind of business therefore depends in the short term on whether employees or owners of capital have more power in that kind of business, and in the long term on whether employees or owners of capital are more important to the success of that kind of business.

As pg has repeatedly asserted at great length, the capital requirements for software businesses are at an all-time low, so we would expect noncompetes to repel such businesses.
Go for it, anything that benefits the consumer benefits the economy.
IF???
I am surprised that they were not in this list already!
Try GNU Screen with the vsplit patch, through putty. It can split any which way and will hold that state across reconnects.
Credit Cards shouldn't be allowed in this world.
Also, if you want to found a company later, it might be easier to get VC from VCs who you aren't currently suing.
Guns end wars quicker.

There's a certain beauty to getting to the wrong answer quicker - I just don't see it in this case.
I agree. My advice on the sysadmin problem is to get a hosted development machine. Use it for email accounts and backup or source control. It's cheap and you have solved a bunch of sysadmin tasks in an hour or so.

I do think scaling should be a consideration from the beginning, but it is sufficient to have someone on the team who has actually worked on a high volume web site. If your team doesnt have a developer with the experience, ask around. Most developers are willing to contribute a few hours of advice.
alive and well from what I've heard.
Exactly my thoughts as I read the headline.
Yep, ASM is the one true path that directly interfaces you with the underlying messy reality, but is only truly understood by a few arcane practitioners.

Aka it's Quantum Mechanics ;)
PostgreSQL is not threaded.
The company issues shares, but it is a separate entity from its stockholders. The money acquired by selling the shares goes to the company, not the existing stockholders. It results in the company being more valuable, and the existing stockholders (or the board of directors on their behalf) can think this is a worthwhile thing to do if they think the money will be invested well by the company.
I'm amused at the phrase "at risk" being used to refer to people losing TV signal, akin to some disease, where I view it as completely the opposite.
I think a good approach might be:

Log everything, and then filter out the information you know won't be interesting with rules. The remainder is what's interesting (if it isn't, add to your rules to filter it out).

This way, if later on you're trying to track something which requires information you usually don't find interesting, you just update your rules and you have all you need.
What does the BusinessWeek article have to do with the company buying back common shares?
Using threads:

1. Tell the O/S to decide which order all your tasks execute (Wow great I don't need to worry about all that).

2. Oops, now we don't know what order tasks will execute, so we have to program a whole heap of synchronization code.

OR

Do it yourself:

1. Program everything, so you know which order things occur, and don't need to worry about synchronization.