skysight-inc/HackerNews huggingface dataset:
Junior programmers aren't aware that reading code is hard, since they've never really been forced to read much code (AFAIK there's no point in a CS course where "scour this 500KLOC non-didactic codebase for the cause of this bug and fix it" is assigned.) Because they aren't aware that reading code is hard, they think that code that's hard to read is a code smell, whether the complexity comes from obfuscation, or just the inherent complexity of the problem domain.

They also don't know that they don't know this, because they've seen code that's comparatively easy to read -- why, they've written it themselves! Their implementation of only the minimal requirements of the domain is much clearer than someone else's complete solution with all its required business-warts. As such, obviously, throwing out the previous complete solution, and filling in the gap with their own minimal reimplementation, is an improvement. (They don't notice that after fixing the ensuing regression bugs, their version now bears a much stronger resemblance to the previous one....)

Eventually, you read enough code that you get used to that particular "smell," and you realize that it's not really pungent in the way the other smells are. The "complex problem-domain, completely expressed" smell becomes the grease on the equipment[1] -- the sign of a well-patched and long-running system.

---

[1] http://www.joelonsoftware.com/articles/Wrong.html
Nuts and Seeds: How Food Affects Health
Hey guys, we just created a browser plugin that aims to turn everyday transactions into opportunities to give to charity. Click the link below and the big orange button to start. Your SMALL change will make a BIG difference.

http://www.onecentmovement.org/

A breakdown of how it works after you have downloaded the plugin.
1. Shop as usual at your favourite local online stores.
2. At checkout, you will see a pop-up option to round your purchases up to the nearest dollar.
3. Click OK and proceed to purchase your goods!
4. Once you’ve accumulated $10 worth of round-ups, you will be notified on exactly how you can make a difference in the society.
5. Give, make a difference and smile! = The world is a better place.
Anyone considering using PayPal as a seller should read Jessica Livingston's "Founders at Work" interview with Max Levchin. PayPal is an anti-fraud company that occasionally processes payments.

It's appealing to customers and established merchants with slow, predictable growth and short lead times, but not for pre-orders. And I don't see them changing this - it's in their DNA.

Kickstarter with Amazon Payments, in contrast and for better or worse, is the most pre-order friendly system imaginable. Tens of thousands to millions of dollars transferred in days with virtually no questions asked. The 14-day holding period they mention is only for first time projects.
In point of fact, in this instance they've had four phone calls and a talk with a supervisor. To add another anecdote, when my Paypal account was frozen (a client paid me on Paypal during an apartment move, which looked like "Somebody just tried to move 3 months of typical revenue through a novel IP address IN JAPAN!"), it took less than a minute on the phone to resolve.

I think people's perceptions of Paypal's fraud department are like people's perceptions of Microsoft's security: dominated by a poor record from a decade ago. Both businesses have gotten religion on this topic in the interim.
Oh cool! I'm on HN pretty constantly and a quick slide showed me that I'm not on quite as always as I thought.
I know that's what all the crowdfunding sites says, but practically speaking, people expect their stuff, and get angry if they don't get it.

I think crowdfunding would be a lot less popular if people actually understand it wasn't just a pre-sale. Because most people are not just donating.
> What do you think makes your code good?

Answering for myself: (1) it's short. Often significantly shorter than my colleagues'. (2) it has few bugs, if our bug tracker is to be believed (I reckon I'm not very confident about that one).

On the other hand, I tend to be slower, especially when I have to write against less than optimal APIs.
I didn't mean as a sole energy source, auxiliary. Somewhat like brakes converting kinetic energy to electric current.
Brainfuck interpreter in brainfuck
You can pick the Mi2 up on eBay. The phone is geared for the China market, so you're on your own for support and warranty.

I've used a Xiaomi in China. It was a decent phone, but the build quality felt a little cheap compared to LG and Apple. I'll stick with the Nexus 4 for now. It's cheaper and makes better engineering tradeoffs. Without a larger CCD surface area, the 13Mp camera means worse low light photos. Likewise the 1080p screen is indistinguishable from a 720, but gets worse FPS in games and drains the battery faster.
It costs $80,000 but it comes with a free car.
Can you compare and contrast Scala with Clojure? I've dabbled in both... I in theory prefer Scala, but I found it just has sooo many moving parts I can't keep it in my head.
> So these or not phantom people, trying to take your money.

Well Paypal doesn't stay in business on trusting the reputation of one or two people at a time. Trust simply doesn't scale like that. So while I or you personally might not worry about this, Paypal would still have to look at this through their dispassionate business case microscope to evaluate how risky the situation looks.
I would agree that the legislative and executive branches do have some responsibility to write and sign laws they actually believe are constitutional. Just punting that to the courts does seem like a cop out.

I was talking more about laws that have already been written and signed since we were talking about the actions of the FEC in the context of McCain-Feingold. Absent extreme cases (like death camps or something), I don't think the FEC or its employees would have any legal right (or responsibility) to decide for themselves that McCain-Feingold was unconstitutional. Giving them that power and responsibility is the can of worms I was talking about.
I would suspect that such practices are more prevalent in the web development world. Enterprise software and embedded development (my focus area) suffers far less from the pure unadulterated "shit" code pattern.

Mostly I suspect that is because the software development practices such as code reviews and coding standards are actually enforced.
...when I asked my coworker to explain...why is the code shit, I couldn't get a straight answer.

Maybe because there are only so many straight answers and we get tired of repeating them so often...

Class A: It's too difficult for the next programmer to understand this

- poor (or horrible) variable naming
- poor (or horrible) function naming
- repeated repeated repeated repeated code
- comments don't match code
- comments needed but not there
- comments needed by unintelligible
- unbalanced structure
- poor (or horrible) choices for iterations
- poor (or horrible) choices for conditionals
- poor (or horrible) choices for data design/storage
- poorly maintained by Programmers #2 thru x, who didn't understand it
- etc., etc., etc.

Class B: Poor machine performance, not by 10%, but by 10000%, because of extremely poor design and development choices.

Class C: It's broken. Insufficiently tested & broken in production.
Can you please clarify with some references where you got that from .. and whether that trend you mention is not because the revenues on iOS are also going down?
Programming for the Expression of Ideas - Gerald Jay Sussman -- Lambda Jam 2013
The description about comments is somewhat wrong. The Scaladoc standard is not

/** My comment
* Next Line
*/

which is pretty ugly, but it is

/** My comment
* Next Line
*/

which looks much better. :-)
JQuery plugin to display dynamic vector maps (dataviz)
Unbelievable how much complaining there is this thread. This is a great, free addition to their service and is very well done for getting a quick overview of a server.
Even if true, the social constructs that keep blacks as second class citizens couldn't possibly be a factor in that.

</sarcasm>
I know what this guy is talking about. It's the sort of code where the programmers spend 80 lines copying key-value pairs from one Perl hash to another Perl hash instead of doing it in 3-4 lines with a loop, because they don't know any better. coughibmcough

(Of course, this is among the least of their offenses.)

I try not to work at places like this.
So what's your argument? You think it's kind of like Zelda? So what? Did you even read what I said? It's problematic in Dark Souls precisely because of how big and complex it is. Demon's Souls is cut out of the same clothe - but it is smaller and simpler, so these things don't become a pressing issue. None of the qualities you list, e.g. having access to deadly areas, are against what I'm saying.

It has nothing to do with "guest logs, way points and real time navigation". None of that is necessary to fix the game. I can't play games like Skyward Sword where there's some asshole computer jumping out of your sword dropping the most ball-achingly obvious hints. What's needed are carefully placed clues, of which there are very few. I think it's fair to say that the game is deliberately counter-intuitive in ways that serve only to waste your time.
Can you please point a link to your secular homeschooling group?
Assuming the machine is stateless, why can't the space of hole cards be mapped out and and strategies/responses enumerated?

But ultimately, the whole enterprise just seems distasteful: "Look, there was a 24-year-old who had beaten it for a while. Now he’s broke. And I think this machine had something to do with his demise."
Almost all code except the stuff written by the Masters of Succinctness can be shrunk by a factor of 2. Order of magnitude reduction is the only impressive metric.
Does HN Search only have content from the last (time period)?There's definitely some stuff that seems to be missing.
Maybe 30 minutes is the minimum to fill their graphs.
Please don't be so vain. Division by zero is undefined, that is (supposed) to be taught in high school. The fact is that computers have to display some value when x/0, and that value is defined by IEEE standard in the context programing languages for consistency.

Pretty good wiki on the topic: http://en.wikipedia.org/wiki/Division_by_zero
X-editable.js for Angular.js is out.
The shitty truth begins to appear when you've — way too many times, might I add — read the old code, thinking it makes sense and then feeling the pain of naivete shifting out as the code eventually turns out to make no sense.

Then begin to recognize potentially shit earlier in the process and while you do enough many rounds of that, confirming your expectations, you can just look at the code and say "this is shit" and be quite confident that you're right.

That's not to say that there wouldn't be a similar process working towards recognizing "When to rewrite this shit?" There is and the answer it gives is "Rarely".

A seasoned programmer will balance between "this is shit" and "not rewriting this shit". And there's nothing wrong with shit, because the shit is shipping and mostly works unlike the ultimate refactoring that nobody has time to write.

So it's the programmer's job to fix shit, and occasionally write new stuff that shall be deemed shit by a later fellow colleague.

Instead of pointing at the vague shitty attitudes towards shit, the author should probably just roll up his sleeves and start fixing the shit.
seems like paypal CEO David Marcus is looking in to it.

Whenever there is a high profile case like this that gets a lot of public attention he seems to get involved
https://twitter.com/davidmarcus/status/375621484175060993
Buffers and Allocation (Go and Python)
That article was simply wrong. The chart at the top of it was added after it was pointed out that PBKDF2 is worse than bcrypt as a password hash, and the chart refutes the article.
When a programmer says "this code is crap" its not simply because all programmers think everyone else's code sucks. Tools like PMD, PHP Mess Detector, and Findbugs can measure code quality (against a number of useful metrics). They're not a magic bullet but they often reveal that "this code is crap" is a highly justifiable sentiment.
Seems ripe for geurilla advertisement.
Pretty much. I refuse to use Paypal for anything unless I absolutely have no choice in the matter. I'd be really happy if they'd just do the world a favor and go out of business so someone less shifty could take over. I would rather they deny someone an account than wait until that account has racked up a huge pile of money before suddenly deciding it's too risky to be doing business with the company that money legally belongs to, and that they need to just hang on to all of someone else money just in case they go out of business... say from some shifty company stealing all their money right when they need it most. There's something of a self fulfilling prophecy here, Paypal decides a company is at risk of going out of business even though they're pulling in lots of money so Paypal decides to freeze a substantial portion of the companies assets. How many companies do you think can survive having most of their assets frozen for an unknown number of months? Not many I'd bet, so at a guess I'd say Paypal probably has a near 100% success rate at predicting companies going bust after they've frozen their accounts.
1)I have a good memory, so I remember clearly that you developed for more than one platform, and, more than that, I remember you complaining about your agency application having to support ALL versions of Android starting from 2.1 (used by less than 1% of the market).

2)It is clearly visible from your comments history that you are biased (and that's ok, everyone is allowed to have a preference, I am biased as well), but also refusing to consider any arguments that go against your views, ergo the trollish behaviour. I especially dislike the way you address your replies. Most of the things that don't make sense to you, have a perfectly reasonable explanation if you only would consider changing your point of view for a while.

3)mattquiros already refuted your arguments on why iOS is more enjoyable as a platform.

