skysight-inc/HackerNews huggingface dataset:
This response has been trotted out a few times on HN. IMHO its terribly mistaken.

An analogy is that unit tests are like a brick layer's spirit-level and plumb-line. As you build the wall, you ensure the pieces are put together correctly and head off mistakes early.

The "only test at a high-level" is like saying don't confirm the bricks you are laying are correct, instead bring in an inspector to check the whole building is up to code once we have finished.

If we do bring in the inspector she takes one look and says the wall have to come down because of faults right at the bottom or because we forgot the damp course or we never get that far because we couldn't fit the roof because all the walls bowed out.

I fear that those who advance anti-unit-test views only do so because they lack experience with large complex code-bases and that they are not in a position to be advising others.
Here are the links without going through Google's URL shortener:

http://www.georgehart.com/sculpture/sculpture.html

http://bibliodyssey.blogspot.com/2009/08/jamnitzer-perspecti...
Offshoring indeed, not exactly in the best way, but that is what happened. They have a new UI team now twice the size of the old one.

For more info see update3 on this post. http://planetvm.net/blog/?p=2952
The Secret Guide to Amazon's Raspberry Pi Guide Which Lets Coders Use Alexa
No, he blocks/redirects all traffic with HN as referrer. Kind of a jerk move, which sucks because his site is full of useful stuff.
You raise good points. I think one of the reasons why the conversations surrounding cryptocurrencies are disproportionally emotional is that everybody is long something and inevitably biased because of it.

Also, I agree that comparing BTC and ETH is bogus, they share nothing more than a blockchain but have completely different goals and governance structures, ETH being more like a traditional startup.

In a world were most people haven't heard of blockchains or distrust them, 'competing' with other blockchains is just silly (nobody is really competing anyway, except for mindshare on forums).

Now, disclaimer, I am long ETH, though not by much. Cool sci-fi stories and evangelism aside, I think it's like other startups so it should face the same risk of ruin, which is roughly 90%. So in that sense we might even agree, except I feel like this "very first generational, highly unproven, highly unstable" might turn into something.

> once you have the unikernel model down, who cares if it's Ethereum?

That's a very technical argument, but I'm not at all convinced that the world will adopt a technically superior solution, especially if it is late to the game. Without momentum behind it, it might not even be superior for long. So if there is any application for blockchain VMs, it will probably run on the EVM, all else being equal.
In JavaScript it's quite common to see self executing lambdas like this (not empty though), because there variables have function scope rather than block scope so it's a way to limit the scope and capture closures. Does it have any practical use in c++?
Campus Shuttles Want to Speed Ahead in the Autonomous Vehicle Race
The flip side of that is that anything you do to make the US Secretary of State's job harder, also directly affects millions of lives.
Scientists Slowly Reintroducing Small Group of Normal Humans into Society
Want an Easy Fix for Your Apple Ios 9.3 Update Issues
https://github.com/jeelabs/esp-link replicates what's commonly known as a terminal server.

The default firmware already emulates a modem.

http://wiki.iteadstudio.com/ESP8266_Serial_WIFI_Module#AT_Co...
I treat each unit test as an individual assertion on the logic of the program. I find using a <methodName>_<Conditions>_Expectations syntax documents the intent very well. E.g:

testCalculateGrade_scoreOver85_returnsAnA()

You're right that refactoring the code can break tests. That's when you have to ask if the original assertion still stands. It's OK to change them if your understand of the problem has changed also.
Yeah, well, I've been hearing the "one-day we'll be on Linux" claims long enough to grow tired and move on. Developing on Windows, after having had some experience developing in a Linux/Mac environment, feels like second class citizenry. That's without even talking about nuget, etc...
> What do you use these for?

VM hosts mostly. I bought a bunch of 8GB DDR3 SODIMMs for cheap.

> Is there a way to add an extra NIC card?

You can get ExpressCard gigabit NICs for a reasonable sum. I have also seen dual gigabit mini PCIe cards available for around $50.

Me personally, I just use a managed switch which supports VLANs. None of the VMs I run are really network heavy (except when booting from a Zyxel NAS I turned into an iSCSI SAN), so having them share a 1GBit link isn't an issue. VLANs ensure appropriate separation.

They're also great to replace the wireless card if you want to make a professional grade WiFi AP. You can buy 802.11ac cards for around $80 which work with Linux. So you end up with something far better than the ARM/MIPS they sell on Amazon for the same price.

> What models do you find work best for this?

Any Intel NIC is usually very reliable. I also haven't had any problems with RealTek cards.

> but might it be possible to put a laptop CPU into a server motherboard?

I believe this was possible with Mobile Pentium 4 chips. You could put them in socket 478 with an adapter.

