<?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[Stories by Michał Jaskólski on Medium]]></title>
        <description><![CDATA[Stories by Michał Jaskólski on Medium]]></description>
        <link>https://medium.com/@michaljaskolski?source=rss-cc8de41999c4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*XPO92a4Lp7vWq4CgWldoGA@2x.jpeg</url>
            <title>Stories by Michał Jaskólski on Medium</title>
            <link>https://medium.com/@michaljaskolski?source=rss-cc8de41999c4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 05:38:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@michaljaskolski/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Dynamically Configured Micro Frontends]]></title>
            <link>https://michaljaskolski.medium.com/dynamically-configured-micro-frontends-851e8396cd6c?source=rss-cc8de41999c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/851e8396cd6c</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[react-microfrontend]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[mfa]]></category>
            <dc:creator><![CDATA[Michał Jaskólski]]></dc:creator>
            <pubDate>Wed, 05 Feb 2025 09:40:50 GMT</pubDate>
            <atom:updated>2025-02-05T09:40:50.812Z</atom:updated>
            <content:encoded><![CDATA[<p>Micro Frontends are — similarly to microservices — a neat way to compose a system from multiple distinct bits. As with microservices there are good and bad scenarios about when to use them. However, it’s not the place and time to discuss this. Today I would like to focus on how to build a micro frontend application that is dynamically configured.</p><p>For the dynamic configuration stack, I will reuse what I have already described in the <a href="https://medium.com/@michaljaskolski/cloud-native-web-applications-092b9321b0ac">Cloud Native Web Applications</a> article.</p><p>There are tons of articles on the Internet on how to build micro frontend applications, so let’s not repeat ourselves. What is not so common is building these systems to by dynamically configured — that is to the components of the system to be run-time configuration driven rather than build time configuration driven.</p><p>I am aware that webpack is becoming an old story now, but it seems that for now it is the most reliable solution for <a href="https://scriptedalchemy.medium.com/understanding-webpack-module-federation-a-deep-dive-efe5c55bf366">module federation</a>, let’s stick to it then.</p><p>Usually webpack configuration for a component to be federated looks like this:</p><pre>module.exports = {<br>  plugins: [<br>    new ModuleFederationPlugin({<br>        name: &#39;app1&#39;,                    <br>        filename: &#39;remoteEntry.js&#39;,                    <br>        shared: { ... },<br>        exposes: {<br>         &quot;./Root&quot;: &quot;./src/Root&quot;,<br>         &quot;./Icon&quot;: &quot;./src/Icon&quot;,<br>        },<br>    }),<br>  ],<br>};</pre><p>And for the host like this:</p><pre>module.exports = {<br>  plugins: [<br>    new ModuleFederationPlugin({<br>      name: &#39;host&#39;,<br>      remotes: {<br>        app1: &#39;app1@http://localhost:3001/remoteEntry.js&#39;,<br>        app2: &#39;app1@http://localhost:3002/remoteEntry.js&#39;,<br>      },<br>    }),<br>  ],<br>};</pre><p>The problem with this approach is obvious and it’s exactly the same one as described in the <a href="https://medium.com/@michaljaskolski/cloud-native-web-applications-092b9321b0ac">Cloud Native Web Applications</a> article — build time configuration of the remotes. We specify not only what are the remotes (which may be fine if your system is built from well known bits all the time), but also where the remote parts are hosted — which is not acceptable in the “build once, deploy everywhere” world.</p><p>What can we do then?</p><p>Let’s do it dynamically using webpack APIs at runtime.</p><p>First — define the additional configuration properties which we’ll store in config.json :</p><pre>export type RemoteRegistration = {<br>    name: string;    <br>    displayName: string;<br>    description: string;<br>    icon: string;<br>    entryUrl: string;<br>    component: string;<br>};<br><br>export type ModuleConfig = {<br>    api?: ApiConfig;<br>    oidc?: AuthProviderProps;<br>    remotes?: RemoteRegistration[];<br>    basePath?: string;    <br>    labels: Record&lt;string, string&gt;;<br>}<br><br>export type AppConfig = Record&lt;string, ModuleConfig&gt;;</pre><p>Then let’s write some react hooks:</p><pre>import { useCallback, useRef } from &#39;react&#39;;<br><br>/* Webpack types */<br>type Factory = () =&gt; any;<br><br>interface Container {<br>  init(shareScope: any): void;<br>  get(module: string): Factory;<br>}<br><br>declare const __webpack_init_sharing__: (shareScope: string) =&gt; Promise&lt;void&gt;;<br>declare const __webpack_share_scopes__: { default: any };<br><br>/* MFE*/<br>export type FileType = &#39;Component&#39; | &#39;Module&#39; | &#39;CSS&#39; | &#39;Html&#39;;<br><br>export interface LoadRemoteFileOptions {<br>  remoteEntry: string;<br>  remoteName: string;<br>  exposedFile: string;<br>  exposeFileType: FileType;<br>}<br><br><br>export function useRemoteModules() {<br>    const loadedScripts = useRef&lt;Record&lt;string, boolean&gt;&gt;({});<br><br>    const loadRemoteFile = async (loadRemoteModuleOptions: LoadRemoteFileOptions): Promise&lt;any&gt; =&gt; {<br>        await loadRemoteEntry(loadRemoteModuleOptions.remoteEntry);<br>        return await findExposedModule&lt;any&gt;(<br>          loadRemoteModuleOptions.remoteName,<br>          loadRemoteModuleOptions.exposedFile<br>        );<br>      }<br><br>    const findExposedModule = async&lt;T&gt;(uniqueName: string, exposedFile: string): Promise&lt;T | undefined&gt; =&gt; {<br>      let Module: T | undefined;<br>      // Initializes the shared scope. Fills it with known provided modules from this build and all remotes<br>      await __webpack_init_sharing__(&#39;default&#39;);<br>      const container: Container = (window as any)[uniqueName]; // or get the container somewhere else<br>      // Initialize the container, it may provide shared modules<br>      await container.init(__webpack_share_scopes__.default);<br>      const factory = await container.get(exposedFile);<br>      Module = factory();<br>      return Module<br>    }<br>        <br>    const loadRemoteEntry = useCallback(async (remoteEntry: string): Promise&lt;void&gt; =&gt; {<br>      return new Promise&lt;void&gt;((resolve, reject) =&gt; {<br>        if (loadedScripts.current[remoteEntry]) {<br>          resolve();<br>          return;<br>        }<br>        <br>        const script = document.createElement(&quot;script&quot;);<br>        script.src = remoteEntry;<br>        <br>        script.onerror = (error: string | Event) =&gt; {          <br>          reject(error);<br>        }<br>        <br>        script.onload = () =&gt; {<br>            loadedScripts.current[remoteEntry] = true;<br>            resolve(); // window is the global namespace<br>        };<br>        <br>        document.body.append(script);<br>      });<br>    }, [loadedScripts]);<br><br>    return {<br>        loadRemoteFile<br>    };<br>}</pre><p>And finally components:</p><pre>import { ComponentType, ReactNode, Suspense, lazy  } from &#39;react&#39;;<br>import { useRemoteModules } from &#39;./use-remote-modules&#39;;<br>import { ErrorBoundary, ErrorBoundaryPropsWithComponent } from &#39;react-error-boundary&#39;;<br>import { RemoteRegistration } from &#39;./types&#39;;<br><br>export type LoadingFallbackComponentProps = RemoteRegistration;<br><br> export type RemoteComponentProps = RemoteRegistration &amp; {<br>    ErrorFallbackComponent: ErrorBoundaryPropsWithComponent[&quot;FallbackComponent&quot;];<br>    LoadingFallbackComponent?: ComponentType&lt;LoadingFallbackComponentProps&gt;;<br> };<br><br>export function RemoteComponent({ <br>    ErrorFallbackComponent, LoadingFallbackComponent, ...props} : RemoteComponentProps) {<br>    const { loadRemoteFile } = useRemoteModules();<br>        <br>    const Component = lazy(() =&gt; new Promise((resolve, reject) =&gt; {<br>        loadRemoteFile({<br>            remoteEntry: props.entryUrl,<br>            remoteName: props.name,<br>            exposedFile: props.component,<br>            exposeFileType: &#39;Module&#39;<br>        })<br>        .then(result =&gt;  {<br>            var moduleResult = result as any;               <br>            var resolvedResult = moduleResult.default ? moduleResult : {<br>                default: moduleResult[props.component.replace(&quot;./&quot;, &quot;&quot;)]<br>            };            <br>            resolve(resolvedResult);<br><br>        })     <br>        .catch(reject);<br>    }));<br>        <br>            <br>    return ( &lt;ErrorBoundary FallbackComponent={ErrorFallbackComponent}&gt;<br>                &lt;Suspense fallback={<br>                    LoadingFallbackComponent ? &lt;LoadingFallbackComponent {...props} /&gt; : null<br>                }&gt;<br>                    &lt;Component /&gt;<br>                &lt;/Suspense&gt;<br>          &lt;/ErrorBoundary&gt;<br>    );    <br>}</pre><p>In our host application, let’s update configuration:</p><pre>{<br>    &quot;host&quot;: {        <br>        &quot;remotes&quot;: [{<br>            &quot;name&quot;: &quot;app1&quot;,<br>            &quot;displayName&quot;: &quot;App 1&quot;,                        <br>            &quot;entryUrl&quot;: &quot;http://localhost:3001/remoteEntry.js&quot;,<br>            &quot;component&quot;: &quot;./Root&quot;,<br>            &quot;icon&quot;: &quot;./Icon&quot;<br>        }, {<br>            &quot;name&quot;: &quot;app2&quot;,<br>            &quot;displayName&quot;: &quot;App 2&quot;,                        <br>            &quot;entryUrl&quot;: &quot;http://localhost:3002/remoteEntry.js&quot;,<br>            &quot;component&quot;: &quot;./Root&quot;,<br>            &quot;icon&quot;: &quot;./Icon&quot;<br>        }]   <br>    },<br>    &quot;app1&quot;: {<br>      <br>    },<br>    &quot;app2&quot;: {<br>     }<br>}</pre><p>Note that, we store configuration for app1 and app2 in the same config, since we while loaded apps will share the context (if all reaquired modules are configured as singletons in webpack module federation config). Therefore the configuration will be read from the host context. There is no reason not to expose the configuration via module federation, yet it’s likely that the configuration in the MFA context will be different to the standalone one.</p><p>Now in the host we build routes</p><pre><br>export function AppRouter() {<br>  const config = useConfig();<br><br>  return (<br>    &lt;Router&gt;<br>      &lt;Routes&gt;<br>        &lt;Route path=&quot;/&quot; element={&lt;Layout /&gt;}&gt;<br>          &lt;Route index element={&lt;Home /&gt;} /&gt;         <br>          {config.remotes?.map((remote) =&gt; (<br>            &lt;Route key={remote.name} path={`${remote.name}/*`}<br>              element={&lt;RemoteComponent {...remote}<br>              ErrorFallbackComponent={RemoteComponentErrorFallback}<br>              /&gt;} /&gt;<br>          ))}<br>        &lt;/Route&gt;<br>        &lt;Route path=&quot;*&quot; element={&lt;NotFound /&gt;} /&gt;<br>      &lt;/Routes&gt;<br>    &lt;/Router&gt;<br>  )<br>}</pre><p>And that’s it!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=851e8396cd6c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cloud Native Web Applications]]></title>
            <link>https://michaljaskolski.medium.com/cloud-native-web-applications-092b9321b0ac?source=rss-cc8de41999c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/092b9321b0ac</guid>
            <category><![CDATA[cloud-native]]></category>
            <category><![CDATA[web]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[Michał Jaskólski]]></dc:creator>
            <pubDate>Tue, 14 Jan 2025 14:23:07 GMT</pubDate>
            <atom:updated>2025-01-15T07:22:54.800Z</atom:updated>
            <content:encoded><![CDATA[<p>First of all, what the hell is cloud native? Quoting Wikipedia on the subject:</p><blockquote>Cloud native computing is an approach in software development that utilizes cloud computing to “build and run scalable applications in modern, dynamic environments such as public, private, and hybrid clouds”.</blockquote><p>But how this translate to building modern web applications using frameworks like React or Angular you ask. Isn’t web cloud native by nature? Not necessarily.</p><p>To conform to modern, cloud native standards of deploying and running the software, it must — in my opinion — fulfill one (at least) very important rule:</p><blockquote>Build once, run everywhere.</blockquote><p>What does this mean? Literally you should be able to build only one software package whether it is a zip file or a container image and use the same package in any environment without a single change to the code base.</p><p>This implies that all the environment specific aspects like configuration must be external to the code of the application. External to the code means not only external to the compiled application code but also to the repository. No more storing secrets in the application code repository. Of course you can have some safe local development defaults there, but nothing else.</p><p>Almost none of the modern frameworks support this nicely. You can have different .envfiles per environment, yet they&#39;re used at build time or even worse during run time if you host your application directly using node.</p><p>The build time configuration is out of the question. So is run time. We don’t want to store all possible configurations with the code and pick one by passing --prod or --dev or any similar argument while running the application.</p><p>Additionally web apps like react that run entirely in the browser without any kind of “backend” (like NextJS) are unable to read environment variables. So we cannot just define settings in environment variables without embedding them in the code during build.</p><p>How then?</p><p>One of the simples and probably most common-sense options is to load the configuration during application startup. This however implies that we need to follow a convention. Because how would we otherwise know where to load the configuration from? Wouldn’t this be a configuration setting to say where the configuration is? A cat and a mouse game indeed.</p><p>Therefore we need to assume that the configuration is always available when we fetch it from for example /config.json.</p><p>Then it’s just a matter of writing some code to handle this</p><pre>export type ModuleConfig = {<br>    api?: ApiConfig;<br>    oidc?: AuthProviderProps;<br>    remotes?: RemoteRegistration[];<br>    basePath?: string;    <br>    labels: Record&lt;string, string&gt;;<br>}<br><br>export type AppConfig = Record&lt;string, ModuleConfig&gt;;<br><br>export const AppConfigContext = createContext({} as AppConfig);<br><br>export const AppConfigProvider = AppConfigContext.Provider;<br><br>export type AppConfigState&lt;T extends AppConfig&gt; = {<br>    config: T | null;<br>    loading: boolean;<br>    error?: Error;<br>}<br><br>export function useLoadAppConfig&lt;T extends AppConfig = AppConfig&gt;(configPath: string = &quot;/config.json&quot;): AppConfigState&lt;T&gt; {<br>    const [config, setConfig] = useState&lt;T | null&gt;(null);<br>    const [loading, setLoading] = useState(false);<br>    const [error, setError] = useState&lt;Error | undefined&gt;(undefined);<br><br>    useEffect(() =&gt; {<br>        setError(undefined);<br>        setLoading(true);<br>        fetch(configPath)<br>            .then(response =&gt; response.json())<br>            .then(setConfig)<br>            .catch(setError)<br>            .finally(() =&gt; setLoading(false));<br>    }, [configPath]);<br><br>    return {<br>        config, error, loading<br>    }<br>}<br><br>export function useAppConfig&lt;T extends AppConfig = AppConfig&gt;(): T {<br>    const context =  useContext(AppConfigContext);<br>    if (!context) {<br>        throw new Error(&quot;AppConfigContext not found. Make sure you have a AppConfigProvider in your component tree.&quot;);<br>    }<br>    return context as T;<br>}</pre><p>Defining the contents of the /config.json</p><pre>{<br>    &#39;myapp&#39;: {<br>        &#39;api&#39;: {<br>            &#39;basePath&#39;: &#39;/api&#39;<br>        },<br>        &#39;oidc&#39;: {<br>            &#39;authority&#39;: &#39;https://uat.hxauth.com/auth/realms/mysystem&#39;,     <br>            &#39;client_id&#39;: &#39;myapp-ui&#39;,        <br>            &#39;scope&#39;: &#39;openid profile email&#39;<br>        },<br>        &#39;labels&#39;: {<br>            &#39;name&#39;: &#39;My App (DEV)&#39;,<br>            &#39;environment&#39;: &#39;dev&#39;<br>        }<br>    }<br>}</pre><p>Loading the configuration</p><pre>function App() {<br>  const { loading, error, config } = useLoadAppConfig();<br>  <br>  if (loading) {<br>    return &lt;LoadingLayout/&gt;<br>  }<br>  if (error) {<br>    return &lt;ErrorLayout title=&#39;Unable to load application&#39; text={error.message} /&gt;<br>  }<br>  <br>  const OIDC_CONFIG = {<br>    ...config?.myapp?.oidc,<br>    redirect_uri: window.location.origin<br>  }<br><br>  return (    <br>    &lt;AppConfigProvider value={config!}&gt;<br>      &lt;AuthProvider {... OIDC_CONFIG}&gt;     <br>        &lt;AppRouter /&gt;<br>      &lt;/AuthProvider&gt;<br>    &lt;/AppConfigProvider&gt;<br>  )<br>}</pre><p>And using it</p><pre>export function Layout() {<br>  const config = useAppConfig();<br><br>  return (<br>    &lt;ModuleLayout title={config?.labels?.name || &quot;My App (DEV)&quot;}&gt;<br>      &lt;Outlet/&gt;<br>    &lt;/ModuleLayout&gt;<br>  )<br>}</pre><p>Ok but we still have to create the configuration file and store it somewhere, right? Yes that is true, however this can be stored in a safe place and deployed together with the application, or even better created on the fly in the environment.</p><p>If you’re using container solutions like Kubernetes this file can be templated and mounted from a volume or config map.</p><p>Since the contents of the file can be created on the fly, the crucial bits like passwords can be retrieved in the environment from a secret manager and exist only during lifetime of the container.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=092b9321b0ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Substring Became a Stream Problem]]></title>
            <link>https://michaljaskolski.medium.com/how-substring-became-a-stream-problem-75bc4dcbe73b?source=rss-cc8de41999c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/75bc4dcbe73b</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[code-review]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Michał Jaskólski]]></dc:creator>
            <pubDate>Tue, 10 Dec 2024 14:53:17 GMT</pubDate>
            <atom:updated>2024-12-10T15:04:04.577Z</atom:updated>
            <content:encoded><![CDATA[<p>In my wildest dreams, I haven’t imagined that some day I’ll write what you’re about to read.</p><p>Some time ago I was having a more-than-usual deep look at a pull request. Not that I have trust issues or something, but I believe that on top of all the automated tested, human involvement is often required.</p><p>Especially if you are working with someone new to your code base.</p><p>To my surprise I noticed this bit of a marvel from one of the senior developers.</p><pre>List&lt;String&gt; list = Arrays.stream(<br>  response.getLocation().getPath().split(&quot;/&quot;)<br>).toList();<br>String id = list.get(list.size() - 1);<br>return id;</pre><p>This code is wrong on as many levels as there are dots there. Of course it works, but it’s wrong. Stop arguing.</p><p>I can’t comprehend why would you create a stream, just to make a list from an array, where there’s array in the first place returned by the split() method.</p><p>Let’s go deeper, why do we need array for that? We just need the last fragment of the url from the Location header. We can even skip error checking because the contract guarantees the format of the url.</p><p>I don’t know what motivated whoever wrote this. Maybe it was some kind of prejudice against the old-school substring() ?</p><pre>return response.getLocation().getPath().substring(<br>  response.getLocation().getPath().lastIndexOf(&#39;/&#39;) + 1<br>);</pre><p>And that’s if you don’t know StringUtils from apache-commons</p><pre>return StringUtils.substringAfterLast(<br>  response.getLocation().getPath(), &quot;/&quot;<br>);</pre><p>Would any tooling catch that piece of code? I can’t recall any. If you do, let me know.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75bc4dcbe73b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Great Liar]]></title>
            <link>https://michaljaskolski.medium.com/a-great-liar-823080f54961?source=rss-cc8de41999c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/823080f54961</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[fake-news]]></category>
            <category><![CDATA[people]]></category>
            <dc:creator><![CDATA[Michał Jaskólski]]></dc:creator>
            <pubDate>Thu, 14 Nov 2024 11:07:12 GMT</pubDate>
            <atom:updated>2024-11-14T11:10:53.383Z</atom:updated>
            <content:encoded><![CDATA[<p>The problem of misinformation on the Internet is nothing new. It is harder and harder to filter out what is fake and verify the data. The use of Artificial Intelligence not only to generate content but also to provide us with the tools to digest the information more easily, does not make the situation better. Why would you read a few pages article, when you can read an AI-generated summary in a fraction of the time?</p><p>Here’s why.</p><p>Watch this brilliant video first:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F040ejWnFkj0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D040ejWnFkj0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F040ejWnFkj0%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d840fabce91f339475e8913e63d21af3/href">https://medium.com/media/d840fabce91f339475e8913e63d21af3/href</a></iframe><p>I am aware it is an hour long, but please do. It’s essential that you do. Yet will not be discussing the matter now, let’s focus on something else.</p><p>Once you watched the entire thing, now read the summary generated by Gemini:</p><blockquote>This video discusses the future of self-driving cars and their potential impact on cities. The video argues that while self-driving cars are becoming a reality, they are not a panacea for urban problems. Instead, they could exacerbate existing issues such as traffic congestion, pollution, and inequality.</blockquote><blockquote>The video highlights the following key points:</blockquote><blockquote>* Self-driving cars are not perfect: They still make mistakes and require human intervention.</blockquote><blockquote>* Self-driving cars could worsen urban problems: They could lead to increased traffic congestion, pollution, and inequality.</blockquote><blockquote>* Cities need to be prepared for the arrival of self-driving cars: This includes investing in public transportation, pedestrian infrastructure, and other measures to reduce car dependency.</blockquote><blockquote>The video concludes by offering a number of suggestions for how cities can prepare for the arrival of self-driving cars. These include:</blockquote><blockquote>* Investing in public transportation: This will make it easier for people to get around without a car.</blockquote><blockquote>* Improving pedestrian infrastructure: This will make it safer for people to walk and bike.</blockquote><blockquote>* Reducing car dependency: This can be done by pricing cars, making it more expensive to drive, and by making it easier to get around without a car.</blockquote><blockquote>By taking these steps, cities can ensure that self-driving cars are used to improve the quality of life for all residents, rather than exacerbating existing problems.</blockquote><p>And please do tell me, can you spot the difference? To me, according to my subjective opinion, the whole message is completely different. We can safely assume, that the summary was generated based on a transcript of the video. And what we can observe, (and what is quite obvious if you think about what AI really is), is that AI doesn’t understand irony or sarcasm, actually AI doesn’t understand anything, since it has no consciousness and ability to think logically — yet, making it misinterpret great portions of the video.</p><p><em>Tin foil hat mode on</em></p><p>Is it just as is, or is it because big corp tuned that way?</p><p><em>Tin foil hat mode off</em></p><p>My point is — don’t trust blindly — not only the content — but even more the derivatives of the content, it might be worth the effort to read or watch something in full, if you care…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=823080f54961" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Great Equaliser]]></title>
            <link>https://michaljaskolski.medium.com/a-great-equaliser-ae92857e12ee?source=rss-cc8de41999c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae92857e12ee</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[people]]></category>
            <dc:creator><![CDATA[Michał Jaskólski]]></dc:creator>
            <pubDate>Wed, 13 Nov 2024 08:38:09 GMT</pubDate>
            <atom:updated>2024-11-13T08:38:09.034Z</atom:updated>
            <content:encoded><![CDATA[<p>I have noticed something off while going through emails recently. That got me thinking.</p><p>People evolve and learn through continuous improvement and this is done through repetition.</p><p>To learn anything you need to practice. If you let algorithms write for you, what is the chance you will compare your initial writing to the one that was generated? Will you reflect, and whatever you will be writing in the future, will you do on your own? Or will you just fall back to the machine doing the work for you.</p><p>Since machines will be doing all the writing, why do we even care how it is written if it is not written by a real person? To feel better or more important if it is for you, “well” written?</p><p>You use generative algorithms to rewrite your email in a more polite and formal manner? I would call this artificial politeness.</p><p>We will not be able do judge the person based on the style of writing.</p><p>What if we meet in real life and we hear the person speaking for the first time. Imagine the potential disappointment.</p><p>It is quite likely, that you will not improve your writing and your ability to express your thoughts in a more concise and appealing manner.</p><p>It seems that generative algorithms are used more and more often. I can see this in the emails, news items, blog posts. Everything starts to look the same.</p><p>In that sense the great Artificial Intelligence looks like a great equaliser. In the end — at the moment — it’s just statistics on steroids.</p><p>Do not get me wrong, I am not saying AI is bad all the way, it has its place, especially if you are lazy or in a hurry (being lazy is a good thing, don’t worry).</p><p>My point is — think about how you use it and how it affects you and your skills… if you care.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae92857e12ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[UX Commandments]]></title>
            <link>https://michaljaskolski.medium.com/ux-commandments-f66d7493484b?source=rss-cc8de41999c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/f66d7493484b</guid>
            <dc:creator><![CDATA[Michał Jaskólski]]></dc:creator>
            <pubDate>Fri, 05 Feb 2021 13:37:21 GMT</pubDate>
            <atom:updated>2021-02-05T13:37:21.018Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OTYgKnfW7liREZKu" /></figure><p>You may have heard the term UX. There’s quite a lot of buzz around it these days. But what is it actually all about? Is it really that important? Let’s begin with the basics: UX is about putting the user first. There are many techniques, and lots of knowledge and science behind it — but you don’t need to know everything at once in order to make your software better and more appealing to the users.</p><p>It all comes down to these 5 words: <strong>empathy</strong>, <strong>context</strong>, <strong>what</strong>, <strong>why</strong>, and <strong>how</strong>.</p><p><strong>Empathy</strong> is the most important one. If you want to make great software, you need to know your users — try to become them and achieve their goals. You need to know the <strong>context</strong> your users are working in. And finally, you need to ask the right questions. Ask your users what they <strong>want</strong> and <strong>need</strong> to do, and<strong> why</strong> they need to do it. Do not ask them how they want to achieve it. They know what they know, and what they are already used to. Here comes your part: you need to deliver the <strong>how</strong>.</p><p>Below you will find U <strong>X</strong> commandments that will encourage you to reflect on your software design and make it more user-friendly.</p><h3>I. Don’t make me think!</h3><p>Our first guideline is taken from the title of a popular book:<a href="http://www.amazon.com/Dont-Make-Me-Think-Usability/dp/0321344758"><em>Don’t Make Me Think: A Common Sense Approach to Web Usability</em></a> by Steve Krug. It is short but worth reading — very to the point. The message is that you do not want to make your user think too much, at least not about <em>how</em> to use the software. After all, computer programs are meant to make our lives easier and more pleasant, not miserable, remember? So let the users focus on the actual subject, their task, not on solving the mystery of using your application. Make it as straightforward as possible.</p><h3>II. Don’t make me remember</h3><p>People usually have a lot on their minds. Do not demand from them to remember everything — every time and everywhere. There are pieces of information that you can collect once and reuse. If there is something that the user will probably need soon, keep it at hand, easily accessible. Show the users that you actually care and listen.</p><h3>III. Let me know what is going on</h3><p>You know that feeling when something is probably happening with the application but you are not sure what it is exactly? Yes, your users know that feeling as well. Be better than others and always show your users what is going on. Indicate progress, state and result. BUT: do not be obtrusive! Nobody likes obtrusive software (“ <em>Would you like to upgrade your operating system?”</em>)<em>.</em></p><h3>IV. Don’t limit me</h3><p>If it is not absolutely necessary, do not pretend to know more than the user. If one wants to use +48 as the phone number prefix, let it go. Probably that is how they have been writing phone numbers for most of their lives. You can deal with it in your software. Do not enforce anything just to make YOUR life easier.</p><p>Another example? Here you go. If you attended computer science classes you probably learned that there is an algorithm to check PESEL number validity (PESEL is the Polish equivalent of the social security number). You may want to use this knowledge and validate all PESELs in the system you are writing and reject all the invalid ones. However, you should know that there are a number of correct “invalid” numbers in the wild, as these numbers used to be calculated by hand in the past. Keep that in mind.</p><h3>V. Don’t overload me with information</h3><p>We suffer from information overload nowadays. Your users probably feel the same. Keep the amount of information exposed to the users to the minimum. You have probably seen them starring at the screen with a big table of big numbers trying to make sense of it. You know why? Probably nobody asked them what they actually wanted to figure out there. It is very likely that they need only a few numbers, not thousands. Ask the “what” and “why” questions.</p><h3>VI. Make correcting mistakes easy and cheap</h3><p>No matter how great the software is and how smart the users are, everyone makes mistakes from time to time. The thing is to make them not hurt as much. So, if at some point your user made an error, let it be fixed easily without the need to redo all the work. Make time travel possible. We all dream of it.</p><h3>VII. Use common and understandable vocabulary</h3><p>Get to know your users and learn about the domain you are working on. You may have your idea of naming things but the software is not <em>for</em> you, remember? Use vocabulary that is understandable for your users. So if they happen to use “Cancel”, don’t make them “Abandon” actions.</p><h3>VIII. Be consistent</h3><p>Once you get the vocabulary right, use it wisely. Do not mix terms. Use the same term for the same action everywhere. Use the same layout for the same UI elements. If you place the “Cancel” button first, put “Save” accordingly everywhere else. Muscle memory is a thing and your users will not hesitate to use it.</p><h3>IX. Remember about the context</h3><p>This is extremely important. Usually there’s a lot of options available to choose from, but not every single one makes sense in the current state of the application or in the current <strong>context</strong>. Do not hide elements that the user should have easy access to. And on the other hand, do not show ones that are irrelevant in a particular scenario.</p><h3>X. Help me make the right decision</h3><p>Remember about not forcing the users to think? This also applies to making decisions. Only if you are absolutely sure about what is better, you may let the users know. BUT: leave the final decision to them.</p><h3>Easy?</h3><p>I hope that this will help you make your software better and encourage you to pay more attention to your users’ needs. After all you are not — probably — writing applications for yourself.</p><p><em>Originally published at </em><a href="https://www.linkedin.com/pulse/ux-commandments-micha%C5%82-jask%C3%B3lski/"><em>https://www.linkedin.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f66d7493484b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>