Open in app

Sign in

Write

Sign in

Tom Ritchford
Tom Ritchford

1.4K Followers

Home

About

1 day ago

…istinguished but elderly scientist states that something is possible, he is almost certainly right. When he states that something is impossible, he is very probably wrong.

GenAI’s products: Move fast and fail
819
12

Lan Chu

It's funny, I was just re-reading a collection of Clarke short stories, Tales of Ten Worlds, and…

It's funny, I was just re-reading a collection of Clarke short stories, Tales of Ten Worlds, and thinking, "How was it that all of these smart people, like Clarke and Asimov and so many others, were so very very wrong?" One of the earliest stories in that book is from…

3 min read

3 min read


Nov 28

Nice, I never heard of this guy before!

Nice, I never heard of this guy before! Interestingly enough, he sings the same sort of grace notes or melisma as he plays in solos! He's technically perfect in this track, he never flubs a note and has extremely good timing. I really enjoyed that track but he's just a…

2 min read

2 min read


Nov 25

Was Rust Worth It?
2.9K
34

Jarrod Overson

Very specific, actionable information without too much cruft: every technical article should be…

Very specific, actionable information without too much cruft: every technical article should be like this. These are the sorts of things you wouldn't notice in a couple of weeks but would drive you nuts, or thrill you, in a couple of years. To be honest, you've sort of damped my…

3 min read

Very specific, actionable information without too much cruft: every technical article should be…
Very specific, actionable information without too much cruft: every technical article should be…

3 min read


Nov 25

One of its principles is the dependency inversion (DIP) principle, which states that high-level modules should not depend on low-level modules, but on abstractions. This concept is often confused with inversion of control (IoC), but dependency injection is a speci…

How to use Dependency Injection in Python
57
2

Xavier Escudero

But you don't give any reasons why this should actually be a principle.

But you don't give any reasons why this should actually be a principle. Having worked on multiple codebases where people took this as gospel for almost every part of the code, I would say that this added little in value to the codebase but added friction to every commit and…

1 min read

1 min read


Nov 25

As a philosophy undergraduate, I wrote a dissertation which raised questions about Western philosophers and the universality of their theories and truth claims. Apparently the external examiners went into a rage about it. They decided to fail me.

The Mask of Liberalism Is Slipping Faster and Faster
281
12

Aza Y. Alam

This is my surprised face: :-|

This is my surprised face: :-| Not all philosophers are like that, I hasten to add, some of them are freewheeling freaks who are open to any or all ideas, but institutions have a way of promoting people who don't rock the boat. I can't find a good copy of this sketch, but here's a stretched one: https://www.youtube.com/watch?v=oa0bCzwSNA0

1 min read

1 min read


Nov 23

Handle all (possible) errors. It is important to handle all possible errors that your code can throw. This will help to prevent your code from crashing unexpectedly.

Python Exception Handling: Patterns and Best Practices
183
5

Jerry Ng

Good article, but as written, the above sentence is not right at all!

Good article, but as written, the above sentence is not right at all! The most important rule is this: don't catch exceptions at all unless you can completely handle them. It's much, much better for a program to crash than it is to continue with things in a bad state. …

1 min read

1 min read


Nov 7

We can solve this by defining separate types for different kinds of IDs with “NewType”:

After Using Rust, the Way I Use Python Has Changed
995
13

Lucas Scott

Interestingly, every NewType I ever created got turned into an actual class fairly fast because we…

Interestingly, every NewType I ever created got turned into an actual class fairly fast because we always wanted to hang extra functionality on it. Python 3 and I think 2 (I can’t run 2.7 on this machine it seems!) allow you to write instead: class CarID(int): pass so I just do that sort of thing now with the expectation that more methods will eventually follow.

1 min read

1 min read


Nov 7

… takes parameters, store parameters into fields, etc. than defining a class (and giving it a name). Since Python 3.7 (and earlier versions using polyfill packages), there is a faster solution: .dataclasses.

After Using Rust, the Way I Use Python Has Changed
995
13

Lucas Scott

Hear, hear!

Hear, hear! I'm at the point now that if a programmer never uses any sort of data class, like dataclasses or pydantic, I think somewhat the worse of them. Oh, I have a tip for you, it's changed my life (a little tiny bit): import dataclasses as dc import typing as t I set my editor to insert these two lines at the top of each new Python file I create (and I rely on ruff to remove them automatically if they don't actually get used.)

1 min read

1 min read


Nov 7

Does writing the function signature take more time? Yes. But is this a problem? No, unless my encoding speed is limited by the number of characters written per minute, which is not common. Writing out the type explicitly forces me to think about what interface the function actually provid…

After Using Rust, the Way I Use Python Has Changed
995
13

Lucas Scott

I'm enjoying your article, but this sentence is a bit week.

I'm enjoying your article, but this sentence is a bit week. Oh, it's not that it takes much time to, ah, type the typing, but it takes you time to think up the typing. Most of the time that is very little but occasionally coming up with the correct type…

2 min read

2 min read


Nov 5

How I Used Amazon Bedrock to Write, Schedule, and Post My Tweets
343
7

Allen Helton

What do you see as the endgame for this? it doesn't seem good for most of humanity.

What do you see as the endgame for this? it doesn't seem good for most of humanity. Using AI to generate a large number of posts all over social media will force everyone else to do the same thing, resulting in a more level playing field, except with a much…

3 min read

3 min read

Tom Ritchford

Tom Ritchford

1.4K Followers

uk->at->ca->us->nl

Following
  • Grant Piper

    Grant Piper

  • Coates

    Coates

  • Aaron 0928

    Aaron 0928

  • Article bay

    Article bay

  • Dark Energy Articles

    Dark Energy Articles

See all (381)

Help

Status

About

Careers

Blog

Privacy

Terms

Text to speech

Teams