skysight-inc/HackerNews huggingface dataset:
Ask HN: Asking potential employer / client for code sample
I imagine this isn't necessarily relevant for some of the biggest names in tech, but I've had the misfortune in the past (and perhaps present) where I went into a new situation (whether as employee or as consultant) hoping for the best in terms of a company with competent engineers running the show, only to be disappointed to learn that the "boss" and his/her team were anything but. I've seen a number of nightmarish codebases in my time.

So bad in fact that I think my next move should be to start requiring code samples from potential employers / clients.

Never mind them asking me for code samples. I'm fine with that. But I seriously feel I need to start asking companies for a code sample, because it's obvious to me at this point that there are some companies who just don't have any clue just how bad, and usually insecure, their code bases are.

I'm at a point in my career where I feel I should not have to deal with this anymore.

I'm curious to know if others have had similar experiences, and whether or not you think it should be a part of the "hiring" process. How open do you think employers would be to this idea?
Yeah, they do, but we focus primary on knowledge bases, not whole end-to-end support.
That's because the symbolic operator is implied for brevity. If we allowed implicit operators, would tetration be permitted as well? It sounds like a distraction from the class subject.
As the article you point to says, the temporary packs would be owned by Tesla. So no, your original battery wouldn't be in someone else's car.

Contrast this with the battery swap strategy of Better Place, in which car owners don't own batteries.
I already knew about two's complement, but I like your explanation better than the blog post.
You'd be amazed how many bugs are found and being fixed for closed source software. Especially when people are paid to do it.
Yeah, I know about that. But that doesn't really help if the app only listens while foregrounded. (In that case the red bar does usually show up briefly before the app responds to the backgrounding event, but that's not very noticeable and basically a bug.)

Location Services is a model here: like sound recording it asks for permission first, like sound recording it flashes the menu bar if an app is using precise location in the background, but there's also a small icon that shows up in the menu bar whenever it's being used, even by the foreground app.
The choice is to either (1) hold all three branches of the government accountable for enforcing the Constitution (or the Universal Declaration of Human Rights outside U.S.), or (2) let slide even further towards tyranny, or (3) there is no #3.
That's orthogonal to what I said.

But to address your implicit point about UI - 64 bits of entropy is 6 diceware words, which seems eminently doable for your casual user wanting casual security. Phones are kept in possession more, and thus need a cold-unlock less frequently. And users are still free to compromise their security by using less entropy, just as they are currently regarding Apple (and likely by extension USG, as is currently being worked out).

Also tamper-resistant hardware isn't strictly incompatible with Free software. Imagine a security model that allowed loading of whatever software image, but wiped nonvolatile storage before doing so.
Twitter turns 10 years old
Yep, as Android being the paragon of security clearly shows us.
Qi – A Package Manager for Common Lisp
In [1]: "^".isdigit()
Out[1]: False
I appreciate the gesture. :)
Can you recommend a good reference for properly setting up HPKP?
Show HN: An Instagram SDK for PHP 5.5.9+
this. indeed from my understanding the USPTO has wizened up and is no longer issuing software patents as freely as before.
Maybe in the past, but not in the future. People are much more aware of Amazon's "peculiar ways" thanks to the media. People in Seattle have far, far more options these days.
Sounds like it. They kept emailing me and I kept ignoring it, thinking it was just a routine update. Had no idea that you had to update in the next couple of days.
We have Docker. On top of it, we have docker-compose. On top of it, we have Kubernetes. On top of it, we have Spread. And it all goes on top of AWS or Google Cloud instances.

"Every problem in computer science can be solved by adding one more layer of indirection — except for too many layers of indirection".
How much longer can MS collect on FAT32?

The wiki page says patent terms are 20 years in the U.S. and FAT32 was introduced in August 1996.

https://en.wikipedia.org/wiki/Term_of_patent_in_the_United_S...

https://en.wikipedia.org/wiki/File_Allocation_Table#FAT32
Counting possible positions in the board game Battleship, regular and hexagonal
Ask HN: Apps you'd pay $1/month
For which apps you would pay $1 per month or more. It can be something that already exists, but doesn't really fit your taste.
I think the bigger point of feedback is that anonymous function signatures are drastically different from defined function signatures.
A Lisp framework for the creation of electronic art, visual design and more
At the end, it has to be both sides.
Personally I'd allow it, but I'd also mark all those answers, (and any other reasonably clever answer) as correct on the test
In 1.2 docs, isn't there a docker run command that deploys local Kubernetes cluster?
Wow, that is a very informative and amazing use of 3d printing technology.
I would rather have a dedicated light and switch to know for sure that when I set my camera and microphone to off, they're off.
Sounds like a great idea, but I wouldn't word that as "Do you have an account recovery flow? Delete it immediately."

