10,000 Matching Annotations
  1. May 2021
    1. In a serverless-first world this gets a bit trickier. It needs to be possible to do both things, in a way that maps to the various serverless platforms out there, which most likely precludes using the (req, res) => {...} signature (and by extension, the ecosystem of Express middleware).

      wrapper / translating/mapping

      serverless

    1. Something people seem to trip over a bit is the fact that session, despite being a writable store, doesn't get persisted. I wonder if we can address that:

      caveat principle of least surprise

    1. We don't interact with the req/res objects you might be familiar with from Node's http module or frameworks like Express, because they're only available on certain platforms. Instead, SvelteKit translates the returned object into whatever's required by the platform you're deploying your app to.

      wrapper / proxy

    2. Service workers act as proxy servers that handle network requests inside your app. This makes it possible to make your app work offline, but even if you don't need offline support (or can't realistically implement it because of the type of app you're building), it's often worth using service workers to speed up navigation by precaching your built JS and CSS.
    3. This function runs both during server-side rendering and in the client, and allows you to get data for a page without (for example) showing a loading spinner and fetching data in onMount.

      nice!

    1. Select a redirect type from the Type menu. Permanent (301) — This setting notifies the visitor’s browser to update its records. Temporary (302) — This setting does not update the visitor’s bookmarks.
    1. Forwarding and URL is equivalent to Redirecting an URL. Is the same concept. You can use the words interchangeably. However, while redirecting normally refer to the practice of sending an HTTP 30x status code (generally 301 for permanent and 302 for temporary redirects) the word forwarding assumes a broader meaning. In fact, several companies (including GoDaddy) provides different type of forwarding: forward (redirect) forward with masking Forwarding an URL using the masking technique means instead of redirecting to the target transparently, the target URL is opened in a frame so that the visitor will always see the source URL in the address bar.

      good explanation distinction

    1. Post/Redirect/Get (PRG) is a web development design pattern that lets the page shown after a form submission be reloaded, shared, or bookmarked without ill effects, such as submitting the form another time.

      .

    1. To solve this, many people resort to a nounVerb naming schema, but this has it’s problems. For one thing, it feels unnatural to many people; postAdd just doesn’t read as well as addPost.

      .

    2. Current tooling doesn’t allow for a simple way to group your mutations, so a large list of them can make it difficult to see what sort of operations you can perform on a given resource (eg. add, delete, promote, hide, like, etc).

      .

    1. The query name doesn't have any meaning on the server whatsoever. It's only used for clients to identify the responses (since you can send multiple queries/mutations in a single request).

      .

    1. Case stylesField names should use camelCase. Many GraphQL clients are written in JavaScript, Java, Kotlin, or Swift, all of which recommend camelCase for variable names.Type names should use PascalCase. This matches how classes are defined in the languages mentioned above.Enum names should use PascalCase.Enum values should use ALL_CAPS, because they are similar to constants.

      .

    1. When working with mutations it is considered good design to return mutated records as a result of the mutation. This allows us to update the state on the frontend accordingly and keep things consistent

      .

    1. the only way to make it work is to do something like $: result = mutation(...) but it doesn't make sense, I don't want to run the mutation after each keystroke.

      not: idioms/conventions

      best practice

    2. Currently the mutate helper in Svelte runs immediately as we’re still figuring out patterns. However, if you call a mutation programmatically you can use getClient() and call client.mutation, like so: https://formidable.com/open-source/urql/docs/concepts/core-package/#one-off-queries-and-mutations We’re still working on idiomatic Svelte APIs so this one’s also on our list to figure out what the best way forward is

      idiomatic Svelte patterns

    3. For context, the previous API had a lazy promise. Currently I’m thinking we could just return a closure like in the React API

      API comparison to React

    1. The self-signed certificate which represents the DST Root CA X3 keypair is expiring. But browser and OS root stores don’t contain certificates per se, they contain “trust anchors”, and the standards for verifying certificates allow implementations to choose whether or not to use fields on trust anchors. Android has intentionally chosen not to use the notAfter field of trust anchors. Just as our ISRG Root X1 hasn’t been added to older Android trust stores, DST Root CA X3 hasn’t been removed. So it can issue a cross-sign whose validity extends beyond the expiration of its own self-signed certificate without any issues.

      innovative solution

    1. Please ensure that if the lookup fails, the exception indicates which part of the name caused the failure. It's waaay past time that the industry moves past "ENOENT: No such file or directory" in its exception reporting :)

      good error messages

    1. GraphQL Field Resolution Method Dispatch type class field method obj receiver args method arguments ctx runtime state

      equivalents between GraphQL terminology and Ruby terminology

    1. In real life I ride a Ninja, the last in a line of many bikes over more than forty-five years. However, within this game I've apparently never ridden a sport bike. Or any motorcycle. Or a bicycle. Or watched people ride. Or walked upright. I'm playing with a Thrustmaster joystick, but frankly I might as well be controlling the bike with a Ouija board. If I can not hit a wall, it's a personal victory. Personal victories do not occur often. Instead of the feeling that I'm controlling an exquisitely balanced, steep fork angle sport bike, or even a full dress Harley with an enormously fat passenger and two flat tires, I feel like I'm controlling a rocket-powered lawnmower with several missing tires. Perhaps towing a couple trailers connected with springs. Dying fish don't flop around like me. In forty minutes I've not come close to anything resembling control, much less fun, and I've hit my limit on time I'm willing to throw at it. Wasted money for me; time to acknowledge my mistake, uninstall and get on with my life.
    1. You would struggle to fit a list of all the issues onto the Great Wall of China even with tiny handwriting, but here are a couple of very simple UI issues that make me think, if you can't get this right, why are you bothering?

      .

    1. The thing that makes the client-side invocation return the same data as the server-side one is that the results of calling fetch during SSR are serialized and inlined into the page. This ensures consistency when the page hydrates, and saves network round-trips (and also means less data needs to come over the wire, since everything can get compressed using the same gzip dictionary or whatever).
    1. Using unfinished software to build an app that will be seen by millions of people is a risk, and in general I don't recommend it. But it has enabled us to develop the app much faster, and has made the framework itself much stronger than it otherwise would be.
    1. Use cases: Volumes are most useful when you need more storage space but don’t need the additional processing power or memory that a larger Droplet would provide, like: As the document root or media upload directory for a web server To house database files for a database server As a target location for backups As expanded storage for personal file hosting platforms like ownCloud As components for building more advanced storage solutions, like RAID arrays
    2. Familiarity: Volumes function as generic block devices, so you can treat attached volumes like locally connected storage drives. This lets you partition, format, and manage volumes with familiar tools and techniques.

      So block storage volumes are network-based block devices, but they appear in the OS the same as local block devices? Is it even possible to distinguish that they are not actually local?

    1. That image only contains 200 pixels horizontally, but the browser stretches it to 400px wide or even farther!Luckily, you’ll see there’s an easy “fix” there at the end: our old good friend the width attribute!<img src="example.gif", srcset="example.gif 200w" sizes="(min-width: 400px) 400px, 100vw" width="200" /* <=== TA-DA! */ class="logo">As long as you can specify the width attribute so it reflects the true maximum size of your largest image, you won’t run into this problem of having sizes make your image wider than it naturally should go.
    1. My name is Floyd Lu, I have been designing and publishing games since 2015 under B&B Games studio. In 2020 B&B Games studio dissolved. I took over a part of the business including this account. I am unable to change the name and URL of my Kickstarter account. I delivered and personally worked on each project that I did and I can't transfer all the followers, therefore, I am still launching new projects under this account.
    1. when HTML5 started, the feedback from the HTML5 guys was pretty clear: HTML5 is there to improve web apps (standards-based flash! yay!), and not to improve HTML as a hypermedia format. http://dret.typepad.com/dretblog/2008/05/xhtml-fragment.html was a very early attempt to raise the issue and was shot down promptly. with HTML5 now branching into so many micro-specs (https://github.com/dret/HTML5-overview), maybe there’s a good chance to simply create a “FragIDs in HTML5” spec and see if there’s any community uptake. it would be great to see this getting started, and maybe IETF with its more open process would be a better place than W3C.
    2. Linking directly to someone’s blog comment is very useful. Even if a blog doesn’t have an active link for each comment, it’s pretty easy to use developer tools to find the comment’s id and link to it. I’ve done this many times on Smashing Magazine (they don’t have live links on each comment). If there was no way to link to an individual blog comment, this would be a great hindrance to linking on the web. It would not be enough to link to the “#comments” section and then hope for the best. So CMSs like WordPress do the right thing by dynamically adding a unique identifier to each comment.
    3. Yes, the content creator should have the ability to decide how a page is generally divided, if they choose to do so. But the end user should not be restricted from linking to content fragments just because a developer couldn’t be bothered to add id attributes to every element on the page. And that’s besides the fact that it would be a waste of time for a developer to do that or to have to build a CMS that does it automatically.
    4. The simple problem that I see with fragment identifiers is that their existence and functionality relies completely on the developer rather than the browser. Yes, the browser needs to read and interpret the identifier and identify the matching fragment. But if the developer doesn’t include any id attributes in the HTML of the page, then there will be no identifiable fragments. Do you see why this is a problem? Whether the developer has coded identifiers into the HTML has nothing to do with whether or not the page actually has fragments. Virtually every web page has fragments. In fact, sectioning content as defined in the HTML5 spec implies as much. Every element on the page that can contain content can theoretically be categorized as a “fragment”.

      at the mercy of author

    5. The developer or content creator may have a general idea of how a page’s content might be divided up, but ultimately it will be the linking resource that should have full control over what portion of the page they want to highlight.
    1. There is a fundamental weakness in the name attribute, which the id attribute addresses: the name attribute is not required to be unique. This is OK for forms where you can have multiple elements with the same name, but unsuitable for the rest of the document where you are trying to uniquely identify an element.
    1. You may have noticed your emails looking a little cramped in Hotmail and Outlook.com recently. The culprit? Discontinuation of support for the margin property in these email clients. Rather than honoring your carefully spaced paragraphs and images, Hotmail and Outlook.com are now completely stripping margin from paragraph tags, leaving default values (0 for the top, right and left; 1.35em for the bottom, to be exact) in their place.
    1. Rogues Adventure (Tiny Adventure?) is one of literally thousands of 2D retro pixel platformers infesting Steam. This one has you jumping around maze-like 2D puzzle levels collecting coins etc. The usual. They chose to use obsolete retro pixel "art" as a substitute for contemporary PC graphics. It's unclear if this is due to lack of budget or talent, regardless, the overall visual quality of the game is extremely low as a result. Resolution and controls are locked. These flaws push this game far below minimum acceptable standards for PC. This is such a routine platformer, the only remarkable thing about it is the developers didn't even know what name to call it when they launched on Steam.

      .

    1. My Sweet Ants! is a free mobile app that's been dumped from the iOS app store onto Steam. I got my key from DIG in their latest bundle. Why do I do this to myself? This mobile app is a game where you solve jigsaw puzzles of ants which have had anime girl eyes and mouths photo shopped onto them. Every day we stray further from god's light, I guess.Like all mobile apps, the quality is pretty low here. Resolution is fixed so the game falls below acceptable standards for PC.Once more we see greedy mobile devs trying to scam PC gamers. They want $2 USD for this free mobile app! Mobile devs must learn PC gamers are not here to be gouged, and can't be expected to pay a premium for a free mobile app just because it's been lazily dumped on Steam. This is unacceptable disrespect for PC gamers. I didn't spend thousands on a gaming PC so I could pretend it's an iPhone. I can't recommend anyone buys this when you can play it for free on mobile, not that anyone would want to.

      .

    1. The game is buggy and unplayable, it crashes on launch most of the time. If you can get it to launch, it crashes as soon as you start moving. It's early access, sure, but despite being early access the developer is already selling it as a complete game in bundle stores like Daily Indie Game. Surely that's just an innocent mistake and not some dodgy attempt from a shady developer/publisher to sell an abandoned game as if it was complete.

      .

    1. Anyway it's difficult to write too much about the game because it crashes on launch. Broken games don't get thumbs up. I have a dream that one day I'll play an indie game where they bothered testing it. Either way, don't buy broken games. Impossible to recommend.
    1. MJML has been designed with responsiveness in mind. The abstraction it offers guarantee you to always be up-to-date with the industry practices and responsive. Email clients update their specs and requirements regularly, but we geek about that stuff - we’ll stay on top of it so you can spend less time reading up on latest email client updates and more time designing beautiful email.
    1. Simple fact is that HTML support is different in them because mail clients are so old, or others are allowed to operate in browsers where not all CSS or even HTML can be applied in a secure manner. Older clients have outdated browsers that you'll likely NEVER see brought up to standards; what with Opera's standalone aging like milk, and thunderbird lagging behind the firefox on which it's even built. Don't even get me STARTED on older clients like Eudora or Outlook.
    2. But more so, external style cannot be applied to a subsection of a web page unless they force it into an iframe, which has all sorts of issues of it's own which is why external CSS is usually ignored. Inline CSS is often stripped by the tag strippers who don't want you turning things on or off... and media queries shouldn't even play into it since the layout should be controlled by the page it's being shown inside (for webmail) or the client itself, NOT your mail.
    3. I've worked with people at companies where this was their only responsibility. Setting up emails for clients, making sure they pass a battery of tests and look great in all browsers and clients. It's an incredible PITA and it's not a set it and forget it thing. Clients can change month to month; spam filters change, etc...
    1. I hate to be the guy who will destroy your day but... Tables. You need to work with nested tables/cells. If you think Gmail is annoying you will cry in agony if you also need Outlook support.Work with the good old HTML from the early 2000's. That's the only way to be sure everything will work as intended.Anything else will mostly result in a horrible mess, broken design and incompatible layouts.
    1. Approaching email development this way transitions more of the quality assurance (QA) process to the browser instead of the email client. It gives email designers more power, control, and confidence in developing an email that will render gracefully across all email clients.

      can mostly test with browser and have less need (but still not no need) to test with email client

    1. A common practice in email marketing is to use images for everything in the email: graphics, illustrations, copy, links, and buttons. Although this can be efficient (slice, dice, and send it on its way), it’s another huge problem for subscribers relying on screen readers. The typical image-based email has a lot of information that can’t be parsed by a machine. What’s more is that a lot of email clients disable images by default, too.