HNHacker News
TopNewBestAskShowJobs

iknownothow

464 karma · joined April 15, 2022

submissionscomments
iknownothow··on Snake_case_is_the_best_case
Love it, I agree 100% that snake case is easy to read and I will definitely be trying out Cobra_case for my personal projects in Python because my class names are the least readable.
iknownothow··on Ask HN: Can we just agree to stop giving Christmas presents?
That's a very interesting way to look at gift giving! I just bought gifts for my own partner and kid. I'm confident that for every $10 I have spent, they'll only see/perceive/gain $6 of value from it unless they've explicitly asked for a specific gift.
iknownothow··on ChatGPT is a ‘code red’ for Google’s search business
Anyone have opinions on what Google's next steps could be?

I think I've heard enough of how ChatGPT is better than Google Search. I'm interested in hearing from people in the know of how Google could use its very sizable and knowledgeable resources to compete with ChatGPT.

iknownothow··on Yes, a head of lettuce outlasted Liz Truss
I thought the head of lettuce they were talking about was Boris Johnson. Turns out it was an actual head of lettuce.
iknownothow··on Ask HN: Recommendations for ETL frameworks that are NOT Python-native
Airflow but use KubernetesPodOperator so you can run your ETLs in docker containers or pods within k8s (any language you want). You may need to write a few lines of dumb python code to build a DAG of KubernetesPodOperators but the actual work is done within containers.
iknownothow··on Limits of Language-Thought Influences and the Constraints of Embodiment (2021)
On a slight tangent just to add another speculative datapoint to the language and embodiment discussion.

It's quite possible the right hemisphere of the brain is subservient to the left hemisphere because the language center of the brain resides in the left hemisphere. There's some evidence that the left and right hemispheres are independent actors merely coordinating with each other via the corpus callosum [1]. In such a dynamic, it's likely that the left and right hemispheres start off as equals and play a tug of war of sorts, but eventually the right lets the left lead since the left is better able able to influence the "real physical world" because of language. Language gets you help, food (energy), sex etc. So the language center may not be constrained by embodiment but it might be optimized towards getting the most out of physical reality first?

[1] https://en.m.wikipedia.org/wiki/Split-brain

P.S. the language center is not guaranteed to be in the left hemisphere. Just a high probability as far as I'm aware.

iknownothow··on For the love of god, stop using CPU limits on Kubernetes (updated)
This advice comes from tunnel vision and makes perfect sense if you know that you have exactly two pods running at any given time. But if you have exactly two pods, then why bother use k8s? IIRC one of the major selling points of K8s was on-demand scaling or auto scaling horizontally. Which means the number of pods you have in the cluster is dynamic.

In the context of pods dynamically spinning up and spinning down, it's bad when a pod replica can't be allocated in the cluster "predictably" but there is nothing worse than when a new pod (new deployment) fails because "Marcus the pod" drank all the water and now I have to call DevOps and wait god knows how long before they spin up a new node to guarantee a spot for the new pod.

Bin-packing is a already an np-hard problem. If you remove limits from CPU then you're adding probabilities into the mix. So, for the love of god, always use limits unless you have a very specific use case.

iknownothow··on Show HN: Get conversational practice in over 20 languages by talking to an AI
To clarify, when I meant speak, I meant speak in a language that I have just started to learn.
iknownothow··on Show HN: Get conversational practice in over 20 languages by talking to an AI
Seconded, I want to speak openly without fear of judgement first with the AI so when I do speak to real people I'm much more confident. I know people who are confident/shameless (a positive trait in this case) who don't mind making mistakes when speaking to real people but that's not me.

My only concern is how "correct" the tool or the AI is.

iknownothow··on Ask HN: Why should I learn PostgreSQL(MySQL to PostgreSQL switch)
I would recommend Postgres and the best reason I can give is its very good "extension" ecosystem [1][2].

But I wouldn't go so far as migrating existing projects from MySQL to Postgres. Use Postgres on your new projects and let the old ones continue to use MySQL unless you had very good reasons to migrate.

[1] https://www.postgresql.org/docs/current/contrib.html

[2] https://pgxn.org/

iknownothow··on Not Mysticizing System Dynamics
I agree with the author that applying systems dynamics to software teams and organizations might be too rigid and inevitably fails when you treat humans as static and unchangeable. I personally despise single metric optimization.

However there is value in applying systems dynamics to software teams and treating humans as probabilistic variables. And instead of maximazation, one can do expectation maximization i.e. finding the average outcome. Modelling such a system is hard and intutions play more of a role here because our brains are well suited to probabilistic thinking (to a degree for simple systems).

But I can see why leadership gurus don't prefer the probabilistic dynamics. Because it involves "luck" and asking leaders to do the optimal thing i.e. sticking to the expected maximum (average outcome) isn't sexy and doesn't lead to winners and losers. Instead, in a capitalistic system, all leaders are expected to engage in risky decision making and every once in a while one leader wins, standing on the shoulders of a good software development team which also happened to be on a hot streak that quarter, whereas other leaders who didn't win are blamed for the poor performance of their equally good software development teams who happened to be in a slump that quarter.

iknownothow··on Almora: Trip of the Introverts
I believe this highlights a culture gap. I think it's hard for one to identify as an introvert according to the western manifestation of introversion. In India it might be practically impossible to ever find alone time and most introverts might be well adjusted to socializing and have lower levels of anxiety in social situations.

So I'd say that introversion "in India" manifests itself by having a smaller trusted social circle, having an aversion to partying and making the most of the occasional alone time one might find.

I'm speaking mostly from personal experience. I could be terribly wrong. Now that I've moved away from India and live in Europe, my lifestyle very much resembles what someone in the west expects an introvert to have.

iknownothow··on Notes on the SQLite DuckDB Paper
A lot of recent tooling around SQLite has opened up some new possibilities. The biggest one I can think of is Litestream which has allowed SQLite to have distributed reads. This makes SQLite a strong contender for serverless and extremely cheap OLAP. There have been a lot of posts about serverless Postgres as well lately in the form of neon.tech.

If SQLite had better performance for OLAP queries, there is no way I wouldn't explore it as an option for work because it's so darn easy to use. The operational or hosting or cloud costs of other OLAP database is insanely high in comparison.

P.S. It's my personal opinion and experience that most companies have only about 1TB or less of analytics data. Large OLAP databases are just a waste for such small data but currently apart from DuckDB there aren't any cheap competitors for these small use cases. Postgres and SQLite are too slow (without some additional engineering).

iknownothow··on The future of Nginx: Getting back to our open source roots
I am an Nginx user and I really do not want to go away from here. It's too performant and too mature. It has a terrible UI problem. I don't want to learn a new tool.

All I ask is a Caddy style JSON configuration format for Nginx. And don't just implement some random JSON schema either, please create a well designed schema that is extensible. Take Prometheus [1] or Alertmanager [2] as examples of well designed and extensible schemas.

Just give me some basic features first, easy HTTPS, easy reverse proxy, easy rate limiting. You can release the rest of the advanced features in your own time.

[1] https://prometheus.io/docs/prometheus/latest/configuration/c...

[2] https://prometheus.io/docs/alerting/latest/configuration/

iknownothow··on SQLite-HTTP: A SQLite extension for making HTTP requests
Wouldn't you be doing JSON processing instead of text processing?

I myself never had to do text processing but instead JSON processing and that was convenient to do in Postgres directly, and I assume it's convenient to do in SQLite given the recent advancements in SQLite's JSON capabilities.

iknownothow··on Review of 17α-ethynylestradiol in water across 32 countries: Estrogenic effects
I just checked Google trends for the phrase "hair loss" localized to South Carolina. The graph doesn't point to any trend that starts in 2018 as far as I can tell. I could be wrong.

UPDATE: I checked for "hair loss" localized to the United States on Google trends. There appears to be an upward trend after 2015. I am not drawing any conclusions, just wanted to point that out.

iknownothow··on S3 isn't getting cheaper
Could you elaborate on the TOAST issues you're having? We're pretty liberal with our use of large JSONB objects and might hit a billion objects in a year or so.
iknownothow··on To download from Google Drive, you must enable third party cookies?
Pro tip: If you want to download an image or pdf, Drive will still let you print, so you can print it to file as a PDF.
iknownothow··on My awakening moment about how smartphones fragment our attention span
At this point it's a reflex and that's what I hate about it. I've had to catch myself mid way through the reflex, when I turn to look at the phone and then turn it on and then realizing what I've done and then turn it off. To a third person, it looks like I've just checked if there's new messages or checked for the time. I've had this reflex and caught it mid way, when having important conversations with partner, friends, colleagues etc in the last two weeks and it's embarassing.

I am of the inattentive type so I am more prone to this reflex but I am also more mindful than most who doesn't actually go through social media at all. The reflex is most likely to just check HN or Reddit. Maybe you'll be more aware and notice this reflex in other people you're in conversation with.

iknownothow··on My awakening moment about how smartphones fragment our attention span
I think you made a great observation about the 5-10 breaks but I disagree with your assessment that we're just replacing one random behavior with another.

The fact that I am "compelled" to look at my phone instead of staying with my thoughts is not an innocuous pattern. Why do I, with perfect predictability, prefer reaching for my phone rather than staying with my thoughts? And it's a fact that this compulsion to look at my phone exists even when I'm working on something important and not just when I'm standing in the elevator.

(My tone might be aggressive. I don't mean to offend, I just disagree).

iknownothow··on Docker is dead? Podman – an alternative tool?
It's okay to stick with Docker if it works for us right? There's nothing fundamentally wrong with it right?

At the moment Podman is just more work for us because I and other devs don't have years of of experience and intuitions about Podman like we have with Docker. I'd rather just focus on business problems rather than another migration.

iknownothow··on Ask HN: If Kubernetes is the solution, why are there so many DevOps jobs?
From what I've seen, most developers either aren't systems thinkers or are too busy to take a step back and spot and eliminate redundancy. The best way I can explain this is that many software processes and pipelines within companies are usually complex Directed Acyclic Graphs and very often Transitive Reduction [1] is not applied to these processes.

At the end of transitive reduction, you end up with a graph with all redundant dependencies removed but functionally, it is still the same graph.

[1] https://en.wikipedia.org/wiki/Transitive_reduction

iknownothow··on WTFPython: Exploring and understanding Python through surprising snippets
If you go back to the original comment from the user praptak, you will notice in his example the assignments "obj.a += (2,)" and "obj.b += [2,]". These assignments work exactly as expected no matter which school of thought you come from.

The difference is in how the Class attributes are affected i.e. the values of "A.a" and "A.b".

  # obj.a += (2,) has no impact on A.a since tuples 
  # are immutable and copies are made.
  # This is unexpected from a C/C++ intuition.

  >>> print(A.a)
  (1,)    
   
  # obj.b += [2,] has an indirect impact on A.b
  # since lists are mutable and updates are made in place.
  # This is unexpected for beginners in Python since it
  # deviates from how int, str and tuples behave as "+="
  # can be used for int, str, tuples and lists.
  
  >>> print(A.b)
  [1, 2]

Edit: formatting
iknownothow··on WTFPython: Exploring and understanding Python through surprising snippets
Gotcha, I see where we differ. I've exclusively programmed in Python and since int, str and tuple are immutable in Python, I've always assumed "+=" operators create copies and don't update the object.
iknownothow··on WTFPython: Exploring and understanding Python through surprising snippets
Maybe we are looking at it differently. To me, the behavior of "obj.a += (2, )" is the obvious and expected one i.e. I expect a tuple "(1, 2)" to be created and stored in "obj.a" and the class attribute "A.a" is untouched and remains "(1,)". The behavior of the "obj.b += [2,]" for the list is the real gotcha here where it correctly alters the value of "obj.b" but wtf'ingly also alters the value of the class attribute "A.b" which completely alters the behavior of A.

I'm curious if you see it the same way?

iknownothow··on WTFPython: Exploring and understanding Python through surprising snippets
Oh, that's a wtf for sure. More to be scared of and more paranoid I'm going to appear to junior devs while reviewing merge requests. If I'm not mistaken there's a chapter in Effective Python about this, where they recommend never using lists or dicts as Class attributes or default values for parameters and instead use factories or use None and then initialize them with default values when a new instance is created.
iknownothow··on Flask Mega-Tutorial (2017)
What do you think about the current state of Flask and Flask extensions? Are they being maintained and up to date? Or would it better to go with FastAPI and use its non-async features to have the same Flask like experience?
iknownothow··on Neon – Serverless Postgres
Neon now opens the door (at least in my mind) for Postgres to be used for analytics or a data warehouse for almost an order of magnitude more data before having to consider Snowflake.

Basically if someone is already using Postgres as a warehouse, then they can prolong their migration to Snowflake by at least a year by using something like Neon.

iknownothow··on Neon – Serverless Postgres
We already use DBT and the data is less than 10TB, something Postgres can handle well. And most of the data is concentrated in a few tables. With a serverless approach I'd be happy to allocate 10x resources for just a query or two and for the rest a minimal server is fine.

I manage the data warehouse mostly alone because Postgres offers guarantees, unique constraints, triggers and relationships between columns of different tables. It does the work of two engineers. Snowflake is fast but not Postgres compatible. In order to move to Snowflake, I have to write tests and maintain them which Postgres does for me for free.

I'd stick with Postgres at least until 20TB before considering Snowflake.

iknownothow··on The age of the fast self-checkout lane is over
Valid points but want to address some specific points:

2) Not entirely true. On average you may be right, but some specific items that I care about, like some good brands of milk, are actually cheaper on the app than at the store (my reference store is Rewe which is the closest to me and a bit on the expensive side).

3) If the price of items is higher as you say, then shouldn't that cover the salaries of the couriers? Also they have a guaranteed minimum wage and tips. They get a great workout since it's all based on bicycles.

4) The deliveries happen from a warehouse and not the grocery store. I assume the warehouse is optimized for deliveries and not foot fall.

On average I do pay more per week, maybe +10€, which is well worth it since I have a toddler at home and every hour is accounted for.

P.S. German cities are very compact and have decent bicycle lanes.

← PreviousPage 4 of 5Next →