Preferences

abhashanand1501
Joined 28 karma

  1. You should look into factory boy (in django). Been using it for 10 years. It helps with this situation.

    Foofactory() will automatically setup all the foreign key dependencies.

    It can also generate fuzzy data, although having fuzzy data has its own issues in terms of brittle tests (if not done correctly).

  2. > The trading system reports an average latency of 10ms

    Python is a bad choice for a system with such latency requirements. Isn't C++/Rust preferred language for algorithmic trading shops?

  3. We really need this in India. There are 53 million cases which are pending in courts, with over 180k cases open for more than 30 years (see https://en.wikipedia.org/wiki/Pendency_of_court_cases_in_Ind...). It is estimated that more than 300 years will be taken to dispose of all cases.

    If law code is a repository: 1. Each trial should be encoded into a law. 2. If the trial is already covered sufficiently in the codebase, and both parties agree to it result. Then case is solved. 3. If not, the new judgement leads to a "pull request" into the codebase.

  4. Can someone explain why letsencrypt certificates have to be 90 days expiry? I know there is automation available, but what is the rationale for 90 days?
  5. In different regions the price difference is different. In us-east there is a 20% difference, in ap-south it is 50%. You can check for fargate ecs pricing for example.
  6. One of the easiest hack to reduce your AWS bills is to migrate from x86 to arm64 CPU. Performance difference is negligible, and cost can be upto 50% lower for arm machines. This is for both RDS and general compute (EC2, ECS). Would recommend to all.
  7. My advice - use same rigor as other software development for a RAG application. Have a test suite (of say 100 cases) which says for this question correct response is this. Use an LLM judge to score each of the outputs of the RAG system. Now iterate till you get a score of 85 or so. And every change of prompts and strategy triggers this check, and ensures that output of 85 is always maintained.
  8. There are two possibilities

    1. The getters and setters are not called anywhere in application logic. In that case, delete the getters / setters and get to 100%.

    2. The getters and setters are called somewhere in the application logic. In that case, they should have already been covered in the test for the application.

    There is really no excuse to not write tests to get to 100%.

  9. > Am I suggesting 100% test coverage? No, I’m not suggesting it. I’m demanding it. Every single line of code that you write should be tested. Period.

    This is from uncle bob. I hate the argument by people that 100% leads to "bad quality tests". Not doing it leads to bad quality code, people who don't care about quality of code, and hence dont write tests, suddenly start to care about quality of tests.

  10. >In spherical geometry, the interior angles of a triangle add up to more than π. And in fact you can determine the area of a spherical triangle by how much the angle sum exceeds π. On a sphere of radius 1, the area equals the triangle excess

    To all the flat earthers out there, this property can be used to find out earth is not flat, just by drawing a giant triangle on the surface, without leaving the earth. Historically, to prove the earth is round, people have relied on the sun shining directly overhead on wells in different cities. But this approach proves it without the need to refer the sun.

  11. I like the 100% philosophy for coding:

    1. 100% code coverage 2. 100% branch coverage 3. 100% lint (without noqa) 4. 100% type check pass(for python/js) 5. 100% documentation coverage 6. All functions with complexity less than 5. All functions with no of lines less than 70. All files with number of lines less than 1000.

    These make code high quality, and quality of life is directly proportional to qualify of your code.

  12. We are developing using sqlite to transfer configurations from uat to production environment. Since the configurations are already saved in a postgres table in uat, moving some configs from uat to production an sqlite file is very easy. since it's a binary format, we are also saved from any inadvertent edits by people doing production deployment.

    Also, another usecase is to export data from production to uat for testing some scenarios, it can be easily encoded in a sqlite file.

  13. In fact O(n^2) is exponentially more than O(log n).
  14. Lot of comments complaining that going from O(n^2) to O(log n) is not an exponential improvement, but it is indeed an exponential improvement. In fact O(n) is exponentially more than O(log n).

This user hasn’t submitted anything.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal