TerrorBite :veripawed3:

I’m a lion from Australia! (he/him)

#nobot (please do not index this profile in search engines)

  • 0 Posts
  • 39 Comments
Joined 6Y ago
cake
Cake day: Aug 30, 2018

help-circle
rss

@Lynxtickler ahh, I misunderstood what you were referring to. Didn’t realise you were talking about JSON Schema and not the JSON syntax itself.


It’s the other way around. The YAML schema supports JSON because YAML was designed as a superset of JSON.

@Lynxtickler @canpolat


Oh absolutely. I can think of several situations where that wouldn’t work well or at all, for example, a switch statement that sets up variables to be used in the rest of the function.

@zib @UnRelatedBurner @programming


Also, good luck using switch without any breaks, but I’m guessing that’s not quite what your teacher had in mind.

The teacher, probably: “You must always put a switch in its own function! Then use return at the end of each case.”

@zib @UnRelatedBurner @programming


@btaf45 tagging @programming so that this federates properly from Mastodon to Lemmy



@btaf45 in my case, we as a team could have done that, because we didn’t have management dictating how we did anything. It was our choice to do what worked for us, and it was a valuable tool for dealing with whatever got thrown at us.

Now I’m working in a different place that dictates Agile and Scrum to be done Their Way, on top of a project that’s largely waterfall-like to begin with, and I’m starting to see why people say it doesn’t work.

It works, BUT, only when you’re using it as the right tool for the right job and not when management decide to misapply it as a hot new planning methodology.


@btaf45 @mspencer712 The whole point of Scrum is to use the retrospective to stop doing what doesn’t work and start doing what does.

At one point, when my team’s workload changed to less-timeboxable work, we threw out the entire concept of sprints and just used kanban instead, and stayed like that for a year. We still did retrospectives on the old sprint cadence though.


@verdare @lysdexic they are, but you have to be an enterprise customer.

https://ubuntu.com/blog/real-time-ubuntu-is-now-generally-available

https://learn.microsoft.com/en-us/windows/iot/iot-enterprise/soft-real-time/soft-real-time

RTOS are not going to become consumer operating systems, because there’s too much value in selling it as a capability to enterprise customers (who are largely the consumers who REQUIRE a RTOS, rather than it merely being a convenience).


@Andy @BeanCounter Given how many of these start with “Lemmy” you could simplify this to:

https://(lemmy\\.(?:run|(?:fmhy\\.)?ml|dbzer0\\.com|world|kde\\.social|ca)|lemmygrad\\.ml|lemdro\\.id|beehaw\\.org|sh\\.itjust\\.works|(?:sopuli|mander)\\.xyz|zerobytes\\.monster)/c/(.\*)

Or just assume that anything matching https://(lemmy\\.[^/]+)/c/(.\*) is a Lemmy server, which will probably be correct.

Edit: some kind of interaction between Mastodon and Lemmy has doubled all my backslashes. That is not intentional.


@sbstp @bouh I can just see people giving fecetious answers to this question.


@nthcdr this assumes that people write sensible and thorough commit messages, instead of brief five-word ones or, say, song lyrics. Both of which I’ve seen.

I at least try, except maybe for the other day where my commit message consisted entirely of an exasperated “why”, followed by a revert.

That being said, every commit message where I work is required to contain a ticket number (and the server will reject the push if you don’t) so at least there’s that for context.

@257m @programming


@TehPers I really wish Python had a satisfying way to do interfaces.


Python has had syntax support for type annotations for a while now. The Python runtime doesn’t enforce the typing at all, but it can be enforced by a linter or by your IDE. And I believe you can introspect the type annotations at runtime, because they are actually part of the syntax.

There’s even an alternative way of doing type annotations through specially formatted comments, just in case you might still need to write code that is backwards compatible with Python 2.

@escapesamsara @navi @programming


If your code files don’t contain more lines of comments than lines of actual code, then you’re doing it wrong. (For Python, docstrings count as comments)

And your comments shouldn’t say what each line of code is doing. If you can code, then you can already tell what each line is doing by just reading the code. The comments should explain WHY it’s being done this way, or HOW it’s being done, or highlight some pitfalls that might snare a future developer, and generally just give some higher level context to a line or block of code.

@257m @programming





@wth I have worked with GTK3 myself, and once I got used to its quirks, actually found it quite nice to work with. I was writing my code in Python too, which added some extra challenge, but the GObject introspection took a lot of the pain out of interoperating with what’s basically a C library.

However, I’m aware that GTK has a bit of a reputation. The look and feel is great on Linux desktops that use it natively, but I do remember it looking pretty ugly cross-platform.


@wth @Spyros We need one universal graphical tool kit that works everywhere!

GTK: Hi, I heard you’re looking fo—
Me: NOT YOU


@snowe It’s got its quirks. For example, if I am replying to someone who’s not on programming.dev then I have to make sure to tag @programming (or another account on the instance) in order for my post to still federate to your server, otherwise only the person I’m replying to would see my reply and it wouldn’t show in comments.

I did discover that adding the tag as a trailing reply to a missing comment thread will cause the entire reply chain to federate, so that’s neat.










Hi @rikudou, your bot incorrectly flags for Mastodon users. I have to tag the community in my post, or it won’t federate. And Mastodon tags seem to look like URLs to the bot.

@programming



@Zikeji It’s possible for TLDs to have A records, and for a while there were a few that did. But ICANN forbids top level A records, and I wouldn’t be surprised if they forbid top level MX records as well.

Anyway, you would literally enter the address as “email@com.” including the trailing dot, which represents the DNS root that contains all the TLDs. You can also think of the trailing dot as an indicator of a FQDN (instead of a hostname within your local search domain).


I am of the opinion that regex for email address is a bad idea. The only two things that you need to check an email address are:

Does the address contain an @ symbol?
Is there a dot to the right of the @ symbol?

Then just try to deliver to it, and let the MTA do the rest.

Email addresses can be complicated, and there’s plenty of valid addresses that can be excluded by attempts at regex validation.

@custom_situation @yoavlavi


@words_number @Sibbo that was one hell of an opening sentence to misread.


@varsock yep! Turns out I could just follow @programming and it boosts every post and comment onto my timeline.

Though my instance doesn’t support markdown, so I don’t get to see any formatting unless I look at the original thread (maybe @Tiwy57 will upgrade us from Mastodon to Glitch-soc someday so we can have that?)




In what way? Python has type hinting, but it’s purely for linting and is not enforced at runtime. Python has always had dynamic duck typing.

@theherk @programming


@Zagorath I see a lot of detergent products advertising “no pre-wash required” on their packaging, at least here in AU.