<?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 Balakrishna Ch on Medium]]></title>
        <description><![CDATA[Stories by Balakrishna Ch on Medium]]></description>
        <link>https://medium.com/@cbkwgl?source=rss-18a878ccc138------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*6yWJomFOsOJMpKyA.jpg</url>
            <title>Stories by Balakrishna Ch on Medium</title>
            <link>https://medium.com/@cbkwgl?source=rss-18a878ccc138------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 05:20:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@cbkwgl/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[Beeware for Android Development]]></title>
            <link>https://medium.com/@cbkwgl/beeware-for-android-development-a4ab2f4a06c3?source=rss-18a878ccc138------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4ab2f4a06c3</guid>
            <category><![CDATA[toga]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[python-mobile-app]]></category>
            <category><![CDATA[android-python]]></category>
            <category><![CDATA[beeware]]></category>
            <dc:creator><![CDATA[Balakrishna Ch]]></dc:creator>
            <pubDate>Sat, 23 Nov 2024 12:56:50 GMT</pubDate>
            <atom:updated>2024-11-23T12:56:50.144Z</atom:updated>
            <content:encoded><![CDATA[<p>Let me be frank here. The UI experience with Beeware is not as great as what you expect it to be. But, it‘s tooling is really great. You can still make things work in whatever way you want and it takes a level of magic to make things work, but overall, if you want something quick, I will go to Beeware. Why not the more mature Kivy or more elegant Flet? Two reasons</p><ol><li>Tooling — it’s really a horror show trying to build an apk in either of them. In toga, it’s a breeze.</li><li>Unlike Beeware’s Toga which defaults to native UI elements(a part of the problem is, toga’s UI defaults to the derelict WinForms for Windows), the rest of them have their own widgets which may look jarring in some cases</li></ol><p>All things apart, let’s see what Beeware is all about. It’s not a single thing but it’s a set of tools doing the work for you. What we are interested in all the time are Toga — the UI development package and Briefcase, it’s package manager.</p><p>The process is fairly straightforward —</p><pre>briefcase new</pre><p>will create a new package. It will ask a standard set of questions to define your package — app name, licensing and all.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/1*dGRBpYdLDrfHb88M8Z0jYQ.png" /></figure><p>As you see, it supports multiple UI options. But, you are looking at Android here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*zlLfe3vpGJRXO6N8ubLa9Q.png" /></figure><p>The scaffolding operates through src/main.py and a test run can be done in developer mode through</p><pre>briefcase dev</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0a9kycsM54Y4jZTnVOoo6A.png" /></figure><p>As like the other Python options — Kivy and Flet, Briefcase also runs the script as an application. In the case of Toga, the base package looks as above.</p><ol><li>You define a <strong>main_box</strong>(name is upto you) and assign it to <strong>toga.Box()</strong></li><li>This main box is set as window content and is displayed</li></ol><p>Now, the whole development is all about creating widgets and stacking them. Once your work is done, all you need to do is <strong>add</strong> to it’s parent. A basic piece looks something like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*JiEoZmJ_umcbjpLRMs7w7A.png" /></figure><p>It’s pretty straightforward, I would say. The widget reference is below.</p><p><a href="https://toga.readthedocs.io/en/stable/reference/api/index.html">API Reference — Toga 0.4.8</a></p><p>However, there are three things which you need to focus on</p><ol><li>Scroll Container: Include scroll container as parent for your main box.</li><li>Styling: One of the options for widget is styling — The Pack Style Engine. It requires some effort to build a great interface. Not impossible, but needs a bit of concentration, that’s all.</li><li>Think of a way to make reset button work.</li></ol><p>A finished app looks something like this — as I said above, styling needs a bit of polishing here(and as of now, as this is a personal app for daily use, function is the only thing which matters to me)!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*UNwp5T73Cav523A74UYp8g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*9Pqy5Ml1KvY2WraUL94D7A.png" /></figure><p>If you notice closely, both the tables are having different width. Why so? That’s because the width of the column defaults to something near to zero.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/132/0*8Z7egIpDmpPeYVJH.png" /></figure><p>All you need is a hack — not elegant, but it will work.</p><pre>style=Pack(flex=1, width=table_output_length(other_options)),<br>----------------------------------------<br>def table_output_length(df):<br>    df = df.astype(str)<br>    largest_column = df.applymap(len).max().idxmax()<br>    max_length = df[largest_column].astype(str).map(len).max()<br>    width = 5 * int(max_length) * int((len(df.columns) + 1))<br>    return width</pre><p>The selection dropdown widths is also not optimal and needs some fixing.</p><p>Another very nice option in toga is widget replace. If you notice the two screen images above, the first button is <strong>Confirm</strong> while the second is <strong>Plot Trip</strong>. You need not <strong>add </strong>and <strong>remove </strong>widgets, you just need to replace the old one with the new one!!</p><pre>  place_box.replace(starting_from, start_loc)<br>  place_box.replace(going_to, end_loc)<br>  button_box.replace(confirm_btn, plot_trip_btn)</pre><p>The other interesting part is, let’s say, if you are updating the values inside a function. It’s always tricky for me to refer them out of that function. Rather than wasting time on that, simply call the children for that entity and fetch their values. You know what their relative position is!!</p><pre>place_box = toga.Box(children=[starting_from, going_to])<br>------------------------------------------------------------<br>array_inital.append(place_box.children[0].value)<br>array_inital.append(place_box.children[1].value)</pre><p>The app is developed. How do you build a package out of it?</p><pre>Development Part -&gt;<br>briefcase create<br>briefcase update<br>briefcase build<br>briefcase run<br><br>Build msi -&gt; <br>briefcase create<br>briefcase package <br><br>Build apk -&gt; <br>briefcase create android <br>briefcase build android<br><br>Build web -&gt; <br>briefcase run web</pre><p>It’s just <strong>briefcase build, briefcase update </strong>and <strong>briefcase package</strong>. You need to include the libraries in <strong>pyproject.toml.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*T4HU5BrHLmX-edK-FLqmXw.png" /></figure><p>The first android build will take 20–25 min but the subsequent ones will be completed in less than a minute.</p><p><strong>briefcase dev </strong>will still run without updating pyproject.toml but when you try to build without adding the packages to the toml file will give you an error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*QEXp-22qZZSIUMQPrY8Pow.png" /></figure><p>As complete a solution you can get in python as possible!</p><p>Now, a word on the other two — Kivy and Flet.</p><p>Of the three — Beeware, Kivy and Flet, Beeware has got the best tooling and the worst developer experience but in the case of Flet, it’s reverse. The development experience is elegant and straightforward(it mimics flutter and uses the same widgeting) but the tooling is a horror show. You just cannot create an apk having non-native libraries(those partly written in C — as basic as pandas!!) and to make it work is going to be a really serious exercise in itself. Kivy is decent enough but it too has got these tooling problems. Besides, kivy tooling can be done only on linux — meaning it’s either WSL or Google Colab. Besides, it’s a standard complaint Kivy has got — making tooling work seamlessly takes more effort than building an application.</p><p>In this aspect, I will openly say whoever created Beeware knew what pains the developer the most — it’s the tooling part. There is always a hack for a widget and and if something doesn’t work, a developer does something to make it work but most of them hate tooling — they focussed on tooling — the last mile of any project than on the whole project.</p><p>By the way, this is how the android version looks like(yes, some clean up is needed but I can live with this).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/308/0*ymTpDkP6-2N-tSYO.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4ab2f4a06c3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IT Trends for 2025]]></title>
            <link>https://medium.com/@cbkwgl/it-trends-for-2025-76ea38002700?source=rss-18a878ccc138------2</link>
            <guid isPermaLink="false">https://medium.com/p/76ea38002700</guid>
            <dc:creator><![CDATA[Balakrishna Ch]]></dc:creator>
            <pubDate>Sat, 02 Nov 2024 19:53:14 GMT</pubDate>
            <atom:updated>2024-11-02T20:01:18.832Z</atom:updated>
            <content:encoded><![CDATA[<p>I was watching a video today. It talks about two main themes — simplicity of code and freelancing. Forget freelancing. This is more about simplicity. Let me present you two different paradigms.</p><ol><li>Object Oriented Programming</li><li>React Framework</li></ol><p>Both these concepts are more than a decade old and they were answers to the problems at that time — the languages we had at that time were not as high level as the languages today and they needed a kind of structuring so that we don’t lose track of things. It really made sense. But now, languages literally have concepts like encapsulation and abstraction built into them by default. Do we really need to go through this verbose OOP model, rather than developing things which work and which are more readable?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*duUUzW4lRiPQzKr2DDsp_A.png" /></figure><p>For instance, I wrote a whole route planner for London(start location, end location, mode of transport along with either starting time or reaching time — and it throws a system alarm) in what? 250 lines of code. On the other hand, I am trying to write a whole WMS system in Flet — I am assuming it will not cross more than 750 lines of code. Think. When a whole WMS system can be written in such small number of lines, what exactly do you suppose is going to chaos if we don’t follow a proper structure, that too, when half of them are already inbuilt into every programming language?</p><p>The other one, React Framework. React was an answer to the old style web development and answered a few questions — availability and ease of refreshing data. Speed, masking of data and all those were small problems — when the focus is on availability, why bother about speed? But now, it’s the same speed which is harming React. It was a solution to a problem of that era.</p><p>Both of them have only one thing in common — a solution to a problem of that era. The bigger question is this. A decade or two after the original question is answered, has the solution become sub-optimal(I will say sub-optimal, not irrelevant)? And that brings us to the newer question — what is the architecture and development model for 2024? What new have we formulated to make our lives easier?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=76ea38002700" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Some thoughts on installing C++ on Windows]]></title>
            <link>https://medium.com/@cbkwgl/some-thoughts-on-installing-c-on-windows-ea8778ba9724?source=rss-18a878ccc138------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea8778ba9724</guid>
            <category><![CDATA[cpp-installation]]></category>
            <category><![CDATA[cpp]]></category>
            <dc:creator><![CDATA[Balakrishna Ch]]></dc:creator>
            <pubDate>Sun, 20 Oct 2024 21:41:35 GMT</pubDate>
            <atom:updated>2024-10-20T21:41:35.522Z</atom:updated>
            <content:encoded><![CDATA[<p>Is the complexity of installing C++ a reason why the language is considered one of the hard nuts to crack? Let me be fair here. Once you start coding and have some decent experience, language doesn’t matter much. Rust or Python, give me some time, I will cook up something — or for that matter, I should be able to understand most of the code written in a considerable number of languages.</p><p>But, there is another aspect here — the ease of installing the language. Make no mistake, C++ is a hell. A language which existed for more than 40 years now, we should have some standard things, right — like a compiler and a preferred IDE? But, C++ starts picking your brain from then on.</p><p>Now, see the mess which is created. I will tell you the sequence of events I was going through</p><ol><li>Install mingw — there is no standard installer. It’s a compressed folder which you need to extract and add to system path variables. Seriously?</li><li>When I extracted the folder, a critical file was quarantined by the anti-virus. Meaning mingw is not useful. Rather than breaking my head adding the file to exception(which I know is not correct), I tried to find a second way</li><li>The option given by VSCode using MSYS2 worked cleanly. But again, it’s a circus for a novice.</li><li>Next question. Which IDE to use? Again, nothing preferred there. So, VSCode it is. I know C++ is decently integrated with Visual Studio is a beast with resources and I don’t want to use it unless there is no other option. VSCode, I was able to make it work but it started to default to gcc and not g++. I wasn’t able to break that.</li><li>Irritated, I moved to CodeLite. I was able to use it(again with some help and some undecipherable jargon) but the interface, I wasn’t that comfortable with — working with VS and VSCode, the interface was a bit painful for me to use.</li><li>I found a non-standard extension — Code Runner in VSCode when watching some youtube videos over this. And that worked.</li></ol><p>Just think. For a standard programming language, is this what you would think? Why don’t we have a single click integration like Python or Go or even Rust? As I told before, it is possible a considerable number of people fled from C++ just because of this — like the way I ran away from Flutter just because of Android Studio’s resource requirements. For a 30 MB apk, you want me to burn 5 GB space and a GB+ resources? Seriously?</p><p>If a small thing like a cleaner installation process can’t become a priority of the programming language ecosystem, one of the largest in the whole world, why do you suppose the language will become popular? It will always be a necessary pain to tolerate but not something people want to use, at least the new generation developers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea8778ba9724" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simple or Exotic — A case of Web Scaffolding]]></title>
            <link>https://medium.com/@cbkwgl/simple-or-exotic-a-case-of-web-scaffolding-b6945eeb3b4b?source=rss-18a878ccc138------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6945eeb3b4b</guid>
            <category><![CDATA[webpack]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Balakrishna Ch]]></dc:creator>
            <pubDate>Sun, 07 Jul 2024 12:39:39 GMT</pubDate>
            <atom:updated>2024-07-07T12:39:39.243Z</atom:updated>
            <content:encoded><![CDATA[<h3>Simple or Exotic — A case of Web Scaffolding</h3><p>A few days ago, I was looking into web scaffolding with Go. It was really superb. The structure, sophistication and ease of use for the end user is really good. How do you do it? You create templates, you build a cache using them(load time cache — and if there is something fresh and if it’s not available, you add to the cache thereby ensuring you don’t spend too much time caching the whole package) and launch the site. Now, one nice thing you do is using a middleware multiplexer to route the templates to the correct endpoints. It’s a sophisticated package and all you need to do is refer to these go templates to deliver the content.</p><p>Now, let’s look at the folder structure</p><ul><li>main.go — overall wrapper</li><li>routes.go — write the routing logic</li><li>handlers.go — code referring to each route considered</li><li>render.go — template cache</li><li>templates — a bunch of files for each webpage — and a base template to leverage upon</li></ul><p>While everything is scaffolding, this is the real code which matters to me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*R3vVcg-aOy62aKl8JN3-JA.png" /></figure><p>which will be served using the base template.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/344/1*F8ojicZvZcNKXzUkt3fk_g.png" /></figure><p>Now, everything is intuitive from now on — you just have your own variables and write logic on back of that. Clean enough, eh? This is the structure I have got based on a <a href="https://www.udemy.com/course/building-modern-web-applications-with-go">Udemy Course</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/1*kN-GbX4sJ50jTBUzs8mq1Q.png" /></figure><p>Now, let’s go to a webpack based render. This turned out to be a no brainer. IN fact, if you look at this, all you need is a webpack config file and nothing else and a corresponding entry in package.json!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*YEXA1z_ovgQ88sZrZYi61w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/295/1*vfkDdkKyWZHkOpigYyInuQ.png" /></figure><p>This is my folder structure. The rest of the files you are seeing are just installed packages and webpack scaffold.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/208/1*fi2dtIM12fDQC4o87TItwA.png" /></figure><p>This makes one wonder why should someone go an offbeat track to develop something — I have no complaints on Go. It’s really good and intuitive. I don’t even have a problem with learning Go to do my work if it is faster than Javascript or Python for the backend business. But then, do you need something to do your work especially when you have a more standard, more simple and better alternative already available?</p><p>I want to pose a serious question here — going by the fact JavaScript is the standard for web frontend, what use cases do you have for not using Javascript but use some other languge or framework? Now, let me establish a constraint around this. Performance becomes a serious matter if I have may be 50,000 or 100,000 concurrent users. But, if I have those many users, I have earned sufficient money to invest in optimizing my software. Allex Holub noted the same.</p><p><em>If you don’t have 270M users, a quarter of which can be on the system simultaneously, you don’t need the complexity necessarily to support that. Build exactly as much architecture as you need. Build it so that it can grow incrementally. Do not future-proof.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6945eeb3b4b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Small XML Usecase]]></title>
            <link>https://medium.com/@cbkwgl/a-small-xml-usecase-a6f4842d9fea?source=rss-18a878ccc138------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6f4842d9fea</guid>
            <category><![CDATA[xml]]></category>
            <dc:creator><![CDATA[Balakrishna Ch]]></dc:creator>
            <pubDate>Sat, 22 Jun 2024 23:08:00 GMT</pubDate>
            <atom:updated>2024-06-22T23:08:00.713Z</atom:updated>
            <content:encoded><![CDATA[<p>It so happened that recently, my team, in all it’s flourish, and ignoring it’s capabilities accepted a data reconciliation. So, what are they supposed to reconcile? Data triggered out of one application with data which reached their application. Where is the problem? The source application shared only the XMLs triggered and the destination application has no forget advanced data management capabilities, not even a proper SQL querying option. By the time I entered the game, the damage was already done.</p><p>When I asked my team member what is he doing, he said he is converting the XMLs into excel files using some tool. And that too, one file at a time. He had around 200 files with him and by the end of the reconciliation exercise, there were 4500 files!! How long do you suppose such a thing will happen? First thing I did was, forget XML formatting, syntaxes, everything. I combined all 200 files into a single file. Basic DOS command —</p><pre>copy *.* 1.txt</pre><p>Dump the file into an excel sheet and use filters to extract the relevant columns. It’s painful but it was faster. But then, when I reached home after this, I realized that is also going to be painful and decided to give him something more civilized.</p><p>The framework is this.</p><ol><li>Forget about the XML, XML structure and contents. All we want is four tags from that.</li><li>Parse the folder containing the files and copy only the relevant tags into a separate file. Now, format that in the shape of a proper XML with dummy tags — file level wrapper and sub-segment level wrapper. Something like this —</li></ol><pre>&lt;Payload&gt;<br>  &lt;ReceiptInformation&gt;<br>    &lt;ReceiptDate&gt;xxx&lt;/ReceiptDate&gt;<br>    &lt;ReceiptIdentifier&gt;xxx&lt;/ReceiptIdentifier&gt;<br>    &lt;Product&gt;<br>      &lt;ProductID&gt;xxx&lt;/ProductID&gt;<br>      &lt;ProductQuantity&gt;xxx&lt;/ProductQuantity&gt;<br>    &lt;/Product&gt;<br>    &lt;Product&gt;<br>      &lt;ProductID&gt;xxx&lt;/ProductID&gt;<br>      &lt;ProductQuantity&gt;xxx&lt;/ProductQuantity&gt;<br>    &lt;/Product&gt;<br>  &lt;/ReceiptInformation&gt;<br>  &lt;ReceiptInformation&gt;<br>    &lt;ReceiptDate&gt;xxx&lt;/ReceiptDate&gt;<br>    &lt;ReceiptIdentifier&gt;xxx&lt;/ReceiptIdentifier&gt;<br>    &lt;Product&gt;<br>      &lt;ProductID&gt;xxx&lt;/ProductID&gt;<br>      &lt;ProductQuantity&gt;xxx&lt;/ProductQuantity&gt;<br>    &lt;/Product&gt;<br>    &lt;/ReceiptInformation&gt;<br>&lt;/Payload&gt;</pre><p>3. Now, you have a very simple XML. All you need to do is build a CSV or a table out of this</p><p>This approach actually turned out to be better than parsing through the complex XML, extract the tags into a table and then go to the next XML because we haven’t used any logic here — we just dumped only the relevant information a single file and played with it.</p><p>This was good from the system performance angle as well — the uncompressed mass of 4500 files had about 500 MB in total size while this mashed up custom XML had only 65 MB in size. This really mattered because my computer has gone crazily slow after upgrading to Windows 11 more than a year ago.</p><p>Now, as time passed, new files were coming in as compressed folder bundles. Even uncompressing them was turning unwieldy. Irritated, I extended the code to handle that scenario as well — the final code stands thus</p><ol><li>Extract all the compressed folders in the path</li><li>For each XML file, rename the tags to make more sense</li><li>Extract only the relevant tags into a new mocked up XML</li><li>Extract the XML data as a csv file</li></ol><p>It’s a different thing though, I had to strictly tell the teamnot to accept this kind of impossible data requests and demand data to be shared in a more readable form.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6f4842d9fea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PromptFrames — Leveraging AI for UI Design]]></title>
            <link>https://medium.com/@cbkwgl/promptframes-leveraging-ai-for-ui-design-e560c3c12a22?source=rss-18a878ccc138------2</link>
            <guid isPermaLink="false">https://medium.com/p/e560c3c12a22</guid>
            <category><![CDATA[ui-design]]></category>
            <category><![CDATA[wireframe]]></category>
            <category><![CDATA[promptframe]]></category>
            <dc:creator><![CDATA[Balakrishna Ch]]></dc:creator>
            <pubDate>Sun, 26 May 2024 16:41:10 GMT</pubDate>
            <atom:updated>2024-05-26T16:41:10.923Z</atom:updated>
            <content:encoded><![CDATA[<h3>PromptFrames — Leveraging AI for UI Design</h3><p>I came across an article by <a href="https://www.nngroup.com/articles/promptframes/">Evan Sunwall</a> on what he called promptframes. Though the concept is not clear enough, this should be seen as the next logical step in UI design.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9rAzna99J6Pew8Zy.jpg" /></figure><p>In essence, what he is saying is this. Have a layout and then, write what is needed as a standard GenAI Prompt. While you define the layout, the prompt fills in the gaps to derive the prototype(Is my understanding correct?) — rather than using lorem ipsum or other placeholders, use a proper prompt as the text and use GenAI to generate it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*UQCWiwhQaoN7kvE2Z6dORw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qbOJuvFHZ5bToUpa.jpg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ghPvKD7RSdrgJI3c.jpg" /></figure><p>Basically, what Evan is proposing here is to make the text readable and to make life simpler after the prototype phase. Note, as like everything else, the prompt also should have to iterate till it’s output is acceptable.</p><p>But, frankly put, I am not impressed. To do this, you don’t exactly need Gen AI, especially when you are saying this is <strong>not</strong> for executive consumption. When it is all about faster iteration, one would actually look at converting that hand drawn sketch into a prototype, not a proper system developed one. Question is this. What can you do to read the sketch and generate it as a prototype using Gen AI?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e560c3c12a22" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flet Routing]]></title>
            <link>https://medium.com/@cbkwgl/flet-routing-f04ebf84780f?source=rss-18a878ccc138------2</link>
            <guid isPermaLink="false">https://medium.com/p/f04ebf84780f</guid>
            <category><![CDATA[warehouse-management]]></category>
            <category><![CDATA[flet]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[flet-routing]]></category>
            <dc:creator><![CDATA[Balakrishna Ch]]></dc:creator>
            <pubDate>Fri, 03 May 2024 21:56:10 GMT</pubDate>
            <atom:updated>2024-05-03T21:56:10.305Z</atom:updated>
            <content:encoded><![CDATA[<p>Did you watch the movie Vratné lahve, by any chance? That’s what my situation is, now. I have completed a three year intense personal project and I am clutching at straws as to how to pass my time now. After being vagabond for a few months, finally, I seem to have hit another major activity — write a whole Warehouse Management System with Python and that too, Sqlite. Flet seems to be a very promising front-end for this — there are multiple reasons here. I can hone my coding and domain skills, do some serious coding and port this code into a different language as a learning exercise.</p><p>Though I started with the receiving module, I had to stop it and start with the home page. Why this giant sized buttons? Because receiving is done using touch pads.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bY4DUjQ9PTidlb87" /></figure><p>While it took some effort to link the button click to an array, the real problem starts now — the button click should take me to a different page. That’s where Flet’s Routing aids us.</p><p>So, what’s the theory here?</p><ol><li>Define multiple endpoints. Let’s call them routes.</li><li>Whenever a route change is noticed, point to the new route.</li></ol><pre>    page.on_route_change = do something<br>    page.go(new route)</pre><p>The key here is <strong><em>page.go</em></strong>. How does this work?</p><ol><li>Flush the memory</li><li>Create a new view which has the route and the display</li><li>You can have multiple such views which can be manipulated in whatever way you want</li></ol><pre>def route_change(e: ft.RouteChangeEvent):<br>        page.views.clear()<br><br>        page.views.append(<br>            ft.View(<br>                route=&quot;/&quot;,<br>                controls=[<br>                    ft.AppBar(title=ft.Text(&quot;Home&quot;), bgcolor=&quot;green&quot;),<br>                    ft.Text(value=&quot;Home&quot;, size=35),<br>                    ft.ElevatedButton(<br>                        text=&quot;Go to login page&quot;, on_click=lambda _: page.go(&quot;/login&quot;)<br>                    ),<br>                ],<br>            )<br>        )<br><br>page.on_route_change = route_change<br>page.go(page.route)</pre><p>Did you notice the lambda function page.go?</p><pre>on_click=lambda _: page.go(&quot;/login&quot;)</pre><p>Because of this, we have this concept of route change: We are asking the program to route to /login page. All you need to do is create a view for login and trigger it.</p><p>There are two levels of extension you can do if you are seeing some serious development using it:</p><ol><li>Move the view definition to a separate page</li><li>Create separate pages for each view and maintain them as a dictionary list to loop over them. Ideally, this is what one would want to do if we are building a humungous application. All I need is some static code where I can add a new reference and the new reference and it’s associated code will work in the same way as like the rest of the views — this is exactly what I am planning to do.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f04ebf84780f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Small Update]]></title>
            <link>https://medium.com/@cbkwgl/a-small-update-1d6a217d9ead?source=rss-18a878ccc138------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d6a217d9ead</guid>
            <dc:creator><![CDATA[Balakrishna Ch]]></dc:creator>
            <pubDate>Thu, 11 Apr 2024 22:00:55 GMT</pubDate>
            <atom:updated>2024-04-11T22:00:55.053Z</atom:updated>
            <content:encoded><![CDATA[<p>There were two other blogs which I tried to maintain but then, I felt maintaining one here is more than enough.</p><ul><li><a href="https://codemishmash.wordpress.com/">CODE MISHMASH</a></li><li><a href="https://planandmanage.substack.com/">Project Management and User Experience | cbkwgl | Substack</a></li></ul><p>I will not update those two anymore and whenever I feel there is something interesting from there which I can pull here, I will do it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d6a217d9ead" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[InfoQ Software Architecture and Design Trends Report — April 2024]]></title>
            <link>https://medium.com/@cbkwgl/infoq-software-architecture-and-design-trends-report-april-2024-a035e81c9810?source=rss-18a878ccc138------2</link>
            <guid isPermaLink="false">https://medium.com/p/a035e81c9810</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[infoq]]></category>
            <category><![CDATA[software-trends]]></category>
            <dc:creator><![CDATA[Balakrishna Ch]]></dc:creator>
            <pubDate>Sat, 06 Apr 2024 10:49:02 GMT</pubDate>
            <atom:updated>2024-04-06T10:49:02.436Z</atom:updated>
            <content:encoded><![CDATA[<h3>InfoQ Software Architecture and Design Trends Report — April 2024</h3><p>InfoQ came up with a new <a href="https://www.infoq.com/articles/architecture-trends-2024/">Software Architecture and Design Trends Report</a> and nothing explains the report better than trying to compare last year’s report with the current year’s — and they gave a handy way to do it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Jt5VXPhoIbQ0Y8o6.jpg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nxsKmkIquem7olLe.jpg" /></figure><p>First of all, look at Late Majority. Nothing changed there. And then, look at Early Majority. Low Code/No Code(Early Adopters in 2023 — the Gen AI phenomenon) is the new entrant while Correctly-built Distributed Systems quietly disappeared — I don’t think it disappeared but it became embedded into the core thinking enough that there is really no point in having it explicitly.</p><p>Now, what does this mean? Industry is not bothered about these changes. It’s as simple as that. They want consistency and they are more profit tuned and their investment into emerging technologies is minimal. Now, Gen AI may challenge this, but we will have to see how much it will do. By the way, I saw a nice image on a timescale article. The question is simple. What’s the logic in overcomplicating when Postgres will do everything for me? A single instance can host almost 2 TB worth of data without giving performance issues, and how many databases do we have in the world which hold more than that volume of transactional data?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*QHOIGx92YPNyIrWQGEIpvQ.png" /></figure><p>Meaning, an engineer proposes many new things but how much of it will the management accept? Note, if we are going to really large enterprises, we are still stuck with the same SQL-Java-Angular stack in most of the cases. So, what’s the purpose of changing direction?</p><p>Anyways. Digressions apart, if you notice, half of the emerging and early adopters are still emerging. Will they see acceptance in the wider market? Note, at first look, we may not notice it, but there are some renamings here — Dapr is Design for Portability!! Others include Privacy Engineering = Design for Security and Green Software = Design for Sustainability.</p><p><em>Some of the broader theme items have been replaced with more specific tools, technologies, or patterns. For example, the past few years included several “design for …” concepts that intended to showcase the “-ilities” and quality attributes architects considered in their trade-off analysis. This means some items which have appeared for several years are no longer on the graph, and in their place is a more specific aspect of the same concept.</em></p><p>In essence, while there is a bit of hype over emerging technologies,</p><ul><li><em>Design for Portability is gaining adoption, as frameworks like Dapr focus on a cloud-native abstraction model and allow architects to separate business logic from implementation details.</em></li><li><em>Large language models are going to have a significant impact, from helping understand architectural trade-offs to empowering a new generation of low-code and no-code developers.</em></li><li><em>Sustainability of software will be a major design consideration in the coming years. Work is being done to better measure and then reduce the carbon footprint of software systems.</em></li><li><em>Decentralized apps are taking blockchain beyond cryptocurrency and NFTs, but a lack of consumer demand will keep this as a niche pattern.</em></li><li><em>Architects are always looking for improvements on how to document, communicate, and understand decisions. This may be another area where large language models will play a role in the future, acting as forensic archeologists to comb through ADRs and git history.</em></li></ul><p>the lack of flexibility in the established space is something to ponder about. Are we going to see any major changes in the way the industry is going to operate, or are we saying these innovations will just stay innovations? Or is there going to be a middle ground?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a035e81c9810" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GenAI — Usecases for Lwea]]></title>
            <link>https://medium.com/@cbkwgl/genai-usecases-for-lwea-f3c627c9defb?source=rss-18a878ccc138------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3c627c9defb</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[google-gemini]]></category>
            <category><![CDATA[genai]]></category>
            <dc:creator><![CDATA[Balakrishna Ch]]></dc:creator>
            <pubDate>Sat, 09 Mar 2024 09:51:16 GMT</pubDate>
            <atom:updated>2024-03-09T10:06:52.372Z</atom:updated>
            <content:encoded><![CDATA[<h3>GenAI — Usecases for Learning</h3><p>GenAI is ubiquitous these days. But then, how can you use it? There are a thousand usecases. But one thing which I really like where one can use it is developing frameworks. There, you are not exactly expecting any output. Consider the below questions.</p><ol><li><em>If I want to compare two philosophers, can you give me 25 points to compare them?</em></li><li><em>I want to write a book on supply chain management. Can you give me the names of 50 chapters which should go into it from simple to advanced? Include allocation, allocation algorithms and AI based allocation as well.</em></li></ol><p>The first question is open-ended and the second one is a bit refined(the last line is after a few iterations). Now, how do you achieve those iterations? Consider the below set of questions.</p><ol><li><em>I want to learn machine learning mathematics. Can you list down 50 topics which I need to focus on?</em></li><li><em>Can you grade these into three categories — basic, intermediate, advanced and just give points without explanation?</em></li><li><em>Can you give me topics more advanced than Markov Chains and Central Limit Theorem?</em></li><li><em>Anything more advanced than Martingales and Optimal Transport Theory?</em></li><li><em>Anything more advanced than Riemannian Manifolds and Geometric Deep Learning and Topological Data Analysis (TDA) for machine learning?</em></li><li><em>Now, let’s assume I am planning to write a book using these topics. I want to have a list of 100 chapters which I want to write on this. Can you grade them into five categories — simple, intermediate, advanced, very advanced and research grade — and list them down as points? Consider topics as advanced as possible.</em></li></ol><p>The output by Google Gemini is below.</p><blockquote>Here’s a possible breakdown of 100 chapters for your book, categorized by difficulty:</blockquote><blockquote><strong>Simple (20 Chapters)</strong></blockquote><blockquote>Introduction to Matrices (Basics)</blockquote><blockquote>Introduction to Vectors (Basics)</blockquote><blockquote>Matrix Addition and Subtraction</blockquote><blockquote>Matrix Multiplication</blockquote><blockquote>Scalar Multiplication</blockquote><blockquote>Matrix Transpose</blockquote><blockquote>Introduction to Probability Theory (Sets, Events)</blockquote><blockquote>Descriptive Statistics (Mean, Median, Mode)</blockquote><blockquote>Introduction to Random Variables (Discrete &amp; Continuous)</blockquote><blockquote>Basic Probability Distributions (Bernoulli, Binomial)</blockquote><blockquote>Introduction to Linear Algebra (Vector Spaces)</blockquote><blockquote>Solving Systems of Linear Equations (Basic Cases)</blockquote><blockquote>Introduction to Calculus (Limits)</blockquote><blockquote>Differentiation Rules (Basic)</blockquote><blockquote>Integration Techniques (Basic)</blockquote><blockquote>Introduction to Machine Learning (Concepts)</blockquote><blockquote>Introduction to Gradient Descent</blockquote><blockquote>Introduction to Hypothesis Testing</blockquote><blockquote>Introduction to Statistical Learning Theory</blockquote><blockquote>Introduction to Information Theory (Entropy)</blockquote><blockquote><strong>Intermediate (30 Chapters)</strong></blockquote><blockquote>Advanced Matrix Operations (Determinants)</blockquote><blockquote>Eigenvalues and Eigenvectors</blockquote><blockquote>Vector Spaces &amp; Subspaces (Properties)</blockquote><blockquote>Basis &amp; Dimension</blockquote><blockquote>Inner Products &amp; Orthogonality</blockquote><blockquote>Linear Transformations (Applications)</blockquote><blockquote>Least Squares &amp; Projections</blockquote><blockquote>Singular Value Decomposition (SVD) (In-depth)</blockquote><blockquote>Multivariable Calculus (Partial Derivatives)</blockquote><blockquote>Gradient Descent (Advanced Techniques)</blockquote><blockquote>Hessian Matrix &amp; Lagrange Multipliers (In-depth)</blockquote><blockquote>Convex Optimization (Properties &amp; Algorithms)</blockquote><blockquote>Common Probability Distributions (Normal, Exponential)</blockquote><blockquote>Conditional Probability &amp; Bayes’ Theorem (Advanced)</blockquote><blockquote>Expectation &amp; Variance (Advanced)</blockquote><blockquote>Central Limit Theorem (Proof &amp; Applications)</blockquote><blockquote>Introduction to Graph Theory (Basic Concepts)</blockquote><blockquote>Asymptotic Notation (Big O, Theta, Omega)</blockquote><blockquote>Introduction to Numerical Linear Algebra</blockquote><blockquote>Introduction to Complexity Theory (Machine Learning)</blockquote><blockquote><strong>Advanced (25 Chapters)</strong></blockquote><blockquote>Markov Chains (Advanced Analysis)</blockquote><blockquote>Large Deviation Theory (Applications in ML)</blockquote><blockquote>Martingales (Advanced Properties &amp; Applications)</blockquote><blockquote>Bayesian Nonparametrics (Theory &amp; Algorithms)</blockquote><blockquote>Information Geometry (Applications in Machine Learning)</blockquote><blockquote>Kernel Methods (Advanced Topics)</blockquote><blockquote>Optimal Transport Theory (Advanced Applications)</blockquote><blockquote>Riemannian Manifolds (Foundations)</blockquote><blockquote>Geometric Deep Learning (Convolution on Manifolds)</blockquote><blockquote>Generative Adversarial Networks (Theoretical Guarantees)</blockquote><blockquote>Causal Inference with Machine Learning (Advanced Topics)</blockquote><blockquote>Topological Data Analysis (Advanced Techniques)</blockquote><blockquote>Partial Differential Equations (Theory for Machine Learning)</blockquote><blockquote>Quantum Machine Learning (Basics &amp; Algorithms)</blockquote><blockquote>Learning Theory with Differential Privacy (Advanced)</blockquote><blockquote><strong>Very Advanced (15 Chapters)</strong></blockquote><blockquote>Non-commutative Harmonic Analysis (Machine Learning Applications)</blockquote><blockquote>Category Theory and Machine Learning (Advanced Concepts)</blockquote><blockquote>Probabilistic Programming Languages (Introduction)</blockquote><blockquote>Probabilistic Inference with Deep Learning Models</blockquote><blockquote>Generative Models with Guarantees (Theoretical Foundations)</blockquote><blockquote>Bandit Algorithms (Advanced Analysis)</blockquote><blockquote>Reinforcement Learning with Function Approximation (Advanced)</blockquote><blockquote>Kernel Mean Embeddings for Large-Scale Data</blockquote><blockquote>Information Geometry for Unsupervised Learning</blockquote><blockquote>Topological Inference in Generative Models</blockquote><blockquote><strong>Research Grade (10 Chapters)</strong></blockquote><blockquote>Quantum Machine Learning for Natural Language Processing</blockquote><blockquote>Causal Inference with Deep Reinforcement Learning</blockquote><blockquote>Probabilistic Programming for Bayesian Deep Learning</blockquote><blockquote>Geometric Deep Learning for Physical Systems Simulation</blockquote><blockquote>Category Theory for Explainable AI</blockquote><blockquote>Learning Theory under Distribution Shift</blockquote><blockquote>Differentially Private Federated Learning</blockquote><blockquote>Non-commutative Geometry and Graph Neural Networks</blockquote><blockquote>Quantum Generative Adversarial Networks</blockquote><blockquote>Topological Data Analysis for Anomaly Detection in High-Dimensional Data</blockquote><blockquote><strong>Note:</strong> This is just a suggestion, and the specific topics and their difficulty levels can be adjusted based on your target audience and the scope of your book.</blockquote><p>Frankly, I don’t care the number of topics here. It’s about what to learn. Now tell me, if you cover all these topics, how much of Machine Learning Mathematics is left out for you to learn? Notice Category Theory for Explainable AI. This is no more than six months old.</p><p>How do you want to expand more on this? Pick a line and ask -</p><blockquote>Can you elaborate on Category Theory for Explainable AI and give some references?</blockquote><p>This is one very powerful usecase which one can use with GenAI. I am not asking it to think much. I am only asking it to compile information in a meaninful manner. Now, if I ask it references for each, it may go crazy as what ChatGPT used to do a few months ago. But just the points — what to learn, and how to compare(two philosophers, two artists, two authors whatever).</p><p>Another possible way where you can use this is to identify points of potential research. Now, consider this question.</p><blockquote>How can I leverage Category Theory for Explainable AI using Quantum Entanglement? <strong>Go beyond what is known.</strong></blockquote><p>The last sentence <strong><em>Go beyond what is known </em></strong>is one of my favourites these days. It gives a rich scope of research — some of it can be complete nonsense and some of it can be really meaningful.</p><p>Gemini gives me this. And there is much in this.</p><blockquote>This is a fascinating intersection of three cutting-edge fields: category theory, explainable AI (XAI), and quantum entanglement. While there’s no established research in this specific area, here are some possibilities to explore that leverage category theory and quantum entanglement for a more robust XAI framework:</blockquote><blockquote><strong>1. Categorical Framework for Quantum Circuit Explanations:</strong></blockquote><blockquote>Develop a categorical framework to represent quantum circuits as morphisms (structure-preserving maps) between categories. This can capture the inherent relationships between quantum gates and operations within the circuit.</blockquote><blockquote>Utilize concepts like adjunctions (special pairs of morphisms) to express how a complex quantum circuit can be decomposed into simpler sub-circuits, aiding in explaining the overall computation.</blockquote><blockquote>By leveraging category theory’s strength in formalizing relationships, this framework could provide a more structured and mathematically rigorous approach to explaining how quantum circuits arrive at specific outputs.</blockquote><blockquote><strong>2. Explainable AI using Quantum Entanglement Features:</strong></blockquote><blockquote>Explore the unique properties of quantum entanglement, where the state of two or more qubits is intrinsically linked. This entanglement can potentially encode information about the decision-making process within a quantum AI model.</blockquote><blockquote>Develop a categorical formalism to represent entanglement features extracted from quantum circuits. These features could capture the relationships and dependencies between entangled qubits, potentially offering insights into the model’s reasoning.</blockquote><blockquote>Integrate these entanglement features into existing XAI techniques, allowing for explanations that not only focus on individual qubits but also consider the entangled relationships that influence the model’s behavior.</blockquote><blockquote><strong>3. Causal Inference with Quantum Counterfactuals:</strong></blockquote><blockquote>Traditional XAI methods often struggle with explaining causal relationships within a model. Here, explore the potential of using quantum counterfactuals for causal inference.</blockquote><blockquote>Quantum counterfactuals involve manipulating entangled qubits to explore alternate realities where different inputs were provided. This can offer insights into how changing specific inputs would affect the model’s output, aiding in causal reasoning.</blockquote><blockquote>Develop a category-theoretic framework to represent these quantum counterfactuals as morphisms between different states of the entangled qubits. This can help formalize the causal relationships explored through these counterfactuals.</blockquote><blockquote><strong>Challenges and Considerations:</strong></blockquote><blockquote>This is a highly theoretical area, and significant research is needed to develop these ideas further.</blockquote><blockquote>The complex nature of both category theory and quantum mechanics necessitates a strong foundation in both fields.</blockquote><blockquote>Building practical XAI tools based on these concepts will require significant advancements in both quantum computing hardware and software.</blockquote><blockquote><strong>Conclusion:</strong></blockquote><blockquote>Leveraging category theory and quantum entanglement for XAI is an innovative approach with the potential to revolutionize how we understand complex AI models, especially those involving quantum computations. While significant challenges exist, this theoretical exploration can pave the way for future advancements in explainable quantum AI.</blockquote><blockquote>Remember, these are just some initial ideas to spark your creativity. As you delve deeper into this area, you might discover entirely new approaches that push the boundaries of XAI and quantum machine learning.</blockquote><p>GenAI is not just about answers. It’s about identifying the correct questions as well. There is always this topic of GenAI being divisive and brings out all kinds of irrelevant and irreverant nonsense. But then, if you restrict it to core science and don’t venture into social sciences, where exactly are you going to face a problem?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3c627c9defb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>