<?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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Piyush’s Substack: Software Engineering]]></title><description><![CDATA[Writing code...]]></description><link>https://piyushagarwal441.substack.com/s/software-engineering</link><image><url>https://substackcdn.com/image/fetch/$s_!VUqH!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49d907ed-5e54-477c-8d47-29a75e950c07_96x96.png</url><title>Piyush’s Substack: Software Engineering</title><link>https://piyushagarwal441.substack.com/s/software-engineering</link></image><generator>Substack</generator><lastBuildDate>Thu, 28 May 2026 03:25:58 GMT</lastBuildDate><atom:link href="https://piyushagarwal441.substack.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Piyush Agarwal]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[piyushagarwal441@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[piyushagarwal441@substack.com]]></itunes:email><itunes:name><![CDATA[Piyush Agarwal]]></itunes:name></itunes:owner><itunes:author><![CDATA[Piyush Agarwal]]></itunes:author><googleplay:owner><![CDATA[piyushagarwal441@substack.com]]></googleplay:owner><googleplay:email><![CDATA[piyushagarwal441@substack.com]]></googleplay:email><googleplay:author><![CDATA[Piyush Agarwal]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Learning with Claude Code - I]]></title><description><![CDATA[Web-Sockets]]></description><link>https://piyushagarwal441.substack.com/p/learning-with-claude-code-i</link><guid isPermaLink="false">https://piyushagarwal441.substack.com/p/learning-with-claude-code-i</guid><dc:creator><![CDATA[Piyush Agarwal]]></dc:creator><pubDate>Wed, 29 Apr 2026 04:25:21 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!VUqH!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F49d907ed-5e54-477c-8d47-29a75e950c07_96x96.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I've been spending time recently doing structured deep dives into topics I want to genuinely understand &#8212; and implement simple toy models around those topics. So, over the weekend I spent a lot of time exploring web-sockets with Claude Code. <br><br>The approach I followed:<br><br>1. Theory first. Before writing a single line of code, I spent time building a mental model &#8212; basic preview of how web sockets work, why they are so expensive, how statefulness affects every layer of the infrastructure, when to use / not-use WebSockets. Some real-world examples of when they are used and when they are not.<br><br>2. Design before implementation. I defined the scope and agreed on a test list before touching code. <br><br>Scope: A WebSocket client and server where:<br>- The server echoes client messages<br>- The server can also push messages independently<br>- The client can close the connection cleanly<br><br>Test list (same 9 tests implemented in all three languages):<br>1. Server starts and listens on a port<br>2. Client connects to the server<br>3. On connection, client receives a welcome message from the server<br>4. Client sends a message and receives the echo correctly<br>5. Server sends an independent message, client receives it correctly<br>6. Client closes the connection cleanly (close code 1000)<br>7. Server handles multiple sequential messages correctly<br>8. Client handles multiple sequential messages correctly<br>9. Server handles multiple clients independently<br><br>3. Strict TDD. Kent Beck style &#8212; write the test list first, then one test at a time: red &#8594; green &#8594; refactor. No additional code before a failing test.<br><br>4. Three languages. Python (`websockets` + `pytest-asyncio`), Go (`gorilla/websocket`), and C# (`System.Net.WebSockets` + `xUnit`). I consider myself pretty proficient with python and use C# at work, but have been wanting to get a better understanding of Go for some time. <br><br>Tell me how are you using Claude and other llms to learn and do things better?<br><br>P.S. - Repository link in comments, I typed in everything for the source code, and didn't use auto-edits at all. The article is generated by Claude, and edited by me. Any feedback is greatly appreciated!</p>]]></content:encoded></item><item><title><![CDATA[Looking for Software Engineering/ Data Engineering / Data Analytics jobs - DAY 1 ]]></title><description><![CDATA[What are RESTful APIs?]]></description><link>https://piyushagarwal441.substack.com/p/looking-for-software-engineering</link><guid isPermaLink="false">https://piyushagarwal441.substack.com/p/looking-for-software-engineering</guid><dc:creator><![CDATA[Piyush Agarwal]]></dc:creator><pubDate>Tue, 10 Sep 2024 06:30:39 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!kNJc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8186816-81b9-4556-b491-0dad68078b13_1043x386.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I am in the software/data job market. I know the market is slumpy, opportunities are scarce and one needs to apply to as many jobs and reach out to as many people in this period. I have good expertise in programming via Python, R; understanding of data structures and algorithms and have been developing my own Python package for a bioinformatics workflow. I am looking to get a foot-hold in the Software/Tech domain, and am documenting my job-hunt process. Learning something relevant daily and documenting seems like one way to attract employers and get some interviews. So, everyday I want to learn something mentioned in the job profiles and document it. For today it is:</p><h2>What are RESTful APIs?</h2><p>REST stands for Representational State Transfer and is essentially a set of rules as to how two information systems communicate with each other. Using usual language, we have the client side and the server side. Clients are generally users of a service, so take for example: Piyush is using Google maps on his android phone to get navigation direction from SFU to Burrard Station. <br>Piyush&#8217;s Phone is the client and one of the computers in Google&#8217;s data center would be the server.  The client and the server communicates through REST APIs. This essentially means that my phone and the server communicate in rather standardized ways. First,</p><ol><li><p>The google map app on my phone sends a request to the google server in a standardized way. The burden of standardization is on the google map app. The app is requesting for navigation direction from SFU to Burrard. This is the resource we are looking for.</p></li><li><p>The server authenticates the client (NOTE the client) and confirms that the client has the right to make the request. Note that since I am simply asking for directions, it is not something to think about much. But if suppose, I was requesting to change the name of SFU to PFU on google maps, I would not have been allowed to do that. Hence, authentication is needed.</p></li><li><p>The server at its end crunches information and uses its navigation program (whatever it is) to fetch directions for me.</p></li><li><p>The server now sends response to the phone app. If everything is alright, I will be able to get to Burrard now. :)</p></li></ol><p>Now this communication between client and server facilitated by REST API which imposes certain architectural constraints.</p><ol><li><p>The client does not need to store any information about the server, nor does the server needs to store any information about the client. This is the property of <strong>STATELESSNESS</strong>. The request is complete in itself. This means that different client requests can be operated upon by the server independently of other requests. Note that this information can be used whether two systems are interacting in a REST framework. Take for example, interaction with ChatGPT. ChatGPT does store information about the different prompts (requests) and hence the prompts (requests) are not independent of each other. Hence, ChatGPT works on something different than REST API. Though it did not tell us clearly. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kNJc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8186816-81b9-4556-b491-0dad68078b13_1043x386.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kNJc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8186816-81b9-4556-b491-0dad68078b13_1043x386.png 424w, https://substackcdn.com/image/fetch/$s_!kNJc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8186816-81b9-4556-b491-0dad68078b13_1043x386.png 848w, https://substackcdn.com/image/fetch/$s_!kNJc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8186816-81b9-4556-b491-0dad68078b13_1043x386.png 1272w, https://substackcdn.com/image/fetch/$s_!kNJc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8186816-81b9-4556-b491-0dad68078b13_1043x386.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kNJc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8186816-81b9-4556-b491-0dad68078b13_1043x386.png" width="1043" height="386" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d8186816-81b9-4556-b491-0dad68078b13_1043x386.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:386,&quot;width&quot;:1043,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:48875,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kNJc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8186816-81b9-4556-b491-0dad68078b13_1043x386.png 424w, https://substackcdn.com/image/fetch/$s_!kNJc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8186816-81b9-4556-b491-0dad68078b13_1043x386.png 848w, https://substackcdn.com/image/fetch/$s_!kNJc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8186816-81b9-4556-b491-0dad68078b13_1043x386.png 1272w, https://substackcdn.com/image/fetch/$s_!kNJc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd8186816-81b9-4556-b491-0dad68078b13_1043x386.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">ChatGPT telling me: I don&#8217;t use REST API but I won&#8217;t tell you what I use. :) </figcaption></figure></div></li><li><p>There is a <strong>UNIFORM INTERFACE</strong> by which clients request information to the server and how the server transmits information to the client. Google Maps working on my android phone would send the same request as my partner&#8217;s iPhone. If the resource requested is the same, then the request must be the same no matter who the client is. The resource is transmitted in a standard format and is referred to as the Representational State in REST. It is not necessary that the format in which the resource is sent is the same as how it was stored in the server. This ensures that requests are complete and completely specifies the resources to be fetched by the server. Further, using metadata, clients can decide to update or delete the resource or process the resource further.  The resource also contains information about other resources (hyperlinks) required to complete a task. </p></li><li><p>There is a <strong>COMPLETE DECOUPLING</strong> of the client and server. They work completely independent of each other and the only interaction is via requests and responses. </p></li><li><p><strong>LAYERED SYSTEM</strong>: The requests and responses can go through different layers and generally, the APIs are designed keeping in mind that the client and the server are not interacting directly but instead through different layers.</p></li><li><p> <strong>CACHEABILITY</strong>: Resources if possible can be cached at the server side to optimize client-server interaction.  </p></li><li><p><strong>CODE ON DEMAND</strong>: Resources are generally static but the server side can sometimes extend client capabilities by transferring software programming code to the client. So, for example while filling job applications, applications are verified using code extended by the server. </p></li></ol><p>What are the benefits of using REST API?</p><ol><li><p>First, the statelessness property of REST ensures that the communication is <strong>SCALABLE</strong>. The server does not have to store any client side information, and caching of resources also eliminates some client-server interactions.</p></li><li><p>Complete decoupling of the client-server interaction allows <strong>FLEXIBILITY</strong>. Any changes made in the client side does not affect how the server fetches resources in responses to a request and vice versa. So, the server components (like the navigation program) can be developed independently without worrying about the communication pathway. </p></li></ol><p>What does the client side request contain?</p><p>The client requests have the following components:</p><ol><li><p>URI (Unique Resource Identifier) - This is used to pin-point to the server which resource is requested by the client. URLs are generally used, which indicate the path to the resource.</p></li><li><p>Method: So after the server has gathered the resource, the HTTP method inside the request tells the resource what it needs to do with it. Some popular HTTP methods are:</p><ol><li><p>Post: Analogous to Create</p></li><li><p>Get: Analogous to READ</p></li><li><p>Put: Analogous to Update</p></li><li><p>Delete: Analogous to Delete</p></li></ol></li><li><p>There are more components like HTTP headers, Data and Parameters. </p></li></ol><p>What does the server side messages generally look like?</p><p>The Server side response consist of the following components:</p><ol><li><p>Status  - Status line communicates success or failure. These are the most common codes:</p><ol><li><p>2XX - Indicates success</p></li><li><p>4XX - Indicates failure on the client side.</p></li><li><p>5XX - Indicates failure on the server side. </p><p></p></li></ol></li><li><p>Other than the status code, the response consist of the resource representation and the metadata of the response.</p><p></p></li></ol><p>The references I have used for the article are:</p><ol><li><p><a href="https://aws.amazon.com/what-is/restful-api/">https://aws.amazon.com/what-is/restful-api/</a></p></li><li><p><a href="https://www.ibm.com/topics/rest-apis">https://www.ibm.com/topics/rest-apis</a></p></li></ol><div class="pullquote"><p>I work on the unceded traditional Coast Salish lands including those of the Tsleil-Waututh (s&#601;l&#787;ilw&#787;&#601;ta&#660;&#620;), Kwikwetlem (k&#695;ik&#695;&#601;&#411;&#787;&#601;m), Squamish (S&#7733;wx&#817;w&#250;7mesh &#218;xwumixw) and Musqueam (x&#695;m&#601;&#952;k&#695;&#601;y&#787;&#601;m) Nations.</p></div>]]></content:encoded></item></channel></rss>