skysight-inc/HackerNews huggingface dataset:
Soros has been manipulating markets for his financial advantage. What's new? He has speculated against the Euro and now he is unhappy with the outcome.
> So yes, I enjoyed programming in Java, and being relieved of the responsibility for producing a quality product.

Wow. What a pompous thing to say.

How does this have 91 points and is on the front page of HN?

Per the "most horrible answers were in Java", personally, I think he's missing selection bias, in that many newbie programmers who wouldn't know what they were doing in any language, think they "know" Java because they took a class on it.

I have no problem reading critiques of Java, not concise/etc., and like Scala/etc. as much as the next guy, but "relieved of the responsibility for producing a quality product"? Wow.

I suppose I'll add the disclaimer that if his 3 years of putting in time writing Java were doing J2EE, then I'll understand where he's coming from. But that's not the language.
.read() will read the entire contents of the file object into memory. That's fine if you're just doing `io.py < smallfile.txt`, but if the file is huge you'll run out of memory. And stdin is an infinite stream (eg. `io.py < /dev/urandom`), your Python code will never print anything. If you write `for line in sys.stdin: sys.stdout.write(line)` instead, you'll solve these problems by buffering line-by-line.
I have found that brainstorming is great for getting a really good handle on the problem. Once I know exactly what the problem is with all the associated issues then I can start to think about the best solution. Often I just let the problem ferment in the background and the solution pops up when I am doing something unrelated.
[howto] Great web video in-house
15 USC Section 1, part of the Sherman Act, a federal law passed in 1890 over which California exercises no control:

"Every contract, combination in the form of trust or otherwise, or conspiracy, in restraint of trade or commerce among the several States, or with foreign nations, is declared to be illegal."

This applies as much to an agreement among companies not to compete for engineers as it would to an agreement among companies not to compete for any other limited good or service they need to do business. It applies in all states, and has for 124 years.
There are quite a few breaking changes in Java 8, here's the official compatibility guide:
http://www.oracle.com/technetwork/java/javase/8-compatibilit...

One worth noting: If existing code is using Proxy.getProxyClass and the Constructor.newInstance method to create a proxy instance, it will fail with IllegalAccessException. RFE 4487672
This maybe? http://wearscript.media.mit.edu/
At least the UI is better than a book from RAND.
But I really believe the future of software is affected more by having better programmers rather than having better languages.

On average, I believe the quality of programmers will decline, simply because as they demand rises more and more people will come to the field that don't do it out of interest/passion but because it a profitable profession. Not that this is already the case today - I think it's a trend that's already begun and will probably continue this way.
Yeah basically. However if Google does enforce copyright violations against networks, we will actually see partnerships start to mean something again... which would be a good change. Currently the majority of networks are little more than scams: promising the world and not following though. Yes, even the big guys.

There are many problems with this business: Copyright and Content-ID, network recruiters (aka highschool kids paid for referrals), lack of visibility into advertising revenue, etc.
Wow... I just spent an hour reading and rereading that small bit of text you linked to. I was never even aware of such a thing.

What a powerful idea. Thanks for pointing out the possible connection here.
I think part of the hate may come from people trying to code Java in a text editor rather than an IDE. Java's verbosity/class-heaviness really doesn't bother me at all when I'm in an IDE. OTOH, coding java in a text editor is pretty frustrating.
Because you can't know for certain that the values are random and thus it's a terrible idea to use them in cryptography.
> If you write `for line in sys.stdin: sys.stdout.writte(line)` instead, you'll solve these problems by buffering line-by-line.

Except no. Then you run in to problems with a binary file that might not have a line break.
Autotools is crap. Configure on it's own isn't godawful -- it scans for a LOT of Unix variants, and does sniff for features reasonably well. On my more cynical days, I'd say it does a good job of making things portable from unix to unix. Everything else about autotools is unimitigated crap, though.

