Better HN
topnewbestaskshowjobs
Log inSign up

physicles

1,822 karma · joined Feb 3, 2019 (7y ago) · 645 submissions

Submissions

comment 3y ago · link · parent

I’d argue they’re more foundational.

If some code could use a b-tree but the dev doesn’t know about them, they can’t do much damage — they’ll use a less optimal tree.

If some code needs a state machine but the dev doesn’t know about them, that code will have so many bugs.

comment 3y ago · link · parent

Yeah it does seem kinda weird. But did you see the SpaceX employees cheering like mad? It’s pretty clear that they think they made a massive step forward today. Are they deluding themselves? They’ve optimized for iteration speed and will have another couple full vehicles ready to go in a month or two. The raptor engines aren’t limited in supply; they’re making 1-2 a day.

My guess is the biggest issue is the destruction of the pad. Building it up so that it doesn’t get destroyed by each launch will be a very expensive challenge.

comment 3y ago · link · parent

The startup sequence is indeed longer than with most other rockets, but I don’t think that’s the reason.

5-6 engines were gone since very early in the flight, and for most of those I suspect that’s because they were damaged by debris from the pad. Everyday Astronaut’s live stream had a different camera angle on the rocket, and you could see it actually slide sideways away from the tower a bit in the first few seconds. Uneven thrust would explain that.

Elon said in the past that the rocket will leap off the pad (thrust-to-weight ratio of 1.5 or 1.6 iirc). But if you’re missing 20% of your engines, that ratio is ~1.2, or less than half the expected acceleration. A slow start indeed.

comment 3y ago · link · parent

List of things that were crystal clear before launch:

- SpaceX will be sad if the rocket blows up on the pad.

- They’ll be very happy if the rocket clears the tower.

- They’ll be ecstatic if the rocket makes it around the world.

- They’ll use the flight termination system, which all rockets carry, if it veers off course.

Did you see the employees cheering during the webcast?

comment 3y ago · link · parent

If the rocket had exploded on the pad, that would’ve been an unsuccessful test. The launch pad and tower are way more expensive than the rockets and take much more time to replace. They call it “stage 0.”

Btw this isn’t moving the goalposts. Clearing the launch tower was always the success criterion; the rest is gravy.

comment 3y ago · link · parent

For best results, set your DRY dial to 8 or 9 out of 10. Settings higher than 9 result in premature or excessive abstraction.

But if you hate DRY so much, imagine a word where people set it to 1 or 2. I wouldn’t want to work in that code base.

comment 3y ago · link · parent

All great points.

> it's okay to move ahead if I know at least 80% of the material.

One of the worst feelings is moving on in a textbook and realizing you are indeed totally lost.

Here’s my own list of necessary but not sufficient conditions for deep learning:

- Motivation. Easy to overlook; hard to get if you don’t already have it.

- Frequent experience of “I have no idea how to solve this,” followed by hours or days of playing with the problem, followed by a eureka moment. You can’t be sure you’ve learned the thing unless you’ve constructed the solution yourself. Builds confidence too.

- Seeing the same material in different contexts or presented in different ways. It’s like looking at an object from different angles.

And for bonus points:

- Teach the concept to a curious friend. Their questions will lead you to deeper understanding.

comment 3y ago · link · parent

Did you read the article? It's a stretch to call it an active military unit. As Twain himself wrote, the only maneuver they performed was to retreat, which they barely even knew how to do.

comment 3y ago · link · parent

I was literally about to write this same comment. I did physics so I finished some group theory and complex analysis, but 20 years later all that stuff is gone because I never applied it in other classes. Only the stuff that kept coming up, like calc 1/2 and first order diffeq, really stuck.

comment 3y ago · link · parent

When I saw the equation referred to as (*), I had a flashback to those problem sets with *hard and **harder problems. ** problems often required some real out-of-the-box thinking. I wasn't always able to solve those, but it was so satisfying when I did (usually after an hour or two of struggle).

comment 3y ago · link · parent

Snowflake’s dialect supports the first one. I discovered that accidentally and immediately fell in love.

comment 3y ago · link · parent

> Developers are drawn like hawks to a possible whiff of over complexity

In my experience, juniors tend to pick solutions without considering complexity and people factors — at least, I did. There’s a very good reason to avoid over-complexity: if you have too much of it, it kills your velocity.

> to a predisposition of being always staying slightly uncomfortable

I love that feeling of always moving forward. Tech that you didn’t know about a year ago, is now part of your normal workflow. That feeling when you start exploring something totally new and it takes a week to get comfortable with hello world, and a month (or years) to learn exactly where it should fit and what the sharp edges are.

comment 3y ago · link · parent

I’ve heard this called “the defaults lifestyle” on the Software Defined Talk podcast. I’m forever locked out of nirvana because I have an iPhone but not a Mac, but that’s fine.

