SvenCodes

12.7K posts

SvenCodes banner
SvenCodes

SvenCodes

@killroy42

Weekly coding live streams on https://t.co/KbP5WVI4Hk Sven's SudokuPad available here: https://t.co/P1WGXm4WgM https://t.co/prAUHmqVQV https://t.co/qxDrrVdB0Q

Malta Katılım Temmuz 2007
2.1K Takip Edilen804 Takipçiler
Maxim Kulkin
Maxim Kulkin@maximkulkin·
@gdechichi @buddingmonkey I don’t know why yall got so triggered and offended from a statement that there were valid reasons React was built that way. And started demonstrating your exercises in 3D graphics. That just tells about your lack of understanding what a modern GUI application is.
English
6
0
4
814
David K 🎹
David K 🎹@DavidKPiano·
@SumitM_X Junior devs: "nothing" Average devs: "static array should be defined outside, don't use index as key!!!" Senior devs: "nothing"
English
21
9
937
43.6K
SumitM
SumitM@SumitM_X·
Common React Interview question. What is the problem in this code ? export default function App() { const items = ["Apple", "Bat", "Cat"]; return ( <ul> {items.map((item, index) => ( <li key={index}>{item}</li> ))} </ul> ); }
English
106
22
505
414.2K
SvenCodes
SvenCodes@killroy42·
@TStorm106 It's not about PvP, it's about sneaking into a lobby that isn't licked clean in seconds!
English
0
0
0
9
SvenCodes
SvenCodes@killroy42·
@PovilasKorop They don't, and lie about the outcomes. Don't fall for it.
English
0
0
0
5
Povilas Korop | Laravel Courses Creator & Youtuber
With all AI hype, I still don't understand how people run multiple Claude Code agents/terminals. Ok, I understand how it's possible technically. But how do you REVIEW all of that? I don't have enough brain capacity for such multi-context-switching. Or am I just too old? :)
English
374
7
608
117.6K
SvenCodes
SvenCodes@killroy42·
@SebAaltonen People forget that LLMs rely on VAST amounts of training data, and therefore, at best, trend towards the average, which is precisely NOT what you want for commercial-grade production systems.
English
0
0
0
8
Sebastian Aaltonen
Sebastian Aaltonen@SebAaltonen·
In my experience LLMs are bad for code optimization. When I am using LLMs, I let the LLM write the boilerplate code and then I rewrite the perf critical parts such as inner loops. You have to understand performance to instruct LLM to write performant code for you. Super strict instructions about the algorithm and data structures. Then review and tell the LLM exactly what should be fixed and why. Most of the code in GitHub has performance issues. Idiomatic C++ and Rust code tends to be filled with short lived single object allocations and awful fine grained locking. The training material simply isn't good enough for high performance real-time apps such as games, rendering or physics simulation. You have to be an expert of your respective area and make the architectural/performance decisions yourself. AI is great for writing glue code, gameplay code, UI code and similar, but you should write perf critical inner loops and shaders yourself (AI doesn't really understand SIMD loop/branch coherence).
Nick Tasios@Karyuutensei

