<?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 Muhammad Saad Hassan on Medium]]></title>
        <description><![CDATA[Stories by Muhammad Saad Hassan on Medium]]></description>
        <link>https://medium.com/@saadhsn?source=rss-998061515ccf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bzrxjtYu2LO1wh_WrTcSTA.jpeg</url>
            <title>Stories by Muhammad Saad Hassan on Medium</title>
            <link>https://medium.com/@saadhsn?source=rss-998061515ccf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 02:13:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@saadhsn/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[How I Built a Serverless HealthWatch on AWS (Lambda, DynamoDB, CloudWatch)]]></title>
            <link>https://saadhsn.medium.com/how-i-built-a-serverless-healthwatch-on-aws-lambda-dynamodb-cloudwatch-c608728ffcb2?source=rss-998061515ccf------2</link>
            <guid isPermaLink="false">https://medium.com/p/c608728ffcb2</guid>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[serverless]]></category>
            <dc:creator><![CDATA[Muhammad Saad Hassan]]></dc:creator>
            <pubDate>Sun, 29 Mar 2026 14:14:49 GMT</pubDate>
            <atom:updated>2026-03-29T21:11:04.546Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T40t_OuK5xjR295F2rcrOA.png" /></figure><p>Modern applications rarely live in isolation.</p><p>A typical backend depends on several external services such as APIs, partner systems, authentication providers, payment gateways, or public websites. If one of these dependencies fails, the entire application experience can degrade or break.</p><p>In many teams, these failures are detected <strong>only after users start complaining</strong>. To explore how we can proactively monitor such dependencies, I built <strong>Serverless HealthWatch</strong>, a cloud-native monitoring system that continuously checks website availability and latency using AWS serverless services.</p><p>This project combines cloud and web technologies like <strong>AWS Lambda, API Gateway, DynamoDB, CloudWatch, Flask, and AWS CDK </strong>to create a scalable monitoring platform without managing servers.</p><p>In this article, I’ll walk through:</p><ol><li>The architecture of the system</li><li>How serverless monitoring works</li><li>How APIs manage monitored endpoints</li><li>How monitoring metrics are collected and stored</li><li>How the system can easily scale</li></ol><p>If you’re learning <strong>cloud architecture or serverless development</strong>, this project demonstrates a realistic pattern used in production systems.</p><h3>The Problem: Monitoring External Dependencies</h3><p>Imagine your system depends on a shipping API, a payment provider, an authentication service, and a third-party SaaS platform.</p><p>If any of these services experience downtime, your application can fail. Traditional monitoring solutions often require <strong>dedicated servers</strong>, <strong>complex deployment</strong>, and <strong>expensive monitoring tools</strong>.</p><p>Instead, we can build a <strong>lightweight serverless monitoring system </strong>that<strong> </strong>automatically scales, costs almost nothing at low usage, and integrates easily with AWS observability tools.</p><h3>System Architecture</h3><p>The architecture is intentionally simple but powerful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YGv4Pg1HjOKG8pOdJQ_Dug.png" /></figure><p>The system is divided into <strong>three main layers</strong>:</p><ol><li><strong>Monitoring backend (Lambda functions)</strong></li><li><strong>Data storage (DynamoDB)</strong></li><li><strong>Web interface (Flask UI)</strong></li></ol><p>Infrastructure is provisioned using <strong>AWS CDK</strong>, ensuring reproducible deployments.</p><h3>Managing Monitored URLs with Serverless APIs</h3><p>The platform exposes a simple REST API that allows users to:</p><ul><li>add URLs to monitor</li><li>retrieve monitored endpoints</li><li>update existing entries</li><li>delete URLs</li></ul><p>This logic is implemented inside a Lambda function.</p><p>From api_lambda.py:</p><pre>createMethod = &quot;POST&quot;<br>readMethod = &quot;GET&quot;<br>updateMethod = &quot;PATCH&quot;<br>deleteMethod = &quot;DELETE&quot;<br><br>def wh_api_handler(event, context):<br><br>    httpMethod = event[&#39;httpMethod&#39;]<br>    path = event[&#39;path&#39;]<br><br>    if httpMethod == createMethod and path == &quot;/urls&quot;:<br>        body = json.loads(event[&#39;body&#39;])<br>        table.put_item(Item=body)</pre><p>API Gateway routes incoming HTTP requests to this Lambda function.</p><p>The Lambda function then performs the appropriate <strong>CRUD operation on DynamoDB</strong>. This pattern is common in serverless architectures; API Gateway handles HTTP routing while Lambda executes the business logic.</p><h3>Storing Monitoring Targets in DynamoDB</h3><p>Each monitored website is stored in a DynamoDB table. This is how the entry will look:</p><pre>{<br>  &quot;url&quot;: &quot;www.google.com&quot;,<br>  &quot;check_interval&quot;: &quot;60&quot;,<br>  &quot;status&quot;: &quot;active&quot;<br>}</pre><p>DynamoDB is a good fit here because it scales automatically, it requires no schema management, and it integrates easily with Lambda. The monitoring Lambda retrieves these URLs during each execution cycle.</p><h3>Running Automated Health Checks</h3><p>The core of the system is a <strong>scheduled Lambda function</strong> that periodically checks the health of monitored websites.</p><p>From WebHealthLambda.py:</p><pre>dynamodb = boto3.resource(&#39;dynamodb&#39;)<br>table = dynamodb.Table(bktTotable)<br><br>response = table.scan()<br>items = response[&#39;Items&#39;]<br><br>for item in items:<br>    url = item[&#39;url&#39;]</pre><p>The Lambda retrieves all monitored URLs and performs health checks against them.</p><p>Each check evaluates whether the website responds and how long the response takes. This is essentially the same principle used by enterprise uptime monitoring tools.</p><h3>Monitoring Availability and Latency</h3><p>The monitoring configuration is defined in webcheck.py a file of this project.</p><pre>URLS_TO_MONITOR = [<br>    &#39;www.skipq.org&#39;,<br>    &#39;www.google.com&#39;,<br>    &#39;www.facebook.com&#39;,<br>    &#39;www.youtube.com&#39;<br>]</pre><p>For each URL, the system measures:</p><ul><li><strong>Availability: </strong>Did the endpoint respond successfully?</li><li><strong>Latency: </strong>How long did the request take?</li></ul><p>These metrics are critical for detecting performance degradation before it becomes a user-facing problem.</p><h3>Sending Metrics to CloudWatch</h3><p>Once monitoring data is collected, the system publishes metrics to <strong>AWS CloudWatch</strong>.</p><p>Example from the monitoring logic:</p><pre>cw.put_metric(<br>    namespace=&quot;HealthWatch&quot;,<br>    metric_name=&quot;availability&quot;,<br>    value=1<br>)</pre><p>This enables powerful observability capabilities:</p><ul><li>dashboards</li><li>alerts</li><li>historical monitoring</li><li>performance analysis.</li></ul><p>CloudWatch can also trigger alarms if a service becomes unavailable.</p><h3>Infrastructure as Code with AWS CDK</h3><p>Rather than manually configuring AWS services in the console, the entire infrastructure is defined using <strong>AWS CDK</strong>.</p><p>Example stack definition:</p><pre>sprint5_saad_stack.py</pre><p>CDK provisions:</p><ul><li>Lambda functions</li><li>API Gateway</li><li>DynamoDB tables</li><li>monitoring permissions</li><li>CI/CD pipelines.</li></ul><p>Infrastructure as Code brings several benefits like <strong>reproducible deployments</strong>, <strong>version control for infrastructure</strong>, and <strong>easier collaboration</strong> in teams.</p><h3>Adding a Web Interface with Flask</h3><p>To make the system easier to interact with, the project includes a <strong>Flask web application</strong>.</p><p>This application provides a simple user interface for interacting with the monitoring system.</p><p>Example from app.py:</p><pre>from flask import Flask, render_template<br><br>app = Flask(__name__)<br><br>@app.route(&quot;/&quot;)<br>def index():<br>    return render_template(&quot;index.html&quot;)</pre><p>The Flask app is containerized using <strong>Docker</strong> and deployed to <strong>AWS ECS</strong>.</p><p>This allows users to:</p><ul><li>View monitored endpoints</li><li>Interact with the monitoring API</li><li>Visualize monitoring results.</li></ul><h3>Why This Architecture Works Well</h3><p>Several architectural choices make this system effective.</p><p><strong>Fully Serverless Monitoring</strong>: Lambda eliminates the need for servers. Monitoring jobs scale automatically depending on the number of URLs.</p><p><strong>Pay-As-You-Go Cost Model: </strong>As Lambda charges per execution time, the system costs almost nothing when monitoring small numbers of endpoints.</p><p><strong>Highly Scalable: </strong>Adding hundreds or thousands of URLs requires <strong>no infrastructure changes</strong>. Lambda and DynamoDB handle scaling automatically.</p><p><strong>Observability Built-In: </strong>CloudWatch metrics allow teams to build dashboards and alerts quickly.</p><h3>Potential Improvements</h3><p>While the project already demonstrates a strong serverless architecture, several improvements could make it even more powerful.</p><p>Possible enhancements include the following:</p><ul><li>Multi-region monitoring</li><li>Slack or PagerDuty alert integrations</li><li>Grafana dashboards</li><li>Anomaly detection using machine learning</li><li>Distributed monitoring nodes.</li></ul><p>These additions would move the project closer to a <strong>production-grade monitoring platform</strong>.</p><h3>Final Thoughts</h3><p>Serverless architectures are particularly well suited for operational tools like monitoring systems.</p><p>By combining <strong>AWS Lambda, DynamoDB, API Gateway, and CloudWatch</strong>, we can build scalable infrastructure with minimal operational overhead.</p><p>Projects like this highlight how modern cloud platforms allow developers to focus on <strong>system design and reliability rather than infrastructure management</strong>.</p><p>If you’re learning cloud engineering or serverless development, building a system like <strong>Serverless HealthWatch</strong> is an excellent hands-on way to understand real-world cloud architecture patterns.</p><p>You can find the source code of the project <a href="https://github.com/maliksh7/Serverless-HealthWatch-Monitoring-System">here</a>.</p><p>Happy monitoring!! :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c608728ffcb2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Testing a Live SAP Logistics Use Case with Rest Assured]]></title>
            <link>https://saadhsn.medium.com/testing-a-live-sap-logistics-use-case-with-rest-assured-a77f5d930e91?source=rss-998061515ccf------2</link>
            <guid isPermaLink="false">https://medium.com/p/a77f5d930e91</guid>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[logistics-integration]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[erp-system]]></category>
            <category><![CDATA[restassured-java]]></category>
            <dc:creator><![CDATA[Muhammad Saad Hassan]]></dc:creator>
            <pubDate>Sat, 30 Aug 2025 00:51:41 GMT</pubDate>
            <atom:updated>2025-08-30T00:51:41.015Z</atom:updated>
            <content:encoded><![CDATA[<p>Follow Clara’s journey, a junior engineer crafting robust integration tests for real-time freight tracking between SAP and Carrier APIs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*8MWp8RV3xOru_MENVLe8jw.jpeg" /><figcaption>Rest Assured</figcaption></figure><h4>Meet Clara and the Challenge Ahead?</h4><p>Clara just joined a mid-sized manufacturing company tasked with integrating their <strong>SAP ERP</strong> system with a logistics carrier’s real-time tracking API. Previously, logistics updates came in nightly batch files via EDI, delayed and brittle.</p><p>Her mission: build reliable, automated tests that validate real-time freight tracking from the carrier system into SAP. It’s a high-stakes project, one wrong shipment ID or token failure could cause mismatches in inventory, delayed deliveries, and angry customers.</p><p>Enter <strong>Rest Assured, </strong>her testing weapon of choice, known for its BDD-style clarity and powerful API checks. Let’s walk through Clara’s story and how she made this integration bulletproof.</p><h4><strong>Scene 1: Understanding the Use Case</strong></h4><p>The Flow in a Nutshell:</p><p><strong>1. The Carrier API</strong> sends an endpoint /trackShipment with a JSON payload:</p><pre>  {<br>  &quot;shipmentId&quot;: &quot;SHIP12345&quot;,<br>  &quot;status&quot;: &quot;IN_TRANSIT&quot;,<br>  &quot;location&quot;: { &quot;latitude&quot;: 48.1351, &quot;longitude&quot;: 11.5820 },<br>  &quot;timestamp&quot;: &quot;2025-08-28T12:34:56Z&quot;<br>}</pre><p><strong>2. Spring Boot</strong> backend receives this and calls SAP’s /erp/updateShipment.</p><p><strong>3. SAP ERP</strong> responds acknowledging the update with a success code.</p><p>Clara needs to validate:</p><ul><li>The carrier API request and response.</li><li>Spring Boot’s ability to forward data correctly and reliably.</li><li>SAP’s acknowledgement and updated status visibility.</li></ul><h4>Scene 2: Setting the Stage with Rest Assured</h4><p>Clara’s pom.xml</p><pre>&lt;dependency&gt;<br>  &lt;groupId&gt;io.rest-assured&lt;/groupId&gt;<br>  &lt;artifactId&gt;rest-assured&lt;/artifactId&gt;<br>  &lt;version&gt;5.x.x&lt;/version&gt;<br>  &lt;scope&gt;test&lt;/scope&gt;<br>&lt;/dependency&gt;<br>&lt;dependency&gt;<br>  &lt;groupId&gt;org.junit.jupiter&lt;/groupId&gt;<br>  &lt;artifactId&gt;junit-jupiter-engine&lt;/artifactId&gt;<br>  &lt;scope&gt;test&lt;/scope&gt;<br>&lt;/dependency&gt;</pre><p>She also ambles in JSON-schema validation for extra rigor. This minimal setup empowers Clara to craft clear, effective tests with the simplicity and power of Java’s BDD style.</p><p>RestAssuredConfig.java</p><pre>@PostConstruct<br>public void init() {<br>  RestAssured.baseURI = &quot;https://api.carrier.com&quot;;<br>  RestAssured.port = 443;<br>}</pre><p>This shared configuration keeps her test classes clean and focused.</p><h4><strong>Scene 3: Writing the First End-to-End Test</strong></h4><p>Clara crafts her first major validation:</p><pre>File xmlFile = new File(&quot;src/main/resources/fedex_shipment_request.xml&quot;);<br>given()<br>  .auth().oauth2(env.get(&quot;CARRIER_TOKEN&quot;))<br>  .contentType(ContentType.JSON)<br>  .body(xmlFile)<br>.when()<br>  .post(&quot;/trackShipment&quot;)<br>.then()<br>  .statusCode(200)<br>  .body(&quot;acknowledged&quot;, equalTo(true))<br>  .body(&quot;shipmentId&quot;, equalTo(&quot;SHIP12345&quot;));</pre><p>Then she layers on SAP validation:</p><pre>given()<br>  .auth().oauth2(env.get(&quot;SAP_TOKEN&quot;))<br>.when()<br>  .get(&quot;/erp/shipment/SHIP12345&quot;)<br>.then()<br>  .statusCode(200)<br>  .body(&quot;status&quot;, equalTo(&quot;IN_TRANSIT&quot;));</pre><p>This two-phased test ensures:</p><ul><li>The carrier accepted and acknowledged the payload.</li><li>SAP correctly reflects the updated status, an essential end-to-end check.</li></ul><h4><strong>Scene 4: Smarter Patterns for Reliability</strong></h4><p>Clara introduces structured testing strategies:</p><blockquote><strong>Smoke Check: </strong>Quick GET /health checks carrier API reachable.</blockquote><blockquote><strong>Payload Validation: </strong>Use JSON-schema to validate the structure of tracking JSON.</blockquote><blockquote><strong>End-to-End Flow:</strong> Combined tests cover React → Spring → Carrier → SAP integration.</blockquote><blockquote><strong>Credential Expiry:</strong> Test with expired tokens to catch auth lapses.</blockquote><blockquote><strong>Parameterized Tests:</strong> Automated runs with multiple shipment scenarios.</blockquote><p>She leverages data providers to feed different statuses (DELIVERED, DELAYED) to expand coverage.</p><h4><strong>Scene 5: Structuring for Clarity</strong></h4><pre>src/test/java/<br>  config/<br>    RestAssuredConfig.java<br>  smoke/<br>    HealthCheckTest.java<br>  integration/<br>    CarrierToSapFlowTest.java<br>  util/<br>    PayloadGenerator.java</pre><p>Helper classes like PayloadGenerator building JSON for different statuses. Method names shouldUpdateSapOnCarrierShipment() clearly express intent.</p><h4><strong>Scene 6: Clara’s Takeaways</strong></h4><ul><li><strong>Testing tells a story</strong>: Each test reads like “Given a valid token, when tracking is received, then SAP updates status.” Use BDD to narrate logic.</li><li><strong>State your why: </strong>Inline comments // verify SAP status reflects real-time location help team members catch intent at a glance.</li><li><strong>Test adaptively</strong>: When the carrier adds new fields (e.g.), Clara adds new tests rather than modifying old ones, making evolution safer.</li><li><strong>Secure credentials</strong>: In CI/CD, tokens come from environment variables and are never hardcoded in test code.</li><li><strong>Build confidence</strong>: With these tests, Clara’s team deploys new logistics features with reduced anxiety; they have real feedback.</li></ul><h3>Closing the Story</h3><p>By taking a real-world use case—carrier-to-SAP freight tracking, Clara moves beyond dry test examples and builds a confident, clear, and maintainable testing suite with <strong>Rest Assured</strong>. She learns that good tests are not just code; they tell the integration story and protect business logic.</p><p>Happy testing — and let your tests tell the story 😊!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a77f5d930e91" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Is Denodo the Future of Data Integration or a Legacy Tool of the Past?]]></title>
            <link>https://saadhsn.medium.com/is-denodo-the-future-of-data-integration-or-a-legacy-tool-of-the-past-48cd4eebfc06?source=rss-998061515ccf------2</link>
            <guid isPermaLink="false">https://medium.com/p/48cd4eebfc06</guid>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[denodo-platform]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-integration]]></category>
            <dc:creator><![CDATA[Muhammad Saad Hassan]]></dc:creator>
            <pubDate>Wed, 29 Jan 2025 16:08:03 GMT</pubDate>
            <atom:updated>2025-01-29T16:14:05.563Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jpw_2avd8w2jD4qdULH3Og.png" /><figcaption><a href="https://itnation.lu/news/denodo-platform-a-leading-data-management-platform/">Denodo Platform</a></figcaption></figure><p>In today’s rapidly evolving data landscape, organizations face an ongoing challenge: how to seamlessly integrate and access data across multiple sources without the heavy costs of traditional ETL processes. This is where Denodo, a leading data virtualization platform, has made its mark. But as cloud-native architectures, data lakehouses, and decentralized data strategies gain traction, is Denodo still the future of data integration, or is it becoming a thing of the past? Let’s break it down.</p><h3>Denodo: A Tool of the Future?</h3><p>✅ <strong>Rising Demand for Data Virtualization</strong><br>With the explosion of multi-cloud, hybrid-cloud, and on-prem data sources, businesses need real-time, federated access to their data. Denodo’s virtualization technology eliminates data movement, making it a cost-effective and agile solution for modern enterprises.</p><p>✅ <strong>Cost-Efficient and Agile Data Access</strong><br>Traditional ETL-based integration is expensive and slow. Denodo allows organizations to access and query distributed data without heavy infrastructure costs, providing a competitive edge in decision-making.</p><p>✅ <strong>Security, Compliance &amp; Governance</strong><br>As data security and privacy regulations tighten, organizations require centralized access control and governance. Denodo simplifies this by providing a unified data access layer, reducing the risk of data sprawl and security vulnerabilities.</p><p>✅ <strong>Cloud &amp; Hybrid Support</strong><br>Denodo’s seamless integration with AWS, Azure, and Google Cloud makes it well-suited for modern, cloud-native architectures, ensuring businesses stay future-proof.</p><h3>Denodo: A Tool of the Past?</h3><p>⚠️ <strong>The Rise of Cloud Data Warehouses &amp; Lakehouses</strong><br>Platforms like Snowflake, Databricks, and Google BigQuery now offer scalable, cost-efficient, and near-real-time data analytics, reducing the need for a separate virtualization layer.</p><p>⚠️<strong> Shift Towards Data Mesh &amp; Decentralization</strong><br>Modern data mesh principles emphasize domain-driven data ownership rather than relying on a centralized virtualization layer. This trend may limit Denodo’s future adoption.</p><p>⚠️ <strong>Performance Concerns for Large-Scale Analytics</strong><br>Denodo optimizes queries, but it may struggle with high-volume analytical workloads compared to dedicated ELT pipelines and federated query engines like Trino and Presto.</p><h3>Final Verdict: Future or Past?</h3><p>Denodo remains a powerful player in the data integration space, especially for real-time and hybrid-cloud use cases. However, its future depends on its ability to evolve alongside modern cloud-native architectures, AI-driven query optimization, and decentralized data strategies.</p><p>For companies dealing with complex, multi-source data environments, Denodo is still a tool of the future — but its dominance is no longer guaranteed.</p><p>🚀 What’s your take? Do you see Denodo as the future of data integration, or will cloud-native solutions overtake it? Let’s discuss!</p><p>If you like this post, do 👏 , write a comment for further discussions &amp; definitely follow for more updates :)</p><p>#DataIntegration #Denodo #DataVirtualization #CloudComputing #AI #DataMesh</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48cd4eebfc06" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Honouring Academic Integrity and Addressing Plagiarism]]></title>
            <link>https://saadhsn.medium.com/honouring-academic-integrity-and-addressing-plagiarism-e62806ab4393?source=rss-998061515ccf------2</link>
            <guid isPermaLink="false">https://medium.com/p/e62806ab4393</guid>
            <category><![CDATA[ethicalscholarship]]></category>
            <category><![CDATA[academic-integrity]]></category>
            <category><![CDATA[copyright]]></category>
            <category><![CDATA[education-matters]]></category>
            <category><![CDATA[plagiarismawareness]]></category>
            <dc:creator><![CDATA[Muhammad Saad Hassan]]></dc:creator>
            <pubDate>Thu, 04 Jul 2024 14:49:00 GMT</pubDate>
            <atom:updated>2024-07-04T14:49:00.025Z</atom:updated>
            <content:encoded><![CDATA[<p>In the pursuit of academic excellence, upholding the integrity of scholarly work through honoring academic integrity and addressing plagiarism is paramount. This blog emphasizes the critical importance of these principles for students at all levels — Bachelors, Masters, and Ph.D. It equips undergraduates with foundational insights into citation practices, helps Master’s students refine skills in maintaining originality, and provides Ph.D. candidates with insights to avoid unintentional plagiarism and uphold the integrity of their contributions. Understanding these nuances not only safeguards students’ scholarly reputation but also fosters a culture of honesty and respect within academic communities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R8Yl9u2dVRMRx59b2sD0rw.png" /><figcaption>Image source: <a href="https://www.turnitin.com/">https://www.turnitin.com/</a></figcaption></figure><h3><strong>Introduction</strong></h3><p>The Computer Science Honor Code at Stanford University is an example of the university’s adherence to the essential value of academic honesty, which is committed to in higher education. The Honor Code lays forth the requirements for academic integrity and lists the penalties for breaking these rules. Plagiarism is a type of academic dishonesty that involves using someone else’s work without their permission and passing it off as your own. Serious consequences for this behaviour include failing the course and being suspended or expelled from the university.</p><h3><strong>Stanford’s Computer Science Honor Code</strong></h3><p>Stanford’s Computer Science Honor Code, which consists of two fundamental principles, lays the groundwork for moral behaviour in academic settings.</p><p>Examinees are not permitted to assist or be assisted by others. This requires taking tests on your own, without assistance from others.</p><p>It is forbidden for students to give or accept unapproved assistance with any work that is graded by the teacher, including reports and class assignments. Plagiarism and the act of collaboration without instructor clearance are strictly forbidden.</p><p>The Honor Code also emphasises how important it is for students to uphold it by informing the appropriate authorities of any infractions, especially any instances of suspected plagiarism.</p><h3><strong>Understanding Plagiarism</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*y3ziSV7ky2SOzsjXg1vGqA.png" /><figcaption>Image source: <a href="https://www.myeducator.com/">https://www.myeducator.com/</a></figcaption></figure><p>Plagiarism is a form of intellectual theft involving the unauthorised incorporation of another’s work, falsely representing it as one’s own. It manifests in various ways:</p><ul><li>Replicating text from external sources without proper citation.</li><li>Paraphrasing another’s work without appropriate attribution.</li><li>Employing someone else’s ideas or arguments without due acknowledgment.</li><li>Submitting work generated by another individual.</li></ul><h3>Consequences of Plagiarism</h3><p>Plagiarism entails serious consequences, the nature of which depends on the severity of the offence and university policies. Common repercussions include:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*81y5dREUR0OioITH-JfQqw.jpeg" /><figcaption>Image source: <a href="https://www.medtextpert.com/">https://www.medtextpert.com/</a></figcaption></figure><ul><li>Failure in the assignment/thesis or course.</li><li>University suspension.</li><li>Expulsion from the academic institution.</li></ul><h3><strong>Preventing Plagiarism</strong></h3><p>To avoid plagiarism, students can take proactive measures:</p><ul><li>Gain a comprehensive understanding of plagiarism and its manifestations.</li><li>Properly cite all sources used in their work.</li><li>Express ideas in original words.</li><li>Exercise caution with paraphrasing to maintain distinctiveness.</li><li>Use quotations when appropriate.</li><li>Seek guidance from instructors or tutors if uncertain about citation methods or plagiarism prevention.</li><li>Pledge to Stanford’s Computer Science Honor Code</li></ul><p>“I pledge to uphold Stanford’s Computer Science Honor Code for the ‘Advanced Programming’ course instructed by Prof. Lano during the winter semester 2021/22.”</p><h3><strong>Conclusion</strong></h3><p>Maintaining academic integrity is crucial for fostering a just and impartial learning environment. Adherence to Stanford’s Computer Science Honor Code empowers students to claim ownership of their work and fosters a culture of mutual respect. By steering clear of plagiarism, students not only safeguard their academic reputation but also evade the severe consequences associated with breaches of scholarly honesty.</p><p><strong>References</strong></p><ul><li>Stanford Computer Science Honor Code: <a href="https://communitystandards.stanford.edu/policies-guidance/honor-code:">https://communitystandards.stanford.edu/policies-guidance/honor-code:</a> <a href="https://communitystandards.stanford.edu/policies-guidance/honor-code">https://communitystandards.stanford.edu/policies-guidance/honor-code</a>.</li><li>The Student’s Guide to Avoiding Plagiarism by Western Washington University: <a href="https://chss.wwu.edu/files/Sociology/plagiarism.pdf:">https://chss.wwu.edu/files/Sociology/plagiarism.pdf:</a> <a href="https://chss.wwu.edu/files/Sociology/plagiarism.pdf">https://chss.wwu.edu/files/Sociology/plagiarism.pdf</a></li></ul><p>Thank you for reading! We hope you found this blog insightful and useful. Please feel free to leave your thoughts in the comments below, share it with your peers, and help spread awareness about the importance of academic integrity. Together, we can create a community that values honesty and scholarly excellence.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e62806ab4393" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Your First Blazor Component]]></title>
            <link>https://saadhsn.medium.com/building-your-first-blazor-component-3a499b9d695e?source=rss-998061515ccf------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a499b9d695e</guid>
            <category><![CDATA[full-stack]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[blazor-components]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[blazor]]></category>
            <dc:creator><![CDATA[Muhammad Saad Hassan]]></dc:creator>
            <pubDate>Tue, 09 Apr 2024 16:46:30 GMT</pubDate>
            <atom:updated>2024-04-09T20:40:53.894Z</atom:updated>
            <content:encoded><![CDATA[<h3>A Cross-Platform Guide 📖</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rtfzJ7Un8cZQaUjauoUW9g.jpeg" /><figcaption>Developer’s Guide To Blazor Component Libraries</figcaption></figure><h3>Introduction</h3><p>Blazor has revolutionized web development by allowing developers to use C# and .NET to build interactive web applications. In this guide, we’ll walk you through the process of building your first Blazor component. Whether you’re on Windows, Linux, or macOS, we’ve got you covered with setup instructions tailored to each platform.</p><blockquote>Setting Up Your Development Environment</blockquote><ol><li><strong>Windows:</strong></li></ol><ul><li>Install the .NET SDK: Download and install the .NET SDK from the official .NET website (<a href="https://dotnet.microsoft.com/download/dotnet">https://dotnet.microsoft.com/download/dotnet</a>).</li><li>Install Visual Studio: Download and install Visual Studio from the Visual Studio website (<a href="https://visualstudio.microsoft.com/">https://visualstudio.microsoft.com/</a>)</li></ul><p><strong>2. Linux:</strong></p><ul><li>Install the .NET SDK: Follow the instructions provided on the .NET website to install the .NET SDK on your Linux distribution (<a href="https://dotnet.microsoft.com/download/dotnet">https://dotnet.microsoft.com/download/dotnet</a>).</li><li>Install Visual Studio Code: Install Visual Studio Code using your package manager or by downloading it from the Visual Studio Code website (<a href="https://code.visualstudio.com/">https://code.visualstudio.com/</a>).</li></ul><p><strong>3. macOS:</strong></p><ul><li>Install the .NET SDK: Download and install the .NET SDK from the official .NET website (<a href="https://dotnet.microsoft.com/download/dotnet">https://dotnet.microsoft.com/download/dotnet</a>).</li><li>Install Visual Studio for Mac: Download and install Visual Studio for Mac from the Visual Studio website (<a href="https://visualstudio.microsoft.com/">https://visualstudio.microsoft.com/</a>).</li></ul><h3>Creating Our Blazor Project:</h3><ol><li>Open your preferred development environment (Visual Studio, Visual Studio Code, or Visual Studio for Mac).</li></ol><blockquote>💡If you are using Visual Studio Code, run below command to open the editor: `code . ` or If you are using Visual Studio for Mac or Visual Studio, just click on icon from menu.</blockquote><p>2. Create a new Blazor project using one of the following methods:</p><ul><li>Visual Studio: Select “<em>Create a new project</em>” and choose the Blazor template under the .NET category.</li><li>Visual Studio Code or Visual Studio for Mac: Open the terminal and run the following command:</li></ul><pre>dotnet new blazor -n MyFirstBlazorApp</pre><p>3. Navigate to your newly created Blazor project directory.</p><pre>cd MyFirstBlazorApp/</pre><h3>Building Your First Blazor Component:</h3><p>Wait….!⏳</p><p><strong>What are Blazor Components and Why we use them?</strong> 🤔<br>Blazor components are the building blocks of Blazor applications. They are self-contained units that combine both the user interface (UI) markup and the logic needed to render that UI. In simpler terms, a Blazor component is like a reusable widget or control that you can use to create different parts of your web application.</p><p>Each Blazor component typically consists of two parts:</p><ol><li>Markup: This is the HTML-like code that defines the structure and appearance of the component. It includes elements like &lt;div&gt;, &lt;h1&gt;, &lt;button&gt;, etc., as well as special Blazor syntax for binding data, handling events, and including other components.</li><li>Code-Behind: This is the C# code associated with the component that provides the behavior and functionality. It includes properties, methods, event handlers, and any other logic needed to interact with the component’s markup or respond to user actions.</li></ol><p>Together, the markup and code-behind form a cohesive unit that can be reused and composed to create complex web applications. Blazor components allow developers to write web applications using familiar C# and .NET programming languages, enabling code reuse, maintainability, and productivity.</p><p>Since now we know what are Blazor Components and why we use them, lets deep down into it and create our Hello Blazor Component 😊🚀</p><ol><li>Navigate to “Pages” directory within your Blazor project.</li></ol><pre>cd Pages/</pre><p>2. Create a new Razor component file for Hello World and name it “HelloWorldComponent.razor”.</p><pre>touch HelloWorldComponent.razor</pre><p>3. Define your component by adding the following code to “HelloWorldComponent.razor”:</p><pre>&lt;h1&gt;@Message&lt;/h1&gt;<br>&lt;button @onclick=&quot;ChangeMessage&quot;&gt;Change Message&lt;/button&gt;<br><br>@code {<br>    // Define a property<br>    private string Message { get; set; } = &quot;Hello, Blazor!&quot;;<br><br>    // Define a method to change the message<br>    private void ChangeMessage()<br>    {<br>        Message = &quot;Welcome to Blazor!&quot;;<br>    }<br>}</pre><p>In this example, we define a Blazor component named HelloWorldComponent. The component contains HTML markup for displaying a message (@Message) and a button to change the message. We also include C# code within the @code block to define the component&#39;s logic, such as updating the message when the button is clicked.</p><blockquote>💡Note: As your component grows in size, you can consider separating the markup and logic into separate files (HelloWorldComponent.razor and HelloWorldComponent.razor.cs) for better organization and maintainability.</blockquote><h3>Using Our Custom Component:</h3><ol><li>Open the “Index.razor” file within the “Pages” directory.</li><li>Write the following lines of code to make your component usable:</li></ol><pre>@page &quot;/hello&quot;<br><br>&lt;HelloWorldComponent /&gt;</pre><p>3. Use your custom component by adding the following code inside the &lt;div&gt; element with the @code directive:</p><pre>@page &quot;/hello&quot;<br><br>//  the custom component &lt;MyFirstComponent /&gt; inside a &lt;div&gt; element<br>//  with the @code directive<br><br>&lt;div&gt;<br>    &lt;HelloWorldComponent /&gt;<br>&lt;/div&gt;<br><br>@code {<br>    // Add any additional C# code here if needed<br>    // in our case it can be empty for now ...<br>}</pre><p>In this code snippet:</p><ul><li>We define a route for the page using @page &quot;/hello&quot;.</li><li>We then add a &lt;div&gt; element where we place our custom component &lt;HelloWorldComponent /&gt;.</li><li>Finally, we include a @code block where you can add any additional C# code related to this page/component, such as handling events or updating component state.</li></ul><h3>Running Your Blazor Application 🚀:</h3><ol><li>Start the development server by running the following command in the terminal/command line:</li></ol><pre>dotnet watch run</pre><blockquote>OR, you can click on play like button on second navbar of your editor to run the server:</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bTmWp71fH4CSqQAIRYOcNQ.png" /><figcaption>Click here to start the server</figcaption></figure><p>2. Open your web browser and navigate to the URL displayed in the terminal/command line (usually <a href="http://localhost:5000/">http://localhost:5000</a> or <a href="http://localhost:5001).">http://localhost:5001).</a></p><h4>Comparing Blazor Components to JavaScript Components:</h4><p>One of the key differences between Blazor components and traditional JavaScript components is that Blazor components are built using C# and .NET instead of JavaScript. This allows developers to leverage their existing skills in C# and .NET to build rich, interactive web applications. Additionally, Blazor components offer features such as server-side rendering, dependency injection, and two-way data binding out of the box, making it easier to build and maintain complex web applications</p><h4>Conclusion:</h4><p>Congratulations🎉! You’ve successfully built your first Blazor component and gained insight into the power and flexibility of Blazor development. With Blazor, you can harness the full capabilities of C# and .NET to create modern, interactive web applications. As you continue your journey with Blazor, remember to explore the vast ecosystem of components, libraries, and tools available to enhance your development experience.</p><p>Writing a blog post requires significant time, energy, and dedication. If you enjoyed reading this post, please consider liking it and following my channel, <a href="https://medium.com/u/998061515ccf">Muhammad Saad Hassan</a>. Your feedback and suggestions for future posts are greatly appreciated, so feel free to leave your thoughts in the comments section. Thank you for your support! 🙌</p><p>Happy coding! 💻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a499b9d695e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Is Blazor Just a Buzzword?]]></title>
            <link>https://saadhsn.medium.com/is-blazor-just-a-buzzword-b399621c7bd7?source=rss-998061515ccf------2</link>
            <guid isPermaLink="false">https://medium.com/p/b399621c7bd7</guid>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[blazor]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Muhammad Saad Hassan]]></dc:creator>
            <pubDate>Tue, 26 Mar 2024 16:52:31 GMT</pubDate>
            <atom:updated>2024-03-26T17:11:12.531Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*_behJyKLx1F5QQ-AgNvtLw.png" /><figcaption>Blazor Framework</figcaption></figure><h3>Introduction</h3><p>In the rapidly evolving landscape of web development, new frameworks and technologies emerge almost every day, each promising to revolutionize the way we build web applications. One such technology that has garnered significant attention is Blazor. But amidst the buzz and excitement, it’s essential to question whether Blazor is truly a game-changer or merely another buzzword.</p><h3>Understanding Blazor</h3><p>Blazor, developed by Microsoft, is a framework for building interactive web UIs using C# instead of JavaScript. It allows developers to create web applications entirely in C# or a combination of C# and HTML, leveraging the power of the .NET ecosystem. Blazor offers two hosting models: server-side Blazor, where the app runs on the server, and client-side Blazor (WebAssembly), where the app runs directly in the browser.</p><h3>Dispelling the Buzz</h3><ol><li><strong>Performance:</strong> One common concern with client-side Blazor is its performance compared to traditional JavaScript frameworks like React or Angular. While Blazor WebAssembly initially had performance limitations due to the overhead of downloading and executing .NET assemblies in the browser, significant improvements have been made, and performance is continually evolving.</li><li><strong>Learning Curve:</strong> Another criticism levelled against Blazor is the learning curve, especially for developers accustomed to JavaScript frameworks. However, for developers already proficient in C# and .NET, Blazor offers a familiar environment, reducing the learning curve significantly.</li><li><strong>Ecosystem Maturity:</strong> Some skeptics question the maturity of the Blazor ecosystem compared to established JavaScript frameworks. While Blazor is relatively new compared to frameworks like React or Angular, it benefits from the extensive .NET ecosystem, including libraries, tools, and community support.</li></ol><h3>The Real Value of Blazor</h3><p>Despite the skepticism surrounding Blazor, it offers several compelling advantages:</p><ul><li>Unified Stack: Blazor enables developers to use a single language (C#) and toolset across the entire application stack, from front-end to back-end.</li><li>Code Reusability: With Blazor, developers can share code between client and server, reducing duplication and streamlining development.</li><li>Performance Improvements: As Blazor continues to evolve, performance enhancements and optimizations are continually being introduced, making it a viable option for high-performance web applications.</li></ul><h3>Conclusion</h3><p>In conclusion, while Blazor may have initially been dismissed as a buzzword, its growing adoption and maturing ecosystem suggest otherwise. Blazor represents a significant shift in web development paradigms, offering developers the flexibility, productivity, and performance they need to build modern web applications. While it may not be a silver bullet for every use case, dismissing Blazor as just another buzzword would be a mistake. As with any technology, the real value of Blazor lies in understanding its strengths, weaknesses, and suitability for your specific requirements.</p><p>So, is Blazor just a buzzword? The answer is a resounding no. Blazor is here to stay, and its impact on web development will only continue to grow in the years to come.</p><p>If you found this article insightful, don’t forget to follow and like for more content like this. Your support means the world to me! Thanks for making it till the end, and stay tuned for more exciting insights and blogposts. 😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b399621c7bd7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bear minimum to schedule a sidekiq job using ruby on rails]]></title>
            <link>https://saadhsn.medium.com/bear-minimum-to-schedule-a-sidekiq-job-using-ruby-on-rails-551248400c22?source=rss-998061515ccf------2</link>
            <guid isPermaLink="false">https://medium.com/p/551248400c22</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[schedule-a-sidekiq]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[sidekiq]]></category>
            <dc:creator><![CDATA[Muhammad Saad Hassan]]></dc:creator>
            <pubDate>Fri, 06 Jan 2023 23:37:26 GMT</pubDate>
            <atom:updated>2024-04-25T09:05:46.817Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*YviEwf8oEcBjk2oJQXnSgQ.png" /></figure><p>Hy Everyone, today I will be writing about scheduling a simple or <strong><em>Hello World </em></strong>of a background job using ruby on rails.</p><p>To schedule a Sidekiq job in a Rails application, you will need to follow these steps:</p><ol><li>Add the sidekiq gem to your Gemfile and run bundle install.</li><li>Create a worker class that includes the Sidekiq::Worker module and defines a perform method. This method should contain the code that you want to run asynchronously.</li><li>Start the Sidekiq worker process by running the bundle exec sidekiq command.</li></ol><p>Here is an example of a worker class that performs a simple task of printing a message to the console:</p><pre>class MyWorker<br>  include Sidekiq::Worker<br><br>  def perform(message)<br>    puts message<br>  end<br>end</pre><p>To schedule this worker to run at a specific time, you can use the Sidekiq::ScheduledSet class to add the job to the schedule with a delay. Here is an example of how you might do this:</p><pre># Schedule the job to run in 5 minutes<br>Sidekiq::ScheduledSet.new.add_delayed_with_queue(<br>  :default,<br>  5.minutes.from_now,<br>  MyWorker,<br>  &#39;Hello, world!&#39;<br>)</pre><p>This will add the job to the Sidekiq schedule with a delay of 5 minutes. When the time comes, the Sidekiq worker process will pick up the job and run the perform method, which will print the message to the console.</p><p>Note that you will need to have the Sidekiq worker process running in order for the scheduled jobs to be processed. You can start the worker process by running the following command:</p><pre>bundle exec sidekiq</pre><h3><strong>Conclusion</strong></h3><p>I hope this article helped you understand the intuition behind this blog. Let me know if you have any questions regarding this concept. Do let me know about your valuable feedback in the comment section. Also, follow me to get more updates on science and technology. Till then BYE :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=551248400c22" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I implemented Snake and Apple Game using PyGame in Python]]></title>
            <link>https://saadhsn.medium.com/how-i-implemented-snake-and-apple-game-using-pygame-in-python-dc60e5a314e6?source=rss-998061515ccf------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc60e5a314e6</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[python-game]]></category>
            <category><![CDATA[pygame]]></category>
            <category><![CDATA[python3]]></category>
            <dc:creator><![CDATA[Muhammad Saad Hassan]]></dc:creator>
            <pubDate>Fri, 27 Aug 2021 02:45:02 GMT</pubDate>
            <atom:updated>2021-08-27T02:45:02.547Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*_Vinal2Em87qiepGhVDwgw.png" /><figcaption>Game Main Screen</figcaption></figure><p><strong>Install PyGame</strong></p><p>Pygame is a cross-platform set of Python modules which is used <strong>to create video games</strong>. It includes computer graphics and sound libraries designed to be used with the Python programming language.</p><p>You can <strong>install</strong> it by using following command,</p><blockquote><strong>pip install pygame</strong></blockquote><p>For more information, check official documentation <a href="https://www.pygame.org/docs/">here</a>.</p><p><strong>Introduction to the Game</strong></p><p>Building a snake and apple game in pygame and python. Snake and apple is a simple game where when a snake eats an apple it gets longer and your score increases. If a snake hits any part of its body it will die.</p><p><strong>Resources</strong></p><p>Project complete media resources can be downloaded from master branch of my GitHub rep <a href="https://github.com/maliksh7/Snake-and-Apple-Game/blob/master/resources/">here</a>:</p><p>Project complete source code is available on my GitHub rep, you can check it <a href="https://github.com/maliksh7/Snake-and-Apple-Game/blob/main/snake_game/main.py">here</a>.</p><p><strong>Note:</strong> Resources include all photos, videos, audio tracks and background music used in this project.</p><p><strong>Classes</strong></p><p>Now we have talked about complete game setup, so it’s time to crack the main code into three major classes, that will help us understand and manage the code well and make it readable.</p><p>So we will have these three class:</p><ul><li><strong>Snake Class:</strong></li></ul><p>In snake class we will have an initial functional call __init__ that will let the screen ready, will do all other initialization for us like sound, screen size, snake length, snake initial direction etc. This class will also contain functions that will ensure the functionality of snake like, drawing snake, snake length increment, snake move, snake moving directions (left, right, up and down) and snake walk function.</p><p><a href="https://github.com/maliksh7/Snake-and-Apple-Game/blob/main/snake_game/main.py"><strong>Code</strong></a></p><ul><li><strong>Apple Class:</strong></li></ul><p>In the context of the game, Apple is food that a snake eats. Now Apple class has some initial look (photo) and Apple size declared in __init__ function. It has draw and move functions that support its functionality in the game.</p><p><a href="https://github.com/maliksh7/Snake-and-Apple-Game/blob/main/snake_game/main.py"><strong>Code</strong></a></p><ul><li><strong>Game Class:</strong></li></ul><p>This is the main controller class of this game. It’s __init__ function will set up all the things required to start the game like all kinds of music/sounds, background image, snake and apple object, ready the surface to play game upon, and draw snake and apple on the surface. Some major functions are calculate and rate the collisions (Snake-snake collision, snake-apple collision), rendering background function, play background music and sounds upon collision functions, play game function that is supposed to be a main handler, run the snake in all directions function, reset score, display score, show game over function.</p><p><a href="https://github.com/maliksh7/Snake-and-Apple-Game/blob/main/snake_game/main.py"><strong>Code</strong></a></p><p><strong>Run-time Functionality:</strong></p><p>This includes:</p><ul><li>Score Count</li><li>Increment in snake length upon eating apple</li><li>Sounds on eating apple, hitting boundary and game over</li><li>Background music throughout the game</li><li>Replay option once game is over</li><li>Quit the game any time option</li></ul><p><strong>Conclusion:</strong></p><p>So this is supposed to be an easy to implement snake and apple game using PyGame in Python if and only if you break the logic into small modules that are manageable easily and also easily replicate the same logic into clean and well looking code. I hope you like this blog, and if you want to get complete source code and media resources, feel free to download it from <a href="https://github.com/maliksh7/Snake-and-Apple-Game/blob/main/snake_game/main.py">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc60e5a314e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>