HNHacker News
TopNewBestAskShowJobs

silviogutierrez

704 karma · joined April 3, 2012

Personal blog: https://www.silviogutierrez.com

Business: https://www.joyapp.com

submissionscomments
silviogutierrez··on Boeing cutting more than 12,000 U.S. jobs with thousands more planned
Am I crazy? I still don't see any word play. Is there a homonym, or specific phonetic reading I'm missing? Tried:

- Infect-being

- In fact being

- Etc.

Thanks for the help.

silviogutierrez··on Boeing cutting more than 12,000 U.S. jobs with thousands more planned
Off topic but it's killing me: what is the pun there? I just don't see it.
silviogutierrez··on Programming Inside a Container
Definitely comes down to file access, above all.
silviogutierrez··on Programming Inside a Container
It's a great idea. But on non-native Docker, like OSX, it's simply too slow. Even when it's acceptable speeds, I find my computer running at 100% CPU usage with the fan out of control.

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

silviogutierrez··on America is stuck at home, but food-delivery companies still struggle to profit
Longtime FreshDirect user. Nothing beats having an inventory management system. And the quality of the produce is fantastic.

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.

silviogutierrez··on Got a sweet tooth? Your gut bacteria are asking for some sugar
Oh 100%. If I run into a seemingly unsolvable technical challenge, I go eat and it takes my mind off of it.

But I'm not sure that's a healthy pattern. Better would be to go for a walk or the like.

silviogutierrez··on Got a sweet tooth? Your gut bacteria are asking for some sugar
Maybe. Or maybe you're just bored and looking for a distraction. I'm certainly guilty of that.

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.

silviogutierrez··on Async-GraphQL: A GraphQL server framework
I use Django, the equivalent of Rails for Python.

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.

silviogutierrez··on Close Look at CSRF Tokens
That's what I mean. If you forget to include the token on your app, it will fail. You have to remember to call {% csrf_token %} in every template.

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.

silviogutierrez··on Close Look at CSRF Tokens
Big Django user. Isn't it still required that you add the {% csrf_token %} tag to your forms?

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...

silviogutierrez··on Citing revenue declines, Airbnb cuts 25% of workforce
It's confusing. Some read it as "COBRA is available at full price" and others as "healthcare paid by AirBNB". My understanding is COBRA is just the default. The company can't really block it, for 18 months. No action required.

So if AirBNB went out of their way to mention COBRA, it likely means they're covering it.

silviogutierrez··on So I reverse engineered two dating apps
I'll have to give this a read.

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.

silviogutierrez··on So I reverse engineered two dating apps
I guess I just use RPC as a catch all for "server call that could involve resources, actions, effects, etc." So even a REST PUT is an RPC in this world of mine.
silviogutierrez··on So I reverse engineered two dating apps
This is a major problem with REST / API / SPA-based applications. When you build around the concept of resources, you either get lazy or forget to build individual endpoints for each object.

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

silviogutierrez··on I’ve Consed Every Pair
Write down what you eat. Even if you change nothing, you'll re-consider grazing/snacking. Write it down before you eat it for extra effectiveness.

Shameless plugs in my post history. But to be clear, even a sheet of paper can be tremendously helpful.

silviogutierrez··on Best Practices for Working with Configuration in Python Applications
Alas, MyPy doesn't have the concept of "keyof" and mapped types like TypeScript.

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.

silviogutierrez··on How to Run Wordpress on AWS
Side note, as in your place, I'd like to know: "bear" in mind. "Bear with me". Think of the animal. Rawr.

Otherwise agree with your post. All depends on the business needs.

silviogutierrez··on Open Food Facts
Great to see a lot of ideas and competition in this space. Another shameless plug for my team's app: https://www.joyapp.com.

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.

silviogutierrez··on Cultivate the Skill of Undivided Attention, or “Deep Work” (2019)
Great post. Recently noticed DND is not enough. As you mentioned, you actually have to quit the app in OSX so it's not in your app list when tab switching (with a red notification).
silviogutierrez··on The 2020 MacBook Air
As I understand it, the new 16 inch macbook has the biggest size battery you could have while still allowed on an airplane as a carry on. Security theatre, but... that's life.
silviogutierrez··on Mac mini
Curious, why does ECC matter for remote builds? Any explanation is appreciated!
silviogutierrez··on Are patients with hypertension and diabetes at increased risk for COVID-19?
Could argue diseased as a noun works (to refer to them, as “the diseased”)
silviogutierrez··on Ask HN: What's the best corporate password manager?
Relevant (not my own): https://sso.tax
silviogutierrez··on Reducing Asset Size with Subsetting
Incredible! Thought of doing this at the app level, but hadn't thought of italics etc. The concept of doing it with puppeteer is pretty neat.
silviogutierrez··on New report on the cellular effects of a calorie-restricted diet in rats
Fair enough, I think nutritional science is in its nascent stages, so the whole thing is pretty vague and on shaky ground. However, some cursory empirical evidence does back most of his claims around fat gain. At least to my armchair-nutritionist satisfaction.

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!

silviogutierrez··on New report on the cellular effects of a calorie-restricted diet in rats
This is a great read:

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.

silviogutierrez··on New report on the cellular effects of a calorie-restricted diet in rats
You did the math!
silviogutierrez··on New report on the cellular effects of a calorie-restricted diet in rats
So, yes and no. That's why I said "primarily." It's wayyyyy more complicated than calories-in vs calories-out. But 90% of it does come down to that. More importantly though, you need to define what "calories-in" means.

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.

silviogutierrez··on New report on the cellular effects of a calorie-restricted diet in rats
To echo other replies, ketogenic and other diets diets with specific protocols (IF) do work, but primarily for behavioral reasons. That is, you’re just not that hungry. Or if you eliminate an entire meal (IF), you ”save” a ton of calories.

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.

silviogutierrez··on Ask HN: What is the single top-priority software engineering problem?
Nix is the closest I've come to this dream.

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.

← PreviousPage 4 of 8Next →