Recently I had the opportunity to try Claude Opus 4.5 through the Copilot CLI. To be honest I'm biased towards AI models not being that useful, but inspired by some people I follow like @mitsuhiko and @SebAaltonen I gave it a go anyway. The task I wanted to try was optimizing a certain complex function in a C++ codebase (scientific code so not very OOP). I instructed the agent on how to build and run tests, and then I instructed it to write a single-header instrumentation profiler. I have written one myself using zones so I told it to follow the material I followed and it mostly got it right (previously Claude Sonnet 4.5 was not able to properly write the profiler). So with the profiler written, I told him to instrument the specific function. This was all quite smooth, although I had constantly this feeling I was not sure I could trust it. The only downside here was that I constantly had to instruct it to dig deeper. With the function instrumented we identified one particular function that took the most time. It was a "blur" with a kernel width dependent on the bin position. Basically a 1D convolution but instead of a constant kernel the kernel width was variable. The implementation uses expensive exponential and sqrt functions. The AI suggested first some easy optimizations to avoid repeating calculations of the kernel, but at some point we needed to move to more advanced optimizations. Because we are using IPP, I suggested it tried using that to improve performance. It did and the particular test we were focusing on passed and the performance improved significantly. I then also asked it to try to use convolutions instead. It came up with a way of segmenting the range in regions where the kernel width does not change more than 5% and did convolutions with a constant kernel width. The test passed and we ended up with a whopping 8x performance improvement. I was really happy! One thing worth mentioning is that I get why people get hooked on agentic coding; it's the same feeling I got when waiting of physics simulations to finish. You want to see the results so badly and when you do want to continue to the following iteration. This loop is very addicting! After a night's sleep I ran the rest of the tests and, oops, some of them failed. I continue my previous session with the AI and told it about the issues. This is where things started breaking apart. First it started coming up with all kinds of reason why it could have failed and at some point it felt like it was going in loops. It was also confused because I committed the changes from another terminal. I was wondering if maybe the context had become too large, so I started a new session and summarized what we did. At first it seemed it was doing better, but quickly it started going into similar loops. I had to explicitly tell it to add asserts and run the tests in Debug mode to finally get it to find the issues. In many cases I was looking at it doing obvious mistakes and wanted to scream at the screen to tell it what it should actually do. I think you can type things while it's working. What's your experience with that? In the end, the non-convolution approach was passing all tests with a moderate speedup of ~3x, while the convolution-based approach was still failing. The AI actually gave up looking for any bugs because the approach is approximate and suggested I use the non-convolution approach as this was already much faster than the original. So it basically gave up 😅. To be honest, this whole process took many hours and in this time I could have probably built something more performant myself. So for now my conclusion is that the models feel like they're nearly there but not all the way, which makes it really difficult for me to recommend for serious work if you are already experienced in what you are doing. On the other hand, you do need the experience to guide the AI. So I would say, the biggest benefit for now is for menial tasks and for doing work in-between meetings!🤡 I guess many people will suggest I didn't use the AI properly so if you have any suggestions, do tell and I'll try them out.

English
43
36
613
84.5K
8 Bit Elon
8 Bit Elon@EightBitElon·
@ZacksJerryRig @elonmusk Dude literally wants foreign citizens voting in American elections lmao. We should vehemently speak out against this guy.
English
5
0
0
681
SvenCodes
SvenCodes@killroy42·
@tsoding Why would you want to remember the code for a Todo app? If you're a programmer, you can create one from scratch. If you're asking AI to do it, you're just middle management.
English
0
0
0
10
Тsфdiиg
Тsфdiиg@tsoding·
Yes. Programming is not Bottlenecked by Typing Text. If yours is, you're not doing Programming. You're just Typing Text. It's not about remembering What Text to Type. It's about Understanding the Problem you are Solving.
Тsфdiиg tweet media
English
194
467
8.3K
543.2K
SvenCodes
SvenCodes@killroy42·
@dhh I implemented "Any" in Pascal/asm, back in the day. It's just another layer of abstraction.
English
0
0
0
20
DHH
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
182
51
1.2K
443.6K
SvenCodes
SvenCodes@killroy42·
@sean_a_mcclure @pickover It certainly doesn't guarantee every sub pattern. An infinite sequence of 1s and 3s doesn't contain ANY 7s, same for any potential sub pattern.
English
0
0
2
56
Sean McClure
Sean McClure@sean_a_mcclure·
No. If e’s decimal expansion is finite, then π (or infinite monkeys) will almost surely contain it as a contiguous block. Infinite randomness guarantees every finite pattern, but excludes every specific infinite pattern. But, if e is irrational, then π cannot contain the entire infinite decimal expansion of e as a contiguous block.
English
6
0
19
1.9K
Cliff Pickover
Cliff Pickover@pickover·
Mathematics. The Woman, the Finger, and π: A Math Puzzle That Will Make You Question Everything. The decimal representation of pi never ends. Does pi somewhere contain all the digits of e (in proper order, 27182…)?
Cliff Pickover tweet media
English
65
26
133
23.5K
mitra
mitra@mitrajoy_·
Hitler was not a socialist. He was a Nazi. The Nazi party was vehemently opposed to true socialism and communism
JohnBaylor49@juanblaze49

@persianmama111 They are only afraid of socialism because Hitler was one.

