Jamie Matthews

7K posts

Jamie Matthews banner
Jamie Matthews

Jamie Matthews

@j4mie

Web engineer. Python, Django. Sustainability, clean tech, fuzz pedals and dynamic languages. Co-Founder @dabapps, opinions my own

Ringmer, East Sussex Katılım Ocak 2007
1.5K Takip Edilen1.4K Takipçiler
Sabitlenmiş Tweet
Jamie Matthews
Jamie Matthews@j4mie·
So here it is: introducing Django RAPID architecture, the guidebook I've been writing (on and off) for a year or so, and thinking about for my entire career. django-rapid-architecture.org It's a free, opinionated guide to structuring real‑world Django codebases so they stay understandable and malleable as they grow. It’s not a new framework, and it doesn’t try to hide Django. Instead, it leans into Django’s strengths and focuses on a few simple ideas: - Keep models thin: data definitions, not “god objects”. - Organise code by responsibility (readers, actions, interfaces, data) rather than by app. - Put most business logic in plain functions, not in fat models or deep class hierarchies. - Keep views thin: treat GET as "read some data" and POST as "do an action". - Design endpoints around real frontend use cases (Backend For Frontend) instead of idealised resources. - Control queries carefully to avoid performance traps. I’d love you to take a look and let me know what you think!
English
0
1
6
158
Jamie Matthews
Jamie Matthews@j4mie·
Why don’t any other browsers support container tabs like Firefox? Seems like the only sensible primitive for working with multiple sets of cookies for the same site. And no other browser supports it. How do people who don’t use Firefox get anything done? support.mozilla.org/en-US/kb/how-u…
English
0
0
0
31
Jamie Matthews retweetledi
David Cramer
David Cramer@zeeg·
@1st1 can i submit a pep to delete the type system
English
1
1
18
2.5K
Monologue
Monologue@usemonologue·
📱 Reply “ios” for an sneak peek at Monologue on iOS. Link will come via DM.
English
130
2
34
7K
Jamie Matthews
Jamie Matthews@j4mie·
@simonw update: replaced this with a very simple calculator that only supports +, -, *, /, parentheses, and unary +/-, and has a limit both on the string length of the expression, and the number of AST nodes. ~50 lines of Python.
English
0
0
1
11
Jamie Matthews
Jamie Matthews@j4mie·
Hmm, interesting. Is it theoretically possibly to give a model a “calculator” that lets it do basic maths accurately, but which is also a safe expression evaluator in the way you describe, without giving it a full VM to work in? Maybe just some limits on the complexity of expressions it can evaluate are needed. Or maybe remove its ability to use variables?
English
3
0
0
100
Jamie Matthews
Jamie Matthews@j4mie·
@simonw as a sandbox enthusiast, have you seen this? github.com/enesklcarslan/… I’m working on a project with the OpenAI agents framework, and I needed the agent to be able to do basic maths (work out percentages and things). Rather than give it Code Interpreter, I wrapped arithmeval in a function tool. Seems to work very nicely.
English
1
0
7
2K
Jamie Matthews
Jamie Matthews@j4mie·
@kuchin @simonw Interesting. That looks a lot more complicated. And doesn’t it potentially suffer from the same issue?
English
0
0
0
15
Simon Willison
Simon Willison@simonw·
@j4mie I've been looking for exactly that - a Python safe expression evaluator! Thanks, this might be just what I wanted
English
2
0
1
1.7K
Jamie Matthews
Jamie Matthews@j4mie·
@simonw Makes sense, I guess even physical calculators have a limit to the size of number they can operate on.
English
1
0
0
41
Simon Willison
Simon Willison@simonw·
@j4mie I think you have to include checks at each step that it's not about to do an ** against a really big number
English
1
0
0
124
Jamie Matthews
Jamie Matthews@j4mie·
Don’t agree with DHH on everything, but this post nails it, and I will always be firmly in camp dynamic. As an aside: to everyone arguing “LLMs work better with statically typed languages”. First, I haven’t found this to be remotely true, but furthermore I think we’re approaching the point where LLMs will actually make static typing entirely irrelevant. They’ll be able to reason about how values move through running code without actually running it (similar to how a human reads code that was written for readability, but thousands of times better). Type annotations become nothing more than wasted tokens. The pendulum swings again.
DHH@dhh

One of the longest running schisms in programming is that of static vs dynamic typing. I've heard a million arguments from both sides throughout my entire career, but seen very few of them ever convinced anyone of anything. As rationalizations masquerading as reason rarely do in matters of faith. The rider will always justify the way of the elephant. That's not to say there aren't people who've switched camps. In fact, such individuals usually shout the loudest rationalizations of all. Often with the charm of a livelong omnivore suddenly turning vegan or a traditional banker who caught a lucky ride on crypto. The shorter the faith, the brighter the flame. Personally, I'm unashamedly a dynamic typing kind of guy. That's why I love Ruby so very much. It takes full advantage of dynamic typing to allow the poetic syntax that results in such beautiful code. To me, Ruby with explicit, static typing would be like a salad with a scoop of ice cream. They just don't go together. I'll also confess to having embraced the evangelical position for dynamic typing in the past. To the point of suffering from a One True Proposition affliction. Seeing the lack of enthusiasm for dynamic typing as a reflection of missing education, experience, or perhaps even competence. Oh what folly. Like trying to convince an introvert that they'd really like parties if they'd just loosen up a bit. That actually it's really fun to be in crowded rooms, for hours on end, shouting to communicate, because how about that VIBE! These days, I've come to appreciate the magnificence of multiplicity. Programming would be an awful endeavor if we were all confined to the same paradigm. Human nature is much too varied to accept such constraint on its creativity. Could you imagine if all visual art had to be rendered in the style of cubism? Or realism? Or all novels written in the short, direct flavor of Hemmingway? What a bore it would all quickly be! It would ruin the magic of programming. This unique fusion of art and engineering. But it took a while for me to come to these conclusions. I'm a recovering solutionist. So when I see folks cross their heart in disbelief that anyone, anywhere might fancy JavaScript over TypeScript, I smile, and I remember the days when I'd recognize their zeal in the mirror. That's not to say all matters of programming approaches boil down to equal but different mindsets. There are limits to this relativism. But dynamic vs static typing is certain within its confines. So too is functional vs object-oriented programming. Poles on both these axes have shown to deliver excellent software over the decades (and awful stuff too!). Now people are blessed with a capacity to express themselves equally well from either end. Such ambidextrous nature seems rare, though, as evidenced by the utter disbelief so frequently expressed by either side that the other might hold a reasonable position. I am not ambidextrous. I do not enjoy static typing, and objects animate my mind's eye. But I have come to appreciate the fact that others illuminate their creativity with just as much intensity as I do mine, using functional programming constraints and explicitly spelled out types. As long as I never have to soil my Ruby with type hints or write all front-end code in TypeScript, I can so happily coexist with those who adore Go or can't stand JavaScript. Vive la différence!

English
0
0
0
79
Eleanor Berger
Eleanor Berger@intellectronica·
What a frabjous day! SKILLs have landed in @code (alongside many other goodiees). This is HUGE! 🔥
Eleanor Berger tweet mediaEleanor Berger tweet media
English
3
2
17
1.4K
Jamie Matthews
Jamie Matthews@j4mie·
@thsottiaux Skills, or some similar mechanism. I’ve added a little shim to hack in support for them and written some simple house style guides and it’s transformed the ability of the model to build things in the right way.
English
0
0
0
64
Tibo
Tibo@thsottiaux·
Codex team is working on a few experimental projects that are starting to shape up and I’m excited to share more about soon. But I’m curious, what would you like to see ship or improved by the end of the year other than better models?
English
663
46
1.3K
211.6K
Romain Hedouin 🇫🇷 Unit Police
Do not trust this, the original source is "some guy who rode with an employee" In general, be extremely wary of any Tesla-themed account with a red background profile picture
English
20
11
252
25.6K
Jamie Matthews
Jamie Matthews@j4mie·
ChatGPT needs “voice note mode”. I don’t use them at all with actual humans but the asynchronous nature of seamlessly sending some audio and then getting a reply (also audio) sometime later feels like it would work perfectly for LLMs. Like advanced voice mode but without the awkwardness. You’re welcome @OpenAI @sama
English
0
0
1
133
Jamie Matthews retweetledi
Flowers ☾
Flowers ☾@flowersslop·
When you use local models, you realize even more how bizarre and magical it all is. My GPU is thinking about how to code doodle jump using human thoughts. That would literally have been like black magic just a few years ago.
Flowers ☾ tweet media
English
9
8
151
7K