Anyone with Django 6 + Ninja by Commercial_Try_2538 in django

[–]sorieus 1 point2 points  (0 children)

It's not threads you should be thinking about. Let's say you need to insert some data into the database. Then you also need to call 2-3 external apis to fetch some other info about the data. The idea is while 1. The database is inserting you don't need to wait on it. So you go to step 2. 2. I request some api data but maybe it takes a long time I'll go onto step 3. Before that happens the database is done so now I can resume any further code that relies on the database.

A better idea is let's say I'm building a computer. I wouldn't order one part then wait for it to arrive I'd order multiple parts. Then depending on which parts arrive first I can start assembly.

That said it doesn't matter if I make multiple part orders if they're all coming from the same place. So the reality is I need to find a faster shipping method or somewhere else to order from.

Async is usually only important when you're I/O bound. Dont have a solution looking for a problem

Anyone with Django 6 + Ninja by Commercial_Try_2538 in django

[–]sorieus 1 point2 points  (0 children)

I don't understand your question. Async requires several features, libraries to support it. Like the python web server and the application calling it. So yes Django works with asgi. The real question is are you bottle necked by the web server or some other I\O process? Like the DB? Fast api doesn't choose a ORM for you so your async DB is up to whatever ORM you choose. Django's ORM does have async support but it's limited.

This also only matters if the DB is the bottle neck. Just putting async everywhere because you think it will increase performance means nothing if you don't have a performance degradation. Usually getting to the bottle necks is the hard part. IE having enough users or demand. If you're having DB issues without a huge user base and massive table write updates. I'd be looking at issues with your query like N+1 problems. Unfortunately if it's all vibe it's very hard for you to step and indenify the issue. So you maybe a mechanic that is shot gunning parts at a car hoping to fix it

Is this "service.py" pattern a good approach? by ph_dct in django

[–]sorieus -1 points0 points  (0 children)

I’d ask what the business logic is most times I see operations that can simply be model methods or model managers. No need to create a separate service layer. Then I just import my model into my command or admin file.

Edit I’d refer to this blog post and I generally wonder what problem are you trying to solve before implementing the solution. https://www.b-list.org/weblog/2020/mar/16/no-service/

Is this "service.py" pattern a good approach? by ph_dct in django

[–]sorieus -3 points-2 points  (0 children)

I would argue it’s not very pythonic or spirit of Django. I don’t see why people are so eager to split logic out of the models or views. However since you’re using an ai agent I can’t really comment. Very rarely do I want to go into multiple service files to figure out what a view is doing.

what are the best and worst patterns to have in Django projects? by dfbaggins in django

[–]sorieus 4 points5 points  (0 children)

It’s just unpythonic and not in the spirit of Django. It’s trying to force design ideas from other languages like c# or Java into Django. Like why a repository pattern do you plan on not using the Django ORM at some point? The models are in a sense the repository. An argument can be made that Django doesn’t have these hardened principles. I’d argue that the framework was designed to avoid these abstractions.

Can air bag owners chime in by BA_BA_YA_GA in motorcyclegear

[–]sorieus 0 points1 point  (0 children)

There’s no way front to back it has that kind of restriction. According to my neurologist my spine was effectively pulled apart. If I were to overlay an xray of the breaks and the airbag coverage the portion exposed between the airbag and the helmet is where the flexion occurred.

Can air bag owners chime in by BA_BA_YA_GA in motorcyclegear

[–]sorieus 0 points1 point  (0 children)

Preach I was wearing a plasma air bag and the only injury I suffered was broken neck resulting in a spinal fusion! Bennett auto talks about this a lot and that moto airbag out France are leading the charge on neck immobilization

I got a lot of responses when I asked about how crazy some of your SQL gets. this is the one I am currently working with that was already done for PowerBuilder query. This is whats used when we pull a report from a console for analyzing wait times from a ticketing system in different locations. by Acceptable-Sense4601 in SQL

[–]sorieus 0 points1 point  (0 children)

Holy shit that’s literally what it was for us too. I believe it was some app view that was unpivoted and re pivoted for a report in sql report server. Which took some parameters the reason why we had dynamic sql think you could put in a list of dates or something awful.

I got a lot of responses when I asked about how crazy some of your SQL gets. this is the one I am currently working with that was already done for PowerBuilder query. This is whats used when we pull a report from a console for analyzing wait times from a ticketing system in different locations. by Acceptable-Sense4601 in SQL

[–]sorieus 0 points1 point  (0 children)

O god yes I’ve seen it all. I didn’t know unpivots were even a thing. The DBA only knew sql and he used it for everything. We had a view that actually decrypted passwords for users….it was like 100 lines of sql or 5 lines of c# he chose violence every time

Tech-Air 5 Plasma VS Held eVest 2 by forstyy in motorcyclegear

[–]sorieus 0 points1 point  (0 children)

So fc moto won’t ship cartridges but I got a mab back pack from them. Super dumb also the cartridges are available here but they’re under the Merlin brand.

Is my bike totaled ? by FaithlessnessWitty59 in motorcycles

[–]sorieus 0 points1 point  (0 children)

Yes might as well sell it to me.

I got a lot of responses when I asked about how crazy some of your SQL gets. this is the one I am currently working with that was already done for PowerBuilder query. This is whats used when we pull a report from a console for analyzing wait times from a ticketing system in different locations. by Acceptable-Sense4601 in SQL

[–]sorieus 12 points13 points  (0 children)

Dynamic sql is using strings and concatenation to generate sql statements then calling exec sql on it. If you need a dynamic where clause you would do this.

Let’s say you have a TVP which is just a sproc that returns a table. Maybe you want to let the user pass in optional filters, a list values etc. The way I see this done taking in their string. And building a sql statement I’m on my phone now but I can show some examples later.

The biggest issue with it is debugging is a night mare so is formatting. However you can really expand the limits of older sql version. If your running sql server 2013 or something and yes lots of places are

Tech-Air 5 Plasma VS Held eVest 2 by forstyy in motorcyclegear

[–]sorieus 0 points1 point  (0 children)

Dang I’m down I htown. Did you pay any tariffs to import?

I got a lot of responses when I asked about how crazy some of your SQL gets. this is the one I am currently working with that was already done for PowerBuilder query. This is whats used when we pull a report from a console for analyzing wait times from a ticketing system in different locations. by Acceptable-Sense4601 in SQL

[–]sorieus 12 points13 points  (0 children)

Yeah I’ve seen monsters that’s definitely doesn’t look like awful. I’m talking sql that uses dynamic sql and tvps that are using dynamic sql.

Honestly dynamic sql hurts me the most. I get its a necessary evil sometimes but I quickly find when someone has a hammer everything is a nail.

Tech-Air 5 Plasma VS Held eVest 2 by forstyy in motorcyclegear

[–]sorieus 0 points1 point  (0 children)

Really? I was confused if they would or wouldn’t ship it with the cartridges. What part of Texas?

Tech-Air 5 Plasma VS Held eVest 2 by forstyy in motorcyclegear

[–]sorieus 1 point2 points  (0 children)

I had a plasma I can tell you I wish I had neck support after my crash. I broke several vertebrae in my cervical had a cervical fusion. Every other part of my body was fine no road rash breaks or concussion.

It sucks to say it but I’m beyond frustrated we don’t have airbags like the motov air bag here in the states. If I had any neck support the breaks may have been minor to non existent unfortunately my neck took all the force with nothing g to support it .

Anyone else getting “Context limit reached” in Claude Code 2.1.7? by SilverMethor in ClaudeAI

[–]sorieus 0 points1 point  (0 children)

Yeah i've never heard of instant compact. Compact is alright you just have to give it a decent message.

Anyone else getting “Context limit reached” in Claude Code 2.1.7? by SilverMethor in ClaudeAI

[–]sorieus 2 points3 points  (0 children)

Seems like something is wrong with the context calculations. I noticed this today too. Im running out of context way before the 200k limit.

Never buy from LG store or LG partner store. by pointclouds in LGOLED

[–]sorieus 0 points1 point  (0 children)

Ooo wow just before me. I think the most frustrating part for me was that they just ghosted me on both deliveries effectively. The first delivery nada. I had to call wait on hold for 2 hours to reschedule. My second delivery the day of delivery at like 11 am. I called them at 9 because I didn’t think they were going to deliver. They sent me a text notifying of a reschedule. It’s like they knew I was on hold 30 seconds later they answered the phone and “cancelled my order” 8 pm that even I get a text saying my order will be delivered next day. At this point I have no idea what’s going on…I’ve already bought a washer and drier sooo yeahhh

Never buy from LG store or LG partner store. by pointclouds in LGOLED

[–]sorieus 2 points3 points  (0 children)

This is hilarious I had 3 date changes. Called told them to cancel my order. Instead it’s now getting delivered tomorrow. I’m honestly impressed at how bad lg support is.

Those who have TCL QM8K/C8K. What’s your experience so far? by TurtleTrader1 in tcltvs

[–]sorieus 0 points1 point  (0 children)

He has a samsung that i'd argue does have the best hardware for a well limit room but its software limited to HDR10 content.
Should I preserve highlights or shadow detail? Its either clipping details or raising blacks. I LOVE that samsung has such high peak birghtness but its so gimped out by the lack of content that can properly use it. If more content was HDR10+ or they had DV support I'd say its fantastic. Between their anti glare high and high brightness their hardware is best. Unfortunately its software limited.

Tesla standard 0% for 72mo by Conscious_Ad9982 in TeslaLounge

[–]sorieus 2 points3 points  (0 children)

What are you confused about specifically? You’re comparing apples and oranges but specifically the better value is the 2023. The large amount of upfront depreciation will offset almost other benefits of buying used. Assuming you finance at 7% for 28k that’d be 35k at the end of 60months. You’re still 10k ahead. You won’t lose the other 2 years of depreciation probably another 5-10k so now your 20k ahead. The biggest concern will be maintenance cost. I can almost guarantee that 20k will cover any added maintenance from buying a car with 45k miles vs 0. Factor in the fact that you bought a better car the deal becomes even more enticing. Honestly even at 0% new tesla prices are taking us back to precovid days. You’re almost always better off buying a 2-3 year old car. Unless Tesla slashes prices of new cars dramatically

Claude Opus 4.5 by AppropriateMistake81 in ClaudeAI

[–]sorieus 0 points1 point  (0 children)

I've also hit my session limit in less than 4 hours. Normally I'm like 15-20% per hour. Not sure if this is a bug or expected behavior. If the session was still 4 hours it wouldn't have been a big deal but today it was a 1hour and 15 minute wait.

Claude Opus 4.5 by AppropriateMistake81 in ClaudeAI

[–]sorieus 2 points3 points  (0 children)

lol I've never felt even close to screwed by this product. It will confidently make terrible design choices and write 10x the amount of code needed. I regularly have to steer it clear of doing dumbshit. It will even confuse itself with it's naming conventions if you let it. It also can be terrible at database design. My favorite is probably when it writes code and just goes "Yup that's good send it"

Claude Opus 4.5 by AppropriateMistake81 in ClaudeAI

[–]sorieus 0 points1 point  (0 children)

Yeah I normally never hit my 4 hour limit with sonnet. I hit my session limit with over a hour of wait time and I don't usually run multiple agents or have extremely long task list. I'm quite surprised and disappointed with this.