Hacker Newsnew | past | comments | ask | show | jobs | submit | dkarl's commentslogin

> a high-pressure commerce zone clamoring for attention I don't want to give and trying to squeeze me

I find air travel mostly unpleasant, but if it's a given that I have to go through the ordeal of security and the flight, I find extra time sitting in the airport quite pleasant. Everybody regards you as in transit and unreachable. Nobody around you knows you or wants to talk to you, and it's easy to find a spot where the only sound intrusions are announcements and nearby conversations. It's so easy to sink into focus on work, or even a book.

Many times I have exaggerated my concern about making a flight so I could catch an extra hour of solitude in the airport.


> The issue is that it was a bit outdated in the choice of _which_ things to choose as the one Go way

I agree with this. I feel like Go was a very smart choice to create a new language to be easy and practical and have great tooling, and not to be experimental or super ambitious in any particular direction, only trusting established programming patterns. It's just weird that they missed some things that had been pretty well hashed out by 2009.

Map/filter/etc. are a perfect example. I remember around 2000 the average programmer thought map and filter were pointlessly weird and exotic. Why not use a for loop like a normal human? Ten years later the average programmer was like, for loops are hard to read and are perfect hiding places for bugs, I can't believe we used to use them even for simple things like map, filter, and foreach.

By 2010, even Java had decided that it needed to add its "stream API" and lambda functions, because no matter how awful they looked when bolted onto Java, it was still an improvement in clarity and simplicity.

Somehow Go missed this step forward the industry had taken and decided to double down on "for." Go's different flavors of for are a significant improvement over the C/C++/Java for loop, but I think it would have been more in line with the conservative, pragmatic philosophy of Go to adopt the proven solution that the industry was converging on.


Go Generics provides all of this. Prior to generics, you could have filter, map, reduce etc but you needed to implement them yourself once in a library/pkg and do it for each type.

After Go added generics in version 1.18, you can just import someone else's generic implementations of whatever of these functions you want and use them all throughout your code and never think about it. It's no longer a problem.


The language might permit it now, but it isn't designed for it. I think if the Go designers had intended for map, filter, et al to replace most for loops, they would have designed a more concise syntax for anonymous functions. Something more along the lines of:

    colors := items.Filter(_.age > 20).Map(_.color)
Instead of

    colors := items.Filter(func(x Item){ return x.age > 20 }).Map(func(x Item){ return x.color })
which as best as I can tell is how you'd express the same thing in Go if you had a container type with Map and Filter defined.

The same curse emacs suffers from. What is the best sweet spot an editor/IDE has achieved to date?

I remember the extremes of the utter unconstrained chaos of Emacs and the rigid ultra-high-boilerplate approach of the Eclipse IDE. Emacs was fun to hack on, but impractical to use as an IDE, because if you installed enough plugins to make it useful as an IDE, it was broken half the time (my experience, many years ago.) Eclipse had a robust architecture, but writing plugins for it was a dispiriting slog, even when I got paid for it (again, my experience, many years ago.)


> What is the best sweet spot an editor/IDE has achieved to date?

Unironically, maybe VS Code.

Everything simple you can do with it, either comes built-in, or within Github/Microsoft ecosystem, or has an official plugin that gets recommended and featured by the editor itself. Plugins from individual hobbyist developers I have, I can almost count in one hand. (VSCodeVim being the most important one)

Now I compare this to my Neovim setup, and that one is basically running on charity from OSS developers.


What about writing a quick ad-hoc command? Something I would have found useful today, which I would have done in emacs fifteen years ago, was writing a command to parse a file in a log, generate a curl command from it, and copy the command to the clipboard. Could I do that in VSCode without creating an entire project?

I can't even start listing the issues with your hasty generalization here - I see outdated anecdotal evidence, survivorship bias, vague metrics, false correlation, goalposts moving. While your personal experience likely genuine, presenting it as evidence that Emacs is inherently impractical as an IDE only adds to the fallacy of generalizing from a single data point to universal truth.

I have completely opposite experience with [modern] Emacs. Of course, it wasn't smooth from the day one, but neither was my ride with different IDEs. Somehow, I keep coming back to Emacs because no IDE ever provided all the machinery I need to be productive. For me (and I suppose for many other people), Emacs is far more sweeter spot of an IDE than any other alternative.