English
2.1K
1.2K
11.9K
348.3K
Tosin Olugbenga
Tosin Olugbenga@TosinOlugbenga·
A software engineer that can’t implement its own auth…. Is that one a software engineer? The least basic thing in the whole software architecture is authentication…RBACs… I wonder why some people will think running Auth as a service is a thing… If I am the CTO of a company and any engineer suggest we subscribe to a third party auth system, I will fire the person.
chinedu🦀@chinedu_10

Every engineer should be able to implement their own authentication. The fact that this is even a conversation is scary. What do you mean you can’t implement your own auth and must use an external or third-party service because some tech influencer told you it’s best practice? Are you stooopid or something?

English
199
40
477
178.5K
SvenCodes
SvenCodes@killroy42·
@mitchellh It's perfect for people who don't need to use their computers!
English
0
0
0
111
Reid Southen
Reid Southen@Rahll·
@swengsbelike 5 seconds per email was a completely unrealistic joke. It's an impossible number.
English
14
2
2.4K
37.5K
The Grim(m)est Truth
The Grim(m)est Truth@EntrepreneurFg·
@tallmetommy @elonmusk It would be wise to listen to his ideas. If Elon writes this, you can be sure there is a genius idea behind it that you just didn't grasp yet. Just look at his record, how many "impossible" projects he accomplished.
English
15
0
23
10.3K
Elon Musk
Elon Musk@elonmusk·
The Sun is an enormous, free fusion reactor in the sky. It is super dumb to make tiny fusion reactors on Earth. Even if you burned 4 Jupiters, the Sun would still round up to 100% of all power that will ever be produced in the solar system!! Stop wasting money on puny little reactors, unless actively acknowledging that they are just there for your pet science project jfc.
English
16K
14.1K
149.4K
33.2M
SvenCodes
SvenCodes@killroy42·
@tallmetommy @elonmusk Since bigger stars than ours exist, we probably shouldn't bother with solar either, as it would only harvest our puny, tiny, local sun ..
English
0
0
0
15
Tommy. T
Tommy. T@tallmetommy·
The Sun is an incredible source of fusion, not a controllable system. Engineering isn’t about where the biggest energy exists, it’s about where energy can be converted, throttled, stored, routed, and scaled on demand. We don’t build reactors because we forgot the Sun exists. We build them because civilization needs local, dispatchable, controllable power that doesn’t require orbital megastructures, perfect transmission, or planetary-scale risk. Same reason we don’t power laptops by pointing them at stars.
English
393
670
18.8K
760.9K
Robin
Robin@xdNiBoR·
@ZacksJerryRig @Tesla @elonmusk Nobody can see the future. Even HW3 users have the best driver assist system in the world. We know that they are still working for HW3 for a light V14 version and they will replace the HW3 too in the future.
English
17
0
96
6.1K
Robin
Robin@xdNiBoR·
This is actually so funny Bro doesn't know what he's talking about and honestly doesn't really care, but he just has to post because Tesla is living rent free in his head 😭 Elon really did mentally break this guy. Honestly ragebaiting that audience is probably decently profitable. So I hope it all goes to his wheelchair business.
Robin tweet mediaRobin tweet mediaRobin tweet mediaRobin tweet media
English
123
29
1.2K
118.9K
wleddzig
wleddzig@wleddzig·
@phoronix Inb4 lunduke calls this change antisemitic
English
1
10
353
17.5K
JerryRigEverything
JerryRigEverything@ZacksJerryRig·
@OrganizedMatter its taken us about 6 years to get close... - but we are hoping by the end of this year it'll be self sustaining.
English
10
4
704
18.8K
JerryRigEverything
JerryRigEverything@ZacksJerryRig·
Part of the reason the wheelchairs I build are so cheap is because we completely cut out insurance and the middlemen which *instantly* brought the price down from about ~$7,000 to just $999. A customer told me they paid $12,000 dollars for their first manual wheelchair a year ago - and were ecstatic to get nearly the same thing from us for only $1,200. Give our configurator a try and see how easy it is for yourself: NotaWheelchair.com
JerryRigEverything tweet media
English
253
1.3K
12.3K
985.8K
M. R. Mathias
M. R. Mathias@DahgMahn·
@t_Skele @ZacksJerryRig Ask yourself how a world that only has 8% whites in it, is so dominated by the white race. Ask yourself why.
English
1
0
2
99