<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ricky</title>
    <description>The latest articles on DEV Community by Ricky (@rickyxyz).</description>
    <link>https://dev.to/rickyxyz</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1237553%2Fef570548-2b0a-448f-aeaa-9da2a0ed58e9.jpeg</url>
      <title>DEV Community: Ricky</title>
      <link>https://dev.to/rickyxyz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rickyxyz"/>
    <language>en</language>
    <item>
      <title>A Mistake Is Not An Error</title>
      <dc:creator>Ricky</dc:creator>
      <pubDate>Fri, 18 Apr 2025 06:38:14 +0000</pubDate>
      <link>https://dev.to/rickyxyz/a-mistake-is-not-an-error-3999</link>
      <guid>https://dev.to/rickyxyz/a-mistake-is-not-an-error-3999</guid>
      <description>&lt;p&gt;I think the topic of this post is related to "Error Prevention and Handling" from the Human-Computer Interaction (HCI) usability principle. I think most people (in related fields) are already aware of this topic.&lt;/p&gt;

&lt;p&gt;Recently, a client asked me to make an event schedule and its editor interface (imagine Google Calendar but way simpler) for one of their event's websites. The implementation is quite straightforward, a button to an item to the schedule, an editor for the item details, some validation, sorting the items by time, and making the frontend display the data. The implementation itself is not technically complex. But, something interesting happened when the client tried to interact with the interface.&lt;/p&gt;

&lt;p&gt;I was surprised that the client asked me how to manually sort the events (i.e. putting a certain event before another). Me being me, I told them that the events are automatically sorted by their date and time to prevent mistakes and remove the need to sort. Thankfully, the client understood what I meant and apparently, they just needed a reverse sorting order. From that interaction, something just clicked in me. A mistake is not an error, let me explain.&lt;/p&gt;

&lt;p&gt;Say, for example, you are writing a list of alphabetically sorted fruits from 'A' to 'Z' in Notepad. If you put 'Banana' before 'Apple', I would call that a mistake. However, if Notepad crashes after you type 'Apple', that is what I would call an error. In reality, Notepad won't crash if you somehow messed up the order of your fruits, because it does not care about ordering or what you typed in as long as it can be parsed to text. Why is all of this important? Well, because the principle is called "Error Prevention and Handling", I think it is pretty reasonable to expect that we need to understand what an error is, so we apply the prevention and handling part to it. I think my mental model of what counts as an error is quite simple and quite common; If a system cannot continue to function normally after a specific sequence of events I would categorize that sequence of events as an error.&lt;/p&gt;

&lt;p&gt;Going back to the original schedule editor, allowing the client to sort the events manually is not an error, because the system won't crash when the order of items is changed. However is it wrong to see an event at 8 AM nestled between events at 6 and 7 AM in an otherwise orderly list? I would say so. However, here is where things get more 'human'. If all stakeholders agree that the ordering is not wrong, then it is not wrong, and vice versa. After all, it’s our design choices as humans that decide what is right and wrong.&lt;/p&gt;

&lt;p&gt;I think it is good to have an understanding of what an error is and what is not. That being said, I don't think having too rigid of a definition would be good either since the real world often doesn't agree nicely with a rigid definition of stuff. Why do I think it's important to have an understanding of this topic? Because it will result in different ways of handling an error and a mistake. With an error, I would try to prevent it from happening in the first place or make sure there is a recovery path if the error occurs. But with a mistake, I can be a bit more lenient with how to handle it, I can ask users to make sure if they inputted the right thing or not, or I can make sure that the mistake is easily reversible.&lt;/p&gt;

&lt;p&gt;Anyhow, this is the end of this post. I don't know what else to say. For anyone reading this, thank you for reading until the end. Also, what do you think about this topic? Do you have your mental model of an error and mistake? Do you think I just wrote a bunch of nonsense? Leave a comment, and tell me what you think. Cause I am curious about what other people think about this topic too.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://rickyxyz.dev/blog/post-3-a-mistake-is-not-an-error/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=tracking" rel="noopener noreferrer"&gt;This post is also available on my personal site&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Edit:&lt;br&gt;
Now, that I think about it, maybe this is another way I can put the difference between an error and a mistake into words. An error is something the system can detect, but a mistake is something a system cannot detect. Not sure if putting it this way is a good way to say it or not.&lt;/p&gt;

