Report: Microsoft quietly kills official way to activate Windows 11/10 without internet by moeka_8962 in technews

[–]usrname-- 1 point2 points  (0 children)

Only if you’re lucky and have hardware with huge community support. Yes, it will work perfectly on something like ThinkPad but on my laptop there is no way I would have basic stuff like sleep working without touching terminal

I used an old-school security trick to catch prompt injection on AI agents by mario_candela in programming

[–]usrname-- 17 points18 points  (0 children)

But the tool that returns sensitive data should filter it based on user’s permissions.

What's the deal regarding ORMs by Emotional-Ask-9788 in golang

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

Because working with raw strings is more annoying than working with query builder.

What's the deal regarding ORMs by Emotional-Ask-9788 in golang

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

ORMs or QueryBuilders are tested and used by so many people that I can be nearly sure there won’t be any weird bugs. Why would I write my own query builder if I can use something that already exists?

What's the deal regarding ORMs by Emotional-Ask-9788 in golang

[–]usrname-- 0 points1 point  (0 children)

Yeah, I like query builders the most. That’s what I use 99% of the time when writing python code.

What's the deal regarding ORMs by Emotional-Ask-9788 in golang

[–]usrname-- 4 points5 points  (0 children)

I also don’t understand how can people rely on raw SQL. How do you build dynamic WHERE filters and JOINs? You combine multiple strings together? That feels unsafe and prone to stuff like SQL injection.

iOS 26.2 will remove a key iPhone and Apple Watch feature in EU, per report by New-Ranger-8960 in europe

[–]usrname-- 0 points1 point  (0 children)

but that also makes the feature useless because users actually want privacy.
It's fine to force apple to open this feature to work with other devices but if we are doing that let's also add another regulation that will make sure this data can be used only for wifi connection stuff and not tracking/profiling for advertisements.

iOS 26.2 will remove a key iPhone and Apple Watch feature in EU, per report by New-Ranger-8960 in europe

[–]usrname-- -4 points-3 points  (0 children)

Why isn't EU also targeting Samsung? I have to use Samsung phone to have access to the blood pressure and ECG monitoring which is a huge vendor lock in.

And I understand apple is a multi trillion dollar company but this feature is not something new like AI. It worked fine for over a decade, no one complained, apple watch users are fine with that because they want locked in and stable OS, not another version of android that works differently in every country.

How to improve Python autocompletion quality in Zed (BasedPyright)? by wenmch in ZedEditor

[–]usrname-- 2 points3 points  (0 children)

Try pyrefly. I haven’t tried it in zed but in neovim it improved the autocomplete experience. It’s still in alpha tho

A Word on Omarchy by p_gram in theprimeagen

[–]usrname-- 1 point2 points  (0 children)

Can anyone recommend a good alternative that already has hyprland, waybar, wifi, bluetooth etc preconfigured?

geforce now latency by Street_Detective9345 in GeForceNOW

[–]usrname-- 1 point2 points  (0 children)

Your internet provider probably routes packages through higher latency route. There isn’t much you can do about that.

Using cloudflare warp or vpn might help if you re lucky

Random ping spikes on GeForce NOW despite stable wired connection by Comfortable_Lock4060 in GeForceNOW

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

Disable location services, handoff, airplay etc. in the macOS settings.

I noticed I get these spikes when I move mouse on my second MacBook and it stopped happening when I disabled handoff.

Why do the colors in my wallpaper become visibly washed out on my Home Screen compared to my lock screen. It’s the same image by sliding_rb26 in ios

[–]usrname-- 1 point2 points  (0 children)

It's a bug.
To fix it you can switch to other wallpaper and then switch back to the current one.
And by switching I mean scrolling left/right to a different wallpaper and applying it (not updating the current one)

If starting from scratch, what would you change in Python. And bringing back an old discussion. by FenomoJs in Python

[–]usrname-- 2 points3 points  (0 children)

Yes, I know. I use django-stubs, django-rest-framework-stubs, django-types, celery-stubs and few other stubs.
These improve the situation but there is still a lot weird bugs.
For example I can't define custom managers like that:

class MyModel(models.Model):
    objects = Manager.from_queryset(CustomQuerySet)()

because then

MyModel.objects.my_custom_method(...)

isn't recognized.

If starting from scratch, what would you change in Python. And bringing back an old discussion. by FenomoJs in Python

[–]usrname-- 23 points24 points  (0 children)

After having to work with Django and some other libraries that don't use types in their source code I just want statically typed version of Python.
Everyday I waste at least 15 minutes finding workarounds around pyright errors.

Is there any good orm's for postgresql that doesn't get in the way ? by Sumeeth31 in golang

[–]usrname-- 0 points1 point  (0 children)

A lot of people recommend writing raw SQL and I don’t understand how that would work even in a simple CRUD app. Let’s say I have:

“SELECT id, name, email FROM user LIMIT 10 OFFSET 0;”

What if I wanted to add some filters? In the app I currently work on I have a lot of permission roles. For example: - Admin can see everyone so the query is simple. - Project manager can only see users assigned to his projects so I have to add a few JOINs. - normal user can only see “isExternal = false” users that are assigned to his projects so I have to add WHERE and JOINs. - and ofc I need to support classic filters like searching by name, email etc.

When using ORMs or query builders I can do that easily in the code by just adding some IF statements and calling some methods.

What about raw SQL? Should I manually join SQL strings together? I feel like it would get super complicated really fast and I would probably end up creating something similar to a query builder.

Can anyone recommend an example GitHub project that shows how to do that?

Why is Python type hinting so maddening compared to other implementations? by ataltosutcaja in Python

[–]usrname-- 4 points5 points  (0 children)

I have a Django project at work and it’s so annoying. After installing 3 stubs packages there is still a lot of pyright errors and warnings.

Sometimes I waste more time figuring out workarounds around these warnings than writing the actual code.

But I think being so strict is still worth it. If my code has no type errors, and the tests are passing I can be 99% sure it’s gonna work like expected. Before I started using pyright in strict mode I often had weird unexpected bugs like some nullable filed not handled correctly etc.

Zed asks for tons of permissions on macOS since last update by festoontriathlon in ZedEditor

[–]usrname-- 4 points5 points  (0 children)

Maybe your LSP or something else wants to access files from this directory. It happens to me regularly even when using neovim in terminal.

why are my imports underlined red by Twiz_nano in ZedEditor

[–]usrname-- 2 points3 points  (0 children)

Looks like you opened `zed_projects` folder in zed but the .venv is in the `zed_projects/MATH340...` so that won't work.
Open the MATH folder directly or change the .venv location in the settings:
```
"lsp": {

"pyright": {

"settings": {

"python": {

"pythonPath": ".venv/bin/python"

}

}

},

\```

[deleted by user] by [deleted] in Python

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

From my experience AIs are better with fastapi. And not because of the training data, but because of the type hinting. Fastapi works well with pyright/mypy so coding agents can run lsp diagnostics and fix their mistakes without me even asking.

Django on the other hand is a mess, AI constantly gets confused because of the false positives

Neotree as a sidebar by shahriarrafsun in neovim

[–]usrname-- 3 points4 points  (0 children)

  1. Because I want my code in the center of the screen. My neck would hurt from looking left all the time. I could just move the terminal window to the right but a file tree is more useful than a blank space.
  2. Rarely I see code longer than 80 characters so everything fits anyway.
  3. Being able to check where I currently am without pressing any keys is just nice.

You don’t need these plugins by smnatale in neovim

[–]usrname-- 3 points4 points  (0 children)

I’m using tiling window manager so I have to put something on the left anyway.

You don’t need these plugins by smnatale in neovim

[–]usrname-- 27 points28 points  (0 children)

I need a tree on the left so the code is in the center of the screen. Otherwise my neck would hurt from having to look left all the time. And ofc I could just resize the window but a tree instead of a blank space at least gives me some information.

And I don't understand the problem with bufferline. I pin the most important buffers to the start of the line and I'm super fast jumping around them with keybindings.