HNHacker News
TopNewBestAskShowJobs

daniel-levin

870 karma · joined December 8, 2012

submissionscomments
daniel-levin··on 20 years on AWS and never not my job
Before the AI craze, there were plans to allow guests to cleave off an AWS-managed enclave and expose IMDS to only that enclave [0]. No creds would ever be visible to the guest. The enclave would function as a signing oracle. The exact interface was being bikeshod before the project was shelved in the name of geNAi lEaDeRsHiP.

[0] 86a7b126fea03dd57e6a3c9c9b7951b5318d33029cef0547ff441862174682f5 is the sha256 of the shelved project’s name

daniel-levin··on A Nigerian professor who makes more money welding
Difficulty is relative and practice makes perfect. People love to compare difficulty of processes, metals, positions etc. They’re all hard without practice. They’re all easy with a lot of practice. If you just want to fuse some metal it can be very frustrating to fight with the welder and get nowhere. But if you’re deliberately practicing, getting hundreds of hours under the hood, you will get good. The other crucial component is that other humans have worked out how to weld metals effectively and have documented it. There are tons of handbooks and manuals, detailing which techniques and consumables you should be using for a given weld. Combine that with lots of time under the hood, and you’ll be making phenomenally good welds without difficulty.
daniel-levin··on “My PGP key is compromised, and at least many of my bitcoins stolen”
Coinbase unironically suggests using PKI to protect oneself. It’s unbelievable self-satire.

https://www.coinbase.com/blog/celer-bridge-incident-analysis

daniel-levin··on Deterministic Linux for controlled testing and software bug-finding
Neat! This is the direction I’d hoped to see gvisor go in. What’s the reasoning for building from scratch and not piggybacking off gvisor?
daniel-levin··on My favourite C++ footgun
I think if you come from the JVM / CLR world, you are so protected by the runtime’s patching up of references that it might not even occur to you that a (raw) pointer to a data structure’s internals can dangle after the data is moved around. The runtimes mentioned pause your code, move things around and even compact the heap and your references magically still point to what they did before!
daniel-levin··on 50B birds live on Earth, new study finds
Presumably not including chickens... broilers only live for 33 days on average
daniel-levin··on How to look at the stack with gdb
Recommend watching this.

https://m.youtube.com/watch?v=PorfLSr3DDI

daniel-levin··on School or Prison
Have you ever set up a high-occupancy building in a structure that isn’t rectilinear? It’s a space efficiency nightmare to fit naturally rectangular fixtures and appliances to rounded walls. I worked in a beautiful post-modernist building with a terrible architectural oversight: the aesthetically charming glass panels acted as a lens that focused light in a way that heated the whole office up. The AC had to be cranked up high just to survive in there. I would take a well-lit, well-ventilated box over a more architecturally creative space that causes its occupants problems.
daniel-levin··on SolarWinds hackers were able to access Microsoft source code
Microsoft shares source code with lots of partners. It would be asinine to admit that source code leaks, accidental or otherwise, would compromise their security. If they did that, it would create headaches for their massive contracts where source sharing is a prerequisite. So they toe the party line and say no, in fact, source code leaks do not compromise security.
daniel-levin··on Advanced Compilers: Self-Guided Online Course
>> Why are compilers ones behind the curve?

I suspect it’s because there aren’t a lot of high quality libraries you can integrate into the backend of compiler tools that don’t run into license issues pretty fast. Imagine if GNU binutils was more permissively licensed and as modular as clang? Then developing novel, non-GPL’d compiler infrastructure could depend on BFD - the boring part that working on won’t bring bonafide improvements to your new compiler. Another factor is that LLVM’s quality and ubiquity has reduced the monetary and technical upside to pursuing new opportunities in compiler development.

daniel-levin··on The Long-Term Stock Exchange Opens for Business
Hi Eric, presumably the companies will trade on a limit order book, like other exchanges. This mechanism of price formation allows rapid price movements up or down. What’s to stop the speculators or retail investor hordes from piling into a stock and driving its price up or down? Are there holding period rules?
daniel-levin··on Ask HN: What's the worst piece of software you use everyday?
Corsair Link is horrible. If you use Linux you should check out ckb-next which is really nice.
daniel-levin··on Ask HN: What's the worst piece of software you use everyday?
It’s quite easy to make any JetBrains IDE stall if it’s resource constrained. It needs a lot of memory and a _lot_ of file descriptors.
daniel-levin··on Hundreds arrested as crime chat network cracked
>> I'm a programmer. I learned it from the internet.

Same is true of Paul Le Roux [1]. I think if you're criminally inclined you'll find a way.

[1] https://en.wikipedia.org/wiki/Paul_Le_Roux

daniel-levin··on Ask HN: Git alternatives that aren't so complicated?
I'm going to answer the question, rather than tell OP they should just use git.

It might be worthwhile to check out Perforce [1]. Downsides: proprietary, expensive. Upside: you can version all sorts of content at a high level, not just software. I know of a large embedded shop that swears by Perforce.

[1] https://www.perforce.com/solutions/version-control

daniel-levin··on Ask HN: How to avoid over-engineering software design for future use cases?
32 comments so far and no mention of the word budget. There's a great analogy between software engineering and construction. Does your organization build skyscrapers and gorge-spanning bridges? Or does it build driveways and swimming pools? Commercially developed software consumes capital to get something in return. Are the people spending capital budgeting for a driveway or for a skyscraper? Must it be done this month or in two years? Sure, those are false dichotomies, but they illustrate the point: it is desirable for the bosses to clearly define engineering spend.

Over-engineering can be avoided by carefully sticking to a budget.

For a lot of developers, there's a trade-off between rationality (in the sense of ROI) and feeling good. It doesn't feel good to make every engineering decision against a budget. My dopamine levels [0] skyrocket when I visualize making some component generic, or future proof. I come crashing back to earth when I realize the budget is for a driveway. Budgeting earns the bosses / customer / capital a better return. Engineering for future use cases or making things generic (or the mere anticipation thereof) is an easy way to get a massive hit of neurotransmitter that makes you feel good.

[0] Not a neuroscientist. But I think it's useful to label that spike of feel good and motivation. It may have nothing to do with dopamine.

daniel-levin··on Stop Taking Regular Notes; Use a Zettelkasten Instead
It’s useful in pure (abstract) math for linking similar proofs. If you can spot some subjective link between proofs (e.g a proof in algebra and a proof in number theory that use essentially the same counting method) then you might be onto a deeper connection. I used this as an undergrad to “borrow” proofs from other areas.
daniel-levin··on Oracle vs. PostgreSQL – A Comment
Well, if the database has the number of tables, triggers, stored procedures, etc that SAP or Oracle’s ERP has then this seems less unreasonable. We’re talking thousands
daniel-levin··on The Hard Part of Learning a Language
I've just introduced a new engineer to a project in a language he hasn't used before. All of these points ring true! I want to suggest C# on .NET Core as a pleasant, fast language and ecosystem to learn.

I used to avoid anything Microsoft like the plague. A friend of mine used to call me "the Unix beth din" [1]. By necessity I needed to use C#/.NET for a project. It changed my view, mostly because almost all of Mr Wayne's questions could be answered quite easily. The package management, build system, IDE, installers, test framework, debugger, and documentation are all from Microsoft, come well-documented, and on all platforms of consequence. It's a breath of fresh air compared to the clusterfuck of competing tools (e.g. gulp, webpack, yarn and friends for JS) with overlapping features and bad docs that some other languages are plagued with. In C# on .NET Core, MSBuild + NuGet handles this for you. Compiler selection, package installation, building, test running, custom build steps, code generation, etc etc. Plus, NuGet's website and interface in the canonical IDE (Visual Studio) shows you the "'canonical' packages the community has consensus on".

[1] https://en.wikipedia.org/wiki/Beth_din (the autority for what is and is not kosher)

daniel-levin··on Show HN: Trade stocks from the command line with no commission
I have implemented FIX for a living for a few years. It’s fragmented beyond belief. You can have different standards for different parts of the same brokerage. You have to do separate conformance tests for different asset classes at the same (big, well known, reputable) broker. The proprietary APIs like Bloomberg’s provide additional value rather than being alternatives to FIX. Make no mistake: you cannot interchange a FIX endpoint for another without making changes. The core problem is that you can impose arbitrary semantics on top of FIX messages. For example, a broker might require you to send timestamps in UTC for equities, and local time for FX, on the same FIX connection. Another might have a limit on the number of characters you can put in a ClOrdId - so GUIDs as ClOrdIds go out the window. Another big screw up is extensive use of non-ISO currency codes and the ambiguity of major and minor denomination. Is “GBp” pence? Sometimes yes! Sometimes not. Then - the most colossal screw up of them all - the reverse proxy people. They are companies that will convince management that they have a “network” and “access to liquidity”. It’s actually just a reverse proxy server that _manipulates messages in flight_! It sounds ideal, as if they will standardize your message flow so you don’t have to worry about broker specifics. In practice, it never works, and they opaquely mess with things you don’t want them to. Imagine sending an order denominated in cents, and the reverse proxy forwards it having changed the denomination to dollars. This really happened to me.