</description>
      <category>learning</category>
      <category>design</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Is Authentication Just About What The Server And Client Know And Don't Know?</title>
      <dc:creator>Ricky</dc:creator>
      <pubDate>Mon, 19 Aug 2024 13:58:27 +0000</pubDate>
      <link>https://dev.to/rickyxyz/is-authentication-just-about-what-the-server-and-client-know-and-dont-know-gi2</link>
      <guid>https://dev.to/rickyxyz/is-authentication-just-about-what-the-server-and-client-know-and-dont-know-gi2</guid>
      <description>&lt;p&gt;Context: I'm  writing this while watching YouTube, and this goddamn thought just went through my head. I'm writing this to see what other people think about this.&lt;/p&gt;

&lt;p&gt;Alright hear me out...&lt;/p&gt;

&lt;p&gt;Does every authentication method relies on the server having something to validate the client's credential?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Password Authentication&lt;/strong&gt;, the server got the hashed password (or whatever form it stores the password in) and the client don't. This security lies in the client knows or not about the original password that was used to create the hash.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;API Keys&lt;/strong&gt; (or token auth), the server got a list of valid keys/token, and the client doesn't. Again similar to password, the server knows something the client may or may not know.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MFA&lt;/strong&gt;, when you create the authenticator, the server give you the unique MFA string (no idea what its actually called, but you get it the MFA seed/qr code thingamajig). Again the server has the code to validate against and your authenticator has the algorithm to generate the code that will pass the validation. Isn't this pretty similar to password based auth but with extra steps that generate the unique MFA code?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Biometrics&lt;/strong&gt;, IDK... The server has your biometric info and you have... Your biometric I guess, and you input your biometric and the server will validate against its data (I think thats the gist of it). Sounds close enough to password to me.&lt;/p&gt;

&lt;p&gt;In theory, can I just have a random string sitting somewhere on my server and allow user to login if they know that string? Isn't a dumb version of the password authentication? &lt;/p&gt;

&lt;p&gt;My fucking god, I feel so stupid when thinking about this. What do you think? Does my rambling sounds about right or nah?&lt;/p&gt;

&lt;p&gt;Also there is the Google Prompt you get on your phone when you log in from a new place, does that also relies on the server knowing something the client does not? Or how does that work? I got no idea really. &lt;/p&gt;

&lt;p&gt;Also what other authentication methods are out there? Do they also hinges on the server knowing something the client does not?&lt;/p&gt;

</description>
      <category>learning</category>
      <category>discuss</category>
      <category>security</category>
      <category>help</category>
    </item>
    <item>
      <title>Human Friendly Code?</title>
      <dc:creator>Ricky</dc:creator>
      <pubDate>Tue, 28 May 2024 12:35:12 +0000</pubDate>
      <link>https://dev.to/rickyxyz/human-friendly-code-41hf</link>
      <guid>https://dev.to/rickyxyz/human-friendly-code-41hf</guid>
      <description>&lt;p&gt;Why do we code? Do we code only to satisfy the requirements of the product owner? Or do we code just so it could pass through QA? Are we just trying to get a passing grade for a class assignment? Or are we just having fun writing random stuff?&lt;/p&gt;

&lt;p&gt;I think it is easy to forget that there are real people out there who will interact with our code when we are so deep in implementation details. Different people may interact with your code in different ways. An end user might interact with your code through the user interface, another developer may interact with your code through the API, or maybe the coworker next to you is interacting directly with your code. Whatever the means, there will always be another human in the chain interacting with the code you’ve written.&lt;/p&gt;

&lt;p&gt;Knowing that there is another person that will interact with your code (be it user interface, API interface, or class/method interface), how do you make your code more "human friendly"?&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>programming</category>
      <category>coding</category>
      <category>design</category>
    </item>
  </channel>
</rss>