Emacs has eglot built in these days and it works quite well as an IDE

An emacs "distribution" like e.g. doom-emacs has worked to be quite stable for me.

I remember being confused by this word when I was a kid! I was a kid in the eighties and remember reading/hearing things like "what a jerk" and thinking people were way too harsh with it. Maybe I landed too late to learn the old meaning but early enough to hear it sometimes? Or maybe I did learn it early on and then forgot with everybody else.

It's a very specific form of authenticity. It's the authenticity of people who don't make an effort, who don't feel any need to try, who know that people are going to accept them and look up to them no matter how shitty they are.

But for regular people it's a fantasy. Because it only works if you're rich.


What a weird viewpoint.

> But for regular people it's a fantasy

So for authentic people it's a fantasy???

I can only imagine that either

(a) you struggle to differentiate fake authenticity from authentic fakeness

or (b) perhaps you don't have enough authentic non-wealthy acquaintances.

Some welloff people countersignal successfully. But many don't because status signaling is difficult (evolutionarily).

> it only works if you're rich

And you imply that you think that people look up to the rich - however many people don't - perhaps that says something about your own pretensions?

Disclaimer: I'm a well off geek - definitely not rich and I'm rather poor at recognizing or playing status games.


> fake authenticity from authentic fakeness

I'm curious what you mean by these, I have an idea but I don't want to misconstrue you.


I think you're confusing authenticity with DGAF, because they both look like the opposite of insecurity.

Trump and Hilton play a DGAF role on TV, but the very fact that they're putting in the effort means that it isn't authentically them. If they really didn't care, we wouldn't know their names, because being wealthy doesn't automatically make you a celebrity. Consider Michael Bloomberg, who briefly flirted with a presidential run, but then discovered that coming from legit middle class roots and achieving orders of magnitude more wealth than Donald Trump meant very little next to the decades of work Trump had put in to build his celebrity status.

As celebrities, they have embraced caring about what people as their job, and for them, part of that job is playing out the ordinary person's fantasy of not having to care what people think -- a role that is only authentically them in the sense that they learned it authentically as spoiled rich children.

A lot of people experience anxiety in their everyday lives over how other people will perceive them. "Did I do a good enough job? What are people saying about me? What do people actually think about me?" When Trump and Hilton ostentatiously act out being able to be dumb and inept and still being treated like they're amazing, it's the perfect inverse of what causes ordinary people anxiety, which makes it a perfect fantasy.


>It's the authenticity of people who don't make an effort, who don't feel any need to try, who know that people are going to accept them and look up to them no matter how shitty they are.

Or they know other people won't accept them regardless and they don't care.

It's one of those communication patterns you see at the top and the bottom and if your life consists of working in an office, living in a condo and golfing on the weekends you'll basically never run across anyone that does it.


Pretending not to care what other people think is the least authentic thing imaginable. Everyone knows that the people obsess about not giving a fuck are the people who are deeply unhappy with how they're perceived and are fantasizing about a fix.

For secure people, caring what other people think doesn't have to mean being neurotic and miserable about it. It doesn't mean being so cringe that you lose people's respect.

Imagine caring what other people think and not being miserable because of it.

Imagine caring what other people think, and they respect you more for it instead of less.

Top performers care deeply about the opinions of people who matter. CEOs in particular obsess about it. If a CEO acted like your opinion didn't matter, they were probably right, and they were probably too busy thinking about the board and the COO who was angling for an eventual interim job to give you the time of day.

Plenty of documentaries about sporting legends who collected slights and obsessed over proving themselves every day. They cared, and it fueled them.

Trump and Paris Hilton are playing a part for a mass audience who don't know how elites act because they don't know any. Nobody is suggesting that Trump and Paris Hilton don't actually personally care. If they really didn't care, they wouldn't put in the effort. In the years when Paris Hilton was shooting reality shows, she was working a hell of a lot harder than a society heiress needs to. Trump had to keep a president's schedule (a version of it, at least) for four years and came back for more because he wanted to prove he could win again. Being on TV and running for public office are the ultimate forms of caring what other people think. I think the part they play is a part they learned by living it, and is authentic in that sense, but if it was really who they were, instead of being something they act out because they know the masses are impressed by it, we wouldn't know their names.


That isn't true in my experience. Authenticity doesn't require wealth in order to land.

