Ask HN: I am in a David vs. Goliath fight and I need some advice - <AUTHOR>

I participated in the GE FlightQuest competition hosted by Kaggle.com. I had the 4th best score, but because of what other competitors and myself view as a software bug on Kaggle.com's platform [1], I was not recognized as a winner when GE and Kaggle announced the prize winners. For reference, the 4th place prize winner would have earned 30,000 USD.
I notified Kaggle.com within ~1hr of their announcement of the mistake and they did not get back with me for 2 days. 8 days after the announcement was made I was finally able to get a call with a Kaggle executive. The executive offered me partial prize money and kaggle competition points to resolve the matter unofficially. I said I wasn't interested. Kaggle then opened a new forum discussion [1] which a number of other competitors chime in and explain the limitations/bugs of the Kaggle.com platform specifically as it related to the FlightQuest competition and discuss my specific situation.
Finally, an executive from GE contacted me this morning over email and let me know that he supports Kaggle.com's decision of not recognizing me as the 4th place finisher.
I feel like Kaggle/GE have not handled this properly and I would like to get some opinions on what, if anything I should do.
[1] https://www.gequest.com/c/flight/forums/t/4284/acknowledging-two-more-great-competitors <comment><USER3> Get a lawyer is the best advice you'll get -- just like every other time someone Asks HN what to do with (potential) legal matters. Apparently, most lawyers will do some sort of initial consult for free. Also, might be a good idea to delete this post ASAP, if you're seriously considering legal action.

<comment><AUTHOR> I have not consulted a lawyer yet, the reason being the competition rules state the following:

"By participating in the Competition, each Entrant agrees to release, indemnify and hold harmless GE, Kaggle Inc., and their respective affiliates, subsidiaries, advertising and promotions agencies, as applicable, and each of their respective agents, representatives, officers, directors, shareholders, and employees from and against any injuries, losses, damages, claims, actions and any liability of any kind resulting from or arising out of your participation in or association with the Competition. GE is not responsible for any miscommunications such as technical failures related to computer, telephone, cable, and unavailable network or server connections, related technical failures, or other failures related to hardware, software or virus, or incomplete, late or misdirected Entries. GE reserves the right to cancel, modify or suspend the Competition should any computer virus, bug or other technical difficulty or other causes beyond the control of GE corrupt the administration, security or proper play of the Competition, and to determine winners from among Entries not affected by the corruption, if any, in its sole discretion."

I interpret that as saying: GE can pick the winners using its sole discretion. So I don't believe this is a legal issue I can win. I have a lawyer in the family, I will run it by her and see what her opinion is.

<comment><USER4> Please, get a lawyer outside the family with experience of competition law - maybe your sister/aunt can tell you the area of law that might apply and point to some local firms

You need objective advice, not coloured by "what if my advi e leads to not speaking to half the family" - don't put that on her.

Secondly, consult a lawyer because they have - if according to the common- sense rules you should get 30k (and I don't at all understand the situation) then no amount of disclaimers or indemnification deprives you - statute on competitions run for marketing purposes are widespread.

Maybe you have a case, maybe not, but without a lawyer you won't know and without a lawyer they (GE?Kaggle) won't take you seriously - which kind of screws the only other reason you seem to have for not getting a lawyer - <USER2> idea that maybe you will pick up some work later on. If they see you as a push over on this, why will they respect you next time?

This does not mean drop a writ for 10 million in the morning - get advice, if there is a case, ask if the lawyer can directly contact the organisers lawyers for clarification or discovery. If you have a case they will have to do something - push now, so that their decision has not been set in concrete and them moved on.

</comment></comment></comment><comment><AUTHOR> Also, does anyone else have a problem with Kaggle offering money and points for resolving the matter unofficially?

When the offer was made, I was really surprised because it seemed unethical and unfair - both the the other competitors as well as the sponsor.

Just curious what other, non-Kaggle competitor opinions are on this topic.

<comment><USER5> You have a dispute with them. They're running a business and want the dispute (and you) to go away. Eventually, you will go away, either because you gave up or lost in court; or because they paid you to do so. If you're ethically entitled to compensation, this is a perfectly decent thing for them to do.

</comment></comment><comment><USER6> tl;dr: contestant submitted 23 entries to a contest, rules state you have to select one for official calculation of your score, contestant changed his mind a few times and ultimately selected an entry that did not have enough points to win despite having another entry that did have enough points.

\--

In reading Anthony response, this seems less about a "bug" but more about you not being happy with the results and blaming the complexity of the submission and selection process.

This part of his response seems fairly clear:

"The submission page stated: "Note: You can select up to 1 submission that will be used to calculate your final leaderboard score. If you do not select them, up to 1 entry will be chosen for you based on your most recent submissions. Your final score will not be based on the same exact subset data as the public leaderboard, but rather a different private data subset of your full submission. Your public score is only a rough indication of what your final score might be. You should choose an entry that will most likely be best overall, and not necessarily just on the public subset."

During the course of the competition, you made 23 submissions of which 3 were selected for leaderboard scoring. First you selected submission 242748 on January 7, 2013 (all times UTC). You unselected that submission on January 24, 2013 and selected submission 250852. You unselected that submission on January 26, 2013 and selected submission 252143. You did not revise that selection at the time of your final submission. It seems logical to conclude that you understood the process of selecting submissions. Three of the other winners selected their final submission for scoring. The two that did not select the final submission had not previously made a manual selection or had unchecked prior submissions and the software worked as designed and selected the final submission. One participant (but not a winner) made 3 final submissions and selected one for scoring - which was the case the software for selecting a response was intended to handle. There was no bug in the software. "

While unfortunate for you, it is worth noting that all of the competitors had to follow the same set of submission guidelines to be considered. Your response becomes a debate on how you "feel" the submission process should work, as opposed to indicating a "bug" in the software.

"What on earth is a checkbox doing on the submission screen of a two phase competition? There is no ambiguity - there is only a single _file type_ that is valid for the final leaderboard file. Why on earth is your software not smart enough to figure that out?

Also - why didn't the default selection logic kick in? Because only final leaderboard files are valid for the final submission, why didn't your software pick the _only_ valid option?"

<comment><AUTHOR> That is a good summary, but it is a little bit more complex than what you have stated. But your comment is helpful because this is exactly the understanding that Goldbloom has and it is incorrect in an important way.

The 23 entries that were submitted are for the public leaderboard set. The purpose of this set is so over the duration of the competition, competitors can see how they are performing relative to each other. These 23 submissions have no impact on the final prize winners.

A different data set, called the final data set is what actually determines the final prize winners. I submitted this file exactly one time. It was processed and scored by Kaggle and I followed the directions exactly as the competition admin stated. I did not check a checkbox because I did not believe it applied - I only submitted a single file and I recieved the 'all zeros' response from Kaggle's system as it said it would.

Also, the text Anthony quoted is not applicable to the Flight Quest competition either. This is the text that is used for the single phase competitions, not a two phase competition like Flight Quest.

If you haven't competed before I know the difference might not be clear. But if you read the response from the other competitors in the forum, you can see there is general agreement that the submission page is faulty for a two phase competition.

<comment><USER6> Thanks for your reply and clarification.

1\. So your stance is that Anthony, the CEO and Founder of Kaggle, is mistaken about the rules and execution of the 2 phase competition that his company is running, even after 8 days of his company communicating back and forth in email correspondence with you?

2\. In the forum you initially state:

"As I have been saying over email repeatedly over the past 8 days, and yesterday on the phone with you and the Sorkin, there is no checkbox to check!"

..then later state:

"What on earth is a checkbox doing on the submission screen of a two phase competition? There is no ambiguity - there is only a single _file type_ that is valid for the final leaderboard file. Why on earth is your software not smart enough to figure that out?"

and later:

"I submitted exactly one final submission. At this point the checkboxes should not matter"

and in your reply above state:

"I did not check a checkbox because I did not believe it applied"

While I'm not familiar with all of the intricacies of the competition, conflicting statements like those have me a bit confused over this whole thing.

3\. $30k is a lot of money, so I sympathize with you for missing out on that given that your algorithm is better than what the final results suggest. That being said, the other entrants that won competed using the same submission process that you did, was it just bad luck that your entry was not accepted in the manner you had expected or why did they not also encounter this submission bug?

4\. Is this your first two phase competition with Kaggle? Was this competition executed different than other competitions? I ask as you seem surprised/confused about this "checkbox" that appears to be at the center of the controversy.

<comment><AUTHOR> Thank you for reading the forum trying to better understand my POV.

re: #1. Yes, my stance with Anthony is that he doesn't think there is a bug in the software because he thinks this is a typical one phase competition. Flight Quest was more complicated than the typical Kaggle competition.

re: #2. I have done a poor job explaining the checkbox. I understand the confusion, as my statements are contradictory. In a single phase competition, the checkbox is important because over the course of the competition, numerous submissions are scored and you ultimately need to pick the one you want to apply as your final submission. In the case you do not make a final selection, the system selects the most recent submission.

The same UI is used for the two phase competition, including the same text that Anthony posted in his response to me, however the submissions work slightly differently as I mentioned.

> "As I have been saying over email repeatedly over the past 8 days, and > yesterday on the phone with you and the Sorkin, there is no checkbox to > check!"

I said this because I don't believe there should have been a checkbox on the screen. That is what I meant by saying there is no checkbox to check.

</comment></comment></comment></comment><comment><USER7> IANAL but here's what I think an attorney who took the time to look the whole thing over would say:

The language in the contract (that you posted) seems pretty cut and dried, but I don't know whether that's actually going to hold up in a court of law. You entered a contest expecting the contest holders to hold the contest correctly. When the flaw was exposed, they did not honor it. That means your work was in vain. That's not in the spirit of the contest, thus the written words are only part of the story. A reasonable person expects that the company running the contest does so fairly. You seem to have not been treated fairly thus I think you have a case. I would imagine that, if you posted up a $500,000 lawsuit with $30,000 of reward and $470,000 of punitive damages, you'd hear from a different GE exec who has a very different POV.

<comment><USER4> In the UK at least there are quite stringent rules on how you can run a competition - give away a car? Abide by the rules.

<comment><AUTHOR> I did not realize this might be a gray area.

I will do some research on how I can find some representation. Any tips, or experience with who I might get in contact with? Am I looking for some sort of technology or competition specialist?

<comment><USER4> [http://www.socialmediaexaminer.com/social-media- promotions-a...](http://www.socialmediaexaminer.com/social-media-promotions- and-the-law-what-you-need-to-know/)

I suggest you google for lawyer sweepstake New York

And lawyer contest law New York - talk to a couple till you get a feel for it. It about exploring your options not going to court tomorrow, so the gung-ho ones might not be best. But that's a Brit talking :-)

</comment></comment></comment></comment><comment><USER8> Sounds like they tried to mitigate the situation in a reasonable manner. If they name you as fourth, then the formerly fourth place finisher gets upset.

Some things are like futbol - there's no instant replay. Lawyering up isn't going to impress anyone.

<comment><AUTHOR> I get the instant replay analogy, but I have a problem with a bug in their software impacting the results of the competition. I work in software, so I get living with bugs and understanding they are always going to be there. But I am unhappy that Kaggle/GE announced the winners via press release at the same the rest of the competition field was notified. It makes it impossible for a competitor to dispute the final results.

From the response I have received from Kaggle/GE I get the impression, under no circumstances what so ever would they go back and change the published results of this competition.

<comment><USER8> > _"It makes it impossible for a competitor to dispute the final results."_

Yes. That's the purpose.

The teleology of gamified competition is toward declaring a winner. The rules are structured with that in mind. Those rules are different from the marketplace where protesting and litigation are allowed and consequently, declared winners are simply a matter of opinion, not fact.

Accepting mistakes as part of the game is sportsmanship. And it was a game. Best to move on to the next one: <http://www.kaggle.com/competitions>

<comment><AUTHOR> >'... declared winners are simply a matter of opinion, not fact'

I certainly agree with that part of your statement.

I have a hard time thinking about moving on to a new competition, this one has left such a bad taste in my mouth. Maybe time will change my mind, but certainly not happening any time soon.

<comment><USER8> I understand where you are coming from.

A bit of my background - I referee futbol (or as we call it, soccer). Every game, I try to give my best performance to the players. Sometimes, I make bad calls. The score is still the score.

Obviously, you're pretty damn good. Your competitors deserve to compete against you. Cheating is unfair. Mistakes aren't. Play long enough and it all evens out. At least statistically.

Good luck.

</comment></comment></comment></comment></comment><comment><USER9> If you are interested in working with/through Kaggle on a longer-term basis, finding some solution outside of a lawsuit would be something to think about. You are getting a chance to interact with them and maybe build contacts that could be useful down the road. If the offer was insulting and/or you don't want to work with them down the road, that is another matter. When you start bringing in lawyers on both sides it becomes an entirely different matter than what it "right". It becomes a costly legalese/terms/courtroom issue. Good luck either way.

<comment><AUTHOR> Ironically, that has been the best part about this ordeal - a number of the top competitors have shown support through the forum as well as private emails. I compete alone, so this issue has given me the opportunity to get to know some of the other folks.

I am not certain I want to work on anymore Kaggle competitions. I put (just a guess) somewhere between 100 and 200 hours into FlightQuest. It is hard for me to rationalize putting this amount of effort into another Kaggle hosted competition after going through the experiences I went through for this competition.</comment></comment>


Threema - Seriously secure mobile messaging - <AUTHOR> http://threema.ch/en/

<comment><AUTHOR> I'd never seen Threema before yesterday, but they just released an Android app and it's really well done! Great UIs on both platforms, nice security model, and very granular message status including "acknowledged" which is a great idea.</comment>


To fight terrorism, Home Office (UK) plans to spy on toddlers - <AUTHOR> http://www.telegraph.co.uk/news/uknews/terrorism-in-the-uk/11323558/Anti-terror-plan-to-spy-on-toddlers-is-heavy-handed.html

<comment><USER2> Aren't you rather implying that they don't spy on everybody already?</comment>


Ask HN: Is spending a year learning from MOOCs a good plan? - <AUTHOR> TL;DR: Is spending a year immediately after college learning MOOCs to discover what niche to specialize in computing a generally good idea?
Hi guys,
A little background. I am about to graduate from a university in 3 months with a Computer Science degree and am already experiencing pains trying to decide what to do next. I generally did well in all the disciplines, from Operating Systems to Security to AI and so on. But since you don't delve deeply into any topics while at university, I am left confused in what I would actually like to specialize in later on.
Currently, I work for my university developing their app, and have good skills in front-end in general. However, there seems to be a lot more interesting niches out there such as data science, robotics, embedded programming.
But before I make full jump into any of these new areas, I would like to test them all out and get a better feeling of what I might like doing best for the next decade or so.
Do you think spending a year learning from MOOCs, creating own personal projects is a good idea? Or would it perhaps be better to find work immediately, or find some really good internships? The problem with finding work is that with my current skills I am not confident I would be able to get the job in the niche I might want to try out. This is essentially what the year would be spent on, researching different niches, trying out some personal projects and then pursuing the needed skills to get a job in the niche that really catches my interest.
Any input is highly appreciated! How did you find your own niche to specialize in? How would you go about jobs hunting or getting relevant experience in this situation? <comment><USER2> If you want to work in the commercial world, get a job - you have a lot of (practical) skills to develop, and people will wonder why you needed _another_ year of coursework before starting work. Consider aiming for a job at a company that's good at an interesting niche, and note that new grads _can_ get hired into many niches. There _is_ such a thing as a junior data scientist, junior security expert, ...! (And there's also such a thing as a web developer working at a robotics company - such a web developer could easily dip a toe into robotics.)

It's not necessarily a bad idea to play around with MOOCs to take a look at other skills while working at your job, but if a university course wasn't enough to make up your mind a MOOC won't be either.

(In general, a thesis or internship is a good way to look deeply into a specific niche. But if you're three months from graduating, I don't think that advice will help you...)

<comment><AUTHOR> Yeah, you are right about the 'junior' part, I shall definitely try looking for such jobs.

In regards to thesis, I did what I thought would be interesting and it was. But essentially it was creating a product to solve real client's problem which I have done in the past as a freelancer. In hindsight, I should have probably chosen something related to these other niches, would have been a perfect opportunity.

</comment></comment><comment><USER3> {Random advice from the internet}

More schooling will teach more of the sort of things that are taught in school. A job will teach the sort of things that are taught on a job.

If the priority is learning more of the things that are taught in school, get a graduate degree. There is nothing to keep a person from spending time on MOOC's while working. A lot of people do.

Work is not like school, most new grads will learn a lot really fast because the learning is by doing alongside other people with more experience in a culture with a great deal of institutional experience in the thing that is being done.

To put it another way, if there's some really interesting MOOC, take it now.

Good luck.

<comment><AUTHOR> Thanks brudgers. What I take from this is that you will learn a lot more in a job which I know and totally agree on. Thus if you can get such job, for example in a junior role where it is expected that you don't know everything and will have to learn a lot, take it. Meanwhile, a MOOC won't hurt but it's not the same as an actual job, just like school.

<comment><USER3> Mooc's are easier to blow off than school. And less structured. And don't provide a widely recognized credentials.

I'll go further than I did before. If there's something interesting, just start learning it now: graduated or not, offered in a MOOC or not, working a job or getting a grad degreee. It doesn't matter.

</comment></comment></comment><comment><USER4> Why not ask professors at your university for opportunities on campus to do research in the fields you're interested in? This would be infinitely better than only doing MOOCs on your own (which you can also do on the side) because you are 1) receiving guidance from professors and/or grad students, 2) possibly getting paid, 3) have something concrete to put on your resume.

The thing with doing MOOCs on your own is it seems easy to get lazy and end up wasting a lot of time with nothing to show on your resume.

<comment><AUTHOR> Appreciate your idea! I could do that but I don't want to be stuck in the academic environment any longer than needed anymore.

And agreed about the MOOCs, while they are valuable, there might be even more valuable things you could be doing or ways in which you could be developing your skills.

</comment></comment><comment><USER5> Here's what you do. Find a couple companies you want to work for. Find folks who work there on twitter/irc/github.

Email them and say "I'd love to work at your company in a year, what can I do to prepare".

They'll tell you. You do want to get a job, be it contracting or something, so you have some professional experience.

But the main thing is you learn what you need to learn, you figure out if you need some github contributions, moocs, read a books, etc.

<comment><AUTHOR> That's a real good advice right here! So in summary, decide what you want to do, find someone who does it, ask them how to get where he/she is. Even if it's not the same company, you will still get a similar job if you follow person's advice.</comment></comment>


Quantum attacks against all of the SHA-3 submissions - <AUTHOR> http://cr.yp.to/hash/quantumsha3-20101112.pdf

<comment><AUTHOR> In brief, a quantum computer of ~10000 qubits running Grover's algorithm can find a structured preimage in expected time O(2^(N/2)), which breaks the security claims of 11 of the candidates, who claim no attack better than brute force is possible (which is O(2^N)).

Of the other three, 2 make no explicit claim, and only one explicitly states the quantum attack.

That said, O(2^(N/2)) on N of 224 bits is still O(2^112) operations on a quantum computer several orders of magnitude larger than those we have already, so the problem here is an inaccurate claim of security by the submissions, not a practical attack. (2^112 is a million computers, working at one operation per nanosecond, running for 164646653302 years, but attacks do only get better...)</comment>


Project Cybersyn (2016) - <AUTHOR> https://99percentinvisible.org/episode/project-cybersyn/ <comment><USER2> If people are wondering why this was posted today, 9/11/1973 is the date of the US-supported coup of the democratically-elected government of Chile.

<comment><USER3> Then US has the audacity to whine about their own 9/11 while completely forgetting what they did to other countries.

<comment><AUTHOR> Both were wrong. And this is not the only misdeed sponsored by the US government. It's just one of many.

<comment><USER3> Yes of course but you cannot play the victim game when it's your own actions leading to that moment.

<comment><AUTHOR> It was still a terror attack where people who were not involved with the government decisions in question were killed.

The people can't be held accountable for actions of individuals in their government.

</comment></comment></comment></comment></comment><comment><USER4> If you're interested in Project Cybersyn, maybe you should read into Paul Cockshott's proposals and book: Towards a New Socialism, were he explains exactly why and how computers should be used in the planning of the economy. Paul Cockshott has a PhD in CS and a BA in Economics. Really great stuff, I'm sure it'll shape the economics of the future, when we get over this nonsense.

<comment><USER4> Here's the link: [http://ricardo.ecn.wfu.edu/~cottrell/socialism_book/new_soci...](http://ricardo.ecn.wfu.edu/~cottrell/socialism_book/new_socialism.pdf)</comment></comment>


What technologies one should learn to become mature in cryptocurrency - <AUTHOR> https://bitcoin.stackexchange.com/questions/54837/what-technologies-one-should-learn-to-become-mature-in-cryptocurrency <comment><USER2> Read the API docs.</comment>


Speed up your eclipse as a super fast IDE - <AUTHOR> http://www.beyondlinux.com/blog/?p=93

<comment><USER2> I love Eclipse for Java, but it seems absurd that this page even exists in the first place. I'm OK with a long startup time, but the amount of finagling I had to do in order to get the Android environment to run without hiccuping every 5 minutes is pretty ridiculous. You'd think desktop Java would move to, oh, I don't know, a model where you don't have to set the heap size like we did in Mac OS 7? It just seems archaic to sit there and try to reason how much heap space we'd _possibly_ use ahead of time.

I don't want to care about that, and shouldn't have to.

</comment><comment><USER3> Anyone using Eclipse can confirm that? I've moved away from that IDE for years because how slow it was. (Also because it was so damn hard to configure it the way I wanted)

I remember though putting somewhat similar in my config file.

<comment><USER4> I'm running Eclipse on Ubuntu (x64) on OpenJDK and it works fine. My hardware isn't particularly fast either. I might reboot one a week or so. I do have 8GB of memory though.

<comment><USER5> For some reason, on Ubuntu x86, Eclipse is really slow for me.

IntelliJ Idea is much better. And now the community edition comes with capabilities for Android projects.

I recommend it instead of Eclipse.

<comment><USER6> What JVM you are running? See <http://news.ycombinator.com/item?id=2694965>

</comment></comment></comment></comment><comment><USER7> Reduce in start time does not automatically mean your IDE will work faster.

</comment><comment><USER8> As for moving jdk instal to ramdisk, on can (ab)use the fact that in Debian/Ubuntu /usr/lib/jvm/java-6-sun is a symbolic link to /usr/lib/jvm/java-6-sun-${version}/

So create a tmpfs and mount it under /usr/lib/jvm/java-6-sun

        sudo mount -t tmpfs -o size=200M,nr_inodes=2k,mode=0775,noatime,nodiratime tmpfs /usr/lib/jvm/java-6-sun
        cd /usr/lib/jvm/java-6-sun
        cp -a /usr/lib/jvm/java-6-sun-${version}/* .

Done. Of course, if you have more than one jdk installed, update-alternatives may be necessary

</comment><comment><USER9> Short version: Buy an SSD.

</comment><comment><AUTHOR> On my Aspire 4745G laptop with 4g ram windows 7 x64, it is fairy slow to run eclipse x64 with jdk x64. So I adjusted the vm arguments and some eclipse setting mentioned above, and found it runs super fast after the change.

If it works or does not work on your machine, or any other smart way to speed up your eclipse, pls let me know.

</comment><comment><USER10> Gads, its unfortunate that the site hosting this article is so filled with spammy ads -- the full screen intro is acceptable, but the full screen popup is not, and having both is just nuts. I like _not_ using adblock, so site can get some impression revenue, but sites like this continue to make me think adblock is needed.

</comment><comment><USER11> I can't seem to find an 'eclipse.ini' file on my system at all. I had eclipse sts and zend studio both installed (both based on eclipse) but "locate eclipse.ini" nets me nothing. Perhaps it's config.ini? Or somewhere else these recommended changes should be made?

<comment><USER12> sts and zend rename it to something *.ini

</comment></comment><comment><USER13> I couldn't get it to work with the -Xmn128m argument. It wouldn't startup with it in, without it certainly does speed up the startup time.

<comment><AUTHOR> curious what's your jdk and eclipse version is ?

</comment></comment><comment><USER14> or use vim

<comment><USER15> I use vim for everything but Java. When it's Java time, I use Eclipse. In fact, if every language worked as well in Eclipse as Java does, I'd probably use Eclipse for everything (like I used to). The productivity gains you get from using Eclipse for Java vs a text editor (vim) are HUGE. This is not a fault of vim, it's a fault of Java for being so verbose.

Example: you can move a method to a new class in Java, and Eclipse will go through your entire project and find all references to that method and update them for you.

I guess it's the same reason C# and MS coders love Visual Studio so much.

That said, I try to avoid using Java, and generally stick to vim.

<comment><USER16> But wouldn't you apply some of those refactorings in other languages too? Movings methods, refactoring out inner classes, removing/adding parameters to methods and constructors etc. It all adds up if the language has good support in your IDE.

I'm not a power user of vim, but perhaps there are some kind of extensions for some of these things there?

<comment><USER17> I wish there was be something, actually, that would match what you can do with the Eclipse/Java combo for other languages.

Eclipse turns java into a ctrl-space fest. People yell at java for being verbose and statically typed, but all this verbosity is what allows an IDE such as Eclipse to exist. Just press ctrl+space and the verbosity turns into clarity and speed for both the programmer and the IDE.

I have more than a million lines of codes behind me since I learned how to program, 4 years ago. That's 250 thousand lines of working code per year, and I didn't even code more than half-time in java, and I can't type faster than 40wpm. I'm not advocating quantity vs quality, just saying that quantity becomes a completely irrelevant measure when you use Eclipse & Java, and that's very refreshing; you can keep coding long, dumb, and not performance- critical code while you think about another more important/complex section of your project, participate to a meeting, discuss stuff on the phone - you just set sail and let Eclipse do the hard rowing for you.

As for refactoring - delete a class named MyClass with a doStuff() method in a project, create a new interface MyClass with a doStuff() method in another project and another package, add this project as a dependency to the first project, select the first project, press ctrl+shift+O, et voila, every file was fixed, and it simply works within a few seconds even if there are a thousand sources referencing that MyClass. I'm not sure if there's any language/IDE that allows that sort of fast & furious refactor, but do tell!

What are other great IDE/language combos?

<comment><USER18> Other combos? Prehaps Visual Studio for C# with ReSharper. It even gives suggestions about folding loops into LINQ statements and simillar.

What I'm really disappointed is abysmal quality of IDEs for dynamic languages (Python and JavaScript for example). I know that's because of the language design, but writing code in those languages after coming from Java/Eclipse or VS2010/C# feels like I'm crippled.

<comment><USER17> Unity3d has its own javascript-like language and introduced the keyword #pragma-strict - it enforces static typing within a script. I imagine an IDE could make good use of such toggle, for the best of both worlds.

[http://unity3d.com/support/documentation/ScriptReference/ind...](http://unity3d.com/support/documentation/ScriptReference/index.Performance_Optimization.html)

</comment></comment></comment></comment></comment></comment><comment><USER19> The best recommendation is to make sure you're using the Sun JDK and not the GCC-GCJ. That alone will constitute a large speed up. I imagine the ram disk will give basic speed-up. Can't attest to the others though, Eclipse runs more than fast enough here.

<comment><USER20> How does the Sun JDK significantly outperform the GCC-GCJ?

<comment><USER21> What do you mean by this? The gcj JIT is shit compared to the jdk, that's how.

</comment></comment></comment><comment><USER22> From what I can tell, this only speeds up Eclipse' ridiculous start-up time, or am I wrong? This doe~ _freeze_ ~sn't me~ _freeze_ ~an that the IDE it~ _freeze_ ~self will bec~ _freeze_ ~ome smooth.

<comment><USER8> If it speeds class loading __and __reduces GC times it should freeze less, as well

</comment></comment><comment><USER23> Some nasty script on this page crashes firefox.</comment>


Ask HN: I love Nethack. Are there other great terminal games? - <AUTHOR> For bonus points, post your favorite Nethack hack!<p>Example: Polymorph into a Xorn for easy shoplifting. <comment><USER2> <http://www.catb.org/~esr/ski/>

Ski is a super addictive SkiFree-like game for Terminal.

</comment><comment><USER3> The SLASHEM variant of Nethack has a lot of added awesomeness - rolling a Doppelganger monk is particularly rockin'.

</comment><comment><USER4> people seem to like dwarf fortress (<http://www.bay12games.com/dwarves/>). I do not get it, though.

</comment><comment><USER5> We should write some...

</comment><comment><USER6> hunt the wumpus ;)

the infocom stuff.

hhgttg and others.</comment>


Snooty dog owners hijacked NYC park for 'private' kennel club - <AUTHOR> https://nypost.com/2018/04/28/snooty-dog-owners-hijacked-nyc-park-for-private-kennel-club/ <comment><USER2> I don't doubt for a second someone or someones is pocketing those fees. The avarice of the rich should never be underestimated.

<comment><USER3> Send the clowns to Rikers for a few days or a few months. It should be easy to figure out the culprit(s). Just "follow the money". How hard would it be to get Paypal to cooperate? Too late to demand payment in Bitcoin!

</comment></comment><comment><USER4> An ultrasonic device would make them clear out.</comment>


Design anti pattern: footer under infinite scroll - <AUTHOR> http://dangoldin.com/2013/09/03/design-anti-pattern-footer-under-infinite-scroll/

<comment><USER2> Facebook does that for the language button. Drives me crazy when I'm stuck in pirate talk or upside down english...

<comment><AUTHOR> It's ridiculous that sites like Facebook and LinkedIn would do this. They really should know better.</comment></comment>


Work/Life Balance - <AUTHOR> http://garrettdimon.com/post/2050767045/work-life-balance <comment><USER2> People thought I was mental when I went out and started my own business. They were probably right...especially when you consider WHY I started my own business.

I wanted to spend more time with my family.

WHAT!? Yes, really. I had just gotten married, just bought an apartment, my wife was about to have our first kid and I started a business so that I could work from home and be with them more. I start at 7.30am and finish at 4.30pm. I usually work a half day on the weekend, and occasionally allow myself to take a weekday off to take my family to the zoo, or go shopping or whatever it is we feel like doing.

We're not rich, and we're always keeping an eye on the budget, but in exchange I've spent every day of the first two years of my sons life with him. In may we'll have our second, and I hope to achieve the same for him (or her!).

It IS hard work. I DO have to be disciplined. But with a careful balance of contract work and "Startup" work, we're doing ok.

We may never hit it rich, but whenever I hear my son cracking up laughing, I can walk out and see why and join in. That's worth more than any startup will ever be worth.

<comment><USER3> just curious: does your wife work? how would/could it have worked out if one of you had both your skills and business inclinations and her child baring consequences?

<comment><USER2> When I started the business my wife was working, yes. She doesn't now. She's on full time "mum" duty. She is a web type as well and she does some of our content and client work when she's got the time.

I'm not sure what you mean by the second part of your question?

</comment></comment></comment><comment><USER4> I worked at a start-up in Boston about a year and a half ago. It was my third go-round in the start-up world across the span of several years, but the first for my co-workers.

I went into the whole situation telling them "I've been through this before, and I will absolutely work hard, but not at the expense of my work/life balance". They agreed, and we got to work.

Sadly, they were shocked after about a week when I actually followed through and refused to work through the night, every night (we would definitely pull all nighters when it was necessary, but they wanted me to pull 12-14 hours a day every day as the sole technical co-founder). This issue became a large reason why I ended up needing to leave the team, regrettably.

Do you know right now that you need a balance between your work and your life? Sure you do! If it's your first time in the start-up game, will you actually put that into practice? In my case (and I would be willing to guess that a lot of you are the same), the answer is no. Some lessons must be learned the hard way, and this was one of mine.

</comment><comment><USER5> It's about time someone wrote this post. I'm currently working full time, going to school, raising 2 cats, married, and bound to a mortgage as well. Even without the startup it's hard. I couldn't imagine doing all of that while starting a business.

This is a gem:

"So, next time you read an article with the media glorifying somebody starting a company and working 168 hours per week, don't assume that's the only way or even the best way. It's just one way. It's just as possible to have your startup and friends and family too."

</comment><comment><USER6> "Inevitably, I would get burnt out and be wildly unproductive for weeks at a time."

I can attest to this and I think it is something that a lot of management types may not understand about the engineering work culture (at least in my experience). When we're in full steam our job's don't naturally lend themselves to down time like a game of golf with Gary from Sales might.

It's definitely a problem that I am still learning to deal with effectively and am always looking for tips/experiences from others.

<comment><USER7> Burnout was one of the toughest things for me to manage, initially. I eventually found ways of dealing with it and preventing it. Because I now know exactly what burnout feels like, I can anticipate it, and make changes in my work and life habits before it becomes serious. I tend code in a more leisurely way now. Although I used to scoff at the concept, I somehow have got back into the habit of working almost a Monday-Friday schedule. If I do any work at all on the weekends it's the low-stress kind, like research/learning, signing up and testing new web services, reading and writing.

</comment></comment><comment><USER8> I love these types of posts. People forget this is a long term game. I can't help but think that people who think a startup necessitates an unsustainable lifestyle are focused on short term gain. It is not two years make or break for the simple reason that when you're done with the first two years you will likely be at it again. The people I know who understand work-life balance have a keen eye focused on the long term. In my opinion, the more that filters into their business the better. It's all about the long term value to you, to your employees, to your customers, and to your industry.

</comment><comment><USER9> My friends know a certain bench at the beach with a beautiful view and a nearby internet cafe to be my two "Santa Monica Beach Offices" which I try to frequent at least a few times a week. Mental clarity and calm is priceless and those spots do it. I cannot stress enough how important it is to find something to allow you to periodically decompress a bit.

I used to work 18 hour days in the film industry. Sure the overtime was great, but you were too tired to enjoy spending it and by the time the weekend rolled around all you wanted to do was sleep. Needless to say I missed out on a lot those years. Ultimately I got out of the industry (for the most part anyway) and while that ridiculous overtime was no more, quality of life improved dramatically. They call a brutal job with good pay the "Golden Handcuffs" for a reason.

Remind yourself that you don't want to someday suddenly realize you're 50 years old and have no idea where the last 25 years have gone.

</comment><comment><USER10> I work for a small startup company. I work a lot more than you do at a typical 9-5 but I also recently got engaged, got married, went on a honeymoon, am getting ready to purchase a new car and a house. It's all very possible to do as long as you are able to determine what is actually an emergency and what is not.

When your head is constantly bouncing between code, product, algorithms, problem sets, tests it's hard to break away and focus on your family and financial obligations. If you don't though, you really do risk terrible burnout.

The best piece of advice I can give to anyone who feels they work too much is to learn how to say "no." It's easy to say yes, and it's very difficult to learn when and how to say no. The second best piece of advice I can give to anyone nearing burnout is learning to delegate. If you're a one-man show you can delegate to your todo list instead of to another person. Either case requires followup though.

Not everything is an emergency and maintaining your sanity should be your #1 priority throughout all that you do.

</comment><comment><USER11> This is not a facetious question, but if 60-80 hours a week isn't optimal, what is the optimal number of hours a week that maximizes success rate for an early-stage startup?

<comment><USER12> It's different for everybody. It's better to focus on what's sustainable for you personally rather than a specific quantity of hours.

</comment></comment><comment><USER13> wait till this dude has kids, then he'll really know what it's like to try to achieve balance.</comment>


The Dark Path - <AUTHOR> http://blog.cleancoder.com/uncle-bob/2017/01/11/TheDarkPath.html <comment><USER2> The article asserts that authors are not testing their code. The problem is that you can't ensure that every possible bug is exercised in tests. Think of the static typing of the compiler as the very first level of testing. If you can have an NPE at this line of code, then it won't compile. The programmer is forced to deal with it. It has failed the first round of 'testing' done by the compiler.

Who's job is it, the programmer or the language?

In this case, it is the programmer, who is being forced to fix it by the language. We don't want code with bugs. Don't 'fix' it in testing when it is way cheaper to put that null test into the code when it is written. The compiler can absolutely ensure that no NPEs can be generated. The testing absolutely CAN NOT make this guarantee.

There are other languages that allow sloppy programming. Use them if you like. Encourage their use if you like. If there were one perfect programming language then everyone would be using it already.

</comment><comment><USER3> Every check that you can add to a language means ways that the programmer cannot mess up. That's a gain. It also means things that programmers cannot do. That's a loss. For some restrictions, the gains outweigh the losses. But that won't be true for every restriction; kitchen knives are sharp for a reason. Restricting everything so that nobody can do anything wrong is unworkable; it is, if not _the_ dark path, at least _a_ dark path.

But so is relying solely on testing for safety. There's always a path through the code that you didn't test. Even if your tests execute every path through every function, there's always a combination of paths that wasn't, or an input value that wasn't, or, or or. You _cannot_ achieve quality solely by tests.

You need a balance. Use language features that prevent errors - not that prevent every error, but at least that prevent some. Use good design. Use static code analysis. Use thorough testing. It all matters; no one thing will save you.

<comment><USER4> A static check adds a way in which the programmer can mess up.

A code path which fails a check was obviously not tested (at least, not since the change was introduced which triggers the check).

The programmer can massage the code so the check goes away, yet leave the code path still untested, due to the "safyness" feeling that that the machine "got his/her back", so all is well.

<comment><USER3> > A static check adds a way in which the programmer can mess up.

True, though it is one that you can ignore. You can't ignore the compiler.

Reading through the output of a static checker is 95% "Stupid hyper-picky static checker", and 5% "Oh #&%$@, we'd better fix _that_ right away". Ignore the ones that should be ignored.

> A code path which fails a check was obviously not tested (at least, not > since the change was introduced which triggers the check).

Or not tested with the right combination of inputs, or not tested looking for the right thing...

> The programmer can massage the code so the check goes away, yet leave the > code path still untested, due to the "safyness" feeling that that the > machine "got his/her back", so all is well.

Sure, they can, if they aren't trying to understand what the checker is telling them, and instead just try to get it to shut up. And they can do the same with a test.

<comment><USER4> > Or not tested with the right combination of inputs, or not tested looking > for the right thing...

There's the thing. Unless the code is exploiting dynamism, probing large input spaces is not required to catch the same issues. Just enough variety to achieve path coverage.

We don't need to probe the space of integers to catch that a string operation is applied; running that expression with any value will do.

I added a static check for uses of undefined functions and variables to a dynamic language quite recently. It didn't find anything in any of my application code. One instance was found in the language's standard library. The function which had that error _was never tested_. Calling that function with any argument at all triggered the dynamic check.

The static check only pointed out this fact: hey, you didn't test this! That's a poor substitute for an actual path coverage tool. You can develop untested code which passes various static checks; only a coverage tool will show you the untested paths.

<comment><USER5> A coverage tool will not come remotely close to showing you untested paths. Array indexing, for example, is an implicit branch between every possible element in the array, but most coverage tools I've seen count just evaluating the indexing expression as covering the line. On the other hand, judicious use of indexed data types can guarantee a data path for all indices into the array. Simple sum types like Maybe and Either guarantee a data path for the more simple use cases of null or errors.

Uses of undefined functions and variables are not what people are talking about here (though those do happen in dynamic languages); we're talking about stuff that can't be checked locally (like "is a null allowed to come into the function at all, and if it does are you covering it") that are hard or impossible to catch with coverage tools.

<comment><USER4> If for some crazy reason we choose to regard an array access as if it were a big switch or case statement with a branch for each index, we are wrong in concluding that this creates a path coverage problem. These cases are machine- generated and do not require separate coverage treatment. An analogy might be found in, say, machine-unrolled loops. I don't care about coverage of multiple copies of a loop body caused by a compiler optimization.

<comment><USER5> How do you know that each array index will succeed, without a proof (or type) to that effect? You don't. You're arguing from the technical definition of path coverage (cases that are machine-generated "don't count"), but I'm arguing from "actually covering the behavior of your program," which means they absolutely do. You're also assuming that the behavior on failure will always be a crash, which isn't even close to being the worst kind of failure from an array index that returns something unexpected.

<comment><USER4> I don't care about that within the scope of coverage testing. I am not laboring under any misconception that path coverage is correctness proof. Path coverage is not "coverage of the behavior of the program".

My thesis is that path coverage will catch a type error, like a floating-point value being used as the array index, or a non-array being indexed. Programs have to be contrived to harbor a type error in spite of complete path coverage.

Complete path coverage means this: every node of the program's graph has is visited at least once at run-time. At that visit, type is determined. This is similar to traversing the program graph statically and determining the type at each node.

Regarding your last point, yes, I'm working under the assumption that we catch errors rather than behave unpredictably.

<comment><USER5> You're assuming we are only talking about very simple types, and simple program semantics. In the vast majority of dynamic languages, variables are unityped with several tags (string, number, object, etc.) so they can trivially never experience a type error, with or without full path coverage (with the possible exception of attempting to access undefined variables, which is _still_ not considered a type error in all languages). However, full path coverage does not guarantee that a value assigned a certain tag (which often drives which interfaces are provided) will have that same tag in all executions, and tags are often extremely imprecise descriptions of the value (often they are only precise enough to identify data layout), which means that many straightforward operations like property access and operator application have to be turned into potentially-throwing expressions or perform automatic casting to avoid causing a runtime error (both of which hinder many optimizations and making it hard to reason about your program's behavior).

For instance, if you grab a value out of an array, assuming that the value you grab is an object with a certain property, and then access that property, requiring 100% path coverage still admits programs where the property will not be found (or where the property will be found, but have a different type than what is expected). Failing to account for the possibility that a tag is wrong is exactly what sum types rule out; failing to account for the existence of a property is what records (product types) rule out; the possibility of failing to grab an element from an array in the first place is what indexed data types (GADTs) rule out. None of these are type errors in most dynamic languages, and hence none can be replaced by 100% path coverage, except under very limited circumstances (which I can attest are not satisfied by real-world programs).

<comment><USER4> > _so they can trivially never experience a type error_

(car a), a contains 42. Application bombs.

> _However, full path coverage does not guarantee that a value assigned a > certain tag ... will have that tag in all executions._

Not having the same tag in all executions isn't necessarily an error, and the guarantee is not required. It being vanishingly improbable that there isn't a type error is good enough. A guarantee in this area has limited value; it doesn't anywhere near prove correctness.

> _For instance, if you grab a value out of an array, assuming that the value > you grab is an object with a certain property, and then access that > property, requiring 100% path coverage still admits programs where the > property will not be found (or where the property will be found, but have a > different type than what is expected)._

I'm skeptical. An example program (Common Lisp, Ruby, Python, Scheme, ...) would be useful, which is fully exercised, via external inputs, such that no errors occur, yet more inputs can be found that trigger a slot-not-found type problem, or a wrongly typed value pulled from a slot. It's not that I don't think the program is possible, but that it has to be contrived. I don't care about catching fraud, only mistakes.

<comment><USER5> > (car a), a contains 42. Application bombs.

That's an example of having the wrong tag, not type.

> Not having the same tag in all executions isn't necessarily an error, and > the guarantee is not required. It being vanishingly improbable that there > isn't a type error is good enough. A guarantee in this area has limited > value; it doesn't anywhere near prove correctness.

I absolutely agree that it isn't necessarily an error (though I do not agree on "good enough"; see below), but I was responding to your own assertion that the guarantee you got was just as good as what you got in a statically typed system, which it's not. Simple statically typed systems verify that the tag is the same by only allowing one tag, eliminating certain classes of error caused by trying to access data as though it were a particular type when it's not (at the cost of limiting the flexibility of your program); more complex ones allow multiple tags if desired, but require you to check to make sure that the tag is what you expect before going on to perform operations on the wrapped data.

> I'm skeptical. An example program (Common Lisp, Ruby, Python, Scheme, ...) > would be useful, which is fully exercised, via external inputs, such that no > errors occur, yet more inputs can be found that trigger a slot-not-found > type problem, or a wrongly typed value pulled from a slot. It's not that I > don't think the program is possible, but that it has to be contrived. I > don't care about catching fraud, only mistakes.

It's really, really easy to do this. JSON parse a list of objects (your external input) that are expected to have the same shape. Then walk through the list, accessing a certain property (say, name). It is very easy to write a test of this that achieves 100% path coverage (harder if you need to count exercising every path of the JSON parser, but not material for the purposes of my point). It is also very easy to construct an input for which this will fail. It happens routinely when you store something in a json blob store or accept input over an API endpoint (I've seen it numerous times) so your skepticism that it can happen in real programs is unwarranted. If you want, I can write out a program that does it, but the description I just gave should suffice.

Note that this can happen even if you carefully check to make sure that all input is of _valid_ shapes and explicitly put them in structures (let's say you have three or four shapes that you consider valid in most lists). You can get a similar failure in a language like Java if you try to, e.g., downcast to a subtype of Object, while iterating through the list, without first checking what type it is (something I've seen people do not infrequently, occasionally with reassuring comments about how it can't fail; the comments are often wrong).

Examples of array indexing failures with 100% path coverage is even easier, as should be evident from the numerous array-out-of-bounds errors that exist in C; the only difference is that they don't turn into buffer overflows in memory-safe languages, they're still there.

Overall, I find your skepticism that bugs like this show up to be pretty unwarranted, especially since I work in dynamically typed languages every day, and my coworkers and I cause bugs like this in production pretty frequently, including in repositories with 100% code coverage.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER6> I like the sentiment but don't at all agree with the conclusion.

> Why are these languages adopting all these features? Because programmers are > not testing their code.

I have a more uncharitable view. Most programmers don't really understand their tools and don't really take a lot of time to think about what they are doing (to be fair, management, especially in enterprise environments, discourage programmers from thinking about what they are doing).

Languages like Swift and Go are designed to constrain the programmer to make it harder for them to make mistakes. The strong type systems also make it easier for programmers to provide information to the compilers to help them generate better code.

Testing happens so late in the process I don't think it has anything to do with it.

There are powerful grownup tools like Lisp and C++ which are paradigm-neutral, but which also hand you enough rope to asphyxiate yourself before you can even get as far as hanging yourself.

<comment><USER4> > _Testing happens so late in the process I don 't think it has anything to do > with it._

Most testing happens as late as possible, in fact. Which is to say, never.

</comment></comment><comment><USER7> I think this an excellent article, and mostly agree with the author's somewhat controversial thesis.

Broadly speaking, I have noticed that language features fall into two categories. The first gives you some kind of new ability. For example, late binding allows polymorphism. On the other hand, the second category entails deliberate restrictions and hurdles imposed upon the programmer with the putative goal of reducing errors. An example of this category is the checked exception mechanism of e.g. Java.

For reasons I don't deign to fully understand, many programmers seem to be rather attracted to the features from the second category, whereas I myself am more attracted to features in the first category. Languages with a strong emphasis on the second category include Haskell and Rust.

My criticism of those languages is that they seem to neglect that language design almost always involves tradeoffs. This is because there exists a complexity budget -- related to the our ability to hold multiple pieces of information in our very imperfect brains. During my forays into Haskell -- which I tested on simple scripts in the hedge fund I was working -- I always was struck by the beauty and power of the language. That said, it was hard not to notice how concept-heavy even simple scripts were; scripts that would be absolutely trivial in other languages now involved tortuous use of monads within monads.

C++, the language I use for my current app ([https://zenaud.io](https://zenaud.io)), is a bit of a Jekyll and Hyde language in this sense. In my opinion, it is telling that the category 1 feature that is templates was wildly successful. By contrast, the category 2 feature which is concepts appears to be struggling (although in fairness, the jury is still out [and anyone who has read the Design and Evolution of C++ knows that it's a brave man who bets against the language-design savvy of Bjarne Stroustroup]).

Last point: Rust seems to me a category 2 heavy language. For this reason, I'm steering clear. What I really want is C with templates, destructors, late- binding (but with value types a la Sean Parent), and operators, and very little of the rest of the crap you get in C++.

<comment><USER8> Rust may or may not be for you, but we definitely understand there's tradeoffs. I even wrote a blog post about it [http://words.steveklabnik.com/the-language-strangeness- budge...](http://words.steveklabnik.com/the-language-strangeness-budget)

There's a language you might like, but I can't _quite_ find it right now, gah. EDIT: Oh! Zig! [https://github.com/andrewrk/zig](https://github.com/andrewrk/zig)

<comment><USER7> Zig looks interesting -- thanks for the pointer!

</comment></comment></comment><comment><USER9> I like the emphasis this article places on testing. Languages which emphasise testing or make testing easy are my favourites to code in. For example, JS being dynamic and having mature testing and assertion libraries lowers the barrier to getting stuff tested, Go has testing in its standard library, and Rust has amazing support for tests (including testing examples in comments) both in the language and from Cargo.

Perhaps it is more important to provide tooling and libraries for testing a language than it is to provide new features in the language proper to avoid foot-guns. It's much harder to back out of the latter.

</comment><comment><USER10> The main argument here apparently is "lets not add safety features because we have a limited pool of features before the language becomes too complex". I don't think thats a convincing argument. Its a question of which features you value. For example, I'd totally give up `public, private and protected` to be able to get rid of exception and `null` pointer problems forever.

> It is programmers who create defects – not languages.

In the case of nulls in typed languages, its the language's fault. The language is literally lying to you.

Lets say that Java is claiming, for example, that a method always returns a `string`. What is a string? Its a value of a certain class, that supports certain methods that return other values. In structurally typed ("duck typed") languages, the type can be defined by the methods you can call on the value (the interface it supports)

But this claim is just not true. The method may return null, and if you call the string methods on that value, your code may die a violent death. Its clear that the value `null` doesn't belong to the type `string`, since it doesn't support the contract that a `string` provides. So why is the programmers fault to expect that the type system doesn't lie to them? I think the programmer has the right to expect an actual string - not a number, not an `StringLike`, and definitely not null, all of which don't fully satisfy the `string` contract.

Unfortunately, the language doesn't give you the ability to discern between a string that cannot be null and a string-or-null (could be string, but also could be null). Because of this, you need to track all the places that might be null in your head to make sure you check for them, or look up the test code to remind yourself all the time.

Its a similar problem with exceptions. The language is claiming that functions that don't cause exceptions act the same way as those that do. But thats painfully untrue, and you would find that out the moment you try to `fopen` a file, read something from it, and then `fclose` it.

      f = fopen('file.txt')
      data = fread(f)
      fclose(f)

Oops but the `read` call may throw, and you now have a dangling file handle. Good thing you knew that about `fread`! Now how about the other thousand methods in your code? Do you know whether any of those throw?

Whats that? You should be using `try-with-resources`, I hear? Okay, then what do I do with this code:

      atomicIncrement(inFlightRequests)
      result = doRequest()
      atomicDecrement(inFlightRequests)

I should use try-finally. Thats true, but what if doRequest() doesn't throw? Then I don't need to. Why do those two look the same? Why is the language lying that they are the same?

Now lets see whats available in Swift:

* `try!` means - I don't expect this piece of code to throw, even though it "might". If it does, crash horribly.

* `try` means - I know that this piece of code throws, but I can't handle that exception here, so propagate it.

* no keyword - This code should not throw. If it returns a Result that may be an error, I want to handle it right here.

* `try?` similar as above, but discards the specific error and returns an Optional.

Thats it. You manage the risk, the language only makes that explicit. It also makes it really clear whats going on during code review.

Here is how the problematic piece of code looks when `doRequest` might throw:

      atomicIncrement(inFlightRequests)
      result = try doRequest()
      atomicDecrement(inFlightRequests)

The possible bug is now very easy to spot. We don't need to remember whether `doRequest` throws or to look that up. Its clear that a finally or defer block is necessary here.

Whats even better is how the code looks like when `doRequest` doesn't throw!

      atomicIncrement(inFlightRequests)
      result = doRequest()
      atomicDecrement(inFlightRequests)

Since we know the compiler would force a `try` keyword there if there was the possibility of exception, we know this code is correct just by glancing it. No need for `defer` or `finally`.

So are these two features not worth the cost? Maybe, if you are arguing that we don't need types as a tool to prevent errors. In that case, it would indeed be the programmer's fault for not writing a test for it.

But if you are going to have types, you might as well have types that tell the truth. Otherwise they're useless.

Finally, IMO this is not a good reason to hate on types. Stop complaining that the compiler wont accept your buggy code and take the time to do the changes. I'm happy when the compiler points out all the places that will be affected by the change - thats something that unit tests with mocks will _never_ catch!

Imagine that a change in doRequest caused it to throw, where previously it did not. The compiler will now tell you about ALL places that may be affected. What would happen if it didn't? The `inFlightRequests` counter will suddenly start behaving strange and increasing indefinitely. What would happen if above a certain value new requests don't get queued? A bug that leads to denial of service.

Is it worth the hassle of changing all affected code? I don't know, what do you think?

There are much better complaints against type systems, like the fact that most are not able to understand certain advanced styles of metaprogramming yet. Or that it doesn't do control flow analysis, e.g. if I type

      if (x != null) { doCode(x); }

then `x` should have its nullability removed in the block

or

      if (x == null) { x = nonNullValue; }

then below this line, x should not be considered nulable. TypeScript for example does both of the above.</comment>


I solved the embedded Chrome OS ad equation and won a Cr-48 - <AUTHOR> http://www.sylvainzimmer.com/2010/12/10/first-to-decode-the-chrome-os-video-equation-won-a-cr-48/ <comment><USER2> Now its time to figure out how to set up a server that can handle few thousand viewers.

Cache: [http://webcache.googleusercontent.com/search?q=cache:http://...](http://webcache.googleusercontent.com/search?q=cache:http://www.sylvainzimmer.com/2010/12/10/first- to-decode-the-chrome-os-video-equation-won-a-cr-48/&hl=en&strip=1)

<comment><USER3> I still really don't understand what's so hard about a couple thousand views. I've had a couple posts hit the front page (even #1 on HN and #5 on prog.reddit), and my server was fine. I use Apache to serve the resources and Clojure to handle web requests. Nothing fancy.

<comment><USER4> Wordpress without caching on a VPS that is probably not configured well. w3tc or wp-super-cache would probably fix his issues. Installing it while the site is hammered.... will be fun. Perhaps as challenging as solving the easter egg.

<comment><USER5> Any out-of-the-box Apache setup on, e.g., Ubuntu _will_ , with absolute certainty, appear to crash if you subject it to several thousand pageviews in a short amount of time. KeepAlive is on by default, and that essentially amounts to turning any group of five or more interested people who share a 3 second window into denial of service attack.

This used to drive me freaking bonkers -- I was installing caching plugins, offloading static resources to other domains, tweaking the number of worker processes, etc etc. Nothing worked, and my blog regularly crashed almost every time it hit an audience larger than HN's. Turned off KeepAlive, bam, no problems since.

<comment><USER6> How hard would it be for them to make it degrade by default? ie. Use KeepAlive until it starts having heavy load, and then disable it when the load becomes a problem.

<comment><USER4> ab with 500 concurrent, no keepalives: Requests per second: 13428.16 [#/sec] (mean)

ab with 500 concurrent, keepalives: Requests per second: 14403.98 [#/sec] (mean)

Keepalives allow the browser to maintain a socket between the browser and server and request multiple objects. So, rather than having to do a connect/teardown for each object, you remove that overhead. Some versions of Apache in conjunction with php and mysql_pconnect had issues in the past that might explain the OP's issues with keepalives, but, it has piqued my curiosity. In general, keepalives should reduce communication handling and allow more throughput.

</comment></comment></comment></comment></comment></comment><comment><USER7> From the screenshot of the secret page: "Also, we can only give you a Chrome notebook if you live in the United States and ... "

I find it such a shame that these types of conditions are so popular for most contests / easter eggs, etc.

Are the legal issue regarding this that complex?

I'm assuming Google is not really that cheap regarding postage costs, since we're also only talking about 1 notebook here.

Also interested how it all worked out for Jamendo, since (from what I see) they're based in Luxembourg.

<comment><USER8> It appears to be an issue with wireless regulations.

<comment><USER9> I doubt it. It applies to most giveaways of any kind (free posters, free calendars, etc). They usually only accept entrants from one country or equivalent legal entity. I expect it's because of variation in contest-related laws between countries, tax laws, etc.

<comment><USER10> Yes, in some countries if you advertise a public contest you first have to register it and vet it with your government, who then make sure everything is done fairly. That is something google simply cannot afford to do.

I am sure they will find a way to reward jamendo somehow. They'll invite the guys for a formal visit and give them business cards in the shape of netbooks, at the very least.

</comment></comment></comment></comment><comment><USER11> hi guys. I'm Sylvain who solved the thing, thanks for relaying the info here! :)

The blog indeed crashed, it's on a very small VM with a remote filesystem and even with a WP cache plugin.. not so much luck, even with apache stopped.

However our company blog has a proper sysadmin ;-) So after I setup a redirect there no more issues... until we get on slashdot maybe ? :)

Cheers!

<comment><USER12> From the screenshot of the form you got after solving the equation, it looks like you need to have a U.S. address to receive the Cr-48, and it would appears poor you're located in Paris/Luxembourg. You need someone to forward it on to you? ;)

<comment><USER11> yes that's also a funny side of the story. As I was going trough the border on tethering, with barely any cellphone reception, I was trying to fill out the "one-time" form without any U.S. address in mind ;-) Luckily I have a cousin in Houston so gave him a quick call to get his address and I submitted the form as soon as I got my data link back up :)

generally speaking, it's extremely frustrating for an european startup to see these regular U.S. only launches from Google. (come to mind Google Voice, ebookstore, google music, and now Cr-48...) But well, small price to pay to enjoy living in Paris most of the time :)

<comment><USER13> As a European working at Google (and there are plenty of us), I feel your pain. However, although so many things are easy to scale internationally, products with licensing and regulations are not in that category. We do work actively on making this less and less the case, though.

<comment><USER11> yes, indeed. I can imagine carrier or licensing deals being complex... that's why I said we were just frustrated, not angered against Google :)

Cool that you work on the Chrome team. Can you share more insider info with us about this story and its makeof ? ;-) thanks!

</comment></comment></comment></comment></comment><comment><USER14> The equation - <http://img545.imageshack.us/i/chromeequation.jpg/>

<comment><USER15> Some symbols are hard to see, but I hope it is right.

LaTeX'ed version: <http://yfrog.com/gyegnp>

<comment><USER16> Yes, this is what I saw. HOWEVER, when you run he numbers, you can NOT get the same values that Google represents. The value for "C" is WRONG! It should be 8338041. This changes everything. ===> <http://goo.gl/fpJsJ>

</comment></comment></comment><comment><USER17> From the article:

> most people I know including myself couldn't live without Chromium/V8 > anymore.

Is this a common sentiment ?

<comment><USER18> I can relate, though maybe he is being a tad sensationalist.

I expect (say) my bookmarks to be synced between all my computers. I'm sure plugins do this on other browsers, though.

The biggest reason I don't consider Opera or FF for daily use anymore: Non- chrome browsers drive me crazy due to the way they close tabs. It is very stressful compared to mouse-closing tabs in Chrome and its "smart positioning."

<comment><USER19> I've been leaning back towards firefox recently due to how chrome handles large number of tabs: poorly. It'll squeeze them down to the point that they wont even show the favicon, making finding an open page annoying - compared to firefox, which has a minimum tab length, and scrolls the tab bar if it grows too large to fit.

The rest might be a personal prefference, but I rarely use the mouse to close tabs anyway, ctrl+w is faster, and I can hit that as many times as I want without moving the cursor anywhere. I also preffer the / and ' shortcuts firefox has.

<comment> brown9-2 Just curious, but if you have that many tabs open why not split them into different windows?

<comment><USER19> If it's split into windows, not only do I have to hover over every tab to find the one that I want, but also repeat the process for every open window.

The alternative is sorting the tabs somehow, but that's more maintance than a middle click.

</comment></comment></comment></comment></comment><comment><USER20> 24 occurrences of ";-)" — true happiness!

</comment><comment><USER21> I dont get that : "we realized "900.91″ did actually reference the goo.gl url shortener"

I do not see how he did that?

<comment><USER22> Just tilt your head a bit :)

        9 -> g
        0 -> o
        1 -> l

<comment><USER21> oh thank you! haven't realise that!

</comment></comment></comment><comment><USER23> Kudos. Too bad that special page didn't also include a job interview offer.

</comment><comment><USER24> Well, now please make Jamendo a joy to use...

<comment><USER11> true... we're not happy with the current state of the jamendo.com website. 2010 was mostly focused on getting close to breakeven thanks to jamendo.pro (which we did). We also did a management buyout from our former VCs, laid of a lot of staff, so all in all, we're just happy to still be there, growing, and hiring again :)

Now we have several ongoing usability projects, we released a HTML5 player a few weeks ago (replacing the old Flash crap) and are now working on layout and stability improvements on the main pages. It will definitely make Jamendo a complete joy to use again, if we can just spare some time from breaking Google easter eggs ;-)

cheers!

<comment><USER25> While you're fixing UI please consider fixing Jamendo PRO search interface. Your database seems to have more information than you allow to filter by (I really need to filter by tags, e.g. I want something fast, dark and agressive). I spent days trying to find music for my game on multiple websites and I can definitely say that pretty much everyone's music search sucks. If you make yours awesome, you'll definitely stand out.

<comment><USER11> yes, good catch. we can improve the interface but also one of our main problems is the reliability of the current tag data, which is too low. We're considering a process with mechanical turk to fix it.

Anybody here with experience with mturk and this kind of metadata tasks ?

<comment><USER24> Just finally let us Jamendo users tag the music. Maybe weigh it less than the artists' own tags.

</comment></comment></comment></comment></comment><comment><USER16> ________________Uh-oh. No you didn't. The value for "C" is INCORRECT. == > <http://goo.gl/fpJsJ> _________________

</comment><comment><USER26> Google Chrome blog has a post about this. Congrats to the Jamendo guys. <http://chrome.blogspot.com/2010/12/x-g-chrom-3.html>

<comment><USER16> Google's blog should be read carefully. There are errors in this. ==> <http://goo.gl/fpJsJ>

</comment></comment><comment><USER27> I can only view the cached version. Looks like he needs a mirror.

<comment><USER28> Or he needs to implement caching on his Wordpress site.

Almost every day there's a popular blog post that misses a large portion of its audience because the author wasn't caching. You'd think that more authors would plan for a traffic spike from aggregators, since that's sort of the holy grail of blogging.

<comment><USER29> It's hard to plan for a problem you've never had before. Most people expect it's just going to work.

<comment><USER27> Or that their host can handle the stress.</comment></comment></comment></comment>


Ask HN: Which programming language is the right one for your startup? - <AUTHOR> If you were starting up and had to acquire the requisite technical skills to enable the implementation of your idea, how would you choose the right language which will enable you to realise your ambitions? <comment><USER2> Like @jetti, I would (and have) gone with what I already know. In my case, Groovy and Java. There are other languages I'm intrigued by, but I haven't seen enough evidence to convince me that any new language is going to offer such radical improvement in (performance|productivity|stability|whatever) as to justify the huge time sink it would be to switch.

That said, we try to make things API driven as much as possible (I'm loath to use the term "microservices", but I guess it would fit) so we have the option to introduce new languages on a piecemeal basis if/when it seems justified.

Some languages I've played with / looked at (or used in the past) that might make it into the mix someday include C++, Scala, Clojure, R, Python, Prolog and Julia... possibly others as well. But we're not going to start throwing new stuff in just because it's new and trendy. We try to avoid FDD (Fad Driven Development).

</comment><comment><USER3> I would (and have) picked the language I already had a deep knowledge of: C#. Other than that, I would pick something that seemed to fit the need of what I'm doing. I'm thinking of creating a licensing as a service product which I would use Elixir/Phoenix because I've heard good things about the performance and I could have many calls coming in.

</comment><comment><USER4> Unlike @jetti and @mindcrime, I would use the opportunity of a green fields project to switch to and learn a more suitable industry-accepted language such as Python instead of a declining language that I happen to know better like the ageing Apache Groovy, which was originally optimized for scripting but badly retrofitted with static typing and for building systems, which other languages built from the ground up for such stuff are markedly better at, such as Java, Scala, and Kotlin on the JVM at least.

<comment><USER5> I've been using Groovy for about a year now. Can you explain what you mean about the static system being "badly retrofitted?"</comment></comment>


Mobile App Performance – J2ObjC vs. Xamarin vs. RoboVM vs. RubyMotion - <AUTHOR> https://medium.com/@harrycheung/cross-platform-mobile-performance-testing-d0454f5cd4e9

<comment><USER2> It's too bad React Native isn't covered in this comparison. Native code with an effective es6 compliant javascript runtime seems like a good idea.

I would also love to see some comparison between different js frameworks. There's huge differences in the various javascript frameworks used in conjunction with phonegap. For instance is famo.us fast and has some good third party widgets, like famous-flex. Ionic is very fast to learn and use, but scrolling isn't excactly fast. If you combine both famo.us and ionic on the other hand, you should be able to get a near native feel. There are efforts to create angular directives for some famo.us widgets.</comment>


NYPD Study: Implicit Bias Training Changes Minds, Not Necessarily Behavior - <AUTHOR> https://www.npr.org/2020/09/10/909380525/nypd-study-implicit-bias-training-changes-minds-not-necessarily-behavior <comment><USER2> I had mandatory bias training as an infant and these "psychologists" can fuck right off.

<comment><USER3> Would you care to elaborate?

<comment><USER2> No.

I don't know most details since I was an infant, but it was explained to me later. It was in Germany, not the US.

Allegedly I had an eye reaction after being shown some images. As a result I was shown some form of corrective movie, which I also know nothing about. Hope it wasn't too traumatic. I don't know who is responsible, I don't think it is still being practiced.

What I do know is that I like to get grifters around non-falsifiable bias booted as soon as possible, so maybe it didn't work quite right in my case.

Sounds just as crazy to me as it might sound to you.</comment></comment></comment>


Solar geoengineering research: essential or to be avoided? - <AUTHOR> https://www.linkedin.com/posts/jjacobs22_episode-50-kelly-wanser-executive-director-activity-6595637683807145984-oJ0e <comment><USER2> I find this a very interesting topic. Slowing and maybe even reversing global warming is incredibly slow because of how indirect the processes are: we burn carbon -> CO2 in atmosphere goes up -> atmosphere retains more heat -> glaciers melt; even if we stop burning carbon completely (which we won't), it's going to take a long time for carbon levels to return to normal, and during that time, the atmosphere will continue to retain more heat, temperatures will continue to go up, and glaciers will continue to melt even faster.

Actually reducing the amount of sunlight that reaches the Earth will have a much faster impact. The downside is that to have any impact at all, you need to do this on an unbelievably massive scale, which is not only expensive, but we have no idea what kind of side effects it may have.

I think it's an interesting area of research, but it shouldn't prevent us from dramatically reducing our CO2 output.</comment>


Ask HN: What do you expect from you mobile web browser? - <AUTHOR> Hi!
I've grown a bit frustrated with vanilla mobile web browsers (Chrome, Safari)[0], so I started playing with the idea of building a mobile web browser from first principles (instead of porting Desktop concepts directly to mobile).
I've gotten to a first (relatively usable) proof of concept that explores ditching tabs altogether on mobile[1]. But before going any further, I was curious to hear what you'd expect/want from your mobile web browsers that you don't get today?
Any feedback on how you use or don't use your mobile web browser is also welcome obviously!
[0] I've also tried a couple others: Firefox, Dolphin, Brave.
[1] https://www.youtube.com/watch?v=3zFrAxxlb-0 <comment><AUTHOR> Here's the link to the youtube video: [https://www.youtube.com/watch?v=3zFrAxxlb-0](https://www.youtube.com/watch?v=3zFrAxxlb-0)

I'll also start by saying that I use less and less my mobile web browser since:

\- many apps (like Facebook) do embed webviews that are now really powerful.

\- I use the Gmail app for email, and a native app for most communication interactions (Slack, iMessage, Discord, etc...)

But yet I do often end-up using a web browser on my mobile pretty often (at least a couple times a day, if only to check HN or interact with Github) and I'm amazed how useless are tabs for me and how hard it is to find back content that I visited earlier. These are the two main pain points that I focused on initially and tried to solve with that first proof of concept.

</comment><comment><USER2> A few questions/suggestions:

I don't know if it was present, but I would like a loading bar. It's not always clear whether or not a website has finished loading.

Is the border-radius on the app's WebView really necessary? Although minor, it takes away from the page content.

Consider enlarging the address bar at the bottom. It becomes extremely annoying when I accidentally activate a button in my attempt to open Control Center.

Can you go forward a page, in addition to going back one page?

<comment><AUTHOR> There is a loading indicator at the bottom and you can go forward as well using the native wkwebview gesture.

We might add a force touch menu for reload, forward / back and share which is important if only for app "actions".

</comment></comment><comment><USER3> Firefox for android is a good alternative to the PC version. Using add-ons like uBlock Origin is important to me.

<comment><AUTHOR> Interesting! add-ons are only available on Android right? Any feedback on the navigation UX, esp since firefox is very in your face when it comes to tabs?</comment></comment>


Google's Schmidt 'outraged' by NSA snooping - <AUTHOR> http://money.cnn.com/2013/11/04/technology/google-nsa-snowden/index.html

<comment><USER2> > "The fact of the matter is that citizens have a right to privacy in > democracies," [Schmidt] said.

Ahem.

[https://www.eff.org/deeplinks/2009/12/google-ceo-eric- schmid...](https://www.eff.org/deeplinks/2009/12/google-ceo-eric-schmidt- dismisses-privacy)

> When asked during an interview for CNBC's recent "Inside the Mind of Google" > special about whether users should be sharing information with Google as if > it were a "trusted friend," Schmidt responded, "If you have something that > you don't want anyone to know, maybe you shouldn't be doing it in the first > place."

I don't want anyone to know that I searched for certain medical information. Should I not search for it? Unavoidable that Google would know what I searched for, although DDG I believe doesn't save or act on that information.

As for the NSA, well, they're going to know everything about me; as far as I can tell from Schmidt's earlier statement and the NSA's current behavior I should just STFU and disconnect.</comment>


Rebecca Black's "Friday", Or: Dear Internet, You Should Be Ashamed of Yourself - <AUTHOR> https://jasonlefkowitz.net/2011/03/rebecca-blacks-friday-or-dear-internet-you-should-be-ashamed-of-yourself/ <comment><USER2> This is from 2011.

[https://en.wikipedia.org/wiki/Rebecca_Black](https://en.wikipedia.org/wiki/Rebecca_Black)

</comment><comment><USER3> I thought this would be a "where are they now?" piece, but no, it was written in 2011 when people were talking about this particular music video.

<comment><USER3> I get it now. The OP posted an old article from his own blog.

</comment></comment><comment><USER4> Ah, a simpler time</comment>