adrianratnapala

Joined 10 years ago

Karma
3,270
Submissions
1,477
Member since
Mar 14
View on Hacker News

Recent submissions

Comment · 7 years ago
Yes, although you don't have to be so perlish as to do the if in that order

    do:
        thing()
        thing()
        if condition:
            continue
Comment · 7 years ago
It is not always economically rational though. The US has a history of using eminent domain to grab neighbourhoods full of small businesses so that they can be turned over to a big development projects of nominally higher value. Then the big developer pulls out or goes bankrupt, and the result is a ruined, rat-infested empty lot.

Those cases involving eminent domain and rats are the most dramatic, but it works at a more pedestrian level too. Say a government wants to dispose of some disused rail-yard or something. A developer who says "I'm going build some big shiny shops and attractions here" has better optics than a developer who says "I'm going to lay down some infrastructure and parcel the land up to whoever wants to buy it, nature will decide what the land is used for".

The latter is actually quite likely to produce the higher economic value land use, but there is no good political narrative. And in a world of strict zoning rules, there might not even be a legal framework for it.

Comment · 7 years ago
> Right, that's how you could plausibly have made one or two, as a palace amusement, or a circus act. It's a little surprising this didn't happen (as far as I know).

You also need people to ride it. It wouldn't fly as a palace amusement because the king (and more importantly the little prince) would keep falling off. They won't have an incentive to value the skill until there is a horde of middle-class, 19th century, hipsters showing him up.

A circus act is more plausible, but only if there's some continuum of other simpler circus equipment leading up to this rather sophisticated bit of engineering.

Comment · 7 years ago
> That does not sound like a good argument at all. Metal for vast majority of human history gave you massive edge in weapon technology. Some Mandarin just shut something like that down? Seems super unlikely

The assumption here is that every thing works in a clear way so you can see the military or whatever advantages of a particular phenomenon. Now I don't know if AnimalMuppet is literally correct that the bureaucracy simply shut down the steel industry -- but if it happened it would be because all that cheep steel was not being used for obvious things, like the imperial army, but for other unexpected uses. Maybe arms and armour still had to be made the old fashioned way anyhow, so there was no immediate military advantage.

More likely, things were subtler. Things innovations can strangled long before their importance is clear. Imperial China had a vibrant merchant class, but it isn't the kind of place that is likely to tolerate the "disruptive innovation" which fuelled Britain's Industrial Revolution -- where a bunch of upstarts come and do things with unexpected things. Even modern China (or for that matter the modern United States) struggles with it.

Comment · 7 years ago
That's one part of it.

Another part is hiring a breed of test engineers who like breaking stuff and have a knack for it.

Comment · 7 years ago
Fair enough.
Comment · 7 years ago
Comment · 7 years ago
That's OK, we nowadays use icons that don't make sense to anyone at all. I mean how would you know that three horizontal lines was a "Hamburger menu", and if you do know that, why would you want a Hamburger?
Comment · 7 years ago
It sounds like this guys employer has taken first step to inventing QA.

There's whole classes of highly paid engineers whose job is to do this. But they work for old fashioned, boring, companies.

Comment · 7 years ago
> ... and watch as your page hit Slashdot...

And then fall over?

I miss the days of The Slashdot Effect[1]. Now it's the JS that makes my PC fall over.

[1] Come to think of it The Slashdot Effect would have been a good band name back in the '90s.

Comment · 7 years ago
> Your code won't be pretty,

Depends on the algorithms that use that code. Two separate arrays is not a bad way to represent a vector-of-tuples. And so if you think of everything as a vectorised operation (and if that makes sense for your use case) then the code can be clean enough.

Efficiency-wise it depends on how the locality of reference falls out. There are cases where it's more cache-efficient to store the pairs next to each other, but again for big vectorised operations you might lose nothing by using two cache-ways instead of one.

Comment · 7 years ago
I would put it the other way around. wpa_supplicant is actually very good at doing what it does. But rolling it's functionality into ifconfig is probably "good enough".

wpa_supplicant is an application of the "do one thing" philosophy. The kernel provides a some basic hardware-abstracted plumbing which lets a specialist tool do all the complicated handshaking and what-not for wireless.

This saves the basic tools (ifconfig, ip) from having to build in all that wireless complexity. But it does introduce an extra moving part that has to be configured. For this reason, just bloating it into the basic tool is likely to be good enough, and also provider a superior UX (for nerds like us).

Comment · 7 years ago
Is it because people or so young, or that the pipeline to become a junior-but-still-responsible person goes through schools rather than something like an apprenticeship.
Comment · 7 years ago
> Unison https://www.cis.upenn.edu/~bcpierce/unison/ is a tool to keep two folder structures in sync - that is its main goal but it can have other uses.

And though I tend to be a GUI hater, Unison is one tool where I find the GUI much more useful than the command line alone. The game is to iteratively come up with a set of rules which Unison will use to into effect on your dataset. The GUI quickly show you the effect of your current rules, and lets you propose the next iteration etc.

Comment · 7 years ago
I think is what people might call "knowledge capital", "intellectual capital" or some such vague term.

In my experience IP corresponds specifically to legally recognised property in otherwise copyable information.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton