Would it work to write the query as a common table expression, then select your columns from that table and join it with a count(*)
aggregation of the table?
Would it work to write the query as a common table expression, then select your columns from that table and join it with a count(*)
aggregation of the table?
I think it’s good to document why things are done, but extracting things out into another function is just documenting what is being done with extra steps. This also comes with a number of problems:
//
or #
would have made the code just as readable.If those functions are huge units of work or pretty complex, I can agree. For most cases though, a simple code comment should do to explain what’s going on?
While impressive, a minifier can bring it down to 1 line of JS! I do like that this can function as a reference for making simple canvas-based games though.
People talk at the urinal?
I also avoid query syntax generally because I find it hard to map to method syntax with more complex queries. It’s a cool concept though, despite it being painful to use.
For library code - yes, you’d usually want to direct users to the correct way of using the library, so you’d be more likely to come across fallible build
functions or a bunch of type parameters to constrain when it can be called.
For applications - honestly, it’s your code, so do what makes sense to you. Using a build function can help you ensure your settings were fully configured before using them, but it’s up to you if that’s the direction that makes the most sense to you. One benefit is you only need to perform the check once, but the downside is having another “built” type that you need to keep in sync with the original type. You can also look at libraries like derive_builder
if you want to have your builder generated for you to avoid needing to manually update two separate types.
C# also has a built-in query language (LINQ). I think it might just be simpler to group them together to avoid nuances like these, though I don’t think anyone would complain about not seeing LINQ on a query language list either.
I wonder how many people learned Lua for this reason (CC and friends).
As much as I dislike Nintendo, the Switch is an excellent console despite its hardware. It’s no surprise that it’s been as popular as it has been for so long. These days though, there are a lot of competitors in the handheld space that have much better hardware, so it really maintains its position due to a combination of branding and the game exclusivity.
I’m curious what their next console will be. I probably won’t buy it, but I wouldn’t be surprised if it was also a huge success.
Speaking as someone with a MTF close friend and NB spouse, but the term used in the article is the term everyone around me used when I was growing up. That term may be obsolete now, and if so, the author simply needs to be informed. There’s no need to assume they meant harm by it.
If they knowingly used a term that may offend, then that’s of course a separate issue.
I’m not sure which game this comment is in context of, but steam reviews showcase the issues pretty clearly. For example, I went on the steam reviews for MTGA at one point for fun and saw a comment complaining about there not being enough white male masculine looking avatars. I’m not sure how Gideon Jura (literally the definition, even in cards, of a masculine white guy) and Garruk are not masculine enough for this person lol.
Most likely, from how the comment read, they were complaining about the female portraits and portraits with non-white characters. I’m assuming they missed the NB character portrait (Niko Aris) since they didn’t specifically call them out.
I also remember back when Horizon: Zero Dawn came out there were a lot of people complaining about a female MC. Personally, that was one of my favorite parts of the game since it gave a non-traditional perspective of the story in my opinion. Maybe some people disagree, and that’s fine, but giving a game a poor review just because the MC is female is honestly just a dishonest review of the game.
You are not entitled to my money.
I don’t think the article claimed anyone was, at least from my read of it. It’s your loss if you refuse to enjoy games over such a petty reason though.
It’s also honestly just childish to give a game you haven’t played a bad review for having a more diverse cast. The main character is literally on the box art - if it bothers you, then the game is clearly not for you. It’s like me reviewing an otome game poorly because I don’t like otome games.
In addition to 1:many, many:many, and many:1 (which is just 1:many but looking at it in the other direction), you also occasionally see 1:1, for example if you want to augment a table with additional data. This might be done by having your foreign key also be your primary key in the augmenting table, since that would also enforce a uniqueness constraint on the FK as a result.
Also, probably unnecessary to mention, but you can also have “0 or 1” relationship (meaning one side is optional but capped at 1). These are technically separated from “1” relationships usually when you get into all the theory. An example of this might be a “0:1” relationship using the above augment table, but where the augmenting table isn’t required to have a row for every row in the augmented table. (A 1:1 constraint can be enforced, for example, by having an additional FK in the augmented table pointing to the augmenting table.)
This sounds like a nightmare for production lines. Items on belts just randomly turning into spoilage? I hate thinking about how this will break so many common factory setups, and I like this change just as much for that same reason. Just filtering out spoilage at the end of a belt won’t be enough for some designs, especially when 3+ ingredients are involved in the recipe (so two input belts). It’ll be interesting to come up with new designs that can filter the inputs mid-belt to remove the spoilage, since it’s inevitable if your inputs come faster than you can process them.
Can’t wait to see the update.
To add - blocking the main thread on a long running task in the browser can make the page unresponsive. There’s not really a way, as far as I know, to “block until a promise completes”, which might be the source of the frustration. It seems to me that was intentional by the ones who designed this function.
If they are mutually exclusive special cases, using an enum like another comment mentioned makes sense, and can limit the special cases to one field. You can use an enum of strings if you want it to be more readable.
As for how the data is represented, only including the special case field when there is one makes sense as well. Keep in mind JSON is also a flexible format - you can even have the array contain mixed types, like strings for simple licenses, and objects for more complex licenses. That can reduce the size of the JSON document quite a bit, if that’s an option.
If you want to use it in your start menu, there are some options. I know Start11 can use Everything, for example (but isn’t free - there may be free options out there, but I haven’t looked).
Otherwise, most of what I’ve seen are CLI applications. Is there anything specific about Windows you’re hoping to see a replacement for? For me, search and settings (why the f are you advertising to me in the f-ing settings?) are the worst offenders, but settings is kinda locked in for the most part unfortunately.
We have infused AI into every layer of Windows
I sure hope not. I don’t want Windows to just decide to delete my hard drive because it feels like it.
We are introducing Windows Semantic Index, a new OS capability which redefines search on Windows and powers new experiences like Recall.
You could also improve Windows search by contracting with voidtools and integrating Everything. While you’re at it, maybe ditch the bing searches, and other useless search results?
Anyway, the rest of the article seems to go into actual dev-oriented details, and there’s some interesting bits like enabling certain AI acceleration features on the web (probably only in Edge though…), for what that’s worth.
I feel like I see this question come up now and then across the communities I’m in, and there’s always a debate over search engines lol. Anyway, to answer the question, I use Kagi for its custom rankings (and, more recently, Wolfram|Alpha integration, which I’ve found more useful than I expected it to be).
Pushing HTML even further, one could say it’s a declarative programming language that programs a UI in a mostly-stateless manner (inputs aren’t really stateless but you can argue the state is provided by the UI rather than managed by HTML).
I’m not sure I’d make this leap myself though, I have a hard time classifying it (or any other markup language) as a PL. As far as I am aware, you can’t really program a state machine with pure HTML, though you can accept inputs and return outputs at least.