4)I already commented elsewhere that as a developer you have to know your tools. Not using the x86 emulator or genymotion puts you in the position of the masochistic developer that wants to prove that the platform is horrible AT THE COST OF MAKING HIS OWN LIFE MISERABLE.
There are lots of little clever details like this. You might have also noticed that in Ornstein and Smough's chamber there are two elevators: a large one (for Smough) and a small one (for Ornstein).
AngularJS 1.2 RC2 Released
No, a 6 min mile is not average. And yes the average of most things is shit. Shit isn't bad (unless it is), it is the output of useful work usually. It just needs to be covered up and stayed away from.
I can show you two code samples of mine, one in Clojure, the other one doing something very similar in Scala:

(defn completion-items [grammar doc items-bin-index completed-bin-index items nonterminal value]
(loop [items items
completed '()]
(if-let [[^Item item previous-value] (first items)]
(let [alpha (expected-symbol grammar item)
dot (.dot item)]
(if (and alpha (= nonterminal alpha))
(let [rule-nonterminal (.nonterminal item)
ruleindex (.ruleindex item)
origin (.origin item)
value' (gen-nextvalue grammar doc origin items-bin-index completed-bin-index
rule-nonterminal ruleindex dot
previous-value value)]
(if (nil? value')
(recur (next items) completed)
(let [item' (->Item rule-nonterminal ruleindex (+ dot 1) origin)]
(recur (next items) (cons-item-value completed item' value')))))
(recur (next items) completed)))
(apply hash-map completed))))

--------------------------------------------------------

def complete_items(completed_binindex : Int, bin : ItemBin, nonterminal : Nonterminal, value : Value) : MoreItems = {
var completed_items : List[(Item, IntermediateValue)] = List()
for ((item, v) <- bin.items) {
val s = expectedSymbol(item)
if (s == Some (nonterminal)) {
grammar.nextValue(document, item.origin, bin.binindex, completed_binindex, nonterminal,
item.ruleindex, item.dot, v, value) match
{
case None =>
case Some(nextvalue) =>
completed_items = (item.inc -> nextvalue) ::
completed_items
}
}
}
completed_items
}
Devise: https://github.com/capita/devise-scrypt
PHP: http://pecl.php.net/package/scrypt

So not quite "none", though granted being some random third party addon might as well be for many people (and possibly a good attitude to take for something security-critical).
Why does the development flow suck?
If you're interested in using deep learning for nlp, I highly suggest putting a pot of coffee on and watching this a couple times: http://www.socher.org/index.php/DeepLearningTutorial/DeepLea...

The really neat part is moving away from bag of words representations. Bag of words was always a bit of a hack. But seriously, watch those videos, it will give you a good idea on how it all works, the op is using similar methods.

Edit: thanks gallamine, I fixed the link
CINT is an interpreter for C and C++ code. From CERN
Munin seems like it would be a much better choice for most people -- both the server and the client are Free and it stores a year of data. What it doesn't do is allow you to drill down into old data -- it's only got static day, week, month and year graphs. You can graph pretty much anything, though.

http://munin-monitoring.org/
Thanks buddy, but $500 is a bit too much for me. ;)
Yes, that's why the game is horribly, horribly broken.
Other than GuiA's (currently-on-top) comment, almost everything I've read here is disgustingly negative.

"She's a micromanager, she should be 'CEOing' instead of designing, she's a terrible designer, she should spend time with her kids (!!), she has hubris to say she can design something, it's all about her, she's destroying the craft of design, the wafts of Denning - Krugerism are pluming out."

I just... come on, people!
only 30 mins of data retention... even AWS gives you 2 weeks at 5min resolution for free (albeit only stuff the hypervisor can measure because they don't run an agent, so no RAM etc).
Proposal to add Unicode support in the C++ standard library
I always thought 80% of coding (solving anything really) is understanding the problem.

The other 50% is implementation.
Different things.

Yea, if you're hosting with them, trusting them is handy.

This Longview agent can be run anywhere though, doesn't have to be on a Linode machine. Not entirely sure why you'd want this setup, but still..
<sneeze> snorby :)
How to handle millions of new Tor clients
Even when playing in online mode, the savegames are still on your computer. (Somewhere in the C:\Users\yourlogin\ mess...)
FTC Fines Company For Not Using SSL
Could it be that we've all missed the point entirely? Maybe, just maybe, Paypal was under duress from the Feds to cancel their Paypal account because they're afraid of what Mailpile would have accomplished?
Name of Button?
Hi,

There are these "new" Buttons, which are a combination of a button and a checkbox. For example the Followbutton on twitter. If you don't follow the person, the button say "Follow". If you follow, there is "Following", hover: "Don't follow".
Is there a name for these types of Buttons?

Thanks,
Miau
7 actually. And I think so.

https://library.linode.com/assets/1406-lv_network.png
Oh nice, I was using rss of other people that did this themselfs, but know I might use this!

EDIT: Nevermind, this doesn't have rss!
A simple pattern for cleaning up your Ruby DSL
I once was responsible for maintaining code like this:

There were 3 client-side javascript files. They were named something like this:

foo.js
foo2.js
foo-z.js

Each file was about 4,000 lines long. All 3 were nearly line-for-line identical, save for about 500 lines of differences each, strewn wantonly about. For some of the URLs the app would use foo.js, for some other URLs it would use foo2.js, and for yet more of the URLs it would use foo-z.js.

There were 4 files on the server like this which did the same thing - copied line for line and then changed in various places.

After refactoring these files together and eliminating the duplicate code, I ended up deleting something like 8,000 lines of code. I quit soon after - by then I was already looking for another job.

That code was shit. There is no question about it.
Obligatory Louis CK link: http://touch.dailymotion.com/video/x8m5d0_everything-is-amaz...

Elon Musk is on the cutting edge of changing our society and tries to make the best of the hiccups along the way and you're complaining about the slightly degraded experience of charging your car with... renewable energy??

Give Elon some slack, I'm sure he'll find a way for you to reduce the charging time to an acceptable time in the near future, but in the mean time try to be a little amazed by what's he accomplishing here: making electrical cars a part of our society.
How 5 characters can murder iPhone, Mac apps.
Interesting. I doubt they would design a neural net without the probability as direct input though. I don't think the machine can be this good especially with such limitations. It may be exploiting some average-gambler trait and ultimately will be beaten once the pro players figure it out.
It's "Dunning–Kruger" (for the benefit of those that are not familiar with it and are trying to Google it).
Their policy is to freeze the funds for a long time (they talk about 1 year in the blog post) then to actually go through.
I think this is just a general reflection of modern (internet) culture. It's easier to get "internet points" (read: facebook likes, twitter retweets, etc) by being snarky than it is by being positive.
The Dark Side of Firebase Syncing: Test Procedure and Results Included
FYI, since it's not exactly obvious: in the live demo (http://nlp.stanford.edu:8080/sentiment/rntnDemo.html), you can double-click on the tree image that it generates to see a zoomed-in version with more information, and correct improperly labeled nodes to help the algorithm learn. Try it with some Rotten Tomatoes review snippets - from the ones I tried, it got almost all of them right.
I had a high school principal who used to be an English teacher. He used to call school assemblies to get on stage (in the auditorium) and talk about how useless math is. He would say "you're always trying to find x, I don't want to find x."

This was the most useless school ever.
Head's Up Hold'em has a nash equilibrium. Therefore there is at least one mixed strategy (I do X with probability P in Y situation) which cannot be negative expected value to any other strategy. In this sense, there is an optimal strategy. It doesn't mean that it is the maximum expected value against a particular opponent, but no opponent can win by playing (which is largely the goal of a casino).

Opponent modeling is purely advantageous, but not necessary
I imagine anyone who's been around for long at all has written what someone would call "shit code."

Hindsight is 20/20. Imagine auto makers comparing product today with those from 50 years ago? That's about how far we've progressed in 10-15 years in this industry. Were those guys whose contemporaries were able to send people to the moon on CNC-less machine tools and computers with 4K RAM somehow doing "shit engineering?"

Imagine if what someone sees as "shit code" ultimately made yesterday's coder $1000/line because it got done while there was an opportunity to sell it. Is it still "shit code?" You're not being asked to be a music critic here. Most code is written as part of a business.

That said, code reviews are a great way to learn from and align with your team!
Regarding Gruber's "I don't see how this helps third party…
Why make things? Because.
Well, I'm happy they're totally wrong about me. Married ?! Two children ?! German ?! At least they got Male right...
Kick-Start Your Consulting Startup With Your Blog
KitKat: A Closer Look
Chinese workers exploited by U.S.-owned iPhone supplier [pdf]