<?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 Nawodya Ishan on Medium]]></title>
        <description><![CDATA[Stories by Nawodya Ishan on Medium]]></description>
        <link>https://medium.com/@nawodyaishan?source=rss-6c6cc46357d5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*9pl11F9iSj907oINKLY1sQ@2x.jpeg</url>
            <title>Stories by Nawodya Ishan on Medium</title>
            <link>https://medium.com/@nawodyaishan?source=rss-6c6cc46357d5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 23:17:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nawodyaishan/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[Your First Real Terraform Project: Free OpenClaw Server on Oracle Cloud (Zero Cost + Pro Best…]]></title>
            <link>https://nawodyaishan.medium.com/your-first-real-terraform-project-free-openclaw-server-on-oracle-cloud-zero-cost-pro-best-e4dc4500449f?source=rss-6c6cc46357d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4dc4500449f</guid>
            <category><![CDATA[terraform-modules]]></category>
            <category><![CDATA[oracle-cloud]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[infrastructure-as-code]]></category>
            <dc:creator><![CDATA[Nawodya Ishan]]></dc:creator>
            <pubDate>Mon, 23 Feb 2026 01:31:01 GMT</pubDate>
            <atom:updated>2026-02-23T01:31:01.168Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jbXzMJsIaecaTLUstDF_vA.jpeg" /></figure><h3>Your First Real Terraform Project: Free OpenClaw Server on Oracle Cloud (Zero Cost + Pro Best Practices)</h3><h4><strong>Learn modern Terraform, immutable infrastructure, and real SRE patterns while deploying a secure, production-ready OpenClaw instance.</strong></h4><p>While this guide focuses heavily on <strong>Oracle’s Always Free Tier</strong> because it provides reliable hosting at zero cost, <strong>Azure is fully supported out of the box.</strong> If you have an Azure for Students subscription (which gives you $100 in free credits), you can use the exact same steps and Makefile commands to deploy your server there instead!</p><p>If you’re a beginner or a self-taught developer who wants to actually understand Terraform instead of just blindly following copy-paste tutorials, this is for you.</p><p>No more toy examples.</p><p><a href="https://github.com/nawodyaishan/openclaw-azure-oracle-iac"><strong>This repository</strong></a><strong> </strong>gives you a <strong>complete, production-ready project</strong> that follows the exact same best practices used in enterprise DevOps teams , while giving you a blazing-fast OpenClaw server for <strong>$0/month forever</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DmrbecpIaoE7BpVpxfBk_Q.png" /></figure><h3>👀 Perfect For Beginners Who Want To Level Up Fast</h3><ul><li><strong>Portfolio Builders:</strong> You want a real, multi-cloud Terraform project to show off in interviews.</li><li><strong>Self-Taught Devs:</strong> You want to learn clean, professional code structure from a production-grade codebase.</li><li><strong>Cost-Conscious Creators:</strong> You want WhatsApp/Telegram bots running 24/7 without paying for hosting.</li></ul><h3>🎯 What You’ll Actually Learn (Real Skills You Can Use)</h3><p>Most “free tier” tutorials have you spin up a blank VM and run a messy bash script. We engineered this differently. By exploring this repository, you will practice:</p><ol><li><strong>Immutable Infrastructure:</strong> You’ll use HashiCorp Packer to bake a “Golden Image” with your tools pre-installed, eliminating configuration drift and speeding up boot times.</li><li><strong>Clean Project Structure:</strong> You’ll see how to strictly decouple active deployments (environments/dev/oracle) from reusable declarative logic (modules/oracle-openclaw).</li><li><strong>Professional Code Patterns:</strong> You’ll learn the famous “Singleton” pattern (naming a single resource &quot;this&quot;), contextual variable naming, and how to use strict Terraform validation {} blocks.</li><li><strong>Zero Hardcoded Secrets:</strong> You will learn to completely reject passing API keys into .tfvars, relying natively on provider interfaces like ~/.oci/config.</li><li><strong>Security &amp; State:</strong> You’ll practice locking down SSH to your exact IP, obfuscating sensitive outputs (like tokens), and migrating to remote state backends.</li><li><strong>The “Testing Pyramid”:</strong> You will use standard pre-commit tooling like tflint, tfsec, and infracost wired directly into a Makefile.</li><li><strong>Husky TFLint Integration</strong>: Every time a developer attempts to git commit, husky natively hijacks the pipe and runs three checks automatically.</li></ol><p>This <a href="https://github.com/nawodyaishan/openclaw-azure-oracle-iac"><strong>single repo</strong></a> is a masterclass in practical, production-grade DevOps.</p><h3>🚀 Key Features Built for Learning</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HOQ8xhYPX_jx6lZAG77iPA.jpeg" /></figure><h3>🛠️ Step-by-Step: Deploy in Under 10 Minutes</h3><h3>1. Prerequisites (All Free)</h3><ul><li><strong>Account:</strong> Oracle Cloud Always Free account → <a href="https://www.oracle.com/cloud/free/">Sign up here</a>.</li><li><strong>Tools:</strong> Terraform &amp; Packer (brew install hashicorp/tap/packer hashicorp/tap/terraform).</li><li><strong>The Code:</strong></li></ul><pre>git clone https://github.com/nawodyaishan/openclaw-azure-iac.git<br>cd openclaw-azure-iac</pre><h3>2. Configure Native Auth &amp; Variables</h3><p>Create your OCI configuration profile so you never hardcode a secret again:</p><pre># ~/.oci/config<br>[DEFAULT]<br>user=ocid1.user.oc1..xxxx<br>fingerprint=05:ee:b8:b0...<br>key_file=~/Documents/DevOps/OCI/key.pem<br>tenancy=ocid1.tenancy.oc1..xxxx<br>region=us-ashburn-1</pre><p>Then, prepare your environment variables:</p><pre>cd environments/dev/oracle<br>cp terraform.tfvars.example terraform.tfvars<br>nano terraform.tfvars</pre><ul><li>Set compartment_ocid.</li><li>Set allowed_ssh_cidr to your home IP (curl ifconfig.me and append /32).</li></ul><h3>3. Build the Golden Image (The Pro Part!)</h3><p>Return to the root directory and let Packer bake your immutable image:</p><pre>cd ../../..<br>make build-oracle</pre><p><em>Copy the image name outputted at the very end (e.g., </em><em>openclaw-ubuntu-arm64-1234567890) and paste it into your </em><em>terraform.tfvars file under </em><em>custom_image_name.</em></p><h3>4. The SRE Check &amp; Deploy</h3><p>Before deploying, run the built-in security and cost checks just like a real engineering team:</p><pre>make init-oracle<br>make security  # Scans for vulnerabilities with tfsec<br>make cost      # Verifies your bill will be exactly $0.00<br>make deploy-oracle</pre><p>Type yes and wait ~2 minutes. Terraform will provision everything cleanly.</p><h3>5. Connect &amp; Configure</h3><p>The Makefile securely handles the IP retrieval and SSH connection for you:</p><pre>make ssh-oracle</pre><p>Once inside the VM, your GATEWAY_TOKEN has already been securely injected via cloud-init. Simply run:</p><pre>openclaw --version<br>openclaw configure</pre><h3>⚠️ Quick Fixes Newbies Love</h3><ul><li><strong>“Out of host capacity”:</strong> Oracle’s free ARM tier is popular. If you see this, wait 10–30 mins and retry make deploy-oracle.</li><li><strong>SSH Connection Refused:</strong> Your home IP likely changed. Update allowed_ssh_cidr in your terraform.tfvars and run make deploy-oracle again.</li></ul><h3>💡 Why This Repo Is Perfect for Learning</h3><p>You’re not just getting a free server. You’re <strong>practicing exactly how senior DevOps engineers work</strong> , clean structure, immutable images, no secrets in code, pre-commit validation, and remote state.</p><p>Add this to your GitHub, understand the workflow, and you’ll have a serious talking point for your next interview.</p><h3>Ready to Become a Better DevOps Engineer?</h3><p>Deploy it now. You’ll feel like a pro in under 15 minutes.</p><p>⭐ <a href="https://github.com/nawodyaishan/openclaw-azure-iac"><strong>Star the repo</strong></a> and drop a comment below telling me what you built first!</p><blockquote>🙏 Credits , Special thanks to my coworker <a href="https://github.com/stoXmod">stoXmod</a> for the original inspiration and foundational work on this project.</blockquote><p><em>#Terraform #DevOps #OracleCloud #InfrastructureAsCode #Packer #SRE #OpenClaw</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4dc4500449f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding the Big Picture: Platform Engineer vs DevOps Engineer vs SRE vs Cloud Engineer]]></title>
            <link>https://nawodyaishan.medium.com/understanding-the-big-picture-platform-engineer-vs-devops-engineer-vs-sre-vs-cloud-engineer-e0ce689d539e?source=rss-6c6cc46357d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0ce689d539e</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[platform-engineering]]></category>
            <category><![CDATA[cloud-engineering]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Nawodya Ishan]]></dc:creator>
            <pubDate>Sat, 22 Nov 2025 11:42:01 GMT</pubDate>
            <atom:updated>2025-11-22T11:47:47.314Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mZtfNe5Z0QPEovJy3siy6w.png" /></figure><p>Over the last decade, software teams have added a lot of “ops” flavored titles: DevOps Engineer, SRE, Platform Engineer, Cloud Engineer…</p><p>They sound similar, they overlap a lot, and job descriptions often mix them up.</p><p>This article clears the fog and gives you a <strong>big-picture, practical</strong> way to understand these four roles:</p><ul><li>What each role actually focuses on</li><li>How they work together in a modern engineering org</li><li>Which one might be the best fit for <em>you</em></li></ul><h3>1. Why so many roles in the first place?</h3><p>Modern systems are:</p><ul><li><strong>Cloud-native</strong> (AWS/Azure/GCP, Kubernetes, managed DBs, queues, etc.)</li><li><strong>Highly distributed</strong> (microservices, APIs, event-driven systems)</li><li><strong>Always-on</strong> (SLAs, SLOs, 24/7 uptime expectations)</li><li><strong>Fast-moving</strong> (continuous delivery, feature flags, experiments)</li></ul><p>No single role can “own everything” anymore. So organizations split responsibilities into <strong>complementary specializations</strong>:</p><ul><li>DevOps focuses on <strong>flow of changes</strong> from code to production</li><li>SRE focuses on <strong>reliability and resilience</strong></li><li>Platform Engineering focuses on <strong>building internal “paved roads”</strong></li><li>Cloud Engineering focuses on <strong>cloud infrastructure and foundations</strong></li></ul><p>Think of it like a city:</p><ul><li><strong>Cloud Engineers</strong> build the <strong>land</strong> (networks, base infra, foundations)</li><li><strong>Platform Engineers</strong> build the <strong>roads and utilities</strong> (platforms, golden paths, internal tools)</li><li><strong>DevOps Engineers</strong> help people <strong>get their cars from A to B faster</strong> (CI/CD, automation, practices)</li><li><strong>SREs</strong> make sure the <strong>city doesn’t go down</strong> (reliability, incident response, SLOs)</li></ul><h3>2. One-line definitions (the TL;DR)</h3><ul><li><strong>DevOps Engineer</strong></li><li>→ Improves how code flows from <strong>developer laptop → production</strong>, using automation, CI/CD, and good practices.</li><li><strong>Site Reliability Engineer (SRE)</strong></li><li>→ Software engineer focused on <strong>reliability, performance, and incident response</strong>, using SLOs and error budgets.</li><li><strong>Platform Engineer</strong></li><li>→ Builds and maintains an <strong>internal developer platform</strong> (IDP) and “golden paths” so product teams can ship safely and quickly.</li><li><strong>Cloud Engineer</strong></li><li>→ Designs, builds, and manages <strong>cloud infrastructure</strong> (networking, compute, storage, security) as a solid foundation.</li></ul><h3>3. DevOps Engineer - Owning the Delivery Pipeline</h3><h3>Main focus</h3><p><strong>Speed + safety of change delivery.</strong></p><p>“How do we get features from Git to production quickly, repeatably, and safely?”</p><h3>Typical responsibilities</h3><ul><li>Designing and maintaining <strong>CI/CD pipelines</strong> (GitHub Actions, GitLab CI, Jenkins, etc.)</li><li>Automating <strong>build, test, and deploy</strong> processes</li><li>Standardizing <strong>branching strategies</strong>, environments, and release workflows</li><li>Working closely with developers on:</li><li>Test automation</li><li>Deployment strategies (blue/green, canary, feature flags)</li><li>Integrating security into the pipeline (<strong>DevSecOps</strong>: SAST, DAST, dependency checks)</li><li>Writing infra glue: scripts, helper tools, CLI wrappers</li></ul><h3>Success looks like</h3><ul><li>Deploys are <strong>frequent, predictable, and boring</strong></li><li>Rollbacks are easy and tested</li><li>Build times are reasonable; feedback loops are fast</li><li>Fewer “it works on my machine” issues</li></ul><h3>Core skills</h3><ul><li>CI/CD tools, YAML pipelines</li><li>Git, branching strategies, release processes</li><li>Scripting (Bash, Python, Go, etc.)</li><li>Containers (Docker) and basic Kubernetes knowledge</li><li>Testing strategies (unit, integration, e2e) and how to plug them into pipelines</li></ul><h3>4. Site Reliability Engineer (SRE) - Owning Reliability &amp; Incidents</h3><h3>Main focus</h3><p><strong>Keeping systems reliable, observable, and resilient</strong> - without killing developer velocity.</p><h3>Typical responsibilities</h3><ul><li>Defining <strong>SLIs &amp; SLOs</strong> (latency, error rate, availability, throughput)</li><li>Managing <strong>error budgets</strong> and negotiating reliability vs. feature speed</li><li>Designing and running:</li><li>Alerting and on-call rotations</li><li>Incident response, postmortems, runbooks</li><li>Capacity planning &amp; performance tuning</li><li>Building <strong>reliability tools</strong>: chaos tests, load tests, auto-remediation scripts</li><li>Deep observability:</li><li>Metrics (Prometheus, CloudWatch, etc.)</li><li>Logs (ELK, Loki, etc.)</li><li>Traces (Jaeger, OpenTelemetry)</li></ul><h3>Success looks like</h3><ul><li>High uptime <strong>with fewer “heroic saves”</strong></li><li>Alerts are <strong>actionable</strong>, not noisy</li><li>Incidents result in <strong>learning and improvements</strong>, not blame</li><li>SLOs are clear and visible to product/engineering</li></ul><h3>Core skills</h3><ul><li>Strong <strong>software engineering</strong> skills (Python, Go, etc.)</li><li>Observability stacks: metrics, logs, traces</li><li>Incident management and root-cause analysis</li><li>Distributed systems concepts (timeouts, retries, backpressure, CAP trade-offs)</li><li>Reliability patterns (circuit breakers, bulkheads, graceful degradation)</li></ul><h3>5. Platform Engineer -Owning the Internal Developer Platform</h3><h3>Main focus</h3><p><strong>Developer experience and standardized infrastructure</strong>.</p><p>“Give product teams a paved road so they can ship without reinventing the wheel.”</p><h3>Typical responsibilities</h3><ul><li>Designing &amp; operating an <strong>Internal Developer Platform (IDP)</strong>:</li><li>Self-service environments</li><li>App templates / scaffolds</li><li>Standardized CI/CD pipelines</li><li>Providing <strong>golden paths</strong>:</li><li>“This is how you deploy a microservice”</li><li>“This is how you add a queue, a DB, or monitoring”</li><li>Abstracting cloud/Kubernetes complexity behind:</li><li>Portals (Backstage, custom UIs)</li><li>CLIs, operators, Helm charts</li><li>Governance:</li><li>Standardizing logging, metrics, security baselines, cost controls</li><li>RBAC, policies, guardrails</li></ul><h3>Success looks like</h3><ul><li>Product teams can <strong>self-serve</strong> infra &amp; deployments</li><li>Fewer one-off snowflake setups</li><li>Onboarding new developers is fast (“follow the platform path”)</li><li>Less time spent on repetitive infra tasks, more time spent on features</li></ul><h3>Core skills</h3><ul><li>Multi-disciplinary: cloud, Kubernetes, CI/CD, security, observability</li><li>Strong <strong>system design and automation</strong> mindset</li><li>Building tools/portals (TypeScript, Go, Python, APIs)</li><li>Understanding developer workflows and pain points</li><li>Knowledge of platform tooling (Backstage, Crossplane, Argo CD, etc.)</li></ul><h3>6. Cloud Engineer - Owning the Cloud Foundations</h3><h3>Main focus</h3><p>Designing and managing <strong>secure, scalable, cost-effective cloud infrastructure</strong>.</p><h3>Typical responsibilities</h3><ul><li>Designing <strong>VPCs</strong>, subnets, routing, VPNs, and peering</li><li>Managing <strong>IAM</strong>: roles, policies, least-privilege access</li><li>Provisioning and supporting:</li><li>Compute (EC2, VM Scale Sets, GKE/EKS/AKS nodes)</li><li>Databases (RDS, Cloud SQL, CosmosDB, etc.)</li><li>Storage (S3, Blob, GCS)</li><li>Messaging (SQS, Pub/Sub, EventBridge, Kafka)</li><li>Implementing <strong>Infrastructure as Code</strong> (Terraform, CloudFormation, Pulumi)</li><li>Security baselines: encryption, security groups, WAF, key management (KMS)</li><li>Cost optimization and right-sizing resources</li></ul><h3>Success looks like</h3><ul><li>Cloud environment is <strong>secure by default</strong></li><li>Infra is reproducible via IaC, not manual clicks</li><li>Costs are monitored and predictable</li><li>Scaling is smooth; no surprises under load</li></ul><h3>Core skills</h3><ul><li>Deep knowledge of at least one cloud provider (AWS/Azure/GCP)</li><li>Networking fundamentals (CIDR, routing, DNS, TLS, VPNs)</li><li>Terraform / other IaC tooling</li><li>Cloud security best practices</li><li>Basic Linux, containers, and automation scripting</li></ul><h3>7. How they work together in a real product lifecycle</h3><p>Imagine a new microservice is being built.</p><p><strong>Cloud Engineer</strong></p><ul><li>Has already set up the base <strong>networking, IAM, and shared services</strong> (databases, queues, secrets manager, etc.)</li><li>Provides <strong>Terraform modules</strong> or cloud blueprints to use.</li></ul><p><strong>Platform Engineer</strong></p><ul><li>Provides a <strong>service template</strong>:</li><li>Standard Docker/K8s config</li><li>Pre-wired logging &amp; metrics</li><li>Default CI/CD pipeline config</li><li>Offers a <strong>portal/self-service</strong> to request environments and resources.</li></ul><p><strong>DevOps Engineer</strong></p><ul><li>Fine-tunes the <strong>CI/CD pipeline</strong> for this service:</li><li>Runs tests</li><li>Builds image</li><li>Deploys to staging/prod</li><li>Adds security checks, quality gates, and rollback strategies.</li></ul><p><strong>SRE</strong></p><ul><li>Works with the team to define <strong>SLIs/SLOs</strong> for the service</li><li>Sets up <strong>dashboards, alerts, and runbooks</strong></li><li>Helps run load tests and tune performance before big launches.</li></ul><p>They are <strong>not competing roles</strong> - they’re different vantage points on the same mission:</p><blockquote><em>Ship features fast, safely, reliably, and sustainably on the cloud.</em></blockquote><h3>8. Role comparison</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*XU4ogMbg8le8-7zWW_YB3A.png" /></figure><h3>9. Which path is right for you?</h3><p>A few quick heuristics:</p><ul><li><strong>You enjoy CI/CD, automation, and “making releases painless”</strong></li></ul><p>→ You’ll likely enjoy <strong>DevOps Engineer</strong> roles.</p><ul><li><strong>You like debugging complex incidents, reading metrics, and improving resilience</strong></li></ul><p>→ <strong>SRE</strong> might be your sweet spot.</p><ul><li><strong>You like designing systems for other engineers, building tools &amp; platforms they use</strong></li></ul><p>→ Aim for <strong>Platform Engineer</strong>.</p><ul><li><strong>You love cloud architectures, networking, IAM, and IaC</strong></li></ul><p>→ <strong>Cloud Engineer</strong> fits you well.</p><p>In reality, careers aren’t rigid:</p><ul><li>Many engineers <strong>start as Cloud/DevOps</strong> and grow into <strong>Platform Engineering</strong>.</li><li>Some <strong>backend engineers move into SRE</strong> because they enjoy reliability and infra.</li><li>Titles vary a lot across companies; what matters is <strong>what you actually do day-to-day</strong>.</li></ul><h3>10. Final thoughts</h3><p>Instead of asking <em>“Which title is better?”</em>, ask:</p><blockquote><em>“Where in the lifecycle do I want to have the most impact?”</em></blockquote><ul><li>On <strong>how code moves</strong> → DevOps</li><li>On <strong>how reliable it runs</strong> → SRE</li><li>On <strong>how teams consume infra</strong> → Platform</li><li>On <strong>what infra exists underneath</strong> → Cloud</li></ul><p>All four roles are part of the same ecosystem, and the best engineers can <strong>speak the language of each</strong> even if they specialize in one.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0ce689d539e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simple Storage Smart Contract on Avalanche Blockchain with Solidity, TypeScript, EVM, HardHat and…]]></title>
            <link>https://nawodyaishan.medium.com/simple-storage-smart-contract-on-avalanche-blockchain-with-solidity-typescript-evm-hardhat-and-b26103f5e548?source=rss-6c6cc46357d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/b26103f5e548</guid>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[avalanche]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[samrt-contract]]></category>
            <dc:creator><![CDATA[Nawodya Ishan]]></dc:creator>
            <pubDate>Sun, 23 Apr 2023 14:53:28 GMT</pubDate>
            <atom:updated>2023-04-24T09:58:29.943Z</atom:updated>
            <content:encoded><![CDATA[<h3>Simple Storage Smart Contract on Avalanche Blockchain with Solidity, TypeScript, EVM, HardHat and EthersJS</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HDXY6ns3t01GdPh2FlBkmw.png" /></figure><h3>Introduction</h3><p>Avalanche is a relatively new blockchain platform that aims to solve some of the scalability and efficiency issues faced by other blockchain networks like Bitcoin and Ethereum. It was created by a team of computer scientists led by Emin Gün Sirer, a well-known figure in the blockchain community.</p><p>Avalanche uses a novel consensus mechanism called Avalanche consensus, which allows for high throughput, low latency, and high transaction finality. Unlike traditional Proof-of-Work or Proof-of-Stake consensus algorithms, Avalanche relies on a random sampling of network participants to quickly reach a consensus on the state of the network.</p><p>One of the key features of Avalanche is its ability to support multiple subnets or “blockchains within a blockchain.” This means that different groups of users can create their own subnets with their own rules and governance structures while still being able to interact with the wider Avalanche network.</p><p>Another notable feature of Avalanche is its support for the creation of smart contracts using the Solidity programming language, which is also used by Ethereum. This allows developers to build decentralized applications (dApps) on the Avalanche platform with familiar tools and languages.</p><p>Overall, Avalanche is a promising blockchain platform that offers significant improvements in scalability, speed, and flexibility over other existing blockchain networks. Its unique consensus mechanism and support for multiple subnets make it an interesting option for developers and users looking to build decentralized applications or participate in a fast and efficient blockchain ecosystem.</p><h3>Steps</h3><h3>Prerequisites</h3><p>Before we begin, make sure you have the following tools installed:</p><ol><li>Node.js (v14+)</li><li>npm (v7+)</li><li>HardHat (v2+)</li><li>Solidity (v0.8+)</li></ol><h3>Step 1: Setting up the project</h3><p>Create a new directory for the project and navigate into it:</p><pre>mkdir simple-storage<br>cd simple-storage</pre><p>Initialize a new Node.js project and install the required dependencies:</p><pre>npm init -y<br>npm install --save-dev hardhat @nomiclabs/hardhat-waffle ethereum-waffle chai @nomiclabs/hardhat-ethers ethers typescript ts-node dotenv @types/dotenv @types/mocha @types/chai avalanche</pre><p>Initialize HardHat:</p><pre>npx hardhat</pre><p>Choose “Create an empty hardhat.config.js” when prompted.</p><h3>Step 2: Configure TypeScript and HardHat</h3><p>Create a new <strong>tsconfig.json</strong> file in the root of the project with the following content:</p><pre>{<br>  &quot;compilerOptions&quot;: {<br>    &quot;target&quot;: &quot;es2017&quot;,<br>    &quot;module&quot;: &quot;commonjs&quot;,<br>    &quot;strict&quot;: true,<br>    &quot;esModuleInterop&quot;: true,<br>    &quot;skipLibCheck&quot;: true,<br>    &quot;forceConsistentCasingInFileNames&quot;: true,<br>    &quot;resolveJsonModule&quot;: true,<br>    &quot;outDir&quot;: &quot;dist&quot;<br>  },<br>  &quot;include&quot;: [&quot;./scripts&quot;, &quot;./test&quot;],<br>  &quot;files&quot;: [&quot;./hardhat.config.ts&quot;]<br>}</pre><p>Rename <strong>hardhat.config.js</strong> to <strong>hardhat.config.ts</strong> and update its content:</p><pre>import { HardhatUserConfig } from &#39;hardhat/config&#39;;<br>import &#39;@nomiclabs/hardhat-waffle&#39;;<br>import &#39;@nomiclabs/hardhat-ethers&#39;;<br>import &#39;dotenv/config&#39;;<br><br><br>const config: HardhatUserConfig = {<br>  solidity: &#39;0.8.0&#39;,<br>  networks: {<br>    hardhat: {<br>      chainId: 31337,<br>    },<br>  },<br>  mocha: {<br>    timeout: 20000,<br>  },<br>};<br>export default config;<br></pre><h3>Step 3: Creating the Simple Storage Contract</h3><p>Create a new directory <strong>contracts</strong> and a new Solidity file <strong>SimpleStorage.sol</strong> inside it:</p><pre>mkdir contracts<br>touch contracts/SimpleStorage.sol</pre><p>Add the following code to <strong>SimpleStorage.sol</strong>:</p><pre>// SPDX-License-Identifier: MIT<br>pragma solidity ^0.8.0;<br>so<br>contract SimpleStorage {<br>  uint256 private _storedData;<br>  function set(uint256 value) public {<br>    _storedData = value;<br>  }<br>  function get() public view returns (uint256) {<br>    return _storedData;<br>  }<br>}</pre><h3>Overview</h3><p>The Simple Storage contract is designed to demonstrate the basic functionality of a smart contract by allowing users to store and retrieve data on the Ethereum blockchain. The contract consists of a single state variable that holds an unsigned integer and two functions for setting and getting the stored value.</p><h3>State Variables</h3><p>The contract has one state variable:</p><ul><li><strong>storedData</strong>: This unsigned integer (<strong>uint256</strong>) holds the stored data. It is the main data storage for the contract, and its value can be modified using the <strong>set()</strong> function and retrieved using the <strong>get()</strong> function.</li></ul><h3>Functions</h3><p>The contract has two main functions:</p><h3>set()</h3><p>This function allows users to update the value of the <strong>storedData</strong> state variable. It takes a single input parameter, a <strong>uint256</strong> value, which represents the new data to be stored.</p><pre>function set(uint256 x) public {<br>    storedData = x;<br>}</pre><p>When called, this function updates the <strong>storedData</strong> state variable with the provided input value.</p><h3>get()</h3><p>This function allows users to retrieve the current value of the <strong>storedData</strong> state variable. It takes no input parameters and returns the <strong>uint256</strong> value stored in <strong>storedData</strong>.</p><pre>function get() public view returns (uint256) {<br>    return storedData;<br>}</pre><p>When called, this function returns the current value of the <strong>storedData</strong> state variable without modifying it.</p><h3>Interaction Flow</h3><p>The following steps outline the typical interaction flow for users interacting with the Simple Storage contract:</p><ol><li><strong>Deploy the contract</strong>: The user deploys the Simple Storage contract to the Ethereum blockchain. Upon deployment, the <strong>storedData</strong> state variable is initialized with the value of <strong>0</strong>.</li><li><strong>Set the stored data</strong>: The user calls the <strong>set()</strong> function, providing a <strong>uint256</strong> value as input. The function updates the <strong>storedData</strong> state variable with the provided value.</li><li><strong>Get the stored data</strong>: The user calls the <strong>get()</strong> function to retrieve the current value of the <strong>storedData</strong> state variable. The function returns the <strong>uint256</strong> value without modifying it.</li></ol><h3>Conclusion</h3><p>The Simple Storage smart contract demonstrates the basic functionality of a smart contract on the Ethereum blockchain. It allows users to store and retrieve an unsigned integer value through two simple functions, <strong>set()</strong> and <strong>get()</strong>. This contract serves as a starting point for understanding the fundamentals of smart contract development and can be expanded upon to implement more complex features and use cases.</p><h3>Step 4: Writing tests for the contract</h3><p>Create a new directory <strong>test</strong> and a new TypeScript file <strong>SimpleStorage.test.ts</strong> inside it:</p><pre>mkdir test<br>touch test/SimpleStorage.test.ts</pre><p>Add the following code to <strong>SimpleStorage.test.ts</strong>:</p><pre>// @ts-ignore<br>import { ethers, waffle } from &quot;hardhat&quot;;<br>import { Contract } from &quot;ethers&quot;;<br>import { expect } from &quot;chai&quot;;<br><br>describe(&quot;SimpleStorage&quot;, () =&gt; {<br>    let simpleStorage: Contract;<br>    beforeEach(async () =&gt; {<br>        const SimpleStorage = await ethers.getContractFactory(&quot;SimpleStorage&quot;);<br>        simpleStorage = await SimpleStorage.deploy();<br>        await simpleStorage.deployed();<br>    });<br>    it(&quot;Initial stored data should be 0&quot;, async () =&gt; {<br>        const storedData = await simpleStorage.get();<br>        expect(storedData.toString()).to.equal(&quot;0&quot;);<br>    });<br>    it(&quot;Should set stored data to a new value&quot;, async () =&gt; {<br>        await simpleStorage.set(42);<br>        const storedData = await simpleStorage.get();<br>        expect(storedData.toString()).to.equal(&quot;42&quot;);<br>    });<br>});<br></pre><h3>Step 5: Compile the contract and run tests</h3><p>Compile the contract using HardHat:</p><pre>npx hardhat compile</pre><p>Run the tests:</p><pre>npx hardhat test</pre><p>If everything is set up correctly, you should see the tests passing.</p><h3>Step 6: Deploy the contract on a local network</h3><p>Create a new directory <strong>scripts</strong> and a new TypeScript file <strong>deploy.ts</strong> inside it:</p><pre>mkdir scripts<br>touch scripts/deploy.ts</pre><p>Add the following code to <strong>deploy.ts</strong>:</p><pre>// @ts-ignore<br>import { ethers } from &quot;hardhat&quot;;<br><br>async function main() {<br>    const SimpleStorageFactory = await ethers.getContractFactory(&quot;SimpleStorage&quot;);<br>    const simpleStorage = await SimpleStorageFactory.deploy();<br>    await simpleStorage.deployed();<br>    console.log(&quot;SimpleStorage deployed to:&quot;, simpleStorage.address);<br>}<br>main()<br>    .then(() =&gt; process.exit(0))<br>    .catch((error) =&gt; {<br>        console.error(error);<br>        process.exit(1);<br>    });<br></pre><p>Run the deployment script:</p><pre>npx hardhat run scripts/deploy.ts</pre><p>You should see the contract deployed to a local address.</p><h3>Step 7: Deploy the contract on Avalanche Testnet using Ethers.js</h3><p>To deploy the contract on Avalanche Testnet, you need an account with test AVAX. You can get some from the <a href="https://faucet.avax-test.network/"><strong>Avalanche Faucet</strong></a>.</p><p>Add the following configuration to your <strong>hardhat.config.ts</strong>:</p><pre>import { HardhatUserConfig } from &#39;hardhat/config&#39;;<br>import &#39;@nomiclabs/hardhat-waffle&#39;;<br>import &#39;@nomiclabs/hardhat-ethers&#39;; // Add this line<br>import &#39;dotenv/config&#39;;<br><br>const config: HardhatUserConfig = {<br>  solidity: &#39;0.8.0&#39;,<br>  networks: {<br>    hardhat: {<br>      chainId: 31337,<br>    },<br>    fuji: {<br>      url: &quot;&lt;https://api.avax-test.network/ext/bc/C/rpc&gt;&quot;,<br>      chainId: 43113,<br>      gasPrice: 225000000000,<br>      accounts: [process.env.PRIVATE_KEY || &quot;&quot;],<br>    },<br>  },<br>  mocha: {<br>    timeout: 20000,<br>  },<br>};<br>export default config;<br></pre><p>Make sure to replace <strong>PRIVATE_KEY</strong> in the <strong>accounts</strong> array with your private key.</p><p>Run the deployment script on Avalanche Testnet:</p><pre>npx hardhat run scripts/deploy.ts --network fuji</pre><p>You should see the contract deployed to an Avalanche Testnet address.</p><p>Now you have successfully created a simple storage contract in Solidity with TypeScript, EVM, and AvalancheJS, along with HardHat local testing and deployments.</p><h3>Step 8: Interacting with the contract using AvalancheJS</h3><p>To interact with the deployed contract, create a new TypeScript file <strong>interact.ts</strong> inside the <strong>scripts</strong> directory:</p><pre>touch scripts/interact.ts</pre><p>Add the following code to <strong>interact.ts</strong>:</p><pre>import {ethers} from &#39;ethers&#39;;<br>import * as dotenv from &#39;dotenv&#39;;<br><br>dotenv.config();<br>const CONTRACT_ADDRESS = process.env.CONTRACT_ADDRESS as string|| &#39;&#39;;<br>if (!CONTRACT_ADDRESS) {<br>    throw new Error(&#39;Please set your contract address in the interact.ts script&#39;);<br>}<br>// Your ABI Here<br>const ABI = [<br>    {<br>        &quot;inputs&quot;: [],<br>        &quot;name&quot;: &quot;get&quot;,<br>        &quot;outputs&quot;: [<br>            {<br>                &quot;internalType&quot;: &quot;uint256&quot;,<br>                &quot;name&quot;: &quot;&quot;,<br>                &quot;type&quot;: &quot;uint256&quot;<br>            }<br>        ],<br>        &quot;stateMutability&quot;: &quot;view&quot;,<br>        &quot;type&quot;: &quot;function&quot;<br>    },<br>    {<br>        &quot;inputs&quot;: [<br>            {<br>                &quot;internalType&quot;: &quot;uint256&quot;,<br>                &quot;name&quot;: &quot;value&quot;,<br>                &quot;type&quot;: &quot;uint256&quot;<br>            }<br>        ],<br>        &quot;name&quot;: &quot;set&quot;,<br>        &quot;outputs&quot;: [],<br>        &quot;stateMutability&quot;: &quot;nonpayable&quot;,<br>        &quot;type&quot;: &quot;function&quot;<br>    }<br>];<br>const FUJI_RPC_URL = &quot;&lt;https://api.avax-test.network/ext/bc/C/rpc&gt;&quot;;<br>const PRIVATE_KEY = process.env.PRIVATE_KEY as string || &#39;&#39;;<br>async function interact() {<br>    dotenv.config();<br>    if (!CONTRACT_ADDRESS) {<br>        throw new Error(&quot;Please set your contract address in the interact.ts script&quot;);<br>    }<br>    const provider = new ethers.providers.JsonRpcProvider(FUJI_RPC_URL);<br>    const wallet = new ethers.Wallet(PRIVATE_KEY, provider);<br>    console.log(&quot;Wallet address:&quot;, wallet.address);<br>    const simpleStorage = new ethers.Contract(CONTRACT_ADDRESS, ABI, wallet);<br>    console.log(&quot;Contract address:&quot;, CONTRACT_ADDRESS);<br>    console.log(&quot;Contract instance:&quot;, simpleStorage);<br>    // Read stored data<br>    const storedData = await simpleStorage.get();<br>    console.log(&quot;Stored data:&quot;, storedData.toString());<br>    // Set new data<br>    const tx = await simpleStorage.set(100);<br>    await tx.wait();<br>    // Read updated stored data<br>    const updatedStoredData = await simpleStorage.get();<br>    console.log(&quot;Updated stored data:&quot;, updatedStoredData.toString());<br>}<br>interact().then(r =&gt; console.log(&quot;Complete&quot;));<br></pre><p>Replace <strong>YOUR_CONTRACT_ADDRESS</strong> with the address of your deployed contract and add your contract&#39;s ABI.</p><p>Run the interaction script:</p><pre>npx ts-node scripts/interact.ts</pre><p>You should see the stored data, transaction receipt, and updated stored data in the console output.</p><pre>╰─ npx ts-node scripts/interact.ts<br><br>Wallet address: 0x2E3bE6ddaC75f8dr443f4fA97d14009A540E917d881ea92<br>Contract address: 0x0697aBc8Dc960d539745fb511f4A8BB8989826b78CaF61<br>Contract instance: Contract {<br>  interface: Interface {<br>    fragments: [ [FunctionFragment], [FunctionFragment] ],<br>    _abiCoder: AbiCoder { coerceFunc: null },<br>    functions: { &#39;get()&#39;: [FunctionFragment], &#39;set(uint256)&#39;: [FunctionFragment] },<br>    errors: {},<br>    events: {},<br>    structs: {},<br>    deploy: ConstructorFragment {<br>      name: null,<br>      type: &#39;constructor&#39;,<br>      inputs: [],<br>      payable: false,<br>      stateMutability: &#39;nonpayable&#39;,<br>      gas: null,<br>      _isFragment: true<br>    },<br>    _isInterface: true<br>  },<br>  provider: JsonRpcProvider {<br>    _isProvider: true,<br>    _events: [],<br>    _emitted: { block: -2 },<br>    disableCcipRead: false,<br>    formatter: Formatter { formats: [Object] },<br>    anyNetwork: false,<br>    _networkPromise: Promise { &lt;pending&gt; },<br>    _maxInternalBlockNumber: -1024,<br>    _lastBlockNumber: -2,<br>    _maxFilterBlockRange: 10,<br>    _pollingInterval: 4000,<br>    _fastQueryDate: 0,<br>    connection: { url: &#39;&lt;https://api.avax-test.network/ext/bc/C/rpc&gt;&#39; },<br>    _nextId: 42<br>  },<br>  signer: Wallet {<br>    _isSigner: true,<br>    _signingKey: [Function (anonymous)],<br>    _mnemonic: [Function (anonymous)],<br>    address: &#39;0x2E3bE6ddaC75f8dA97d14009A540E748fb917d881ea92&#39;,<br>    provider: JsonRpcProvider {<br>      _isProvider: true,<br>      _events: [],<br>      _emitted: [Object],<br>      disableCcipRead: false,<br>      formatter: [Formatter],<br>      anyNetwork: false,<br>      _networkPromise: [Promise],<br>      _maxInternalBlockNumber: -1024,<br>      _lastBlockNumber: -2,<br>      _maxFilterBlockRange: 10,<br>      _pollingInterval: 4000,<br>      _fastQueryDate: 0,<br>      connection: [Object],<br>      _nextId: 42<br>    }<br>  },<br>  callStatic: {<br>    &#39;get()&#39;: [Function (anonymous)],<br>    &#39;set(uint256)&#39;: [Function (anonymous)],<br>    get: [Function (anonymous)],<br>    set: [Function (anonymous)]<br>  },<br>  estimateGas: {<br>    &#39;get()&#39;: [Function (anonymous)],<br>    &#39;set(uint256)&#39;: [Function (anonymous)],<br>    get: [Function (anonymous)],<br>    set: [Function (anonymous)]<br>  },<br>  functions: {<br>    &#39;get()&#39;: [Function (anonymous)],<br>    &#39;set(uint256)&#39;: [Function (anonymous)],<br>    get: [Function (anonymous)],<br>    set: [Function (anonymous)]<br>  },<br>  populateTransaction: {<br>    &#39;get()&#39;: [Function (anonymous)],<br>    &#39;set(uint256)&#39;: [Function (anonymous)],<br>    get: [Function (anonymous)],<br>    set: [Function (anonymous)]<br>  },<br>  filters: {},<br>  _runningEvents: {},<br>  _wrappedEmits: {},<br>  address: &#39;0x0697aBc8Dc960d53911f4A8BB89478fb489826b78CaF61&#39;,<br>  resolvedAddress: Promise { &lt;pending&gt; },<br>  &#39;get()&#39;: [Function (anonymous)],<br>  &#39;set(uint256)&#39;: [Function (anonymous)],<br>  get: [Function (anonymous)],<br>  set: [Function (anonymous)]<br>}<br>Stored data: 0<br>Updated stored data: 100<br>Complete<br></pre><p>That’s it! You have now successfully developed a simple storage contract in Solidity with TypeScript, EVM, HardHat, and AvalancheJS, including local testing, deployments on Avalanche Testnet, and interactions with the deployed contract.</p><h3>Source Code</h3><p><a href="https://github.com/nawodyaishan/avalanche-simple-storage">https://github.com/nawodyaishan/avalanche-simple-storage</a></p><p><em>Originally published at </em><a href="https://nawodyaishan.hashnode.dev/simple-storage-smart-contract-avalanche"><em>https://nawodyaishan.hashnode.dev</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b26103f5e548" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ethereum Blockchain App Developer Learning Path]]></title>
            <link>https://nawodyaishan.medium.com/ethereum-blockchain-app-developer-learning-path-26753703892?source=rss-6c6cc46357d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/26753703892</guid>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[dapps]]></category>
            <dc:creator><![CDATA[Nawodya Ishan]]></dc:creator>
            <pubDate>Sun, 23 Apr 2023 11:57:20 GMT</pubDate>
            <atom:updated>2023-04-23T11:57:20.834Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HDXY6ns3t01GdPh2FlBkmw.png" /></figure><p>This guide outlines the steps to becoming a Blockchain App Developer Software Engineer, covering essential knowledge and skills.</p><h3>Step 1: Fundamentals of Computer Science and Programming</h3><p><strong>Learn a programming language</strong>: Start with a language like Python or JavaScript, which are beginner-friendly and commonly used in blockchain development.</p><ul><li>Resources: <a href="https://www.python.org/doc/"><strong>Python</strong></a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript"><strong>JavaScript</strong></a></li></ul><p><strong>Study data structures and algorithms</strong>: Understand basic data structures (arrays, linked lists, trees) and algorithms (sorting, searching).</p><ul><li>Resources: <a href="https://www.coursera.org/specializations/algorithms"><strong>Coursera — Algorithms</strong></a></li></ul><p><strong>Learn basic web development</strong>: Understand HTML, CSS, and JavaScript to build user interfaces for web applications.</p><ul><li>Resources: <a href="https://www.freecodecamp.org/"><strong>FreeCodeCamp</strong></a></li></ul><h3>Step 2: Blockchain Fundamentals</h3><p><strong>Understand blockchain basics</strong>: Learn about distributed ledgers, consensus mechanisms, cryptography, and smart contracts.</p><ul><li>Resources: <a href="https://www.coursera.org/learn/blockchain-basics"><strong>Blockchain Basics</strong></a></li></ul><p><strong>Explore popular blockchain platforms</strong>: Study platforms like Ethereum, Bitcoin, and Hyperledger to understand their ecosystems and use cases.</p><ul><li>Resources: <a href="https://ethereum.org/"><strong>Ethereum</strong></a>, <a href="https://bitcoin.org/"><strong>Bitcoin</strong></a>, <a href="https://www.hyperledger.org/"><strong>Hyperledger</strong></a></li></ul><h3>Step 3: Smart Contract Development</h3><p><strong>Learn Solidity</strong>: This is the primary language for writing smart contracts on the Ethereum platform.</p><ul><li>Resources: <a href="https://solidity.readthedocs.io/"><strong>Solidity Documentation</strong></a></li></ul><p><strong>Understand the Ethereum development environment</strong>: Learn about tools like Truffle, Ganache, and Metamask to streamline development.</p><ul><li>Resources: <a href="https://www.trufflesuite.com/"><strong>Truffle Suite</strong></a></li></ul><p><strong>Study other smart contract languages</strong>: Consider learning languages like Vyper (Ethereum), Rust (Polkadot, Solana), or Go (Hyperledger).</p><ul><li>Resources: <a href="https://vyper.readthedocs.io/"><strong>Vyper</strong></a>, <a href="https://www.rust-lang.org/"><strong>Rust</strong></a>, <a href="https://golang.org/"><strong>Go</strong></a></li></ul><h3>Step 4: Decentralized Application (DApp) Development</h3><p><strong>Learn to build DApps</strong>: Understand the architecture and components of decentralized applications.</p><ul><li>Resources: <a href="https://www.youtube.com/c/DappUniversity"><strong>DApp University</strong></a></li></ul><p><strong>Frontend development for DApps</strong>: Utilize web development skills to build user interfaces, and integrate with blockchain using libraries like Web3.js or Ethers.js.</p><ul><li>Resources: <a href="https://web3js.readthedocs.io/"><strong>Web3.js</strong></a>, <a href="https://docs.ethers.io/"><strong>Ethers.js</strong></a></li></ul><p><strong>Security best practices</strong>: Learn to write secure smart contracts and protect DApps from common vulnerabilities.</p><ul><li>Resources: <a href="https://consensys.github.io/smart-contract-best-practices/"><strong>Smart Contract Security</strong></a></li></ul><h3>Step 5: Advanced Topics</h3><p><strong>Layer 2 scaling solutions</strong>: Study technologies like Plasma, Optimistic Rollups, and zk-SNARKs to improve blockchain scalability.</p><ul><li>Resources: <a href="https://ethereum.org/en/developers/docs/layer-2-scaling/"><strong>Ethereum Layer 2 Scaling Solutions</strong></a></li></ul><p><strong>Interoperability</strong>: Understand cross-chain communication and bridges for seamless integration between different blockchain networks.</p><ul><li>Resources: <a href="https://cosmos.network/"><strong>Cosmos</strong></a>, <a href="https://polkadot.network/"><strong>Polkadot</strong></a></li></ul><p><strong>Decentralized finance (DeFi)</strong>: Learn about DeFi protocols, lending platforms, decentralized exchanges, and other financial applications built on blockchain.</p><ul><li>Resources: <a href="https://defipulse.com/"><strong>DeFi Pulse</strong></a>, <a href="https://aave.com/"><strong>Aave</strong></a>, <a href="https://uniswap.org/"><strong>Uniswap</strong></a></li></ul><p><strong>Non-fungible tokens (NFTs)</strong>: Understand the concept of NFTs and learn how to create, manage, and trade unique digital assets on blockchain platforms.</p><ul><li>Resources: <a href="https://opensea.io/"><strong>OpenSea</strong></a>, <a href="https://nftschool.dev/"><strong>NFT School</strong></a></li></ul><p><strong>Identity and privacy</strong>: Study blockchain-based identity solutions and privacy-preserving techniques like zero-knowledge proofs.</p><ul><li>Resources: <a href="https://www.uport.me/"><strong>uPort</strong></a>, <a href="https://z.cash/technology/zksnarks/"><strong>zk-SNARKs</strong></a></li></ul><h3>Step 6: Hands-on Experience and Networking</h3><ul><li><strong>Build personal projects</strong>: Create DApps, smart contracts, or other blockchain-related projects to solidify your skills and showcase your capabilities.</li><li><strong>Contribute to open-source projects</strong>: Engage with the blockchain community by contributing to existing projects, reporting bugs, or suggesting improvements.</li><li><strong>Participate in hackathons</strong>: Join blockchain hackathons to collaborate with others, develop new ideas, and compete for prizes.</li><li><strong>Network</strong>: Attend conferences, meetups, and webinars to connect with other professionals, learn about the latest trends, and stay up-to-date with the industry.</li></ul><h3>Step 7: Job Search and Continuous Learning</h3><ul><li><strong>Prepare your portfolio</strong>: Create a professional portfolio showcasing your projects, contributions, and skills to impress potential employers.</li><li><strong>Enhance your online presence</strong>: Maintain an active presence on platforms like GitHub, LinkedIn, and Twitter to connect with industry professionals and showcase your expertise.</li><li><strong>Apply for jobs</strong>: Look for job opportunities at blockchain startups, established companies, or freelance platforms.</li><li><strong>Stay informed</strong>: Keep learning about new developments, technologies, and trends in the blockchain space to stay ahead in the industry.</li></ul><p>By following this learning path, you will gain the essential knowledge and skills to become a successful blockchain app developer software engineer. Remember that the field is constantly evolving, so staying up-to-date and continuing to learn is crucial for your success.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=26753703892" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ASP.NET Core MVC — What is IActionResult?]]></title>
            <link>https://nawodyaishan.medium.com/asp-net-core-mvc-what-is-iactionresult-2429ccf3295b?source=rss-6c6cc46357d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/2429ccf3295b</guid>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[razorpages]]></category>
            <category><![CDATA[aspnetcore]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Nawodya Ishan]]></dc:creator>
            <pubDate>Sat, 18 Jun 2022 15:17:13 GMT</pubDate>
            <atom:updated>2022-06-18T15:17:13.760Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dk5paM618mI0W8Os2_hvhw.png" /></figure><h3>ASP.NET Core MVC — What is IActionResult?</h3><p>The IActionResult type is a based abstraction of an ActionResult.</p><p>💡 An ActionResult is a return type of a controller method, also called an action method, and serves as the base class for *Result classes. Action methods return models to views, file streams, redirect to other controllers, or whatever is necessary for the task at hand.</p><p>It specifies how a response is going to be given for a Specific Request.</p><p>The IActionResult return type is appropriate when multiple action result return types are possible in an action.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/0*OyrtbfL9ZRiKr0fR.png" /></figure><p>The IActionResult is an interface, while action results themselves are abstract classes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2429ccf3295b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ASP.NET Core MVC — What are HTTP Status Codes?]]></title>
            <link>https://nawodyaishan.medium.com/asp-net-core-mvc-what-are-http-status-codes-e39323279af8?source=rss-6c6cc46357d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/e39323279af8</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[aspnetcore]]></category>
            <category><![CDATA[web]]></category>
            <category><![CDATA[http-request]]></category>
            <dc:creator><![CDATA[Nawodya Ishan]]></dc:creator>
            <pubDate>Sat, 18 Jun 2022 15:13:13 GMT</pubDate>
            <atom:updated>2022-06-18T15:13:13.619Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oB9hJ3CoYsHY1ufNcua2Jg.png" /></figure><h3>ASP.NET Core MVC — What are HTTP Status Codes?</h3><p>Any RESTful Web API relies on request and response. Every status code has a specific significance, and we must ensure that we are sending a proper answer with a valid status code during development.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/440/0*9bTUY-jV0Jr_yoY9.png" /></figure><h3>Why HTTP Status Codes ?</h3><p>HTTP response status codes represent whether or not a specific HTTP request were successfully completed. These responses are divided into the following 5 categories.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*KWBM9k3gNKCeM_17.png" /></figure><p>The Status-Code element in a server response is a three-digit integer where the first digit indicates the response type and the final two digits have no classifications role.</p><h3>1. Informational Responses</h3><p>These codes are informative, they are telling like the server has received a request and is continuing to process.</p><p>Ex:</p><ol><li>100 Continue — This interim response indicates that the client should continue the request or ignore the response if the request is already finished.</li><li>101 Switching protocols — This code is sent in response to an Upgrade request header from the client and indicates the protocol the server is switching to.</li></ol><h3>2. Succesful Responses</h3><p>This means the request has been successful and the browser has received the expected information data.</p><p>Ex:</p><ol><li>200 OK — The request is OK. The request succeeded. The result meaning of “success” depends on the HTTP method:</li></ol><ul><li>GET: The resource has been fetched and transmitted in the message body.</li><li>HEAD: The representation headers are included in the response without any message body.</li><li>PUT or POST: The resource describing the result of the action is transmitted in the message body.</li><li>TRACE: The message body contains the request message as received by the server.</li></ul><ol><li>202 Accepted — The request is accepted for processing, but the processing is not complete.</li><li>201 Created — The request is complete, and a new resource is created .</li><li>203 Non-authoritative Information — The information in the entity header is from a local or third-party copy, not from the original server.</li><li>204 No Content — A status code and a header are given in the response, but there is no entity-body in the reply.</li><li>205 Reset Content — The browser should clear the form used for this transaction for additional input.</li><li>206 Partial Content — The server is returning partial data of the size requested. Used in response to a request specifying a <em>Range</em> header. The server must specify the range included in the response with the <em>Content-Range</em> header.</li></ol><h3>3. Redirection Responses</h3><p>This code says that we have been redirected and completion of the request need further actions.</p><p>Ex:</p><ol><li>300 Multiple Choices — A link list. The user can select a link and go to that location. Maximum five addresses .</li><li>301 Moved Permanently — The requested page has moved to a new url .</li><li>302 Found — The requested page has moved temporarily to a new url .</li><li>303 See Other — The requested page can be found under a different url .</li><li>304 Not Modified — This is the response code to an If-Modified-Since or If-None-Match header, where the URL has not been modified since the specified date.</li><li>305 Use Proxy — The requested URL must be accessed through the proxy mentioned in the Location header.</li><li>306 Unused — This code was used in a previous version. It is no longer used, but the code is reserved.</li><li>307 Temporary Redirect — The requested page has moved temporarily to a new url.</li></ol><h3>4. Client Error Responses</h3><p>This indicates the client errors such as some pages cannot be reached, unavailable etc.</p><p>Ex:</p><ol><li>400 Bad Request — The server did not understand the request.</li><li>401 Unauthorised — The requested page needs a username and a password.</li><li>402 Payment Required — <em>You can not use this code yet.</em></li><li>403 Forbidden — Access is forbidden to the requested page.</li><li>404 Not Found — The server can not find the requested page.</li><li>405 Method Not Allowed — The method specified in the request is not allowed.</li><li>406 Not Acceptable — The server can only generate a response that is not accepted by the client.</li><li>407 Proxy Authentication Required — You must authenticate with a proxy server before this request can be served.</li></ol><h3>5. Server Error</h3><p>These are the code that tells request is valid but the server could not complete the request.</p><p>Ex:</p><ol><li>500 Internal Server Error — The request was not completed. The server met an unexpected condition.</li><li>501 Not Implemented — The request was not completed. The server did not support the functionality required.</li><li>502 Bad Gateway — The request was not completed. The server received an invalid response from the upstream server.</li><li>503 Service Unavailable — The request was not completed. The server is temporarily overloading or down.</li><li>504 Gateway Timeout — The gateway has timed out.</li><li>505 HTTP Version Not Supported — The server does not support the “http protocol” version.</li></ol><blockquote><em>You can learn more information via Microsoft’s Official Documentation </em><a href="https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.http.statuscodes?view=aspnetcore-6.0"><em>here</em></a><em>.</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e39323279af8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ASP.NET Core MVC — Introduction]]></title>
            <link>https://nawodyaishan.medium.com/asp-net-core-mvc-introduction-c9be7bde8b74?source=rss-6c6cc46357d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/c9be7bde8b74</guid>
            <category><![CDATA[aspnetcore]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[beginner]]></category>
            <dc:creator><![CDATA[Nawodya Ishan]]></dc:creator>
            <pubDate>Sat, 18 Jun 2022 15:10:59 GMT</pubDate>
            <atom:updated>2022-06-18T15:20:37.568Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HoRIZoUs1m2zmIMuxw6v7Q.png" /></figure><h3>ASP.NET Core MVC — Introduction</h3><p>Hey fellows, In this article series I’m going to cover the following areas in the Web development with C#, ASP .NET Core MVC, MVVM Tech Stack.</p><ul><li>ASP .NET Core</li><li>Razor Pages and Blazor</li><li>MVC Architecture</li><li>MVVM Architecture</li><li>Models, ViewModels, Views, Partial views, Controllers, ViewComponents</li><li>Dependency injection, Major dependency injection lifetimes, Services</li><li>SQL Server configuration, EFCore migrations, Relationship types</li><li>Authentication, Authorization, Cookie-based Authentication</li><li>Azure Deployment</li></ul><p>So, In this section, we will talk about MVC architecture at a high level.</p><h3>What is MVC mean?</h3><p>The <strong>Model-View-Controller (MVC)</strong> is an architectural design pattern that divides a software application/system into three main logical components,</p><ol><li><strong>The model</strong></li><li><strong>The view</strong></li><li><strong>The controller</strong></li></ol><p>Each of these components is made to control and manage specific development domains in an application.</p><p>MVC is one of the most frequently used industry-standard web development frameworks to create scalable and extensible projects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/0*QRQsNh3d_KrZkLvE.png" /></figure><h3>Model</h3><p>In basic C# ASP .NET Core Web applications, it acts as a C# class which holds application data as a Data Blueprint. It also manages the Database operations and relations.</p><p>Ex: Buyer, Seller, Admin User, Categories Classes in e-commerce Applications</p><p>So Basically, The Model component corresponds to all the data-related logic that the user works with.</p><h3>View</h3><p>The view is a component that displays the user interface. In C#, It’s the CSHTML file (Razor Views). This handles the app’s data presentation and user interaction</p><p>In view, you can trigger/notify the events that get handled by the controllers.</p><h3>Controller</h3><p>A controller controls the workflow that a user interacts with MVC application*<em>.</em>* A controller contains the flow control logic for an ASP.NET MVC application. A controller determines what response to send back to a user when a user makes a browser request.</p><p>According to some folks,</p><blockquote><em>Controllers are the brain of an </em><a href="http://asp.net/"><em>ASP.NET</em></a><em> Core application. They process incoming requests, perform operations on data provided through Models, and select Views to render on the browser.</em></blockquote><p>Controllers are stored inside the Controllers folder at the root of the app.</p><p><em>Next Article, we will talk about these 3 main sections with C# examples.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c9be7bde8b74" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Basic Input and Output in C Language]]></title>
            <link>https://nawodyaishan.medium.com/basic-input-and-output-in-c-language-28703ae603b?source=rss-6c6cc46357d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/28703ae603b</guid>
            <category><![CDATA[c-language]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[beginner-coding]]></category>
            <dc:creator><![CDATA[Nawodya Ishan]]></dc:creator>
            <pubDate>Sun, 12 Jun 2022 10:03:28 GMT</pubDate>
            <atom:updated>2022-06-14T20:07:56.897Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HYKgq4J7HN_SJ5220PyaRQ.png" /></figure><p>The basic meaning behind the Input and output in programming is</p><ul><li>In Input, we feed data int to a program</li><li>In Output, we feed data out from the program</li></ul><p>The C programming language includes standard libraries that enable input and output in programs. The file pointers provide access to the file for reading and writing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/1*-e4ktQcJN1ss1t58m87sDg.png" /></figure><p>The stdio.h or standard input output library in C contains input and output methods. The header file stdio.h stands for Standard Input Output. It has the information related to input/output functions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*iq-rnHEUX8jaAt7iZaIfuA.png" /></figure><h3>putchar(), getchar() function in C</h3><p>The putchar() method in the C programming language is used to write a character to standard output/screen. The getchar() method retrieves/reads a character from keyboard input. Please see the explanation and syntax for the aforementioned file handling method below.</p><h3>putchar(0</h3><p><strong>Declaration:</strong> int putchar(int char)</p><p>putchar() function is used to write a character on standard output/screen. In a C program, we can use putchar function as below.</p><p><strong>putchar</strong>(char);</p><p>where, char is a character variable/value.</p><h3>getchar()</h3><p><strong>Declaration:</strong> int getchar(void)</p><p>getchar() function is used to get/read a character from keyboard input. In a C program, we can use getchar function as below.</p><p><strong>getchar</strong>(char);</p><p>where, char is a character variable/value.</p><pre>#include &lt;stdio.h&gt;<br>int main( ) {</pre><pre>   int c;</pre><pre>   printf( &quot;Enter a value :&quot;);<br>   c = getchar( );</pre><pre>   printf( &quot;\nYou entered: &quot;);<br>   putchar( c );</pre><pre>   return 0;<br>}</pre><p>According to above example, The int getchar(void) method returns the next available character from the screen as an integer. This function only reads one character at a time. If you wish to read more than one character from the screen, you may use this technique in the loop.</p><p>The int putchar(int c) method displays the character provided to it and returns the same character. This function only inserts one character at a time. If you wish to display more than one character on the screen, you may use this approach in the loop.</p><p>But when we are using more than 1 character in a program we need to use <strong>The gets() and puts() Functions.</strong></p><pre>#include &lt;stdio.h&gt;<br>int main( ) {</pre><pre>   char str[100];</pre><pre>   printf( &quot;Enter a value :&quot;);<br>   gets( str );</pre><pre>   printf( &quot;\nYou entered: &quot;);<br>   puts( str );</pre><pre>   return 0;<br>}</pre><h3>The scanf() and printf() Functions</h3><p>The scanf() method, in C, reads the value from the console as per the type specified. The scanf(const char *format,…) function receives input from the standard input stream stdin and scans it using the format specified.</p><p>The printf() method, in C, prints the value passed as the parameter to it, on the console screen. The printf(const char *format,…) function outputs to the standard output stream stdout and conforms to the format specified.</p><h3>Using scanf() and printf() Functions with basic data types in C.</h3><h4>Integer</h4><pre>Input: scanf(&quot;%d&quot;, &amp;intVariable);<br>Output: printf(&quot;%d&quot;, intVariable);</pre><p>Example:</p><pre># include &lt;stdio.h&gt;</pre><pre>int main(void)<br>{<br>    int fahrenheit, celsius;</pre><pre>    printf(&quot;Please enter fahrenheit as a integer: &quot;);</pre><pre>    scanf(&quot;%d&quot;, &amp;fahrenheit);</pre><pre>    printf(&quot;You have entered: %d as the temperature in fahrenheit&quot;, fahrenheit);</pre><pre>    celsius = (fahrenheit - 32) /1.8 ;</pre><pre>    printf(&quot;\n %d fahrenheit is %d celsius \n&quot;, fahrenheit, celsius);</pre><pre>    return 0;<br>}</pre><h4>Float</h4><pre>Input: scanf(&quot;%f&quot;, &amp;floatVariable);<br>Output: printf(&quot;%f&quot;, floatVariable);</pre><p>Example:</p><pre>#include &lt;stdio.h&gt;</pre><pre>int main()<br>{<br>    float speed;<br>    printf(&quot;\n********************************&quot;);<br>    printf(&quot;\nEnter Your Speed: &quot;);<br>    scanf(&quot;%f&quot;, &amp;speed);<br>    printf(&quot;You have entered: %f as the Speed&quot;, speed);</pre><pre>    if (speed &lt;= 60)<br>    {<br>        printf(&quot;\nYour Speed is Normal&quot;);<br>    }<br>    else<br>    {<br>        printf(&quot;\nYour Speed is Too High&quot;);<br>    }</pre><pre>    return 0;<br>}</pre><h4>Character</h4><pre>Input: scanf(&quot;%c&quot;, &amp;charVariable);<br>Output: printf(&quot;%c&quot;, charVariable);</pre><pre>#include &lt;stdio.h&gt;</pre><pre>int main()<br>{<br>    char ch;<br>    printf(&quot;\n\nEnter the Character: &quot;);<br>    scanf(&quot;%c&quot;, &amp;ch);<br>    printf(&quot;\nEntered character is: %c&quot;, ch);<br>}</pre><h4>String</h4><pre>Input: scanf(&quot;%s&quot;, stringVariable);<br>Output: printf(&quot;%s&quot;, stringVariable);</pre><p>Example:</p><pre>#include &lt;stdio.h&gt;</pre><pre>int main()<br>{</pre><pre>    char str[50];</pre><pre>    printf(&quot;Enter the Word: &quot;);<br>    scanf(&quot;%s\n&quot;, str);</pre><pre>    printf(&quot;\nEntered Word is: %s&quot;, str);</pre><pre>    printf(&quot;\n\nEnter the Sentence: &quot;);<br>    scanf(&quot;%[^\n]\ns&quot;, str);</pre><pre>    printf(&quot;\nEntered Sentence is: %s&quot;, str);</pre><pre>    return 0;<br>}</pre><p>What is %[^\n]\ns</p><ul><li>[^\n] when we include this in scanf we will input the string until it encounter a new line in input.</li><li>%[^\n] scans everything until a \n, but doesn&#39;t scan in the \n.</li><li>^ is caret operator. It helps us to ignore a particular character.</li><li>whenever we write ^\n in scanf function, we will be able to write string with spaces and also able to store in a particular variable(here, str variable),until \n (here, \n is Enter key) is encountered.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28703ae603b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Begin your C# Game Development Journey Using This Challenge]]></title>
            <link>https://nawodyaishan.medium.com/begin-your-c-game-development-journey-using-this-challenge-4c12f88849e6?source=rss-6c6cc46357d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c12f88849e6</guid>
            <category><![CDATA[unity]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[unity-game-development]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[game-development]]></category>
            <dc:creator><![CDATA[Nawodya Ishan]]></dc:creator>
            <pubDate>Mon, 04 Apr 2022 13:43:28 GMT</pubDate>
            <atom:updated>2022-04-04T13:51:36.732Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R63wpY61pRAMzy-8GsutTA.png" /></figure><p>Hi Fellows,</p><p>Here we will discuss a simple but important programming challenge that will help you enhance your fundamental knowledge of C# .NET Console Applications, Data Types, Declaring Variables, Constants, &amp; mathematical operations that are critical for game development.</p><h4>C# Pre-requisites</h4><blockquote>Declaring and using variables</blockquote><blockquote>Calculating with integers</blockquote><blockquote>Prompting for inputs and Getting inputs</blockquote><blockquote>Declaring and Using Constants and Variables</blockquote><blockquote>Trigonometry with floats</blockquote><blockquote>Calculations and Rounding</blockquote><h4>Challenge Description</h4><p>Here you want to have an impossible imagination. What if you are about to visit ancient Greek and meet Pythagoras, Hipparchus using a time machine. And you visit them with modern computers and games you developed using their amazing mathematical theories like Trigonometry and Pythagoras Theorem. So on that occasion, you are about to show a simple program to show them how you implemented the Pythagoras theorem using C# Programming Language.</p><p><strong>Wait</strong> !! Pythagoras&#39; theorem is a critical theorem used in game development mostly to calculate the distance between two points.</p><h4>The Pythagoras Theorem</h4><p>The Pythagorean Theorem tells us how to calculate the length of the hypotenuse of a right triangle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*uVv8AHlmZTq21ppmdUS5tw.png" /></figure><p>Then,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/254/1*L7Iq-n9gSQPuIaso3pVDVg.png" /></figure><p>Here are some applications of the theorem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*tdGVmj-X4LHWMMo8t3ittw.gif" /></figure><p>Challenge !!</p><p>In the following scenario, Imagine there are two players. Player A wants to throw a projectile at Player B as they are enemies.</p><p>The requirement for Projectile Throwing is the Direction and distance of Player B from Player A’s position.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*MHkUsiVBKh2EL49vw8nIyg.png" /></figure><p>First of all, we have to take the current positions of 2 Players as x y coordinates imagining a 2D cartesian plane.</p><blockquote>Player A -&gt; (point1X, point1y)</blockquote><blockquote>Player B-&gt; (point2X, point2y)</blockquote><p>So Let’s Implement it in C# Script.</p><pre><em>using </em>System;<br><em>using </em>System.Runtime.ConstrainedExecution;<br><br><em>namespace </em>GameDevPythagoras<br>{<br>    <em>/// &lt;summary&gt;<br>    /// Pythagoras Implementation for position calculation using C#<br>    /// &lt;/summary&gt;<br>    class </em>Program<br>    {<br>        <em>// declaring x and y coordinates for player positions<br>        static float </em>point1X;<br>        <em>static float </em>point1Y;<br>        <em>static float </em>point2X;<br>        <em>static float </em>point2Y;</pre><p>then we can assign values for declared variables using the C# input function. Here we input data as a one-line string.</p><p>Player A’s XY Coordinates and Player B’s XY Coordinates Separated by spaces like below,</p><pre><strong>5 5 4 4</strong></pre><p>Also we assign q to end the while loop.</p><pre><em>/// &lt;param name=&quot;args&quot;&gt;command-line args&lt;/param&gt;<br>static void </em>Main(<em>string</em>[] args)<br>{<br>    <em>// loop while there&#39;s more input<br>    string </em>input = Console.ReadLine();<br>    <em>while </em>(input[0] != &#39;q&#39;)</pre><p>Then we read the input and assign values for points using the following function.</p><pre><em>static void </em>GetInputValuesFromString(<em>string </em>input)<br>{<br>    <em>// extract point 1 x<br>    int </em>spaceIndex = input.IndexOf(&#39; &#39;);<br>    point1X = <em>float</em>.Parse(input.Substring(0, spaceIndex));<br><br>    <em>// move along string and extract point 1 y<br>    </em>input = input.Substring(spaceIndex + 1);<br>    spaceIndex = input.IndexOf(&#39; &#39;);<br>    point1Y = <em>float</em>.Parse(input.Substring(0, spaceIndex));<br><br>    <em>// move along string and extract point 2 x<br>    </em>input = input.Substring(spaceIndex + 1);<br>    spaceIndex = input.IndexOf(&#39; &#39;);<br>    point2X = <em>float</em>.Parse(input.Substring(0, spaceIndex));<br><br>    <em>// point 2 y is the rest of the string<br>    </em>input = input.Substring(spaceIndex + 1);<br>    point2Y = <em>float</em>.Parse(input);<br>}</pre><p>Then inside the previous while loop, we call the above function to assign values from the input.</p><pre><em>// extract point coordinates from string<br></em>GetInputValuesFromString(input);</pre><p>Next, we are going to calculate the distance between 2 points as a float. To do the implementation of the Pythagoras Theorem, we want the delta x and delta y as 2 vertices of the triangle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*9nGn7FXfoJUjVyf_IRCV-g.png" /></figure><p>To do the next calculations, we are going to use the Math class in C#.</p><h4>Calculating Distance</h4><blockquote><strong>Math.Sqrt</strong> -&gt; Returns the square root of a specified number as a Double.</blockquote><blockquote><strong>Math.Pow</strong> -&gt; Returns a specified number raised to the specified power as a Double.</blockquote><blockquote><strong>Math.Atan2</strong> -&gt; Returns the angle whose tangent is the quotient of two specified numbers as a Double.</blockquote><p>So we calculate the distance between 2 player positions as follows.</p><pre><em>float </em>distance = (<em>float</em>) Math.Sqrt((Math.Pow(point1X - point2X, 2) + Math.Pow(point1Y - point2Y, 2)));</pre><p>Basically what happens here is,</p><p>DeltaX = Player B’s X Coordinate Magnitude-Player A’s X Coordinate Magnitude</p><p>DeltaY = Player B’s Y Coordinate Magnitude-Player A’s Y Coordinate Magnitude</p><p>Then,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/303/1*Nd5hBFBUPlvdu-tpvPbnFg.png" /></figure><p>We use <strong>Math.Pow</strong> method by giving 2 numbers as the parameters like below,</p><blockquote>Math.Pow (double x, double y);</blockquote><blockquote>double x = A double-precision floating-point number to be raised to a power.</blockquote><blockquote>double y = A double-precision floating-point number that specifies a power.</blockquote><p>We use <strong>Math.Sqrt</strong> method by giving the number required to calculate the square root as the parameter.</p><p>Then we convert calculated double values to float using <strong><em>(float).</em></strong></p><h4>Calculating the angle</h4><p>To calculate the angle we have to use Math.Atan2 method which returns the angle whose tangent is the quotient of two specified numbers.</p><pre><em>double </em>angle = (<em>float</em>)Math.Atan2(point2Y - point1Y, point2X - point1X);</pre><p>This returns the radiant value of the angle, so we need to convert it to degrees to proceed.</p><pre>angle *= (<em>float</em>)180/Math.PI;   //angle = angle * (<em>float</em>)180/Math.PI</pre><p>The Math.PI property <strong>represents the ratio of the circumference of a circle to its diameter</strong>, approximately 3.14159: Math.PI = π ≈ 3.14159</p><p>Next, we print out the calculation answers using Console.WriteLine method in DOT NET.</p><pre>Console.WriteLine(&quot;The Distance Between Player A and B is &quot; + (<em>float</em>) Math.Round(distance, 6));<br>Console.WriteLine(&quot;The Angle from Player A to Player B is &quot; + (<em>float</em>)Math.Round(angle, 5) + &quot; degrees&quot;);<br>input = Console.ReadLine();</pre><p>Here is a test case.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/1*iq91m07CZZ7kPa7I1IIEpw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*8yXZU_LTh7PorL2QaPrPOw.png" /></figure><p><strong>Here you can have look at the </strong><a href="https://github.com/nawodyaishan/gamedev-pythagoras"><strong>source code</strong></a><strong>.</strong></p><p>So, I believe this guide would’ve provided some basic introduction to C# Programming for Game Development as a beginner.</p><p>Thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c12f88849e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Machine Learning and Hello World in Neural Networks]]></title>
            <link>https://nawodyaishan.medium.com/introduction-to-machine-learning-and-hello-world-in-neural-networks-317ab0f9fdfa?source=rss-6c6cc46357d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/317ab0f9fdfa</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[tensorflow]]></category>
            <dc:creator><![CDATA[Nawodya Ishan]]></dc:creator>
            <pubDate>Sun, 27 Mar 2022 11:07:34 GMT</pubDate>
            <atom:updated>2022-03-27T12:00:48.676Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Muhtue0SQ9L6DRlWqHKpGg.png" /></figure><p>Hi fellows,</p><p>Here we are going to build basic pattern recognition models using neural networks. Neural Networks are a more advanced topic in machine learning that belongs to deep learning but in this basic introductory example we use the external libraries to make things easy a little bit.</p><p>First of you have to have some basics prerequisites of machine learning</p><h3><strong>What is Machine Learning?</strong></h3><p>Yes, as the topic says machines are learning. Machine learning is all about how machines are learning and how do we teach the machines to learn. In so near future machines can learn and do the thing that we, humans do.</p><p>From the computer programming perspective, traditionally we write computer programs by defining rules and data by ourselves to the computer. As the following diagram, the user gives rules and data and answers come out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JMKfLPgjivVa4OIdtCCfbQ.png" /></figure><p>But in a machine learning scenario, we give answers and data to the machine, the computer and it produces the rules, the connection between answers, and data itself. Basically, the thing happening here is we give the exiting examples to the computer which we cant figure out how it&#39;s happening, and through machine recognizes the how it happening by the rules.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FpLkZFnMLNrEuW_jxYxHmw.png" /></figure><p>Let&#39;s take a quick simple example,</p><p>Here I show you, a Human coded BMI Calculator using Python.</p><pre># height input as &quot;h&quot; and weight in as &quot;w&quot;<br>h = float(input(&quot;Please Enter Your Height in cm: &quot;))<br>w = float(input(&quot;Please Enter Your Weight in kg: &quot;))</pre><pre>BMI = w / (h/100)**2</pre><p>As above code, we can calculate each person&#39;s BMI index and give feedback on their inputs as follows.</p><pre>print(f&quot;You BMI Index is {BMI}&quot;)</pre><pre>if BMI &lt;= 18.4:<br>    print(&quot;You are slightly underweight.&quot;)<br>elif BMI &lt;= 24.9:<br>    print(&quot;You are pretty healthy.&quot;)<br>elif BMI &lt;= 29.9:<br>    print(&quot;You are slightly overweight.&quot;)<br>elif BMI &lt;= 34.9:<br>    print(&quot;You are severely overweight.&quot;)<br>elif BMI &lt;= 39.9:<br>    print(&quot;You are obese.. -_-&quot;)<br>else:<br>    print(&quot;You are severely obese... Get Some Help&quot;)</pre><p>But what if we want to calculate different health indexes using the same or different input data (like Body Adiposity Index AKA BAI, Waist-to-Hip, etc), this approach has to be failed.</p><p>So as previous diagrams explain, we teach computers that this is BMI and how to calculate BMI, this is BAI how to calculate that using given example data and outputs. So those will become Answers and Data according to our previous diagrams. what is happening inside is the computer is learning the pattern of data and answers using machine learning algorithms. So this has opened a new horizon in the computer science and data science world.</p><h4><strong>Machine Learning Road Map</strong></h4><blockquote><em>Introduction to Machine Learning</em></blockquote><blockquote><em>Supervised Learning and Linear Regression</em></blockquote><blockquote><em>Classification and Logistic Regression</em></blockquote><blockquote><em>Decision Tree and Random Forest</em></blockquote><blockquote><em>Naïve Bayes and Support Vector Machine</em></blockquote><blockquote><em>Unsupervised Learning</em></blockquote><blockquote><em>Natural Language Processing and Text Mining</em></blockquote><blockquote><em>Introduction to Deep Learning</em></blockquote><blockquote><em>Time Series Analysis</em></blockquote><p><strong>if you want to study machine learning in-depth, I recommend </strong><a href="https://www.freecodecamp.org/news/best-machine-learning-courses/"><strong>these courses </strong></a><strong>for a successful career through machine learning.</strong></p><h3>Simple Number Pattern Prediction using Neural Networks</h3><p>Here I am going to show you how to do a simple pattern recognition like above using Neural Networks which is a part of Deep Learning.</p><p>Deep Learning is a more complicated advanced topic of machine learning but it is easier with neural networks to do simple pattern recognitions using external Python Libraries like NumPy, Pandas, and Tensorflow.</p><p>As previously said, machine learning is the computer learning pattern to do certain things.</p><p>So as an example following number sequence has a pattern. try to recognize this pattern.</p><blockquote>x = -1, 0, 1, 2, 3, 4</blockquote><blockquote>y = -3, -1, 1, 3, 5, 7</blockquote><p>so the relationship is,</p><blockquote>y = 2x-1</blockquote><p>In our mind, you might figure out that between -1 and 3 there is a difference of 2 and between 0 and -1 there is 1 difference. so there might be multiple of x with 2 and + or — of some value.</p><p>So let&#39;s implement this in the Python programming language.</p><p>Waaaiiiit !!!! Why Python? Python is simple and consistent, already have massive community support worldwide, have tons of libraries and frameworks for machine learning and data science (NumPy, Pandas, Matplotlib, Seaborn for Data Analysis and Visualization, TensorFlow, Keras, Scikit-learn for Machine learning, OpenCV, Pillow for Computer vision, NLTK, spaCy for Natural language processing)</p><p>Let&#39;s dive into our first code,</p><p>First, we import Keras API (application programming interface) from TensorFlow.</p><p>Here keras make it easy with its set of functions for neural networks. In this line of code, we implemented the simplest possible neurons. “Dense” defines the connected neurons. as there is only one layer of dense here, there is only one layer on neurons in here. And input shape of this layer is also the simplest form with one value.</p><pre><em>import </em>keras<br><br>model = keras.Sequential([keras.layers.Dense(units=1,input_shape[1])])</pre><p>But when it comes to machine learning we need to calculate using Linear algebra calculus and more advanced theories but in Tensorflow and Keras those complicated ones are already implemented.</p><blockquote>but if you need to optimize and go deep you want Machine Learning Concepts with Advcanec Scientific mathematical Background.</blockquote><p>Then we implement loss function and optimizer. The loss function guesses the relation between x and y and gives the measured result data (good or bad, how much loss or close) to the optimizer to make the next guess. Optimizer decides the accuracy of the guess done by the loss function. Optimizers are methods or approaches that adjust the properties of your neural network, such as weights and learning rate, to decrease losses. The main logic is here to make each guess made by loss function to be better than one before.</p><pre>model.compile(optimizer=&quot;sgd&quot;, loss=&#39;mean_squared_error&#39;)</pre><p>When gues are making some progress with gues becoming better and better the convergence is being used. To study more about convergence visit<a href="https://www.linkedin.com/pulse/knowing-what-makes-ml-training-converge-deepak-kumar/"> this site</a>.</p><p>Next, we import the NumPy library to do calculations easily.</p><pre><em>import </em>numpy <em>as </em>np</pre><p>next we implement two flat arrays to x and y values.</p><pre>xs = np.array([-1.0, 0.0, 1.0, 2.0, 3.0, 4.0], dtype=float)<br>ys = np.array([-3.0, -1.0, 1.0, 3.0, 5.0, 7.0], dtype=float)</pre><p>In the next cell we figure out how do these xs value fit in ys values by implementing model.fit method for 500 number of times. epochs = 500 means the training loop will do 500 times its guesses.</p><pre><em># Training the model<br></em>model.fit(xs, ys, epochs=500)</pre><p>And the output looks like this</p><blockquote>Epoch 1/500<br>6/6 [==============================] — 0s 36ms/step — loss: 12.7812<br>Epoch 2/500<br>6/6 [==============================] — 0s 524us/step — loss: 10.2833</blockquote><blockquote><em>…….</em></blockquote><blockquote>6/6 [==============================] — 0s 157us/step — loss: 3.9143e-05<br>Epoch 499/500<br>6/6 [==============================] — 0s 185us/step — loss: 3.8338e-05<br>Epoch 500/500<br>6/6 [==============================] — 0s 255us/step — loss: 3.7551e-05</blockquote><p><strong>This is called training the model.</strong> After running 500 training loops you can see that loss is getting lower. so next we do prediction of our custon number for X using predict method.</p><pre>print(model.predict([10.0]))</pre><p>and the output should be close to 19 but instead it showed</p><p>[[18.982122]]</p><p>This is happening because of insufficient training data.</p><p>if we Train the model with 1000 loops answer will look like this.</p><p>[[18.999987]]</p><p>So with model training, it becomes close to the real answer.</p><p><strong>You can find the source code for this </strong><a href="https://github.com/nawodyaishan/hello-world-neural-networks/blob/main/SimpleNumberPatternPredistion.ipynb"><strong>here.</strong></a></p><h3>Simple House Price Prediction using Neural Network Basics and Tensorflow</h3><p>Here we are going to do a real-life scenario to Build a Neural network using TensorFlow.</p><p>Here is the simple formula for the prediction</p><p>House of Price with one bedroom = 100k</p><p>House of Price with one bedroom = 150k</p><p>Accordingly, the price of the houses increases by the number of bedrooms.</p><p>Here we going to build a neural network to predict the prices of houses according to their bedrooms.</p><p>here is the two x and y data for this</p><blockquote>x = 1, 2, 3, 4, 5, 6, 7</blockquote><blockquote>y = 1, 1.5, 2, 2.5, 3, 3.5, 4</blockquote><p>And Let&#39;s start by importing essential libraries for this</p><pre><em>import </em>tensorflow <em>as </em>tf<br><em>import </em>numpy <em>as </em>np<br><em>from </em>tensorflow <em>import </em>keras</pre><p>Then we implement whole methods as <em>loss function, optimization, and defining number arrays, defining training loops ( Here 1000 epochs )</em> inside a basic python function called <strong>house_model </strong>and return model with empty arguments.</p><pre><em>def </em>house_model():<br>    xs = np.array([1.0,2.0,3.0,4.0,5.0,6.0], dtype=float)<br>    ys = np.array([1.0,1.5,2.0,2.5,3.0,3.5],dtype=float)<br>    model = tf.keras.models.Sequential([tf.keras.layers.Dense(units=1,input_shape=[1])])<br>    model.compile(optimizer = &#39;sgd&#39;, loss = &#39;mean_squared_error&#39;)<br>    model.fit(xs,ys,epochs=1000)<br>    <em>return </em>model</pre><p>Then we assign the number of beds to value to <strong><em>new_y</em></strong> and use <strong><em>predict method</em></strong> and execute the <strong><em>house_model</em></strong> function.</p><pre>new_y = 10.0<br>model = house_model()<br>prediction = model.predict([new_y])[0]</pre><p>After training the data 1000 times the prediction will print as follows</p><pre>print(prediction)</pre><p>[5.5149393]</p><p>So you can find the source code from<a href="https://github.com/nawodyaishan/hello-world-neural-networks/blob/main/HousePricePrediction.ipynb"> here</a>.</p><blockquote>If you want to continue your self-study in Neural networks while parallel to Machine Learning, You can follow the DeepLearning Coursera specialization by applying for financial Aid.</blockquote><blockquote>Visit <a href="https://www.coursera.org/professional-certificates/tensorflow-in-practice">Coursera</a></blockquote><p>So, I believe this guide would’ve provided some basic introduction on how machine learning and artificial intelligence are applied through the neural network.</p><p>Thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=317ab0f9fdfa" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>