HNHacker News
TopNewBestAskShowJobs

steventhedev

1,125 karma · joined October 23, 2013

Flawed human being, but always trying to improve
submissionscomments
steventhedev··on Bash 5.0 released
My guess is that it's less about performance so much as reliability. I've had three incidents in the last two years which required connecting to a server that had an out of control process pool that had exhausted pids.

I also had a storage controller go and had to figure out how to use shell builtins to create a tmpfs and reflash the firmware.

There are many reasons to provide builtins for basic file commands, from saving the extra process start to the tiny performance boost for scripts that should probably be using find instead.

steventhedev··on PyPy for low-latency systems
Context is king. When you're working on the timescale of days, low latency can be within minutes. By the same measure, when you expect to get a new event every microsecond, then nanoseconds matter.

In this case, Gambit (the outfit who sponsored this work) are a stat arb shop doing HFT. So I'd say the label fits.

steventhedev··on Ask HN: What is a secure way to allow 2FA resets?
> If you are building consumer grade software, go with a reset procedure through email. The consumer is responsible for keeping that secure. If their email gets compromised, it can't be your responsibility.

That defeats the whole point of 2FA.

steventhedev··on Ask HN: What is a secure way to allow 2FA resets?
True.

I'd argue that trumps all other control over the account. If you can show that you control the payment method, then I'll accept you as the legitimate controller of the account. So, notarized, translated, and apostilled letter from the bank branch manager stating that you are the person in control of the account, sent by certified mail with signature delivery and I'll send you back a link to type in manually the same way.

As a shortcut, I'd say it's mostly safe to accept a picture of someone's face holding up their photo ID with the same billing address.

Or confirming the amount and/or origin (some banks/credit systems do not display the merchant name for some halfbrained reason) of a small transaction (e.g. 1.37 USD from merchant account ACMECORP-294817) that is refunded after a week.

steventhedev··on Ask HN: What is a secure way to allow 2FA resets?
For a business setting, that's a red flag for KYC, but for a B2C app, that's a very legitimate concern. If I were in that position, I'd probably just insist on seeing some proof that I can tie to the payment method, because otherwise how do I know you're John Smith from 123 Residential St, or John "the crook" Smith from the bad side of town? Bank statement, photo ID, etc.

Remember that this process needs to be painful. You already screwed up by losing your 2FA. It sucks, but if it doesn't, then it defeats the point of having that 2FA in the first place.

steventhedev··on Ask HN: What is a secure way to allow 2FA resets?
Consider the threat model:

An adversary takes over the email account, and checks if they reused their password on your site. If they didn't, then they'll try to reset the password, and you should check the second factor before resetting the password. If they did reuse their password, then you should check the second factor on login (assuming it's coming from a previously unrecognized source). At this point, the attacker will either give up, or attempt to contact your support channels, impersonating the user.

It's up to you what restrictions you place on your support mechanism for resetting 2FA. I would suggest a combination of the following:

- photo of a currently valid credit card associated with the account

- photo ID with address that matches billing address

- mandatory 7 day delay in the reset

- prove access to the payment method by issuing a payment for some fractional amount and request the amount, then refund it (or don't and keep it as a "security fee")

But no matter what you do, please please please be consistent. Train your entire support staff (if any), keep records of when people talk with you, don't disclose when the last time you talked was, and insist on following a process. If your process fails, see how and improve it.

steventhedev··on Behind the Market Swoon: The Herdlike Behavior of Computerized Trading
Because your portfolio is neutral in terms of the market/sector, but not on individual options. A good place to start is to read up on statistical arbitrage.
steventhedev··on The Ant Design Christmas Egg That Went Wrong
Read the EULA for Windows; or Chrome; or Firefox; or Word; or ... The no warranty clause is included in the BSD, MIT, GPL, MPL, and Apache licenses (and many others...)

Sometimes things will work out for you, sometimes it means exactly what it says on the tin: "I don't promise this works"

steventhedev··on Ask HN: What should an ideal developer interview process look like?
As the person being hired: the process should help me reject workplaces that I would not enjoy, succeed, or grow at. I should get accepted into any place that satisfies the above criteria.

As someone doing the hiring: the process should help order applicants by the value they will provide to the company, accounting for future growth and current abilities.

In both cases it should do so as quickly as possible, to avoid wasting my time. Sadly, neither of these are really realistic, but starting from these first principles, you can see a few simple things that can improve the process: Early rejection in both directions, settings expectations, and that the interview is a two-way street and while some interview strategies may work in one direction, they will alienate the other side so quickly they are ineffective on the whole.

I have some ideas regarding the rest, but nothing that hasn't been mentioned elsewhere.

steventhedev··on Amazon FBA Experiment
Would Amazon accept those for FBA in the US? If not, then it may be tedious to register a legal entity abroad just to get cheaper UPCs that you can't even use. If they do, then it would be worthwhile building a list of countries with cheap/easy UPCs and cheap/easy legal entity registration.
steventhedev··on Amazon FBA Experiment
According to this[0] it costs 250 USD for 1-10 codes in the US. Where can you get them for cheaper?

[0]: https://www.gs1us.org/upcs-barcodes-prefixes/get-started-gui...

steventhedev··on Show HN: Arcentry – Create Interactive Cloud Diagrams
Looks like the keyboard shortcuts don't map to Mac well. Command-A selects all the text, but Control-A works as expected. Worse, when I hit backspace to delete everything, it did a browser back. The illusion of an app was lost instantly.

It might be a good idea to add a "component vendors" setting to quickly filter out GCP stuff or AWS stuff if you don't use that specific cloud.

Otherwise looks very interesting, and somewhat useful, although I doubt I'd ever use it for the monitoring stuff. That makes for a neat demo, but I'd use this for documentation, not monitoring.

steventhedev··on Status.github.com: “We're failing over a data storage system”
You are quite correct. I had meant the paid hosted version. Maybe they used to call it GHE at some point? Dunno why it got stuck in my mind like that...
steventhedev··on Status.github.com: “We're failing over a data storage system”
It sounds like you're using GH for ticketing also, which means that your R&D org's productivity is tightly coupled with an external companies uptime. Self-hosting Gitlab is easy, as is running Jira, redmine, and a dozen other tools.

If you can't do your job without a tool, then you need to have a plan B on hand for when that tool fails. Both in the micro sense of the tools you use to code (editor, browser, laptop, mouse, coffee mug, etc) and in the macro sense of tools your organization uses (ticketing systems, chat, bathrooms). Show some initiative, figure out some mirrors for your dependencies, and try standing up a local caching proxy for your team. It'll probably take a lot less time than you think.

steventhedev··on Status.github.com: “We're failing over a data storage system”
Are you a paying customer of GitHub Enterprise? If not, then you're getting your money's worth.

Snark aside, this is a great time to reassess your deployment strategies and look into things like local apt and pypi proxies. I'm confident you can find similar projects that will transparently cache your dependencies.

steventhedev··on How to Write a Technical Paper [pdf]
I've always been pointed towards Whitesides[0] for this, but found the advice overly specific for chemistry.

[0]: https://intra.ece.ucr.edu/~rlake/Whitesides_writing_res_pape...

EDIT: reading @adtac's reference, it also recommends "Writing Technical Articles"[1] as an additional reference (the URL in the paper is not copy-pasteable because of a unicode tilde)

[1]: http://www.cs.columbia.edu/~hgs/etc/writing-style.html

steventhedev··on LaTeX TikZ for Cryptographers
I meant the code for the site, not TikZ/PGF
steventhedev··on LaTeX TikZ for Cryptographers
Is the code that powers this open source? It would be useful to collect snippets for other fields
steventhedev··on List of Websites not available in the EU because of GDPR
Or perhaps they've been advised that because they have an email subscription, they'd need to hire a full time DPO, and their outside counsel quoted them several thousand dollars a year.

It's simple arithmetic to decide it's cheaper to block all EU visitors.

steventhedev··on How LeBron James' new public school is the first of its kind
> In other words, anyone moving to a house in a good school district leaves an empty house in a worse one.

Exactly. More demand for a fixed supply in the "good" school district, reduced demand for a fixed supply in the "bad" one. Property taxes are in some part based on the demand for houses as reflected in the assessment price. So even assuming that the market keeps those houses occupied by owners, long term the trend will be towards larger tax revenues for the good district, which drives a larger budget for education, which in turn attracts more demand for the homes.

steventhedev··on Why No HTTPS?
With 10B monthly requests, you speak from a position of having an operations team who spend 40+ hours a week on keeping your site secure (possibly even a dedicated security team?). Most sites do not have that luxury. If you're doing that on your own, then you're far from the average site operator that I'm referring to here. In fact, most everyone on HN is not the average site operator I'm talking about here.

My poorly communicated point is that by using extreme language like "I'm going to hack your static site" dilutes the message and makes average operators less receptive to more advice in the future. Troy does a lot of good work on reducing friction and advocacy, but sometimes he puts out more extreme content like this which makes me worry that it may have the opposite effect.

PS - Do you think the vaccine analogy works? I'd appreciate some advice on how to improve it

steventhedev··on Why No HTTPS?
Please put yourself in the shoes of someone actually operating a site. Every single issue mentioned in that post only affects end-users. Not a single issue for the operator, who has many other issues that are more urgent such as turning a profit, securing that database that got wiped last week, and writing actual content. Point being that the incentive to force https for a static site for an individual site operator is just not that great.

The sad reality is that http->https redirects are like vaccination. In some specific cases they are needed (such as login pages), but for some it's more about herd-immunity (normalizing https usage and ensuring availability). Mind you that there's a solid argument for allowing self-signed certs to allow encrypted but unauthenticated transfer. This mode allows MitM, yet does protect against the threat model of a passive eavesdropper.

steventhedev··on Richard Feynman's Integral Trick
Offtopic, but when did medium start with a soft-paywall? 3 articles per month?
steventhedev··on Diagnostic of an unexpected slowdown
Why wouldn't pgbouncer work here? Are the connections all coming from the same client with the same lifecycle?
steventhedev··on How not to structure database-backed web apps: performance bugs in the wild
there's a race condition between checking if something is in the cache and actually putting it in the cache. A more correct solution would have all threads wait while one does the actual work.

This gets more complicated if you have a distributed cache and/or distributed application servers. The typical solution there is to allow at most one computation per process/device.

steventhedev··on Learning to See in the Dark
Along the lines of adversarial inputs, how hard do you think it would be to construct a test page to determine if a machine is affected? Such as front loading most of the page with 8's and then putting some patterns of 6's and 9's. Confirmation is overlaying the copy on the original, and seeing where it differs.

Similarly for this approach, it looks like it does a great job, but some simple image processing would help smooth out the noise of the "traditional" pipeline and provide at least a more mathematically deterministic output. On the other hand, this points out that our brain only really cares about a few bits of information out of an image (e.g. the title of the book is readable in the processed image). So if it fills in the dark portions of the image with junk data, perhaps it isn't all that bad in practice.

steventhedev··on Your app shouldn't suffer SSL's problems (2011)
Ransom in the sense that if you can hijack the DNS resolution for a website and set HPKP, you can then ransom the keys back to the legitimate owner. Or just destroy them and enjoy the damage. Imagine a domain squatter who grabs a domain, and sells it off, but set HPKP with a really long expiration. It needs to be strict to provide any security benefit, but that same strictness inherently allows it to be weaponized to deny legitimate access. UX and policy in the future will become more nuanced to mitigate the potential damage.
steventhedev··on A simple DIY Heroku replacement to keep your hosting costs down
Just playing with the sliders on the pricing page show I'd pay almost double (~130/m) what I pay now for Heroku (~70/m).

I see you're the cofounder of NodeChef. You need to rethink either your pricing or your market position. Also, it's customary to be upfront about conflicts of interest, by declaring "I am the cofounder of NodeChef". Better than trying to hide it (which comes off as scummy), or expecting people to dig through your comment history, which is just lazy.

steventhedev··on Sshtalk: An SSH-based chat made in assembler
If golang is your thing, take a look at this[0] or that[1]. You can probably find similar ones with some quick research.

The neat part is that you can easily pull down someone's github keys and automatically authenticate them against that identity. You can follow up with an email/password registration as a backup identity provider, if you really want to push the envelope (and save the public key for future automatic authentication).

Of course, if you're just looking to hack something together quickly, you can simply force a specific command to be run.

[0]: https://github.com/shazow/ssh-chat [1]: https://github.com/gliderlabs/ssh

steventhedev··on Creating a Modern OCR Pipeline Using Computer Vision and Deep Learning
I use SSHFS to work from home, and then X11-forwarding to run gitk/git-gui for the occasional git ops that take too long otherwise.

But for personal projects I use syncthing, which supports .stignore, gives you versioning options, and most importantly doesn't randomly revert your files back to a previous version because of clock drift.

← PreviousPage 5 of 9Next →