HNHacker News
TopNewBestAskShowJobs

bsamuels

2,082 karma · joined November 20, 2013

Director of Engineering @ Trail of Bits. If you want to ask me a question, please send an email rather than reply on HN.

https://twitter.com/thebensams

https://github.com/bsamuels453

submissionscomments
bsamuels··on I Created a Trading Simulator
The same claims about TA/EMH are made as part of the CFA study materials that are made in the investopedia I linked.

I'm afraid I don't know what else to tell you, there's no public links to CFA Institute study materials and they're a pretty definitive certification authority in finance.

bsamuels··on I Created a Trading Simulator
No, for technical analysis to work, EMH needs to be false.

If EMH is strongly true, then the price of a security will always be priced to the intrinsic value of the underlying. For TA to work, the price needs to be divorced from the intrinsic value because the change in intrinsic value of an asset doesn't follow any pattern.

If EMH is strongly true, even fundamental analysis should yield no alpha since all public information would be integrated into the price. That's why there's a distinction between strong and weak EMH.

https://www.investopedia.com/ask/answers/032615/what-are-dif...

bsamuels··on I Created a Trading Simulator
Honestly, I have no idea. I don't know any proprietary traders who use candlesticks/TA. The one or two people I know who use TA are hobbyists who watched some videos on youtube.

I might be in the wrong here, but all my experience points at TA being something that's used to sell online courses/generate advertising revenue rather than being a legitimate way to trade.

bsamuels··on I Created a Trading Simulator
People who trade on technical indicators like the author have to consider the market to not be accurately represented by brownian motion.

For technical analysis to be anything other than an abstract form of gambling, the efficient market hypothesis has to be flat out false.

Representing the market using brownian motion only applies in cases where the market is under the weak or strong forms of EMH.

bsamuels··on CISA Rumor Control
And how do we know that the guy in that youtube video isn't just another quack saying things so people will pay them attention?

If you're going to dismiss all information out of government agencies simply on the basis that they're authorities and you don't like what they have to say, you should probably buy a gun and move into the woods

bsamuels··on Docker to rate limit image pulls
This is an excellent point. Trying to find out if docker build --pull without an accompanying blob download will trigger the rate limiter.

If it does, then this will definitely be a reason to riot. It will effectively mean that anyone who wants to do more than 200 builds every 6 hours using the "right" way will have to get a docker pro subscription.

bsamuels··on Docker to rate limit image pulls
Let's say someone hacks a maintainer for the Ubuntu base image. The hacker publishes a new version of the base image with a backdoor.

When the backdoor is detected, you now need a revocation system so the distribution of the malicious image will die. You can theoretically do this on the tracker level, but people may build other trackers that may not propagate the changes.

bsamuels··on Docker to rate limit image pulls
The hardest part of that would be verifying image authenticity.

Google Cloud uses an adjacent feature called binary authorization. When turned on, only images that are signed by a given authority (usually your ci/cd instruments) can be run inside your Kubernetes cluster.

Binary authorization may be a good starting point for someone trying to make bittorrent distributed images a usable thing.

bsamuels··on Docker to rate limit image pulls
There is very little reason for a build node to need to pull 200 images in 6 hours, and here is why:

When a machine issues a ``docker build`` command, the program reads the relevant dockerfile to check for any base images that need to be pulled (a la "FROM:")

These base images are identified based on the image repository, image name, and image tag. The first thing docker does is it checks its local registry and tries to find a match for the base image the docker build is requesting. If a matching image is located in the local registry, it uses that one in lieu of downloading the image.

This is significant - if your organization only uses a few dozen base images from DockerHub, those images will only be downloaded by each build node _once_, then never again.

Many docker users erroneously believe that if their Dockerfile requests a "latest" tagged image, docker build will always download the newest version of the image. However, the "latest" tag is literally just a tag, it doesn't have any special functionality built in. If the docker build command finds an image tagged "latest" in the local registry, it stops there.

