<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Mortoray - Medium]]></title>
        <description><![CDATA[Programming journeys, points of interest, and the Leaf language - Medium]]></description>
        <link>https://medium.com/mortoray?source=rss----e23ac8aa446f---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Mortoray - Medium</title>
            <link>https://medium.com/mortoray?source=rss----e23ac8aa446f---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 18:32:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/mortoray" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Quality or collapse in the age of LLM coding]]></title>
            <link>https://medium.com/mortoray/quality-or-collapse-in-the-age-of-llm-coding-d66171ad2eea?source=rss----e23ac8aa446f---4</link>
            <guid isPermaLink="false">https://medium.com/p/d66171ad2eea</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Edaqa Mortoray]]></dc:creator>
            <pubDate>Mon, 16 Feb 2026 18:44:19 GMT</pubDate>
            <atom:updated>2026-02-16T18:44:19.630Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1zPzsAOMgbgqyvMZydUSYg.jpeg" /></figure><p>Large language models (LLMs) have a grand potential to improve software. I’d even say it has a greater potential to improve all creative arts as well. But I don’t believe we’ll be using it to those ends. Alas, I do not see it making a fundamental shift in what we produce, but rather continuing down a path we’ve been on for a <a href="https://mortoray.com/are-we-forever-cursed-with-buggy-software/">long time already</a>.</p><p>I’m going to distil the two directions of this technology, which is a similar two paths any technology can take. <a href="https://en.wikipedia.org/wiki/Large_language_model">LLM</a> can be used as:</p><ul><li>An assistive tool that helps programmers create better software: be more stable, use fewer resources, be faster, and have increased usability.</li><li>A way to increase output and/or reduce workforce but follow the current trend in product quality.</li></ul><p>Obviously that’s a simplified view, but it’ll help to make my comparative viewpoint in this article. The reality is that we’ll have a mix of both.</p><p>Will we lean more towards increased output and a downward spiral in quality? If we go this route, it’ll be our decision. And given current trends, it is my prediction that the vast majority of software will venture down this pathway.</p><blockquote><em>Though often referred to as AI, I want to use the term LLM specifically, as my viewpoint is about this particular technology. I can envision many AI-like technologies which would make me think differently.</em></blockquote><h4>The Positive Assistant</h4><p>I wrote an article a few years back about <a href="https://mortoray.com/how-ai-can-help-me-as-a-programmer/">how an AI could help me as a programmer</a>. I said it could help me with research, management, refactoring and debugging. Clearly all toward an assistive tool. To avoid fading away as a luddite, I’ve increasingly incorporated LLMs into my workflow. Let me look at how LLM’s have fulfilled my hopes so far.</p><p>I’ve found research to be the most impactful feature. I use ChatGPT to quickly find new syntax or refresh my memory of syntax in a language. It helps me find features of libraries, mostly recently for Unity and ChartJS. At a higher level, I’ve found it’s good at collating the various approaches games have used for specific features, like saves or plugins.</p><p>Now granted, it spits out a lot of junk info. It has a bad understanding of product versions and gladly mixes two different APIs together. It does not understand the systems it produces and frequently makes mistakes. Nonetheless, I know what I’m looking for, and combing through this mess is often faster than bare internet searches.</p><p>Can it refactor? We use Claude at work, but as of yet I have only seen Claude do repetitive boilerplate tasks. I don’t know if this is a limit of my skills or a limit of the technology itself. If an LLM can suggest structural edits to English text, it feels like a code tool should be able to do this for code. This is high on my list of values so I’ll keep trying and hope that the tool improves here.</p><p>Debugging is showing promise. As I said in my article, I’m not expecting miracles but hopeful that it finds dumb mistakes. And it’s living up to a lot of that. I find that ChatGPT is doing a good job of understanding fragments of code and finding mistakes. Granted it reports a lot of nonsense as well. I’ve also seen Claude PR reviews, and sometimes it has picked up on difficult bugs. Though again, like ChatGPT, Claude also emits a lot of nonsense.</p><p>For the management aspect, I have yet to see something of value here. Tools like Jira have mangled AI into their system and at best it produces poor task lists. I haven’t even seen the inkling of a tool that can cut across my email, chats, code, and issues and track the status of my project. But I still hope, since this theoretically should be something it can do well.</p><p>Sure, there are a lot of limitations here, but there’s promise. If we try to make these features better they will get better.</p><h4>The Negative Viewpoint</h4><p>I’d liked to focus my negative view primarily on automated reviews and production of new code. They are the key dangers that will explain why a myopic focus on increased volume will come with a constant erosion of code quality.</p><p><strong>Code Review</strong></p><p>At work we are experimenting with including LLM reviews in our PR pipeline. It makes sense. We spend a lot of time writing best practices and educating junior programmers. Why would we not try to encode the information for an automated system? I’m hopeful this can reduce some common back-and-forth, but we need to be attentive to two serious short-comings.</p><ul><li><strong>Hallucinations:</strong> An LLM review can spit out nonsense about how the code is wrong. Even new programmers can usually identify this and discard it. It does however waste time and pepper reviews with distracting junk.</li><li><strong>Opinionated:</strong> An LLM can emit clever and plausible sounding concerns yet be completely wrong. It can also recommend defective alternatives. How much this trips up a programmer depends on their experience, but it will definitely lead code astray.</li></ul><p>Those problems are of the LLM itself, but they can easily lead to complacency. As an additive review tool, LLM can be beneficial. But if we completely replace manual review, the LLMs will train themselves into a downward trajectory as their opinions and hallucinations become an increasing part of the codebase. This negative reenforcement loop can quickly swell to dominate online discussions and publically available code.</p><p><strong>Code Generation</strong></p><p>When I see code generated by Claude, I see a lack of concern for maintenance and completeness. It is better at emitting redundant code than abstracting and simplifying. It does not appear to understand locality of code and happily emits duct tape patches wherever they might work.</p><p>Perhaps this is manageable, but there’s a significant danger about how these end up being implemented in process. If the LLMs become gatekeepers, one could find that junior programmers will just follow its advice to bad code and senior programmers will have to increasingly justify their quality code.</p><p>This is not a foregone conclusion, but I have yet to see an answer to this type of problem.</p><p>I’ve also seen a where I spend my interacting with an LLM. Instead of thinking about the code, I’m having a conversion trying to convince them to emit something sensible. I’m not spending my time reading code and building knowledge about the code-base. I’m not spending my time reading documentation or articles building auxiliary knowledge. My ability to use the LLM effectively comes primarily from this knowledge I’ve been exposed to over my career.</p><p>There’s also a circular logic problem. How can the same tool fulfil reviewing code and generating code? This can heavily bias one’s approach. I am disincentivized from finding good solutions in favour of Claude suggesting approaches that it itself will accept on review.</p><p>But will it work…?</p><h4>An issue of provenance</h4><p>Before addressing what’ll happen, I’d like to take a short, but important, detour here.</p><p>A big challenge for LLM-based coding is the issue of knowledge provenance. The LLM has to learn about coding from somewhere. Fortunately, or unfortunately, as the world needed more software there was an explosion in the number of programmers and sites offering discussions, theory, answers and code.</p><p>In time however, these sites ended up feeding a narrow set of business desires. As every company needed its own app for everything, software companies became the minority presence in the programming world. The programming websites then became focused on providing easy answers for the shovelware that every company needed to have. The goal is the fastest copy-and-paste path to realizing this. Industry was not concerned about stability, security or user experience.</p><p>Take a look at the websites and apps that you use? Do they crash and have weird visual bugs? Does the signup fail or is the UI extremely confusing? When was the last data leak? Have there been new features, or just new ads and tracking? This is all part of the code and knowledge publically available.</p><p>I could talk at length here, but suffice to say, the vast majority of programming knowledge is aligned with those business goals and that quality. And it’s clear that LLMs have been trained from these sites. This doesn’t mean I can’t get helpful code out of them, but it’s an uphill battle and their responses are a clear focus on the “ship it” mantra.</p><h4>But will it work…?</h4><p>We come to the crux: will this approach work? And this is where the issue of provenance and my initial visions for LLMs conflict.</p><p>I firmly believe that the success of LLMs depends on keeping the backbones of our systems as well-crafted tools. This isn’t where the majority of coding is being done though. Most coding is on periphery business-specific tools and bloat. And if this gets easier to write, then more of it will be written. It’s easy to see how it can quickly dwarf the core systems in terms of total code.</p><p>This doesn’t preclude an LLM from being used as an assistant to produce higher quality code. My fear is that if the focus is on shovelware, the LLMs will reenforce to that goal. It’s possible that the feedback loop could undercut the LLM’s value as a quality tool.</p><p>We still have options now though. We’re at a point where an LLM can be used for both ends. Somehow, despite the knowledge slop available, they are capable of improving work process.</p><p>So if you’re a programmer, or any part of a company making software, make a decision about how hard you want to fight for product quality. Then ensure your LLM use aligns with that vision.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d66171ad2eea" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mortoray/quality-or-collapse-in-the-age-of-llm-coding-d66171ad2eea">Quality or collapse in the age of LLM coding</a> was originally published in <a href="https://medium.com/mortoray">Mortoray</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Wrote an Online Escape Game]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/mortoray/i-wrote-an-online-escape-game-25160c67f824?source=rss----e23ac8aa446f---4"><img src="https://cdn-images-1.medium.com/max/1286/1*wNwvyej0YJiCHdmeXtwCaA.png" width="1286"></a></p><p class="medium-feed-snippet">All about the puzzle game I wrote with lots of web tech for maximum entertainment value!</p><p class="medium-feed-link"><a href="https://medium.com/mortoray/i-wrote-an-online-escape-game-25160c67f824?source=rss----e23ac8aa446f---4">Continue reading on Mortoray »</a></p></div>]]></description>
            <link>https://medium.com/mortoray/i-wrote-an-online-escape-game-25160c67f824?source=rss----e23ac8aa446f---4</link>
            <guid isPermaLink="false">https://medium.com/p/25160c67f824</guid>
            <category><![CDATA[games]]></category>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[escape-room]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Edaqa Mortoray]]></dc:creator>
            <pubDate>Fri, 31 Jul 2020 18:48:06 GMT</pubDate>
            <atom:updated>2020-07-31T18:48:06.186Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Essential Interview Code for Lists and Vectors]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/mortoray/essential-interview-code-for-lists-and-vectors-da4d4a2725b3?source=rss----e23ac8aa446f---4"><img src="https://cdn-images-1.medium.com/max/1000/0*XoV4A9GvT00kBaLI.png" width="1000"></a></p><p class="medium-feed-snippet">Lists are perhaps the fundamental data structure in code. There&#x2019;s virtually no program that doesn&#x2019;t use lists. Interviewers love asking&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/mortoray/essential-interview-code-for-lists-and-vectors-da4d4a2725b3?source=rss----e23ac8aa446f---4">Continue reading on Mortoray »</a></p></div>]]></description>
            <link>https://medium.com/mortoray/essential-interview-code-for-lists-and-vectors-da4d4a2725b3?source=rss----e23ac8aa446f---4</link>
            <guid isPermaLink="false">https://medium.com/p/da4d4a2725b3</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[interview]]></category>
            <dc:creator><![CDATA[Edaqa Mortoray]]></dc:creator>
            <pubDate>Mon, 03 Jun 2019 06:57:27 GMT</pubDate>
            <atom:updated>2019-06-03T06:57:27.026Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[A programmer’s introduction to user portraits]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/mortoray/a-programmers-introduction-to-user-portraits-869a0a8eb4db?source=rss----e23ac8aa446f---4"><img src="https://cdn-images-1.medium.com/max/1920/1*EZk40FSSOPa6ddDVG-1dJg.jpeg" width="1920"></a></p><p class="medium-feed-snippet">How to keep the user as the focus of development</p><p class="medium-feed-link"><a href="https://medium.com/mortoray/a-programmers-introduction-to-user-portraits-869a0a8eb4db?source=rss----e23ac8aa446f---4">Continue reading on Mortoray »</a></p></div>]]></description>
            <link>https://medium.com/mortoray/a-programmers-introduction-to-user-portraits-869a0a8eb4db?source=rss----e23ac8aa446f---4</link>
            <guid isPermaLink="false">https://medium.com/p/869a0a8eb4db</guid>
            <category><![CDATA[development]]></category>
            <category><![CDATA[user-experience]]></category>
            <category><![CDATA[ux-design]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[user-research]]></category>
            <dc:creator><![CDATA[Edaqa Mortoray]]></dc:creator>
            <pubDate>Thu, 28 Mar 2019 11:47:28 GMT</pubDate>
            <atom:updated>2019-03-28T11:47:28.049Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[The User]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/mortoray/the-user-7dd548dfb938?source=rss----e23ac8aa446f---4"><img src="https://cdn-images-1.medium.com/max/1920/1*ie6K7pgbox1zWZ3k6m9dsA.jpeg" width="1920"></a></p><p class="medium-feed-snippet">The single most important aspect of programming is the user.</p><p class="medium-feed-link"><a href="https://medium.com/mortoray/the-user-7dd548dfb938?source=rss----e23ac8aa446f---4">Continue reading on Mortoray »</a></p></div>]]></description>
            <link>https://medium.com/mortoray/the-user-7dd548dfb938?source=rss----e23ac8aa446f---4</link>
            <guid isPermaLink="false">https://medium.com/p/7dd548dfb938</guid>
            <category><![CDATA[ux]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[user-experience]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Edaqa Mortoray]]></dc:creator>
            <pubDate>Tue, 05 Feb 2019 08:29:16 GMT</pubDate>
            <atom:updated>2019-02-05T08:29:16.766Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Would you program a human?]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/mortoray/would-you-program-a-human-84e931df380c?source=rss----e23ac8aa446f---4"><img src="https://cdn-images-1.medium.com/max/1920/1*Fk6z3Ix9Oc3xqLKyW-yglQ.jpeg" width="1920"></a></p><p class="medium-feed-snippet">With tales of Crispr babies in the news, I&#x2019;ve been pondering the implications of programming human beings.</p><p class="medium-feed-link"><a href="https://medium.com/mortoray/would-you-program-a-human-84e931df380c?source=rss----e23ac8aa446f---4">Continue reading on Mortoray »</a></p></div>]]></description>
            <link>https://medium.com/mortoray/would-you-program-a-human-84e931df380c?source=rss----e23ac8aa446f---4</link>
            <guid isPermaLink="false">https://medium.com/p/84e931df380c</guid>
            <category><![CDATA[crispr]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[ethics]]></category>
            <category><![CDATA[morality]]></category>
            <dc:creator><![CDATA[Edaqa Mortoray]]></dc:creator>
            <pubDate>Wed, 30 Jan 2019 06:52:32 GMT</pubDate>
            <atom:updated>2019-01-30T06:52:32.223Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[I don’t know how to create a website]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/mortoray/i-dont-know-how-to-create-a-website-3768a4e6b31e?source=rss----e23ac8aa446f---4"><img src="https://cdn-images-1.medium.com/max/1920/1*JFhnOONOTOyRvBiM2FzWrw.jpeg" width="1920"></a></p><p class="medium-feed-snippet">The web has been part of my career since the beginning. I&#x2019;ve created several sites, including apps and games, hell, I&#x2019;ve even created web&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/mortoray/i-dont-know-how-to-create-a-website-3768a4e6b31e?source=rss----e23ac8aa446f---4">Continue reading on Mortoray »</a></p></div>]]></description>
            <link>https://medium.com/mortoray/i-dont-know-how-to-create-a-website-3768a4e6b31e?source=rss----e23ac8aa446f---4</link>
            <guid isPermaLink="false">https://medium.com/p/3768a4e6b31e</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[apps]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Edaqa Mortoray]]></dc:creator>
            <pubDate>Mon, 09 Jul 2018 07:01:02 GMT</pubDate>
            <atom:updated>2018-08-26T13:47:10.307Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Keeping tabs on shady internet authorities — What is Certificate Transparency?]]></title>
            <link>https://medium.com/mortoray/keeping-tabs-on-shady-internet-authorities-what-is-certificate-transparency-bf56cefca16f?source=rss----e23ac8aa446f---4</link>
            <guid isPermaLink="false">https://medium.com/p/bf56cefca16f</guid>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[internet]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Edaqa Mortoray]]></dc:creator>
            <pubDate>Mon, 04 Jun 2018 05:58:38 GMT</pubDate>
            <atom:updated>2018-08-30T08:08:19.694Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7mJMbG1uvSte5xhURCB8PQ.jpeg" /></figure><p>Did you know somebody else could steal your domain name? Even if you’ve properly secured your site and gotten the right security certificates, it’s still possible some people get to the wrong site. It’s not easy, it involves nefarious tricks and exploiting errors, but a determined attacker can misuse your domain name. Certificate transparency is a way to prevent this.</p><h3>A secure domain</h3><p>A bit of background is necessary to understand why we need Certificate transparency. Let’s take a quick look at how we create a secure domain; secure meaning the user feels confident they are on the right site, not an imposter. We need to do this because the internet is a somewhat open place. Between a user and a web server are a lot of other computers. Each of these stops in between is entrusted to do a couple of things:</p><ul><li>Not modify the data it’s getting</li><li>Send the data to the right place</li></ul><p>Encryption solves the first problem. It’s part of the HTTPS standard and verifies the integrity of server’s message to the user.</p><p>The second criteria is a bit more problematic. Your data is travelling across a lot of unknown computers; these are owned and operated by strangers. The owner might be a telecom, a hosting company, or even a government agency. Any one of these could send your data wherever they want, instead of the intended server.</p><p>Though we know our encrypted data from the server can’t be modified, we can’t be sure we’re on the right server. HTTPS also has a solution for this in the form of certificates. A certificate authority issues a certificate to a domain owner. They use the information in this certificate to sign and encrypt their data.</p><blockquote><em>A certificate is a few numbers and textual information stored in a file. Your computer uses these values to establish the identity of a remote server.</em></blockquote><p>The authority only issues the certificate to the proper domain owner, established through real-world means, and doesn’t issue it to another party. So long as all the authorities are trustworthy, this system prevents impersonation.</p><h3>Broken trust</h3><p>Some certificate authorities are proving not to be reliable partners. Some have been breached or store data incorrectly, potentially allowing attackers to impersonate sites. Perhaps even more troubling, some authorities have shown to be corrupt.</p><p>Domain owners have flexibility; they can obtain their domain certificate from any number of authorities. It’s an open marketplace preventing any one organization from having too much control. An increased number of authorities, however, increases the chance of one of them doing something wrong. Just because you only use one authority, any of them can still issue a valid looking certificate for your domain.</p><p>There are some mechanisms in place to prevent this. The browser vendors maintain lists of valid authorities and have techniques to track the source of a certificate. It helps identify major sites, like Google or Twitter, but not as well for lesser used or regional sites. Plus it’s still prone to undiscovered authority corruption.</p><h3>Certificate Transparency</h3><p>Certificate transparency helps detect invalid registrations and corrupted authorities. It’s a public log of all domain certificates issued by authorities. Anytime a certificate is issued it’s logged in a public database.</p><p>How does this help? Domain owners can monitor the logs, spotting all registrations of their domains. Any time a certificate for one of their domains is registered, they get an alert. If the registration wasn’t intended, they could track down the origin and raise an appropriate alarm if unauthorized.</p><p>Until recently this has been an optional mechanism. Nothing requires a certificate authority to add log entries. As of April though, Chrome requires all new certificates to use this mechanism, and both Firefox and Chrome have supported some checking for a few years. New certificates from authorities that don’t use logging are rejected by Chrome, thus blocking access to the website.</p><p>Now, just having the logging isn’t enough, a domain owner must monitor the logs to catch misuse of their domain. The logs are of course public; anybody can check them at any time if there is a question. Additionally, many of the popular sites and support sites you don’t directly access are subjected to regular scrutiny by the security community and the browser vendors.</p><p>Certificate transparency plugs one more potential hole in online security.</p><p><em>If you enjoy my writing then </em><a href="https://twitter.com/edaqa"><em>follow me on Twitter</em></a><em> or </em><a href="https://www.patreon.com/mortoray"><em>become a patron</em></a><em>. Thank you for reading.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf56cefca16f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mortoray/keeping-tabs-on-shady-internet-authorities-what-is-certificate-transparency-bf56cefca16f">Keeping tabs on shady internet authorities — What is Certificate Transparency?</a> was originally published in <a href="https://medium.com/mortoray">Mortoray</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Code Royale, Rust AI coding Competition — Day 1]]></title>
            <link>https://medium.com/mortoray/code-royale-rust-ai-coding-competition-day-1-b5facdea0268?source=rss----e23ac8aa446f---4</link>
            <guid isPermaLink="false">https://medium.com/p/b5facdea0268</guid>
            <category><![CDATA[rustlang]]></category>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[competition]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Edaqa Mortoray]]></dc:creator>
            <pubDate>Sat, 21 Apr 2018 06:01:46 GMT</pubDate>
            <atom:updated>2018-04-21T06:01:46.255Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fmbw4s4e5wKY%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dmbw4s4e5wKY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fmbw4s4e5wKY%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e01535ca0c58e6806a8643a95d207873/href">https://medium.com/media/e01535ca0c58e6806a8643a95d207873/href</a></iframe><p>A new AI bot competition, this one in the style of a tower defence game (sort of). We’re using Rust again. The first day is all about getting out of the Wood League, proving that we understand the rules of the game.</p><p><a href="https://www.twitch.tv/mortoray">Follow/Subscribe on Twitch to watch me live.</a></p><h3>Continuing Day 1</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F3UnKd-cZr_Q%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D3UnKd-cZr_Q&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F3UnKd-cZr_Q%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e8897191612b5c5ff3ba345b3465830b/href">https://medium.com/media/e8897191612b5c5ff3ba345b3465830b/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2fg8GUkZkyGZ-YCYOycu6Q.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5facdea0268" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mortoray/code-royale-rust-ai-coding-competition-day-1-b5facdea0268">Code Royale, Rust AI coding Competition — Day 1</a> was originally published in <a href="https://medium.com/mortoray">Mortoray</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fitting an image to its element frame]]></title>
            <link>https://medium.com/mortoray/fitting-an-image-to-its-element-frame-9cc753b9a5fc?source=rss----e23ac8aa446f---4</link>
            <guid isPermaLink="false">https://medium.com/p/9cc753b9a5fc</guid>
            <category><![CDATA[image]]></category>
            <category><![CDATA[design]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[layout]]></category>
            <dc:creator><![CDATA[Edaqa Mortoray]]></dc:creator>
            <pubDate>Wed, 11 Apr 2018 08:32:30 GMT</pubDate>
            <atom:updated>2018-04-11T08:32:29.840Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K0V0NjU8lZzo3ybxAPLKwQ.jpeg" /></figure><p>Images require various sizing modes to fit in a <a href="https://mortoray.com/2018/03/26/what-is-responsive-layout/">responsive layout</a>. Here we’ll look at the relationship between the element and visual and the basic sizing options. I’ll also look at some additional helpful features, not all of which I’ve implemented before.</p><h3>The element and visual content</h3><p>When considering the <a href="https://mortoray.com/2018/03/29/what-is-a-box-model-ui-element-layout/">box model</a>, it’s common to confuse the context-box with the visual content itself. If the element is collapsing to the size of the visual content, there will not be a difference in size. However, if the element is expanding to fill space, the visuals may not fill the available area.</p><p>Before we get into images, let’s consider this concept with a circle element first. The circle will always be a circle, as opposed to being an ellipse.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/0*Mr6iovLZTXV9C45C." /></figure><p>The circle element can be larger than the visual; the circle centers itself within the available element area, expanding to either the width or height.</p><p>An image element must deal with the same situations: the element size is not necessarily the same size as the image. The correct way to size and position the visual depends on the design; we must provide properties to specify what happens. In Fuse I called this the StretchMode; In CSS this is the background-size or object-fit property.</p><h3>Pixel and Point precise</h3><p>Perhaps the most apparent sizing mode is just using the natural size of the image; regardless of the element size, we’ll draw the image as-is and either clip the edges or leave empty spaces.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/0*CuYgQTjyA_GIuoLa." /></figure><p>This sizing mode is most frequently used in layout where the element ends up the same size as the image. For example, you may use icons in a title bar and let them define its size.</p><p>We need to resolve the question of what “natural size” we’re talking about though. We could use either <a href="https://mortoray.com/2018/03/19/ui-layout-working-with-pixels-points-and-density/">pixels or points</a>. A pixel precise sizing mode is needed when you want an image to be crisp on the display, with no resizing. A point precise mode is used when you want the image to define the size of the element and be consistent across devices.</p><blockquote><em>Pixel precise mode is hard to work with on mobile as the devices have wildly different pixel-to-point densities. If desired it must be used in conjunction with multiple density images: an image element that uses different source files depending on the target density. In Fuse, I added a </em><em>PointPrefer mode to get the best of both worlds: it uses a pixel-precise mode if one of the pixel sizes is close enough to the point size; otherwise, it stretches the closest image to the desired point size.</em></blockquote><h3>Fill and Scale9</h3><p>Images are often used to fill an area, providing a background, border, or perhaps divider. This requires the image to stretch, filling the entire element area, even if the image itself is distorted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*OhAFkz9RZdaPEGtiNk3kkA.png" /></figure><blockquote><em>The above photo helps show the distortion, but the fill feature is not likely suitable for such images.</em></blockquote><p>A helpful feature of stretching is a 9-grid stretching: the image is divided into nine areas and stretched on their own. This allows the creation of borders for a dynamically sized element. CSS provides a rather robust feature with border-image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/0*E9dFe8b_yitVivfi." /></figure><h3>Uniform and UniformToFill</h3><p>If the entire image must fit within the element, and the aspect ratio must be preserved, we use the Uniform mode (called contain in CSS). This scales up the size of the image so that it touches two sides of the available area, leaving the remainder of the element empty.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/0*LsSngfRSRgwXrbeE." /></figure><p>If instead, you wish to fill the entire element and still retain the aspect ratio, we use a UniformToFill mode (called cover in CSS). This scales the image until it reaches all the edges of the element, clipping those parts outside of the element.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/0*cFrybk91Qzf0BsCu." /></figure><h3>Content Alignment</h3><p>Other than the Fill or Scale9 mode, the image doesn’t fit exactly into the available space. This leaves open the question of where to position the image? Should a Uniform image be positioned to the left, or right? Should a UniformToFill image prefer to show the bottom or top of the image?</p><p>Adding a ContentAlignment to an Image allows the user to specify this option. A good default is inheriting the alignment of the image element. If you align an image to the bottom right, you’d expect the visual to also be aligned to the bottom right.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/0*N7MeL7TONLyqxt8h." /></figure><p>One option I never got to implement myself is anchoring; basic alignment doesn’t cover the nuances of design well enough. An anchor allows us to choose a spot of interest on a photo and ensure it’s centered, such as the face for a profile image.</p><p>Extending this concept is an anchoring area: instead of just a point we mark a rectangle of interest in the source image. This would open up the possibility of a Uniform mode that ensures the area of interest is fully shown, and the rest of the image can be used to fill up the empty areas.</p><blockquote><em>I suspect most services require square profile photos as they don’t have anchoring available. With anchoring, you can accept photos of arbitrary sizes, let the user mark the face area, or detect it, and then use the whole image in a responsive design.</em></blockquote><h3>Options</h3><p>For Fuse, we also had a StretchDirection option. It could be one of Both (the default), UpOnly, or DownOnly. An image would only stretch in the allowed directions. For example, if we have an Image {StretchMode=Uniform StretchDirection=DownOnly}, the visual would shrink to fit an element, but would never expand beyond its natural size. In practice, there are limited use-cases for this.</p><p>An optional Fill flag provides an alternative way to fill in the empty area of the element. After positioning the element with the stretching mode, it will be repeated to cover the remaining space. This makes the most sense for a background image, or when used as a brush.</p><p>In addition to anchoring, an Offset property would allow for creating simple animations. Position and size the visual normally, then apply an offset to the resulting position. This would most likely be combined with the Fill flag on tiled images.</p><h3>Other elements</h3><blockquote><em>If you are writing a UI engine you might be interested in knowing how to do all these calculations. Let me know if you’d like such an article — it’d be rather math dominant, though not complicated. In Fuse, you can lookup the </em><em>SizingContainer class which encapsulates most of the logic — albeit the layout calculation code is also part of it.</em></blockquote><p>An interesting point about these sizing modes is that they could equally well apply to any number of element types, not just images. The generic CSS object-fit property goes in that direction. I even implemented a Viewbox once which scaled arbitrary elements, which supported StretchDirection but forced a Uniform fill mode.</p><p>The concept repeats; merging all the diverse uses into a single set of properties would be a good goal for a new UI-engine. Even if some combinations don’t make sense for certain elements, having a common set of properties reduces the learning curve and ensures a rich set of features.</p><p><em>Read more articles about </em><a href="https://mortoray.com/topics/writing-a-ui-engine/"><em>writing a UI Engine</em></a><em>. </em><a href="https://twitter.com/edaqa"><em>Follow me on Twitter</em></a><em>, and to keep me writing, consider </em><a href="https://www.patreon.com/mortoray"><em>becoming a patron</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9cc753b9a5fc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mortoray/fitting-an-image-to-its-element-frame-9cc753b9a5fc">Fitting an image to its element frame</a> was originally published in <a href="https://medium.com/mortoray">Mortoray</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>