<?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[Kaspar the coder - Medium]]></title>
        <description><![CDATA[In ths blog I write about coding and technology. I’m a veteran programmer and tech enthusiasts. I have many friends who are also tech enthusiasts and some of them once in a while write here, too. - Medium]]></description>
        <link>https://medium.com/crewnew-com?source=rss----badaa2ee338e---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Kaspar the coder - Medium</title>
            <link>https://medium.com/crewnew-com?source=rss----badaa2ee338e---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 08:50:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/crewnew-com" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to set selected by default with HTML5 datalist?]]></title>
            <link>https://medium.com/crewnew-com/how-to-set-selected-by-default-with-html5-datalist-7fa206679ba3?source=rss----badaa2ee338e---4</link>
            <guid isPermaLink="false">https://medium.com/p/7fa206679ba3</guid>
            <category><![CDATA[html5]]></category>
            <category><![CDATA[html5-development]]></category>
            <dc:creator><![CDATA[Kaspar L. Palgi]]></dc:creator>
            <pubDate>Mon, 17 Aug 2026 13:09:10 GMT</pubDate>
            <atom:updated>2026-08-17T13:09:11.944Z</atom:updated>
            <content:encoded><![CDATA[<p>With HTML **&lt;select&gt;** one can set the default selected item like this:</p><p><em>&lt;option value=”blaah” selected&gt;</em></p><p>But how to do it with HTML5 and DataList select?</p><p>Googled and didn’t find really a suitable solution so here’s the hack came up with: I added the default value into “<strong>placeholder”</strong> variable and then with the server-side language (I used PHP but you could use anything) I check if the POST/GET is empty and if it is then it means we have the default value.</p><p>Finally, I added into CSS:</p><p><em>::placeholder { <br> color: black; <br>}</em></p><p>So now it also looks right and doesn’t give the user the feeling that it’s a placeholder and something needs to be done even if the default value is the one he would pick.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7fa206679ba3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/crewnew-com/how-to-set-selected-by-default-with-html5-datalist-7fa206679ba3">How to set selected by default with HTML5 datalist?</a> was originally published in <a href="https://medium.com/crewnew-com">Kaspar the coder</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hasura GraphQL Engine & SQL Functions: Unveiling User Similarities and Crafting…]]></title>
            <link>https://medium.com/crewnew-com/hasura-graphql-engine-sql-functions-unveiling-user-similarities-and-crafting-fbec7368784?source=rss----badaa2ee338e---4</link>
            <guid isPermaLink="false">https://medium.com/p/fbec7368784</guid>
            <category><![CDATA[sql-functions]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[hasura]]></category>
            <category><![CDATA[postgres]]></category>
            <category><![CDATA[matchmaking]]></category>
            <dc:creator><![CDATA[Kaspar L. Palgi]]></dc:creator>
            <pubDate>Mon, 17 Aug 2026 13:07:44 GMT</pubDate>
            <atom:updated>2026-08-17T13:07:46.089Z</atom:updated>
            <content:encoded><![CDATA[<h3>Hasura GraphQL Engine &amp; SQL Functions: Unveiling User Similarities and Crafting Matchmaking/Recommendation Systems — A Comprehensive Tutorial</h3><p>In today’s connected world, providing users with personalized experiences and recommendations tailored to their interests and preferences is essential. One powerful way to achieve this is by finding commonalities between users and leveraging these connections to deliver relevant content or suggestions.</p><p>In this tutorial, I will show you how to use the <a href="https://crnw.uk/hasura">Hasura GraphQL engine</a>, and SQL functions to create a versatile system that identifies user similarities and builds matchmaking or recommendation functionality. I will focus on a use case involving users with shared interests, but the approach can also be adapted to various other scenarios. E.g. common friends, mutual followers, similar tastes in media, common skills, matching travel destinations, etc.</p><p>I will show you now how to build the backend for the view in the following image where we can see users sorted by the number of skills that match my skills and display skills in bold &amp; different colours.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*egaRlY1TjsQNNTkTRy9ALg.png" /><figcaption>Blue numbers indicate the <strong><em>id</em></strong><em> primary key in the </em><strong><em>users</em></strong><em> table and the purple number is the </em><strong><em>id</em></strong><em> in the </em><strong><em>interests</em></strong><em> table for easier testing.</em></figcaption></figure><h3>Create tables, relations and sample data</h3><p>Let’s start by creating the necessary tables in our Hasura project. We will have three tables: <strong><em>users</em></strong>, <strong><em>interests</em></strong>, and <strong><em>user_interests</em></strong><em> </em>join the table so we can create an M2M (many-to-many) relationship between <em>users</em> and their <em>interests</em>.</p><p>Create the tables and relations with the structure seen in the following ER diagram manually or import via CLI from Hasura <a href="https://github.com/crewnew-git/user-similarities-matchmaking/blob/main/hasura/migrations/default/1682500970182_minimal-tables/up.sql">migrations</a> and <a href="https://github.com/crewnew-git/user-similarities-matchmaking/tree/main/hasura/metadata/databases/default/tables">metadata</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OrNH7RJev67SQgHhh_cDWg.png" /><figcaption>Minimal required tables/columns</figcaption></figure><p>In the <strong><em>user_interests</em></strong> table add two foreign keys to establish the M2M relationship:</p><ol><li>To reference table <strong><em>users</em></strong>: from <strong><em>user_id</em></strong> to <strong><em>id</em></strong> column.</li><li>To reference table <strong><em>interests</em></strong>: from <strong><em>interest_id</em></strong> to <strong><em>id</em></strong> column.</li></ol><p>If you click on the public database now in the left menu then you can one-click track all the four untracked foreign-key relationships so they will be added also to your API.</p><p>Now, let’s add some test data to tables. Some users, some interests and some matching and non-matchin interests with user <strong><em>id=1</em></strong><em>,</em> for example. Or import from <a href="https://github.com/crewnew-git/user-similarities-matchmaking/blob/main/hasura/seeds/default/1682503862364_sample_data.sql">the seeds here</a>.</p><h3>Creating the SQL Functions</h3><p>We will need three SQL functions:</p><ol><li>To find the amount of common interests with other users and sort the users according to that amount in descending order.</li><li>Get the common interests with each user.</li><li>Get the other interests (that are not common) for each user.</li></ol><p>Let’s start with <strong><em>find_users_by_common_interests</em></strong> function:</p><pre>-- Create a function named &#39;find_users_by_common_interests&#39;<br>-- It takes an input parameter &#39;input_user_id&#39; of type INTEGER<br>-- The function returns a set of rows from the &#39;users&#39; table<br>CREATE OR REPLACE FUNCTION public.find_users_by_common_interests(input_user_id INTEGER)<br>RETURNS SETOF users<br>LANGUAGE sql<br>STABLE<br>AS $function$<br><br>SELECT<br>    u.* -- Select all columns from the &#39;users&#39; table and give the table an alias &#39;u&#39;<br>FROM<br>    users u<br>WHERE<br>    u.id &lt;&gt; input_user_id -- Filter out the user with the same ID as the input user<br>ORDER BY<br>    (<br>        -- Subquery to calculate the number of common interests between input user and other users<br>        SELECT<br>            COUNT(*) -- Count the number of common interests between the two users<br>        FROM<br>            user_interests ui1 -- Aliased &#39;user_interests&#39; table for the input user<br>            JOIN user_interests ui2 ON ui1.interest_id = ui2.interest_id -- Inner join on &#39;user_interests&#39; table to find matching interests between input user and other users<br>        WHERE<br>            ui1.user_id = input_user_id -- Filter the joined table to include only rows where &#39;ui1.user_id&#39; matches the input user ID<br>            AND ui2.user_id = u.id -- Filter the joined table to include only rows where &#39;ui2.user_id&#39; matches the ID of the user being compared<br>    ) DESC; -- Sort the result in descending order based on the number of common interests<br><br>$function$;</pre><p>Open in the Hasura console from “Data” menu the “SQL” from the left bottom and copy the above code there and hit run. Then click in the left top on <strong><em>public</em></strong> database and add the function as root field:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*UB8waLGHMKc2xaK6KosoDA.png" /></figure><p>Now, we get the users sorted by the amount of common interests. <a href="https://github.com/crewnew-git/user-similarities-matchmaking/blob/main/images/find_users_by_common_interests.png">See the image.</a></p><p>Secondly, let’s create the <strong><em>common_interests</em></strong> function, that will return the common interests between the current user (given as an input) and other users:</p><pre>-- Create a function named &#39;common_interests&#39;<br>-- It takes two input parameters:<br>-- &#39;user_row&#39; of type &#39;users&#39; (a row from the &#39;users&#39; table)<br>-- &#39;input&#39; of type JSON, which should contain a key &#39;user_id&#39; with a user ID value<br>CREATE OR REPLACE FUNCTION public.common_interests(user_row users, input JSON)<br>RETURNS SETOF interests -- Returns a set of rows from the &#39;interests&#39; table<br>LANGUAGE sql<br>STABLE<br>AS $function$<br><br>SELECT<br>    i.* -- Select all columns from the &#39;interests&#39; table and give the table an alias &#39;i&#39;<br>FROM<br>    interests i<br>    -- Join the &#39;interests&#39; table with &#39;user_interests&#39; for the target user (input user)<br>    JOIN user_interests target_user_interests ON i.id = target_user_interests.interest_id<br>    -- Join the &#39;interests&#39; table with &#39;user_interests&#39; for the other user (user_row)<br>    JOIN user_interests other_user_interests ON i.id = other_user_interests.interest_id<br>WHERE<br>    -- Filter the joined tables to include only rows where &#39;target_user_interests.user_id&#39; matches the input user ID<br>    target_user_interests.user_id = (input -&gt;&gt; &#39;user_id&#39;) :: INTEGER<br>    -- Filter the joined tables to include only rows where &#39;other_user_interests.user_id&#39; matches the ID of the user being compared<br>    AND other_user_interests.user_id = user_row.id;<br><br>$function$;</pre><p>This function we will add as a computed field in users table. Open the “Modify” tab in users table and in the “Computed Fields” section click “Add Computed Field”:</p><ul><li><strong>Computed Field Name:</strong> common_interests</li><li><strong>Function Name (dropdown):</strong> common_interests</li><li><strong>Table Row Argument:</strong> user_row</li></ul><p>Hit “Save” and finally let’s create the <strong><em>other_interests</em></strong> function to get all the interests of the user that are not common with the current user:</p><pre>-- Create a function named &#39;other_interests&#39;<br>-- It takes two input parameters:<br>-- &#39;user_row&#39; of type &#39;users&#39; (a row from the &#39;users&#39; table)<br>-- &#39;input&#39; of type JSON, which should contain a key &#39;user_id&#39; with a user ID value<br>-- The function returns a set of rows from the &#39;interests&#39; table<br>CREATE OR REPLACE FUNCTION public.other_interests(user_row users, input json)<br>RETURNS SETOF interests<br>LANGUAGE sql<br>STABLE<br>AS $function$<br><br>  SELECT i.* -- Select all columns from the &#39;interests&#39; table and give the table an alias &#39;i&#39;<br>  FROM interests i<br>  -- Join the &#39;interests&#39; table with &#39;user_interests&#39; for the other user (other_user_interests)<br>  JOIN user_interests other_user_interests ON i.id = other_user_interests.interest_id<br>  WHERE<br>    -- Filter the joined tables to include only rows where &#39;other_user_interests.user_id&#39; matches the ID of the user being compared<br>    other_user_interests.user_id = user_row.id<br>    -- Exclude rows with interest IDs that are also present in the &#39;user_interests&#39; table for the input user<br>    AND i.id NOT IN (<br>      SELECT interest_id<br>      FROM user_interests<br>      -- Filter the &#39;user_interests&#39; table to include only rows where &#39;user_id&#39; matches the input user ID<br>      WHERE user_id = (input-&gt;&gt;&#39;user_id&#39;)::INTEGER<br>    );<br><br>$function$;</pre><p>And this function we will add the same way as a computed field in users table. Name it <strong><em>other_interests</em></strong> and also add the table row argument <strong><em>user_row</em></strong>. Hit save and we’re done!</p><h3>Time to test</h3><p>Let’s run the GraphQL query:</p><pre>query GetUsersByCommonInterests($userId: Int!, $limit: Int, $offset: Int) {<br>  find_users_by_common_interests(<br>    args: { input_user_id: $userId }<br>    limit: $limit<br>    offset: $offset<br>  ) {<br>    id<br>    first_name<br>    common_interests: common_interests(args: { input: { user_id: $userId } }) {<br>      id<br>      name<br>    }<br>    other_interests: other_interests(args: { input: { user_id: $userId } }) {<br>      id<br>      name<br>    }<br>  }<br>}</pre><p>And pass in the variables:</p><pre>{<br>  &quot;userId&quot;: 1,<br>  &quot;limit&quot;: 4,<br>  &quot;offset&quot;: 0<br>}</pre><p>Note that the <strong><em>&quot;limit&quot;: 4</em></strong> and <strong>“offset”: 0</strong> state that we’re having 4 items per page and we are in the first page in our pagination. For the second page we’ll just change the <strong>“offset”: 4</strong>. And <a href="https://github.com/crewnew-git/user-similarities-matchmaking/blob/main/graphql/api-response.json">here is the result</a> that matches exactly to the wireframe image in the top.</p><p>Now, we can deliver this GraphQL query to our front-end dev or we can also create a REST endpoint for this. Click in the GraphiQL in the “REST” button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZDv902nBhz4QpWYeyR5UZw.png" /></figure><p>Name it <strong><em>common_interests</em></strong>, for example, and add the URL and into the “Location” input enter: <strong><em>interests/common/:userId/:limit/:offset</em></strong></p><p>So, we add it under interests, name it common and want three parameters: <strong><em>userID</em></strong>, <strong><em>limit</em></strong> and <strong><em>offset</em></strong>. Note that <strong><em>limit</em></strong> and <strong><em>offset</em></strong> are optional. For “Methods” check, for example, GET and POST and hit “Create” button.</p><p>Let’s try it also out, for example, with <a href="https://marketplace.visualstudio.com/items?itemName=rangav.vscode-thunder-client">Thunder Client for VSC</a> that is a great VSC extension so you don’t need to use any extra software like <a href="https://www.postman.com/">Postman</a>, for example, and can test your APIs straight from VSC. First, we need to add into the header <strong><em>x-hasura-admin-secret</em></strong> to the header for authentication or just change the permissions in tables so you we can access publicly: <a href="https://matchmaking.hasura.app/api/rest/interests/common/1/4/0">https://matchmaking.hasura.app/api/rest/interests/common/1/4/0</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3eZdvpwikhiXuSEPradnhA.png" /></figure><p>Here is the whole repository with all the Hasura metadata (including public permissions), migrations, seeds, images, queries and links to other materials used: <a href="https://github.com/kasparpalgi/user-similarities-matchmaking">https://github.com/kasparpalgi/user-similarities-matchmaking</a></p><h3>Next steps?</h3><p>Have a look at the more advanced e-commerce product suggestions that take into consideration multiple aspects:</p><ul><li>Product views</li><li>Product likes</li><li>How recently the user has interacted with the product</li></ul><p>Repository: <a href="https://github.com/kasparpalgi/smart-product-recommender">https://github.com/kasparpalgi/smart-product-recommender</a></p><p>Also, join the Hasura <a href="https://www.facebook.com/groups/383152030606951">Facebook</a> and <a href="https://www.linkedin.com/groups/9224648/">LinkedIn</a> groups for more cool tutorials and subscribe to my Medium posts!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fbec7368784" width="1" height="1" alt=""><hr><p><a href="https://medium.com/crewnew-com/hasura-graphql-engine-sql-functions-unveiling-user-similarities-and-crafting-fbec7368784">Hasura GraphQL Engine &amp; SQL Functions: Unveiling User Similarities and Crafting…</a> was originally published in <a href="https://medium.com/crewnew-com">Kaspar the coder</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Finding Nearby Items and Sorting by Distance: A Guide with Hasura and PostGIS]]></title>
            <link>https://medium.com/crewnew-com/finding-nearby-items-and-sorting-by-distance-a-guide-with-hasura-and-postgis-1735c081b4cd?source=rss----badaa2ee338e---4</link>
            <guid isPermaLink="false">https://medium.com/p/1735c081b4cd</guid>
            <category><![CDATA[postgis]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[hasura]]></category>
            <category><![CDATA[postgres]]></category>
            <category><![CDATA[sql-functions]]></category>
            <dc:creator><![CDATA[Kaspar L. Palgi]]></dc:creator>
            <pubDate>Mon, 17 Aug 2026 13:07:12 GMT</pubDate>
            <atom:updated>2026-08-17T13:07:13.317Z</atom:updated>
            <content:encoded><![CDATA[<p>I found some tutorials on how to find all items within a certain distance from a latitude/longitude (LAT/LON) coordinate, but I didn’t find a way to display the actual distance. This would allow me to sort the items by distance in meters, for example, in ascending order.</p><p>So, how does it work? If there’s a new item in service_requests table (where is also geo_location field that has type geography) then I can query all the items from service_providers table that are within 50km radius and sort them by nearest first:</p><pre>query NearbyProviders($lat: float8, $lon: float8, $max_distance: Int) {<br>  get_nearby_service_providers(<br>    args: { lon: $lon, lat: $lat, max_distance: $max_distance }<br>    order_by: { distance: asc }<br>  ) {<br>    id<br>    travel_distance<br>    distance<br>  }<br>}</pre><p>And then get a response like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/1*y7NuZSmd_KZSKl2uKDRnyg.png" /></figure><p>OK, so how did I do it?</p><h3>Creating a View</h3><p>This view includes all the attributes of service providers and adds an additional attribute called distance, which will later be used to store the geographical distance between a specific point and each service provider.</p><pre>CREATE OR REPLACE VIEW &quot;public&quot;.&quot;service_providers_with_distance&quot; AS<br>SELECT<br>  service_providers.id,<br>  &lt;---- ALL THE OTHER FIELDS I HAVE IN THE TABLE ----&gt;<br>  service_providers.geo_location,<br>  (0) :: double precision AS distance<br>FROM<br>  service_providers;</pre><p>You’ll need to add all the fields to the view that you want to query later.</p><h3>Defining a Custom Function</h3><p>This function will be responsible for computing the distances of the service providers from a specific location (defined by longitude and latitude) and for limiting the results to service providers within a maximum distance.</p><p>The function uses the PostGIS functions ST_SetSRID to assign a spatial reference identifier (SRID) to the geographic points, ST_MakePoint to create a point from the provided longitude and latitude, ST_DWithin to filter the service providers within the maximum distance, and ST_Distance to compute the distances:</p><pre>CREATE OR REPLACE FUNCTION public.get_nearby_service_providers(<br>  lon double precision,<br>  lat double precision,<br>  max_distance integer<br>) RETURNS SETOF public.service_providers_with_distance LANGUAGE plpgsql STABLE AS $$<br>BEGIN<br>RETURN QUERY<br>SELECT<br>  sp.id,<br> &lt;---- ALL THE FIELDS YOU ADDED ALSO TO THE VIEW IN THE SAME ORDER ---&gt;<br>  sp.geo_location,<br>  ST_Distance(<br>    ST_SetSRID(sp.geo_location, 4326)::geography,<br>    ST_SetSRID(ST_MakePoint(lon, lat), 4326)::geography<br>  ) as distance<br>FROM<br>  public.service_providers sp<br>WHERE<br>  ST_DWithin(<br>    ST_SetSRID(sp.geo_location, 4326)::geography,<br>    ST_SetSRID(ST_MakePoint(lon, lat), 4326)::geography,<br>    max_distance<br>  )<br>ORDER BY<br>  distance;<br>END;<br>$$;</pre><p>Ensure that you tick the “track this” checkbox when running these SQLs, so you won’t need to track them later.</p><p>All the code: <a href="https://github.com/crewnew-git/hasura-postgis-distance">https://github.com/crewnew-git/hasura-postgis-distance</a> (star please). There, you also have a query to add an item with the type “geography” field and how to drop the function or view when stuff goes wrong before running a new SQL.</p><h3>That’s it!</h3><p>Go and test it out. Need help? WhatsApp me at <a href="https://wa.me/003725288846">+372 52 888 46</a>.</p><p>With these two steps completed, we now have a view and a function that, when used together, can identify all service providers within a specific distance from a point and sort them from nearest to farthest.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1735c081b4cd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/crewnew-com/finding-nearby-items-and-sorting-by-distance-a-guide-with-hasura-and-postgis-1735c081b4cd">Finding Nearby Items and Sorting by Distance: A Guide with Hasura and PostGIS</a> was originally published in <a href="https://medium.com/crewnew-com">Kaspar the coder</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Rubber Duck Rule: 90% of Problems Get Solved Before You Finish Explaining Them]]></title>
            <link>https://medium.com/crewnew-com/the-rubber-duck-rule-90-of-problems-get-solved-before-you-finish-explaining-them-abc182cd1b71?source=rss----badaa2ee338e---4</link>
            <guid isPermaLink="false">https://medium.com/p/abc182cd1b71</guid>
            <dc:creator><![CDATA[Kaspar L. Palgi]]></dc:creator>
            <pubDate>Mon, 17 Aug 2026 13:05:23 GMT</pubDate>
            <atom:updated>2026-08-17T13:05:24.553Z</atom:updated>
            <content:encoded><![CDATA[<p>One of the first things in my textbook when I give lectures either to IT students or non-tech business people: before seeking help from outside, explain it to the duck!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CjC56tBMWbivHXCD.png" /><figcaption>From Bored Panda</figcaption></figure><p>Programmers keep an actual rubber duck on their desk. When they’re stuck (on a bug, for example), instead of immediately searching Stack Overflow or asking a colleague, they explain out loud to the duck what and how they wanted to achieve, where they got stuck, what they have already tried to do to solve it, etc. Exactly like they would do it for their colleague.</p><blockquote><strong>I’ve always strongly encouraged everyone to first learn how to explain the problem in detail to a rubber duck.</strong></blockquote><p>Why it works: explaining something out loud forces your brain to shift from just scanning for patterns to actually building the explanation from scratch. (Technical) difficulties hide in the gap between what you think your system, device, whatever thing does and what it actually does. Thinking silently, your brain quietly fills that gap with assumptions. Saying it out loud forces you to state each assumption explicitly, and that’s the moment you often catch it: <em>“…and then I press this button exactly like the instructions state, and it should…”</em> — wait, actually instructions asked me to first...</p><p>See some non-programming examples:</p><ul><li><strong>Printer won’t print.</strong> “I clicked print, it should just send it to the printer, which is turned on and connected to…” and you realise you never checked whether it’s actually connected to <em>this</em> Wi-Fi network, or the old one.</li><li><strong>Food recipe isn’t turning out.</strong> “I’m folding the egg whites in, which should keep the batter fluffy…” and you realise you added them before the batter cooled, which is exactly what deflates them.</li><li><strong>IKEA shelf is wobbly.</strong> “This panel should be flush with the side because the dowels line up…” and saying it out loud, you notice you’re describing two panels that were never meant to touch.</li></ul><p>There’s also a second reason it works. You have to explain things as if the listener knows nothing. Just like in the new AI session. So you naturally become more careful and precise than when you’re just thinking it through in your head.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/0*gJneqj8XY0_X6yiK.png" /><figcaption>From Amazon.com</figcaption></figure><p>So the practical takeaway for you: before typing a question to me (or to your tech guy or to anyone), try explaining the problem out loud first to your duck that you can <a href="https://www.amazon.de/-/en/Duckshop-Bath-Squeaky-Specialist-Duckle/dp/B082J534QB/ref=sr_1_4?crid=3J3SWTH04B4HV&amp;dib=eyJ2IjoiMSJ9.9P5JgY0JkO2-c9deRevFjsHGpY7kkHjrSewx33tec2fOujqfpziYhnP5tJxrMylAChurouq_uGE-SkJ_OU9VPccikuosh9YnKDh68oyOlgbcrcMuKFxzsnwKw4_xIjgQzMbt11FDjNfciOLCYxTDiBwoGeegG2VsbG1YJrDV9GFui62mZ4iIMv2_U6hetNC-iTvTeQVe6K_4CHrl197825PmiWtZLYstQZfdreynxrMP_FuTcEh_59vs8wvO7yUsXdf-Q0teSC34Or3SDxcHeXl7e3Bqn990u3oAIDwRA78._9uEzh91TnH-lF-xXKPwWMQHlM3NvXVoxKcRwcXcCis&amp;dib_tag=se&amp;keywords=rubber+duck+programmer&amp;qid=1786356459&amp;sprefix=rubber+duck+programmer%2Caps%2C153&amp;sr=8-4">buy here</a> or maybe <a href="https://www.aliexpress.com/item/1005011918172611.html?spm=a2g0o.productlist.main.23.2ec9d061lGEdWQ&amp;algo_pvid=2ba6e180-99a7-43b8-ad61-91e657547d1f&amp;algo_exp_id=2ba6e180-99a7-43b8-ad61-91e657547d1f-22&amp;pdp_ext_f=%7B%22order%22%3A%2212%22%2C%22eval%22%3A%221%22%2C%22fromPage%22%3A%22search%22%7D&amp;pdp_npi=6%40dis%21EUR%216.71%216.72%21%21%2151.09%2151.09%21%400b8848e317863566176794429e0e8a%2112000057013357710%21sea%21EE%211618263331%21X%211%210%21n_tag%3A-29919%3Bd%3A19a1db82%3Bm03_new_user%3A-29895&amp;curPageLogUid=WcQVLji2TPzF&amp;utparam-url=scene%3Asearch%7Cquery_from%3A%7Cx_object_id%3A1005011918172611%7C_p_origin_prod%3A">here</a>. Step by step, including the part you think is “obviously fine.” A surprising number of the time, you’ll spot the answer yourself mid-sentence, and never even need to send the question.</p><p>I learned this in my 20s before I even heard about rubber duck. I have a friend who is a great programmer and cyberpunk guy. Way smarter than me. But I’m a tech guy and programmer and I’m ashamed to ask him “stupid” questions, so I&#39;m always well prepared with the maximum amount of details for all my questions and at the end of the day, surely even more than 90% of the time I never even contacted my friend.</p><p>But if you still want to ask someone, then of course you can always ask me: <a href="https://www.e-stonia.co.uk/en">www.e-stonia.co.uk/en</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=abc182cd1b71" width="1" height="1" alt=""><hr><p><a href="https://medium.com/crewnew-com/the-rubber-duck-rule-90-of-problems-get-solved-before-you-finish-explaining-them-abc182cd1b71">The Rubber Duck Rule: 90% of Problems Get Solved Before You Finish Explaining Them</a> was originally published in <a href="https://medium.com/crewnew-com">Kaspar the coder</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Designer & Custom Design vs Design System vs Ready Made Template]]></title>
            <link>https://medium.com/crewnew-com/designer-custom-design-vs-design-system-vs-ready-made-template-dfdc78bce5d8?source=rss----badaa2ee338e---4</link>
            <guid isPermaLink="false">https://medium.com/p/dfdc78bce5d8</guid>
            <category><![CDATA[ui-designer]]></category>
            <category><![CDATA[web-design-templates]]></category>
            <category><![CDATA[design-systems]]></category>
            <dc:creator><![CDATA[Kaspar L. Palgi]]></dc:creator>
            <pubDate>Fri, 13 Jan 2023 09:52:37 GMT</pubDate>
            <atom:updated>2023-01-13T10:15:58.904Z</atom:updated>
            <content:encoded><![CDATA[<p>Whether you’re designing a web or mobile app, an e-shop or a website, there’s always the same question. Should I pick a ready-made template/theme or get the designer to draw me a custom solution that fits my needs? And then there’s the third option: use some design system or UI library.</p><p>Let’s compare and for the comparison, we’re going to imagine that we need an app or website that has 5 different views. The first main page opening view has twice as many components as the four following so we could say 6 different simple views.</p><h3>Designer</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KMwmxTHvDOazLiW7xvpGTA.png" /><figcaption><a href="https://crewnew.com/">CrewNew.com</a> — Custom Design</figcaption></figure><p><strong>Pros:</strong></p><ul><li>The most beautiful UI end result.</li><li>The best custom fit for your content.</li><li>Clean modern code.</li></ul><p><strong>Cons:</strong></p><ul><li>Most expensive. The designer will need 3h per every 6 views + the front-end developer will need 4h per every 6 views. Total: 42h.</li><li>If you let the designer create something really different from a typical modern solution then you can expect maybe up to 8h front-end designer hours + if you will need to manage the content yourself then you may expect double the hassle for yourself to manage the content in the way that this super-fancy UI design remains like that.</li></ul><p><strong>Examples:</strong></p><ul><li>Some examples by <a href="https://crewnew.com/">CrewNew</a>’s designer <a href="/service/mailto:josh.s@crnw.uk">Josh</a>: <a href="https://behance.net/crewnew">behance.net/crewnew</a></li><li>Let your inspiration fly by browsing the tons of award-winning designs at <a href="https://www.awwwards.com/collections/search/">awwwards.com</a></li></ul><p>Pick this option if you’re selling high-end products and you need to give the best first impression to your users. The best-looking UI is important and the extra budget brings you value.</p><h3>Design Systems / UI Libraries / Toolkits</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*R5jyL8SOlRQkcBP1ZxiElw.png" /><figcaption><a href="https://skeleton.dev/">Skeleton.dev</a> — UI toolkit</figcaption></figure><p><strong>Pros:</strong></p><ul><li>Around 2x cheaper. No designer at all and the front-end developer will need 3–4h per view. Total: 21h.</li><li>You have tons of components ready to be used immediately and it is super cheap.</li><li>Clean modern code.</li></ul><p><strong>Cons:</strong></p><ul><li>Rather minimalist UI design. Modern and good looking but for sure not anything fancy nor unique.</li><li>Gives you rather components ready-made, not the whole template or ready-made views for your specific needs</li></ul><p><strong>Examples:</strong></p><ul><li><a href="https://www.skeleton.dev/">Skeleton.dev</a> — from the top right menu please, take “Theme” and switch between different themes or pick the last item “Theme Generator” and enter your logo’s colors if you have one.</li><li><a href="https://flowbite.com/blocks/publisher/blog-templates/">Flowbite.com</a> — this is for example a blog template but there are also tons of components that are easy and cheap to use.</li><li><a href="https://www.tailwindtoolbox.com/kits">Tailwindtoolbox.com </a>— tons of more UI kits and building tools</li><li><a href="https://daisyui.com/">DaisyUI</a> — Tailwind CSS with fewer code</li></ul><p>Pick this option if you don’t need to have that super unique look and feel and/or if your budget is lower. It will give you tons of components so you can build anytime anything new in your app pretty cheaply.</p><h3>Ready-made templates</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cwsY1OIkocnCEeo1wNsPAA.png" /><figcaption>Accommodation Rental Template</figcaption></figure><p><strong>Pros:</strong></p><ul><li>If you’re lucky and after spending some hours on finding the right template then you may have a (near) as good solution as the “Designer” option but around 2.5x cheaper</li></ul><p><strong>Cons:</strong></p><ul><li>If you’re not lucky you may just spend some hours searching and playing around and then still go with one of the above options</li><li>If you don’t find the template that (almost) exactly matches your needs then making too many changes to the ready-made solution will make it not that good looking anymore.</li><li>Many templates are built years ago and use old technologies like Bootstrap and jQuery so it may take quite a few hours to convert them into the latest technologies. Searching with the keyword “<a href="https://www.google.com/search?q=tailwind+templates">Tailwind</a>” will give you fewer results but you can be more sure that you get the latest modern codebase that will give you multiple advantages (better cost in development, cheaper to make changes, better SEO, and more).</li><li>Code quality is unknown on paid templates before you buy. Bad code quality means expensive to make changes or add new stuff.</li></ul><p><strong>Examples:</strong></p><ul><li><a href="https://tailwindui.com/templates">TailwindUI Templates</a> — Made by Tailwind makers</li><li><a href="https://demos.creative-tim.com/notus-svelte/admin/dashboard">Creative Tim</a> — App admin panel and landing page template. Creative Tim has more templates and his code is always high quality. Another example from <a href="https://www.creative-tim.com/live/argon-dashboard-pro-svelte">Tim</a>.</li><li><a href="https://shreethemes.in/techwind/index.html#demos">Techwind Themes</a> — all modern latest codebase</li><li><a href="https://monst-nextjs.vercel.app/index-4">Monst</a> — website template example</li><li><a href="https://html.plurk.sbthemes.com/index.html">Plurk</a> — website template example 2</li><li><a href="https://preview.envytheme.com/togy-html/#demos">Toggy</a> — website template example 3</li><li><a href="https://technext.github.io/landwind/#">LandWind</a> — Click “Details” and “Visit this unsafe website” as it is actually very safe to visit and just missing SSL certificates.</li><li><a href="https://themeforest.net/search/tailwind">Themeforest </a>— thousands of templates in the biggest marketplace</li><li><a href="https://accommo-tailwind.vercel.app/landing-page-1.html">Accommodation Rental Template</a> in the picture</li><li>And the list can go on and on and on and on…</li></ul><p>Pick this option if your budget is low but you still want to look as fancy as possible. And if you and you are willing to spend time on searching for ready-made templates. You must be ready to take risks and end up wasting your time and not finding the right template.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dfdc78bce5d8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/crewnew-com/designer-custom-design-vs-design-system-vs-ready-made-template-dfdc78bce5d8">Designer &amp; Custom Design vs Design System vs Ready Made Template</a> was originally published in <a href="https://medium.com/crewnew-com">Kaspar the coder</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Superpower yourself with N8N automations & integration of various systems/APIs]]></title>
            <link>https://medium.com/crewnew-com/superpower-yourself-with-n8n-automations-integration-of-various-systems-apis-b0ee4ca200d4?source=rss----badaa2ee338e---4</link>
            <guid isPermaLink="false">https://medium.com/p/b0ee4ca200d4</guid>
            <category><![CDATA[zapier]]></category>
            <category><![CDATA[workflow-automation]]></category>
            <category><![CDATA[n8n]]></category>
            <category><![CDATA[business-automation-tools]]></category>
            <dc:creator><![CDATA[Kaspar L. Palgi]]></dc:creator>
            <pubDate>Thu, 22 Dec 2022 19:24:43 GMT</pubDate>
            <atom:updated>2023-01-03T13:18:43.041Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://n8n.io/">N8N</a> is a low-code open-source visual workflow automation platform like <a href="https://zapier.com/">Zapier</a>/<a href="https://ifttt.com/">IFTTT</a>/etc. And as it is open-source, it is also free, we can verify that it has a nice clean code, and every programmer can customise it as per their own needs).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*sgRcYeynK6LxsHF4PGsHeQ.gif" /><figcaption>Image from n8n.io</figcaption></figure><p>In the above image, every square is a node doing something and the flow goes from the left to the right sometimes depending on some conditions. This workflow is waiting for some webhook to be triggered to get started. It could be whatever. Some Jira/Trello/Asana/etc task was created for example. Then there’s some data transformation, eg. renaming the “assignee” as an “owner” or whatever data transforming could be needed. Then we save the data in PostgreSQL and also in the Google Sheets. Now, with the IF node, we may be checking if the task was important and if yes then also send the Slack notification.</p><h3>N8N advantages</h3><p>One of the key advantages of N8N is its extensibility. It includes around 400 pre-built nodes for popular services and applications, but users can also create their own custom nodes using JavaScript. This allows users to connect to virtually any service or application and gives them the flexibility to tailor their workflows to their specific needs. With custom coding and HTTP request integration to any REST / GraphQL API, it is quick to connect it with any app out there that has API access.</p><blockquote><strong>The biggest difference between N8N and for example Zaiper is that in N8N you can write a custom JavaScript code in the middle of your workflows as much as you want so you are not limited to what N8N can do for you. You can write whatever you need. It even supports NodeJS (the most popular backend stack for many years).</strong></blockquote><p>N8N also has a strong community of users who contribute to the development of the tool and share their workflows and custom nodes online. That’s the beauty of open-source. This makes it easier for others to find and use pre-built nodes and workflows, or learn from others’ examples to create their own automation solutions.</p><p>Some other open-source advantages: the freedom to code whatever you wish. You can even access the core code to modify it. And the open-source code is also nicely structured and clean. It is meant to be readable and extendable easily for any developer. And you have the freedom to own your own data — you are not locked into one provider. Privacy and freedom.</p><blockquote>N8N got a $12m investment in 2021 so they do have some great programmers in their team on top of the open-source community contributors!</blockquote><h3>Real-life case study</h3><p><a href="https://servicehost.io/n8n-automation-ideas">The list of automation ideas that is being updated and voted by the whole team of brand new N8N cloud platform&gt;&gt;</a></p><p>The customer needed to give their visitors the ability to open the gate 2 times for everybody who bought the ticket from some external ticket sales platform. The customer said that everybody quoted a minimum of one week of coding for this whereas I completed it in a bit less than one working day.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*1D8wk6Fw7h2Do_TbrUD90Q.png" /><figcaption>Click on the image to see it bigger</figcaption></figure><p>There are actually two workflows. The first workflow is simples so I didn’t add an image. It just gets the data from the ticketing system and saves it to the <a href="https://crnw.uk/directus">admin panel/database built in 1h in Directus</a>. It also sends from Gmail the email to the visitor that has a link in it to this workflow (seen in the above image) that will…</p><ol><li>“Webhook” — to catch the link click with the unique token</li><li>“Does the token exist” — verify the visitor and if doesn’t exist then inform the visitor “showTokenMissing”</li><li>“Query Ticket By ID“-get from the Directus via GraphQL information about the ticket so we can with the next IF node check if the gate can be opened or it has been opened already 2 times.</li><li>“Set Call” —will set the data needed to make the phone call that will open the gate lock</li><li>“Mutation Ticket“— will now deduct one call from the number of calls remaining via GraphQL API.</li><li>Finally, we just query all the ticket information and redirect the visitor to the page with all the information.</li></ol><h3>Some more use cases</h3><p>Some smaller use cases with less than 1h of work to set up. Usually, around 10min and I can train you and your team to build such workflows yourself:</p><ul><li>If the invoice gets paid (data from <a href="https://crnw.uk/wise">Wise API</a> or any other bank API or email) then mark it paid in the system and send a notification to the Slack/Discord/Zulip/Telegram/etc #payments channel.</li><li>If there’s a new PDF invoice from somebody or new e-shop order then save it in the accounting software.</li><li>If there’s a new contact in HubSpot or any other CRM then add it also to Google Contacts or wherever else needed + send the second email after 3 days and if no reply then WhatsApp message in 7 days unless it is the weekend and should wait till Monday.</li><li>Discord voice channel<a href="https://i.imgur.com/f9u6UnL.png"> #daily-standup bot</a> to save attendances into a database for statistics on who has been attending and how often</li><li>If there’s a new holiday added by the worker in Directus then add it also to the Google calendar.</li><li>If someone added new Google Contacts, then add it also to all the colleagues in the department.</li><li>If a new colleague is added to the database, then create also accounts at Trello, Slack, Zulip, NextCloud, etc. etc. etc.</li><li>If there’s any change in the competitor’s website/blog/social media then notify in the team chat channel.</li><li>Post automatically into multiple social media channels</li><li>etc. etc. etc.</li></ul><blockquote>I highly suggest reading from <a href="https://www.packtpub.com/product/rapid-product-development-with-n8n/9781801817363">this book’s first chapter the “Why does no code matter?” section here</a>. Scroll down and click “Read more.” It’s a nice publishing company. <a href="https://crnw.uk/hasurali">I‘m half complete writing them about one of the greatest low-code back-end API engines Hasura</a>.</blockquote><p>Feel free to <a href="https://www.linkedin.com/in/kaspar-palgi/">contact me</a> for a free consultation🙂</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0ee4ca200d4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/crewnew-com/superpower-yourself-with-n8n-automations-integration-of-various-systems-apis-b0ee4ca200d4">Superpower yourself with N8N automations &amp; integration of various systems/APIs🚀</a> was originally published in <a href="https://medium.com/crewnew-com">Kaspar the coder</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Agile Software Craftsmanship by Uncle Bob]]></title>
            <link>https://medium.com/crewnew-com/agile-software-craftsmanship-by-uncle-bob-377882b3d8b?source=rss----badaa2ee338e---4</link>
            <guid isPermaLink="false">https://medium.com/p/377882b3d8b</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[agile-vs-waterfall]]></category>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[agile-development]]></category>
            <category><![CDATA[uncle-bob]]></category>
            <dc:creator><![CDATA[Kaspar L. Palgi]]></dc:creator>
            <pubDate>Tue, 29 Nov 2022 15:24:31 GMT</pubDate>
            <atom:updated>2023-01-03T07:16:49.715Z</atom:updated>
            <content:encoded><![CDATA[<p>At <a href="https://crewnew.com/">CrewNew</a> the book <a href="https://www.amazon.de/-/en/Robert-Martin/dp/0132350882?tag=crewnew-21">“Clean Code: A Handbook of Agile Software Craftsmanship” by Robert C. Martin aka. Uncle Bob (€27.19 with this URL)</a> is the Bible we get everybody to read when they join us. Before we ship the paperback, we ask our developers to watch on <a href="https://www.youtube.com/watch?v=7EmboKQH8lM&amp;list=PLmmYSbUCWJ4x1GO839azG_BBw8rkh-zOj">YouTube the 6-part lessons.</a> <em>Not suggested to watch in full unless you are a programmer.</em> Uncle Bob explains well why it is super important to write clean code and how the cost of developing new features will extensionally grow when programmers leave a mess in the code. See in the below image how the hours of work needed (to develop the same functionality) changes as time passes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*0ZLUzo1L9YYi3U_cX2VuvA.png" /><figcaption>Hours of work to program the same feature as time passes</figcaption></figure><p>Shortly, always refactor your code and name your variables, functions, classes etc. properly so everybody understands your code with a minimal amount of comments. Also, utilising <a href="https://www.youtube.com/watch?v=uGaNkTahrIw">TDD (test-driven development</a>) is a must! And pairing — pair programming (<a href="https://blog.cleancoder.com/uncle-bob/2021/01/17/Pairing.html">Pairing Guidlines — Uncle Bob</a> &amp; <a href="https://www.youtube.com/watch?v=ET3Q6zNK3Io">Pair Programming — AgileAcademy</a>) is highly suggested because the proper code review takes the same amount of time as a pairing. I will be writing about this great book longer in the future but let us now move on to the main topic I want to write about today: Agile development.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*77ucFC7LcYGm-ZanVjR8-Q.jpeg" /><figcaption>My #1 favourite book past many years</figcaption></figure><h3>Agile vs Waterfall</h3><p>From the above-mentioned 6-part lessons I highly suggest this particular part below to watch by everybody who deals with any kind of software or programmers (product owners, project managers, CEOs, but also developers ):</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fl-gF0vDhJVI%3Fstart%3D493%26feature%3Doembed%26start%3D493&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dl-gF0vDhJVI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fl-gF0vDhJVI%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/b837cb093b96e1d6e7192e89c37223c5/href">https://medium.com/media/b837cb093b96e1d6e7192e89c37223c5/href</a></iframe><p>First, Bob explains how the waterfall software projects can be managed: “Badly”, by “Hope/Prayer”, with “Great Difficulty” and/or by “Dictate and Motivate.” Obviously, these methods don’t work and end up producing the wrong product, a low-quality product, being late with the end result and/or working 80h weeks. That’s mismanagement, not a development problem! That’s the reason why we use agile — because agile gives us the right information early. Agile tells you <strong>early</strong> how fast actually the features will be completed so you can re-prioritise and re-estimate everything after every sprint (usually 1 or 2 weeks). And thus make better decisions. There’s no software development project where every functionality is in detail known from the very beginning not to speak about when and how exactly it will be achieved. Initial analyses and estimations are a lot of speculation forced on the salesmen by the high competition in the market.</p><p>Speaking about the salesmen, another reason why waterfall methods don’t work is <strong>greed</strong>. Managers and salesmen want all four from the following list of four qualities but you can pick only three. Or give up a little from all of them or any other combinations. That’s a fundamental law of any project (not just a software development project).</p><ul><li><strong>Good quality</strong> (working well and not insanely expensive after some months)</li><li><strong>Fast time to the market</strong> (get it done quickly)</li><li><strong>Cost-effective</strong> (cheap to start / cheap after some time)</li><li><strong>Done</strong> (get all the functionality actually completed / usable)</li></ul><p>If you’re a startup and need quickly the MVP done before rising the next investment then you can drop the “Quality” and once you get proven the market fit and get the £€$ investment then you can refactor most of it and buy the “Quality” later. If you can’t drop the “Quality” then you need to drop either “Done” for some of the functionality that you don’t need right now or the “Fast” or “Cheap”.</p><p>Due to high competitiveness in the market, there will be tons of providers hiding that they trade off the “quality.” Market research shows that mostly from Asian countries but messy code exists <strong>everywhere</strong>, really. Not that honest or just with poor skillset programmers will deliver you cheap’n’quick something that looks like it is working and after some months when you want a tiny small feature, uptade some dependencies or make some changes then you’ll be told “Aaaarhh, this is gonna take now a lot of time to do it. Better do not touch this — this card house is somehow standing right now. Don’t touch it!” Then you will ask some other company/developer who will look at the code and tell you <strong>WTF, WTF, WTF is this SHIT?!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UUI5letYxAljqeS_GqSBqA.jpeg" /><figcaption>This is how the “Clean Code” book starts</figcaption></figure><p>So you <strong>have to</strong> make sure the code is high quality. If you can’t do it yourself then you have to hire a separate senior developer who will be doing the code reviews for you so you get the bad news <strong>early</strong>! Well, actually you need to <a href="https://medium.com/crewnew-com/how-hiring-a-top-freelance-developers-works-78aedd71d866">do some code review even before hiring your developers</a>. So, you have to find a balance between speed and cost. You can cut down the speed by doing a lot yourself from your free time (if you’re a programmer or utilise No-Code solutions). Or hiring slightly cheaper freelance programmers working some hours per week after their daily job.</p><p>You have to make compromises and adjust the knobs in the below radar chart. Give up a little in everything or just pick three out of four as Uncle Bob suggests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*ol19cPmBUFvsNoY36kEd_g.png" /><figcaption>Sample compromise made</figcaption></figure><p>I coded a simple app here to set your goals here: <a href="https://crnw.uk/calc">crnw.uk/calc</a> Move the knobs to define the optimal outcome considering the needs, budget and time you can afford to wait. Also, click on the samples at the bottom to see some typical scenarios from real life.</p><h3>How agile differs from the waterfall?</h3><p><strong>Agile</strong> — set the goals (cheap/fast/quality/done), prioritise all the features (user stories/cards) and plan just the first sprint. After the first sprint, the results will be deployed and everything will be re-estimated, planned and ordered. Everything is in the change. Feature requirements can be changed after every sprint and you can always decide to leave something out and add something else in. The final outcome may be totally different from the original plans but you will be getting the best possible outcome (that maximises all four qualities).</p><p><strong>Waterfall</strong> — first there will be the analyse process eg. a couple of weeks or months depending on the size of the project. Once that is done because the deadline is met and it is not possible to measure when the analyse (or design) is “ready” anyway. They are subjective tasks not like development where it can be clearly defined what means “done”. Sometimes customers/managers don’t even see the need to spend any money on the analyse part at all. They think that the poorly written single-text document is just fine and that the analyse is “done” already. Well, then it is pretty sure that the product will be total crap but let’s assume analyse is done.</p><p>Once the analyse part is “done,” the requirements get frozen and often <strong>EVERYTHING</strong> needs to be estimated. Even before the design part has been started😄 OK, now the design part is started and again some fixed amount of time the designer will improve and finetune the UI and maybe also the UX and when the deadline arrives the design is “ready.” Now, most probably during the design part lot of requirements have been changed. Developers must now spend an awful lot of time re-estimate EVERYTHING. The estimations most probably increase a lot because analyse didn’t write down tons of things that the designer was asked to add and draw once the product owners started seeing what it all looks like (and re-analysing).</p><blockquote><em>Do the requirements change?😄 Of course, they change! It’s software, remember.</em><strong><em> We want the requirements to change!</em></strong><em> Every software team that freezes the requirements, makes a terrible mistake. We don’t want the requirements to freeze. We want the customers to change the requirements AS SOON AS THEY KNOW WHEN REQUIREMENTS NEED TO CHANGE — Uncle Bob</em></blockquote><p>Agile does not make you go fast (doesn’t slow you down either) — agile gives you data and tells you early what is the reality and what exactly in what quality and when can be delivered so you don’t have false expectations and can make the right decisions after every sprint.</p><p>To be continued…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=377882b3d8b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/crewnew-com/agile-software-craftsmanship-by-uncle-bob-377882b3d8b">Agile Software Craftsmanship by Uncle Bob</a> was originally published in <a href="https://medium.com/crewnew-com">Kaspar the coder</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What makes the web app or mobile app fast or slow?]]></title>
            <link>https://medium.com/crewnew-com/what-makes-the-web-app-or-mobile-app-fast-or-slow-3dd86815afaa?source=rss----badaa2ee338e---4</link>
            <guid isPermaLink="false">https://medium.com/p/3dd86815afaa</guid>
            <category><![CDATA[app-speed]]></category>
            <category><![CDATA[software-speed]]></category>
            <category><![CDATA[fast-web-site]]></category>
            <category><![CDATA[web-speed]]></category>
            <dc:creator><![CDATA[Martin Sults]]></dc:creator>
            <pubDate>Sun, 06 Nov 2022 13:59:15 GMT</pubDate>
            <atom:updated>2022-11-09T15:31:42.836Z</atom:updated>
            <content:encoded><![CDATA[<p>It doesn’t matter if it is a website, e-shop, web app, mobile app or desktop app — they all could be annoyingly slow. But it doesn’t have to be like that. They could also be super fast and when you click somewhere, the new view will load instantly or with a slight (maybe 200–300ms) transactional animation. <a href="https://medium.com/crewnew-com/single-page-application-spa-website-development-vs-multi-page-websites-86194e7d8418">Fade/zoom/slide/etc. It will be then a SPA (single-page-application) and my colleague Kaspar has written about it here&gt;&gt;</a></p><p>So, let’s learn what are the factors that affect the speed:</p><p><strong><em>Front-end</em> (FE) technologies</strong></p><p>FE is the picture, text, video, and everything you see with your eyes. How the data will be displayed to you visually — that’s what the FE does. The back-end(BE) deals the magic in the background and provides the correct data to the FE via API in modern apps and then the FE displays it.</p><p>If we use the old-school jQuery in the FE then each new view will be loading a new web page URL and things aren’t that fast vs using some modern FE stack like <a href="https://blog.jannikwempe.com/why-svelte-is-different-and-awesome">Svelte</a> (best), React (most popular), Vue (open-source React competitor) or Angular (the first one but not so popular any more). In the modern FE stack only when you arrive at the website the very first time the loading will be done and during that, we could show some initial content already while the data loads in the background. We can also program it in a way that all the third-party scripts (like Google Analytics, Facebook pixel, etc. etc.) will be loaded a bit later when we have already something to show to the visitor. In that way, we can generate the perfect user experience (UX). Once the initial loading is done we can already pre-render the data that we expect the visitor to click next and provide instant loading.</p><p>Instant loading and cool tiny animations are great UX andhave a cool and modern vibe. And Google knows it so it will also rank you higher in the search results which means huge economic profit for you. No need to pay expensive PPC for AdWords.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t1AHwwi1MfRwzNjxW4-SXQ.png" /><figcaption>Super fast app = super cool app<a href="https://emojipedia.org/smiling-face-with-sunglasses/">😎</a></figcaption></figure><p><strong><em>Back-end</em> technology</strong></p><p>BE dictates how quickly the FE gets the data before it even can start rendering it. If you use some old-school massive back-end stack (PHP Zend, Magento, WordPress, etc.), it might take seconds before the FE even gets the data. For example, for Magento, less than 8GB RAM for the server is guaranteed mega-super-slow.</p><p>But if you use some well-cached modern API solution like <a href="https://medium.com/crewnew-com/hasura-api-engine-elm-lets-go-bug-free-rapid-app-development-4f9630280d72">Hasura</a>, <a href="https://medium.com/crewnew-com/directus-backend-as-a-service-no-code-admin-panel-app-cms-766efb26aa05">Directus</a>, and/or <a href="https://www.projectpro.io/article/10-reasons-why-you-should-use-nodejs/129">NodeJS</a> then the speed difference could be tens of times in the same machine.</p><p><strong><em>Data amount in BE and data complexity</em></strong></p><p>How large is the database (DB) and how “deep” are the queries in the database? For example, if you have 50m products and hundreds of re-sellers who have thousands of shops that have thousands of sales agents etc then obviously it will be slower compared to some small e-commerce solution. Also, is the database just enough normalized and optimised?</p><p><strong>The server’s computing power</strong></p><p>How much RAM and CPU does the server have? If we put our badly written solution to the server with an 8-core Ryzen processor and 32GB RAM then it will be still reasonably fast but you’ll be paying a huge monthly bill, too! Also, it is important how fast the internet connection it has and how far is the server from its users.</p><p>Need a fast app or maybe just some consultation? Let’s chat: <a href="https://wa.me/447588699948">wa.me/447588699948</a> or <a href="/service/mailto:martin.sults@crnw.uk">martin.sults@crnw.uk</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3dd86815afaa" width="1" height="1" alt=""><hr><p><a href="https://medium.com/crewnew-com/what-makes-the-web-app-or-mobile-app-fast-or-slow-3dd86815afaa">What makes the web app or mobile app fast or slow?</a> was originally published in <a href="https://medium.com/crewnew-com">Kaspar the coder</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Directus Backend-as-a-Service & No-Code Admin Panel App (CMS)]]></title>
            <link>https://medium.com/crewnew-com/directus-backend-as-a-service-no-code-admin-panel-app-cms-766efb26aa05?source=rss----badaa2ee338e---4</link>
            <guid isPermaLink="false">https://medium.com/p/766efb26aa05</guid>
            <category><![CDATA[admin-panel]]></category>
            <category><![CDATA[no-code-development]]></category>
            <category><![CDATA[api-development]]></category>
            <category><![CDATA[directus]]></category>
            <category><![CDATA[headless-cms]]></category>
            <dc:creator><![CDATA[Kaspar L. Palgi]]></dc:creator>
            <pubDate>Fri, 22 Apr 2022 15:27:56 GMT</pubDate>
            <atom:updated>2023-01-27T08:39:24.250Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://directus.io/">Directus</a> is open-source BaaS that layers on top of existing SQL database but better builds tables there. Like Hasura (<a href="https://medium.com/crewnew-com/hasura-api-engine-elm-lets-go-bug-free-rapid-app-development-4f9630280d72">I’ve written about the Hasura API engine here</a>) but less mature in this term — the thing that it does best and that Hasura doesn’t have is the no-code powerful, beautiful, customisable, responsive admin panel. Basically, build in most cases without writing a line of code powerful back-office apps and admin panels for your startup or customers — on all your business data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/208/1*nB89AmD_D259Fu46hS9pgA.png" /></figure><p>It used to be buggier like I said <a href="https://www.youtube.com/watch?v=6J2aeP2lNWk">in this YouTube video</a> comparing it with <a href="https://medium.com/crewnew-com/hasura-api-engine-elm-lets-go-bug-free-rapid-app-development-4f9630280d72">Hasura</a> and <a href="https://strapi.io/">Strapi</a> since their both also headless CMS. But since Directus 9 is out, it looks much more beautiful and we’re been using Directus without Hasura in many projects since version 9. Here’s a <a href="https://www.youtube.com/watch?v=4vumessNo40&amp;t=7s">newer video comparing Directus to WordPress and Google Spreadsheet (the easiest CMS ever😄)&gt;&gt;</a></p><blockquote>The further you can take your startup in the beginning with a minimum amount of code(low-code and no-code solutions) the more proud you should be. They say that the code is not an asset, it’s a liability.</blockquote><p>Directus is most modern open-source admin panel builder for developers. It’s modular codebase is 100% NodeJS &amp; VueJs 3. It has already more than 19m downloads.</p><p>OK, so why we still use Hasura, too then?</p><ul><li>Directus doesn’t have <a href="https://docs.directus.io/configuration/relationships/#one-to-one-o2o">1-to-1 relationships</a></li><li>Not as powerful as Hasura with its remote schemas and actions.</li><li>Hasura has more operators in GraphQL + they are better named.</li><li>Some projects (eg. real time chat) also need subscriptions that are missing in the Directus and not so many aggregation options.</li><li>Then there’s an issue with setting default values on a field. On Hasura it’s doing it directly via the table column in SQL but on Directus this is made via the API — and that’s bad for codegen.</li><li>Doesn’t have DB schemas but that’s again a plugin called <a href="https://github.com/APIs-guru/graphql-voyager">Voyager</a> and the same with the GraphQL explorer called <a href="https://github.com/graphql/graphiql">GraphiQL</a> that can be installed separately</li></ul><p>But for really many smaller and also many mid-sized projects it is a great tool. We often use Directus also for the admin panel and Hasura for the API engine so we don’t use Directus’ API. In that case, we create tables/relations in Directus so it looks perfect in the admin panel and then tracks the tables/relations with Hasura.</p><p>It takes just few mins to set it up in local or in VPS or just one-click install it at DigitalOcean marketplace. <a href="https://m.do.co/t/f25ea4cb1e81">Click here to get $100 free credit for it&gt;&gt;</a> And if you need free up to 20min consultation with Directus then <a href="https://crewnew.com/">sign-up here and leave some details about your Directus development project&gt;&gt;</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=766efb26aa05" width="1" height="1" alt=""><hr><p><a href="https://medium.com/crewnew-com/directus-backend-as-a-service-no-code-admin-panel-app-cms-766efb26aa05">Directus Backend-as-a-Service &amp; No-Code Admin Panel App (CMS)</a> was originally published in <a href="https://medium.com/crewnew-com">Kaspar the coder</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Elm Bug-Free Web App Development]]></title>
            <link>https://medium.com/crewnew-com/elm-bug-free-web-app-development-5f14c099a9e7?source=rss----badaa2ee338e---4</link>
            <guid isPermaLink="false">https://medium.com/p/5f14c099a9e7</guid>
            <category><![CDATA[elm-lang]]></category>
            <category><![CDATA[elm]]></category>
            <category><![CDATA[web-app-development]]></category>
            <category><![CDATA[programming-languages]]></category>
            <dc:creator><![CDATA[Kaspar L. Palgi]]></dc:creator>
            <pubDate>Fri, 22 Apr 2022 11:14:14 GMT</pubDate>
            <atom:updated>2022-04-22T11:14:14.848Z</atom:updated>
            <content:encoded><![CDATA[<p>One of the guarantees of Elm is that you will not see runtime errors in practice. Elm treats errors as data so there can’t be any crashing! And it doesn’t have <a href="https://cloud.crewnew.com/s/cakSw8WBYn68Jcx">NULL</a> — so there are never any surprises. Coding without the surprise crashes means hours and hours saved in debugging = cheaper total cost &amp; less stress for programmers when the apps scales. And happy programmers means better software and less money spent on recruiting new programmers!</p><blockquote><em>In Elm </em><a href="https://www.youtube.com/watch?v=IcgmSRJHu_8&amp;t=2s"><em>impossible states are made impossible</em></a><em>. No need to write unit tests!</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*cdr7p3sr5KsAV1U_.png" /></figure><p><a href="https://elm-lang.org/news/small-assets-without-the-headache">Source&gt;&gt;</a></p><p>And Elm is blazing fast! It’s faster than it’s competitors React, Vue and Angular.</p><p>Elm is fast for the end-user because it has runtime system that might sound something big but actually, Elm is way smaller than it’s competitors (see the pic).</p><p>So far: <strong>no bugs, fast &amp; small. Let’s move on!</strong></p><p>And then there’s Elm UI that means that writing and designing the layout should be as <strong>simple and as fun</strong> as possible. And many layout errors (like you’d run into using CSS) <strong>are just not possible to write</strong> in the first place! <strong>Layout and style are explicit and easy to modify.</strong> CSS and HTML as tools for a layout language are hard to modify because there’s no central place that represents your layout.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/341/0*9jffANHEBkaivDTc.png" /></figure><p>Elm — Unbreakable apps development</p><p>So why not is everybody using Elm? One of the reasons is money! React has the Facebook’s bucks, Angular has the Google’s bucks! And Vue is actually nothing drastically new — just little simpler and a bit better React. But they’re all just JS (JavaScript). And people are religious! I mean with this that if you’re told since the beginning of your career JS, JS, JS and you’re been doing your whole life JS then you’re religious to JS and you deny to see something different and way better.</p><blockquote><em>Elm is a delightful functional language for reliable webapps. It compiles to JavaScript, has great performance, no runtime exceptions, and can be embeded easily into existing JS projects without the need for huge rewrites or time investment. </em><a href="https://www.youtube.com/watch?v=kEitFAY7Gc8"><em>freeCodeCamp.org</em></a></blockquote><p>OK, and finally some downsides of Elm:</p><ol><li>The biggest downside is the number of developers available is small compared to for example React developers. But when we started at CrewNew looking around Elm communities we found out that the average Elm developer is in general way better developer than for example React developer. And Elm developers are all Elm fans and don’t want to move away from Elm. Now we just don’t have great Elm developers on board but also some of our old team members started learning Elm (hey, it’s just bit more than 20 pages manual).</li><li>In Elm, you can’t leave small bugs in and move on. You must fix every tiny bug to move on because otherwise, it won’t just compile. In React you could maybe go 15min earlier to enjoy your free time and leave some small bugs in but in Elm you can’t. But it will pay you back later. For example, 3 months later you might be asked to add some functionality and then you can’t remember those small bugs and spend hours thinking why that important feature now doesn’t work! So if you’re building your MVP and want to get everything done super fast = cheap then Elm isn’t the way to go but if you’re building something bigger than you want to scale then in long run Elm means fewer headaches and way less money spent over the years.</li><li>Less working hours for developers means less money for developers. There’s even a video on YouTube: <a href="https://www.youtube.com/watch?v=RFrKffrKCeU">I used Elm in production and it cost me my job</a>. He built a news portal for a major US magazine in Elm and once it was ready he had nothing else to do so he lost his job. With some other stack, he could keep his job by endlessly debugging and fixing.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*TpkRYvard4lLtde8.png" /></figure><p><a href="https://youtu.be/kEitFAY7Gc8?t=2100">Source: Elm crash course — Building unbreakable webapps fast</a></p><p>Elm is like chalk and cheese difference to the kind of development. I’m finding it increasingly difficult to program on other languages since I met Elm. Elm has decreased my confidence in other languages.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f14c099a9e7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/crewnew-com/elm-bug-free-web-app-development-5f14c099a9e7">Elm Bug-Free Web App Development</a> was originally published in <a href="https://medium.com/crewnew-com">Kaspar the coder</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>