HNHacker News
TopNewBestAskShowJobs

adamtj

762 karma · joined February 12, 2009

submissionscomments
adamtj··on Let's Encrypt: How It Works
They're generating the certificate, not the keys. Those are different things. You can probably think of the certificate as the computer equivalent of photo ID for the server.

They both show who you are (Driver's License: your name, cert: hostname), what you look like (DL: photo of you, cert: the key's fingerprint) and provide proof that they are genuine (DL: difficult and illegal fake, cert: practically impossible to do the math to forge a signature).

Note that they mention certificate singing requests. If the CA generated the keys, it wouldn't also need a CSR. It could just generate and send you the public and private keys and the signed certificate for them. However, it does need some information about the keys it's signing. You provide that information in the form of a CSR.

adamtj··on Why Python Is Slow: Looking Under the Hood
How is python substantially different from javascript in this case? Google has a crazy fast javascript JIT compiler, even though javascript has something equivalent to python's setattr().
adamtj··on Why curl defaults to stdout
It sounds like maybe you are most familiar with GUIs or the web. Curl is a UNIX tool and doesn't work like those things. If it's the only unix tool you use, that might seem jarring.

Of course it would be a smoother experience for you if it worked more like the rest of the tools you are familiar with, but changing it would be a mistake. If curl were changed, then it would be one of the few unix tools that differs from the rest. That would make it jarring to people who use unix. Nobody wants to erode the good parts of unix and destroy the unix way just to make some commands slightly less jarring to people who don't regularly use unix.

Especially when you don't even need curl. That's the wrong option for you. Right next to the option in Chrome to copy a curl command is the option to copy just the url. Just use that and paste the url into your browser, which will work more like you'd expect.

If you must use curl, you almost certainly don't want to use "-o". That's an advanced option for when you are downloading multiple resources with a single command. You use it to provide a template for the multiple output filenames necessary in that particular situation.

If you only want to specify a single filename, then do like you would with any other typical unix command and redirect the output to a file. For example, append ">filename.html" to the end of the command.

Unix tools rarely have options to specify output filenames. They are as unnecessary as a button in a web browser that will let you "Display this webpage." Displaying webpages is what a web browser does, and writing output to a file is what a unix command does. It's just that the default file for a unix command is your terminal. Your shell makes it dead simple to pick a different one if that's what you want.

adamtj··on Markov Chains vs. Simulation: Flipping a Million Little Coins
"Simulation" in this case is just numeric integration the hard way, even though there's a closed form solution.

This is a calculus problem, not a programming problem. After you solve the real problem, the programming is trivial. If you don't solve the real problem, you can't really be sure your simulation gives you the correct answer.

Exponential decay is a lot like compound interest. Simulating this problem is like computing interest by compounding yearly instead of continuously. It's not hard for those methods to differ by a factor of two or ten or even more. You can't really know if your simulation will be affected without doing the math anyway.

adamtj··on Libtls – New TLS API from LibreSSL
But, I don't want to do TLS. I'm not in the encryption business. Instead, I just want to send data across the network.

The OS used to do the networking for me. It exposes the BSD sockets API, which is pretty simple and nice but is unfortunately no longer safe to use. Yet, the kernel doesn't offer anything else.

So you're right, but you don't go far enough. It should all be in the kernel. Instead of tls_config_set_cert_file() we should be using setsockopt(2). Until we can, however, we'll have to rely on user-space libraries.

adamtj··on Libtls – New TLS API from LibreSSL
I'm not sure there's only one line to be drawn. There is absolutely a place for an API like this -- but that place is not as a replacement for OpenSSL.

The world has changed. We must now consider send(2) and recv(2) to be toxic. They are fundamentally broken and cannot be used safely. The problem is, what do we use in their place? Simple sockets should continue to be simple to use, even now that we need to layer encryption on top. OpenSSL is not a practical replacement for those functions. This new API is a pretty good attempt. It may not do everything that OpenSSL does, but it doesn't need to. It only needs to make the simple things easy. If you have a different use case, you should use a different high-level API.

I think the way to understand this API is to see it as a "view", a wrapper, an abstraction. It's like a database view that hides the dozen tricky joins necessary to answer a frequently asked question. Also, like a database view, it is one of potentially many, each with a different purpose.

