<?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 Sidhant Panda on Medium]]></title>
        <description><![CDATA[Stories by Sidhant Panda on Medium]]></description>
        <link>https://medium.com/@sidhantpanda?source=rss-d5ed4f0c7fd5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*49PXnQuLXiC_snJNA-aelQ.png</url>
            <title>Stories by Sidhant Panda on Medium</title>
            <link>https://medium.com/@sidhantpanda?source=rss-d5ed4f0c7fd5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 23:41:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sidhantpanda/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[What If Packages Had to Declare Their Network Behavior?]]></title>
            <link>https://medium.com/@sidhantpanda/what-if-packages-had-to-declare-their-network-behavior-52a8d3053178?source=rss-d5ed4f0c7fd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/52a8d3053178</guid>
            <category><![CDATA[pypi]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[npm]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[supply-chain-attack]]></category>
            <dc:creator><![CDATA[Sidhant Panda]]></dc:creator>
            <pubDate>Tue, 31 Mar 2026 09:01:53 GMT</pubDate>
            <atom:updated>2026-03-31T10:26:00.480Z</atom:updated>
            <content:encoded><![CDATA[<h4>Your dependencies can phone home to anywhere. No packaging ecosystem will tell you about it.</h4><p>In December 2023, a phishing email compromised a former Ledger employee’s npm credentials. Within hours, attackers published a malicious version of the @ledgerhq/connect-kit package. The code was identical to the original except for one addition: every cryptocurrency transaction was silently redirected to the attacker’s wallet. By the time Ledger pushed a fix, $600,000 had been drained.</p><p>The malicious package made network calls the legitimate package never would, connecting to a drainer service that had no relationship to Ledger’s infrastructure. But npm had no way to know that. Nothing in the ecosystem tracks what hosts a package is supposed to contact.</p><p>This wasn’t an isolated incident. It was one data point in a trend that’s been accelerating for a decade.</p><h3>A Decade of Escalation</h3><p>In 2018, a single compromised npm package, event-stream, with 8 million weekly downloads was quietly modified to target a cryptocurrency wallet. In 2020, the SolarWinds breach hit 18,000 organizations including nine US government agencies; cleanup costs were estimated at up to $100 billion by the US Senate, averaging $12 million per affected company. In 2021, Codecov’s bash uploader was silently rewritten to exfiltrate CI/CD credentials from 29,000 customers and it ran undetected for two months. That same year, ua-parser-js, another 8-million-download npm package, was hijacked to deliver a cryptominer.</p><p>The pace picked up. In 2023, the 3CX desktop application (600,000 companies, 12 million daily users) was backdoored by North Korean state actors through its build pipeline. In 2024, the xz-utils backdoor, a multi-year social engineering campaign to plant an SSH backdoor on virtually every Linux server was caught by accident when a developer noticed a 500-millisecond performance regression. That same year, Polyfill.io was acquired by a new owner who injected malicious redirects into a JavaScript CDN serving 100,000+ websites.</p><p>In 2025 and 2026, the attacks became industrial. The tj-actions/changed-files GitHub Action (23,000+ repos) was compromised to exfiltrate CI credentials. The Shai-Hulud npm worm campaigns hit 25,000+ repositories. A single group called TeamPCP cascaded a supply chain attack across five ecosystems, GitHub Actions, Docker Hub, npm, VS Code extensions, and PyPI, in under 30 days, compromising 66+ npm packages and litellm, a Python LLM proxy library with 95 million monthly downloads. And in March 2026, axios, the JavaScript ecosystem’s most popular HTTP client, with 83 million weekly downloads was compromised via a hijacked maintainer account. The attackers didn’t modify a single line of axios code. They just added a new dependency, plain-crypto-js, that silently dropped a cross-platform remote access trojan on every machine that installed it.</p><p>The scale is staggering. Sonatype identified over 454,000 new malicious packages published to registries in 2025 alone. The cumulative count now exceeds 1.2 million. Cybersecurity Ventures projects the global cost at $60 billion and growing.</p><p>Here’s a decade of supply chain attacks at a glance, most recent first:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wPOEdYUt4FYmKBYNdv-35g.png" /></figure><blockquote>Every one of these attacks had something in common: the compromised package made network connections to C2 servers, to exfiltration endpoints, to cryptocurrency drainers that the legitimate package would never make. And every time, nothing in the packaging ecosystem noticed. Because nothing can.</blockquote><h3>Unrestricted by Default</h3><p>When you install a package from PyPI, npm, crates.io, or Go modules, the code gets the same network access as your entire application. There is no declaration of what hosts a package intends to contact, no mechanism to restrict it, and no tooling to flag when it does something new.</p><p>Each ecosystem is vulnerable in its own way. <strong>npm</strong> runs postinstall lifecycle scripts the moment you type npm install arbitrary shell commands before you’ve imported a single module. This is the single largest attack surface in any ecosystem, and the vector behind event-stream, ua-parser-js, Ledger, and CanisterWorm. npm supports “--ignore-scripts”, but it breaks packages like esbuild and puppeteer that legitimately download platform binaries, so most teams can’t use it.</p><p><strong>PyPI</strong> gives packages unrestricted access at import time. Module-level statements, <strong>__init__</strong>.py files, and .pth hooks all execute before your code runs a single line. Python’s .pth files are particularly insidious, designed to modify the module search path, they’ll execute any import statement inside them on every interpreter startup. The recent litellm compromise exploited exactly this mechanism to install a persistent systemd backdoor</p><p><strong>Go modules</strong> are safer, no install-time scripts, but init() functions still run automatically on import, and go generate executes arbitrary commands during development. <strong>Rust’s </strong>build.rs scripts run at compile time with full system access. <strong>RubyGems</strong> and <strong>Maven Central</strong> have their own histories of compromise.</p><p>The industry has invested heavily in answering “is this package what its author intended?” through Sigstore, npm provenance, PyPI Trusted Publishers, and go.sum. But we have no standard mechanism for the equally critical question: “does this package behave within expected boundaries?”</p><h3><strong>What Already Exists</strong></h3><p>This isn’t a greenfield problem. Pieces of the solution are scattered across tools and runtimes that prove parts of the model already work.</p><p><strong>Deno</strong> has had “--allow-net” since launch. Code runs sandboxed with zero network access by default. You grant permissions per host. This proves the runtime model is viable for a runtime designed around it.</p><p><strong>Socket.dev</strong> performs deep behavioral analysis of npm and PyPI packages, flagging install scripts that open network connections and packages that access environment variables. It’s essentially doing manifest verification without an explicit manifest relying on heuristics instead of declared ground truth.</p><p><strong>DataDog’s Supply-Chain Firewall</strong> blocks known-malicious packages at install time. <strong>npm provenance</strong> and <strong>PyPI Trusted Publishers. </strong>use Sigstore to verify who published a package. <strong>Go’s checksum database</strong> ensures integrity. All valuable infrastructure, but they verify identity and provenance, not behavior.</p><p>What’s missing is a declaration layer. A standardized way for packages to say “here is what I intend to do on the network” that registries can verify, tools can baseline against, and consumers can audit.</p><h3>The Idea: Package Network Manifests</h3><p>Every package ships a machine-readable declaration of its expected network behavior, embedded in the ecosystem’s native metadata. For most packages, parsers, data structures, formatters, test helpers, CLI utilities, probably 95%+ of all packages, the declaration is one line:</p><pre># Python (pyproject.toml)<br>[tool.network-manifest]<br>type = &quot;none&quot;</pre><pre># npm (package.json)<br>{ &quot;networkManifest&quot;: { &quot;type&quot;: &quot;none&quot; } }</pre><pre># Go (go.mod)<br>// +network:none</pre><p><strong>type</strong>: none means this package makes zero network calls. Any observed network activity is a violation.</p><p>For packages that do talk to the network, the declaration gets specific:</p><pre># A payment SDK (pyproject.toml)<br>[tool.network-manifest]<br>type = &quot;service-sdk&quot;<br><br>[[tool.network-manifest.outbound]]<br>host = &quot;*.stripe.com&quot;<br>ports = [443]<br>reason = &quot;Payment API&quot;</pre><pre># A build tool that downloads binaries (package.json)<br>{<br>  &quot;networkManifest&quot;: {<br>    &quot;type&quot;: &quot;build-tool&quot;,<br>    &quot;install&quot;: [{ &quot;host&quot;: &quot;github.com&quot;, &quot;ports&quot;: [443] }],<br>    &quot;runtime&quot;: []<br>  }<br>}</pre><p>Now replay any of the attacks above. A telephony SDK suddenly connects to a bare IP address on port 8080. A utility library declaring type: none runs a postinstall script that reaches a C2 server. A Python library that previously made no network calls installs a .pth file that phones home on startup.</p><p>The axios case is particularly instructive. axios itself is a client-library, it legitimately makes HTTP requests on behalf of the caller, so a network manifest for axios wouldn’t restrict outbound connections. But the attack didn’t modify axios. It injected a new dependency, plain-crypto-js, which is supposed to be a cryptography utility. A cryptography utility has no business making network calls. plain-crypto-js declaring type: none, or simply the behavioral change of a new dependency appearing that didn’t exist in the previous version, would have been an immediate flag at every layer of enforcement.</p><h3>How Enforcement Would Work</h3><p>A manifest is useless without enforcement. Here’s the stack, from cheapest to most ambitious.</p><h4>Registry verification at upload time</h4><p>When a new version hits PyPI or npm, the registry runs it in a sandbox and compares network behavior against the <em>*previous version’s*</em> manifest. This is the most important insight: the registry doesn’t need to trust the new version’s manifest at all. If version 2.0.0 only talked to api.example.com and version 2.0.1 suddenly connects to an unknown IP, that behavioral change is the signal. PyPI already runs malware detection. npm uses behavioral analysis. Adding network observation is incremental.</p><h4>Static analysis at upload time</h4><p>For packages declaring type: none, you don’t need a sandbox at all. A static analysis pass checks: does this package import socket, subprocess, or urllib at module level while claiming it makes no network calls? Near-zero false positives. Zero computational cost.</p><h4>Package manager enforcement at install time</h4><p>pip and npm grow awareness of manifests. In strict mode, packages declaring type: none that contain network-capable imports are flagged before installation. npm could default to ignore-scripts for type: none packages, selectively allowing lifecycle scripts only for packages with declared install-time network needs solving the postinstall problem without breaking esbuild.</p><h4>CI pipeline sandboxing</h4><p>CI environments run behind a network policy derived from the union of all dependency manifests. Only declared hosts are reachable. Undeclared outbound connections fail. Credential exfiltration never leaves the build environment.</p><h4>Runtime monitoring</h4><p>eBPF-based tools, service mesh policies, and firewall rules consume the composed manifest for a deployed application. A process contacts a host not in any dependency’s manifest alert in real time.</p><h3>Why This Might Not Work</h3><p>I’ve spent the first half of this post building the case. Now let me try to tear it down. Some of these objections are addressable. Some are genuinely hard. A few might be fatal.</p><h4>The manifest is a self-declaration by the very person who might be compromised</h4><p>This is the deepest structural problem. If the attacker has the maintainer’s publishing credentials, the scenario behind SolarWinds, Ledger, and every account-takeover attack, they can update the manifest alongside the payload. A self-attestation is only useful against honest actors, and honest actors aren’t the threat model. Registry-side behavioral comparison against the previous version raises the bar, but it doesn’t eliminate it, sophisticated actors already know how to evade sandbox detection.</p><h4>We’ve tried per-package permissions before. They failed</h4><p>Java’s Security Manager was the most ambitious attempt at fine-grained code permissions in a mainstream runtime. It let you restrict network access, file system access, and system calls per code source. It was deprecated in Java 17 and removed almost nobody used it correctly, the complexity was staggering, and the performance overhead was real. Python’s restricted execution mode (rexec) was removed for similar reasons. Node.js has had multiple per-package permission proposals that went nowhere. The network manifest is simpler than these, but the history of retrofitting permissions onto runtimes that weren’t designed for them is not encouraging.</p><h4>False positives at scale would be catastrophic</h4><p>If PyPI blocks uploads based on behavioral verification and the sandbox has a 0.1% false positive rate, that’s hundreds of legitimate packages blocked per year. Maintainers can’t ship. Downstream projects can’t update. Developers find workarounds, private mirrors, direct GitHub installs that bypass the manifest entirely and make the ecosystem <em>less</em> secure. This is exactly what happened with npm’s ignore-scripts: a security measure too blunt to adopt, driving teams toward workarounds.</p><h4>Nobody reads dependency diffs</h4><p>The proposal argues that manifest changes show up in diffs and lockfile comparisons. But most teams use Dependabot or Renovate, and the majority of those PRs are merged with minimal human review. The manifest diff would be auto-approved alongside the code diff. Socket.dev already flags behavioral changes without requiring a manifest standard.</p><h4><strong>Composed manifests are unreadable</strong></h4><p>typical Node.js project has 800–1,500 transitive dependencies. The composed network manifest, the union of all declared hosts, would be enormous. No human reviews it. Automated tooling processes it, but at that point we’re back to relying on automated behavioral analysis, which already exists without a manifest.</p><h4><strong>It stops amateurs, not the attackers that matter most.</strong></h4><p>The xz-utils backdoor was a multi-year social engineering campaign. “Jia Tan” spent two years building trust before inserting a backdoor that activated only under extremely specific conditions and communicated through normal SSH traffic on standard ports. No manifest would have caught it. SolarWinds’ SUNBURST malware contacted IP addresses that resolved to legitimate-looking Azure domains. A manifest allowing *.microsoft.com wouldn’t have helped. The attacks that cause the most damage are exactly the ones designed to blend in.</p><h4><strong>Legitimate packages do weird things on the network</strong></h4><p>The type taxonomy assumes clean categories, but reality is messy. PyTorch downloads multi-gigabyte model files from CDN endpoints that change. Packages send anonymous telemetry. Database drivers connect to user-configured hosts. Build tools fetch compilers from rotating mirrors. type: none works beautifully for pure-logic libraries. But the packages most interesting to attackers, SDKs, build tools, CI integrations, are exactly where the manifest gets complicated.</p><h4><strong>DNS is a covert channel the manifest can’t close</strong></h4><p>Almost every package needs DNS resolution. If the manifest allows DNS, an attacker can exfiltrate data by encoding it in DNS queries against an attacker-controlled nameserver. This is well-documented, hard to detect, and a fundamental limitation.</p><h4><strong>Maintainer burden</strong></h4><p>Open source maintainers are already overwhelmed, fixing CVEs on volunteer time, generating SBOMs, adopting Sigstore, responding to Dependabot alerts. Adding a manifest that needs updating when endpoints change, CDNs rotate, or cloud providers restructure their domains is real overhead on people who are largely unpaid. If a maintainer forgets to update it, legitimate users get blocked.</p><h4><strong>Another standard will fragment, not unify.</strong></h4><p>SBOM already has two competing formats (SPDX vs CycloneDX). Package signing uses Sigstore, GPG, and proprietary systems. Each ecosystem implementing manifests independently, a Python PEP, an npm RFC, a Go proposal, would produce divergent standards that security vendors have to support in parallel.</p><h3><strong>What’s Actually Worth Doing</strong></h3><p>After all of that, here’s my honest assessment of what survives.</p><h4>Registry-side behavioral comparison survives completely and doesn’t need a manifest</h4><p>Registries can unilaterally compare network behavior between package versions. If version N-1 made zero outbound connections and version N phones home to an unknown IP, flag it. No standard needed. No maintainer burden. No adoption problem. This is deployable now, and it alone would have caught the majority of the attacks in this post.</p><h4><strong>type: none declarations mostly survive</strong></h4><p>Static analysis for packages claiming zero network calls is cheap, accurate, and covers most packages. The false positive risk is low because the check is simple (does it import network modules?). The maintainer burden is one line. The main risk: it creates a false sense of security for the packages that <em>aren’t</em> type: none, the SDKs and build tools where manifests get complicated and the critique bites hardest.</p><h4><strong>Full host-level manifests face the hardest objections</strong></h4><p>Maintainer burden, false positives, DNS covert channels, the precedent of Java Security Manager, the sophistication gap, all apply most strongly here. These might be worth pursuing long-term, but the cost-benefit is unclear compared to just strengthening behavioral analysis tools like Socket.dev that already work without a standard.</p><h4><strong>Per-package runtime sandboxing probably won’t happen for mainstream runtimes</strong></h4><p>Deno proved it works when designed from scratch. Every attempt to retrofit it onto Python, Java, and Node.js has failed. It’s the wrong bet.</p><p>The honest conclusion: the idea is sound at the cheap end and gets progressively harder to defend as it gets more ambitious. Push hard on the first two tiers. Let the rest evolve based on what we learn.</p><h3><strong>The Closing Argument</strong></h3><p>We put Content Security Policy headers on websites. We require permission declarations for mobile apps. We sandbox browser extensions. We restrict container network access with Kubernetes NetworkPolicies. Packages get nothing, full network access, no questions asked.</p><p>That’s not a principled design choice. It’s an accident of history. Package managers were built to distribute code, and security was bolted on later. Every bolt-on so far has focused on identity and integrity: <em>who published this, and is it the code they intended? </em>None has addressed behavior: <em>what does this code actually do on the network?</em></p><p>The $60 billion question isn’t whether we should do this. It’s whether we’ll do the easy parts before the next axios-scale incident, 83 million weekly downloads, a hijacked account, and a RAT in every install, makes the decision for us.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52a8d3053178" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Dockerized Nodejs Express Boilerplate with TypeScript]]></title>
            <link>https://medium.com/@sidhantpanda/a-dockerized-nodejs-express-boilerplate-with-typescript-8ef116bdeabe?source=rss-d5ed4f0c7fd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ef116bdeabe</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[typescript]]></category>
            <dc:creator><![CDATA[Sidhant Panda]]></dc:creator>
            <pubDate>Thu, 26 Sep 2019 19:28:26 GMT</pubDate>
            <atom:updated>2019-09-26T19:45:51.195Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*ZLFuxeBTnNf5ZLt3dmIdvw.png" /></figure><p>Github Project: <a href="https://github.com/sidhantpanda/docker-express-typescript-boilerplate">https://github.com/sidhantpanda/docker-express-typescript-boilerplate</a></p><p>Getting started with TypeScript for your next backend project? Or just want to play around with a TypeScript based Express server? This<a href="https://github.com/sidhantpanda/docker-express-typescript-boilerplate"> project’s</a> for you!</p><h3>Microsoft already has a starter repo. Why this?</h3><p>There is Microsoft’s <a href="https://github.com/microsoft/TypeScript-Node-Starter">starter repo</a> but it requires you to install a bunch of other stuff like MongoDB yourself. The Microsoft repo is a good reference repositories but lacks a lot of stuff when building production applications.</p><h3>How to get started?</h3><p>Simple, just run:</p><pre>$ bash &lt;(curl -s <a href="https://raw.githubusercontent.com/sidhantpanda/public/master/scripts/generate-express-ts-app.sh)">https://raw.githubusercontent.com/sidhantpanda/public/master/scripts/generate-express-ts-app.sh)</a></pre><p>Or, if you don’t trust the shell script, clone the repo:</p><pre>$ git clone git@github.com:sidhantpanda/docker-express-typescript-boilerplate.git your-app-name</pre><h3>Features</h3><ul><li>You can spin up <strong>Mongo</strong> containers and run your Node project with nodemon with a <strong>single command</strong>, and spin them down when you are done. Just run the following command and see it happening:</li></ul><pre>$ npm run dev</pre><p>Pressing Ctrl + c will stop the server and remove all mongo containers. All the data in Mongo is <strong>persisted</strong> between the runs at data/dev/mongo .</p><ul><li>This project also contains instructions to <strong>dockerize</strong> your application from the get go, so you get to learn Docker along with it, or experienced developers can directly start configuring the Dockerfile or docker-compose.yml files.</li><li>A <a href="https://github.com/sidhantpanda/docker-express-typescript-boilerplate/blob/master/src/middleware/handle-error-middleware.ts"><strong>custom middleware</strong></a> for easier async/await for your request handlers. This allows you to write less verbose and <strong>eliminate having to write </strong><strong>try-catch blocks</strong> in your request handlers every time you want to write an async method. Just throw any error and the handler will catch it and pass it on to the Express error handler.</li><li><a href="https://github.com/sidhantpanda/docker-express-typescript-boilerplate/blob/master/src/models/Book.ts">Sample <strong>mongoose model</strong></a> written in TypeScript. Lets you kick-start data modelling.</li><li>Comes with a <a href="https://github.com/sidhantpanda/docker-express-typescript-boilerplate/blob/master/openapi.json">sample Open API 3.0 spec file</a> so you can get started with API documentation directly.</li><li>All configuration done through .env file.</li><li><strong>ESLint + Prettier — </strong>Linting and formatting from the start</li><li><strong>Winston</strong> as the default logger to generate debug and error log files during application lifetime.</li><li>Pre-configured <strong>Travis CI </strong>for that automation goodness.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ef116bdeabe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Colorful Logger for the Browser]]></title>
            <link>https://medium.com/@sidhantpanda/a-colorful-logger-for-the-browser-14d171835a33?source=rss-d5ed4f0c7fd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/14d171835a33</guid>
            <category><![CDATA[logging]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[frontend]]></category>
            <dc:creator><![CDATA[Sidhant Panda]]></dc:creator>
            <pubDate>Tue, 24 Sep 2019 15:15:28 GMT</pubDate>
            <atom:updated>2019-09-24T15:27:31.896Z</atom:updated>
            <content:encoded><![CDATA[<p>Introducing a colorful logger built for easing front-end development — <a href="https://www.npmjs.com/package/logt">https://www.npmjs.com/package/logt</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OypYJ33Dw2fR2vRcXym53A.png" /></figure><h3>Features:</h3><ul><li><strong>Small library size </strong>— Only <strong>~1.3KB</strong> gzipped!</li><li><strong>Colorful labels</strong> to help distinguish logs by importance.</li><li><a href="https://github.com/sidhantpanda/logt#logger-initialization"><strong>Log levels</strong></a> to hide less important log messages.</li><li><strong>Show hidden messages programmatically</strong> to print logs hidden due log level.</li><li><strong>Built with TypeScript</strong> for detailed type info and that sweet sweet autocomplete.</li></ul><h3>Install</h3><pre>$ npm i logt -S</pre><h3>Usage</h3><p>You can use this logger for your frontend projects. You can choose as an ES6 module or directly include the script in HTML.</p><h4>ES6 Import</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/daf22440fd1b0fece296f5c315ea5a04/href">https://medium.com/media/daf22440fd1b0fece296f5c315ea5a04/href</a></iframe><h4>Include in HTML through CDN</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/350220e3201d3eb8f5083bbd423a09af/href">https://medium.com/media/350220e3201d3eb8f5083bbd423a09af/href</a></iframe><h4>Show hidden log messages</h4><p>This feature allows to quickly see hidden logs in the developer tools without having to make code changes. The logger stores all hidden messages locally.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/150fa0f6f54fc398e46d5219db6e9132/href">https://medium.com/media/150fa0f6f54fc398e46d5219db6e9132/href</a></iframe><p>You can head over to the project’s <a href="https://github.com/sidhantpanda/logt">Github page</a> for more detailed documentation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14d171835a33" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Raspberry Pi Home Automation with Google Assistant integration — Part 3 (Assistant integration)]]></title>
            <link>https://medium.com/@sidhantpanda/raspberry-pi-home-automation-with-google-assistant-integration-part-3-assistant-integration-eed39247459a?source=rss-d5ed4f0c7fd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/eed39247459a</guid>
            <category><![CDATA[google-assistant]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[smart-home]]></category>
            <category><![CDATA[iot]]></category>
            <dc:creator><![CDATA[Sidhant Panda]]></dc:creator>
            <pubDate>Fri, 02 Nov 2018 22:36:28 GMT</pubDate>
            <atom:updated>2018-11-02T22:47:07.501Z</atom:updated>
            <content:encoded><![CDATA[<h3>Raspberry Pi Home Automation with Google Assistant integration — Part 3 (Assistant integration)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PqvNNHdKeY7fs3ey54S2rQ.png" /></figure><p>Part 1: <a href="https://medium.com/@sidhantpanda/raspberry-pi-home-automation-with-google-assistant-integration-part-1-software-71b3b8904205">Raspberry Pi Home Automation with Google Assistant integration — Part 1 (Software)</a></p><p>Part 2: <a href="https://medium.com/@sidhantpanda/raspberry-pi-home-automation-with-google-assistant-integration-part-2-hardware-987e18e0a9c0">Raspberry Pi Home Automation with Google Assistant integration — Part 2 (Hardware)</a></p><p>So up till now you have been able to control the switches with the React based frontend. Time to take things up a little notch. We’ll be integrating Google Assistant to control the services on our Raspberry Pi.</p><blockquote>We’ll use IFTTT to setup our trigger statement and have it make an API call to the NodeJS server exposed via ngrok to the world</blockquote><p>We’ll run ngrok inside a tmux or screen shell as the URL generated for the device changes on every load.</p><h3>Install tmux</h3><pre>$ sudo apt-get install tmux<br>$ tmux new -s ngrok</pre><p>Download the latest ngrok (ARM64 version). Ngrok version at the time of writing this was at <a href="https://bin.equinox.io/a/nmkK3DkqZEB/ngrok-2.2.8-linux-arm64.zip">https://bin.equinox.io/a/nmkK3DkqZEB/ngrok-2.2.8-linux-arm64.zip</a></p><pre>$ unzip /path/to/ngrok.zip<br>$ ./ngrok authtoken &lt;YOUR_AUTH_TOKEN&gt;<br>$ ./ngrok http 80</pre><p>Take a note of the external HTTPS url generated by ngrok. Now you can detach from tmux by ctrl + bfollowed by d.</p><h3>Create IFTTT trigger</h3><p>Head over to <a href="https://ifttt.com/">https://ifttt.com/</a> and sign in /sign up.</p><p>Next , authenticate the Google Assistant service with your Google account which you use on your phone or Google Assistant enabled speaker or device.</p><p>Once that is done, go the Create Applet and then select Google Assistant service. Select the “<strong>Say a simple phrase” </strong>trigger.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*1tTRDkSj2uLSwy3A7CCZbA.png" /></figure><p>Next, choose the “Webhook” action service and the “<strong>Make a web request” </strong>action.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*H2Fpz8YoNk3y_YaihH1OSw.png" /></figure><p>And save the trigger.</p><p>And you’re all set! You’ve successfully set up Google Assistant to control your Raspberry Pi and the attached relay module.</p><p>Here’s my setup:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FQrcxb7l-9aM%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DQrcxb7l-9aM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FQrcxb7l-9aM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a0aaf72a2ed029baf1741af71fcefe38/href">https://medium.com/media/a0aaf72a2ed029baf1741af71fcefe38/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eed39247459a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Raspberry Pi Home Automation with Google Assistant integration — Part 2 (Hardware)]]></title>
            <link>https://medium.com/@sidhantpanda/raspberry-pi-home-automation-with-google-assistant-integration-part-2-hardware-987e18e0a9c0?source=rss-d5ed4f0c7fd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/987e18e0a9c0</guid>
            <category><![CDATA[smart-home]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[electronics]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <dc:creator><![CDATA[Sidhant Panda]]></dc:creator>
            <pubDate>Fri, 02 Nov 2018 22:35:55 GMT</pubDate>
            <atom:updated>2018-11-02T23:42:14.524Z</atom:updated>
            <content:encoded><![CDATA[<h3>Raspberry Pi Home Automation with Google Assistant integration — Part 2 (Hardware)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5Rw4gbrK1tELcI4qHSkQFw.png" /></figure><p>Part 1 - <a href="https://medium.com/@sidhantpanda/raspberry-pi-home-automation-with-google-assistant-integration-part-1-software-71b3b8904205">Raspberry Pi Home Automation with Google Assistant integration — Part 1 (Software)</a></p><p>We’ll need the following:</p><ol><li>Relay Module</li><li>Jumper cables (female to female)</li><li>Electrical wires in at least 2 colours</li><li>Wire Cutters</li><li>Wire Strippers</li><li>Screwdriver</li></ol><h3>Understanding the GPIO pins on the Raspberry Pi</h3><p>The Raspberry Pi is quipped with an array of GPIO pins some of which can be programmed</p><pre>$ pinout</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*cBbsffoBhAlZlmmE9yyORg.jpeg" /><figcaption><a href="https://www.elektronik-kompendium.de/sites/raspberry-pi/fotos/raspberry-pi-15b.jpg">https://www.elektronik-kompendium.de/sites/raspberry-pi/fotos/raspberry-pi-15b.jpg</a></figcaption></figure><p>In Part 1, the config uses GPIO pins 3, 4 and 7. You can edit</p><p>To change pin config, edit `<a href="https://github.com/sidhantpanda/raspberry-pi-home-backend/blob/master/custom_modules/relayControls/config.js">https://github.com/sidhantpanda/raspberry-pi-home-backend/blob/master/custom_modules/relayControls/config.js</a>`.</p><p>Delete the file at `/home/pi/buttons.json`</p><pre>$ rm /home/pi/buttons.json</pre><h3>Understanding the I/O pins on the Relay Module</h3><p>Depending upon the number of switches your relay module contains, you can control up to 2/4/8 or even more devices. We’ll use as many GPIO pins on the Pi and control the relay with logical 1 and 0.</p><p>We’ll connect the common pin of the relay switch to the live wire behind our switchboard on the wall. Next we’ll connect the neutral wire behind the physical switch on the board to the normally closed pin of the same switch.</p><p>To understand more about common and normally closed pins, read this small guide <a href="https://randomnerdtutorials.com/guide-for-relay-module-with-arduino/">https://randomnerdtutorials.com/guide-for-relay-module-with-arduino/</a>. This what the basic electrical circuit looks like.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wReZeZbpkxRb4xhxg5OMJQ.png" /><figcaption><a href="https://i.stack.imgur.com/cjDmA.png">https://i.stack.imgur.com/cjDmA.png</a></figcaption></figure><p>This is what the circuit diagram looks like fo the pins. Connections:</p><ol><li>VCC on relay module to a 5V pin on the Raspberry Pi.</li><li>GND on relay to GND on Raspberry Pi</li><li>IND1 to GPIO 3</li><li>IND2 to GPIO 4</li><li>IND3 to GPIO 17</li></ol><p>This is how I’ve wired up my relay module:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YRjKdF9uxO5RaqYnbdbIvw.jpeg" /></figure><p>Alright, you’re all set with NodeJS server + React Frontend for your Raspberry Pi + Relay Module configuration!</p><p>The frontend is exposed via the 80 port on the raspberry pi. Find the local IP for your raspberry pi and connect to it. Assuming your Pi is at 192.168.1.10, open <a href="http://192.168.1.10/">http://192.168.1.10/</a> on a web browser in the same local network and the dashboard with fire up:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kHP9vo6P4rv1froRAjpxNQ.png" /></figure><p>Next, we’ll see how we can use Google Home to control the switches. The next step requires you to have an Google Assistant capable device (Android phone, Google Assistant speakers, iOS app etc) and is completely optional. You can control the switches from any browser in your local network currently.</p><p>Next: <a href="https://medium.com/@sidhantpanda/raspberry-pi-home-automation-with-google-assistant-integration-part-3-assistant-integration-eed39247459a">Raspberry Pi Home Automation with Google Assistant integration — Part 3 (Assistant integration)</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=987e18e0a9c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Raspberry Pi Home Automation with Google Assistant integration — Part 1 (Software)]]></title>
            <link>https://medium.com/@sidhantpanda/raspberry-pi-home-automation-with-google-assistant-integration-part-1-software-71b3b8904205?source=rss-d5ed4f0c7fd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/71b3b8904205</guid>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[smart-home-automation]]></category>
            <dc:creator><![CDATA[Sidhant Panda]]></dc:creator>
            <pubDate>Fri, 02 Nov 2018 22:34:11 GMT</pubDate>
            <atom:updated>2018-11-02T22:56:29.131Z</atom:updated>
            <content:encoded><![CDATA[<h3>Raspberry Pi Home Automation with Google Assistant integration — Part 1 (Software)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hz17oWh-QvPN7AReu9I_Hw.png" /></figure><p>Got a Pi collecting dust at home? Let’s get some lights and fans automated! I say lights and fans, but you can automate any electrical switch in your home.</p><p>First, we’ll go through all the software requirements</p><h3><strong>1. Install NodeJS</strong></h3><pre>$ curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -<br>$ sudo apt-get install nodejs -y</pre><h3>2. Clone backend</h3><p>We’ll install <a href="https://pm2.io/doc/en/runtime/guide/installation/">pm2</a> to manage our backend server</p><pre>$ npm install pm2 -g<br>$ git clone git@github.com:sidhantpanda/raspberry-pi-home-backend.git<br>$ cd raspberry-pi-home-backend &amp;&amp; npm install<br>$ pm2 start bin/www </pre><h3>3. Clone frontend</h3><pre>$ git clone git@github.com:sidhantpanda/raspberry-pi-home-frontend.git<br>$ cd raspberry-pi-home-frontend<br>$ npm install &amp;&amp; npm build</pre><h3>4. Install and configure nginx</h3><p>We’ll use nginx to expose our frontend and use it as a reverse proxy for our backend service</p><pre>$ sudo apt-get install nginx<br>$ sudo vim /etc/nginx/sites-enabled/default</pre><p>Now, look for the root for the web server and edit it to the path of the build directory of the frontend repo. Add `proxy_pass` for all the /api/* routes to the web server to the NodeJs process being run by pm2:</p><pre>--  root /var/www/html;<br>++  root /path/to/repo/build; </pre><pre>++  location /api/ {<br>++   proxy_pass http://localhost:5000;<br>++  }<br>    <br>    location / {<br>    ...</pre><p>Now, save the file, quit vim and restart nginx</p><pre>$ sudo service nginx restart</pre><h3>4. Run on boot</h3><p>To make the service restart automatically on boot, edit the `/etc/rc.local` file</p><pre>$ sudo vim /etc/rc.local</pre><p>Just add the following to the end of the file just <strong>before</strong> exit 0:</p><pre>...</pre><pre>pm2 start /path/to/backend/repo/bin/www<br>/etc/init.d/nginx start</pre><pre>exit 0</pre><p>That’s it!</p><p>Let’s move to the <a href="https://medium.com/@sidhantpanda/raspberry-pi-home-automation-with-google-assistant-integration-part-2-hardware-987e18e0a9c0">hardware tutorial</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71b3b8904205" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Conway’s Game of Life (explained with some programming)]]></title>
            <link>https://medium.com/@sidhantpanda/conways-game-of-life-explained-with-some-programming-a2970b468580?source=rss-d5ed4f0c7fd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2970b468580</guid>
            <category><![CDATA[theory-of-everything]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[universe]]></category>
            <category><![CDATA[games]]></category>
            <dc:creator><![CDATA[Sidhant Panda]]></dc:creator>
            <pubDate>Thu, 09 Aug 2018 11:30:40 GMT</pubDate>
            <atom:updated>2019-07-26T08:20:17.838Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_Cpho03vi6s01OMw" /></figure><p>This small experiment started with a friend and I discussing <a href="https://www.wikiwand.com/en/Conway%27s_Game_of_Life">Conway’s Game of Life</a>.</p><blockquote>The game is a <a href="https://www.wikiwand.com/en/Zero-player_game">zero-player game</a>, meaning that its evolution is determined by its initial state, requiring no further input.</blockquote><p>The game is a grid of cells, each of which can be in either of the two states, <strong><em>alive (</em></strong>🔴<strong><em>)</em></strong> or <strong><em>dead (</em></strong>⚪️<strong><em>)</em></strong>. There are some rules (we’ll get to them in the next section) which alter the state of the cells. Here are 3 consecutive states from the game. Can you guess what are the rules to the game?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/123/1*Bnb_l_pbBD3DnLv80vfyNw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/122/1*qFlG7YJOUjhPiPXD4oVTAQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/114/1*tek8G9n3DQLF3n3nwHbEhg.png" /><figcaption>State 0 | State 1 | State 2</figcaption></figure><p>The game actually only has 4 simple rules:</p><pre>1. Any live cell with fewer than two live neighbours dies, as if by under population.<br>2. Any live cell with two or three live neighbours lives on to the next generation.<br>3. Any live cell with more than three live neighbors dies, as if by overpopulation.<br>4. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.</pre><p>These 4 simple rules give birth to some very interesting phenomenons. If we didn’t know the rules, and were asked to make some observations about what is happening, we might say that some kind of configurations have some predictable behaviour. Some interesting examples are :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/144/1*1rdPCrzJHVR7PoObrBMdTw.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*EBtT-tvj9kZ7ixsX7Ibb5g.gif" /><figcaption>Blinker Configuration | Beacon Configuration</figcaption></figure><p>If we were to observe these grids, we would come up with our own rules like<em> if there are 3 consecutive alive cells, they’d do a blinking motion</em>.</p><p>The game has also featured in Stephen Hawking’s <a href="https://www.goodreads.com/book/show/8520362-the-grand-design">The Grand Design</a> as a means to explain our own universe. Physicists are trying to find the laws that govern every interaction, hoping to simulate our fates. We are part of the game, and we are still deciphering the rules. We have some of own theories behind things, but we might never know the exact rules.</p><p>The game was devised by John Conway in 1970 as a way to explain unpredictable <a href="https://www.wikiwand.com/en/Cellular_automaton">cellular automaton</a>. It was later that experts were able to prove that there exist initial configurations for which Conway’s Game of Life which satisfy <a href="https://www.wikiwand.com/en/Von_Neumann_universal_constructor">von Neumann universal constructors</a>.</p><p>This is how a random simulation of the game looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/414/1*hC6z1iLNw2xNvF8QZ05oxA.gif" /></figure><p>You can find source code for the game here:</p><ul><li><strong>NodeJS: </strong><a href="https://github.com/sidhantpanda/conway-game-of-life">https://github.com/sidhantpanda/conway-game-of-life</a></li><li><strong>Java</strong>: <a href="https://github.com/amankh92/conwaysgameoflife">https://github.com/amankh92/conwaysgameoflife</a></li></ul><p>You can play around with the code and try to modify the rules to see what happens.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2970b468580" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A talk on Alternative Finance by Dr. Raghavendra Rau]]></title>
            <link>https://medium.com/@sidhantpanda/a-talk-on-alternative-finance-by-dr-raghavendra-rau-493f1252ef0a?source=rss-d5ed4f0c7fd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/493f1252ef0a</guid>
            <category><![CDATA[alternative-finance]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[cambridge-university]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[banking]]></category>
            <dc:creator><![CDATA[Sidhant Panda]]></dc:creator>
            <pubDate>Fri, 06 Jan 2017 05:38:47 GMT</pubDate>
            <atom:updated>2017-01-06T05:38:47.468Z</atom:updated>
            <content:encoded><![CDATA[<p>I happened to attend an amazing talk at IIM Bangalore and thought it might be of interest. The speaker was Dr. Raghavendra Rau (<a href="https://www.jbs.cam.ac.uk/faculty-research/faculty-a-z/raghavendra-rau/">https://www.jbs.cam.ac.uk/faculty-research/faculty-a-z/raghavendra-rau/</a>), a professor at Cambridge. He is also an <a href="http://www.improbable.com/ig/">Ig Nobel</a> prize winner ;)</p><p>He talked about alternative finance which is a fairly new domain (~5 years old). These include crowdfunding, reward based funding etc. Since this so new, there is very few data about how they impact economies.</p><ol><li>Visa and Amex charge very high transaction fees and this new startup <a href="https://www.klarna.com/international">Klarna</a> is undercutting them by enabling selling only to customers who can pay back the credit charges using machine learning (hence low default rate). The only data point they ask is the customer’s address. But once a Klarna payment enabled app is installed on phone, they read your contacts, call history and see if your friends have bought on Klarna and have paid back or not. They also use phone location data to see where you are from 9 to 5 usually, which tells them where you work and how much you would be earning.</li><li>Individuals are now more empowered and can invest in opportunities on the internet, which was not so common previously.</li><li>There was in uptake in alternative finance industry during the 2008 economic crisis. Individuals are more patient with their investments than institutes.</li><li>He said banks offer a mere 0.25% on deposits in UK, he was able to get 7% by investing in alternative finance industry. Alternative finance undercut bank rates by charging a lesser interest on loans and a offering higher interest on deposits/investments. They do not have the costs of running bank branches, paying many employees etc as everything is virtual and on the internet.</li><li>M-Pesa, e-currency by Vodafone accounted for half of Kenya’s GDP. Kenya is mostly cashless, enabling payments through dumb phones also using USSD.</li><li><a href="http://www.aaai.org/ocs/index.php/ICWSM/ICWSM13/paper/viewFile/6179/6311">Mining Facebook Data for Predictive Personality Modeling</a> and <a href="http://www.pnas.org/content/112/4/1036.abstract">Computer-based personality judgments are more accurate than those made by humans</a> : 2 papers which show how accurate computers are at predicting your behaviour by just reading your social media likes, posts etc.</li></ol><p><a href="http://www.pnas.org/content/112/4/1036/F2.large.jpg">This graph</a> from the paper shows that:</p><ul><li>Your co-worker can judge you with 27% accuracy</li><li>Friends can judge with 45% accuracy</li><li>Family can judge with 50% accuracy</li><li>Computers can judge with 56% accuracy</li><li>Only your spouse can judge you with a higher accuracy at 58%</li></ul><p>He talked about how technology is being employed to disrupt traditional institutes by enabling a low barrier to entry and low operational costs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=493f1252ef0a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Making your first Android App (No Headache Version) — Part 1]]></title>
            <link>https://medium.com/android-news/making-your-first-android-app-no-headache-version-part-1-ead28a903d67?source=rss-d5ed4f0c7fd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/ead28a903d67</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[android-studio]]></category>
            <dc:creator><![CDATA[Sidhant Panda]]></dc:creator>
            <pubDate>Sat, 31 Dec 2016 19:44:56 GMT</pubDate>
            <atom:updated>2016-12-31T20:22:46.259Z</atom:updated>
            <content:encoded><![CDATA[<p>I was recently helping a friend getting started with Android development and figured the whole process can be helpful for so many other people. Lets go step by step. I am <strong>NOT </strong>covering:</p><ul><li>Emulators — We’ll test on an actual phone. Emulators are a real pain to setup, but a lifesaver when setup properly. Once you are comfortable with testing on phone, you can try emulators yourself (and better yet, post a no headache tutorial for setting up emulators!).</li></ul><h3>1. Download Android Studio</h3><p>Simple, straightforward : <a href="https://developer.android.com/studio/index.html">Android Studio</a></p><h3>2. Start a new Android project</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OQ4kmJZnyiGUXIRjuKDaFw.png" /><figcaption>Select “Start a new Android Studio project”</figcaption></figure><h3>3. Name your app</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3equKKZcyN5oPFj2uZAxFA.png" /></figure><h3>4. Let’s breeze through the wizard</h3><p>Select just phone and tablet version with minimum api level 16 (Android 4.1). Next, select an empty activity to begin with. We’ll go over what’s an activity soon. Let’s see this app on your phone first!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oeLWJ_nc7U_OUreBOdsUtg.png" /></figure><p>Press next and next and lets go!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*GNHxpLpqp4spu0Zqz9xAtw.png" /></figure><h3>5. Let’s meet your IDE</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HJYExhtkAFSqkFkQggRrSQ.png" /></figure><ol><li>Java Files</li><li>XML File (These define how things show and align in your app)</li><li>Java code for your app</li><li>Terminal</li><li>Android Monitor to check for logs, errors and see what is up on your device</li></ol><h3>6. Enable developer options on your phone</h3><p>Open Settings &gt; About. Now keep tapping the build number. Keep tapping till you see some message (“You are X steps from being a developer”) appear and then disappear. Then go back and go to “Developer Options” in the main settings menu and allow USB debugging.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ItxwdnxQ1oBQQBpOeF_Qaw.png" /></figure><h3>7. Connect your phone</h3><p>While Android Studio is running, connect your phone using the USB cable and allow your computer for USB debugging. Make sure to select “Always allow from this computer”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zCh4LH9blhVBxzj-vc28yw.png" /></figure><h3>8. Run the app!</h3><p>In Android Studio, click Run &gt; Run ‘app’ from the menu. Then select your phone and wait till Studio compiles and makes and APK for the app and installs it on your device. You will see your first app on success.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v3MqPECNwK7gZXqRBBuRBw.png" /></figure><p>Part 2 is coming up soon! You can start tinkering around the Java file and XML if you hate to wait :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ead28a903d67" width="1" height="1" alt=""><hr><p><a href="https://medium.com/android-news/making-your-first-android-app-no-headache-version-part-1-ead28a903d67">Making your first Android App (No Headache Version) — Part 1</a> was originally published in <a href="https://medium.com/android-news">AndroidPub</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>