- Infect-being
- In fact being
- Etc.
Thanks for the help.
704 karma · joined April 3, 2012
Business: https://www.joyapp.com
- Infect-being
- In fact being
- Etc.
Thanks for the help.
Nix is a similar idea and makes the environmental identical for all developers. Makes on-boarding trivial. And speeds are "native" on all platform.
As a nice side effect: it normalizes all tools like sed, grep and find.
With that said, as a consumer of a Nix setup, it's about as easy if not an easier experience than using Docker[1].
But properly learning to create your own Nix packages, etc, involves a very, very steep learning curve. Far higher than learning the basics of a Dockerfile.
[1] Catalina issues notwithstanding, though there is a 4 command solution now: https://github.com/NixOS/nix/issues/2925
In 10 years of using FD, only during coronavirus have items been missing from my order. And not many.
Compare to InstaCart, which has to go the opposite direction: https://tech.instacart.com/predicting-real-time-availability...
Sounds like a nightmare to me. And stores may not want to "plugin" their own systems because at that point, they're just commoditized with already razor thin margins.
The one downside to FreshDirect? It's very expensive. I'm lucky enough to be relatively price insensitive, but recently became a big fan of Trader Joe's. Obviously they're known for being economical, but I'm astounded how much cheaper it is. Even Whole Foods and the like.
Cooking 16 oz of cruciferous veggies and an ~8oz piece of meat is my standard lunch. At FD it's 10+ dollars (depending on the level of prep you want on the veggies). At TJ and grocery stores, even in NY, you can hit sub $5, easy.
Of course, the delivery itself is a huge convenience. But is it a 100% premium? I wonder.
But I'm not sure that's a healthy pattern. Better would be to go for a walk or the like.
HN + Ice Cream is 200% more interesting than HN without Ice Cream.
When you are craving something, ask yourself: "Would I eat boiled tilapia because I'm so hungry?"
If the answer is no, you're not hungry. Just bored, or thinking of food. Reductionist, but it works for me.
Writing it down before giving in to your craving also helps immensely. Shameless plug, I do run a nutrition tracking company at https://www.joyapp.com. But even a handwritten log will help.
I strongly recommend: http://boringtechnology.club
Note that I do use React and a SPA for a big part of my SaaS (links in profile) but for the vast majority of CRUD screens, nothing comes even close to the productivity of Rails/Django.
Back in the day, the middleware scanned your response and injected it next to each </form> tag. A hack and dirty for sure, but removed that burden.
That is, the protection will be on. But the way to be allowed in by the gate is not on by default. You have to remember to add the tag.
Which is why I'm so excited to just switch to SameSite once there's enough browser usage...
So if AirBNB went out of their way to mention COBRA, it likely means they're covering it.
Many of these technologies (GraphQL) seem like layers on top of layers. Really, I just want a page with 3 fields specific to that page. They may come from 3 different tables.
GraphQL's original solution to this was to batch the request to 3 different resources, but the underlying problem was still there. Of course, you can make ad-hoc GraphQL equivalents to a random REST ad-hoc /api/get-info-for-my-profile-page/.
The problem becomes especially noticeable when you want to update nested resources. Say, a profile's subscription status. Instead, in "MVC" world, I would just bump up the subscription status to be a first class field on that view. So no profile->subscription->status. Just "subscription_status". Hope that makes sense.
So far, I've reverted to using Django Forms (across tables) and breaking them down to JSON to use them in a SPA. My endpoints are still very much domain specific, but I can use XHR/fetch to make the page interactive.
That is, it's not just "/api/people/" that shows everything. You'd need: "/api/people/matched/" with a few fields, and /api/people/before-match/" etc. One end point per use case. Almost like one endpoint per... screen.
Suddenly, the old school MVC starts to make more sense. Your view dictates what data you need only for that view. Across resources. And it factors in entitlements. Often, people think this means no AJAX or SPA. That's not quite right, they are orthogonal.
What you really want is a data-on-the-wire protocol but with RPC calls that are still domain based rather than resource based. Everything should be its own endpoint. Django Forms and Formsets, and the Rails and Laravel equivalents are much closer to this than REST (even if they can be RESTful themselves). Think "UpdateProfile" instead of "UserResource". The UpdateProfile may have a lot more fields, some which don't even belong on the User database table.
Lot of rambling here, but I've been meaning to consolidate this in a blog post.
Some related thoughts here: https://news.ycombinator.com/item?id=21875331
Shameless plugs in my post history. But to be clear, even a sheet of paper can be tremendously helpful.
So in place of that I would:
1. Define a variable called Params = Any;
2. Liberally use Param["foo"] and Param["bar"] anywhere.
3. Once you stabilize, reimplement Params as a TypedDict. You'll get failures if accessing any invalid key.
You can also use a NamedTuple if you prefer.
If you insist passing a param name, then you'll have to create a big list of Literals for param with every key in your dict. So Param = Literal["foo", "bar"] etc.
Otherwise agree with your post. All depends on the business needs.
High level benefits vs MFP and the other household names:
- Once you learn the ropes, it's an order of magnitude faster to add entries. It was designed to be opened for as little as possible each day.
- Very flexible with regards to dieting. Works just as well for people who want to gain or maintain weight. Low carb and intermittent fasting is also very easy to use with this app.
- Also, there are no community-entered foods. This is a feature in most cases. All the food is either from a professionally curated database (Nutritionix) or custom foods you enter.
- Tracking works all the way down to the micronutrient level, like potassium, vitamins. etc. If you're into that.
- No ads whatsoever. And we don't sell your data. Privacy is very important to us. You're not the product, we sell a product to you.
Another commenter mentioned corrections: this is built into Joy. Even FDA/Nutritionix items can be wrong/outdated. It's rare, but it happens. Or you want to track them differently. This is a single click away.
For the record: I did look at using Open Food Facts as the backing database a couple of years ago. And gave it a recent look again. But compared to the FDA database (for generic foods) and Nutritionix, it was way behind. I do want to explore ways to help the project.
Anecdata, everyone's favorite - I've seen someone gain no weight eating near 100% protein, while way over their TDEE. Kid you not, 4000 kcal of lean protein and mustard.
Also morbidly, you've got alcoholics (spirits), also traditionally under weight while consuming far in excess of their TDEE in ethanol (7 kcal per gram).
So some of it can be tested in the field!
https://bodyrecomposition.com/fat-loss/how-we-get-fat.html/
Never mind the clickbait-ey domain. Lyle McDonald is a nutrition authority and well respected. Though on forums he’s self-admittedly volatile.
I like to think of a silly extreme. If I drink a gallon of gasoline, I've technically consumed what, a billion calories? But I won't gain a single gram.[1] Why? There's no metabolic pathway to convert gasoline to ATP.
If you take that silly example and moderate it, you can see how different factors, including genetics, gut flora, adaptation, etc could affect what is even processed and thus part of the "in" variable.
More concrete, well known examples:
- If you consume 5000 calories of just protein, the metabolic pathway to convert to lipids is extremely inefficient. You will mostly excrete the excess. - Similar with pure ethanol. If you drank just alcohol (and nothing else), there is no metabolic pathway to convert this to fat. - Even carbs. If you just ate 5000 calories of pure carbs, de novo lipogenesis (metabolic pathway for carbs -> fat) is rather inefficient. You will gain weight but less than the 5000 - expenditure. A lot of it is burnt off as heat. - Sadly, for ketoers: the dietary fat to lipid pathway is extremely efficient. Almost 90% of excess will be stored as fat.[2]
See a pattern here? The reality of the typical diet is that we don't just eat one macronutrient. We mix them. And specific ratios are what make food hyper palatable and thus so easy to overeat. Once you start mixing things up, it basically - and I mean basically - comes down to calories in vs calories out.
[1] In fact, I would likely die. [2] As another commenter mentioned, there was one guy who just ate fat and well in excess of his BMR and apparently lost weight. I'm skeptical, but could believe it simply because it follows the trend: consuming just one can "bend" the rules.
Yes there are subtleties around actual macronutrient composition and gut flora, but the effect appears to be minimal. Find a keto person eating 5000 calories of bacon per day and I guarantee they’re not losing weight.
For what it’s worth: I’m a big fan of keto for cuts.
I like docker, but it's too resource heavy on a Mac. I need it running directly and not in a VM.
So a simple nix file, and nix-shell shebangs[1] has been life changing. Throw in --pure and now you really know the environment works everywhere.
My repos all have a shell.nix with every dependency. Just call nix-shell and it works in Linux and OSX. Anywhere.
You can even bundle it into a docker image and use nix in there too. For production, etc.
Documentation and tutorials are lacking, but if you put in some time, I've found nothing comparable.
Version it in, pin the Nix channel[2], and you can come back a year later in a brand new machine and start where you left off.
[1] https://gist.github.com/travisbhartwell/f972aab227306edfcfea
[2] Highly counterintuitive: if you don't pin a Nix channel, it's a moving target and dependencies may go missing, be updated, etc.