Account recovery is shorthand for forgotton passwords and userids everywhere I look.
Either way, my point is it's an oddly popular belief that's so inconsistent with reality it can't serve as a basis for any coherent argument about adblocking.
3D WebGL game engine with online toolset
> a majority does not contribute to funding them

There are all sorts of taxes: property taxes, toll roads, sales taxes, etc. The 7 million will pay these taxes in one way or another.
Find the source code for this and other explanations at: https://github.com/vicapow/explained-visually/tree/master/cl...
As partially colorblind (like 10% of all men) picking mushrooms scares me.

Not saying I don't pick musrooms, only I only pick mushrooms I'm sure don't have any dangerous lookalikes.
> So, why are people still paying up rather than fighting? Because patent litigation is incredibly expensive. It's cheaper to pay a $5 to $15 per device licensing fee than to pay a small fortune and take even a remote chance of failure in court.

> Samsung alone paid Microsoft a billion bucks to license its Android patents.

So like, why didn't Samsung take them to court?
Only in America
I wish the FOSS community wouldn't give Nethack so much publicity.

Don't get me wrong, it's a really good game and I had really fun times with it, but it shows its age and has been overcome in lots of ways. Current players are more likely to find fun in ADOM, Brogue, DCSS, ToME, Sil, Powder, Legerdemain, etc. than they are in Nethack. Modern roguelikes (or those that are not that modern but have gone through recent extensive overhauls, like ToME and ADOM) tend to be more balanced, and especially require fewer spoilers to progress. And many of them (if not most) are FOSS too.

tl;dr: if you have never tried roguelikes, you probably shouldn't start with Nethack. Nethack is a very good game but its design is dated, and its heavily spoiler-based gameplay is not for everyone. There are more modern roguelikes that are typically a better bet for new players.
No worries. As the page states, if you don't automatically update your device by March 22, you can still do so manually. This is very easy -- connect via USB cable and then drag and drop the update onto the device.
I see a surprising number of tutorials on blogs recommending 4096bit keys and I do wonder if people know just how much extra load that is. A properly set up HTTPS site with 2048bit certs will be pretty fast - about the same as HTTP and your time will be better spent optimizing other things like images.

For anyone curious about how much slower try "openssl speed rsa2048 rsa4096" for a quick benchmark. The results are ugly.
I am actually curious what you think the problem is as well. I have been modeling possible fixes to the general issues with privacy, consolidation and restricted freedom to use the internet/communications. There are a lot of problems which I will try and list breiefly:

1. Consolidation & definition of protocols as well as inroads to making use of communications tools are controlled by gatekeepers:

1. Google

2. Microsoft

3. Apple

4. Other providers in non-english speaking countries.

I wouldn't call this easy to fix, but I don't think it is super difficult to fix this.

======

Let's assume you disaggregate some of the above and fragment it out enough where information is semi-balkaninized. I actually skipped over the initial problem referenced above:

It isn't people favor convenience over privacy (although they do) most people just DGAF. I think, and I have been considering this a fair bit lately, gov is actually pretty reasonably modeled (at least in the US) after society. No one actually values organization, deferred gratiofication, privacy or many other things I had previously assumed. So you actually just have to provide something really really great, get all the users, and provide them privacy for free and they won't care but will be semi-protected.

But, to resume here. If you build something people use, priovide them privacy, and dethrone incumbant internet companies, you still have huge obstacles:

Infrastructure. Broadspectrum is ~10 Billion for a band that can reach 200M people. Verizon is a 200B company (market cap). Comcast, Timewarner etc.

This is super hard to sort out. I actually think it is doable as well though. Let's wave our hands at this.

=======

Let's assume you have done the impossible: users all prefer amazing privacy by design top shelf UX open source software running on distributed systems in a decentralized network. You own bandwith and hard lines and insure you can protect and distribute signals with minimal interference. What do you do?

=====

No idea, pretty stuck here. I was thinking you return control to the people, but that doesn't seem to work. Obviosuly, I am sure there are some other constraints around just this general simplified model I presented, but how do you do decentralized governance. It isn't working well for Bitcoin. Interested to figure this out.
A graphical activity monitor for the command line. Written in Node.js
Sadly that means that there is likely one group of people in MS saying, "enforcing these patents gives us a large revenue stream that we don't have to do anything to maintain" (except for paying lawyers, but lawyers probably form part of the core of this group).

On the other side, there is likely another group of people in MS saying "hey guys, if we give up this massive guaranteed cash flow we could receive an impossible-to-predict-or-measure amount of goodwill from ill-defined groups of hypothetical people who might all just hate us anyway no matter what we do, and even if it does make them like us more we're not sure if it will really make a difference in the long run."