As a wrapper, this API exposes only a subset of the full functionality, but it's a very useful subset. Perhaps 80% of the complexity of the OpenSSL API comes from only 20% of use cases. This API exposes only a small subset of functionality, but that's what makes it simple and easy to use and it still covers 80% of use cases. If you aren't in that 80%, then this API isn't for you. But that's ok!

It seems reasonable to expect multiple layers of cryptography libraries. We ought to have a set of low-level libraries that implement the fundamental primitives in a general and orthogonal way. It would be a sort of cryptography "kernel". Most developers wouldn't use it in the same way that most don't directly make syscalls into the OS kernel, but instead use a high-lever wrapper library. To open a file, for example, we often use a wrapper like the functions in a libc, or a wrapper of a wrapper like libsqlite3.

So, if an API doesn't cover your particular use case, that doesn't mean it's bad. You just need to find a different API. The uses for cryptography are myriad. It seems unreasonable to expect a single API to cover everything while remaining simple and easy to use.

adamtj··on The Anti-hero of CSS Layout – “display:table”
Are html-tables bad even for their intended purpose of laying out tabular data?
adamtj··on Holy War on Sites That Demand Pinboard Passwords
Yes, credit card numbers are used as passwords and need to be secret, but that doesn't change the fact that they are also used as names and need to be public.

This is the fundamental problem. We're using a single thing both as a secret and as non-secret public information. This confusion of purposes is what results in the massive data breaches we constantly hear about on the news.

When you buy something at a physical store like Target, their computers will store your credit card number. Why? They aren't Amazon. It won't ease your next purchase as you'll still have to present your card. Isn't it dangerous?

Yes, but consider what happens when you return something. They can't just give you cash. That would open the door to money laundering and plain old theft. They have to put the money back on in your card account. But which account? They need to name the account when informing the credit card company of the refund, which means they need to store the name. That name is the credit card number. I suppose they could store a hash of your account number and require you to swipe your card when returning items, but that's inconvenient. You might not have the correct card with you. You may have cut it up. You may be returning an item for somebody else.

A credit card number is the name of the account. As such, it must be public and cannot be secret. If instead it is to be the password, then the account really ought to have a different public name. After all, we need the ability to talk _about_ an account without the mere conversation granting all parties permission to _charge_ the account.

Here's another way to look at it: My bank will let most anybody take money out of my checking account -- provided they present the bank with two things: They need to tell my bank which account to take money out of, and they need to present an authorization token granting them permission to do so. One type of authorization token is called a "check" (though there are others). An "account number" is how a person specifies which account -- it is nothing more than the name of the account. Simply presenting the account number is not normally enough to grant access to withdraw from the account.

Everybody to whom I write a check will know my account number. It's not a secret. For convenience, it's even written on the check. What protects my account is that my bank is only allowed to withdraw money when presented with an appropriate authorization token. They aren't even a secret tokens: they are single-use, tied to a specific person and a single amount, and they can only be activated by me. Stealing my checkbook won't help you. Stealing a check I wrote to somebody else won't help you. You can't cash a check multiple times. You can't withdraw any more or less money than I authorized.

The problem with credit cards is that the account name is also the authorization token. Moreover, it's a multi-use, unrestricted token. It's a name that many people need to know and store long-term, but anybody can use it, multiple times, to withdraw any amount of money they choose. The credit card industry doesn't yet have anything that works like checks, which is why they work so hard at fraud detection.

The future is probably limited-use auth tokens for websites and chipped cards for physical stores.

For websites, I'm sure it'll be the same process as signing in to a random website with your facebook account. Imagine buying something on a website, but instead of entering your credit card number, you are redirected to your credit card company's website. You "sign-in-with Visa" by entering your account password. You are then redirected back to the website you came from, this time with an authorization token. That token will only be usable by the website you authorized. It would be useless to anybody who stole it. You may even be able to add restrictions. You could make a token that can only be used once. Or once a month for up to a year, and no more than $10 each time. The token will contain your unencrypted account number, so you won't need to enter that, but it also won't be secret. Only the token as a whole can authorize a charge, not the mere account number. The secret is your account password that only you know.

For physical stores, chipped cards will likely contain the secret. Or maybe cellphone hardware or apps. They can be used to create a valid auth token for a without ever having to surrender the secret to the computer that's processing the purchase.

Passwords are authorization tokens, but not all tokens work like passwords. Passwords are an inappropriate kind of authorization token to use for purchases. Confusing an account name with such a token is even worse.

adamtj··on Holy War on Sites That Demand Pinboard Passwords
Wow, that's almost as bad as sites that ask for my credit card number. Of course, my CC number is like my name: public information. Unfortunately, the companies behind the card seem to think it's more like a password. While the law protects me from most liability for fraud, they still want to change my name, er account number, every time there's an issue. That requires me to re-enter it in various websites, inevitably at the least convenient time.

Thanks for helping drag the world into the future.

adamtj··on From Novice to Master, and Back Again
I love when that happens! That's because I hate being wrong. I really really really hate it. I hate being wrong so much that I'm extremely grateful when people point out my mistakes. Then I get to stop being wrong and start being right! The satisfaction I get from that more than makes up for any amount of embarrassment stemming from the revealing of my mistake. It's not that I hate _appearing_ to be wrong. A little embarrassment never killed anybody. Rather, _being_ wrong is awful, even if nobody knows it, even if I don't know it.

I hate being wrong.

adamtj··on Show HN: PipeSQL – Building SQL queries bottom-up using pipes and filters
That doesn't make any sense. What happens when you need to change the SQL?

To an application developer, this looks like nothing more than a code generator. Generated code is not source code and it should not be edited directly. Rather, you should change the generated code's source code and then re-generate it. While it may not be a layer between the app and the database, it's definitely an extra step in your build chain.

You'd be foolish to tie your application's build process to a cloud service that may disappear without warning. No sane developer would do such a thing. I don't see how this is any use to developers in any form other than a standalone compiler.

adamtj··on Show HN: Sail boat simulation – try to sail into the wind
This seems wrong. The boat never moves when Sail Angle is 0. Boat Angles of 40 and 90 should cause motion with a Sail Angle of 0, but they don't.
adamtj··on Show HN: Speeding up PostgreSQL through vectorized execution
I'm not sure that I understand the big picture here. Is my summary correct?

This optimization does not apply to Postgres in general, but only to citrus_fdw and other column-store foreign data wrappers.

The Postgres execution engine was designed to operate on a row-store. Even so, it can operate on a column-store via a foreign data wrapper like citrus_fdw. However, to do so it must currently reconstruct rows-at-a-time to fit its row-oriented nature. As a result, it cannot currently realize the potential performance benefits of using a column-store for certain queries.

This article is about an extension that adds some new column-at-a-time aggregate functions, then hooks into the Postgres executor to modify eligible query plans to use them. It thus enables Postgres to take advantage of the column-oriented nature of the citrus_fdw.

Is that an accurate way to look at it?

adamtj··on This Is What Common Core Looks Like
When you're in 2nd or 3rd grade, it's more important to learn the mechanics of subtraction than to understand why it works. Kids at that age need to fill their brains with facts so that they have the raw materials for developing understanding when the are more mature and more able to understand.

In this case, borrowing is more compact and efficient. That makes it faster and easier, both on paper and in your head. If you write out the borrowing method as verbosely as this counting-up method, it's almost as easy to understand. However, that's not important in elementary school and shouldn't be done. The counting-up method has the disadvantage that you can't write it more compactly.

Students who learn the counting-up method will be hobbled in algebra: they'll be wasting their limited brainpower on the mechanics of subtracting the hard way when they could be using an easier method and devoting more brainpower to learning the concepts of algebra.

Of course it's important to understand how subtraction works, but by the time you get to algebra, that should be easy. Anybody who is uncomfortable in their ignorance can either just think about it, or ask a teacher. It's not hard. Just note that 325 = 300 + 20 + 5. Then line everything up and go. That understanding isn't worth a lifetime of pain.

adamtj··on CVE-2014-6271: Remote code execution through bash
No, it's not printed in your trivial example, but if you replace the simple "echo" command with any bash script, or any executable that calls a bash script, or any executable that invokes another program that calls a bash script, or ... then you're screwed.

Even with the "zsh", this should print "vulnerable":

  env x='() { :;}; echo vulnerable' zsh -c "bash -c true"
You don't have to use bash explicitly. It might be called by some application or library. For example, if your default shell is a bash, this will work too:

  env x='() { :;}; echo vulnerable' zsh -c "python -c 'import os; os.system(\"true\")'"
adamtj··on Was jquery.com compromised?
For jquery, the page is often on your server and the script is on a CDN. The worry is that if an attacker compromises the jquery source on the CDN, they can exploit thousands or millions of sites on as many different servers. If each of those servers were serving pages with hashes, the modified jquery on the CDN would be rejected.
adamtj··on 3-D Printed Keys Can Pick High-Security Locks in Seconds
Of course, but the point of the article is that blanks for high security locks used to be much harder to come by. Now, software and 3-D printers make it easier to defeat the feature that makes them "high security". The implication is that pretty much anybody can do it now.

I remember reading several years ago about how one can take a picture of a key from far away and use that image to replicate the key. Back then, replicating keys from a picture was not something just anybody could do, so it wasn't a threat worth fretting about. Presumably 3-D printing will make that easier too. One can even imagine an app: point your phone, press a button, and get a key in the mail a few days later. I expect we'll see that article soon.

adamtj··on The snow words myth: progress at last (2007)
This article was only mildly interesting to me. I think there is a better story tangential to it.

The article is only mildly interesting because it gets at the truth behind the idea that Eskimos have 40 different words for snow. If I didn't know that, it would have been very interesting. But, of course, that common wisdom is wrong. I would be surprised if there's anybody who doesn't at least suspect that's the case. The truth is never as clean and perfect as the stories we tell, which makes it more boring. But, the truth is much more powerful. That power is exciting. I'll always chose to take the boring but powerful truth, even if it ruins the fun story for me. I do, however, have a passing interest in linguistics, so it was nice to learn something about the Eskimo language family.

However, there's an obvious tangent to this article that I think is more interesting and more powerful: I figured this article would be about snowclones, or at least mention them. It's not and it didn't.

"Snowclone" is a really interesting word that was coined only a decade ago. You could say that it names an idea that was recently discovered: that many phrases are specific instances of some clichéd template. The phrase isn't the cliché and may even be unique. Rather, it's the template that's familiar.

For example, "If Eskimos have 40 words for 'snow', politicians surely have dozens of words for 'lie'." More generally, "If Eskimos have N words for snow, X surely have Y words for Z." Also, "X is the new black", or even "X is the new Y". It's a name for a phrase that's a clone of that one about Eskimo words for snow. Hence, snowclone.

http://itre.cis.upenn.edu/~myl/languagelog/archives/000350.h...

http://en.wikipedia.org/wiki/Snowclone

Of course, this idea was known to people long before "snowclone" was coined. When I say the idea was recently "discovered", I mean that in somewhat the same sense that, after the Age of Discovery opened the globe to them, Western naturalists "discovered" and named many animals and plants that were well known to indigenous peoples and had even been seen by previous western explorers. Still, the West didn't come to know those animals until somebody recognized them as new and gave them a good name. Ok, maybe this analogy is stretched. Still...

To simply encounter something doesn't mean we recognize it for what it is, or that we can distinguish it from other similar things. We need names for that.

I think good names are more important than we generally give them credit for. A good name is like a handle on an axe-head. Hand axes have a long history and are among the first tools that humans made. Attaching a handle to one gives much more leverage, which makes chopping easier and more efficient. A handle even enables the use of a heavier, more powerful axe head. Good names similarly make ideas both more powerful and at the same time easier to work with than they were before they were named.

adamtj··on The Lowdown on Lidar
Ah, thank you. That's what I assumed the policy was, but I wasn't sure if it was implicit or explicit. Now I know.

I guess the point I'm attempting to argue is that this particular policy is suboptimal and should be changed. Of course, when a policy or consensus exists, we should follow it. When it's a bad policy, we should follow it until we change it or remove it. I think we should change this.

My position basically boils down to a worse-is-better argument. I think the desire to maximize accuracy with original titles actually harms the conversation more than inaccuracies and editorializing in information-packed summaries.

What matters to me in this case is the signal-to-noise ratio, not the absolute level of noise in the data. Original titles can be "cleaner" and less noisy, but they also have relatively little information, or signal. I would rather have twice the noise if it gives me three times the signal.

I even see the noise as useful in a way. It adds color. Even when a title is inaccurate, it's sometimes interesting to think about how or why it is inaccurate. A little mess never killed anybody, and can even keep us healthy. Ultimately, if I'm so busy I don't have enough time to be occasionally mislead by a click-bait title, then I don't really have time to spend on HN in the first place.

I think the right way to deal with inaccurate titles is either to simply ignore them, or maybe to downvote them and to upvote duplicate posts with better titles. But won't HN then turn into reddit? I don't think so.

See, I think we try to fix too many things with laws where we should instead use social pressure. The reason that Americans don't litter very much isn't that it's now a ticketable offense. It's that we have decided that litterers are idiots and everybody hates them. The reason many subreddits are cesspools isn't the lack of rules, it's that they're populated by people who haven't collectively figured out a better way to behave -- or who don't particularly value the benefits of that different behavior. Adding a new rule won't fix anything if people don't understand and accept the purpose behind the rule. And if they understand the purpose, they usually don't need the rule.

Someone could argue that HN is something of a cesspool because so many comment threads go off topic. Like this one. Some people despise that. In general, though, HN users generally seem to appreciate an off-topic conversation so long as it's adding value. What we don't approve of is comments that don't add value. But, we don't need rules for that. It's just our commonly accepted behavior. Other groups have different values, and that's ok.

adamtj··on The Lowdown on Lidar
But, HN titles are content. They are part of the conversation about the article. I agree that authors should be able to title and summarize their own work, but only in that work. They shouldn't be given any special control of the conversation about that work, which is what HN is.

I don't see the purpose of having mods vet all titles or summaries. I don't think titles need any special blessing by an elite caste of users. I don't think it's important that titles be in any way "official" or even neutral.

Perhaps I'm not concerned because I also don't see duplicate posts as being especially bad. Maybe they are a bit annoying sometimes, but there are worse problems in the world. Why not simply embrace duplicates and let the best title rise to the top? Certainly people occasionally post comments saying essentially the same thing. There, we just let the voting system do what it does and push the best version to the top. Why not do that with titles as well? The only problem I can see is that conversations may be fragmented -- but copy/paste is super easy. Links in comments are easy to create and to follow.

The only real need I see for moderators is to occasionally deal with a flagrantly abusive link. Even that is questionable.

I think people are smart. We're mostly adults here, and we aren't easily controlled with blatantly editorialized links. I don't see any danger that we need protection from.

adamtj··on The Lowdown on Lidar
I would assume such changes come from a desire to be accurate. But accurate how? In what way? That depends on the purpose of the title.

As I see it, our differences of opinion on this topic stem largely from misunderstanding it. I think it's not at all clear what we're even talking about, so we wind up arguing about slightly different things and fail to come to a consensus.

I think that we need to really understand the purpose of these titles, and to also understand that different people mean different things by the word "title". In fact, I think we're talking about three distinct but related ideas: titles, names, and summaries.

A name is a word or phrase that identifies a thing. A name isn't necessarily descriptive and often has no more meaning than being a word or phrase denoting the thing it names. My name is Adam. That tells you very little about me. All you can do with that is to identify me.

A summary describes a thing. I am a software developer with a penchant for pedantry. That's a summary. It actually tells you something about my nature, which the name "Adam" does not.

A title is first and foremost a kind of name. Ideally, it's also a descriptive summary, though that's not required. As a name, the important thing is that it is as short and as unique as reasonable. That's more important that descriptiveness.

In my opinion, Hacker News links should not be titles, i.e. names, but rather short summaries. Using a title is fine, but only as long as it's also a good summary.

The point of the front page is to link to things that are new and fresh. Ideally, most people won't have seen most things, meaning few will be familiar with their names. A page of new names that nobody recognizes is pretty pointless. You might as well use randomly generated words for the links. Or numbers. Like item?id=8114336.

Instead of titles, I think links should be summaries. When they are summaries, they can provide some real information about the thing that is linked. That can be used to decide whether to invest time in clicking through. When a link is just a name, you have little information to base that decision on, so you have to click most of the links to know which are the interesting ones.

But, if all HN links are summaries, how will we know what to call the articles they link? Well, if the summary is interesting enough to want to talk about, you'll click the link and see the actual title. Names are unimportant on the HN front page. They only become useful in the comments, and by then you should have at least read the title of the article, if not the whole thing.

The original summary here was useful and information-packed without being too long: "Josh Bloch Fights a LIDAR Speeding Ticket (with Science)". I care that it's Josh Bloch. I care that he's using science, in court. I care that it's about LIDAR and not RADAR. The fact that it's Josh Bloch, and that he's using science to fight a ticket means he was probably wrongfully ticketed, implying weaknesses in LIDAR speed guns that I want to understand. I got all that from a good, short summary.