Nowadays though it's not possible. The architectures between desktop and mobile are too different (e.g. QPI speed, # of memory channels)

> Not sure if the laptop i7's/i5's are LGA 2011 and if the motherboard architecture would be compatible?

They're not. The Dell E6220/6230 use a BGA mounted CPU, so it can't be replaced.

LGA2011 CPUs are special beasts. I was considering to buy one earlier this year because they're so cheap (compared to present day Xeons), but then you basically have to buy an eATX motherboard, server grade PSU, etc.

You can just now buy an LGA2011-3 mini ITX board, but it's really not worth it. LGA2011 CPUs are designed for multi-socket severs.

> If this were the case you could use the server board dual NIC and out of band management

As per above, you can't do this. OOB management takes power too, and I doubt you could find a server board with these features that uses under 20W of power itself.

These laptops do have Intel ME though. I think some kind of OOB management is possible. I haven't tried myself though.
Also, it's not ok to use a phone that doesn't get regular security updates, but that means you have to trust the phone manufacturer or set up a team of experts to monitor each and every update.

Can't trust the hardware, can't trust the software. How can this device be ok to be used by a state official?
So if Apple really did make an unbreakable phone then would (should) they have the right to make Apple break it?

Let's legislate this issue now, and ignore the fact that they might be able to break it some other way. That's a side point and not very relevant.
Yet Another Car Hacking Tool
> The president doesn't need to get into every single battle.

True. But there's some debate over whether this is about one phone or about all phones. And the President did weigh in on the wider issue, which is, how to keep people safe in a world with strong encryption. He discussed it at SXSW and also in follow up comments by his Press Secretary [1]. He is convinced there is a way to guarantee warranted access to decrypt data. He does not understand that encryption technology is words on paper that anyone could write or make use of through free and open source software and apps.

[1] https://youtu.be/LRR2B5f82e0?t=38m25s
Jason has actually been rehired. [0].
You're correct on no patches since, but patches never were that fast anyways.

[0] https://twitter.com/jdotk/status/709520637396656128
In C++, "moving" and "copying" are a matter of class design. While you are expected to use move (resp. copy) constructors and assignments to, well, move (resp. copy); the language doesn't rule out using them for other purposes.

In Rust, assignment and argument passing always move, "moving" always does the right thing (make a shallow copy and invalidate the original object), and you can't override this behavior. Furthermore, Rust splits what C++ calls "copying" into two concepts: shallow copying (which is the same as moving, except the original object isn't invalidated, and the type checker guarantees you can only do it when it makes sense) and deep cloning (which may be expensive and needs to be explicitly requested by the programmer).

This is why Rust can track which objects are no longer usable.
I write in Go, and for me it is the sweet spot between all that you've said and only required a single language and a single tool chain.

There is little more to it than that.
How to measure your progress
>But I don't see a lot of discussion on how you make sure all your go daemons get updated with a new TLS/SSL/GZIP/PNG/XML-library when there's new serious bug found.

Yeah, I think it may be because it's situation dependent. For me, it always consisted of recompile all binaries and deploy them. And even then, I'm not sure people would enjoy a blog post just telling you to recompile all the things. It's not very sexy, honestly.

In my situation, it wasn't that big of a pain to do so. A lot of these libraries are within stdlib, so a security bug would incur a new release of Go. So an update should be pretty easy.

If's an external library (i.e., one picked up from GitHub for example), it's pretty much the same. Get new source, recompile binary with patched library, ship to all the things.

There are tradeoffs, absolutely. The alternative would be to write something in an interpreted language. That means we need to push a runtime environment up to the node, and that may include managing any libraries that are needed (think Rubygems). Managing these kinds of setups can be a pain, especially if a node has multiple projects with different dependencies. I found that shipping a single binary was often easier for me.

But it goes back to it being an item in the toolbox, depends on what you need and how your systems are built.
The expectation would be for ipv6 routing that you have more than a /64 assigned, but many setups just share a /64 between all devices. You need to allocate yourself a /60 say so you can allocate a /64 per VM to route.
> ....just seems illogical to spend so much effort to develop what is clearly a very limited and complex mode of operation

Quadrupedal motion is for locomotion. Bipedal motion is for transportation.

Bipedal motion frees up two limbs to carry stuff around, open locks, get into cars and drive, move into and out of crowded, people-packed spaces (elevators) where horizontal space is limited but vertical space is plenty and so on.

And since we’re taking about robots, the two freed up limbs need not be “normal” limbs but tools specialised for the job at hand that cannot be used for locomotion purposes (the "arms" can be guns, welding machines or forks for carrying weights)

Also, robots that look and act like humans are an easier sell and selling them is the hardest part about getting these robots mainstream.

Have no doubt, perfecting bipedal motion is a worthwhile endeavor.
You can in many situations do the v6 version of proxy ARP, ND proxy. See eg http://wiki.stocksy.co.uk/wiki/IPv6%2BXen_on_a_Hetzner_serve...

(No idea if it works with VMware, which I regard as devilspawn)
The situation you are describing is best handled by generative tests (i.e. Quickcheck).

And this is basically the only time I would write an unit test - when I can not capture most invariants in the types. Everything else is basically double the work and a waste of time.

Integration tests are always a good idea, but hard to get "conceptually" right. When you get to the level of testing multiple components through the whole stack most of the time IO is involved and this gets hairy fast, not to mention that one mostly tests the 3 codepaths they can come up with.

Maybe a DSL/swappable interpreter approach is one way do that? Or make everything pure again with FRP?
I wonder how long it'll take before we get usable TLS-based sessions again. AFIK the only way to do that now, is via client certificates, and the UI for that (on the browser end) is still so bad it's practically unusable.

I think it's perfectly valid (in an imperfect world) to use a (secure) cookie as a session token a la kerberos over http(s) -- and with authenticated encryption wrapped around the cookie I don't see much problem "storing" some session state in there (opaque to the user agent/user).

Still somewhat unclear what that actually buys you in terms of scalability/simplicity -- all communication should be over TLS anyway, which means there will be a session context between the user agent and the TLS terminating server/load balancer (or if you have none, between the ua and the web server).

I suppose it allows you to separate the user session from the TLS session -- which might be "fine" from a system level view, but I don't think it's really a security "win".

Anyway, I'm happy people like you take the time to maintain stuff like gorilla/sessions -- it's part of what makes modern languages/frameworks so easy to use to get stuff done (and get them done in a sane way...).
The most important piece of this article.

>DoorDash isn’t profitable and has struggled to keep some of its delivery staff, known as “dashers,” from remaining with the company for longer than a few months, raising costs to attract and train employees, according to people familiar with the matter.

>A DoorDash spokesman said the company is “cash flow positive” in its “earliest markets,” including applicable marketing and overhead expenses. He declined to name those markets. Overall the company operates in 22 urban areas in the U.S. and Canada, according to its website.
I think the first example is sorta invalid because there's a typo:

return *(uint32_t*)f;

should read as:

return *(uint32_t*)(&f);

With this change, the code indeed compiles fine (with g++ 5.3.1; not sure of 5.3.0, which the author used)
Ah, the list brings back memories of being involved with Ed Seiler. I originally helped to convert the Asimov FAQ on his website into HTML (1.0?) format [1]. It was manually done, and I enjoyed doing it.

[1] http://www.asimovonline.com/asimov_FAQ.html
> an investment system for early adopters to exploit late adopter buyers

I invite you to "exploit" late adopters as well by investing in some project. it will cure you of this notion that uncertainty doesn't exist.
Vowpal Wabbit is IO limited. Meaning that there's no way it is slower than anything else on a single machine. On multiple machines it glides faster than light.

So, the benchmark is probably incorrect for VW.
> unless you mean _one_ particular model sold with Amiga 4000

I mean (:-) Did not remember the model exactly, but as you have done, it is easy enough to find it out thanks to the "Interwebs".
It's corporate doublespeak. Orwell was worried about the State, but he was on the wrong track - it's corporations we should now be concerned about.
You can do ND proxy then.
Invisible ads, phantom readers – The state of digital advertising
No, you don't need this in C++. You can use a normal (brace-delimited) block for this purpose.
I don't see how delivering somebody else's food can be profitable, or even how they can guarantee that the food is edible as a middleman.

Maybe somebody can explain what the business model is here.

It sounds like the founders get to play big shot for a couple years while they bleed their VCs.
The lack of example code in the security section should be a worry to all.

It isn't hard to prevent SQL injection if you use parameterized SQL statement rather than using string concat, and whilst examples of this are trivial they shouldn't be skipped.

In the XSS section it mentions filtering and checking inputs, but does not mention sanitization and does not give any examples. In the aversion to use any non-standard package it also does not mention https://github.com/microcosm-cc/bluemonday or anything similar (I am the author of bluemonday - a HTML sanitizer in the same vein as the OWASP Java HTML Sanitizer).

There is some sample code, in the Filtering section, but this only demonstrates the use of a fixed range of inputs in determining a filter, and then a regexp to check the input matches a format.

Beyond the security, where the theory is at least known even if a demonstration on how to implement it is lacking... the entire guide misses out on demonstrating templates to their fullest, and specifically using a map of functions to provide the equivalent of Django's TemplateTags.

