HNHacker News
TopNewBestAskShowJobs

twhitmore

299 karma · joined April 22, 2019

submissionscomments
twhitmore··on Mars Helicopter Lands Safely After Serious In-Flight Anomaly
It's not actually a time "stamp" if you don't keep it on or tightly associated..

A struct or pair of {Image, Timestamp} would be the simplest & most robust solution.

twhitmore··on Functional Programming in Go with Generics
Java is still an excellent option in many respects.

Notably it has: - mature generics - streams - exceptions - rock solid for server apps - some FP style libraries - good timing - probably the widest universe of libraries

Only downsides are, 1) JVM startup times and 2) it's not the newest shiny thing.

I looked at the whole language comparison recently for a greenfields project. While initially optimistic, I was surprised how many capabilities some new alternatives are missing, and by the enthusiasm to write thousands of lines of low value C-style error checking.

An architectural assessment: Above a trivial level of software, the majority of code composes something that can fail. Exceptions are an ideal mechanism for this general truth.

twhitmore··on Teeing, a hidden gem in the Java API
Sorry, I'm skeptical -- how exactly does a 'yield return' resolve the divergences between functional programming & mutable data structures?

My layman's impression was that 'yield return' was largely syntactic sugar around an iterator, rather similar to Java.

twhitmore··on Back in 1993, I was taking a number theory class
I loved the response in the Twitter thread: "If you tell this story to a full stack developer he will think this is a sci-fi."
twhitmore··on The Hotdog web browser and browser engine
Love the opinionated swearing rant that is the sample website! (See screenshots at bottom).

Yes, simple vanilla HTML is inherently responsive. And much of the modern web is rubbish.

twhitmore··on RNA Memory Hypothesis
98.8% of our DNA is identical with a chimpanzee, and 60% common with a fruit fly.

I am personally interested by the 'RNA Computer' hypothesis which posits an additional layer of differentiation in computations performed by interacting RNA.

I have also read of experiments where memories (learned behaviors) were transplanted by injecting ground-up neural material. Flatworms were the subject I think.

Of course this is all near the edge of mainstream, but I think genuine science demands openness to new ideas.

twhitmore··on Superintelligence cannot be contained: Lessons from Computability Theory
I think this assumption is worth at least casually testing.

Turning off sounds easy -- Except that it's almost certainly connected to, or adjacent to, the network. Where else are the large volumes of training data coming from?

Presumably being super-intelligent the AI would be:

1) likely to anticipate being turned off,

2) super-normally capable to identify & traverse any network security measures;

3) potentially also highly capable to identify & traverse weaknesses in other (eg. social or physical) security measures).

4) possibly able to be covert/ stealthy actions via the network.

5) possibly able, if able to reform on the Internet, to escape to there.

I'm fairly much on the super-AI fence. But in a dystopian scenario the proposal of a super AI being able to be turned off as the key means of safety, seems scarcely credible.

Note even that without being able to reform on the Internet (eg physical embodiment requires singularly specialized computing equipment), I can't logically see that extreme hostile actions (destroy global finance system, subversive propaganda campaigns, launch wars, launch nukes) are obviously easy to preclude.

twhitmore··on SQLite briefing for Linux kernel hackers (2019)
Files are a good abstraction to start from.

But to be honest, persistence & durability of data are the goal of Storage and thus what the filesystem API needs to be designed for.

The API needs to clearly be designed for atomicity, durability & to allow coordination across multi-file structures.

This can be achieved by either 1) indicating all required synchronizations to callers in metadata, or 2) fully encapsulating durability by making the API atomically commit every operation.

I don't agree these factors should be hidden, since a losing/ corrupting data are fundamentally at odds with the goals of a Storage API.

It's not just SQLite, any application needing to maintain a datastore needs reliable storage.

twhitmore··on SQLite briefing for Linux kernel hackers (2019)
But to be honest, persistence & durability of data are the primary goal of a Storage API.

I don't agree these factors should be hidden, unless the API guarantees every single operation is atomic & durable.

Full details as to atomicity & durability need be available to callers (not just SQLite, but any application that wants to provide a reliable datastore) so that they can write information durably including across coordinated multi-file data structures.

twhitmore··on What is the best dumb TV?
My experience with a Panasonic inverter & grill oven was that it didn't make the food hot, even if you gave it double the time. That defeated the point for me.

I ended up using a cheapo 600W microwave that cost 1/4 of the expensive Panasonic but would actually make food hot.

I've also had other experiences of bad usability in Panasonic products. Pointless extra button presses to to tell it you actually want to _microwave_ at _full power_. Who knew you would actually want to use your microwave for microwaving? /s Just let me press the time & start, already.

I now have a Samsung with convenient controls and a cheerful tune.

twhitmore··on Adventures in JIT Compilation (2017)
I would recommend building a tutorial around a source language that wasn't deliberately obtuse.

I do see it makes the parser simple, but it reduces the audience to the small fraction that think a deliberately confusing language is useful.

My opinion anyway.

twhitmore··on Ask HN: What Happened to Larry Page?
I totally understand this. I believe BG's ability to influence, guide and sway global efforts must be enormous. I would think he can probably setup a call with any leader in the world.

Some people only understand "power" in the sense of military or corporate decisions. (This is where Trump misses the big idea.) But imagine how powerful it is to be able to set the agenda, and have most of the world follow you and agree to commit resources in the direction you set.

I would say soft power generally beats hard power, due to being more efficient in terms of costs, creating more buy-in and generating less resistance.

twhitmore··on Most “mandatory requirements” in corporations are imaginary
Management works by creating processes and systems. There are always inaccuracies and imperfections in how these are targeted, and inefficiencies resulting.

Yet creating processes and systems is the expected task of management -- it's a key way to scale.

I'm fairly much averse to process myself, but have been occasionally involved.

twhitmore··on Never build something no body wants to use
Broken.
twhitmore··on New imaging system creates pictures by measuring time
Given all the degrees of freedom in a three-dimensional scene, and the one-dimensional data stream they capture, my caution is aroused.

I'm suspicious that their outputs may be solely the result of over-fitting from neural networks.

And that given a significantly structurally different scene, the output would be nonsense.

The article does not seem to show a broad variety of scenes, and physicists are frequently not creative photographers. I would not be completely surprised if the training images were rather predictable poses in a physics lab. And do not see how there can be enough information from the sensor to produce an image otherwise.

twhitmore··on Google removes all Danish music from YouTube
Sounds like a very aggressive negotiating tactic on Google's part.

They're scared that if the Nordic agreement succeeds, they'd gradually be bid up on content pricing everywhere.

Koda and the Nordic group are not necessarily in a weak position. But might be in an even stronger position if they had an alternative video/ streaming service to recommend, which paid them higher content partner rates.

It will only take one content provider to hold out for long enough, yet still be an attractive market at higher content rates, to break Google's embargo. Good luck.

twhitmore··on Naming Things
Naming is the most important part of design. Concise yet meaningful names are hugely important.

One of my favorite tips is to shortcut 'rename in file' in Eclipse as Ctrl-~.

For parameters or variables, however, I prefer either math names or meaningful names -- customer, name, customerName, id, value, val, x, str, text, obj.

I never ever use 'foo'. Is foo a name, an ID, a value, an object? "Foo" is no shorter, but is definitely less informative.

When "foo" is used, I sometimes get the impression that the fact that it's meaningless is almost a conceit. This seems to me like an anti-pattern in naming & communication.

http://literatejava.com/engineering/foo-considered-harmful/

twhitmore··on Beginner's Guide to Abstraction
A key insight can be to abstract behaviors, rather than state.

It is typically much more possible to cleanly abstract the behavior for a single interaction/ role, than for the entirety of an entity's state. If you have multiple interactions you might want to use more than one interface.

Once you have clean behavioral APIs for your interactions, you may also be able to use composition, wrapping and delegation to implement/ enhance behavior. This is the 'Strategy pattern'.

The one thing you lose here is object identity -- you can no longer assume a delegate is the entity itself. This is no big loss given the clarity & flexibility that are gained.

twhitmore··on Where Am I? NYTimes or Google?
The whole AMP thing seems anti-competitive and hostile to the open web.

It's a really bad look on Google's part to be pushing this.

twhitmore··on Peppering (Password Storage)
Exfiltration of password databases, for offline hash cracking, is a well known attack.

Guarding against this by using a pepper is actually quite a good mitigation. It protects in situations where the attacker has obtained the password DB, but has not achieved access to the application secret (the pepper). Breaches of DB are quite a common attack.

I prefer the approach where they use the pepper to symmetrically encrypt & decrypt the hash, which potentially allows the pepper to be rotated.

Operationally in case of pwd DB being exfiltrated, it's pretty necessary to do something regardless of a strong hash algorithm being used. Pepper, if you can strongly establish it hasn't been breached, can give you a potential option short of resetting everyone's passwords.

twhitmore··on WhatsApp Phone Numbers Pop Up in Google Search Results
It's definitely a mistake of WhatsApp to expose the number in clear text in the URL.

Private user data, personal identifiers or contact details should never be used as the primary key publicly. A meaningless surrogate key should be used.

If people then want to go thru and scan the QR code or whatever to contact them and gain access to the phone number, that's fine, but it absolutely shouldn't be exposed where Google is indexing it unless there was a specific intent and agreement -- on the part of both those users & WhatsApp -- that they wanted their phone number published & indexed on Google.

Because explicit permission comes first. Both morally, and for GDPR

twhitmore··on Refactor vs. Rewrite
Nonsense. Competent designers with 8 or 10 years experience should absolutely be capable of architecting a solid system that is cleanly extensible for forseeable business requirements.

Probably one huge confounding factor, however, is the continual drive by juniors (or supposed seniors who think like juniors) to use the latest & shiniest technologies. These of course these are unknown to the team, of questionable long-term suitability and introduced without knowledge of the "right" way to use them.

In the article the OP describes using Elixir without A) needing it or B) being able to handle its downsides. Plus many random versions of Angular and React. Plus the overheads of an excessive focus on SOA.

My emphasis in architecture is on using simple & strong tools, and delivering great architecture in the problem space. Configurability, extensibility and DSLs are my forte. I don't need a new language -- I know how to use the ones I've got.

twhitmore··on My adventures in random data compression
Exactly. Each compressed input can only decompress to one output.

But the number of input values possible is far smaller than the possible output space. Therefore many outputs cannot be reproduced.

Real compression algorithms compressing structured data preserve the above properties. All outputs are representable, but they devote shorter codes (and thus most of the coding symbol space) to the most common patterns. Since coding symbol space is finite, random or less compressible data are left with longer symbols/ bitstrings than if conveyed uncompressed. For a reasonably structured file, the overall outcome is compression. However random files experience a small increase in size due to coding overhead.

twhitmore··on Three bugs in the Go MySQL driver
Regarding an exception approach -- at a business level, the user cares that the log hasn't been written. Only one exception is needed to report that (so long as the exception includes the cause).

The causative IO exception should indicate which operation failed (open or write), and -- for those with access to source -- should indicate the line number.

Encapsulation principles suggest that both the user & calling code should care only that the log was written successfully (or not), but not how or why it succeeded or failed. Any recovery in code (if possible, usually it's not) should be encapsulated within the method.

In most error cases there is no realistic or sound recovery (occasionally a generic retry might be valid). The main purpose of error handling is to stop successfully and report the problem in a diagnosable manner.

Some context on the purpose of error handling/exceptions in this article: http://literatejava.com/exceptions/checked-exceptions-javas-...

twhitmore··on Three bugs in the Go MySQL driver
Agreed. This is fairly egregious misconfiguration.

But it's also unsafe from the Go client/ connection pool to expect idle sockets to stay open indefinitely -- any firewall or network appliance traversal would be highly likely to invalidate that.

Basic database connection pooling. Sigh.

twhitmore··on Three bugs in the Go MySQL driver
If the server is closing idle connections, the client connection pool should track idle times & close them earlier.

Checking for readability still has a race condition.

Really this seems like a poor example of configuration.

twhitmore··on Ask HN: I've been promoted to Architect. What do I need to learn/do to excel?
In many environments instead of #1 "Say No", you may be better to say "I'd like to understand".

Then listen & ask questions, until you've fully heard their problem and can propose a preferable alternative and what design values it better aligns with.

(If you can't answer immediately, tell them you're really interested and will look into it & get back to them in eg. two days.)

In larger environments architecture can be like steering a vast river using a small wooden paddle.

twhitmore··on Ask HN: I've been promoted to Architect. What do I need to learn/do to excel?
I would strongly recommend the Strategy pattern, over modeling fixed concrete configuration structure.

At least the first time or couple of times you encounter a complex configuration requirement, in a new domain.

Spring XML or similar can offer pretty much a gold standard for being able to instantiate & parameterize strategies or simple executable ASTs.

twhitmore··on Ask HN: I've been promoted to Architect. What do I need to learn/do to excel?
Write an overview in narrative, and the rest in headings and bullet points.

Keep the substance to 1-2 A4 pages. Nobody sane wants to parse more than a tiny bit of narration.

Try to use Wiki, Google Docs, or shared docs in Office 365 if at all possible. Email chains are a collaboration fail, and Word docs are where information goes to die.

twhitmore··on A look at modern PHP
Request processing in Java (or any other sane language) is Request-scoped.

The Request is a variable, the Response is a variable, they're only in local scope?

And any data the developer uses will also be local -- and thus stateless -- unless they go out of their way to share something. (Caches are a common example, but harder in PHP since nothing by default is shareable.)

You don't need to deal with threads if you're seeking PHP-equivalent functionality.

And if you did need to deal with threads, I find your claims about overheads & difficulty hard to read without a little skepticism. An idle thread is faster to start than spawning a process, an uncontended synchronization takes only 20-250 CPU cycles (ie. a modest number of nanoseconds), and a thread pool can be sensibly managed in 2-3 lines of code.

← PreviousPage 3 of 4Next →