The new summary is just the title of the linked article, which in this case is mostly just a name: "The Lowdown on Lidar". So, it's about LIDAR generally? Or as opposed to RADAR? Given the use of "lowdown", it's probably it's about some stuff that isn't commonly known. Maybe. Or maybe it's a boring, entry-level article on range finding in general that happens to talk about LIDAR rather than RADAR or SONAR. The title tells me very little and is not helpful in deciding whether to click the link, though it is a good name that's short and easy to use when talking about the article. I enjoyed reading "The Lowdown on Lidar".

The most important and useful thing a main page link can do is to accurately and faithfully inform the reader about the contents of the link. Accurately naming the linked thing is neither important nor useful. That is especially not useful when the name given by the original author misrepresents the contents, as is sometimes the case.

Accuracy is important in general, but we must be clear about specifically which kind of accuracy matters most here.

adamtj··on What will I look like?
Fahrenheit is pretty easy. The key temps are 30, 60, 90:

  -30 is dangerous, hibernate.
    0 is frigid, wear a thick coat and warm pants.  
   30 is cold, wear a coat. (freezing point of water)
   60 is cool, wear clothes.
   90 is hot, no clothes.
  120 is roasting, God help you. (melting point of humans)
Bonus Temps:

  72 is room temp.
  78 is time to wear shorts.
  48 is time to wear shorts in cold regions*.
* That is, in any place where people don't understand why finding outlets to plug in electric cars is a problem. Sure, you can't currently plug them in at the store, but your garage has power. What's that you say? Well, of course many people live in apartments and don't have garages, but they can just use the outlets in the parking lot. What, you don't have outlets in your parking lot? Well where do you plug in your gas powered car? You know, for the heater? To warm it up enough to start when it's 30 below? What tropical island do you live on?
adamtj··on The Happy Demise of the 10X Engineer
I think the core of the argument is that most software problems are becoming easier, which means the talents of the very best just aren't applicable or especially useful.

If something is easy enough, anybody can do it, and do it nearly as well and as fast as the best. For example, nobody can flip burgers 10x faster than average. Maybe 2x, but not 10x.

If something is difficult, then many people won't be able to do it at all. Most of the rest may only be able to do it very slowly and with great difficulty. The very best will make it look easy, even though it's not.

When something becomes 10 times easier, that doesn't mean the best become 10 times better or faster at it. They may become a little faster, but the real gains are at the low end: The average and worst performers become significantly better. Further, many people who just can't do the thing become able to accomplish it.

adamtj··on Less research is needed
Perhaps this is one of those white lies we tell to justify doing the right thing. A dishonest means to an honest end.

Is this maybe how researchers publish negative results without having to admit failure? We often complain about the dearth of published negative results. We talk about pre-registering studies and so forth.

It seems better to me for researchers to recast a negative result as an inconclusive positive result "requiring more study", than to not publish it at all. Just because there is a call for further research doesn't mean we have to do it.

adamtj··on Norris numbers
My point? What, are you feeling insulted? If so, stop. After all, I don't know him or you or anything about the project you were on. Anybody reading my comment would know that.

I thought maybe you missed the point of the article, that's all. Read it again, more closely. Perhaps then you'll see Cliff in a different light.

If you missed the point of the article and he wrote a 1400 line 'if' statement, then it's at least plausible that you're both stuck behind that first or second wall. I could easily be wrong. Then again, maybe this article has the key you need to catapult yourself far ahead of Cliff. He may well be a genius, but you could potentially be far more effective and productive. You may even be able to accomplish things that Cliff would fail at.

So, give the article another read.

adamtj··on Norris numbers
Genius?

A weak man can lift a small rock. A strong man can lift a large rock. But to lift a ten ton boulder, you need a crane. Even a weak man can operate a crane, if he knows how.

Your genius is like a strong but stupid man. Maybe he or she can lift a 1400 line 'if' rock, I mean block, but that's probably the limit. Any more would require a different mode of operation -- the programming equivalent of using a crane.

The point is that people who haven't broken the 1500 line wall will write code with no structure. That's why they can't break through the wall. That's the heaviest code they can lift without assistance.

Certainly there are well structured 1500 line programs. But those overwhelmingly come from people who have broken through that limit. The people who know how to use a crane will tend to use them even for smaller projects.

Why would I go to all the trouble to use a giant crane just to lift a smallish 20 kg (40 lbs) rock? Because then I won't get tired or strain my back. So I can lift another. And another, and another. I can do this all day without breaking a sweat. The strong man is tired and sore and worn out from just a few dozen small rocks, while I'm still fresh, still going, and still able to lift multi-ton boulders.

adamtj··on The 10:10 Code (2010)
That's a lot of digits.

It would be interesting to interlace the latitude and longitude bits in such a way that any prefix is a valid code of reduced resolution, and you can add arbitrarily many digits for increased precision. I think geohash does this? Or does reducing precision give you a geohash that isn't a prefix? Anyway...

Each digit of such a code might be roughly equivalent to one decimal digit of both latitude and longitude. For example, maybe the first three digits would get you to within about a nautical mile.

But that's dumb. While short codes are nice, a short code that only gets you within a mile is mostly useless. It would be better to use a suffix than a prefix. You can still get arbitrary precision with a decimal point.

First, specify a fixed "unit" of precision. Say 10m. Any short code is assumed to be the least significant digits. If my math is right, you could specify any point closer than 2 km +/- 10 m using maybe 2 digits. Most buildings in most cities will need maybe 3-5 digits.

You could invite somebody from the same city to your house, telling them you live at YA9. Their GPS would assume that the missing prefix digits match their current location. If you want to give them the location of the centerpiece on your dining room table, you could add a decimal point and more precision: YA9.7R.

You could even use short-codes that look like Mapcodes: US-DC, YA9. The location provides the context for the missing prefix digits. But you always have the option of specifing the full code to avoid ambiguity or lookup tables.

One problem is the check digit. Maybe there's a way to interlace the check bits too, so you don't need a full check digit for every code. Is there a checksum algorithm where a prefix of the checksum is a checksum of a prefix? That obviously couldn't detect a one-digit typo. Or, maybe just put a check digit at end. All codes become 2 digits minimum. The checksum algorithm wouldn't need to be fancy since you can assume the rest of the digits based on your current location.

Another easily fixed problem is mentioned on the Geohash wikipedia page: locations near the equator and prime meridian could have wildly different codes than other locations nearby. The solution to that is easy: Translate lat/lon into a different system. Translate latitude into a number from 0 to 180, with 0 being the south pole. Similarly translate longitude to a number from 0 to 360, with 0 being at the international date line. Then encode those translated numbers. Nobody would ever see those intermediate numbers. You always display either lat/lon or the code, but the translation ensures that you don't have vastly different codes for nearby places (at least in any place with a significant number of people).

adamtj··on Y Combinator has filed an official comment with the FCC
Speed limits only apply on public roads. They are a condition of using the road, not a condition imposed on your vehicle. You could build a private race track and drive as fast as you want.
adamtj··on The Pentagon's $399 Billion Plane to Nowhere
I'm a realist, so I understand and accept that the Pentagon's main goal is keep its budget healthy. What I don't understand is why can't we do that in a way that gets us good airplanes?

I'm a wary optimist. Trust, but verify. Hope, but plan for the worst. I don't understand enough to know whether we're living in a Pax Americana or a Pax McDonalds. I hope it's the spread of globalization and liberal democracy, but I'm willing to spend the money just in case it's actually the shadow of the American military machine that keeps our relative peace. If my fears are justified, however, it's our military machine, not our military budget that keeps nation-states polite.

I can be a ruthless critic. I'll buy spin (multi-role is cheaper) only as long as I don't think much about it. But, now I'm thinking about it. It's obvious that an F-35 is a joke. 2500 of them is less funny, but still not nearly as awe-inspiring as it could be.

But, I'm apparently naive. I don't understand why some ambitious politician can't take this opportunity to really do something of note. Why can't somebody take this political machine we've built, with contractors lined up in many states, and repurpose it to produce useful, best-of-breed airplanes? I would buy the spin that it's cheaper and easier to design four different planes each tasked do one job extremely well than it is to design one single plane to fill those four roles simultaneously. There is such a thing as the opposite of synergy. Somebody could coin a phrase here, sell the public something huge, and come out looking like a hero for making good on the money we're inevitably going to spend. Let the Pentagon have their budget. Let the politicians have their jobs. And let me have a military with the best equipment in the world.

adamtj··on Why Bikes Make Smart People Say Dumb Things
That argument works even better for cars. Cars are much heavier. It's far more effort to stop a car and get it going again than for a bicycle. It would dramatically improve gas mileage if cars could ignore stop signs.
← PreviousPage 3 of 9Next →