Now, I would be squarely in the latter group, because I think it's the right thing to do and is consistent with the kind of company that MS appears to be trying to transform itself into, but I've gotta think that that's a very tough case to argue to anyone who is actually in a position to make that call and is therefore held responsible for the outcome. I would try to make a much more convincing argument than the strawman I presented, but since it's all about intangibles, someone with an opposing viewpoint could probably make just as convincing of a case by framing my intangibles as that strawman, and there's not a whole lot anyone could say to refute it.

It's a local maximum seen throughout the industry- I think there is a growing realization outside of the usual niches (open source advocates, HN readers, etc.) that software patents are doing more harm than good, but in the individual isolated cases it still comes down to people arguing internally that an organization should give up a guaranteed revenue stream in exchange for theoretical goodwill that may or may not actually benefit the company in any tangible way. Lots of people hate stupid patents but patent holders would rather change the system for everyone, than go out on a limb and make a sacrifice like that with no guarantee that their competitors would follow suit. I don't envy anyone trying to fight the good fight in that environment.
How much is a Firefox exploit worth, in any market, compared to a Chrome exploit? My understanding is: significantly less.
I have pushed the change. Once caches are refreshed you should see ~11 template repositories without having to search GitHub.
Powa Technologies’ global ambition, and PR spend to match
Trump appears to actually believe he can make his promises come true. And in that sense he can be said to be more honest than a lot of garden variety, cynical politicians.

At the same time, he doesn't seem to have his facts straight about a lot of important things.

One picture of Trump that emerges is: strong-armed CEO surrounded by yes-men and sycophants. He's used to going unquestioned. He's used to "being right" just because people around him affirm his statements without questioning them.

He seems to live in a fact-bubble of his own creation. But because it's different (and to many Republicans and a few others, more appealing) than the fact-bubble around Washington, he polls well.

But what's actually going to happen if he gets elected?
I don't see how a markov chain has something to do with pagerank. I understand that pagerank use graphs, and a markov chain is some kind of graph, but I don't see anything else.
You can sort-of optimize your ad javascript. Some of the ad networks are starting to require that you ads come essentially pre-packaged and be under a certain size.

They still might have dumb code and overly fancy animations of course.
I wrote a react-starter app a few months ago for my friends I was trying to convert to react, and so I could streamline making smaller prototypes.

As a teaching tool it was ok, but people kept getting tripped up by the webpack / build tool phase of the app. It's different than the way most people start apps with angular or backbone.

I also dislike boilerplates, I hate making a project with someone else's legacy code baked in.

I thought it would be nice to have a dependency wrap around the webpack / babel api for me, so I made https://github.com/eanplatter/enclave. So far it's helped my noob friends get introduced to React without having to think about webpack, but also doesn't add boilerplate code to the app.

Sorry for the shameless plug, just thought it might be relevant :D
You seem to be right. I wonder why I am able to play my iTunes videos on non-Apple devices...
The same can be said for any public company.
Bent Basket: A bike basket designed like no other
I was with the dad until he started to use his daughter as a launching platform for his own personal crusade against his political bugbears. After that it became clear that he cared less about his daughter and more about his politics.
Patents are like nuclear weapons - they stay dangerous for a very long time, most who have them claim their primary function is to scare others who have them away from attacking them with theirs, but their actual function is to scare and extort anyone who doesn't have them into doing what the patent-holding assholes want. Of course we want to hold anyone who has them under careful scrutiny.
But proprietary software vendors have an interest in keeping things secret, while open source code can be reviewed by people who have an interest in making problems known.

With your logic, you might as well say that freedom of information laws are useless because nobody can review all of the government's documents by themselves. The point is not that anyone can review it all by themselves--it's just that it's more reasonable to trust things that the public can verify rather than unsubstantiated claims by someone who has an interest in keeping things secret.
I guess if your criterion for "good software" is "mostly works" then that's fine. Mine are better.

But I have seen bank code. It's terrible. I've seen credit card handling code. It's terrible too. Phones used to be reliable devices, but the average uptime of my phones has fallen to something like 3 days. Perhaps 3x/day my phone tells me that some app has stopped and that it would like to send a bug report. The code that runs cars is terrible too: http://www.safetyresearch.net/blog/articles/toyota-unintende...

Most companies I visit have bug databases with hundreds or thousands of open problems. And that's the just ones they know about, the ones where people take the time to report the bug. Things are terrible and people are just used to it. In the aerospace industry, it's called "normalization of deviance", and it's what destroy the Challenger.

None of this is necessary. It's been at least 15 years that Kent Beck has been talking about the various quality practices that drop bug rates dramatically, including test-driven development, pair programming, and continuous integration. It has been at least 10 years that Martin Fowler has been reporting on teams that have bug rates below 1 per team member per month.