I've written my own generic make library. The library itself is 95 lines of script, and handles all the dependency sniffing, library and binary building, and so on that I need in a reusable way.[1]

The makefiles themselves just list the sources and object files. They're typically only a few lines, like so[2]:

BIN = mybinary
OBJ = foo.o bar. baz.o
include ../mk/c.mk

That's it.

[1] http://git.eigenstate.org/ori/mc.git/tree/mk/c.mk

[2] http://git.eigenstate.org/ori/mc.git/tree/6/Makefile
Ebola, Killing Scores in Guinea, Threatens Nearby Nations
There seems to be confusion on how to write this properly, so don't feel bad about missing this (or alternatively feel bad for all of humanity). I believe this Java code I posted elsewhere handles things just fine: https://gist.github.com/cbsmith/9755809
It's pretty simple. It's illegal for corporations to get together and decide the price of things. This destroys the free market's ability to choose the best product at the best price since all the products, despite their quality, have the same price. This is the part of economics that says a free market only works as long as everyone involved has equal information.

And remember, a free market means the consumer has a right to choose, not the corporation has a right to trick consumers into buying at fixed prices.

In addition to price fixing products, companies also can't wage fix. If corporations were allowed to get together and decide the max they'll all pay certain employees then they can do...well exactly this. Also remember that these companies also refused to hire people who came to them, and also ratted out those employees to their original employer. That goes beyond basic wage fixing and into the realm of heinous employee rights violations.

The main reason all of this is illegal though is because the consumers and the employees are not given all the information they need to decide. The key to this important detail is in how all these sleazy assholes went around telling each other to be quiet. If this action were something that was morally correct they wouldn't need to hide it. However they knew that if the employees knew they'd leave the company and it'd cost more to keep them. That's why the companies kept the information from the employees.

More importantly though, if the consumers know about price fixing, they revolt and entire industries collapse in huge meltdowns and the consumers stop trusting the market. Politicians then react and pass laws against it so that there isn't a huge economic revolt, or worse, a political bloody one.

Then again, programmers seem to worship corporations these days so I got no idea how this will play out. Personally I hope we all boycott the shit out of every company on this list, but that'll never happen as long as coders have their heads firmly planted up Ayn Rand's ass.

The one thing that I'm enjoying coming out is how this is proving to programmers that they are valuable. I think before this coders just kind of thought of their value as just a typical cube farming wage slave. Now they see that they're so valuable that corporations will go to very great lengths to keep them from leaving and from paying them what they're worth.

That is definitely going to be interesting to watch play out.
for someone who's 83, that's pretty clear thinking. thanks for posting.
I think you missed the part where one husband in this couple was granted a green card due to marital status, and was able to immigrate to the US.

So there would be no or little recourse, much less voting.
I think there's two aspects to this discussion that keep getting muddled together.

1. Were the individuals at the companies in question knowingly acting outside their own ethics or the ethics they portray themselves as having? Was there something "sinister" about this?

2. What harm did these actions cause and do we need to do something to prevent such kinds of harm in the future?

A lot of #1 sounds like execs trying to manage the relationships with the companies they worked with. It doesn't sound like there was a big taboo around these types of do-not-solicit agreements at that time, and with all the players aggressively trying to hire and hold onto experienced employees I can see how finding out that a partner company was targeting the employees you were trying to keep around could be interpreted as a hostile/unfriendly business move. The most damning thing I've come across regarding #1 was the email about taking the conversation offline to avoid a paper trail. Would love to read more about the context of that.

I wasn't sure about #2 at first, but after all the discussion I've been strongly persuaded that this is a net negative for the software industry. The lawsuits and public outcry will hopefully create a strong taboo against this sort of behavior in the future, in addition to clarifying the legal ramifications. Is there anything more that needs to be done here?
I feel the same way. With my smartphone in my pocket, I ended up whipping it out at every second of downtime to read... anything. Twitter, HN, news.