Occasionally plugins are worth the expense though. I finally discovered Argos[0] and I’m using it to show time in UTC and a couple other time zones. Super handy.

But if I try some new software and find that I have to tweak it a bunch to make it usable, that means the devs have different aesthetics and I should probably try something else.

[0] https://extensions.gnome.org/extension/1176/argos/

comment 3y ago · link · parent

Exactly. If you have the skills to get hired at a place like FTX, a below-the-radar amount like ten million dollars isn’t an utterly life-changing amount of money. Not something worth risking years of freedom.

comment 3y ago · link · parent

Yeah we use k3s for local and testing environments, where it shines. I wouldn’t want to use it to run stuff in prod and figure out how to do zero-downtime upgrades with multiple nodes.

comment 3y ago · link · parent

Iteration speed and blazing fast automated tests. When I discovered minio, I suddenly got much more confident coding against s3.

comment 3y ago · link · parent

Using k8s is not remotely the same thing as maintaining your own k8s stack. One is easy (get your feet wet in an afternoon), the other is hard (maybe after a couple months of full-time study you can pull it off).

The vast majority of teams that have enough crap to run to warrant using k8s should not be maintaining their own k8s stack.

In fact, it’s entirely possible that running k8s is so hard that the only players that can do it reliably are the big cloud companies.

comment 3y ago · link · parent

Same. HN and BBC World News, usually just the headlines. Podcasts for slow/nuanced takes on things. No facebook or instagram or anything.

The Wikipedia current events portal looks like a fantastic replacement for BBC World News though: slightly more in-depth content than just headlines. I'll give it a try.

comment 3y ago · link · parent

TomK32's provided some great insight as a German. For me, the common traits are 1) local language is not explicitly English, 2) has a vibrant social scene, and 3) I know people there already. I'm a techie so cost of living isn't an overriding concern.

comment 3y ago · link · parent

Here's my opinion on how China scores against your criteria:

- Dense cities: Yes. I grew up in the suburbs and love the density here and how walkable everything is.

- Affordable housing: A good place in a popular location in Beijing or Shanghai is about $2k USD a month. You can get that down to $1k if you have roommates.

- Great public infrastructure: public transit, yes, but I rarely need to take that anymore. Public parks aren't great. You can't drink the tap water.

- Modicum of agreement: political discussion is so thoroughly suppressed that we all engage in self-censorship. I guess that could be called "agreement", but when I think of agreement I think of a place like New Zealand.

Here are the great things you're maybe not seeing:

- There's a bit of friction in everything in daily life, and that somehow makes life more enjoyable for some kinds of people (including myself). I think a big reason for that is that most people here don't speak English.

- It's incredibly easy to make friends.

- Most people you meet are interesting: either they're an expat and they moved here because they didn't want to coast through life, or they're a local and they're curious about people from other cultures.

- Some jobs pay incredibly well. For example if you're a teacher (not a "teacher"), China is a big step up.

Here are the not-so-good things you're maybe not thinking about:

- Air pollution is still a thing. In some cities, half the days you'd like to go outside for a run, you shouldn't because the air is too bad.

- Things like national parks are more crowded, less natural, and less tastefully done here than in any other developed country.

- As a foreigner you can only stay at maybe half the hotels and guest houses around the country. The others will simply not allow you to stay.

- As an American you'll deal with special attention from the government.

- Going to a hospital where nobody speaks your native language is one of the most stressful experiences you will have.

comment 3y ago · link · parent

I've got some years in China. I speak Chinese, I'm eating a jianbing[1] as I write this. Didn't leave during the three years of zero covid. Reopening has changed everything about daily life in the best way.

But I'm also looking for a way out. For the reasons outlined in the article, yes, and others. General sentiment toward foreigners has rebounded a bit since the early days of the pandemic, but it's pretty clear that the government would like all the Americans, Canadians and Brits to kindly GTFO. And everyone else seems to be leaving: I lost about half my friends in the last two years.

My (privileged) problem is that I can't stomach the idea of moving back to the US. I moved here because I wanted to do something different with my life; the idea of living in the US again makes me feel like life would be over. Friends are moving to Singapore, Bangkok, Bali, Berlin, so I'll likely end up following them. Five years ago HK or Taipei might've been good options, but not these days.

1: https://en.wikipedia.org/wiki/Jianbing_guozi

comment 3y ago · link · parent

Of those, MQTT should be the only thing you expose to the outside world. Secure it with regular TLS, possibly with mutual auth for your clients if you care about that.

For the others, secure them using the same tech you use to secure your database. Ideally they wouldn't be accessible from the internet at all.

comment 3y ago · link · parent

The blog post series seems to bury the lede -- it isn't until part 3 [1] that we get to the insight that MQTT and Kafka solve different problems and therefore can have complementary roles in the same system.

We use this architecture for IoT: MQTT for edge because it's standard and super good enough, and Kafka because it turns out we want to do more than one thing with the data as it streams in so not using Kafka would end up being more complicated.

Here's a key insight though: for IoT you don't want to use an actual MQTT broker, like Mosquitto or HiveMQ. If you do, it's hard to avoid data loss. Server side you have something that subscribes to those MQTT topics and pushes the data into Kafka. What do you do when that thing needs to be restarted? Ok, you can use persistent sessions in your MQTT broker. But how much memory does your MQTT broker need? What if your MQTT broker crashes? Oops, now your MQTT broker needs its own persistent database to keep track of all those messages in limbo.

What you want is an MQTT gateway -- something that looks like an MQTT broker to the devices, but the server side does something different with received messages. When it gets the MQTT PUBLISH command, it sends the message to Kafka, waits for the ack from Kafka, and only then sends PUBACK back. Presto, the MQTT thing is now stateless and horizontally scalable. Your clients just need some retry logic.

Maybe Kafka's mqtt-proxy does this, I don't know. I don't think it's mentioned in part 3. But it's a key property of such a system. I'm guessing Amazon's IoT gateway does this, because once you've thought about it hard enough it becomes obvious this is how it needs to work.

1: https://www.influxdata.com/blog/mqtt-vs-kafka-iot-advocates-...

comment 3y ago · link · parent

Do you want to learn it because it looks interesting, or because you think it's important for a Real Programmer to know?

If it's the former, go for it.

If it's the latter, don't worry about it. I have a CS degree, did 6 years on a team writing C++ at Microsoft, and only briefly flirted with understanding this stuff. A couple of the wizard devs on the (very large) team could do it, but they also knew that code needed to be simple above all else, so it was effectively banned in our code base.

comment 3y ago · link · parent

Here are two scripts I now can't imagine living without:

[1] is the reason I no longer need a taskbar/dock. It's a sort of framework you can use to build a muscle-memory-friendly window switcher in Linux, similar to pinning windows to the taskbar in Windows -- map Win+1 to terminal, Win+2 to vs code, etc. If the app isn't running then it launches it; else, switch to it. (I wrote this because couldn't find a consistent and foolproof way to do this in Linux, and if you switch window managers you have to start from scratch)

(For better ergonomics, if the keyboard I'm using doesn't have a win/meta key on the right, I rebind right control to win/meta)

[2] is a timestamped log file for you, a human. Set up a cron job to launch it every hour to note what you were working on, or append lines from the terminal whenever you're chewing on a hard problem. Then, use the data to build an accurate picture of what you worked on during the last week, or grep last quarter's log to find out why you decided to use library A instead of library B. I have used this since 2018 and frequently go back to gain insight into the reasons for old decisions.

1: https://gist.github.com/cbd32/cbec9a32b32bd9e93b0d2696c71b5f...

2: https://gist.github.com/cbd32/f1ee2967ec0181b934639c30f4e68f...

comment 3y ago · link · parent

Anecdotally, I realized I was doing something like this when I was having trouble understanding people speaking in a noisy room, in a language I’m not so proficient in.

As you listen to someone, your brain is constantly matching the sounds arriving at your ears with a prediction of what the next few words might be. Listening in a non-native language, my predictions about what comes next aren’t very well tuned at all, so if I can’t hear every word clearly then I can easily get lost.

Another signpost: sometimes you mishear someone — “oh, I thought you said xyz” — but the thing you thought you heard them say is never gibberish, it’s a grammatically and contextually valid way to complete the sentence.

comment 3y ago · link · parent

Had a flashback to QBasic screen mode 8, which had a resolution of 640x200. Mode 9, 640x350, was also useful because it was the highest resolution you could get while having more than one back buffer.

comment 3y ago · link · parent

https://matemarschalko.medium.com/chatgpt-in-an-ios-shortcut... if anyone's looking for the link to that ChatGPT-to-Siri bridge. Runs entirely on the phone too

comment 3y ago · link · parent

True, but note that they're using the tiny model. In my experimentation, you need at least the small model to get transcription I'd call "good", which is still a bit slower than you'd like on a moderately fast laptop from 2019.

That said, whisper is incredible and the era of very good local speech-to-text on moderate hardware is basically here, or will be in the next year.

comment 3y ago · link · parent

The third one resonates. As someone who also started coding at a young age, here’s what worked for me: 1. Have at least 10 free hours each week, 2. Get fanatically addicted to coding, 3. Repeat for 8 years and then do a four year CS degree. Pretty useless advice.

Apropos the article, it’s easy to imagine there’s a similar lottery for most paths in life, including entrepreneurship. “Be born rich enough that you have the innate confidence that the universe will bend to your will” is a lottery I didn’t win.

Surely, a kernel of the current political polarization is the left’s insistence that these lottery tickets matter, and the right’s insistence that the wealth they’re holding is the result of their own hard work. (To be clear, it’s a spectrum — tickets come in different sizes, and hard work plays a role — but such nuance has no place in public discourse)

1
131415
22