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

Luciano in these lines sounds like he just generated lots of keys and then started to wonder why he got more collisions than expected.

Thanks for sharing.


Don’t worry, all of this is necessary because the passwords are stored in plain text in the database.


Having a standing desk is worth it. I used to have back pain and with the standing desk it is all gone.

But even when you just sit at the desk, a few centimeters of table height can make all the difference for back pain.

I have an electric one from Ikea for around 500 EUR, but there are also even cheaper similar desks for ~ half the price.


Yeah, when I 10 or 12 years old, I found a book with simple games in Basic. I had fun copying from it and learned a bit of programming.

My daughter is currently more interested in playing existing games instead of creating her own. I would probably look into how to create something in Roblox if this would fit for the game.


I remember in grade... 3? a kid at school was showing me books from the library about how to make a game in Basic. Then one day he finally had it going. It was amazing to see. I can't remember what it was, but it would have been the simplest thing. But it was still amazing.


Modding her favorite game could proof a entry drug to the industry.


Cool project and if it works for you and you're happy, that's all what counts.

When I read the article, I was thinking that Go templates were used wrong. I was thinking there must be a way to define the template so you inject the content and don't need to define the start and the end of the html, but instead yield a block of other html as some kind of argument. I was trying to look it up, but couldn't find documentation on this. Maybe the author is right and I'm wrong.

And I was wondering why the author isn't using something like Templ [0], which is kind of JSX with Go as hosting language. Probably because it needs the preprocessor / compile step?

[0] https://github.com/a-h/templ


In some cases you can use the block system in Go templates, but it is extremely sad. I actually made a proposal for an extension to Go templates that would make the “component” workflow a little easier[1], and used it on my site before switching to LuaX, but at the end of the day I don’t like switching languages and I don’t like recompiling my site while I’m writing. Go templates are fundamentally not what I wanted.

[1] https://github.com/golang/go/issues/54748


I don't really understand what you're looking for and I don't write web apps in Go, so sorry if this is a wrong answer.

The templ language linked here is compiling something that looks similar to React's JSX into Go code. And then you can do HTMX: https://templ.guide/server-side-rendering/htmx/


I would rather argue to add temp variables and name parts of the expression, so you can actually understand and communicate what this does.


Instagram engineers found some remarkable simple solutions to some hard problems. It's not easy to come up with these solutions. Designing the IDs for example is no small feat, but since this is now common knowledge it's probably not too hard to build a similar system.

To get traction from users is the real challenge.


Which makes things like Vercel so depressing to me.

You've got a company paying off influential people in a space where people are looking for guidance, convincing them that they too have hard problems that cannot settle for simple solutions.

Selling the narrative that developers need to be all in on the most irrelevant aspects of building a product, and ignoring the fact that if you instead focus on building simple, easy to maintain software, the fact your LCP isn't hyper optimized by some newly invented mental model for app development won't matter: Google (or any search engine for that matter) will not ignore the fact people just actually want your content.

They do not care how great your web core vitals are if you waste a bunch of time bending over for some irrelevant bullshit problem instead of talking to users and iterating.


The fun part is often all that bullshit hyper optimized complexity can still be beaten on all the web core vitals by a humble LAMP server

So not only are you wasting your time on all the wrong things, you're also gaining nearly no benefit from it

I'm pretty convinced that all these shiny new hotness tools and frameworks of the past decade are actually just meant to sabotage competition and small companies


I agree - for most of them. One exception would be React/Vue/other frontend frameworks that split updating the state and visualizing it. It sounds like a small thing, but it makes a world of difference in non-trivial projects, compared to native js / jquery. Then again, it's the idea itself that matters, overoptimizing the implementation is not beneficial. I.e., React classes are just as good (or better) as hooks as far as I'm concerned, it would be better if they would let it be at that stage.


Vercel and co managed to mangle the one benefit you mentioned.

They introduced the concept of a "server component": one that is rendered once and cannot update state.

And instead of making that opt-in, they made it the default.

That is to say, the default of React is to no longer allow updating state in components.

No value proposition is safe from the forces of financially incentivized thought leaders.


The Meta team introduced Server Components: https://legacy.reactjs.org/blog/2020/12/21/data-fetching-wit...


The RFC was driven by Vercel. Vercel announced RSC landing in experimental on stage before the React team even updated their docs

I'm not even going to get into how ridiculous it is that the default config chosen was to break people's builds for a feature that isn't mature enough to have anything more than a single reference implementation from Vercel.


Yeah, we took some of their ideas about ID design and have applied it in a way that we could improve our storage.


> To get traction from users is the real challenge

Unfortunately yes. Scaling is a problem I would love to have :D.


Instagram engineers themself wrote a bit about their backend infrastructure. One of the more important topics was how they shard the data [0] and this is also linked to in this blog post.

[0]: https://instagram-engineering.com/sharding-ids-at-instagram-...


If it wasn't just an image site the potential for hotspotting would be insane!

Size isn't a bad thing anymore since price has dropped exponentially since the inception of Instagram.

I am positive they would use another modern technology today if it was present in the past.

Fantastic read though.


The potential for hotspotting decreases with the number of inserts per second. Like if you only did 1 insert per second and timed it right you could put all of those inserts on one server, but this would likely not overload the server.

It's virtually impossible for anyone to hotspot in a meaningful way with this system.


Nah this will totally be an issue. You can be on the extreme end of replication or the extreme end of sharding and experience performance problems. Sharding is more likely to hotspot depending on where hot data is consistent.

The solution in most cases is a simple database that acts as a pointer database user db -> user's db. That is generated on the creation of a user.

From here you create some simple cold storage models ( if user isn't active ) and some warm models which will scale out the db if the user's db grows it shards and replicates for more read access. But the last thing you want is to slow replication or have one DB that can't move to balance resource utilization. There are some new DB tech that does this without even sweating the deets.


So your view is that the military power of the US brings peace to the rest of the world?


That is too absolute a statement. But generally, yes, I believe that a militarily strong US that has an interest in global trade makes war much less likely.

Of course, one of the inherent problems of having a strong military is the temptation to use it - and the US has certainly done so multiple times in ill-advised fashion in Irak, Kuwait or Vietnam to name just a few.

But having a military superpower like the US that's more interested in economic and cultural expansion than in direct land grabs is certainly an important counterweight to Russian or Chinese ambition. I believe a world with a militarily weak US would have seen much less "Pax Americana" and much more aggressive, expansionary wars since 1945.


Absolutely, yes.

A tiny fraction of western weapons allowed Ukraine to hold against Russian war machine and even have prospects of counter offensive. I can’t imagine the hell on earth if it kicked in full force and went to war against anyone.


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

Search: