<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: ctidd</title><link>https://news.ycombinator.com/user?id=ctidd</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Thu, 23 Jul 2026 04:15:40 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=ctidd" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by ctidd in "Are AI Labs Pelicanmaxxing?"]]></title><description><![CDATA[
<p>It’s a very strong convention in bicycle photography. The drive side is considered nicer looking, it’s where you get to show off the components, etc.<p>Independent of what humans may do with the same prompt, training datasets will be full of traditional bike photos, which will all be drive side.<p>It’s also one of the easiest yellow flags to look for in used bike listings (not low-end, but anything enthusiast level). If a bike is photographed on the wrong side, there’s a non-negligible chance it’s stolen, because the seller is presumed to know better if they’re an enthusiast themself.</p>
]]></description><pubDate>Wed, 22 Jul 2026 23:58:49 +0000</pubDate><link>https://news.ycombinator.com/item?id=49015120</link><dc:creator>ctidd</dc:creator><comments>https://news.ycombinator.com/item?id=49015120</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49015120</guid></item><item><title><![CDATA[New comment by ctidd in "Canyon HUD helmet for road riding"]]></title><description><![CDATA[
<p>There are multiple MIPS systems. The early ones were like you described, with a distinct feeling of too much plastic. Newer ones (e.g. Integra) are much more seamless. There are also other companies doing different types of rotational tech, like Lazer with an integral foam-based shearing design.<p>If you have only tried first-gen MIPS, I recommend giving it another shot.</p>
]]></description><pubDate>Tue, 23 Jun 2026 00:54:48 +0000</pubDate><link>https://news.ycombinator.com/item?id=48638718</link><dc:creator>ctidd</dc:creator><comments>https://news.ycombinator.com/item?id=48638718</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48638718</guid></item><item><title><![CDATA[New comment by ctidd in "Developers don't understand CORS (2019)"]]></title><description><![CDATA[
<p>CSRF can compromise the non-mutating path as well to exfiltrate data, but the mutating path and non-mutating are different, hence the OPTIONS preflight required prior to sending mutating requests.<p>The browser enforces the same-origin policy by preventing read on non-mutating (i.e. “simple”) request responses and preventing sending of mutating requests (i.e. non-“simple”). CORS provides a protocol for a service to loosen these controls.</p>
]]></description><pubDate>Sun, 21 Jun 2026 18:15:34 +0000</pubDate><link>https://news.ycombinator.com/item?id=48621189</link><dc:creator>ctidd</dc:creator><comments>https://news.ycombinator.com/item?id=48621189</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48621189</guid></item><item><title><![CDATA[New comment by ctidd in "Developers don't understand CORS (2019)"]]></title><description><![CDATA[
<p>All CORS does is allow for selective loosening of anti-CSRF controls. CORS is a mechanism for a service to tell a client “I’m CSRF-resistant” so that that the client doesn’t need to protect its user as tightly when interacting with that service.</p>
]]></description><pubDate>Sun, 21 Jun 2026 05:21:41 +0000</pubDate><link>https://news.ycombinator.com/item?id=48615914</link><dc:creator>ctidd</dc:creator><comments>https://news.ycombinator.com/item?id=48615914</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48615914</guid></item><item><title><![CDATA[New comment by ctidd in "CSRF protection without tokens or hidden form fields"]]></title><description><![CDATA[
<p>CSRF exists as a consequence of insecure-by-default browser handling of cookies, whereby the browser sends the host’s cookies on requests initiated by a third-party script to the vulnerable host. If a script can fake all headers, it’s not running in a browser, and so was never exposed to the insecure browser cookie handling to be able to leverage it as a vector. If no prerequisite vector, then no vulnerability to mitigate.</p>
]]></description><pubDate>Thu, 25 Dec 2025 00:58:51 +0000</pubDate><link>https://news.ycombinator.com/item?id=46381084</link><dc:creator>ctidd</dc:creator><comments>https://news.ycombinator.com/item?id=46381084</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46381084</guid></item><item><title><![CDATA[New comment by ctidd in "CSRF protection without tokens or hidden form fields"]]></title><description><![CDATA[
<p>You want lax for the intuitive behavior on navigation requests from other origins. Because there’s no assumption navigation get requests are safe, strict is available as the assumption-free secure option.</p>
]]></description><pubDate>Thu, 25 Dec 2025 00:51:00 +0000</pubDate><link>https://news.ycombinator.com/item?id=46381036</link><dc:creator>ctidd</dc:creator><comments>https://news.ycombinator.com/item?id=46381036</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46381036</guid></item><item><title><![CDATA[New comment by ctidd in "Events"]]></title><description><![CDATA[
<p>CSP is a defense in depth mechanism which can be (among other capabilities) used to preempt the capability of inline scripts. This mitigates rendering bypasses, in the event that unsafe rendering occurs. For example, imagine you have an insecure markdown renderer, where a user can manage to escape some HTML and inject it into the DOM in a comment thread of some sort. If they can do so, then they can embed JS inside that HTML and get XSS on other users. Adding a rule to disallow all inline scripts mitigates this, assuming the first layer of defense fails.</p>
]]></description><pubDate>Tue, 12 Aug 2025 07:57:38 +0000</pubDate><link>https://news.ycombinator.com/item?id=44873580</link><dc:creator>ctidd</dc:creator><comments>https://news.ycombinator.com/item?id=44873580</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44873580</guid></item><item><title><![CDATA[New comment by ctidd in "Events"]]></title><description><![CDATA[
<p>> Similarly, why is an online event handler considered a security risk? I just don’t see the difference between that and using a named function?<p>It is a vector for script injection, and should be disallowed with a strong CSP (no “unsafe-inline”).</p>
]]></description><pubDate>Mon, 11 Aug 2025 01:22:44 +0000</pubDate><link>https://news.ycombinator.com/item?id=44859947</link><dc:creator>ctidd</dc:creator><comments>https://news.ycombinator.com/item?id=44859947</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44859947</guid></item><item><title><![CDATA[New comment by ctidd in "A road safety plan that will lead to cars communicating with each other"]]></title><description><![CDATA[
<p>Putting the blame on cyclists for dooring requires missing problems up the chain which cause them to be in the door zone. Road designs (marked bike lanes that are 80% or more in the door zone) and automotive traffic overtaking unsafely are two contributors that directly or indirectly push cyclists into an unsafe space.<p>To ride out of the door zone in many cases requires taking the lane and riding outside of a marked bicycle lane, if present. Cyclists can and should do this, but it is no surprise that many don’t, and it is no surprise that drivers complain of those who do.</p>
]]></description><pubDate>Wed, 21 Aug 2024 19:04:56 +0000</pubDate><link>https://news.ycombinator.com/item?id=41313169</link><dc:creator>ctidd</dc:creator><comments>https://news.ycombinator.com/item?id=41313169</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41313169</guid></item><item><title><![CDATA[New comment by ctidd in "Bollards: Why and What"]]></title><description><![CDATA[
<p>The implicit premise in this argument is that safety is an add-on that you buy or install like an antivirus package. If we designed to encourage less dangerous forms of transportation from the start, there may be cost savings that aren’t surfaced in the “add-on safety” cost calculation.</p>
]]></description><pubDate>Mon, 06 May 2024 06:29:10 +0000</pubDate><link>https://news.ycombinator.com/item?id=40271761</link><dc:creator>ctidd</dc:creator><comments>https://news.ycombinator.com/item?id=40271761</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40271761</guid></item><item><title><![CDATA[New comment by ctidd in "Bollards: Why and What"]]></title><description><![CDATA[
<p>The other part of this decision not to protect human-powered mobility (pedestrian, bicycle, wheelchair, etc.) is that we allow or encourage automotive traffic as a constant, and _then_ we choose not to protect people. It’s a two step process where we make an active choice to create danger and then a second choice not to mitigate the danger.</p>
]]></description><pubDate>Mon, 06 May 2024 00:16:56 +0000</pubDate><link>https://news.ycombinator.com/item?id=40269873</link><dc:creator>ctidd</dc:creator><comments>https://news.ycombinator.com/item?id=40269873</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40269873</guid></item><item><title><![CDATA[New comment by ctidd in "JavaScript for Data Science"]]></title><description><![CDATA[
<p>I want to respond to this constructively, because you highlighted a useful interface I'd never taken note of previously; maybe we can focus this discussion on a technical level. Meanwhile, if you haven't had a positive response to technical feedback directed to JS engineers about this, I would encourage rereading the comment you wrote. I genuinely hope this is useful feedback, as I very much value insight from other languages and levels of abstraction, and I'd love for you not to get turned off to sharing that insight by a bad response from JS engineers. JavaScript is high level, and it's too easy to get disconnected from all of the work the engine and underlying computer are doing to make a program work in this environment.<p>---<p>As I understand the interface, practical use of the EventListener interface boils down to the implementer performing a form of event delegation, where you'd wind up delegating from a single `handleEvent()` method on a class to handle different event types and/or events with different target elements -- as opposed to a single click handler in a simple button click example. I'd love to understand and quantify the benefit of this. If it's a significant improvement, it'd be doubly unfortunate, as many callback-based interfaces in JavaScript APIs and libraries at a higher level don't support such a model.<p>Assuming there's a strong benefit, I also wonder if there's an opportunity for build-time tooling to rewrite code from ad-hoc callbacks to more efficient delegation along these lines. Tangentially, I also don't know about `Function.prototype.bind` vs wrapping arrow functions in terms of performance; that's also something I'm curious about, as they're often a 1:1 analog.<p>I'm tempted to test a few of these things out myself, but if you have references, that would be helpful.</p>
]]></description><pubDate>Mon, 26 Apr 2021 05:43:28 +0000</pubDate><link>https://news.ycombinator.com/item?id=26939573</link><dc:creator>ctidd</dc:creator><comments>https://news.ycombinator.com/item?id=26939573</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=26939573</guid></item><item><title><![CDATA[New comment by ctidd in "JavaScript for Data Science"]]></title><description><![CDATA[
<p>As a heads up since you mentioned "class method syntax", methods are one of the most important places to have lexical `this` binding in many scenarios.<p>Take the following example, which is a normal class method:<p>> alertSum() { alert(this.a + this.b); }<p>And here we have an arrow function used to create an instance method (just an arrow function assigned to a property on the instance):<p>> alertSum = () => { alert(this.a + this.b); }<p>Then let's say we want to pass the method directly as callback:<p>> this.button.addEventListener('click', this.alertSum)<p>The first example (class method syntax) won't have the necessary `this` context unless it has its context bound to the instance through `Function.prototype.bind`. There are other patterns to avoid this (e.g. wrapping all callbacks in arrow functions when passing them), but it's useful to consider that classes methods can easily create confusion because that's _exactly where_ someone more used to a different language may assume the `this` context is bound lexically.</p>
]]></description><pubDate>Sun, 25 Apr 2021 20:42:35 +0000</pubDate><link>https://news.ycombinator.com/item?id=26936484</link><dc:creator>ctidd</dc:creator><comments>https://news.ycombinator.com/item?id=26936484</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=26936484</guid></item><item><title><![CDATA[New comment by ctidd in "Questions to ask in a job interview that reveal company culture"]]></title><description><![CDATA[
<p>The goal makes sense, but more specific questions can get substantially better responses. An example of what I'd find to be a more effective line of questions with a similar goal:<p>1. Is there a substantial technical or organizational change your company/org/team is currently executing? (Choosing scope based on who you're talking to.)<p>2. (If not) What was the last one you executed successfully? (Alternative: unsuccessfully)<p>3. What problem is/was this change aiming to solve?<p>4. Did the change introduce an anticipated or unanticipated tradeoff?<p>The goal would be to understand what the company currently or recently found challenging and what they're motivated to solve. It can also gauge the company's realism in evaluating the outcome.<p>Can you acknowledge real problems and tradeoffs, drive a change, and know when it's accomplished (or when it's time to rethink it)?</p>
]]></description><pubDate>Sun, 18 Apr 2021 20:44:09 +0000</pubDate><link>https://news.ycombinator.com/item?id=26856180</link><dc:creator>ctidd</dc:creator><comments>https://news.ycombinator.com/item?id=26856180</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=26856180</guid></item><item><title><![CDATA[New comment by ctidd in "Man dies from eating more than a bag of liquorice a day"]]></title><description><![CDATA[
<p>Forcing your children to eat things they aren't comfortable with is not a hack. Please do not do this. There is a significant difference between providing a positive environment for your child to encounter new foods and forcing them, physically or otherwise, to eat them.</p>
]]></description><pubDate>Fri, 25 Sep 2020 01:55:29 +0000</pubDate><link>https://news.ycombinator.com/item?id=24585822</link><dc:creator>ctidd</dc:creator><comments>https://news.ycombinator.com/item?id=24585822</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=24585822</guid></item><item><title><![CDATA[New comment by ctidd in "New JSX Transform"]]></title><description><![CDATA[
<p>As a counterexample to consider, I would suggest that a client-side web app is coupled to any remote data source intrinsically by a latency-sensitive connection over the network. As soon as you have enough data, you need to defer portions of it and load them on demand based on user interactions. So now the ways in which data was or wasn't factored in a way that mirrors the app impacts it.<p>Now, there are tradeoffs we can make to deliver an end state to a user: we can normalize and incrementally hydrate the data shown in the client and increase visible jank in the process, or we can realign the app's experience and/or data source around each other.<p>Decoupling UI components from business components is of course valuable, but that's different from taking that a step further and decoupling business components from the data source. The latter is a significantly more challenging proposition.<p>Also, there's some fuzziness here in what we mean by decouple. REST vs SOAP vs GraphQL as transfer layers can be abstracted away as implementation details, but I'd place a higher emphasis on the shape of the data and how it has to be traversed in the client. If you have a paginated list, for example, and you only want to load it once, but you need to display both a summary and load it incrementally, things can get complicated as more functionality is built out from that starting point, regardless of transfer layer.</p>
]]></description><pubDate>Wed, 23 Sep 2020 00:18:14 +0000</pubDate><link>https://news.ycombinator.com/item?id=24561552</link><dc:creator>ctidd</dc:creator><comments>https://news.ycombinator.com/item?id=24561552</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=24561552</guid></item><item><title><![CDATA[New comment by ctidd in "Beware of Async/Await"]]></title><description><![CDATA[
<p>If I follow your statement, it doesn't appear correct. JS Promises are eager, and the work underlying the promise will begin executing prior to being awaited. Await is just blocking on that execution's resolution.<p><pre><code>    // Given:
    const fooPromise = asyncFoo();
    const barPromise = asyncBar();

    // Then this...
    await fooPromise;
    await barPromise;

    // ...is equivalent to this:
    await Promise.all([fooPromise, barPromise]);
</code></pre>
Now, Promise.all() is useful, but it is unrelated to when computation starts.</p>
]]></description><pubDate>Thu, 30 Jul 2020 16:29:40 +0000</pubDate><link>https://news.ycombinator.com/item?id=24000075</link><dc:creator>ctidd</dc:creator><comments>https://news.ycombinator.com/item?id=24000075</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=24000075</guid></item><item><title><![CDATA[New comment by ctidd in "Should I Use a Carousel?"]]></title><description><![CDATA[
<p>If you're not familiar with the term, this image viewer pattern is generally called a lightbox rather than a carousel. I generally don't see the two used interchangeably, but there's similarity to the prev/next controls, of course.</p>
]]></description><pubDate>Tue, 07 Jul 2020 02:27:54 +0000</pubDate><link>https://news.ycombinator.com/item?id=23755064</link><dc:creator>ctidd</dc:creator><comments>https://news.ycombinator.com/item?id=23755064</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=23755064</guid></item><item><title><![CDATA[New comment by ctidd in "A Critique of React Hooks Addendum"]]></title><description><![CDATA[
<p>Since you provided a concrete scenario, I should probably do the same to clarify what I'm referring to in re-parenting or hoisting hooks. It doesn't really map to the statement "replace a global store with localized hooks", so I'm probably doing a poor job communicating. Similarly, I do not assume "you can simply replace a global store with localized hooks", because like you say, that's not true, and I can appreciate you clearly understand how hooks work.<p>At the same time, unless I'm really misunderstanding the example you shared, I can't see the problem or mental overhead you're mentioning where we need to be vigilant about having the same hook used in multiple places or understanding the scope of the hook's "local" state and callbacks. That's the point of hooks as a unit of encapsulation -- just like with a class, each use of a hook is a different instance, and the scope is that of the instance (and hook instances are scoped/bound to the lifecycle of the containing component instance). The code in the problem you showed is equivalent to calling setState on the one component instance and expecting that to show up on another instance which happens to be of the same component class. If we understand how React component instances work, that's clearly not the case (state isn't broadcast across instances), and the same goes for hooks.<p>Looking at what I mean by the improved portabiliy/hoistability of hooks I mentioned in previous comments, let's say we have three components: App, Foo, and Bar. App renders Foo and Bar as children.<p>We have a business requirement that Foo has some behavior which contains multiple pieces of state and bindings to multiple React lifecycle events (e.g. mount). What we don't know is whether we'll ever need to share that behavior with Bar.<p>React class API: We need to write bindings for this behavior against class state and lifecycle methods, intermingled with other code. This intermingling means you know there's a good deal of refactoring to do to move the behavior upward to App if we ever need to share the behavior with Bar. As a component grows, more and more logic intermingles on those lifecycle methods and makes refactoring more challenging.<p><pre><code>  class Foo extends React.Component {
    state: {
      behaviorState: {...},
      unrelatedState: {...},
    };

    componentDidMount() {
      initBehavior(this.props.input);
      initUnrelated();
    }

    ...
  }

</code></pre>
React hook API: We can easily write this behavior in a custom hook, encapsulating the behavior in some combination of useState, useEffect, and other React hooks. Now we have a self-contained useBehavior hook, by definition isolated from any local state, which you can choose to use within Foo.<p><pre><code>  const Foo = ({ input }) => {
    const behaviorState = useBehavior(input);
    const unrelatedState = useUnrelated();
    return ...;
  };
</code></pre>
At this point, we're not so worried if we need to hoist that one function call up to App and pass the hook's returned handle (behaviorState) back down to Foo and Bar at some point in the future.<p>If this example sounds trivial, I've packaged up 500+ lines of functionality in a single self-contained hook before, and that's all exposed as a single function that consumers can treat as a full encapsulation of all of that functionality, while not worrying if they need to hoist that function call up and pass the output down at some point in the future.<p>I'm not talking about calling the same hook in Foo and Bar (these are different instances), nor sharing local state sideways across different invocations of hooks, but rather having full confidence it won't be hard to re-anchor that hook upward in the component tree if need be.</p>
]]></description><pubDate>Fri, 08 May 2020 01:18:59 +0000</pubDate><link>https://news.ycombinator.com/item?id=23110377</link><dc:creator>ctidd</dc:creator><comments>https://news.ycombinator.com/item?id=23110377</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=23110377</guid></item><item><title><![CDATA[New comment by ctidd in "A Critique of React Hooks Addendum"]]></title><description><![CDATA[
<p>That's not a bug with hooks, but almost a complete misunderstanding of how hooks work (*on the part of anyone who writes that code thinking it will behave otherwise). Hooks are effectively instantiated on a specific component instance. Calling useState multiple times like this is multiple instances of useState, whether or not it's wrapped in another function.<p>And I'd like to be very clear that I strongly advise against cutting through layers with context because I wholeheartedly agree with your assessment there. You can plumb down those handles explicitly through props and enforce they're provided in a type system.</p>
]]></description><pubDate>Thu, 07 May 2020 21:03:05 +0000</pubDate><link>https://news.ycombinator.com/item?id=23108288</link><dc:creator>ctidd</dc:creator><comments>https://news.ycombinator.com/item?id=23108288</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=23108288</guid></item></channel></rss>