

The code is open and there for you to read. What you’re actually saying is you’re too lazy to read and understand it because the world owes you something. amirite?
You’re going to be horrified to discover the software versions the military use.
mentioning pointers, time sharing, endianess, word size, registers
You’re making me hard! Don’t stop!
It actually leads to a fantastic product and more free time because you’re not having to babysit kids who think the world owes them something because they can code ‘hello world’ in python.
Oh the irony. What’s gatekeeping about not wanting rubbish code in your repository? Lack of knowledge is self-gatekeeping.
The ‘wah wah…boomer’ cries are…cringe. Either step up with the knowledge and action, or don’t bother and cry “gatekeeping”.
less hard than running debian or redhat back in the 90s
Zoomers will never know the pain… and the joy and actually getting it installed!
Stable means not updated.
Oh no! I haven’t got the latest push from 30 seconds ago. My operating system is so out of date and I’m so uncool!!11
nvidia GPU
No flavour of Linux works well with them. That’s the joke or something.
If someone is accepting the fact that shit might go sideways, is willing to learn through experiencing issues first-hand or simply likes to spend time fiddling with their OS to find the perfect setup for them - that should be the Arch- and Arch-derivatives audience.
But once you leave the comfort of your parents house, time is money and no one has a spare twelve hours to get a functional OS together when another distro would do it in minutes.
Although Ive been using linux for 2 years now, and i still want an installation manager with sane defaults.
Have you heard about our Lord and Saviour, Debian?
I remember installing Debian before Ubuntu was born using an ncurses type interface and spending five minutes selecting the packages I want to install, (only for it to tell me that one package was incompatible with another and the installation couldn’t proceed!) but being able to do it somewhat graphically made it so much easier than simply by text.
An OS stays out of your way and lets you do what you need to do. Having to essentially create the basics yourself is unproductive and a waste of my time.
I’m pretty sure “Power users” don’t use Ubuntu.
And this is how I see Linux quickly unravelling and planned insecurities creeping in over the next decade or so.
In the case of this gist, it’s premature optimization. Generally it’s necessary cuz new implementations come along often.
That sounds terribly inexperienced. That’s exactly what updates to code are for. You cannot manage all kind of, sort of similar but different libraries with one code base. It would be horrific to even consider it.
By embedding the class, creates a limitation that prevents abstractions or other implementations of each component. Imagine every suggestion in this conversation thread is another variation with a separate implementation.
If the user wanted to create a new FoldableDockWidget
with a different title bar, they’d extend the FoldableDockWidget
class and override the Titlebar method in their extension of it. I understand your point, but isn’t it over optimisation?
The widget class belongs to the FoldableDockWidget class until it doesn’t. Then a refactor is needed.
One line of instantiating code. I can’t imagine where or how the custom title bar would be used outside of the Foldable Dock Widget class though. That’s probably the real reason why I made it a sub class. Not how I’d do it in other languages, but in Python? I’m trying it out!
Hardwiring a particular implementation of the Windowing python wrapper is necessary. They have slightly different implementations. If something magically new comes along, then, the code is updated. Again, over optimisation here which is unnecessary.
The code in the process guard is just sample code to demonstrate use of the class. No big deal. It’s separate to the class and not to be imported because… this is a gist of sample code!
Thanks for the compliment! Python isn’t my first language and it’s difficult to be able to switch style from one language to another!
I always find it difficult to choose when to use ternary statements. Sometimes, for something quick and simple, I will, otherwise I’ll be explicit. This is more of a readability issue than anything else. And I find the ternary statements quite verbose compared to other languages by using the words if/else rather than shorthand symbols.
You’re absolutely right about the set_float_icon and corresponding method. Coding’s an iterative process and that’s a byproduct. I think set_float_icon()
along with complimentary methods like set_docked_icon(), set_minimize_icon(), set_restore_icon()
etc may be easier to use / remember wtf it does in six months time!
Thanks for the black / ruff suggestion. I’ve never heard fo them, but I’m about to go look for them.
Thanks for your response.
should never embed classes within other classes)
Why is this? I have to admit that coming from other languages, it feels dirty, but is there a pythonic good reason for this? The class ‘belongs’ to the FoldableDockWidget class, so I figure it’s the best place to put it.
Thanks. I wondered why I instinctively text-transformed the title of the widget to uppercase! I commented it out thinking perhaps it doesn’t look grammatically correct! Reduced the font size a bit and I think it looks a heck of a lot better now!