I'm certainly willing to be charitable about the people. A lot of organizations making terrible software are staffed with perfectly nice people who mean well. But I decline to be charitable about the software. These are commercial products, not ash-trays made by second-graders at day camp. The software should stand and fail on its own, with no charity needed to soften the blows.
Gurgaon has survived without a municipal govt for four decades
Your comment is unresponsive to Rayiner's in two ways.

First, it has simply never been the case, since the time of the Presidencies of the founders themselves, that espionage was limited to times of war, or for that matter to countries with whom we had declared war. The President has always been able to spy on other countries.

Second, Rayiner himself concedes the distinction between spying on US citizens (an activity restricted by the Fourth Amendment) and spying on foreigners abroad (an activity not restricted by the Fourth Amendment).
It's not clear we have enough hardware. I've been trying to get a handle on the processing power needed for human level AI. If you take the naive approach and assume it's just a matter of getting models with the same number of parameters as the brain has synapses, our biggest models are about a million times too small. If you assume Moore's law will remain dead, then it may be a long while. Then again if modern deep learning is amenable to some sort of ASIC it could happen much quicker than one would expect, depending on how much investment is put into such things. And who knows how algorithmic advances will change things. If we ever get quantum computers, they're likely to be very useful in the design of conventional computers and materials technology in general, so another age of exponential advancement isn't out of the question.

It's very, very hard to be certain about these things.
Hide items on HN?
Wouldn't it be a good function? Something like reddit hide link
Fixed this issue with the message showing "waiting for load balancer" - now it returns the NodePort!
Is Innovation Over? The Case Against Pessimism
I handle that with two variadic functions (arguments are stringified and spaced):

template <typename... A> int shell(A... arguments)
template <typename... A> string execute(A... arguments)

shell() does a system() and returns the exit code (so the output is echoed in the terminal).

execute() launch a process with popen() and returns the captured steam as a string.

About capture of stderr with fork(), I like the way it's done in Node.js: https://nodejs.org/api/child_process.html

shell: https://github.com/vmorgulys/sandbox/blob/master/stackcity/s...

pfile: https://github.com/vmorgulys/sandbox/blob/master/stackcity/s...
Seems like you could distinguish between "recording" and "listening" in that case. Then "recording" is only initiated upon the activation of a trigger which confirms two-party consent.

Though I wouldn't be surprised if Apple intermittently recorded background noise for ex. training purposes in violation of that, anyways.
As a testing company, maybe I would advise the teacher to give a discretionary, external reward for creativity, and maybe provide an advanced lecture for those inquiring students, but for policy reasons, people just want to know if students understood the content to measure pedagogical policy. You can either ask students to write an essay (unscalable and contingent on other skills), or you could ask a question with true and false answers.

Otherwise we cannot measure the efficacy of pedagogical policy.
Bypassing Antivirus with Ten Lines of Code
the post work
If you see some ends of hashed rails with these yellow and black striped block 'caps', those are actually designed to bend inward towards the road so that if a car hits the end of the rail head on, the way the rail is designed to crush will force(move) the car to continue moving forward on the road-side of the guard rail.
And that's why I have severe obstructive sleep apnea even though I don't fit the profile for it at all (I'm 150 lbs, 26 years old, and otherwise healthy).

Anyway, I'm quoting the doctor, but I'm not ruling out the possibility either that he might have exaggerated a bit in his sales pitch.
Part of why Argentine ants have become such a problem in the U.S. is that when different colonies collide, they don't combat at all (usually) and instead merge to form supercolonies.
> a this is an English language forum

Are you saying that HN is only relevant to English speaking folks?
Mark Cuban's Thoughts on the Presidential Race and SocioCapitalism
How South Park Saved Fair Use
Not sure what makes you think Kubernetes is on top of docker-compose. It's a fundamentally different model for deployment. Pods, scheduling, DNS vs. links, autoscaling, etc.

Additionally, kubernetes will soon be able to use both docker and rkt containers.
Does this tool only replace the magic string from the source code or will it also replace directory names?

For example if I had a sub-folder in my project named "magic_ProjectName_magic/src" will it prompt me to change the name of the sub-folder?
Stack Overflow Documentation: The Update-En-ing
The construction analogy falls down when you take complex software into account. The developer can make the difference between a an amazing product and bad/average/good product
Trump Knuckles – 3D printed rubber Trump Knuckles
His point isn't that the President has unlimited powers overall; it's that the powers delegated to the President are generally exercised at the discretion of the President.

Look no further than the presidency of Thomas Jefferson, our third President and a staunch opponent of a powerful executive branch: practically upon obtaining office he launched a covert military offensive without the authorization of Congress! If Jefferson wielded a particular kind of executive power, and Adams advocated for that power, and Madison did the same, it becomes difficult to suggest that the framers intended something different in the language of the Constitution they wrote.