BTW, I love working on this stuff and swapping notes with other people. Drop me a line (email in profile) if you want to talk anything related to FIX!

daniel-levin··on Show HN: Dashboard for tracking insider trading at S&P 500 companies
I have experience working on civil investigations of financial crime. It takes a very long time to prosecute white collar crime of all kinds. Especially insider trading. The most effective technique is to overwhelm the accused with reports containing facts that don’t constitute cold, hard evidence of crime, and then wait for them to buckle under the pressure and admit guilt
daniel-levin··on What's so hard about PDF text extraction?
dan at threeaddresscode dot com
daniel-levin··on What's so hard about PDF text extraction?
Of course.
daniel-levin··on What's so hard about PDF text extraction?
I’m a contractor. One of my gigs involved writing parsers for 20-something different kinds of pdf bank statements. It’s a dark art. Once you’ve done it 20 times it becomes a lot easier. Now we simply POST a pdf to my service and it gets parsed and the data it contains gets chucked into a database. You can go extremely far with naive parsers. That is, regex combined with positionally-aware fixed-length formatting rules. I’m available for hire re. structured extraction from PDFs. I’ve also got a few OCR tricks up my sleeve (eg for when OCR thinks 0 and 6 are the same)
daniel-levin··on Ask HN: What would the Dunning-Kruger “test” be for your field?
The nature of Dunning Kruger implies that people who are not qualified to answer this question will try answer it.
daniel-levin··on Network.framework: A Modern Alternative to Sockets (2018)
I write a lot of .NET, can confirm this is a great class

edit: any plans to add this (less Bluetooth support) to .NET standard?

daniel-levin··on Lessons learned building an ML trading system
There's a much less nefarious explanation. I'm not saying they didn't manipulate the order book feeds. I work in the regulated trading space. I've written market data decoders. One is in production inside of a bigger trading system I wrote at a customer as I type this.

The less nefarious explanation is simple. You decide how likely it is: there is no mechanism making sure that IP packets sent to all data feed subscribers arrive at the same time. Exchanges of consequence distribute market data via UDP multicast, over physical links that are as identical as possible (think identical lengths of fibre).

Now if you're receiving JSON via Websocket and parsing it using an allocating parser and your NIC driver is in kernel space and you use a GC'd language and if the exchange loops through a list of TCP connections to send a message to them one at a time and there is jitter in packet delivery time in upstream hosts (and other internet weather) and and and ... you simply cannot expect identical order books at the submillisecond timescale.

A fortiori, throw half of that crap away and suppose they were using userspace NICs and no-alloc single threaded C++ that chills entirely in L1 cache. Still consuming TCP over the public internet.

daniel-levin··on Go Turns 10
I find it interesting that in many C++, Java and C# code bases I have read and worked on, someone cooks up an error type that they use to supplement exception handling. Exceptions are used to handle “truly exceptional” things like running out of memory, and statuses are used for run of the mill errors like an invalid request being made. You choose the mechanism based on which you think suits the scenario better. I think it strikes a nice compromise between constant error checking and having one big error handler higher up in the call stack
daniel-levin··on .NET Core 3.0 Concludes the .NET Framework API Porting Project
Well, requests is a third party library. I don't like Python's standard library's HTTP APIs. I think that's a common sentiment. Similarly, you can get a solid third party its client for dotnet [1]. .NET core certainly has its shortcomings. I'm going to rattle of a list of other high quality libraries that address the .NET core shortcomings for me personally:

1) Dapper - https://github.com/StackExchange/Dapper

2) DbUp - https://dbup.readthedocs.io/en/latest/

3) Autofac - https://autofac.org/

The Kestrel source code expanded my view of what was possible in C# with respect to low level operations on memory (check out the fixed statement [2]).

A part of me doesn't want to like Microsoft because of their anti-competitive behavior in the past and crappy developer experiences from 10 years ago. Now, I sound like a Microsoft shill because of how good .NET core is.

[1] https://github.com/restsharp/RestSharp

[2] https://docs.microsoft.com/en-us/dotnet/csharp/language-refe...

daniel-levin··on .NET Core 3.0 Concludes the .NET Framework API Porting Project
Seconded. As another commenter on this thread said, make sure you have a powerful enough machine. I work with Angular a lot. For me, Rider's killer feature is Angular integration [1]. It is far more powerful than Visual Studio's.

[1] Other paid-for Jetbrains products such as IntelliJ Ultimate have the same integration

Page 1 of 7Next →