The only way to get docker build to always use the "actual latest" version of the base image is to add the "--pull" parameter to the docker build command. This arg will tell docker build to check the repository remote to see if the SHA hash of the image tagged "latest" has changed, and if so, re-download and use it. In the absolute worst case, this means each build node will pull 1 copy of each base image when the base image is updated. So unless you use 200 different base images that all have updates deployed to Dockerhub each and every day, you are fine.

bsamuels··on Tesla jumps 14% on S&P 500 inclusion speculation Now the 10th by market value
Great question; index funds rarely carry the entire portfolio of 500 securities - it's very expensive to manage that much stock at scale and rebalance each one.

What they do instead is hold a limited portfolio of 10, 50, 100 stocks from the S&P500 that best "represent" the index.

Technically Tesla is already in the S&P500; the real question is whether index fund managers are going to decide to start using it in their representation of the index.

The other commenter is also correct. There are many ways to hedge in favor of or against a stock issue becoming indexed by S&p500 funds in a way to dampen the impact of people trying to 'front-run' (although it's not actually frontrunning in the legal sense)

bsamuels··on Facebook fires employee for publicly scolding a colleague
The first few replies are even more telling. When someone tells him that calling out a coworker is in bad taste, you get this gem

>oh no Arthur thinks I'm rude, how will I recover

https://twitter.com/aweary/status/1267927023596400642?s=20

bsamuels··on Lemonade files S1
how do you tell the difference between investing in growth and poor underwriting discipline in such a young company?
bsamuels··on What developers should know about TCP
Why doesn't the congestion control part of TCP prevent buffer bloat[1]? Is it because ISP throttling of the internet connection doesn't touch the TCP packets themselves?

I recently started doing off-site backups, which requires my entire internet uplink to be used for uploading said backups for about a week at a time. The internet basically becomes unusable because all the packets end up in a buffer on the router and latency spikes to 5000ms.

[1] https://www.bufferbloat.net/projects/bloat/wiki/What_can_I_d...

bsamuels··on Facebook uses 1.5B Reddit posts to create chatbot
They probably run a sentiment analysis on the content before feeding it in so they can filter out the ugly highly upvoted content.
bsamuels··on How to get stock fundamentals data with Python
They're the only provider if you're not willing to spend several thousand per year. Beware that a lot of their info is scraped from other sources and does not have accuracy guarantees.

You can also scrape the fundamentals directly from the 10-K statements each company publishes, but it's very difficult to get a clean, consistent dataset out of it.

bsamuels··on The cost of a 1TB SSD drive just dropped below $98
I definitely felt the same way when I was shopping for my first NAS. A two-bay Synology ran about $300 for new on Amazon and I just couldn't figure out why it was so expensive.

A few months later I picked one up used on Ebay for $120, and after using it for a few weeks, I can now report why these cost so much.

The amount of software that comes on this thing is absolutely mind blowing. I was able to set up a bidirectional sync to my cloud drive, differential backups, compressed folders for archival, and a backup to Glacier for off-site backup without writing a single line of code.

With a bit of additional digging into their package center, I found out I could install Docker & run GitLab on the NAS, along with a bunch of other self-hostable software.

I realize I could have probably built my own NAS and used FreeNAS for a fraction of the price of buying new, however the amount of time that would have spent configuring/debugging/setting up FreeNAS makes the vendor-purchased NAS a much better investment.

bsamuels··on The NSA called me after midnight and requested my source code (2018)
No, it's not whataboutism. His statement is that "the NSA is the shadiest agency". I am arguing that it is not the most shady.

If I tried to justify the NSA's behavior _because_ of what the GRU/IRA/CIA does, that is whataboutism. Hope this was a bit helpful.

bsamuels··on The NSA called me after midnight and requested my source code (2018)
I'm sorry but if you think the NSA is the shadiest government agency on the planet, then you live in an information bubble.

Do you think the NSA is shadier than the KGB? What about the Iranian Revolutionary Guard? Or even the CIA?

I know people are upset about the Snowden revelations but there are much graver sins that have been committed by other agencies.

bsamuels··on Stripe records user movements on its customers' websites
I honestly cannot fault him. While online fraud prevention is a massive industry that touches almost every major website we use, you don't exactly have people giving talks about how serious the problem is or how advanced the detection tooling is because the nature of the industry requires you to keep your methods secret.

Heck, I have a friend who's working on a non-finance web app with <20k MRR, and even at that size he's starting to encounter fraud problems that require tooling to mitigate.

If your app stores any data that may be sellable on the dark web, you are a target.

bsamuels··on Comparing the new Redis6 multithreaded I/O to Elasticache and KeyDB
why a separate project for keydb? couldn't all this just be merged into the main project?

are there significant architectural changes/tradeoffs in keydb that made it not-ideal to merge into redis?

bsamuels··on Stock buybacks are dangerous for the economy
If you think the value of your company is going to increase faster than the 0.05% interest on a loan from a bank, you should buy the stock then sell it again later when it has appreciated.

Another important detail is that you only have so much stock you can issue. When you pay back a big wad of debt, you can take out some more debt. When you issue stock, that stock is basically gone unless you buy it back.

bsamuels··on Stock buybacks are dangerous for the economy
The point about executive compensation is probably the most poignant.

If you pay an exec team with fixed price stock options, they can run the company into the ground with debt to issue stock buybacks and do absolutely nothing to improve the business and increase the value of their stock.

Stock buybacks do have a place though. When you issue stocks, you're doing so to raise money for the company. You can think of issued stocks as a kind of debt you've issued that continuously pay interest over time, except the interest isn't cash or dividends, it's equity in your company as it grows.

If you know your company is in a good place and the stock is undervalued, you could convert that debt so instead of having to pay equity as interest, you pay a dollar amount to a bank. But that tool could also be used to artificially inflate the value of fixed price stock options that may be issued to execs.

bsamuels··on I Want Off Mr. Golang's Wild Ride
this is the only comment on this thread that gave me any pleasure to read. thanks for sharing
bsamuels··on Sherlock: Find usernames across social networks
what use does this tool have outside doxxing
bsamuels··on Mikhail Gorbachev’s Pizza Hut Thanksgiving Ad
nobodys telling the president to do anything, they tell the press to not film it.

not sure why that kind of misunderstanding is worth making a throwaway account and getting upset over

bsamuels··on Firefox Replay
you can virtualize linux, you cannot virtualize macos.

no, downloading sketchy images or hacking your virtualization software does not count.

bsamuels··on Julian Assange and visitors were spied on by security firm for US intelligence
I don't get what's shocking about this.

If you have a consistent history of publishing a foreign government's state secrets that damage its national security, they're gonna spy on you.

And before the nitpickers jump in on me, I believe whether or not Assange actually damaged US national security by publishing leaks is a decision best left to people who actually work in national security rather than armchair bystanders like myself.

bsamuels··on Illegal drones ground water-dropping helicopters in Maria fire battle
For the purpose of non-aviation people reading a comment thread about drones, it's good enough. I could edit my post and include all the weird side cases about controlled airspace but at the end of the day it's not relevant to the reader.
bsamuels··on Those People We Tried to Cancel? They’re All Hanging Out Together
Demonizing people who have a different upbringing, culture, and worldview as being wrong just because they don't share a set of values with you is to be part of the problem.

It's a modern analog of a European explorer viewing native Africans as savages because they don't have the same culture and values that you do.

bsamuels··on Those People We Tried to Cancel? They’re All Hanging Out Together
Who gets to decide what a questionable moral is? The offenses in the article seem to be a whole lot less severe than being a member of the KKK.

Where is the line? If I make a donation to the Republican party, does that mean I have questionable morals? Roughly half the country is Republican, do they all have no morals?

That is what the article is trying to grapple with.

← PreviousPage 3 of 12Next →