In fact, the missing link for most Go developers who are building web apps, and for those coming from outside Go, are template tags. Most Go devs I know (who seem more systems focused) don't even realise that this stuff exists: https://golang.org/src/text/template/examplefunc_test.go
Excellent，good work
> Should user be logged-in in order for this test-case to run?

Why not? This is a simple helper function or easily parallelizable block. Same with creating a sub-resource before modifying it. People act like this is the end of the world, but it isn't. And if you like, you can still do your (in my controversial opinion) silly unit tests and you can still parallelize those too!

Whether a dev can build a project locally or not does not relate to whether or not the tests can be run in parallel.
I wasn't clear. Instead:

>reassuring to see more writing that refuses to see all sides of every debate as equally valid

Treating "balance" like an implicit good is garbage. News organizations should have editors with enough judgement, and courage, to choose which arguments merit airtime. There's a difference between silencing your opponents, and refusing to give airtime to people when you can't even decide whether they are ignorant or pursuing some unstated agenda.

I don't think there are many, if any, industry experts who believe that a policy mandating weaker encryption wouldn't cause far, far more harm than good. And yet, it seems like most of the time we see these trainwrecks proceed, with coverage portraying both sides as equally valid and advocates for both as acting in good faith.
I'm not a Haskell programmer but how would you deal with a case like e.g. using a set of complex regexes for parsing some unusual date-time formats. I would want to unit test the hell out of them covering all the variations and exceptions I could think of.

I can't see how exhaustively testing a small unit like this with high-level tests would be practical in terms of setup effort and run-time.
If you are sure that the Ethereum project will fail, I'd be happy to take on bets 1 : infinity. I pay you $1 if the project is no longer around, say 10 years from now, you pay me everything you have otherwise. It would only be rational for you to take this bet, since I'm offering you a free dollar according to your beliefs.

EDIT: the intent here was to expose overconfidence and vague predictions, not pay fan service to ethereum or suggest an actual bet. if anybody is interested in how to make proper predictions, I recommend the books by Philip Tetlock, especially the latest called Superforecasting [1].

EDIT2: I wasn't aware my views are so controversial, so here is some more background: If somebody was convinced something couldn't happen, he'd assign a probability of 0 to that event. If that person wanted to act according to her believes, taking on bets, no matter the odds, would have positive expected utility. Since almost nobody takes on such bets, it suggests that we generally over-exaggerate when we say things like "impossible" or "sorry for you loss", hence we are being overconfident.
The other is vagueness. By not being clear about what exactly we are predicting, we're leaving the door open to back out of it later. In fact, Tetlock has found that, by making vague predictions, experts could later convince themselves (and others) that they were "close", skewing their sense of accuracy. Unfortunately, when subject to a prediction tournament with strict rules, they would score no better than random [2].

[1]: http://www.amazon.com/Superforecasting-The-Art-Science-Predi...

[2]: http://www.amazon.com/Expert-Political-Judgment-Good-Know/dp...
Chances are the story is reprinted in several anthologies, to boot.
Schroedinger's equation isn't a theory. It's a law. And like other laws (F = ma) doesn't account for a bunch of other things. So yes, it still is an approximation.
"Maker is a DAO based on the Ethereum blockchain, where it maintains the infrastructure for the Dai - a cryptocurrency that uses smart contract-enforced monetary policy to create price stability.

The Dai enables Ethereum users to transact with smart contracts and applications on the Ethereum blockchain without having to deal with the volatility that is associated with traditional cryptocurrencies such as Bitcoin. It also functions as a decentralized savings account as it is long term deflationary, resulting in slow and steady capital gains.

Maker is able to maintain the price stability of the Dai through the Dai Credit System, which backs the Dai with collateral stored in Ethereum smart contracts, while simultaneously functioning as an internet-based, p2p credit market that commoditizes credit by allowing anyone with valid collateral to take out loans that have low transaction costs and no middle man fees."

[0] http://makerdao.github.io/docs/
Ask HN: Building online web application vulnerability scanner
Hi i am from Nepal..i want to build online web application vulnerability scanner for my FYP.. i want help for which language will best for coding and give some suggestions.
... with Weird capitalization.
Bucklescript – A JavaScript backend for the OCaml compiler
Legislation does not make me feel safe.
Cathode is excellent, and makes working in the terminal so much more enjoyable. There's so many other little touches as well, you can include the sound of an old hard drive whirring up on startup, for instance.

I've been trying to find something similar for my Windows 10 machines, but no luck. I wish they'd port it across, but failing that I'd love to hear recommendations for a Windows app like Cathode.
All of this was already possible without Ethereum. I don't see what Etherium adds to the equation here? For example with Bitcoin you can already create escrow accounts with trusted third parties (aka oracles) being the decider.
> 90% of mining power was in one room recently

Any details on this?