Lost interest in programming - <AUTHOR> I currently have a job with a big company with a decent income. I do my job pretty well, but it is clear that I lack initiative and could be more proactive. I can implement and build things fast, solve complex bugs and problems, but all I want is to get it done - I don't do anything extra to make it better, or find out if what I am asked to do makes any real difference, or find new things I could work on to make an impact.
Over the years I have sort of lost interest in technology. I know enough to do my job well, read hn and news and stuff, but that's about it. I don't try out new things. I have an attitude that it is mostly just the same 1s and 0s that I can figure out if I really want to.
I am actually going to join a startup for a lot less pay soon, but I am just joining for the experience, hoping a change of environment might help with my general apathy. I am not sure though.
Anyone else has this feeling, and how did you resolve it? <comment><USER2> Join the crowd. I used to work with a guy that said he'd rather be a groundskeeper and mow grass. I totally sympathized with him then, and somewhat felt the same way. But at this point am so burnt out and bored with development that I am seriously considering changing careers.

There are a number of problems with this though. Go to Indeed.com and type in the name of the language you know. Look at the many opportunities and how many of those fall into respectable salary ranges. Now type in other occupations. Not quite as good, huh. On the bright side, Indeed.com mines Dice, Monster, and other tech-oriented jobs, and many opportunities are duplicates because different recruiters are advertising the same opportunities.

Anyway, let's assume you are still burnt out and the reality that you will probably make less money doesn't scare you. I am also in that situation, so I understand.

Here's some stuff to look at:

Skim down this list: <http://www.daveramsey.com/store/cBOOKS-p1.html>

Read 48 Days to the Work You Love

Do the PrincetonReview Career Quiz: <http://www.princetonreview.com/CareerQuizResults.aspx>

Don't feel shame for wanting to do something else. It is normal.

If you are so hateful of your current job and work, it could just be the environment too. But for me it isn't. I like coding, but it gets boring. And technology for the sake of technology is lame. Whoopie- So there's xxxx (name your favorite new tool, programming language, etc.) Who cares.

That's as far as I've gotten though. Just don't jump off a cliff. You should take risks, but just quitting is probably not the right answer. Although I've thought about it. A LOT. And I think this job is affecting my health (random abnormal head pains, etc. that don't match any known description of disease I've seen, that went away mostly while on vacation).

</comment><comment><USER3> This is a normal feeling. I think that everyone goes through the apathy stage when they get "comfortable". The trick is to figure out your motivations and use them to get yourself feeling less secure. Sometimes, I confront my ignorance of topics outside my work scope. I look at the amazing work people are doing in Haskell or read about a new startup. Thinking about how much I don't know and all the things I haven't accomplished but would like to keeps me going.

If that doesn't work - go to the gym and workout as hard as you can. You'll remember what it feels like to put your full effort towards something.

</comment><comment><USER4> Try Lisp! I was much like you, Lisp brought back the fun for me.

</comment><comment><USER5> I starting learning how to program just to "see if I could do it". Once I became a good enough to code anything I wanted, programming became boring. There was really no satisfaction in coding something that I already knew how to do.

I think the trick is to keep finding problems that you don't know how to accomplish, and would like to learn/hack a solution.

For me, I eventually started trying to tackle problems from a completely new approach, it got me really excited, and I am now developing my own programming language and start-up around it. And now I have never been more interested in programming in my life. I am completely fascinated with boolean logic and number theory and spend way too much time reading Wikipedia articles on a wide range of nerdy things. Programming became fun again because I was learning again.

</comment><comment><USER6> I had the same lack of motivation to program at my previous job. Changing to a start up environment makes it feel much like your project and not someone else's.

If your passion lays in programming and you have this problem then a change in scenery will help a whole lot - it did for me at least.

<comment><USER7> I also felt very similar to this at my previous job, it was a software engineering position at a very big corporate company. I went from frustrated to burnt out, working endless hours on work I didn't care about and generally wasn't proud of; I was pretty miserable, down and out. I was losing my mind, considering moving across the country, looking for jobs abroad (not that these are necessarily bad ideas)..

Switching to a start up completely changed my life. I completely agree with alttab, I feel more ownership over the projects I work on, definitely more pride and excitement. I think you need a change of pace, a start up would be a great idea. Try to take a week off to clear your head in between jobs though, you'll want to go in with an open and clear mind without thinking about or being depressed about your previous job.

Also, don't get too focused on the salary. As some recent HN posts have also outlined lately, there is much more to life than your salary and I think you'll really begin to get your excitement and life back.

</comment></comment><comment><USER8> I reached the point where it was either quit the software industry or work on something I could be passionate about. I chose the latter.

</comment><comment><USER9> Give back. Try teaching what you know.

</comment><comment><USER10> Why would you join a startup if you don't get an emotional thrill from your job? I thought that was the point.</comment>


Cambridge launches UK's first quantum network - <AUTHOR> https://www.cam.ac.uk/research/news/cambridge-launches-uks-first-quantum-network <comment><USER2> This is using parts of Cambridge University's 25-year-old dark fibre network, the GBN, which has a fun tube-style map: [https://help.uis.cam.ac.uk/service/devices-networks- printing...](https://help.uis.cam.ac.uk/service/devices-networks- printing/network-services/infoinstitutions/fibre/gbn)

<comment><USER3> Heh - I recall back in 94 when I was one of the first handful of webmasters at BT we also had a tube map centered round Martlesham (Think UK Bell Labs) with of shoots to LSEC TSEC(my lonely I486 that ran occasionally when I don't need all the horse power of my pc) AND BSEC

<comment><USER4> We are going back to our 'BT Labs' brand soon :)

<comment><USER3> I always thought that adastral branding was rubbish - have they demolished the H blocks yet

<comment><USER4> still refurbishing

</comment></comment></comment></comment></comment><comment><USER5> I wonder how intelligence services around the world are planning to combat the rise of these allegedly "unhackable" communication networks.

<comment><USER6> > allegedly "unhackable" communication networks

they are unhackable using classical methods. So the hacks would be QM based as well (so DefCon will be like QM physicists symposium). Like something along the lines of entangling with (yet not measuring) the signal and performing "shadow" ("counterfactual quantum communication") read of a that signal (entanglement transitivity/swapping, especially if the read/measurement is done after Alice&Bob had already got satisfied with the integrity of the signal as there are also interesting possibilities with that "entanglement in the future affecting the past". Or like this QM analog of NSA Google fiber splitter [https://www.extremetech.com/extreme/156673-the-first- quantum...](https://www.extremetech.com/extreme/156673-the-first-quantum- entanglement-of-photons-through-space-and-time) : the photon 4 would be injected back into the channel and Alice and Bob would never know the difference [between the pair 1,4 and the original pair 1,2] while the photon 3 would go into Eve's pocket ).

<comment><USER7> No, this kind of thing is ruled out by the protocol. There's a theorem called "monogamy of entanglement" which means that two maximally entangled qubits can't also be entangled (or even correlated) with a third. This means that Alice and Bob can guarantee that the key they're agreeing on wasn't intercepted. The theoretical argument is airtight. It doesn't rely on any assumptions about the adversary's computing power, or on whether the adversary has access to a quantum computer. The only way it fails is if physics works significantly differently to how we think it does.

Of course there can still be implementation errors or attacks at the endpoints. The strength of the chain is the strength of the weakest link. But the abstract protocol itself is a very strong link.

</comment></comment></comment><comment><USER8> Can someone with more knowledge on this topic speak to whether this is likely to take off, or is it just a research toy?

<comment><USER9> It's not likely to take off.

Do you want pre-shared secrets and the expense of a quantum network to, in theory, have infinite security (in theory!), or are you okay with tried and tested RSA which gives you >1000000000 years security at a much cheaper cost, that actually works in practice?

<comment><USER7> Well not RSA, that will be broken by quantum computers. But there are some classical encryption methods that quantum computers are not known to break.

</comment></comment></comment><comment> dan-robertson So the quantum part of this network is that it is doing _quantum key distribution_ [1]. The idea is that messages are sent in a predictably lossy way and that further non-predicted losses correspond to the messages being observed (by the environment or by physics).

In particular messages (bits) are sent as photons with certain polarisations. The space of possible polarisations is roughly rays through the origin in the plane (ignoring circular polarisation). The only way to observe polarisation is to take two possible polarisations and ask which one the photon is. The answer depends probabilistically on the photon's state and the polarisations chosen. For example a +45° polarisation when observed in the basis of {0°, 90°} corresponds to 50% chance of 0° and 50% chance of 90°. If a certain polarisation _p_ is sent and then one observes with a basis of _p_ or _q_ , there is a 100% chance of observing state _p_. When a photon is observed it's polarisation becomes whatever polarisation was observed (this it can't be measured twice)

The algorithm used works roughly as:

0\. Four polarisations are known in advance, made of two orthogonal bases, (but the four states are together orthogonal or linearly independent) and parties can send any polarisation down some channel[2], and observe any photon they receive with one of the bases, chosen before the photon arrives. A 0-state and 1-state is decided for each basis.

1\. Alice produces some random data to send to Bob

2\. For each bit she wishes to send, she chooses a basis at random and sends the corresponding 0-state or 1-state

3\. For each photon he receives, bob chooses a basis at random and observes the photon, recording his basis choice and whether he got the 0-state or the 1-state.

4\. Alice and bob compare notes on the bases they chose over a classical insecure channel. They should have picked the same basis 50% of the time.

5\. Bob and Alice keep the bits where the basis matched. In these cases, bob should have perfectly received the data.

6\. Some [random I think] subset is compared over the classical channel. Where these don't match up, the photons must have been observed (potentially eavesdropped). An eavesdropper can get a 75% probability [I think] that they were eavesdropped but not noticed by Bob/Alice as an eavesdropper would have had to pick a basis and could have either got it right and sent on an equivalent photon or got it wrong and had Bob probabilistically get the right bit out.

7\. If the error rate is suitably low then Alice and bob assume their data was safely transmitted and the rest of it can be used to make a random key.

Please correct me if I'm wrong on this as I'm not an expert and I'm not sure I've understood it correctly.

[1] [https://en.m.wikipedia.org/wiki/Quantum_key_distribution](https://en.m.wikipedia.org/wiki/Quantum_key_distribution)

[2] optical fibre is this channel. I don't really understand the physics of it but I thought reflection (inside the fibre) could cause polarisation to change or just loss of photon. I don't know this is dealt with but I'd love to find out.

</comment><comment><USER10> quantum computers arent real though are they

<comment><USER7> The amount of quantum technology needed for this protocol is much less than a full quantum computer. In fact all you need is fibre optic cable and polarising filters, both of which already exist.

</comment></comment><comment><USER11> One of the hard things about dealing with this, capacity wise in telecom, is that nothing single photon based works with known forms of cwdm or dwdm. It's not feasible to dedicate a dark fiber pair to every possible inter-site communication. For very important stuff that can pay for it, sure, but go price an inter city dark fiber IRU vs an inter city 100GbE...</comment>


Dutch Safety Board: Buk surface-to-air missile system caused MH17 crash - <AUTHOR> http://www.onderzoeksraad.nl/ <comment><AUTHOR> This contains a link to the full PDF report, which concentrates on the investigation findings and does not directly say who is to blame

</comment><comment><USER2> [https://en.wikipedia.org/wiki/Buk_missile_system#Operators](https://en.wikipedia.org/wiki/Buk_missile_system#Operators)

Both Russia and Ukraine operate that system.</comment>


Unhappy with career, please help. - <AUTHOR>

I'm at crossroads in my career. I'm looking for some advice. My case should be fairly typical, so I expect the responses I get to be useful to others in my situation too.
First, some context: I work for a big company on a popular online service. I have a masters degree and my field is machine learning. I'm smarter than all my peers at work.
I started off with a my-code-is-going-to-change-the-world attitude. I remember my heart racing the first time I was looking at results of my code processing petabytes of data. Then, slowly my smart, idealistic, I-will-create-perfect-AI self started bumping into reality. Rather than math/ML challenges, I was faced with problems like technical debt, missed deadlines, unmet expectations, unhealthy peer competition, endless frog-eating, fragmented days, daily scrums... to cut a long story short, it has been a long time since I did anything that I'm proud of.
And I have been in the company for more than 7 years now. Yes, I should just leave and go to a better place - that much is obvious. But here's the thing - I don't expect it to be better anywhere else. I don't want to join another big company and slowly nudge some KPIs upwards. I want to solve hard problems. Problems not solved yet. Problems that are important and that matter. The answer that I'm going to get maybe "go join a startup". But I'm an immigrant on work visa and this is risky. Also, I have a pretty demanding family life and I'm not sure I'd be able to put it the long hours.
After being frustrated for a long time and some failed attempts to change the situation, I have decided to go all-in and explore all my options aggressively. I cannot afford to not change things any more. I plan to interview a lot.
I could use the advice of people on HN. Have you had similar experiences? How did you get out of it? Am I being too pessimistic about potential opportunities? What are the things I should look out for before accepting my next offer? Is there hope for me? <comment><USER3> Today is not a good day to post this, likely your message will get drowned in the NSA noise.

> I'm smarter than all my peers at work.

There's part of your problem. If it isn't true then you'll be looking down on those you need to work with on a daily basis and this will be a source of much frustration. And if it is true - which is definitely possible - then you will be frustrated because of that.

Wherever you go make sure you fix this, either by having an accurate way to measure on how you relate to your peers so you don't end up looking down at them or by hooking up with a crowd that you'd be honored to work with - provided they'll have you.

</comment><comment><USER4> I'm going to go way left field. If by being an immigrant (I assume you are having trouble getting residency) you are being bound into slavery (that's my term for working on something you hate, just to earn money) then have you considered relocating to somewhere else where you can have more freedom and possible pursue something truly innovative?

As much as many people will argue otherwise, startups by their very nature are demanding, exhausting and exciting places to work. With strong family commitments you might find it hard to find a mutually acceptable lifestyle balance.

</comment><comment><USER5> >> I'm smarter than all my peers at work.

No, you're just conceited than your other peers and this is your biggest problem. It's not the job, it's you. Wherever you go if you have this attitude you will always feel like crap and things will just fall apart again. You know, "technical debt, missed deadlines, unmet expectations..." and so on.

>> But here's the thing - I don't expect it to be better anywhere else.

How would know? You never tried it.

From what I see, you have an attitude problem and you have to fix that first. Joining a start-up won't make you feel alive if you can't change your attitude.

</comment><comment><USER6> > I'm smarter than all my peers at work. If you are sure of that, then create > something on your own. Try to apply your AI skills, find a problem to solve > (big data, NLP etc) and get a prototype running. If you can't find a new > problem to solve, you could as well solve an already solved problem in a > better way. But set the target. Re-evaluate yourself at the end.

</comment><comment><USER7> I want to say 'go work in academia' but as you are probably aware that environment is easily as political as any large corporation, you waste lots of time wrangling over funding and departmental politics and so on. Since you're foreign, a career in the intelligence service isn't on the cards either :-)

I think you do have a strong possibility of success at a startup - <USER2> comments about being smart seem matter-of-fact rather than ego-driven to me. Your big problem is that instead of nudging KPIs you may just find yourself on a growth-maximization/VC funding treadmill instead. The best thing I can think of is to seek out ML problems focused on natural phenomena (weather, epidemiology and suchlike) rather than market-driven ones involving consumer behavior, which will inevitably revert to revenue-maximization problems.

</comment><comment><USER8> If you really want to work on machine learning, do a PhD. If you have a bit of experience and if you are good at it, it should be very easy to find a paid position. In academia, especially during your PhD, you are very free to work on your own thing (depending on the professor whose group you join).

</comment><comment><USER9> What country are you in? If US, I think it takes less than 7 years to go from H1B to green card. I can't think of other high-tech immigrant destination countries where after 7 years one still does not have permanent residency.

</comment><comment><USER10> Dude ..Innovate something.. People dont have talent like you.. Take few days off, think something that is kinda impossible and code it

PS : Put it on GITHUB so that everybody knows that you created it..

</comment><comment><USER11> somewhat OT: how can one get reasonable technical career advice these days. I definitely have a few questions myself, but i never felt like asking everybody on HN was the best way to go about it.</comment>


Ask HN: How do you test your web applications? - <AUTHOR>

I'm an undergraduate who happens to be taking a graduate seminar in Programming Languages. Recently, we read a paper on testing web applications, and the (perhaps cynical) notion among the grad. students was that "no one tests web apps," which I felt was wrong.
So to possibly vindicate myself, I'm curious as to how many here do test, and if so, how?
Edit: Thanks for the responses! To be more clear, we were discussing testing more along the lines of "finding bugs and vulnerabilities" and less along the lines of "usability." <comment><USER2> Testing is a vague term. There are lots of types of testing, which other posts go over quite well, but I'll give a rundown.

* Requirements testing - take the napkin you scribbled your idea on, and mentally run through it a few time. A feature that is 100% correct code but does the wrong thing, is still a "bug".

* Unit testing - low level, typically at the database and business logic level. Does this function return what I think it does?

* Integration / Frontend testing - automated scripts that run through and 'click' on elements, and verify content. Webrat and Selenium are a great tools for this.

* Usability testing - throw some real users at it, find bugs in your design and workflow.

* Penetration / security testing - attack your site from the outside. Alternately, audit the site from a code-level point of view. Find security holes, figure out ways that people will abuse your site.

* Load testing - once you get a site up, will it stay up after traffic hits. This is a rather deep topic in and of itself.

You get the idea. There are probably more that I didn't hit. But basically every step along the way to having the final app can and should be tested.

Testing is more than finding bugs, it's finding flaws in thinking. Whether it's the 'business analyst' aiming for the wrong target, the designer having a hard-to-find button on the mockup, or a coder using the wrong import() function override.

</comment><comment><USER3> Since I do this professionally, I have a lot to say about testing web apps, but I'm going to keep my recommendation short and precise.

Go here:

      http://portswigger.net/suite/

Drop the $200 or so for a copy of Burp Suite Pro.

Burp is the industry standard tool for testing web apps; probably more than half of all web app penetration testers use it. It's like Firefox Tamper Data on steroids; it gets between you and your request, breaks out all the parameters for you, and gives you tools to manipulate and replay the requests.

You in particular want to understand the Burp Intruder, which is Burp's fuzzer. The fuzzer takes a request, tries to figure out where all the parameters are (you can help it with that), and then feeds malicious inputs through them and records the responses.

You want to fuzz every page in your application at every code drop. We've seen entry level QA people trained to do this, so delegate the task if you're not sure you can make yourself do it reliably. You want to collect every error response, and you want to grab your application logs and look for every exception or abnormal event. You want to know how the responses are different from the last run each time you ship a new version of the app.

Burp is so extremely effective that I'm amazed every web dev team doesn't already have a copy. I think it's because it's billed as a "security" tool. But it's obviously more than that.

Webdevs have a lot to say about unit testing and cloud testing and integration testing and test-first development. What I can tell you is that I've seen no correlation between test methodology and pentest outcome. The TDD teams fall just as fast as the seat-of-the-pants teams. I want to strongly recommend that you don't waste time strategizing on how you'll test or validate architecture or whatever. Burp is a no-BS tool. Get it, run it, and you will find bad things. Work out your effective bill rate and the amount of time it takes you to adopt or extend a test suite, and it's the cheapest quality enhancer that's probably available to you. Do whatever you want on the testing side, but do Burp first.

<comment><USER4> s/Burp Suite Pro/QuickCheck/.

Basically, there are two stages to a web application; understanding the request, and processing the request. The understanding part is a parser, so you are going to have to ensure the correctness of that with test cases -- you can never _prove_ correctness, you can only show that it works on a lot of input.

The rest of your application, however, will be modeled on a finite number of possible states that this data structure represents. This means you can use better tools (things like Catch) to ensure correctness; you can literally prove that there is never a case you don't handle, for example. This gets you reliable code more quickly than random testing does.

Anyway, to answer the OP's questions, web apps should be tested like everything else. A web app is a pure function from Request -> Response, so test it like any other pure function.

</comment></comment><comment><USER5> Selenium is what I'm using, Selenium IDE (firefox plugin) makes it easy to set up tests. <http://www.seleniumhq.org>

UserTesting.com is great for usability testing, they have people follow some of your instructions and record their screen/voice as they go through it. Feedback from this has lead to a lot of critical improvements.

Another article you might be interested in is about how software is developed for the space shuttle (they test like crazy). Someone posted the link on HN last night and it's fascinating: <http://www.fastcompany.com/magazine/06/writestuff.html>

<comment><USER6> On a related note, one of the authors of Selenium IDE founded a startup called BrowserMob (<http://browsermob.com/>) that uses Selenium recordings for load testing and monitoring.

Great guys there, and a fantastic service. I've been a customer for over a year - it's one of the few companies I'm impressed with enough to evangelize.

<comment><USER7> Shinya Kasatini is the original creator of Selenium IDE, based on my version of Selenium (which was simply called "Selenium Core"). Shinya is also famous for creating the "Pocket Guitar" iPhone app.

Patrick Lightbody is founder of BrowserMob and is the co-author of Selenium RC. RC is the Java-based Selenium server for driving browser testing from any programming language.

I also do lots of stuff with Selenium at my startup, Sauce Labs. Sauce focuses on making your functional/acceptance testing cycle go faster by providing hosted "browser in the cloud" infrastructure where your tests run in parallel for a huge speed boost.

</comment></comment></comment><comment><USER8> Here's a guide on penetration testing you might find useful. I would assume some frameworks handle some/most issues "out of the box" but it's still a good guide to follow.

[http://www.owasp.org/index.php/Category:OWASP_Testing_Projec...](http://www.owasp.org/index.php/Category:OWASP_Testing_Project)

Other than that, testing a web app is just like testing any other software. Look for edge cases, try different combination of things, etc. to say the least. But here are a few things to look out for off the top of my head:

* Don't be too restrictive on validation on fields like names, addresses/zip codes (if there are international customers), e-mails, etc. However, make sure people can't enter numbers in an SSN field or letters in a date field either.

* Make sure weird characters in different fields don't break anything. For example, entering O'Hara as the last name should be stored correctly in the DB and then rendered correctly to the user whenever you need to show it.

* Make sure your text box max lengths are not greater than the DB's column definitions. You don't want someone to enter a 50 letter name and have the field in the DB defined as varchar(20).

* Make sure the web app handles session time outs gracefully. You don't want a user filling out a registration form to get a phone call and then come back to complete the form, only to be redirected to the starting page when he clicks Submit.

There are also automated frameworks you can use to script automated tests, such as Watir/WatiN. (Please don't ever waste money on QTP.)

And as others have mentioned there's always load testing and stress testing you need to do at a certain point.

<comment><USER9> Thanks for posting this. I will definitely add this to my ever-expanding lit review for my thesis on SQL Injection Attacks/Web App Development Frameworks

</comment></comment><comment><USER10> I've been in a few web projects and all had a testing phase just as any other projects: creating test plans based on the requirements and specification, doing functional testing, integration testing, load testing, and so on.

For what is worth, most of these applications were internal apps for large companies (users are the employees, not customers) and might as well have been developed as desktop or client-server apps. I see no reason why the choice of architecture/deployment would affect the QA policies. It might affect the particular way of testing (tools, etc) but not whether to test or not.

I can't see quite see why is this even a question. Perhaps your colleagues are assuming that all web apps are like the typical apps they might use: B2C, free or "freemium", etc. Other things being equal, these are more likely to be released without careful testing.

</comment><comment><USER11> Rails comes with automated testing baked in, and it's one of the best unit/automated testing packages I've ever seen.

Then...people went and made it better with things like RSpec, Shoulda, Factory Girl, and other enhancement packages.

I've given up trying to convince others to do automated testing, but for me and my projects, there's really nothing that beats what Rails and the Ruby community provides.

</comment><comment><USER12> There are many types of testing, almost all of which are useful. From a client perspective, usability testing is probably the most important. Having a testing group come in, use your app, and then give you immediate feedback is invaluable.

There is also penetration testing to check you web apps security. Could you maybe be more specific? I think it would help you get some great answers from the community.

</comment><comment><USER13> One of the many web apps I have worked on do something similar to the following:

before any feature rolls out each feature (from a list) is tested with different (but not every possible) set of inputs. This catches 90% of problems.

The other 10% that get past our testing are either sent in by the user through a feedback from, or by the system sending messages (errors warnings etc)

</comment><comment><USER14> I've used Selenium to run unit test along with various flavors of Watir. Watir requires much less overhead and is programmable in Ruby. Selenium has libraries in all your favorite libraries, but requires running a Java proxy server. However, you can automate tasks by having Selenium record your actions on a page, which is super nice.

<comment><USER7> Selenium 2 does not require the Java proxy server. That was one of the top complaints with Selenium 1, so we got rid of it. :-) The Selenium 2 Ruby bindings are very good these days and have just as much overhead as Watir (that is to say, not much).

</comment></comment><comment><USER15> Jmeter for load testing. Selenium for regression testing. Penetration testing is also a pretty vital aspect if there web application has access to sensitive data. Web applications should be tested like any other applications.

Graduate students stating that "no one tests web apps" are showing why they are still called students.

</comment><comment><USER16> I've just started using Django testing framework to do unit tests for my app. So far it helps catch a lot of errors that would have required more tedious manual testing, which is what I did previously. It sounds like Selenium would be a good way to test the javascript aspect.

</comment><comment><USER17> IMO Biggest bang for your testing buck - cucumber with webrat

<http://railscasts.com/episodes/155-beginning-with-cucumber>

</comment><comment><USER18> I use QUnit to test my JavaScript and whatever's on hand to test backend code (unittest in Python, Test::Unit in Ruby). I'd use Selenium for point-and- click-style testing but I haven't gotten to it.

</comment><comment><USER19> click, click, click, mouseover, click. So tedious.

<comment><USER20> sounds like you need the Selenium Firefox plugin <http://seleniumhq.org/>

<comment><USER19> ... I had no idea! This is awesome (Its like discovering Firebug for the first time)! Thanks!

<comment><USER21> Um, and if you like that, try the free enhanced version from Sauce Labs called Sauce IDE which records videos of your tests running in cloud space. Makes troubleshooting way easier. (I cofounded Sauce with @hugs)</comment></comment></comment></comment>


Supreme Court Allows Sandy Hook Families' Case Against Remington Arms to Proceed - <AUTHOR> https://www.npr.org/2019/11/12/778487920/supreme-court-allows-sandy-hook-families-case-against-remington-to-proceed <comment><AUTHOR> Anyone else think this is scary? Is suing liquor companies or automobile manufacturers for impaired driving accidents next? Holding a company responsible when a bad person uses its product to commit criminal acts seems criminal to me.

<comment><USER2> No, because the issue is more subtle than you imply.

But yes, if a liquor advertises to minors, or even advocates for drunk driving in ads, then I would expect them to be sued. And yes, if auto manufacturers advertise in a way that leads to an increase in impaired driving, I would expect them to be liable for their advertising as well.

<comment><USER3> I am no fan of the NRA and their sponsors but the standard of proof in this case for the line of arguement worries me.

It is one thing if e-cig manufacturers get sued for marketing as smoking cessation devices while talking about flavor or advertising on influencers - it is damn clear that they are dodging anti-tobbaco advertisement and advertising nicotine to minors and the standard of evidence is well established. But trying to draw connection between the machismo and spree shooters? It seems far too speculative when courtroom junk science based on the desired outcome has already caused problems.

Plus how easily used for the next moral panic. For a silly example that Minecraft causes illegal and unpermitted construction when it is really say priced out younger generations building their own squats.

<comment><USER2> It is up to attorneys for each side to make their respective cases. Presumably the slippery-slope argument you use will be part of the defendants' case.

</comment></comment></comment></comment><comment><USER4> I really don't like this. Remington did not break the law. Remington did not break the law. Unless Remington advertised this as a mass shooting weapon, able to kill hundreds of people, they should not be held liable for what someone did with their product. Slippery slope.

<comment><USER5> You don't have to break the law to be sued by someone for any reason whatsoever. Welcome to America.

</comment></comment><comment><AUTHOR> I'm curious... why would this be flagged? Holding manufacturers of a product liable when they are used illegally seems a valid topic for this forum. What happens when your XYZ Startup's awesome multifunction software is misused? You may be sued...</comment>


VCs Are Just Tired - <AUTHOR> https://techcrunch.com/2020/01/16/vcs-are-just-tired/ <comment><USER3> Everyone is tired because they are overworked: engineers, doctors, lawyers, accountants, bankers, police, cooks, janitors. Long shifts, split shifts, long commutes, homework, constant interruptions, questionable management practices, weak labor laws, weak enforcement thereof, asymmetric legal costs, self- training on your own time, expectations of faster and faster turnaround times, less and less support staff...

<comment><USER4> Who's investigating the reasons behind all the burnout and erosion everywhere ?

<comment><USER5> I think it's just a consequence of a free market/capitalism. Everyone is competing w/ everyone, so working as hard as possible, to beat the competition.

Remedies? Either cultural (it just becomes unthinkable to work beyond X, because that's taboo) or legal (limits on how much you're allowed to work).

<comment><USER6> It's also because the productivity gains that we have is captured by businesses rather than the employees.

Being productive doesn't give you more free time. It just means that you get more work.

<comment><USER7> _> is captured by businesses rather than the employees._

"Businesses" don't really do much of anything. What you really mean is the billionaire executives at the top of them.

<comment><USER8> Well yes, but the majority of it is captured by the middle class, in the form of public pensions, 401k's, the stock market etc.

<comment><USER9> How much of the market is actually owned by the middle class? I would say not much in the US.

See page 44 of the paper below.

You can look at Income, Wealth (net worth) or financial resources. Net Worth is probably the best estimate. You'll notice the top 1% has ~40% of the wealth. The next 4% have ~30% of the wealth.

So it would be very inaccurate to suggest that the "majority" of wealth and upside is accrued to the middle class, at least in the US.

"Household Wealth Trends in the United States, 1962 to 2016: Has Middle Class Wealth Recovered?" Edward N. Wolff

NBER Working Paper No. 24085 Issued in November 2017 [https://www.nber.org/papers/w24085](https://www.nber.org/papers/w24085)

</comment></comment></comment></comment></comment></comment></comment><comment><USER10> "Lack of bandwidth, hyper-velocity, a pittance of sleep"

If we are just going to put together words to describe concepts that make no sense then you are probably meeting people that have never made a dollar on their investment.

Some of the best VCs are original thinkers and will take their time making investments. The thing about them is that they will be the first to making an investment in a company even before it has become the hot new thing.

<comment><USER11> Venture capitalist success is indistinguishable from randomness. It's pure, unadulterated luck. "The best VCs are thinkers and visionaries" is post-hoc bullshit justifications to make their wealth seem the result of wits and hard work, and not just the product of luck + the pre-existing capital to invest.

<comment> barry-cotter Ron Conway alone disproves your thesis. Some people are just very good. Some prescriptions are also very good, like Sequoia or Kleiner Perkins. And the success of the good is not purely Matthew Effect, rich gets richer stuff, as Andreesen Horowitz shows. If you're good enough you can go from not a VC firm to top 5 VC firm in under five years.

<comment><USER12> In no way do these people disprove the argument or other EMH-like arguments (efficient market hypothesis).

In many random distributions, if you sample enough you're going to get outcomes at the tails.

<comment> barry-cotter That would imply mean reversion. Investors who have been successful in the past should be no more likely than average to be successful in the future. That is not what we observe in VC.

</comment></comment></comment></comment></comment><comment><USER13> Can't help but feel like they could literally just take a trip outside SV and get:

1\. Easier access to deal flow

2\. Lower valuations

3\. Less competition

If any VCs are interested, HMU I can show you strong deals your peers saw way before you because they looked @ Miami + deals your peers haven't seen because I live here & I am plugged in.

<comment><USER14> I'm a fan of Miami, and I don't mean this as a dig: could you point at some venture-sized exits from Miami, especially ones that SV VCs seem to have missed/been late to?

<comment><USER9> That seems like an unfair question -- how can any city be expected to generate venture sized exits _before the money even rolls in_? SF/SV have generated the exits they have after decades of continued investment.

<comment><USER14> Maybe you missed my disclaimer. The question wasn't intended as a dig, just a request for information.

</comment></comment></comment></comment><comment><USER15> This is a great article, especially because the solution is right there in the text:

> forcing everyone to chase the same set of SaaS companies

> everyone can read the gridiron of SaaS metrics

There was a perfect storm: huge seed rounds leading traditional firms to move upmarket, VCs raising larger funds and so needing to hit the winners hard, which caused Series A metrics to swell, and so VCs are all chasing the same deals.

Of course those deals don't need them: those companies are already winning and don't need their expertise, just their money, which is commoditized by the swelling of funds.

The answer is simple: chase less successful. Stop just trying to get into the big SaaS deals, and target smaller companies, lower metrics, earlier stage companies.

Of course, if the firm staffed up and raised a larger fund as the article says, then it may be structurally impossible to survive. Innovator's dilemma in action.

<comment><USER16> Yeah I generally agree. There's a lot of risk averse investors it seems. I don't have the data so I can't say for certain, but it feels like VC is just betting on companies that already have product, revenue, a solid customer base, and almost zero chance of completely failing.

a16z, benchmark, SV angles (when they were around), etc. only got where they are by taking massive risk - on founders with no track record and often just a prototype of demo.

Now, just to get a seed round, you need a fully featured product, with distribution and revenue.

It just feels like the wonder and risk of creating world changing tech without worrying about financial outcome is dead. Which, honestly makes sense from an investment thesis standpoint. You minimize risk by following the leader or investing later stage. It's growth equity, not true or traditional VC that requires a 10x return. Most VCs are happy with 1.5-3x now (relatively happy).

</comment></comment><comment><USER17> This is just one person's anecdotal experience.

</comment><comment><USER18> Alarming indicators of an asset class bubble.

</comment><comment><USER19> Sure feel sorry for these VCs... hope they get some rest on their piles of money.

</comment><comment><USER20> Aren't these the same VCs espousing China style 9:9:6 work hours [1], promoting myths of 10x-ers who only sleep once a week, and demand from their portfolio every last breath of effort, or esle ...

Please, apply some of that 9:9:6 to your VC workflow, don't sleep and definitely try to be a 10-X investor. And definitely turn up the paranoia on FOMO - not because it yields dividends, but because every VC peaches it, so practice what you ...

Those Billions won't earn themselves

[1]: [https://en.m.wikipedia.org/wiki/996_working_hour_system](https://en.m.wikipedia.org/wiki/996_working_hour_system)

</comment><comment><USER21> money never sleeps

</comment><comment><USER4> those poor VCs, how can they live on 52M

<comment><USER22> You can be rich and miserable.

<comment><USER4> True. But I'd rather but sad and wealthy.

</comment></comment></comment><comment><USER23> Oh my! Collecting that 2/20 while I sleep is sooooo exhausting! /s

<comment><AUTHOR> if you have a small fund the 2% barely keeps the light on

I see some articles congratulating people who've raise $5M funds. If the fee is 2% you only have $100K to pay yourself and run the business. Not exactly rolling in dough.

</comment></comment><comment><USER24> I have a really hard empathizing here, VCs in many ways represent the robber barons of the 21st century.

In WeWork, the world saw a blatant attempt by VCs to dump a severely overvalued and overhyped company into the public markets so they could cash out.

In Facebook, we saw VCs fund one of the world's largest and most successful surveillance capitalist enterprises, one that still seems to be going strong, despite the ridiculous number of scandals plaguing Zuckerberg. VCs made him invincible.

We're seeing gig economy companies find new and creatively unsavory ways to screw over their "not workers" (looking at you, GrubHub).

But yeah, screwing over the middle class has to be draining work.

<comment><USER25> Please don't post in the flamewar style to Hacker News—not even about VCs. We're looking for curious conversation here.

[https://news.ycombinator.com/newsguidelines.html](https://news.ycombinator.com/newsguidelines.html)

<comment><USER26> Assume for a moment the guy is right by whatever circumstances. There are three supporting pieces of evidence and perhaps the last sentence is "charged" but I don't see how it is offensive even if wholly incorrect. How would he present the very ideas as "curious conversation"?

<comment><USER27> "Curious conversation" means working towards understanding, as distinct from heaping blame.

In all the examples cited, there are many actors and circumstances that have brought these things about; investors, sure, but also customer demand and behavior, technological evolution, social and economic factors at micro and macro scales, and countless millennia of evolution.

Angry scapegoating might be briefly cathartic but doesn't effect actual change.

A healthy, curious conversation explores all factors and yields ideas for new solutions to present day problems.

<comment><USER26> This is like a pharmaceutical company that dumped opioids on the public through legislature, perverting the medical community, advertising and reputation saying "well there are many factors and your brain has countless millennia of evolution to seek out these compounds".

Sorry, I just don't buy it.

People can be wrong, and in fact it is necessary for people to be able to be wrong and state their case and sometimes emotion without tonal arguments to dismiss the hardest of questions.

The root of the comment, the curious part, is: are VCs somehow causing undesirable pathology that leads to their "tiredness"? The moderator happens to work for a VC. I don't think the parent of this thread makes a compelling case, but the sentiment is rooted in reality and can be used to start a useful if uncomfortable discussion.

Perhaps this is not a true intellectual community and I should just leave.

<comment><USER27> > _This is like a pharmaceutical company_...

If there was anybody who would be motivated to scapegoat a single actor or cause for dysfunction in the medical industry it's me.

I've endured debilitating health challenges, including severe pain, for almost half my life. I've had plenty of time and motivation to research and contemplate everything that's wrong with the medical system, including corrupt dealings between pharmaceutical companies, regulators, research institutions and medical practitioners.

And, much like apportioning blame to VCs, there is some truth to this point of view.

But it's not the whole story.

At least as significant a factor is that there is a real, legitimate need for pharmaceutical opioids, and a widespread epidemic of "pain" that is little- understood by mainstream medical researchers and practitioners, which is mostly to do with the fact that physiology is extremely complex and still only partially understood.

Fortunately, I've never had to turn to opioids or other pharmaceuticals to treat my pain conditions, and after many years of research and experimentation, have been able to become pain-free via natural - <USER2> unconventional - approaches.

I think it would be great if other people had the access and motivation I've had to achieve good health, rather than ending up dependent on opioids or languishing in other ways.

But 10+ years of thinking about it, including plenty of, yes, _curious conversation_ , has taught me that problems in the medical system can't all be simplistically blamed on corrupt pharmaceutical companies.

> _tonal arguments to dismiss the hardest of questions_

What "hard questions" was the root commenter raising?

Real "hard questions" involve honestly considering all facets of a topic, and taking on the responsibility of contributing to the formulation solutions that are practical and effective.

> _Perhaps this is not a true intellectual community_

In what way was the root comment more "intellectual" than what I'm advocating?

<comment><USER26> Sorry dude I'm not really tracking with you at all. The OP posited some plain issues that can be dissected and dismissed but was muted by a mod that works for an organization that benefits from just burying said issues. I lean conservative and can't really see how anyone in tech says with a straight face the "gig economy" is good for anybody except the 10^5 or so technical staff and their management and financiers. A modest understanding of history (i.e. what technology meant in the 60s and 70s) just leaves me bewildered with what constitutes tech now, and the flow of money from monetary policy down to banks and VCs is they main cause of overall stalling out of fundamental, worthwhile, and simply interesting progress. The cashout culture of things like WeWork is a totally different dimension of the bizarre and unsavory. VCs should be tired enabling and propping this farce up.

A desire for intellectualism comes from allowing airtime for ideas that you disagree with, that might even confront yourself, and maybe even elucidating and moving the tonal argument you disagree with to the very roots of the things that need to be discussed and providing ample discourse for the thoughts to be explored. Whether you are doing this or not I can't really tell right now, but you are not the target of my comments, the mod mute is. I'm happy to just go away at this point, this site and surrounding culture has changed for the worse in the 12 years I've seen.

<comment><USER27> This comment is starting to wrestle with the complexities of the topic, which is great!

Dang's job is to prevent flamewars on this site, and to cultivate intellectual curiosity.

All he was objecting to in the original comment was that it was of the style that can spark flamewars.

Ultimately, I think we want the same things.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER28> It's almost as if capital is too concentrated, to the point that the people with who control it don't know what to do with it. Oh wait.

The basis of capitalism is markets, and the wisdom of the crowd (the "invisible hand") controlling them and making them efficient. VC's (and wealth concentration in general) are the opposite of that. They are the very-much- visible hand.

We'd solve this problem with progressive taxation and a basic income (a healthy side-helping of better funding for public services wouldn't go amiss either).

IMO, if you believe in free markets, then your position is inconsistent if you also believe if you also believe in unconstrained wealth collection. Because once that wealth is concentrated, the market is automatically distorted.

<comment><USER29> > IMO, if you believe in free markets, then your position is inconsistent if > you also believe if you also believe in unconstrained wealth collection.

But if you believe in free markets, then your position is _also_ inconsistent if you _don 't_ believe in unconstrained wealth collection. Because that's one of the things that the market sometimes does when it's free.

And I'm sure that someone will say "That means that the idea of a free market is self-inconsistent, and therefore we should abandon the idea." I think it is more likely that the logic in the parent's last paragraph is incorrect. Instead, one has laws to prevent wealth from distorting the market. (Tax the wealth to extinction is not the only possible form that such laws could take.)

<comment><USER12> More likely is that there is no objective "free" market. Is it more "free" to include pricing information from externalities (say with a carbon tax)? Or is it more "free" when those participating in the market are able to harm me without my consent through those externalities?

There's no ground standard for non-interference in the affairs of others.</comment></comment></comment>


PayPal Freezes Support Account For Bradley Manning - <AUTHOR> http://www.couragetoresist.org/x/content/view/891/1

<comment><USER2> I still can't believe that this guy is basically being tortured before trial with the solitary confinement regime that they have him under. I know that military justice is different than civilian justice but I'd still think punishment requires a trial. And punitive solitary should be on the wrong side of "cruel and unusual" for any crime up to and including treason -- if it's capital, you can kill them, but you can't do so cruelly or unusually.

<comment><USER3> I don't know about this particular case, but as somebody who served in the military, I always find it odd when folks talk about military member's civil rights.

Do they realize that the military can and will take lives? That simple things like your smoking habits can get people killed? That you give up all sorts of things when you put the uniform on?

Don't get me wrong -- I didn't like any of that. And I was in the infantry, which is much more about military discipline and foundational stuff. I think a lot of folks look at the military and think of guys living in dorms and doing jobs that involve pushing a lot of buttons. In that case, those folks begin to look a lot like anybody else going to work. So we expect them to have a similar work and legal environment as the rest of us.

Like I said, I'm not trying to pass judgment on Manning in this comment or try to figure out what the appropriate type of incarceration would be for him. I just find people's attitudes towards the military very -- weird.

<comment><USER2> Not being tortured is a _human right_.

Full stop. This isn't about whether the punishment for losing your rifle is excessive, this is a black and white issue. Punishment before trial == wrong. Torture == wrong. Both are against the constitution.

And I bet nobody even gets in trouble for this.

<comment><USER4> Yeah, and I'm really don't like the special treatment for "enemy combatants" as well. Does the right to life, liberty and happiness apply to all mankind or just to people the US government is not currently scared of?

<comment><USER5> Are you asking if the American Constitution and the American Bill of Rights only applies to Americans?

Enemy combatants belong to non-state actors, and so no treaties or guidelines apply to them. Last I checked Al doesn't Al Qaeda and the rest of the cavers don't get representatives in the UN.

<comment><USER6> Actually, at least the Universal Declaration of Human Rights does apply to them.

<comment><USER7> Unless the United Nations finds it inconvenient:

<http://www.un.org/en/documents/udhr/index.shtml> Article 29(3)

 _These rights and freedoms may in no case be exercised contrary to the purposes and principles of the United Nations._

</comment></comment></comment></comment></comment></comment></comment><comment><USER8> PayPal says that they froze the account because they require non profits to associate a bank account with their PayPal account and Courage To Resist has not done this.

[http://techcrunch.com/2011/02/24/paypal-on-cutting-off- coura...](http://techcrunch.com/2011/02/24/paypal-on-cutting-off-courage-to- resist-this-has-nothing-to-do-with-wikileaks/)

<comment><USER9> This is the reason every time, and still people refuse to do it and claim Paypal are big mean thieves.

</comment></comment><comment><USER10> Related:

<http://news.ycombinator.com/item?id=2259673>

<http://news.ycombinator.com/item?id=2259195>

<http://news.ycombinator.com/item?id=2259121>

(not that I don't appreciate the upvotes (thank you!), but I sometimes find it a little depressing when I get more votes for cross-referencing items like this than for original work that provides real information: <http://news.ycombinator.com/item?id=2259761> )

<comment><USER11> I think your automated script was very helpful. I would urge you to bring it back. Particularly now that I distinctly feel that duplicates have been on the rise. By duplicate I do not mean the exact url are resubmitted but articles or announcements that have a huge overlap in content.

<comment><USER10> I agree that there's a large rise in duplication of story, without necessarily a duplication of URL. Many more people, many more feeds, one feed has a story, the others all pick it up, suddenly it everywhere, and several are submitted.

Not sure what the "right" solution is. I'm still thinking about it.

And thanks for the support. It's appreciated.

</comment></comment></comment><comment><USER12> Its a wonder people still use the service after articles like this come to light. Its not the first time Paypal has pulled this stunt. A mass boycott isn't out of order.

<comment><USER9> > A mass boycott isn't out of order.

Okay, I'll boycott Paypal and use... oh wait, no alternatives :(

<comment><USER12> So make one... this is HN after all.

EDIT - Make one and I'll signup. There is your first client.

<comment><USER9> There's things you can make with will power and desire, there are things that need insane amounts of money and influence to make. This is the latter.

</comment></comment></comment></comment><comment><USER13> The same way PayPal is free to choose whether it does business with anyone, we can also choose whether we want to do business with them.

<comment><USER14> Not so for US companies. They are not free to choose, for instance, to not do business based on certain characteristics (race or sex, for example). Don't be so quick to give up the ship just because it's "business." The companies enjoy a relatively stable environment: roads, power grid, and security do to US soldiers willing to risk their lives. In my mind it's perfectly acceptable to make them play by certain rules.

If they don't like it let them go run their business in Libya.

<comment><USER15> >The companies enjoy a relatively stable environment: roads, power grid, and security do to US soldiers willing to risk their lives. In my mind it's perfectly acceptable to make them play by certain rules.

This line of reasoning can be used to justify the majority forcing the minority to do literally _anything_. Your claim is that their reliance on society trumps one of their fundamental human rights. Do you really find that acceptable?

<comment><USER14> Um, be drafted? Pay taxes? Yes. We can force each other to play by rules.

Fundamental human right? Bah.

It's well established that in the US companies can be forced to do business with minorities, protestants, females, Democrats...plenty of people they may otherwise wish they didn't have to (well, maybe not Democrats).

This idea that companies should be able to do whatever they _can_ is nonsense (in fact, I'd go so far as to say it's poisonous, but that's for another post).

Besides, I'm not forcing them to do anything. They are welcome to move their company to Sierra Leone.

<comment><USER15> >Um, be drafted? Pay taxes? Yes. We can force each other to play by rules.

Taxes are a (perhaps) necessary evil. It is best not to use necessary evils as precedent for other infringements on human rights. And drafts are also an infringement on human rights.

>Fundamental human right? Bah.

Ok..

>It's well established that in the US companies can be forced to do business with minorities, protestants, females, Democrats...plenty of people they may otherwise wish they didn't have to (well, maybe not Democrats).

It was well established until the 1860's that humans could be slaves. That something is established is not justification for that thing.

>This idea that companies should be able to do whatever they can is nonsense (in fact, I'd go so far as to say it's poisonous, but that's for another post).

Who said anything about that?

>Besides, I'm not forcing them to do anything. They are welcome to move their company to Sierra Leone.

Seriously? How does this sound: You can either give me your money, or I can torch your house. I'm not forcing you to do anything, but if you don't want to give me your money, I'll torch your house. You can always move down the road, but your house is gone if I don't get your money. Sound good to you? Or does it sound like I'm forcing you to do something?

<comment><USER14> Sorry- travel day for me.

 _> It's well established that in the US companies can be forced to do business with minorities, protestants, females, Democrats...plenty of people they may otherwise wish they didn't have to (well, maybe not Democrats)...It was well established until the 1860's that humans could be slaves. That something is established is not justification for that thing._

So you really are arguing that...companies should be allowed to...wait... What exactly are you aguing? That a fundamental human right is being denied to a company? Which one? Why should companies have fundamental human rights? They are legal entities, not humans. And they are not allowed, by the way, to violate the human rights of those who work for them. The people who make up the company != company.

And to the point your were making on my comment: I agree with that fact that we can force terms of business on companies (even mine), and I agree with the now well-established fact that it is illegal to have human slaves.

 _Seriously? How does this sound: You can either give me your money, or I can torch your house. I'm not forcing you to do anything, but if you don't want to give me your money, I'll torch your house. You can always move down the road, but your house is gone if I don't get your money. Sound good to you? Or does it sound like I'm forcing you to do something?_

It is at this point that I suspected you were trolling, but your profile says you are "well established" on this board so, contrary to your argument above, I should take it seriously.

Your analogy could be improved, as you are using extortion as your hypothesis. Try this:

You can either stop beating your wife, or we will put you in jail. If you wish to continue beating your wife, you should move your family to a place where you can get away with such behavior. But we won't let you do it here.

<comment><USER15> > That a fundamental human right is being denied to a company? Which one?

The right to freely trade with whoever they want on terms that are mutually agreeable to both parties with no coercion involved.

>Why should companies have fundamental human rights? They are legal entities, not humans.

Companies are not necessarily legal entities. The only companies that are legal entities are corporations. I won't defend corporations, but I will defend the rights of the people that work for them.

>And they are not allowed, by the way, to violate the human rights of those who work for them.

No, they're certainly not allowed to violate human rights. No one is. That's why it's illegal, unless of course a government does it because they have the guns.

>The people who make up the company != company.

That holds true for a corporation, but not a company that isn't incorporated.

>and I agree with the now well-established fact that it is illegal to have human slaves.

That's somewhat humorous given your earlier statement in support of the draft. And yes I'm aware that you agree with those things. But your agreement does not equate to justification. Nor does their status as being "established".

>Your analogy could be improved, as you are using extortion as your hypothesis. Try this:

Using the definition that extortion is illegally using coercion to obtain property or services of another person, your "plan" is extortion as well. It is illegal (trivially) because it is not currently legal as you pointed out earlier, and it is coercion by any definition I've heard. Yes my example is not a perfect analogy, but it is not fundamentally different. A perfect analogy would be that you have the option of giving me your money and keeping your house or not giving me your money and not keeping your house. Either way, if you owned your house, you would be upset with me.

Your analogy is in fact incorrect in a fundamental way, which is that in your analogy, I am currently violating someone's right. My hypothetical wife has a right to not be beaten. Manning's defense fund does not have a right to use PayPal's services, so PayPal is not violating anyone's rights. (Though I will grant to you that since PayPal is a legal corporation which traded some of its rights to the government for some legal protection, I would not fight to the death for their right to refuse him service)

<comment><USER14> >> That a fundamental human right is being denied to a company? Which one?

>The right to freely trade with whoever they want on terms that are mutually agreeable to both parties with no coercion involved.

This is, as is your final paragraph, succumbing to the _fallacy of the consequent_. They don't have that right- that's the point. A baker is not allowed to _not_ sell goods to Chinese people.

I'm afraid we are going to have to agree to disagree, and let this go. Thanks for the thread- I found it enjoyable and refreshing.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER4> I'm not sure if it mature enough yet but this freezing of a accounts is a reason why I'm interested in bitcoin.

<comment><USER16> You still need means to transfer from bitcoin to other circulating currencies. There is bitcoin -> mtgox.com -> Liberty Reserve -> bank transfers, or informal transfers via paypal (that can get flagged and frozen, though). As of yet, there are 2-3 sets of transaction fees and flat fees (bank transfers) involved when moving bitcoins into other currencies.

</comment></comment><comment><USER17> This is shameful behavior by PayPal. There is no doubt about it. If everyone with a PayPal account who cares about the unlawful, unjust treatment of Bradley Manning would simply delete their PayPal account and clearly state the reasons why they are doing so in writing, PayPal might act a bit less cowardly. Doubtful, but at some point you have to take a stand.

</comment><comment><USER18> I'm assuming they think they're ready for Anonymous this time round...

</comment><comment><USER19> By taking action against Manning, PayPal employees are supporting his continued mistreatment. Anyone who believes this to be immoral should seriously investigate the possibility of trading using Bitcoin rather than Paypal. Unlike PayPal, Bitcoin isn't a walled garden that you can be kicked out of.

</comment><comment><USER20> The site is giving me an error 403. If anyone else needs it, here's a Google cache link:

[http://webcache.googleusercontent.com/search?q=cache:http%3A...](http://webcache.googleusercontent.com/search?q=cache:http%3A//www.couragetoresist.org/x/content/view/891/1)

</comment><comment><USER21> Their root redirects to <http://www.couragetoresist.org/x/> ...which is now 403ed.

?Were they using PayPal to pay their host or something?

</comment><comment><USER22> <http://betterpal.com> is free :)

</comment><comment><USER23> Can we keep this political crap off of HN please? Yes, I've clicked flag, but that's not public. All the people commenting on this thread implicitly approve of its presence on HN - so I feel a need to state publicly that I _don't_.

<comment><USER24> Some of us entrepreneurs are working on business plans involving activists and non-profits. From our perspective, this kind of information is incredibly relevant to startup life and our architectural tradeoffs. So please stop dismissing key aspects of my business as "just politics" and telling people here they shouldn't talk about it.

<comment><USER25> Some entrepreneurs also deal in cat pictures.

<comment><USER26> And if PayPal blocked a cat picture enterprise or Google de-linked them or Yahoo purchased them, that information would be relevant to HN.</comment></comment></comment></comment>


Inside Graduate Admissions - <AUTHOR> https://www.insidehighered.com/news/2016/01/06/new-book-reveals-how-elite-phd-admissions-committees-review-candidates <comment><USER2> Interesting -- I thought the key to getting into a good PhD program was letters of recommendation, publications (not even first author), and fellowships (NSF, etc).

> a heavy focus on the GRE

I've never heard of someone getting into a program based on GRE scores... bombing the GRE is certainly a red flag, but things like recommendation letters from big names are way more important.

<comment><USER3> You are right. It is not unusual to have 20 applicants with perfect GREs, so they act more like a minimum threshold

<comment><USER4> One additional factor here - a "perfect" GRE math score, 800/800, was typically only about a 95%ile score (at least back when I took it, which was admittedly 15+ years ago).

Ok, 95%ile isn't a low score, but it's not like a "perfect" LSAT or MCAT score, which I believe indicates a 99.9%ile ranking.

This is important, because while 20 candidates with "perfect" math GRE scores definitely indicates a strong set of standardized test takers, it isn't comparable to perfect scores in other standardized exams.

<comment><USER5> Most of the time for grad admissions they use the subject GREs and almost entirely ignore the basic ones (though they require you take them). Math PhD programs don't even care about any part of the basic GRE, just the subject test, which is used exactly how the article describes.

I assume in humanities programs they give weight to the verbal/writing parts of the GRE just as a pre-filter before they examine candidates. But the quant part of the GRE is so basic (high school level, no calculus) that the difference between missing a single problem is the difference between 100 percentile and like 75 since almost everyone who is trying does unbelievably well.

<comment><USER4> very true. 20 candidates with "perfect" subject scores would be an entirely different thing from the general math GRE.

I actually think you can miss few questions and still get an 800 on the general, with the "adaptive" computer test. Not sure about that though.

</comment></comment></comment></comment></comment><comment><USER6> Lots of fascinating insight. Definitely worth a read.

"Grades are increasingly a lousy signal, especially at those elite places that just hand out the A's. So you don't even have that anymore,"

"This is an elite university and a lot of the people at the university are elitists," one professor said with a laugh. "So they make a lot of inferences about the quality of someone's work and their ability based on where they come from."

<comment><USER7> Reminiscent of [http://www.nytimes.com/2013/12/15/opinion/sunday/leaked- harv...](http://www.nytimes.com/2013/12/15/opinion/sunday/leaked-harvards- grading-rubric.html?_r=0)

<comment><USER8> That joke article is a reaction to [http://www.bostonglobe.com/metro/2013/12/03/harvard- professo...](http://www.bostonglobe.com/metro/2013/12/03/harvard-professor- raises-concerns-about-grade-inflation/McZHfRZ2RxpoP5Xvwged1N/story.html)

a 2013 article about Harvey Mansfield's war on grade inflation. What's funny is that Harvey Mansfield has been at war against grade inflation for at least 18 years, going back to his anti-Affirmative-Action debate (somehow, affirmative action caused grade inflation among the majority-white population of Harvard, according to Mansfield).

[http://nersp.nerdc.ufl.edu/~lombardi/edudocs/mansfield_grade...](http://nersp.nerdc.ufl.edu/~lombardi/edudocs/mansfield_gradeharvard_chron_2001.html)

Back in the '90s, the going theory was that _Vietnam War_ created grade inflation, as schools gave out higher grades to help students get draft deferments. Of course, that was before GWBush taught us that you can draft- dodge just fine with C grades.

</comment></comment></comment><comment><USER9> Considering the completion rate for PhD programs, admitting a broader applicant pool would likely make it worse.

<comment> daniel-levin Or better, because it is possible that the current process selects adversely.

<comment> barry-cotter If you go to Google Scholar and look up the correlation of GRE score with completion, publications and professional success it will be positive. The fact that it isn't predictive within a programme is just a reflection of range restriction, same as how Google found that GPA had no reliable relationship on job performance in the set of people they actually hired.

</comment></comment></comment><comment><USER10> Hard limits on GRE scores are reasonable.

If you can't pull at lease a 75th percentile on your subject GRE, you probably shouldn't be trying to get a PhD in it.

Personally, I got >90th percentile with a bare minimum of studying. I wouldn't be surprised if most of my classmates at the time had the same.

<comment><USER11> _If you can 't pull at lease a 75th percentile on your subject GRE, you probably shouldn't be trying to get a PhD in it._

Depends on your subject. The subject GRE for English lit, for example, is an incredible crapshoot: Much of it concerns passage identification, and if you happen to recognize that this one is from _Billy Budd_ and this one is from _Gulliver 's Travels_, great. If not, you can lose a lot of points in ways that are unlikely to reflect what lit profs are really judged by in the academic market: their ability to write peer-reviewed articles and books.

</comment></comment><comment><USER12> Depressing. I'm from Australia with a 3.0 GPA, do I have a chance to make it into any universities in California (for a Master's degree?)

<comment> barry-cotter Terminal Master's degrees are profit centres for American universities, not something on the straight and narrow track to a Ph.D. As such the entry requirements are lower than for getting into a Ph.D. programme.

</comment></comment><comment><USER3> At some point I had to stop reading. This article is absolutely imbecile, and I don't say that word lightly or to troll.

Just one example b/C on mobile:

> For instance, those whose programs were not at the very top of the rankings > frequently talked about not wanting to offer a spot to someone they believed > would go to a higher-ranked program. They didn't want their department to be > the graduate equivalent of what high school students applying to college > term a safety school. In this sense many of these departments turned down > superior candidates, some of whom might have enrolled. Many of the > professors sound insecure about their programs even though they are among > the very best

Grad school is not a job you can apply to through the year. All offers are made at the same time. If you make an offer to the best guys, what will happen is that when Harvard comes and scoops you , you will end up empty handed and had no students.

The reason is that most schools make an offer on e.g. say Feb and then there is an agreement to allow students to reply up to April 10th. So if your offers get turned down, you will have to scrap the bottom of the barrel.

Again, this article shows utter ignorance about grad school, stuff that just a call or email to any grad _student_ could have answered. Also, sorry for sounding grumpy but I don't have a problem with people being wrong; I have a problem with being wrong and being an asshole about it

<comment><USER7> might be since it's 2 am but their interpretation sounds both correct and compatible with yours. limited spots = limited number of offers, you want to give those to the best students you think will enroll in your program.

<comment><USER3> Thats the diagnosis, which is correct. The interpretation is that the price are insecure, racist (or discriminate in other way), and so on.</comment></comment></comment>


Set Bing's photo of the day as your desktop's wallpaper, Automatically – Windows - <AUTHOR> https://github.com/guptarohit/bing-wallpaper <comment><USER2> If it meets the guidelines, this might make a good 'Show HN'. Show HN guidelines: [https://news.ycombinator.com/showhn.html](https://news.ycombinator.com/showhn.html)

After years of Windows use, I'm always concerned when I see an .exe file on the internet. For a project like this, it might be better__from a marketing standpoint__to include instructions for using the Python version from source.

Good luck.

<comment><AUTHOR> Thank you very much for this suggestion, now I've updated the documentation for the same! :) Now we can run it from its source also (using python).

check [https://github.com/guptarohit/bing- wallpaper](https://github.com/guptarohit/bing-wallpaper)

Any further suggestions would be appreciated. :)</comment></comment>


Show HN: GitRecruit – Start Sourcing Candidates from GitHub - <AUTHOR> https://gitrecruit.co <comment><USER2> As a github user who gets random spam-mail from companies scraping github every few weeks - how can I ensure my profile is never offered upon your site?

<comment><AUTHOR> Let me know you github handle and I will remove it

<comment><USER2> You do need to have a process and a form for users to submit their own details. Not just adhoc requests like my own.

</comment></comment></comment><comment><USER3> The ranking is not to my taste. It ranks followers about 1000x higher than contributions.

You should call it popularity contest, not recruiter ranking. I'm not sure recruiters favor popular people over active people. It's not for recruiting politicians.

</comment><comment><USER4> "Git" is trademarked. You can't just arbitrarily use it for your own products—especially when Git plays almost no part—your service has everything to do with GitHub and essentially nothing to do with Git.

[https://public- inbox.org/git/20170202022655.2jwvudhvo4hmueaw...](https://public- firstname.lastname@example.com/t/#u)

<comment><USER5> then github, gitlab, and others would also be in violation. if you read the information in your own link, they (Git and Github) are ok with other trademarks existing, which this would fall into. Particularly because it's not attempting in any way to imply it has any Git features. Thanks for the link though, good to know.

<comment><USER4> > if you read the information in your own link

I'm intimately familiar with the policy outlined in that message. I suggest you reread it. It doesn't suggest any of the things that you say it does.</comment></comment></comment>


Tips on Understanding a New Codebase - <AUTHOR> https://ruairidh.dev/understand-a-new-codebase/ <comment><AUTHOR> I wrote a quick blog post over the weekend on my approach for understanding a new codebase as it's a position we've all been in.

I saw a thread about this the other day and wanted to hear from more people on how they do this!</comment>


Basics of Futexes - <AUTHOR> https://eli.thegreenplace.net/2018/basics-of-futexes/ <comment><USER2> An important part of futexes, which the article mentions only in passing, is that the kernel will also check a condition atomically with the wait operation; if the condition isn't satisfied the wait will not be performed. This avoids races between a thread that unlocks the mutex right after another thread has invoked the system call.

Effectively, inside the kernel the algorithm is

        lock wait queue
        if (*var == val)
           add myself to wait queue
           unlock wait queue
           wait until queue wakes me up
        else
           unlock wait queue

<comment><USER3> Thanks for mentioning this, it's indeed one of the interesting subtleties of futex().

In my defense, I explicitly say in the post that it's not a replacement for the man page and suggest the readers at least go through the descriptions of FUTEX_WAIT and FUTEX_WAKE. The former explains this behavior in the very first sentence.

Moreover, the post mentions this behavior twice:

1\. When explaining spurious wakeups in the wait_on_futex_value

      [...] FUTEX_WAIT will immediately return if the
      value at the futex address is not equal to val. In our case this can
      happen if the child issued a wait before the parent wrote 0xA, for
      example.

2\. In a comment inside Mutex::lock()

       // We're here when either:
       // (a) the mutex was in fact unlocked (by an intervening thread).

But your point on avoiding an insidious deadlock is spot on.

<comment><USER2> Indeed it is mentioned. I wrote the comment because repeating the check in the kernel _on a user provided value_ is what distinguishes futexes from a condvar. Of course muted+condvar+int is not a replacement if you're implementing pthreads, but it's also much less efficient than futexes if you're implementing a synchronization primitive not provided by pthreads.

(The most common use of futexes that I have seen outside glibc is to implement binary semaphores. Binary semaphores can be a lighter-weight alternative to condition variables when only a single thread can ever wait on an event).

<comment><USER4> In my experience futexes are primarily used to confound valgrind. Damn you libgomp (yeah I know you can recompile gcc to use pthreads in the openmp implementation).

</comment></comment></comment></comment><comment><USER5> Here's the original implementation of that idea, from the early 1970s.[1] UNIVAC EXEC 8 had this. See section 4.3.4, page 148, "Test and Set Queuing".

This OS had threads, decades before UNIX got them. They were called "activities". These were also multiprocessor systems. So it had to have user code synchronization. The UNIVAC mainframes had a "test and set" instruction. This was an atomic operation which set a flag. If the flag was already set, an interrupt occurred, so the OS could reschedule.

This could be used in a spin mode, where hitting a locked lock just rescheduled the activity for later. Or the user could give their threads IDs and manage them with system calls, like UNIX pthreads. The third option, test and set queuing, was added later. There was a list of activities in user space associated with each lock, and when a activity was blocked, it went on the user space queue for that lock. The "clear test and set" operation was an assembly language macro, which took the first waiting activity off the list and told the OS to unblock it.

The normal case of taking the lock without delay did not involve the OS at all. Even pthreads works that way in some implementations, as it should.

[1] [http://bitsavers.trailing- edge.com/pdf/univac/1100/exec/UP-4...](http://bitsavers.trailing- edge.com/pdf/univac/1100/exec/UP-4144.23_R36r2_Executive_System_Vol_2_Jan80.pdf)

</comment><comment> Iwan-Zotow It might be worth mentioning that MS Windows has very similar (though somewhat distinctive) function WaitOnAddress [https://docs.microsoft.com/en- us/windows/desktop/api/synchap...](https://docs.microsoft.com/en- us/windows/desktop/api/synchapi/nf-synchapi-waitonaddress) , introduced in Server 2012 and Windows 8. See for details [https://blogs.msdn.microsoft.com/oldnewthing/20170601-00/?p=...](https://blogs.msdn.microsoft.com/oldnewthing/20170601-00/?p=96265)

</comment><comment><USER6> One thing important to remember about futex is that it is not a lock, despite its name similar to mutex. Futex is a conditional sleep mechanism. The kernel wakes up the caller when the futex flag's state changes. When awaken and returns from the futux() call, you don't get the lock. It just means the state of the lock has changed and it's time to check and attempt to acquire the lock again. Actually multiple threads sleeping on the futex flag can be awaken at the same time (depending on the FUTEX_WAKE command's parameter). All of them need to do compare-and-set to acquire the lock.

<comment><USER7> >"When awaken and returns from the futux() call, you don't get the lock.

Can you elaborate on this? That sentence isn't reading well for me.

>"Actually multiple threads sleeping on the futex flag can be awaken at the same time (depending on the FUTEX_WAKE command's parameter). All of them need to do compare-and-set to acquire the lock."

So whatever thread kernel schedules first will get the lock? I.e there is no fairness or weighting? Does this potentially cause a "thundering heard" when they're awakened at the same time?

<comment><USER6> Essentially to implement a lock in the user mode, you do:

        while !compare_and_swap(&flag,0,1) // check if flag is free (0), lock it (1)
            futex_wait(&flag,0)            // sleep until flag changes

When futex_wait() returns, it just means the flag has been set back to 0 and the kernel wakes me up so I can check on it again. Another thread can come in and grab the lock in the meantime. That's why I need to loop back to check again. The atomic CAS operation is the one doing the lock.

In the old days, it's just a busy loop running the CAS check continually which is expensive.

        while !compare_and_swap(&flag, 0, 1)
            // busy loop running

With futex(), the lock-acquiring threads can go to sleep and waking up with the help of the kernel.

Yes, multiple threads can be wakened up, the nr_wake parameter in futex_wake [1] dictates how many threads to wake up. Yes, you can get a "thundering herd" problem. For fairness, see priority usage in my other comment [https://news.ycombinator.com/item?id=17526849](https://news.ycombinator.com/item?id=17526849)

[1] [https://elixir.bootlin.com/linux/v4.18-rc4/source/kernel/fut...](https://elixir.bootlin.com/linux/v4.18-rc4/source/kernel/futex.c#L1515)

<comment><USER7> Thanks for clarification and the examples. This makes sense. Cheers.

</comment></comment></comment></comment><comment><USER8> Nice! I have fond memories of studying the mechanics of futexes when PREEMPT_RT was under heavy development.

It's been a long time since I thought about the kernel futex implementation, but IIRC, one of the most interesting aspects was that the kernel would actually navigate a linked list that existed entirely in userspace. I believe this was called, or related to, robust futexes [0].

[0]: [https://www.kernel.org/doc/Documentation/robust- futexes.txt](https://www.kernel.org/doc/Documentation/robust-futexes.txt)

</comment><comment><USER9> Does anyone know how "fair" the current Linux implementation of futexes is? I experimented with them soon after they were introduced, and at that time there was a great deal of favoritism: under heavy contention a thread/core that had just given up a lock was most likely to reclaim it, and other threads/cores would be starved. This isn't always a bad thing (and can sometimes even help performance) but didn't work well for my application.

<comment><USER6> Most of the check to acquire the lock happens in user mode. It would favors the thread in RUNNING state that still has quantum left. For example, if a thread is running, has the lock, does its work, releases the lock (which wakes up other sleeping threads but they are in RUNNABLE state not RUNNING yet), and the running thread immediately loops back to acquire the lock again, it would succeed because the lock is free. When that running thread's quantum runs out and put to sleep (still holding the lock), the other awaken threads runs but the lock is not free so they promptly go back to sleep to wait for the lock. The old running thread wakes up and continues the cycle.

If you want fairer lock acquisition, you need to use locking priority. Just lower the running thread's priority when it finishes its work. The other sleeping threads with higher priority will have a chance to get the lock.

<comment><USER10> > Just lower the running thread's priority when it finishes its work. The > other sleeping threads with higher priority will have a chance to get the > lock.

What happens if immediately after the running thread lowers its priority priority it is descheduled? Is it still holding the lock at that point? Could it remain descheduled at low priority for a relatively long time while the other threads wake up and fail to acquire the lock (and also while any other unrelated threads go about their unlowered-priority business)?

Why wouldn't the workless thread just give up the lock (and possibly self- deschedule) when it has finished its work? If it is then assigned more work it would have to be scheduled and when running again contend for the lock, which is presumably what one wants, right?

<comment><USER6> You would release the lock first before lowering the priority.

As a separate issue, the priority inversion problem is addressed with the priority inheritance technique, which futex supports directly. Basically the priority of the thread holding the lock is boosted to the highest priority of all the threads sleeping at the lock, making sure it can run to completion. When the lock is released, the thread's priority is lowered back to its original level. All the xx_pi() APIs are the priority inheritance versions.

There are a number of ways to ensure fairness for lock acquisition; however, performance often suffers, so people just live with the problem and design the workload around it.

</comment></comment></comment></comment><comment><USER7> At the end of the piece the author states:

>"The Go runtime does not use libc, in most cases ..."

Can someone say in which cases does the Go runtime elect to use libc?

<comment><USER11> If and when/depends on some env vars and also compile time options. Basically it mostly uses libc for some network operations like hostname resolution, and a few other things like user/group resolution. However it defaults to the Pure go implementations by default for most things if possible.</comment></comment>


Small application to share "what you love most" - <AUTHOR> http://motyar.info/love/

<comment><AUTHOR> The background image comes from Google search. Example <http://motyar.info/love/people></comment>