Code gets written once and read dozens or hundreds of times. Code that can be read sequentially is faster and easier to read than code that requires jumping around.

And @kmoser did not say code should not be read sequentially.

non sequitur

"Accommodate" means change focus, like your natural lens does when you focus on objects at different distances. Most artificial lenses implanted today have zero ability to change focus. There are newer "accommodative" lenses that have a limited ability to change focus, but from what my ophthalmologist told me, they're still primitive and not even close to what natural lenses do, which is why fixed focus lenses are still more common.

> As both Presbyopia and Cataracts come for us all, it is generally not advisable to do laser eye surgery once the former has set in.

I had a conversation with my ophthalmologist about this. She said the same thing. Then I said, I don't understand, right now I have to wear glasses for far vision and glasses for near and mid vision. If I got the surgery, I would still be presbyopic, but I wouldn't need glasses for far vision, only for near vision? and she said yes. So I said, that sounds like in improvement. What's the catch? She said it's mostly a matter of expectation. People think that LASIK means they don't have to wear glasses again, period.

But I keep hearing this, so I'm wondering if there's something more to it that she didn't explain? Is there some other disadvantage?


> SMILE... is severely more expensive

This is the first I've heard of this. In my area it seems comparable in price, within 1.5x the cost of LASIK. Considering how relatively cheap it is (a couple months' rent, or a fraction of the price of a car, to correct your vision for decades) I've never seen cost mentioned as reason to choose one over the other.


I can only speak for Austria, but the difference, if SMILE had been an option, would have been at the lower end € 3400,- compared to the PRK I got and roughly € 3200,- compared with LASIK, for what that’s worth, more than double the cost. Yes, that falls under multiple months rent, but to me that is more reason why one would consider the cost as well.

Maybe “severely more expensive” wasn’t the best wait to phrase it, but the difference is still quite steep and this can be a decision maker for many people. Especially as currently it appears that medium term/6-month outcome between PRK and SMILE are very comparable, or even slightly better in PRK [0].

[0] https://pmc.ncbi.nlm.nih.gov/articles/PMC9009506/


> And what exactly do you buy yourself?

APIs can be evolved much more easily than shared database schemas. Having worked with many instances of each kind of system, I think this outweighs all of the other considerations, and I don't think I'll ever again design a system with multiple services accessing the same database schema.

It was maybe a good idea if you were a small company in the early 2000s, when databases were well-understood and services weren't. After that era, I haven't seen a single example of a system where it wasn't a mistake for multiple services to access the same database schema (not counting systems where the read and write path were architecturally distinct components of the same service.)


I've implement an interesting service 15 years ago. Recently I've heard of it.

So this service was basically an "universal integration service". Company wanted to share some data, and they wanted to implement it in an universal way. So basically I've implemented SOAP web service which received request with SQL text and responded with list of rows. This service was surprisingly popular and used a lot.

I was smart enough, so I built a limited SQL syntax parser and UI, so administrator could just set up tables and columns they wanted to share for this specific client. SQL query was limited in a sense that it worked only with one table, simple set of columns and some limited conditions (that I bothered to implement).

The reason I've heard about it few months ago is that they shared with me, that they caught a malicious guy, who worked at some company integrating with this system and he tried to do SQL attack. They noticed errors in the logs and caught him.

Their database is pretty much done and frozen, regarding to schema. They hardly evolve it. So this service turned out ot be pretty backwards-compatible. And simple changes, of course, could be supported with view, if necessary.


Service specific views, my guy.

And when the underlying tables have to change, what then?

Views are good, and help with this situation. But if the data is complicated, big, and even somewhat frequently changes shape (DDL), views only help a little.

That said, I think that API update coordination is often much harder than schema change coordination (due to API behavior having many more dimensions along which it can change than database query behavior), so I am generally open to multiple services sharing a database—so long as it’s within reason and understood to pose risks/be appropriately justified and used responsibly.


100%. Views don't even cover all the use cases of schema evolution, unless you're willing to duplicate business logic between stored procedures and services, but schema evolution is only the start of it. API versioning gives you a lot more flexibility to evolve how data is stored and accessed. Some parts of your data might get shifted into other data stores, some functionality might get outsourced to third party APIs, you might have to start supporting third-party integrations, etc. Try doing that from a view -- or rather, please don't!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: