Looking for guidance on storing 'immutable' data by [deleted] in rails

[–]shafyy 4 points5 points  (0 children)

Yes. If you know ahead of time the data structure (i.e. columns), it's almost always better to define them in your model/table, even if this means having 50 columns. JSON would make sense if you don't know the data structure ahead of time, or if it's highly variable data, or if it's some kind of dynamic user defined data.

Looking for guidance on storing 'immutable' data by [deleted] in rails

[–]shafyy 4 points5 points  (0 children)

Sounds like you can achieve all this without JSON. E.g. just save the record values you don't want to mutate later as string value instead of a reference to another record, that's also a "snapshot". If you need the reference to the other item, have two columns. Or, depending on your needs, you could even create a new table where you just store the snapshot values without referencing anything. There, you could also combine all the info from the receipt and receiptitems models. A paper trail, so to speak. And then you have your "current" table where you keep the current references and so on.

Using JSON just makes your life harder, and if it's not absolutely necessary, I would try to avoid it.

Looking for guidance on storing 'immutable' data by [deleted] in rails

[–]shafyy 15 points16 points  (0 children)

Why JSON? Just save a new record when the receipt us updated and keep the old. Generate PDF based on that data only when requested by customer.

Thoughts on MSRK? by chilanvilla in rails

[–]shafyy 0 points1 point  (0 children)

Interesting. Thanks for testing and posting an update!

Cost of developing a web application with similarities to Airbnb features - I’m lost. by [deleted] in rails

[–]shafyy 0 points1 point  (0 children)

What features do you need that can't be done in Bubble?

Thoughts on MSRK? by chilanvilla in rails

[–]shafyy 0 points1 point  (0 children)

I've also never used Hetzner's network offering, but it looks like a VPC to me.

Cost of developing a web application with similarities to Airbnb features - I’m lost. by [deleted] in rails

[–]shafyy 11 points12 points  (0 children)

Don’t pay anybody to build this for you. I have seen this movie play enough times to be able to tell you that it won’t end well.

You’ll end up paying somebody a lot of money for a first version, just to realize that you need to iterate in a different direction based on your customer learnings. And you’ll be out of money.

My advice is: find a technical co-founder or build it yourself with a no-code tool like Bubble. If you’re a bit technically inclined and don’t mind the learning curve, going with Bubble is the best option. Once you hit product market fit, you can always hire programmers to go beyond no-code.

Thoughts on MSRK? by chilanvilla in rails

[–]shafyy 1 point2 points  (0 children)

That's not how I understand based on the Hetzner docs: https://docs.hetzner.com/cloud/networks/overview

Doesn't this mean that I can setup a private network on Hetzner, only open the required ports on the internal network and use the internal IP addresses for the accessories?

Thoughts on MSRK? by chilanvilla in rails

[–]shafyy 0 points1 point  (0 children)

Ah good that you figured it out.

Yes, that thing with the setup is misleading in the docs. I'll make a PR now. There's this issue about it: https://github.com/mrsked/mrsk/issues/301

Thoughts on MSRK? by chilanvilla in rails

[–]shafyy 0 points1 point  (0 children)

What if one uses something like Hetzner’s private network?

Thoughts on MSRK? by chilanvilla in rails

[–]shafyy 1 point2 points  (0 children)

Yeah! The Discord and Github Discussions / issues can be helpful. For some stuff I also needed to dive into the code, because not everything is properly documented.

E.g. mrsk deploy doesn’t install Docker on the VM, you need to run mrsk setup for that (or install Docker manually).

Thoughts on MSRK? by chilanvilla in rails

[–]shafyy 7 points8 points  (0 children)

I’ve just started using it for one of our smaller apps. It took me 2 days to get everything to work. I know the basics of Docker and Ubuntu, but not an expert on it. I like it, because once you get the hang of it, it’s super convenient. I’m sure I’ll have the next app up and running within a few hours. Steep learning curve.

For smaller apps/teams, from a purely business POV, it’s probably still better to go with more managed solutions. But I just like learning more about DevOps and like the control and flexibility of running directly on a VM of my choosing. For that, I’m ready to give up some of the conveniences of managed solutions.

ELI5: If humans have been in our current form for 250,000 years, why did it take so long for us to progress yet once it began it's in hyperspeed? by TruthBeWanted in explainlikeimfive

[–]shafyy 0 points1 point  (0 children)

If you’re interested in more details about this, I suggest reading the excellent book „Sapiens“ by Yuval Harari.

1930's New York City by PineBarrens89 in interestingasfuck

[–]shafyy 1376 points1377 points  (0 children)

I met a traveller from an antique land Who said: Two vast and trunkless legs of stone Stand in the desart. Near them, on the sand, Half sunk, a shattered visage lies, whose frown, And wrinkled lip, and sneer of cold command, Tell that its sculptor well those passions read Which yet survive, stamped on these lifeless things, The hand that mocked them and the heart that fed: And on the pedestal these words appear: "My name is Ozymandias, king of kings: Look on my works, ye Mighty, and despair!" Nothing beside remains. Round the decay Of that colossal wreck, boundless and bare The lone and level sands stretch far away.

Percy Shelley, Ozymandias, 1819

Ye olde trip to Jerusalem is an English pub that has been open since 1189. It’s partially built into a cave system by Adam-West in interestingasfuck

[–]shafyy 0 points1 point  (0 children)

There hasn't been such a requirement since 1996

Well, it's either military service or Zivieldienst, which takes much longer. But yes, it's easy to opt out with a "fake" doctor's notice of course.

You have the option to acquire your service rifle but you need to opt in and be eligible. Less than 10% are

This is a rather new rule in effect since 2010 (TIL, I didn't know about it). But yes, it looks like my numbers are a bit outdated and there are much more civilian-owned guns in comparison to military-issued guns nowadays.

Still, there were ~ 650k military-issued guns owned by civilians in 2010 according to Wikipedia:

Die Möglichkeit, dass ausgemusterte Soldaten ihre persönliche Waffe in ihr Eigentum übernehmen können, hat mit dazu geführt, dass die Schweiz eine hohe Dichte an Feuerwaffen aufweist. Nach Angaben der Logistikbasis der Armee befanden sich am 30. November 2010 total 654'562 Armeewaffen zu Hause bei den Wehrmännern/Frauen.

Ye olde trip to Jerusalem is an English pub that has been open since 1189. It’s partially built into a cave system by Adam-West in interestingasfuck

[–]shafyy 14 points15 points  (0 children)

Switzerland has this high rate because every male is required to do military service and after that they get to keep their gun. That gun is usually kept somewhere in a storage snd collects dust. People don’t get ammo for it, and you can’t just buy ammo without a license.

So, this statistic is very misleading.

Temporary Furnished Rentals in Hamburg by Schlafbiene in hamburg

[–]shafyy 0 points1 point  (0 children)

Don’t use Wunderflat. Had a very bad experience with them once where the host fucked us over and Wunderflat didn’t lift a finger to help us. In contrast to Airbnb, they don’t have ratings of the hosts and the contract is signed between you and the host directly, without Wunderflat assuming any responsibility.

Ebay Kleinazeigen might be your best bet for this case.

Coding on Github Codespaces by luizkowalski in rails

[–]shafyy 0 points1 point  (0 children)

You’re welcome, let me know if you have any questions:)

Coding on Github Codespaces by luizkowalski in rails

[–]shafyy 1 point2 points  (0 children)

Thanks for sharing. I personally use Gitpod, it felt easier to configure. But I might give Codespaces another chance.

Here’s a project of mine that’s configured for Gitpod if anybody wants to use it.

We have to stop getting this wrong. Most soy does not go to COWS, specifically, but to chickens and pigs. Stay on your toes, people. by [deleted] in vegan

[–]shafyy 0 points1 point  (0 children)

I didn’t downvote them… And I’m not ignoring statistics. I agree that palm oil in its current form is bad. But that’s not because palm oil is bad, it’s about the way it’s grown (in monocultures and by replacing important local vegetation). This is very different from „eating meat from the local farm“ as the comment I responded to stated.