Better HN
topnewbestaskshowjobs
Log inSign up

physicles

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

Submissions

comment 6y ago · link · parent

True, if you squint then an application will look like this too. That doesn’t mean this paradigm is not different in other important ways.

For example, in an application you can use things like types and functions to make explicit the coupling between different parts. You can iterate and verify changes on the time scale of a few seconds (instead of waiting for a lambda deployment). You can use all the tools for exploring source code we’ve developed as an industry over the decades. And you can atomically change the entire application simply by deploying it.

Of course serverless has its use cases. But evolving a system like this article shows, without most of the tools and guarantees we enjoy when dealing with code, seems like an exercise in pain.

comment 6y ago · link · parent

I think it probably helps to know units and powers cold, so you can use your short term memory for the actual calculation. I was able to do the first calculation in the article because, as it says, it’s just summing exponents on powers of 10. It should be second nature that M=6, G=9, T=12, or that “nano” means -9.

Powers of 2 are incredibly helpful too: I can estimate that the square root of 4000 is around 60 because 4000 is close to 2 to the 12th, for instance. As a coder it’s well worth your time to memorize powers of 2 up to at least 2 to the 16.

comment 6y ago · link · parent

Yeah, this was Scott Galloway’s take in an early Prof G podcast.

comment 6y ago · link · parent

After trying out a bunch of environments about a year ago, I settled on cinnamon because it had the best multi-monitor support.

comment 6y ago · link · parent

I think a lot of us here will recognize this as the exact same sentiment that Feynman expressed pretty early in his career. It seems that while some great people got there by being hell-bent on greatness from early on (Schwarzenegger comes to mind), for others it’s ironically the release of that pressure that unlocks the capacity for greatness.

comment 6y ago · link · parent

Zoom is no longer blocked in China.

comment 6y ago · link · parent

I live in Beijing and came back early Feb after the new year holiday. We’re doing all that stuff too, even the single use tissue in the elevators.

The day after I got back we found out we had a case of covid-19 in our apartment block, so we were one of the first to get restricted entry/exit — each unit gets 2 cards and you have to present it when you enter or leave through the single open gate. I did 2 weeks going outside just twice to buy food, then slowly relaxed a bit. Many of my chinese friends are still basically not going out at all.

Now’s an exciting time for China because we’re at basically zero new cases in the country (had 4 new ones in Hubei yesterday, the rest were all retournees from outside the country). So since yesterday, it’s mandatory hotel quarantine for everyone who enters the country.

Really getting worried for my family and friends in the states though. Gonna have some long talks about how to prepare.

comment 6y ago · link · parent

Holy crap. I’ve been in Beijing for the last month and even they didn’t ban bike riding.

609.

Call for Volunteers – NECSI’s Distributed Ventilator Project(medium.com ↗)

1 points · by physicles · 6y ago · discuss

comment 6y ago · link · parent

For a few reasons:

- On Linux you have to learn bash anyway, because in the normal course of work you run across bash scripts everywhere.

- Everything on Linux is designed around the Unix philosophy and Unix tools, so PowerShell will feel out of place, and it'll be harder to find examples online. Also, Linux stuff is all configured via text files anyway, so PowerShell's object model is much less enticing.

- The shell's programming environment isn't that important because your scripts shouldn't be that long -- beyond 100 lines or so, you'd be way more productive using an actual programming language like Python instead.

I used PowerShell on Windows for 4-5 years professionally and it was great (finally ditching command.com was a revelation). Now, I've been using Linux, bash and stuff for about 3 years, and it's great. I guess I prefer the Linux environment because it feels tighter and faster.

comment 6y ago · link · parent

Yeah I’m in Beijing now and there’s no way most of the world could implement this kind of quarantine. I can’t leave or come back home without presenting a special card at the gate of my apartment complex.

But it’s working, and at this point I’d rather be here than in many other countries.

comment 6y ago · link · parent

I’d only consider PowerShell when working with tech that is best managed through it, so stuff from Microsoft. It was great for the couple years I used it full time, even built a test runner that used .NET TCP classes to automate stuff through a telnet connection.

Now that I’m on Linux and doing open source stuff, I’d never consider using PS.

comment 6y ago · link · parent

+1 for Loki + Promtail + Grafana. Really low maintenance once it’s set up.

comment 6y ago · link · parent

To put that in perspective, three 9’s allows you about 9 hours of downtime a year, which will certainly require multi-region and a dedicated ops team.

Two and a half 9’s is a whole different story. We achieved about 20 hours of downtime last year even without HA on k8s bare metal in Alibaba cloud. But I’m uncertain whether that’s a feat we can repeat this year.

comment 6y ago · link · parent

I’ve written go full-time for the last 3.5 years and it still amazes me that by default the linter doesn’t at least warn about unused/uncaptured return error values.

comment 6y ago · link · parent

Having used go full-time for the last 3.5 years, this article didn’t feel like a twist of the knife. Yet all the language evolution efforts I’ve seen in the last two years make me think that early Go was, mixaphorically speaking, lightning in a bottle that won’t strike twice.

- I’ve never hit the file system stuff. We all use Linux; all our code runs on Linux. I’m curious who the people are who are using Go on Windows.

- Network timeouts are a stupid gotcha I first hit about six months into my go tenure. You can set read/write timeouts on the Transport that’s used by the connection though; not sure why that isn’t covered.

- The wall clock time thing is new to me and looks crazy complicated; I’m angry that it’s something I have to know about now. It’s bad enough that time.Time operator == and .Equals() behave mostly but not quite the same.

Something that’s not in the article: the tooling situation (autocomplete, source navigation, and so forth) IS STILL WORSE THAN IT WAS TWO YEARS AGO. The old tools were perfect but were never updated for module support. gopls is still an unfinished mess; last week I had to write a script that auto-kills it if it uses more than 3GB of memory.

comment 6y ago · link · parent

Kaiterra. Our main consumer product is the Laser Egg.

comment 6y ago · link · parent

It's not just salt though. In some countries, the tap water isn't safe to drink, so it's probably not safe to breathe.

Also, as another poster pointed out, humidifying a large room in winter requires several liters of water per day. The cost of distilled water would quickly dwarf the cost of the humidifier itself, so other types of humidifiers besides ultrasonic (namely evaporative ones, where the main danger is mold, which distilled water doesn't help you with) are more economical.

comment 6y ago · link · parent

I'm in the same boat, and also love Svelte and wish it success.

Svelte's reactivity was also something we had in Splash, the Microsoft-internal UI framework that was used to build the Zune desktop app and Windows Phone 7/8. I haven't enjoyed building UI since then, but with Svelte I can finally enjoy frontend development again.

comment 6y ago · link · parent

A word of warning: ultrasonic humidifiers used with tap water create high levels of indoor air pollution: https://www.researchgate.net/publication/51859262_Indoor_par...

Disclaimer: I work for a company that makes low-cost air pollution sensors.

comment 6y ago · link · parent

That maybe have been their original purpose — who can say — but I also appreciate that this model tends to separate social from news.

I personally prefer a model that makes it impossible for me to see Nazis arguing about an article posted by my grandma.

comment 6y ago · link · parent

I’ve been living in China for 7 years and I really like Wechat, aside from the censorship and privacy concerns aside. It’s basically WhatsApp with a dumb timeline — literally the algorithm is “show me everything my friends have posted, in chronological order”. It’s wonderful.

That’s probably possible for two reasons. First, the app’s principal designer maintains Steve Jobs-level creative control on the product. Second, as a sibling pointed out, Wechat primarily makes money from other stuff besides posts going viral﹡.

There’s not even a “repost” feature. You literally have to open the article, copy the URL, and create an entirely new post on your timeline. It cuts down on low effort sharing (of course, if you’re the government, you like this because it also slows the spread of so-called “improper information”)

Facebook died for me when it became possible for me to see Nazis arguing in the comments of an article my grandma posted. I mean what the fuck, how did we ever get there.

﹡ which unfortunately involves vacuuming up as much data about every aspect of everyone’s life as possible. It’s impossible to understate how pervasive Wechat is: if you only have this app and no other, you can still live very comfortably here.

comment 6y ago · link · parent

Wechat doesn’t have trending. Trending is literally the opposite of something you want if your #1 fear is bad news about the government going viral.

The closest thing to trending is that you notice that a bunch of your friends are all posting about similar stuff. Like when Li Wenliang, the whistleblower-doctor in Wuhan, died, or when everyone bored at home in quarantine was posting photos of brooms balanced to stand on end.

comment 6y ago · link · parent

If requirements volatility is the core problem, the next question to ask is, Why is this the core problem here and not in other engineering disciplines?

I think it stems from a mismatch between the perceived cost and the actual cost of changing software, which one of the first comments on the article captured:

> That’s my take – the perception that software is simple to change, which stems from the lack of understanding of its inherent complexity by users, and the fact that it is, up to a certain point – is what makes requirements volatile.

Part of the problem too is that the actual cost of changing software varies by an order of magnitude or more, depending on how fluent the developer is with the tools they’re using, and how good they are at accommodating change. If that’s not something even we as a profession (if you can call it that) have been able to reliably quantify, expecting a client to understand it is beyond the pale.

I’ve been programming for most of my life, so if I see an app then most of the time I can get a sense for how long it’d take to build. But I still have this nagging feeling that building software — the act of translating what’s in your head into working code — seems to take way longer than it ought to.

comment 6y ago · link · parent

Dendrochronology holds a special place in my heart, because it's the thing that finally shook me out of my young earth creationist (YEC) haze about 9 years ago. As the Wikipedia page states, we have a good chronology going back about 12k years, which is a few thousand years before all YEC timelines.

Other more complicated dating techniques like radiocarbon dating and ice cores are too abstract or complicated, and therefore easier to hand wave away as containing too many unprovable assumptions. For instance, serious YEC people like to point out that we're assuming that the speed of light or radioactive decay rates were constant in the recent past. If it seems insane to cling to bad arguments like this, welcome to the world of science-minded YEC people.

But tree rings... everyone has seen tree rings, and everyone knows that sometimes they're thicker and sometimes thinner. That's hard to argue away. The YEC camp tries: they point out we're assuming there's one ring per year. But when I realized that this really was their best argument, I had to give up YEC and find out how deep the rabbit hole went. About a year later, I was an atheist.

comment 6y ago · link · parent

I’ve always heard it was because the budget dried up after we beat the evil commies to the moon. Could you point to a source that talks about the safety angle? I’d love to read about it.

comment 6y ago · link · parent

Yeah not only are surgical masks not even clinically effective in this situation, they’re often not worn properly. I’m in Beijing now and you see people with masks not covering their nose, or worse, pulled down onto their chin. A friend of mine tried to remind an older lady in an elevator about proper mask usage, and her response was 你们年轻人管太多了 — you young people worry too much/should mind your own business.

The people in my compound who were confirmed to have the virus (we found out on the 12th) got it at a family gathering over the new year holiday in Shanghai. So obviously they weren’t wearing a mask then.

What seems to be making a difference in China — it’s no longer spreading like wildfire, if you believe the official reports* — is self-quarantine. Most of my friends have barely left home since the beginning of February. For a while, some restaurants that were still open wouldn’t let people sit together in parties larger than 2. And at least in Beijing, everyone who returns to the city after travel must undergo mandatory 14 day home quarantine, with fines or punishments for those caught violating (https://www.nytimes.com/reuters/2020/02/14/world/asia/14reut... though enforcement varies from place to place).

* Wuhan/Hubei are a tragedy no matter how you count. But at least Beijing is doing OK. I mostly trust the official numbers, simply because the Party has a strong vested interest in mounting a response commensurate with the threat. They can’t let the virus spread too much and rip apart the capital; neither can they afford to tank the economy for several months longer than necessary to contain the threat. Even with all the censorship, if you find yourself fighting against reality, reality wins.

comment 6y ago · link · parent

I’ve had something like this for about three years now, except it doesn’t open vim, I just use a single read command and it appends whatever I type with a time stamp. One file per quarter. And there’s a cron job to pop up a window each hour to remind me to type what I’m working on.

I’ve used this to figure out how much time I spent on certain tasks by sampling it Monte Carlo style. And sometimes when I run into some weird non-googleable problem, it happens again a few months later and the solution is in those files.

It’s like my own real-life syslog. Or like a scientist’s lab notebook.

comment 6y ago · link · parent

> I just know intrinsically that they're useless and it's a waste of time. I just know that 95% of my code works and I know what the 5% I'm unsure about is and what manual testing or browser testing I need to do to clarify it.

I think this is all based on experience. You know when the tests are going to give you value, because you know when you’ve been burned by a lack of tests in the past. You put tests where you’re worried about bugs appearing.

I write tests when 1) they help me bring up code (you’re gonna do some interactive test/debug cycles in the beginning, might as well do that with tests), or 2) I can’t sleep at night because the code is subtle or complex and I worry about its continued correctness, or 3) there’s a bug and it’s easy to write a regression test for it.

Sometimes writing code without tests is like putting sand into a pile: it works fine for a while, but as soon as you start overloading it, whole faces suddenly shear off. You can shore it up with your hands, but above a certain scale you’re battling to prevent collapse. Tests are like scaffolding you put in place to keep the sand from sliding away.

comment 6y ago · link · parent

There are two separate concepts here: counting (how many things do I have) vs numbering/indexing (which one in a sequence am I talking about).

If I have five pizzas, would anyone argue that the variable storing that fact should have a value of 0x0004? On the other hand, if there’s a stack of five pizzas, they’re either numbered 0..4 or 1..5 depending on your religion.

1
1819202122