That's not an indictment of smartphones but of myself. My wife does just fine with a smartphone, taking it out only to check her calendar.

My solution: dumbphone in my pocket, Nexus 7 tablet in my bag. If I leave home without a bag, I won't need more than a phone. Otherwise, I have access to maps, mail, etc. but need to make a conscious decision to take it out - and look ridiculous when I walk around with it, which helps with the addictive part as well.
Qatar's World Cup Expected To Take More Lives Than 9/11
Only for phone records...nothing even mentioned about the Internet collection, which I'm much more worried about.
Premium Malwarebytes adds heuristics to support Windows XP
I also created project like this in my school days
http://blog.sodhanalibrary.com/2013/09/clocker.html#.UzEjx9L...
Motofone F3 is my current phone. I've been using it for 2.5 years now. It does nothing but make calls. No other wireless signals (no bluetooth, no wifi, no GPS).

About as small of an attack surface as a GSM device can have, I think.
While I do understand what you mean about writing web apps in managed languages for optimizing programmer productivity instead of speed of code, garbage collection is not slow in general. In fact, garbage collection can be faster than manual collection in some cases, due to several reasons (e.g., GC may require operations based on the size of the working set only, manual collection will need to touch each piece of garbage explicitly).

There are a lot of things that make GC performance an issue, including stop-the-world behaviour for some collectors making real-time operations impossible as well as the tendency for programmers to produce a lot more garbage in their programs. In general, I think that most people overstate the percieved inefficiencies of GC as it comes to throughput (predicatable latency is the main culprit IMHO).
Not at all. To advertise inside each other's premises, you have to enter somebody else's private property, and with some exceptions, right to refuse entry or forbid certain activities on your property is not just allowed, it is what private property actually means.

However, I am not the private property of my employer, so unlike this store analogy you need nobody's consent to advertise your job to me. You just call me. This isn't Saudi Arabia where you have to consult my mahram before you offer me a job.

Now under the legal theory we have discussed so far, you may imagine that two companies could voluntarily draw up a contract not to hire me just cause that's what they want to do. However, in the United States we don't allow certain types of contracts, even if all the parties to the contract consent. For example we don't allow murder-for-hire contracts, even though both parties have consented to the contract.

Similarly, this type of contract is one that is prohibited by law even though both of the parties may agree to it. Specifically the Sherman Antitrust Act prohibits "any contract... in restraint of trade or commerce among the several States". That language is kind of vague but the case law for the last 120 years is clear that this sort of contract is the kind that is prohibited by the act.
What? Microsoft implemented C99 and can now compile the Linux Kernel? Nope. Nothing to see here; move along. Maybe in another 15 years? Yes compiling the version of C from 1999 is too much work for the largest software company on earth.

EDIT: Actually the largest software company was Microsft back in 1999, but now it's Apple and they did write a C99 compiler that can compile the Linux Kernel. Coincidence?
Such a bill as this one wouldn't solve all the problems. It would merely solve one of them. You should support it, hope it passes, and then demand more.

The alternative situation, where this bill does not become law, is worse. Why be against something that progresses things in the right direction? Do you demand everything be solved all at once?
Are you seriously advocating for companies to collude to suppress salaries if they can't handle the heat of market forces? How much, exactly, do you think engineers deserve to get before it becomes "too much", how did you arrive at that number, and do you have a similar number for how much companies should be allowed to make before we just start confiscating it all with a 100% tax rate?
Listen this song and feel it
Microsoft Desperately Wants You to Stop Using Windows XP
Sequential: A new coding style for SQL queries
Brainstorming is where the initial kernel of good ideas comes from though, you take something from person A/B/C and combine it with your own - and that synergy is the source of good ideas.
gotta say it, one of the reasons Dropbox is king is good support for all platforms. Box still ignores Linux so it's a no go for me personally, and my work.
Why another legal process, when the end result is indistinguishable? Sounds like a convenient way to classify based on morality.

See also: http://en.wikipedia.org/wiki/Separate_but_equal
30 200mg Celebrex (genuine, non generic) capsules cost about $20 in South Africa.

The gov't does control medicine prices. However, unlike some other countries (e.g. the UK), they don't pay anything to the manufacturers, that price is all they get.

I'm pretty sure if Pfizer weren't making a profit they would withdraw the drug from the market.

Celebrex doesn't cure anything, it only relieves the symptoms of joint pain. If you can't afford it you're unlikely to die, so it's a perfect candidate for the extortion racket that is the US healthcare system.
Is this a surprise? Facebook has been hiring Google employees for a while...
> See, this is a mistake. Abstraction is not an end in itself; it's there to make life easier and to make things easier to undestand.

> Bloat is one of the many things abstraction is supposed to reduce; if an abstraction is increasing cognitive overhead and reducing the signal-to-noise ratio, then we've got ourselves a problem.

I whole-heartedly agree, but I'd caution readers not to conflate abstraction with bloat. If it's bloat, chances are you're abstracting the wrong details, and working on a system suffering from poor cohesion.

> For reasons that I cannot comprehend, Java seems to be the only language that seems to have excessive abstraction as a requirement. Not as a convenience, not as a nicety, but as a requirement to do things like Dependency Injection, Inversion of Control, Unit Testing, Mocks, logging, etc. The fact that you need to use entire frameworks to accomplish the functionality that in many languages is covered by a couple functions in a built-in module is a mystery to me.

I'm not sure I follow. Are you saying that you think it's wrong or inconvenient that these features aren't somehow natively supported by the language? That is, that you'd like to have a grammar/syntax around each one of these things which ultimately boils down to a bunch of hidden runtime anyway?

Maybe it might help to clarify that I'm defending Java the language, not Java the runtime library.

> Java ... seems to be the only technology that requires me to grok a dozen files to understand basic workings of MVC systems with the most elementary of logic

I do agree that web frameworks in Java are one area where there's just tons of bloat, but I still don't think that has anything to do with how the language is designed. My advice: get a better MVC. There's nothing about MVC that says you must use a framework. (Edit: if it's the container that you're fighting with, there are tons of other options out there aside from the mainstream few).

Also, check out the network code in the Linux kernel sometime. Beautiful code, but holy shit do you need to shave a whole heard of yaks the first time you go to read it. The cognitive overhead is high, but each one of those abstractions is there for a reason.

> This points to me towards the idea that Java abstractions have simply been poorly chosen.

Again, given that I'm talking about the language alone, not the runtime library, if you still uphold your response I'd ask you to consider who's fault it might be that the abstractions used in your program(s) are poorly chosen. It's quite rare that it's the fault of the language.
Came here to report level 19 as well.

According to the description on level 18

div p:nth-child(2)

selects the second <p> in every <div>

So on level 19, to select the first <bento> in <div>,

div bento:nth-child(1)

should work, but it doesn't. However,

div bento:nth-child(2)

works. So I think a possible bug here?
I am a data scientist/statistics consultant, and have consulted to a few startups and one soft drink company that is often confused with a drug.

Can't say for their experience, but I can say why they hired me: make sense of data. Fact is, most "big data" out there are mostly junk and useless. Being able to pick out the ones that work is actually most of my job description.

Where? One of which are on HN, two are from hackathons I attended. Another one actually came from a friend of a friend.

How much it cost? I charge per hour, and ranges from $80 - 300 per hour.

Hire me again? Everyone so far is a repeat customer.

What I'm thinking of doing? Hanging up the jacket. Consulting is a tough business.
While I don't think this particular suggestion is likely given the shear amount of data that would need transmitted, it might be possible that there is more data being transmitted by these planes than has been admitted.
As others have pointed out, the feature point of "bulk purchasing from manufacturer" is incompatible with "Custom tailored shirt". You can certainly get a dress shirt for $30 or less at stores like Target, JC Penney, Walmart, etc. but doing real custom shirts require skills and at least an hour or two of work. I watched my mom sew growing up and she's a professional sample maker at a fashion company in Los Angeles and here's the steps I can think of off the top of my head to make a custom shirt: 1) Get your measurements 2) Draw a pattern that conforms to those measurements 3) Cut cloth to pattern 4) Sew pieces together 5) Insert the collar structure 6) Sew buttons 7) Use appropriate buttonhole stitching 8) Sew labels on 9) Iron and press shirt.
The concept of choosing to be relieved of the responsibility from doing "the right thing" is not really new:

http://www.jwz.org/doc/worse-is-better.html
Oh good lord. This one adds in Scanner!

How do you think this code will handle binary data? How do you think it'll handle a simple two line text file?
Why would you ever do that..? If your production code is using those kind of proxies, it must be one terrible mess. First order of businesses would be to fix the code at the very least.
Success Factors for Root Cause Analysis in Software Development | #agile
All the values are broadcast publicly; they're not secret.
I used StartSSL class 1 certificate for my app (unherd.co). Its free and valid for one year. Here is a good guide that might be of help - https://konklone.com/post/switch-to-https-now-for-free?hn
I just did it with .small:last-of-type, as it executes cleaner and can be scaleable
> Given that he runs the place, that creates a hostile working for gay people

That's a bit of an assumption.
Sigh so half of an interview is to probe the candidate's knowledge and the other half is to understand their thought process.

So my ideal impl in java would be:

public class F {
public static void main(String [] args) throws Exception {
byte[] buf = new byte[256];
int len = -1;
while ( (len = System.in.read(buf)) != -1) {
System.out.write(buf, 0, len);
}
System.out.flush();
}
}

In python

#!/usr/bin/env python -u
import sys

while True:
buf = sys.stdin.read(256)
if buf:
sys.stdout.write(buf)
else:
break

Which both feel roughly the same. Although I kind of wish python would let me assign within the expression - just in this case. The similarity boils down to the fact that they're sitting on top of posix read and write calls. There's not much variation you can get from that.

The differences get down to fd stream flushing. Python we enable unbuffered io with -u, java we must flush. In C++ we can count on all FDs being flushed in atexit.

You certainly can muck this problem up for binary files and different charsets if you're not careful. But the OP's solution still works in many cases. A fine first answer. Any time a candidate writes code for you during an interview, the first answer will most likely have issues (stress, trying to finish quickly to impress, etc). I care very little about that stuff if there answer is roughly functional. After they have their first stab out, then you go thru the 'why did you do it this way?' 'what corner cases might you be concerned about?' and so on. The answers to those questions will let you make a good estimate of their knowledge and competence.
"Shopping around" among dentists is virtually impossible. I can have only the most superficial and largely useless opinion of a dentist until I actually allow them in my mouth, at which point the deal is done. This is not a "healthy market" comparable to anything we're talking about here.

Ditto laser eye surgery and pretty much anything else remotely medical in nature.

Chocolate is not a healthy market either: http://ideas.time.com/2013/11/01/why-so-little-candy-variety...
How I Started with Agile Retrospectives (spotted by BenLinders) | #agile
Congrats on the traction! Quick question since I haven't downloaded the app, how would that have worked at the top of the snowboard ramp since your friends would have had to ping you right at that exact moment? Were you thinking that you would take a picture to reply with later? I'm trying to understand how the app works if 90% of the time that I might get pinged I'm not doing anything interesting (we can't all be snowboard pros ;)
What I think often happens in a culture where group brainstorming is common is that the few meeting specialist, often the gregarious managers, is the ones leading the meetings and is in the end labeled as the creative ones. In the end people will start to expect that these people will make the suggestions and the others will just give feedback.
An Artificial One-Liner Generator