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.
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).
Ah, that server. The name fits well. Glad they banned me a while back, it means I don’t have to see it anymore.
Anyway, no clue what OP is expecting to get out of this post aside from another ban.
if you don’t have a Windows program that runs Batch scripts with untrusted arguments
This only matters when running the scripts with user inputs passed as arguments to the command, which I can’t imagine being remotely common at all.
The hourly wage here seems below 1 dollar.
I’m surprised this is even legal. I mean, of course it’s fine to scam a bunch of desperate people looking to pad their resumes. Why wouldn’t it be?
Unless you have no other source of income, then I don’t see these making sense. Even then, consider if retail or food industry might be a better use of your time until you can find something better (unironically - they can be great experiences).
These days it’s all about Python, with AI being the hype and all. JS can at least try to compete.
Imagine changing your file extension from .js to .ts and calling it a fad. JS is TS. The difference is that TS does more (by actually doing stuff before runtime as a static analyzer, similar to eslint). If TS is a fad, then modern web dev is a fad.
Which, to be fair, it is.
This advice mostly applies to people who are less experienced and less familiar with just how complex HTML can be. As for other languages - if you’re doing regex on markdown, you’ll probably be fine (but you should verify if you’re writing something for the general case that must not fail). But in HTML’s case:
img
and link
end in
, but div
must end in a separate closing tag)If you’re trying to use Regex to parse a specific website’s HTML, you’ll be able to get what you want eventually, but as a general HTML parser, there will always be some website that breaks your assumptions.
If you’re writing C#, you could take a look into Source Generators. They’re supported directly by Roslyn I believe, and are pure C# instead of t4’s syntax. They’re often used with attributes to augment types, but I believe they can be used to generate sources on their own, and even read from a config file if you want to (or maybe even query the DB, if that’s something you want to do at build time for some reason, though I’ve never tried this).
IDK how big businesses roll
From what I’ve seen from two of them, they tend to stay away from programming. I’ve seen managers review code, but very rarely contribute any.
I also enjoyed Zola. Ended up switching off of it, but I think it’s a great way to directly jump into writing content. The only reason I switched off was because I wanted more control than it would provide, but for most cases, I think it’s completely fine.
Framework-wise, I really like Astro. They have some themes you can explore here.
I’m not sure if any themes support charts, graphs, and diagrams out of the box, but they use remark and rehype to convert markdown to html, so you could look for a rehype plugin to do it and add it to your config if you want. For example, you could try using rehype-mermaid
to generate diagrams using mermaid.
If you’re looking to contribute to the standardization process for web standards and propose a new idea, you could try looking into discussion channels for W3C. From my understanding, they are the ones who maintain the ActivityPub/ActivityStreams standards, though I’ll admit I don’t know much about the process. IETF also seems to be responsible for the WebDAV RFC. You could try reaching out to them to see if they still have interest in it or a place to discuss it.
Otherwise, I don’t know of any communities specific to that topic, but you could always build your own extension to WebDAV anyway. Things are created when people build them, so be the one to do it and popularize it!
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.