Recent submissions

Comment · 2 years ago
Comment · 6 years ago
I'm guessing this deployed on a secondary computer, not on any flight-critical computers; no way it would have passed airworthiness otherwise (even in a demo). As a result, the worst that could probably happen would be the pilot having to power-cycle the secondary computer.
Comment · 7 years ago
Never attribute to malice that which can be explained by incompetence. A small-ish exchange, run by a small number of developer-employees, with limited computing assets. I can easily see someone making the argument that moving cold wallets to an encrypted, offline company machine would (1) free up resources that could be used elsewhere and (2) would make a less obvious target for hackers. Follow that up with no backups -- because let's face it, most individuals and probably a lot of small businesses have no backups -- and voila: you get a bus factor of 1.
Comment · 7 years ago
Replace strncpy and strcpy altogether with calls to snprintf. It takes a fixed buffer size, terminates correctly with the null character, and safely does everything strncpy does and more. It's a POSIX standard, so it should be portable to most systems too.

And yes, maybe it'll impact performance. Worry about that _after_ you profile your code and have the numbers to show it -- I'd bet good money that 95% of developers will never need to worry about it.

Comment · 7 years ago
I'd add that The C Programming Language should be seen as a tutorial (albeit an older one that no longer is fully up-to-date in best practices, in my experience) that can serve as a reference in a pinch (it skimps a bit on the corner cases if memory serves). Advanced Programming in the Unix Environment, conversely, should be seen as a reference book with fantastic examples and discussion on error handling -- yes, you can use it as a tutorial, but it's a tad dense and you'll likely never need a lot of it.
Comment · 7 years ago
A quick word of warning: be sure to treat C and C++ as two completely separate languages that just happen to have similar syntax. Yes, you can use C++ as "C with classes" (I and many others sure have at times), but you're doing yourself a disservice most of the time if you do.
Comment · 7 years ago
Uh, are you thinking mean? Median is lining up every salary, counting to N/2, and selecting the number you happen to fall on.
Comment · 7 years ago
Is there a reason no one has built a Cygwin-like environment for iOS yet? As in, is it because (1) it's time-consuming, (2) it's tricky, or (3) Apple won't allow it on their App Store?
Comment · 7 years ago
I know that Allen Sherman did a version of that joke in his "Ode to Fat People" :-)
Comment · 7 years ago
Fairly certain at least some of those debts can get passed on to your estate and/or children.
Comment · 7 years ago
IIRC, the idea is to help the (dependents of the) Kurt Cobains of the world: artists who die young and still have loved ones who can now depend on the revenue from the copyrighted works for at least 20 years. But IANAL, so I could be way off.
Comment · 8 years ago
Presumably (and I'm partially speculating here, since it's not my expertise) because all of the neurotransmitters, hormones, etc. pay heed to the same laws of thermodynamics that everything else does.

Your genes may influence how many calories you burn, the foods you eat may influence how full you feel, your hormones may influence where fat develops and disappears -- but thermodynamics require that if you expend more energy than you take in, the difference will have to come from somewhere, and that's ultimately how weight loss works.

Comment · 8 years ago
Paper to print my resume out. Got my first job!

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton