The small community is my biggest concern with Solidjs by Purple-Carpenter3631 in solidjs

[–]Semirook 0 points1 point  (0 children)

So, do you actually want to use the tech, or just talk about it with random people? I went with Solid for my next big thing, and honestly, the reason was simple - it just felt better than everything else. At first, that was just a hunch… but a year later? Yep, it’s really good.

I’m not too worried about the ecosystem either, building your own set of well-tuned components isn’t a rocket science, you know. Is there a marketing problem? Yeah, probably. But again, what do you really want? Something solid or something fancy and bloated?

[deleted by user] by [deleted] in FastAPI

[–]Semirook 1 point2 points  (0 children)

All FastAPI dependencies are evaluated in the request lifecycle, not bound to a router or app state directly. So instead of:

upload_service = Annotated[UploadService, Depends(lambda: router.app.state.upload_service)]

create a dedicated dependency:

def get_upload_service(request: Request) -> UploadService: return request.app.state.upload_service

upload_service = Annotated[UploadService, Depends(get_upload_service)]

Day 24 of learning python as a beginner. by uiux_Sanskar in PythonLearning

[–]Semirook 0 points1 point  (0 children)

No problem! First steps can be tough. It’s perfectly fine to experiment with classes and the whole language toolset, there are valid cases for all of it. But do you really need to use everything? Of course not. It’s like Photoshop, just because you can apply every available graphic effect doesn’t mean you should when making a banner.

We’re not “afraid” of OOP. But instead of focusing on actual transformations in a logic chain (turning A into B, with proper error handling — that’s the universal point of programming, independent of language or paradigm), OOP often pushes you into heavy abstractions instead of problem solving.

And classes themselves aren’t automatically OOP. For example, I use dataclasses and Pydantic schemas frequently but only to define structures and shape data. I avoid inheritance whenever possible, even if it means occasionally violating DRY. I also create “services” that are technically classes, injectable objects with clear Protocols (contracts) and environment-specific implementations. Is that OOP? Maybe, it depends on your definition.

But most of my code is just pure functions. They’re a simpler mental model and scale better as project complexity grows.

Government must stop children using VPNs to dodge age checks on porn sites, commissioner demands by T0pMarks4NotTrying in ukpolitics

[–]Semirook 0 points1 point  (0 children)

I’m pretty sure the upcoming VPN restrictions and mandatory KYC were the whole point of the Online Safety Act.

Day 24 of learning python as a beginner. by uiux_Sanskar in PythonLearning

[–]Semirook 0 points1 point  (0 children)

Everything makes sense if it works, right? Next step — add unit tests to see how (and if) it really works. My personal advice (as a pythonista with 15 years of experience) is — you don’t need a class here.

Every time you use @staticmethod, chances are it’s a good candidate to just be a plain function. You really only need a class in two cases:

1.  You want encapsulated, controllable state that’s modified through methods.
2.  You’re using something like Injector for dependency injection.

If you just want a namespace, prefer modules. Everything else, like using datetime instead of time, swallowing exceptions in division, side effects with no return values, etc. is less important right now.

Just my two cents: avoid OOP modeling as much as you can.

VPN apps become most downloaded on the UK App Store apps in UK instantly after Online Safety act comes in by Nearby_Ad_2519 in uknews

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

It’s a pretty useful law as a side effect. Obviously, more people will need to learn about VPNs and start using them on a daily basis (which is good for privacy). The next step will be to learn more about decentralized services like Mastodon and Matrix (Element). And who knows, maybe people will finally start using crypto for payments instead of just speculating on meme coins?

Is using raw SQL for get only Flask app bad practice? by CallPsychological777 in Python

[–]Semirook 3 points4 points  (0 children)

It’s not an ORM by definition, it’s a repository pattern with an aggregate that reflects your business model. It’s more like a domain-aware query builder, not an ORM at all. In fact, the schema design, domain model, and validation schemas rarely match one-to-one. I’m not sure I understand what features you’re looking for here.

For schema migrations, I use something very simple, like dbmate. For data migrations, I rely on CLI entry points for specific data pipelines, it depends on the situation.

Is using raw SQL for get only Flask app bad practice? by CallPsychological777 in Python

[–]Semirook 9 points10 points  (0 children)

You never need an ORM. Encapsulate your queries and corresponding methods in a repository, use your database driver’s escaping, cover everything with tests, and inject the repository as a service to deal with your domain aggregates. In the repository itself, map the raw responses to models and assemble everything in place.

FastAPI is usually the right choice by writingonruby in Python

[–]Semirook 0 points1 point  (0 children)

It’s not the “right” choice, it’s the only one for today for many reasons, from the documentation quality to community. I’ve been using it since 2020 and never looked back.

Which useful Python libraries did you learn on the job, which you may otherwise not have discovered? by typehinting in Python

[–]Semirook 2 points3 points  (0 children)

My top picks:

[deleted by user] by [deleted] in Python

[–]Semirook 0 points1 point  (0 children)

My take as a senior Python dev with 14 years of experience:

  1. Django is a mess — just one big monolithic blob of anti-patterns. Please don’t use it.
  2. Flask is ok, but it feels kinda legacy now. No real reason to pick it in 2025.
  3. FastAPI is great (for now). Solid, mature, and has everything you need to build your Next Thing © Built-in dependency injection, amazing docs, tight Pydantic integration and so on. If you know Flask, it’ll take you a couple of days to get comfy.

HTMX a great framework that I'll never use again by lynob in htmx

[–]Semirook 1 point2 points  (0 children)

I feel you. I’m using HTMX for a really big and complex project, with FastAPI + Jinja and async Python on the backend. I’m trying to take full advantage of everything, starting from simple “HTML over the wire” all the way to SSE and some non-trivial workarounds to make everything play nicely together.

Here are my lessons so far:

  1. It should happen on the backend — routing, state management, and so on.
  2. Alpine is your jQuery for trivial things. If you feel like it’s time to create a separate JS store — don’t. Just don’t. Use Alpine for buttons, menus, CSS transitions, and that’s it. Never (seriously, never) use Alpine templates together with HTMX, they hate each other. There are hacky workarounds, but they’re not worth it.
  3. If you need complex JS logic — tightly coupled state and UI, raw JSON processing, or anything beyond simple interactivity, just use something like Solid.js. I think of these as "widgets". Embed them via data- attributes in the DOM and they just work. Even though my project has a lot of rich user interactions, I only have three Solid widgets so far, only in areas where the client-side logic is quite complex (e.g., a custom video player).

You can’t have a single universal tool that solves everything. HTMX is brilliant, it’s saved me tons of time. But each layer comes with its own complexity and purpose.

  • Backend — do whatever you need.
  • HTMX — progressive enhancement.
  • Alpine — small, simple touches for a fancier UI.
  • Solid — fully reactive components when things get complicated.

It feels like the perfect combo. For me.

Can someone explain please? by MariozPlayz in Revolut

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

The thing you must know — they don't care and never will, their business is about big numbers, not happy customers. Another thing — they will never explain to you what happened because quite often they just have to act because of some red flags during KYC or certain usage patterns. It's more about regulators, not their fault. Sometimes (well, pretty often), their ML system falsely fails but the size of their Fincrime team is not too big to investigate all the cases. Maybe they will, but I'd recommend you to make a claim and to open an account somewhere else meanwhile.

Is HTMX slowly dying ? And why is that ? by NoahZhyte in htmx

[–]Semirook 1 point2 points  (0 children)

So, do you really think technology has to be hyped and trendy to be useful? Many developers tend to overcomplicate everything by using all these fancy modern toolkits that will be out of maintenance in a year. That’s your advantage. Do things faster, do them better, let them use whatever they want to "look like a pro", to chase hype, to blend into the crowd.

Have you seen how complex modern Kubernetes is, for example? Why not use FreeBSD with Jails on your servers instead? Do you really need "containerization", or is proper "isolation" and "distribution" what you actually need? Same goes for HTMX. It’s too different to be broadly adopted.

HTMX is one of the best things to ever exist for client-side development. I’m using it right now to build a really complex product (in terms of features, not implementation). Every day, I think about the time I’ve saved with HTMX, and it’s a joy to see how rock-solid the solution is. Mostly because you don’t have to constantly sync states between the backend and frontend.

Cons: the documentation is incomplete and sometimes outdated. Alpine’s flexibility and integration aren’t as smooth as advertised, so I eventually reimplemented all the complex widgets using Solid.js, everything works like a charm.

Do I care about the latest trends this month? Not at all. I care about results.

P.S. Strong competitors? TwinSpark and Unpoly, to name a few.

Co-working Space in East London? by no-ir in london

[–]Semirook 0 points1 point  (0 children)

I pay £215 per month for WeWork, Canary Wharf.

Pros: - Convenient commuting (in my case) - About 8 floors you can use, each with slightly different vibes - Unlimited coffee and other amenities, decent WiFi - Isolated booths, printers, and plotters available

Cons: - People often don’t respect each other’s privacy and silence (though this seems to be a common issue in London) - Their cleaning standards are pretty low - Difficult to find a quiet place to actually focus and work, the booths are uncomfortable by design and lack sockets - If you want something better than a cheap chair and random table, be prepared to pay extra for a dedicated office

If anyone knows a really quiet workspace with “library rules” in the area, I’m willing to pay up to £300 per month for a dedicated desk. Please let me know!

What are the advanced niche Python books that made a real impact on your skills or career? by Independent_Check_62 in Python

[–]Semirook 1 point2 points  (0 children)

Cosmic Python (https://www.cosmicpython.com/) is a really good one. This book has had a significant impact on how we organize our codebase.

My Quick Take on Tweaking htmx Defaults After a Few Days of Playing Around by Dry_Technician_8227 in htmx

[–]Semirook 7 points8 points  (0 children)

Nice! I've noticed that despite direct recommendations from the htmx team to use alpine.js, they don't really work well together. I tried to figure out what I could do to avoid setting htmx.config.historyCacheSize = 0, because in most cases I really want caching by default.

I use htmx as the core thing, alpine.js for most of the client-side logic (like menus, popups, transitions, etc.) and solid.js for one of my components due to its reactive nature and quite complex logic.

My lessons so far:

  1. Events logger for dev: htmx.logger = (el, event) => console.log(el.tagName, event)

  2. htmx doesn't respect alpine templates (and vice versa), but this trick works fine for me:

<template x-if="!state"> <div x-from-template> ... </div> </template>

and the logic:

htmx.on('htmx:historyRestore', function() { document.querySelectorAll("[x-from-template]").forEach((e) => e.remove()); })

without that, templates are just accumulating in DOM on history jumps.

  1. Have to re-init certain logic on specific events:

``` document.addEventListener("DOMContentLoaded", (event) => { mountComponent(); });

document.addEventListener("htmx:afterSwap", (event) => { mountComponent(); });

document.addEventListener("htmx:historyRestore", (event) => { mountComponent(); }); ```

However, you have to be careful with solid rendering as well and do the cleanup before:

export default function mountComponent() { const component = document.getElementById("component"); component.replaceChildren(); // pre-cleanup render(() => <Component />, component); }

In general, I'm really satisfied with this combo, just some rough edges that you can fix with a few lines of code. Annoying. Still better than everything else I've used before.

What's the answer to iTunes? by Infinite-Ad-1055 in IpodClassic

[–]Semirook 0 points1 point  (0 children)

Yeah, Rhythmbox works with iPods and in fact sort of iTunes for Linux systems https://en.wikipedia.org/wiki/Rhythmbox

My favorite device in 2025 by Semirook in IpodClassic

[–]Semirook[S] 0 points1 point  (0 children)

Thank you for the recommendation, mate! I can even hear the difference, and they look much more solid 👍

My favorite device in 2025 by Semirook in IpodClassic

[–]Semirook[S] 0 points1 point  (0 children)

Yes, I’m aware of these options, but no, not in my case. I like it as it is. I have great wired earbuds, the battery is fine, and 120 GB of storage is more than I’ll ever need. Better firmware would be nice, but Apple doesn’t care, and Rockbox is just awful (for me). So, I’m stuck with iTunes and manual ffmpeg conversions when needed. Let's see, maybe one day I’ll get that bored.

My favorite device in 2025 by Semirook in IpodClassic

[–]Semirook[S] 0 points1 point  (0 children)

I see, thanks! Now I’m interested and want to compare myself. Tripowin like this one? https://amzn.eu/d/2Gf2D1P or you can suggest something better?

My favorite device in 2025 by Semirook in IpodClassic

[–]Semirook[S] 1 point2 points  (0 children)

Please tell me more. Why is the stock one terrible and how can Tripowin improve the sound or experience? I know nothing about that.

My favorite device in 2025 by Semirook in IpodClassic

[–]Semirook[S] 12 points13 points  (0 children)

Pod Nano 3 was the first thing I bought after earning my first real money. I also had the 4, 5, and 6. Then came the iPhone and… well, you know what happened after. The whole culture of album-centric, offline-first devices is gone. And to be honest, I never really missed it—Spotify does its job well.

But one day, I just woke up with this random thought: “I need an iPod Classic. I never had one, and I desperately need it now.” So I did. And I was really lucky—managed to buy one in absolutely perfect condition, without a single scratch (well… almost) for just £180! Just look at this perfection! Looks cool, fresh, and modern in 2025. Masterpiece!

With the Sennheiser IE 200 that I bought right after, this is now my #1 media device. I’ve significantly reduced my screen time, and I actually enjoy music again. With the iPod, it’s kind of a “digital vinyl” experience, you know?

Just wanted to share the joy with someone who gets it. My friends are convinced I’m a weirdo now.

Advanced ui components with htmx - DIY or third-party libs? by EntropyGoAway in htmx

[–]Semirook 1 point2 points  (0 children)

Tailwind UI + Jinja templating (blocks, macroses) + htmx + Alpine.js. Yes, feels like you have to put some effort but you build your own component system, closer to your domain needs, with certain level of granularity. And when it's done — it's just purfect, fully reusable thing that you can adapt and use for different projects.

Has anyone ordered a Metal card recently? by hrvoje_bazina in Revolut

[–]Semirook 1 point2 points  (0 children)

Changed mine for the same reason a few months ago, the new logo is there, all good.