HNHacker News
TopNewBestAskShowJobs

B-Con

3,384 karma · joined January 15, 2012

Geek who likes Go, Linux, cryptography, and tinkering.

More about me: http://bradconte.com/about

My reading list: * tptacek * sdevlin * NateLawson * sweis * cryptbe * moxie * pbsd * cperciva * daeken * tytso * andrewbinstock (editor of drdobbs) * FiloSottile * matttproud

submissionscomments
B-Con··on Good programmers worry about data structures and their relationships
The industry predominately rewards writing code, not designing software.

I think the results of bad code aren't as obvious. A bad bridge falls down, bad code has to be... refactored/replaced with more code? It goes from one text file that execs don't understand to a different text file that execs doesn't understand.

And once something works, it becomes canon. Nothing is more permanent than a temporary hack that happens to work perfectly. But 1000 temporary hacks do not a well-engineered system make.

I believe that maturing in software development is focusing on data and relationships over writing code. It's important to be able to turn it into code, but you should turn those into code, not turn code that works into a data model.

B-Con··on Go structs are copied on assignment (and other things about Go I'd missed)
Technically no, but I get why it feels like this. :-)

I think the confusion stems from the fact that Go hides the distinction of "dot" access vs "pointer dot" access. (eg, the difference between `foo.Bar` and `foo->Bar` in C++). Go knows if an object is a pointer and needs to be de-referenced, and hides the de-reference operation from you syntactically. So you can use a pointer without knowing it's a pointer.

This is the confusion: You never have a "map object that is passed by reference", you instead have a "pointer to a map object that is always passed by value".

This is less confusing for structs the programmer defines themselves, since they can check the type of "foo" see if "foo.Boo" is accessing Bar directly or de-referencing "foo" and then accessing "Bar".

But it's more confusing when applied to builtin type for which you never see the implementation. How would you know if `map[string]bool{}` returns a value or a pointer? You don't!

The map type is passed by value but its implementation is that it is a thin wrapper around a pointer to a struct. Ergo in practice it feels like passing by reference. But Go is technically always pass by value. Map does not get any special implementation in the language.

You can do this yourself. `type MyStruct struct{ data *MyType }`. Now if you pass MyStruct by value, any operations on it are effectively by reference since all operations have to dereference `data` to get at the actual content.

(Same goes for strings, except they are immutable so no one notices.)

This might feel like semantics, but it's important to remember that Go doesn't treat any of those built-ins with special "pass by reference" rules. Instead, it's behaving consistently like it would for any types you defined yourself and one of the learning curves of the language is to think in Go's terms of pointers vs non-pointers and learn which native types are pointers. If you think of it that way, learning Go's built-ins is no different than learning the API methods for a custom struct Go's built-ins just happen to be, well, built-in and thus get syntactic sugar that your custom structs do not.

"Pass by reference" is usually used to refer to the case where you use a value at level N of the call stack, but the code at level N+1 of the callstack decides to make it a pointer. In Go this never happens, instead you technically always had a pointer the whole time!

B-Con··on Do quests, not goals
This reminds me of the "systems vs goals" mentality, which emphasizes focusing on having a good systematic process for the journey rather than fixating on specific outcomes.

Some prior discussion: https://news.ycombinator.com/item?id=28688643

Scott Adams (before he went a bit cuckoo) was a huge proponent of it and he exposed me to the concept in my mid 20s. It heavily resonated with me and fundamentally changed my outlook on several areas of life.

This specific framing of Quests vs Goals seems a bit more like a change in framing your perspective, but I see some similar concepts, eg:

> You don’t just get the novel started, you become a writer. You don’t just declutter the house, you get your house in order.

B-Con··on The window for great-grandmothers is closing
There were a lot of incompetent parents, but they pushed ahead blindly.

Today can recognize when they'd bee a pie parent and choose not to do it anyway.

B-Con··on Is ORM still an anti-pattern?
> but I'd rather learn SQL than whatever custom-flavor-of-ORM-query-language some ORM tool created

This point is worth emphasizing!

When you application carries non-trivial business logic, it will create non-trivial DB access patterns.

The developer will either use SQL or some other language that, pragmatically speaking, translates to SQL. But either way, they will learn some DB expression.

I'd rather use a standard. Existing familiarity, easier to find docs, support, and is probably more bug-free, etc.

B-Con··on Games people play with cash flow
This is an incredibly realistic and pragmatic take on how large companies work.

> You're both getting what you want, but you are different businesses, so you are optimizing for different things. [...]

> The difference between 30k and 150k is nothing. Literally nothing. [...]

> Would you rather spend 30c now, with a bunch of hassle, or $1.50 in 3 months time with zero hassle.

Anyone who struggles to understand why corporations do what they do should internalize this thought process. It explains a lot.

B-Con··on Go Style
I think that it is fair to say Go considers error handling to be signal, not noise.

This position has obviously prompted a philosophical war and not everyone agrees, but the two statements are consistent under Go's philosophy.

B-Con··on Using the same Arch Linux installation for a decade
I reinstalled Arch once since 2009, and it was to resolve a long-standing bug that I could not fix for the life of me. FWIW, it worked. (This was probably 6-ish years ago, I don't remember what the bug was.)
B-Con··on Google IoT Core will be discontinued on Aug. 16, 2023
Not every product is in the experimental phase.

Google has a long history of experimenting with a product and then shutting down once they've learned enough. Maybe they learn it's not as lucrative, maybe they learn how to build the tech, maybe they learn they're too late, whatever. But it's experimental and the experiment doesn't prove to be the "next billion users" so it wanes and then dies.

Not every product is like that. Cloud isn't just some product on a spreadsheet next to IoT Core. The heavy players like Cloud, YouTube, Ads, etc, have massive investment, have dedicated CEOs, and are in it for the long haul.

Google's deprecation policy sucks, but it doesn't apply to every product uniformly.

B-Con··on Go will use pdqsort in next release
I did a quick Google search for pdqsort and found this HN post: https://news.ycombinator.com/item?id=14666710

> I think it's fair to say that pdqsort (pattern-defeating quicksort) is overall the best unstable sort and timsort is overall the best stable sort in 2017, at least if you're implementing one for a standard library.

_hrfd called it 5 years ago.

B-Con··on Go will use pdqsort in next release
You joke, but real world problems have been solved in analogous scenarios, such as homework assignments where the author simply didn't know the problem was yet unsolved and banged their head until they got it.
B-Con··on When to use generics
This guidance is specific and explicitly calls out some dos and don'ts. Your comment implies that there is one flavor of utilizing generics that applies across all languages and that is most certainly not true.

Other languages don't tend to be as prescriptive about best practice as Go is trying to be here. Just because it's syntactically valid doesn't mean you should type it often. (Most language standard libraries are several contrasting styles shoehorned together. Although, to be fair, even Go suffers from this a bit.)

This guidance isn't heralding in a new age of programming, it's explaining the right way to think about a new feature within the language.

B-Con··on Why is there a TikTok tracking pixel on UberEats what is this crap?
This was my first thought.

How is this not everyone's first thought?

B-Con··on Search engines and SEO spam
Because the rank algorithms are subjective heuristics, not absolute metrics. All rank algorithms always have been. It started with the link metrics, then people started gaming that. It's been a signal/noise war ever since.

It's also dangerous to ask for the exact criteria because they are ever changing. Google et al don't want to be prescriptive about what a good site is, they want to recognize what a good one is. You make a good one, they'll figure out how to recognize it.

They can't sit down and publish "The Definitive Guide to a Good Website". That's just not their role and it will be out of date before it's published.

B-Con··on Search engines and SEO spam
That would have allowed people to artificially chase rankings even faster and more efficiently. It makes the problem worse, not better.
B-Con··on Unicode Normalization Forms: When ö ≠ ö
I think that in the ls->read workflow, Nextcloud shouldn't normalize the response from SMB and should issue back to SMB whatever SMB returned to Nextcloud.
B-Con··on SpeedCrunch
I've been using this as my Linux GUI calculator for a while (maybe a decade?). It's a good blend of functionality and simplicity and after I started using it I literally haven't looked for anything else.
B-Con··on Interview success can depend on how you schedule interviews
Engineering skills are easier to teach, particularly if you have an established culture and some senior personal who can spare a couple cycles to onboard new hires.

If you don't, that's a sign the engineering culture needs some TLC. And now that I think of it, in that case good communication may still be a priority factor.

B-Con··on Ask HN: What mental models do you use everyday?
In today's world, almost all jobs are moving more and more toward specialization. Being great at something is how you work and make a difference. You can outsource many of your weaknesses, from the mundane (ex, spelling: spellcheckers) to the complex (ex, accounting: hire an accountant).

In contrast, my mental model is that it is only worth knowing a little or a lot. The middle ground is only useful when you are filling a gap.

* If you know a little, you know enough to reason about the topic and identify how you can outsource your needs. eg, you know enough about accounting to pick and manage an accountant. * If you know a lot, that's your value add and you can provide that service.

Where if if you know a "medium amount"... * you still need to outsource to an expert most of the time * or you can't find the right set of expertise to outsource to and you must fill the gap yourself.

B-Con··on Weekly Top 10 lists of the most-watched TV and films
> That would mean 37% of the global Netflix subscriber base watched this movie in the first few days after release. That is literally unbelievable.

That was basically the estimate for Squid Game that I recall. Estimated about 1/3 of Netflix subscribers viewed it in the first month.

B-Con··on Corded headphones are making an unexpected return
Do people dislike wireless or do they dislike Bluetooth?

Because Bluetooth sucks. It's a shame it's the industry standard.

Bluetooth support is still spotty on Linux, which to me is continued evidence that the stack is complicated and bug-ridden.

Even for my high-end BT devices, there are still lots of problems. In addition to the problems listed elsewhere in this thread, I particularly have problems with:

* Easy, reliable switching between connected devices. * Reliably connecting when a device is turned on. * Audio delays on the order of 200ms.

I stick with wireless almost exclusively, because I hate the wire, but I switch to wired for gaming because a 200ms audio lag for a real-time game is unplayable. 200ms is obvious even just watching someone speak in a video.

B-Con··on Romantic friendship: deep and lasting connection comes in many forms
I also find the love=sex equivalence very strange. IMO it stunts the development of close friendships who feel as if they can't form emotional bonds without also forming physical ones.

Then it also acts as a false forcing function to consider oneself bi-sexual because they love and enjoy a wide variety of people, despite not actually desiring to pursue a sexual relationship with all of them. It's bizarre how often I've heard "I'm kinda bi, but like only want to date gender Foo". Like, WTF is our notion of love anymore, and how badly are we messing up the next generation.

B-Con··on Google's infamous internal 2010 “I just want to serve 5TB” video now public
You can send a small, semi-official "thanks for a job well done" to someone else and it comes with a few bucks attached. People joke about using them nefariously (as people tend to joke), but I've only seen them used appropriately.
B-Con··on C++ Coroutines Do Not Spark Joy
I think this kind of philosophy is what ended up driving Go's simplicity.

Less infatuation with the tool, more focus on shipping maintainable code the first time.

B-Con··on An update of 455 new words
That is a difference in grammar, not vocabulary.
B-Con··on An update of 455 new words
I don't understand the point of adding this:

> because : by reason of : because of — often used in a humorous way to convey vagueness about the exact reasons for something. This preposition use of because is versatile; it can be used, for example, to avoid delving into the overly technical (“the process works because science”) or to dismiss explanation altogether (“they left because reasons”).

The whole point of a phrase like "because reasons" isn't the use of "because", it's the overly succinct description that follows. "because"'s usage hasn't changed, just acceptable sentence structure.

B-Con··on Facebook says it’s refocusing company on ‘serving young adults’
I'm wondering if Facebook will try to spin off another network, or maybe a different frontend on top of the Facebook/IG networks, to get rid of the Facebook branding problem altogether.

My (outside) impression is this is what PayPal did with Venmo. Venmo wasn't functionally superior, just "not your parent's money app".

We see the pattern in retail clothing. Parent companies recycle smaller brands through a multi-year trend cycle and raise up new brands when the last one gets too old.

B-Con··on Facebook says it’s refocusing company on ‘serving young adults’
Young users are we're the growth is, older users actually have money.

Facebook is a top 5 market cap USA business. They have to think about boring things like, you know, revenue, not just user base growth.

Considering that FB et al make their money from selling ads, I'm curious about the actual expected monetary value per customer in the younger vs older demographics. Is there any public research on this topic?

B-Con··on Fed to ban policymakers from owning individual stocks
Disclosure responsibilities for Federal judges extend to spouses and any family living in the home IIRC, I would imagine this restriction would have similar coverage.
B-Con··on Valorant's anti-cheat system requires TPM 2.0 and secure boot on Windows 11
Could you explain the expression at the end?
← PreviousPage 4 of 22Next →