Like what you see? Subscribe here and get it every week in your inbox!
Issue #54 - March 15, 2020
Here are the top threads of the week, happy reading!
1. Ask HN: Was the Y2K crisis real?
Top comment by dwheeler
Yes, the y2k crisis was real, or more accurately, would have been a serious crisis if people had not rushed and spent lots of money to deal with it ahead of time. In many systems it would have been no big deal if unfixed, but there were a huge number of really important systems that would have been a serious problem had they not been fixed. Part of the challenge was that this was an immovable deadline, often if things don't work out you just spend more time and money, but there was no additional time that anyone could give.
The Y2K bug did not become a crisis only because people literally spent tens of billions of dollars in effort to fix it. And in the end, everything kept working, so a lot of people thought it wasn't a crisis at all. Complete nonsense.
Yes, it's true that all software occasionally has bugs. But when all the software fails at the same time, a lot of the backup systems simultaneously fail, and you lose the infrastructure to fix things.
2. Ask HN: How do I learn C properly?
Top comment by sramsay
It sounds like you're not asking, "How do I learn the language?" but "How do I know I'm doing it right?"
I think Gustedt's book is superb if you're just trying to learn the language, and it does a good job of presenting the most up-to-date standard. I admire the K&R as much as anyone else, but it's not exactly an up-to-date language resource at this point, and it doesn't really provide any guidance on the design and structure of systems in C (that's not it's purpose).
You might have a look at Hanson's C Interfaces and Implementations: Techniques for Creating Reusable Software. That's focused on large projects and APIs, but it will give you a good sense of the "cognitive style" of C.
21st Century C is very opinionated, and it spends a great deal of time talking about tooling, but overall, it's a pretty good orientation to the C ecosystem and more modern idioms and libraries.
I might also put in a plug for Reese's Understanding and Using C Pointers. That sounds a bit narrow, but it's really a book about how you handle -- and think about -- memory in C, and it can be very eye-opening (even for people with a lot of experience with the language).
C forces you to think about things that you seldom have to consider with Javascript, Python, or Go. And yes: it's an "unsafe" language that can set your hair on fire. But there are advantages to it as well. It's screaming-fast, the library ecosystem is absolutely gigantic, there are decades of others' wisdom and experience upon which to draw, it shows no signs of going away any time soon, and you'll have very little trouble keeping up with changes in the language.
It's also a language that you can actually hold in your head at one time, because there's very little sugar going on. It's certainly possible to write extremely obfuscated code, but in practice, I find that I'm only rarely baffled reading someone else's C code. If I am, it's usually because I don't understand the problem domain, not the language.
3. Ask HN: Book recommendations for understanding financial systems?
Top comment by maest
I have almost 10 years in the finance industry, both buyside and sellside and my take is that, while there are some fundamental principles at play, the world of finance is too messy and complicated for any one book to describe it. An even stronger statement I am willing to make is that no one person correctly and fully understands the financial system.
So, once you accept that there is no "correct" answer to how the financial system and how markets work, what's left to do is to follow what's happening in the world and try to build your own mental model.
One source I'm a big fan of (and has a bit of a cult following in the financial world) is Matt Levine's "Money Stuff" blog:
https://www.bloomberg.com/opinion/authors/ARbTQlRLRjE/matthe...
He's engaging, funny, talks about interesting topics and, most importantly, he's _rarely_ wrong. It's a rare thing seeing a journalist talk about your specialty subject and actually being correct.
Similar source is Felix Salmon: https://www.felixsalmon.com/
Similar league as Levine, but I find him slightly less engaging, for whatever reason.
4. Ask HN: What's the best corporate password manager?
Top comment by davismwfl
We have been using 1Password and just use vaults to segment things properly and keep things limited to the smallest group of people possible. 1Password is also how we handle 2fa in a common/generic way for many sites that require it. This avoids the problem of a user using their cell phone number to get the OTP's and then that person leaves the company and you are left trying to coordinate the change for an account with a former employee.
1Password isn't perfect but is by far the best one I've used and it does work well for teams IMO. We just are anal about setting up vaults and permissions to those vaults so it easy to segment users to only see the services they are allowed to etc. Plus it keeps things orderly and clean for maintenance purposes. The browser plug-ins have gotten better and the search is decent so definitely better then others I have seen.
5. Ask HN: Do you ever truly use your revision history?
Top comment by a1studmuffin
Hell yes, I use it daily. I'm in AAA gamedev and the codebase I deal with goes back 20+ years. The last 10 years are readily accessible in Perforce and the rest can be found in another version control system. I am forever grateful to past engineers for outlining WHY they made their changes, and not WHAT the changes were per se. With thousands of engineers that have come and gone, this is incredibly useful information in addition to the code itself.
IMHO revision history is just as valuable to a company as the code itself.
6. Ask HN: Which configuration management software would/should you use in 2020?
Top comment by oneplane
Terraform for everything 'outside' your runtime (VM, container), SaltStack for everything 'inside' (VMs and containers) and for appliances (where Terraform has no provider available) as well.
7. Ask HN: Non-cloud voice recognition for home use?
Top comment by romwell
TL; DR: Win 10 IoT for RasPi does it.
-----------------
Windows 10 IoT for Raspberry Pi comes with offline speech recognition API.
It was not hard to slap some code together that turns on a light when someone says "banana" at a hackathon.
Sounds like exactly what you need.
>If it helps I'm happy to reduce vocabulary to a dictionary of words
You will do it with an XML grammar file for offline recognition[4].
[1]https://docs.microsoft.com/en-us/windows/iot-core/tutorials/...
[2]https://docs.microsoft.com/en-us/windows/iot-core/extend-you...
Someone's demo project:
[3]https://www.hackster.io/krvarma/rpivoice-051857
[4]https://docs.microsoft.com/en-us/windows/uwp/design/input/sp...
8. Ask HN: Have you been infected by Covid-19? What is it like?
Top comment by okareaman
I'm a retired programmer who does ride sharing in Silicon Valley. I often pick up people at the San Jose airport. Sometimes they are coming in from China or Seattle. I live in a Chinese neighborhood. I gave a woman who couldn't breath a ride to the emergency room. When I got sick in February, I figured it was the flu, but now realize it was probably Covid-19 based on symptoms. I recovered nicely and have been quarantining myself just in case.
It's like the flu with the added difference that it makes breathing more difficult. Also difficulty swallowing. It was more annoying than anything, not really that bad. I don't have any health problems, but if I did have breathing issues, I imagine it might be very problematic.
9. Ask HN: How are you preparing yourself for a recession?
Top comment by angarg12
I know this is a non-answer, but if you have healthy financial habits, you won't need specific preparation for a recession.
I believe you can't time the market so 'preparing for a recession' is a moot point. Instead set financial goals that align with your risk tolerance and that make you comfortable.
That being said, the advice that I would give is just standard stuff. I think some sources do a much better job at explaining those so I'll let others answer. Big strokes is just the usual stuff: prepare a emergency fund, contribute up to your employer match (or more), set up a budget, etc.
One important point is, if you invest in the market, just keep investing, no matter what others do.
10. Ask HN: Recommendations for Working from Home?
Top comment by dejv
14 years of working from home under my belt. Tried many things during those years and this is whats working best for me:
- my office is separate room that I visit just when I am at work. Kids were born into this situation and understand that this room is off limits.
- Good external monitor, mouse and ergonomic keyboard + good chair. I also like to use headphones when working even when nobody is around.
- I do keep regular schedule: work day starts at 8:00 with 15 minutes walk as my commute to clear my head from life stuff. lunch is at 12:00, I eat it with my wife and kid at the kitchen or we might go out to one of our local bistros just outside our house. I am not required to work like that, but it is just easy to keep in rhythm.
- no video games, no movies, no distraction when working. I might leave for bathroom or to make some green tea, but no procrastinating on my way, no playing with child or talking to my wife is allowed.
- when the day is over, I stand up, go for 15 minutes walk in nearby park (my commute to clean my head after work) and then I am back home.
- when I am done I am done. I might check Slack or emails, but the office is closed and no work is allowed.
It might seen strict, but working this way is actually best for me and my family. Years ago I was not that disciplined, worked a bit here and there, maybe watch a movie mid day and then work till 10pm. Now I just know when I am working and when I am allowed to just turn off.