[-] FizzyOrange@programming.dev 3 points 11 months ago

They are simpler, but they do not scale.

I don't think many of us need to worry about scaling beyond the size of Google or Microsoft.

[-] FizzyOrange@programming.dev 3 points 1 year ago

I agree. C2 continuity does matter for aesthetics sometimes, but not for a button.

[-] FizzyOrange@programming.dev 3 points 1 year ago

Even KISS. Sometimes things just have to be complex. Of course you should aim for simplicity where possible, but I've seen people fight against better and more capable options just because they weren't as simple and thus violated the KISS "rule".

[-] FizzyOrange@programming.dev 3 points 1 year ago

Clearly within the margin of error. Especially because they were obviously not just looking at Bulgaria.

[-] FizzyOrange@programming.dev 3 points 1 year ago

Almost every good content creator is only on YouTube.

[-] FizzyOrange@programming.dev 3 points 1 year ago

Nah Python is weird about static types - it only defines the syntax, not the semantics.

Ditch Mypy. Pyright is much much much better.

[-] FizzyOrange@programming.dev 3 points 2 years ago

Don't be an idiot.

[-] FizzyOrange@programming.dev 3 points 2 years ago* (last edited 2 years ago)

Impossible to say without more details. Did you try debugging it? See if the CSS file can load? Check the dev console?

[-] FizzyOrange@programming.dev 3 points 2 years ago

Easily above average code for Python. I'm going to pick on one method:

def _set_float_icon(self, is_floating: bool):
            """ set the float icon depending on the status of the parent dock widget """
            if is_floating:
                self.float_button.setIcon(self.icon_dock)
            else:
                self.float_button.setIcon(self.icon_float)

First, Python does have ternary expressions so you can

self.float_button.setIcon(self.icon_dock if is_floating else self.icon_float)

Second, what does this code do?

foo._set_float_icon(true)

Kind of surprising that it sets the icon to icon_dock right? There are two easy fixes:

  1. Use *, is_floating: bool so you have to name the parameter when you call it.
  2. I'd probably rename it to _update_float_icon() or something.

Also use Black or Ruff to auto-format your code (it's pretty well formatted already but those will still improve it and for zero effort).

[-] FizzyOrange@programming.dev 3 points 2 years ago

I'm not sure I'm convinced by their reasons for not creating a new language (i.e. PRQL). I used it a bit and it was fantastic. It has support for using raw SQL if you need to access really niche features.

Really the only problem is that it doesn't support mutation, or database-specific features (but you can use the raw SQL escape hatch in that case).

Still, this does look like a great improvement.

[-] FizzyOrange@programming.dev 3 points 2 years ago

Oo hello. Didn't know that's what you were doing these days! Hope it goes well, though I'd be nervous about a realistic business plan.

Anyway, yeah bit too late for Python.

[-] FizzyOrange@programming.dev 3 points 2 years ago

5 minutes? Jesus I wouldn't wait that long when there's a simple way to make your build 10x faster.

view more: ‹ prev next ›

FizzyOrange

0 post score
0 comment score
joined 3 years ago