740 karma · joined August 11, 2023
> Although request message framing is independent of the method used, content received in a GET request has no generally defined semantics, cannot alter the meaning or target of the request, and might lead some implementations to reject the request and close the connection because of its potential as a request smuggling attack (Section 11.2 of [HTTP/1.1]). A client SHOULD NOT generate content in a GET request unless it is made directly to an origin server that has previously indicated, in or out of band, that such a request has a purpose and will be adequately supported. An origin server SHOULD NOT rely on private agreements to receive content, since participants in HTTP communication are often unaware of intermediaries along the request chain.
QUERY is a new option to help avoid some of those downsides.
The semantics are important. GET APIs are expected to be safe, idempotent, and cache-friendly. When you are unable to use GET for technical reasons and move to POST, suddenly none of the infrastructure (like routers, gateways, or generic http libs) can make these assumptions about your API. For example, many tools will not attempt to put retry logic around POST calls, because they cannot be sure that retrying is safe.
Having the QUERY verb allows us to overcome the technical limitations of GET without having to drop the safety expectations.
> Performance tests are conducted using specific computer systems and reflect the approximate performance of MacBook Pro.
Not to invalidate your experience, but you shouldn’t need to memorize too much to use the common command line tools (although it does always help to have more experience using them).
I recommend always keeping a second terminal session open, purely for referencing man pages. You should be able to see most options easily, or be able to grep for the instructions you need.
The tight integration between documentation within the CLI, coupled to the exact software version you have installed, helps immensely when invoking CLI tools.
For the common linux tooling, found in most distros (e.g. coreutils or common busybox ops) the documentation in man pages is quite excellent.
The future is here.
Over time, jobs start taking long enough to the point where you need to split them. Separate jobs are assigned slices of the original batch. Eventually, there are so many slices that you make a Jenkins job where the sole responsibility is firing off these individual jobs.
Then you start hitting the real painpoints in Jenkins. Poor allocation of jobs across your nodes/agents, often overloading CPU/Mem on machines, and you struggle to manage the ungodly interface that is the Jenkins REST endpoint. You install many Jenkins addons to try and address the scheduling problems, and end up with a team dedicated to managing this Jenkins infrastructure.
The scaling struggles continue to amass and you end up needing separate Jenkins instances to battle the load. Any attempt at replacing the Jenkins infrastructure goes on standstill, as the amount of random scripts found in Jenkinsfiles has created an insurmountable vendor lock-in.
You read a post about a select-for-update job scheduler and reflect on simpler times. You cry as you refactor your Jenkins Groovy DSL.
As a general rule of thumb, I only start forcing kwargs once I'm looking at above 4-5 arguments, or if the arguments are similar enough that forcing kwargs makes the calling code more readable. For a small number of distinct arguments, forcing kwargs as a blanket rule makes the code verbose for little gain IMO.
Can you explain how you came up with this solution? Rust docs code-examples inspired?
At first he seemed mildly annoyed but mostly ignored it. You couldn't always hear it depending on what song was playing, so that helped keep it hidden for a while. Fast forward one week, we came back from lunch to find that the guy had disassembled almost everything in his cubicle before finding it. He angrily held up the radio and called us all jackasses. I have a little chuckle every time I remember this!
type NotificationWrapper struct {
// This field holds the actual notification data
value interface{}
}
Within `ProcessNotification` you'd also want to always assert the struct is initialized. You have to handle that error case via `err` or `panic`.With a true sum type, you could be assured that the value is always concrete, removing the need for error handling, which otherwise complicates the business logic of your application. Errors that should be safeguarded against by the compiler become run time checks, eating up cycles on the CPU, or paniced upon, potentially leading to segfaults which can only be caught by tests (not asserted valid via the act of compiling).
Ideally sum types would be concrete/non-nilable somehow.
Purdie shuffle would look like:
1 2 3 4
hh |x-xx-xx-xx-x|
S |-o--o-Oo--o-|
B |o----o-----o|
Or something like a basic jazz shuffle: 1 2 3 4
hh |x--x-xx--x-x|
S |---o-----o--|
B |o--o--o--o--|- 2 bar patterns would also be great. Many patterns repeat over 8 quarters.
- Allowing accents (dynamics). A lot of drum patterns involve just a few drums, where accents are what bring the pattern to life.
With accents and triplets, you can have the Purdie shuffle [1], which is one of my favorite patterns ever :)
:[1] https://tomtommag.com/wp-content/uploads/2011/10/Purdie-Shuf...
hh |x-x-x-x-x-x-x-x-|
S |----o-------o---|
B |o-------o-o-----|Not to rust, but to Go and C++ for myself. The biggest motivating factor is deployment ease. It is so difficult to offer a nice client install process when large virtual environments are involved. Static executables solve so many painpoints for me in this arena. Rust would probably shine here as well.
If its for some internal bespoke process, I do enjoy using Python. For tooling shipped to client environments, I now tend to steer clear of it.