<?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 roshanadhikari on Medium]]></title>
        <description><![CDATA[Stories by roshanadhikari on Medium]]></description>
        <link>https://medium.com/@greenboyroshan?source=rss-ab25a2d33674------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*nzS6iaxaeOcYwVBLy-UXKA.jpeg</url>
            <title>Stories by roshanadhikari on Medium</title>
            <link>https://medium.com/@greenboyroshan?source=rss-ab25a2d33674------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 08:33:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@greenboyroshan/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[Apple Feels Different Now]]></title>
            <link>https://medium.com/@greenboyroshan/apple-feels-different-now-8d861eb3c9e0?source=rss-ab25a2d33674------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d861eb3c9e0</guid>
            <dc:creator><![CDATA[roshanadhikari]]></dc:creator>
            <pubDate>Tue, 09 Jun 2026 04:44:16 GMT</pubDate>
            <atom:updated>2026-06-09T04:47:48.353Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>By Roshan Adhikari</strong></p><p>After watching WWDC 2026, it is hard not to feel that Apple is moving away from the design principles that once made it extraordinary.</p><p>When Steve Jobs returned to Apple after the NeXT acquisition in 1997, he did more than rescue a struggling company. He restored clarity. Apple’s product lineup had become confusing, unfocused, and difficult to understand. Jobs simplified it. He brought Apple back to purpose, emotion, and discipline.</p><p>He understood something many companies still fail to understand: design is not only how something looks. Design is how something works, how it feels, and why it matters.</p><p>That philosophy became even more powerful because Jony Ive was leading design at Apple. Together, Jobs and Ive shaped the Apple that many of us remember so clearly. The iMac, iPod, iPhone, iOS, and macOS all carried a sense of intention. They did not feel like products assembled by committee. They felt like objects created with care, restraint, and imagination.</p><p>The polished silver back of the iPod touch, the colorful personality of early macOS, the elegance of album art in iTunes and Cover Flow, and the clean readability of Apple’s San Francisco font all reflected a deep design culture. Nothing felt accidental. Nothing felt random. Every detail seemed to have a reason.</p><p>The iPhone was perhaps the strongest expression of that philosophy.</p><p>A multi-touch device felt magical because it made technology feel natural. Pinching to zoom, swiping through photos, scrolling with your finger, and touching the screen directly changed how people understood computers. The iPhone was not just a new product. It introduced a new emotional relationship with technology.</p><p>That is why Apple’s current direction feels disappointing.</p><p>Since Jobs passed away, and especially after Jony Ive left Apple in 2019, Apple’s design philosophy has started to feel less focused. The creative, studio-like culture that once made Apple feel different now feels weaker. Many recent design choices feel recycled rather than original. The MacBook notch, generic wallpapers, and weaker icon designs do not carry the same sense of care, charisma, or imagination that older Apple products had.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*vJ8swG1PFa-JE-CbinwJOQ.png" /><figcaption>iOS 26 Logo</figcaption></figure><p>Alan Dye tried to push Apple’s visual language forward, and that direction could have evolved into something stronger. But after WWDC 2026, it feels as if those ideas are being dismantled rather than refined.</p><p>Apple still makes beautiful products. That is not the issue. The issue is that beauty alone is not enough.</p><p>What made Apple special was not just minimalism. It was not just premium materials or clean typography. It was design with soul, discipline, and conviction. Apple products once felt meaningful because every decision seemed connected to a deeper philosophy.</p><p>Today, that philosophy feels less visible.</p><p>Apple needs to rethink its design principles and return to the clarity that once made its products feel not only useful, but meaningful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i0If-RgDm4popeNof-ipkA.jpeg" /><figcaption>Jony Ive’s LoveFrom design for King Charles</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d861eb3c9e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How does your pod talk to other pods inside Kubernetes?]]></title>
            <link>https://medium.com/@greenboyroshan/how-does-your-pod-talk-with-other-pods-inside-kubernetes-5f1902cfa6b1?source=rss-ab25a2d33674------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f1902cfa6b1</guid>
            <dc:creator><![CDATA[roshanadhikari]]></dc:creator>
            <pubDate>Fri, 24 Apr 2026 23:59:41 GMT</pubDate>
            <atom:updated>2026-04-25T00:09:38.937Z</atom:updated>
            <content:encoded><![CDATA[<p>Author — Roshan Adhikari/ GPT 5.5</p><p>Inside Kubernetes, service does not call another pod directly. It calls the other service by its Kubernetes Service name, such as http://distance-service:8080. Kubernetes resolves that name to healthy pod endpoints and load-balances the request. In a production setup with a service mesh, each pod also has an Envoy sidecar proxy. The app’s outbound request is intercepted by its local Envoy, which gets service endpoint information from the mesh control plane, applies mTLS, timeout, retry, circuit breaker, and load-balancing rules, then forwards the request to one healthy destination pod.</p><p>Envoy is usually added automatically by a service mesh such as Istio. You label the namespace for sidecar injection, then redeploy your application. Istio mutates the pod definition and adds an istio-proxy Envoy container beside your app container.</p><pre>kubectl label namespace default istio-injection=enabled<br>kubectl rollout restart deployment service-a</pre><p>Your original Deployment only defines your app container:</p><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: service-a<br>spec:<br>  replicas: 2<br>  selector:<br>    matchLabels:<br>      app: service-a<br>  template:<br>    metadata:<br>      labels:<br>        app: service-a<br>    spec:<br>      containers:<br>        - name: service-a<br>          image: company/service-a:1.0<br>          ports:<br>            - containerPort: 8080</pre><p>After injection, the running pod effectively has two containers:</p><pre>service-a pod<br>  container 1: service-a<br>  container 2: istio-proxy / Envoy sidecar</pre><p>You do not manually code Envoy inside the app. Istio injects it into the pod and configures traffic interception automatically.</p><p>The sidecar is not something you write in your Node.js or Java app. It is a proxy container, usually <strong>Envoy</strong>, automatically added to every pod by Istio.</p><pre>Service A Pod<br>  → app container<br>  → Envoy sidecar container</pre><pre>Service B Pod<br>  → app container<br>  → Envoy sidecar container</pre><p>Your app still calls:</p><pre>http://service-b:3000/distance</pre><p>But inside Service A’s pod, Istio adds network rules that force outgoing traffic through the Envoy sidecar first.</p><pre>Service A app<br>  → outbound request<br>  → intercepted by Service A Envoy<br>  → Envoy sends request to one Service B pod</pre><p>The sidecar knows about Service B pods because Istio has a control-plane component called <strong>istiod</strong>. istiod watches Kubernetes and learns:</p><pre>service-b has pod-1<br>service-b has pod-2<br>service-b has pod-3<br>pod-2 is not ready</pre><p>Then istiod pushes this service/pod information to every Envoy sidecar.</p><pre>Kubernetes API<br>  → istiod<br>  → Envoy sidecars</pre><p>So Service A’s sidecar already has a local list of healthy Service B pod endpoints.</p><pre>service-b endpoints known by Service A sidecar:<br>  10.1.2.10:3000<br>  10.1.2.11:3000<br>  10.1.2.12:3000</pre><p>When Service A calls service-b, Envoy picks one endpoint using the configured load-balancing rule.</p><pre>Round robin:<br>  request 1 → pod-1<br>  request 2 → pod-2<br>  request 3 → pod-3</pre><pre>Least request:<br>  send to the pod with fewer active requests, based on Envoy’s local observed active requests</pre><p>Each sidecar tracks traffic that passes through itself. It knows active requests, failures, latency, retries, and timeouts for calls made by its own pod. It does not need to know every request in the whole company. It only needs enough local endpoint data and local traffic stats to make good routing decisions.</p><pre>Simple flow:</pre><pre>Service A app calls service-b<br>  → Service A Envoy intercepts<br>  → Envoy checks local service-b endpoint list<br>  → Envoy applies mTLS, timeout, retry, circuit breaker<br>  → Envoy chooses one healthy Service B pod<br>  → Service B Envoy receives<br>  → Service B app handles request</pre><p>So the key idea is:</p><pre>Kubernetes knows which pods exist.<br>Istio control plane watches Kubernetes.<br>Istio pushes endpoint data to sidecars.<br>Sidecars intercept traffic and route it using that endpoint data.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Pt8hmpfomcbx4UFP.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f1902cfa6b1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Local AI PR~Agent with Ollama]]></title>
            <link>https://medium.com/@greenboyroshan/building-a-local-pr-agent-with-ollama-2a0658ab311c?source=rss-ab25a2d33674------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a0658ab311c</guid>
            <dc:creator><![CDATA[roshanadhikari]]></dc:creator>
            <pubDate>Wed, 04 Mar 2026 23:23:25 GMT</pubDate>
            <atom:updated>2026-03-04T23:32:33.666Z</atom:updated>
            <content:encoded><![CDATA[<p>Author: <strong>Roshan Adhikari / ChatGPT 5.3 Instant</strong></p><blockquote>The entire flow completes locally in under a minute.</blockquote><h3>What we built</h3><p>Spring Boot application produces a simulated failure -&gt; captures the log -&gt; sends that log to a local language model running through Ollama -&gt; generates a code patch -&gt; commits the change on a new branch, and optionally opens a pull request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1WooK9ZJFjL-WYjnf39OJA.png" /><figcaption>application logs trigger a local Ollama agent that analyzes failures and prepares a code fix pull request.</figcaption></figure><p>The application throws a realistic backend failure, the log is captured and queued, an agent analyzes it with the local LLM, a patch is generated, and Git automation commits the fix.</p><h3>Git branch created by the agent</h3><p>This image shows the moment the agent commits the fix on a new branch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RuVNe7bV-NRS6LKgsfQCzA.png" /><figcaption><em>The agent creates a new ai-fix-* branch and commits the generated fix.</em></figcaption></figure><h3>Diff of the generated patch</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gwYP7gGXRw3tVfVM4qhb4w.png" /><figcaption><em>The AI-generated patch introduces retry logic to prevent transient database timeout failures.</em></figcaption></figure><h3>Technology stack</h3><p>Spring Boot dependencies:</p><pre>spring-boot-starter-web<br>spring-boot-starter-webflux<br>spring-boot-starter-data-jpa<br>spring-boot-starter-actuator<br>postgresql<br>lombok<br>org.eclipse.jgit<br>jackson-databind</pre><p>Ollama provides the local LLM inference layer and runs models such as llama3. Git automation is handled through <strong>JGit</strong>, which allows the application to create branches and commits programmatically.</p><h3>Failure simulation</h3><p>The system begins with a small service that deliberately throws a backend style exception. The error resembles something engineers frequently see in production environments.</p><pre>java.sql.SQLTimeoutException: connection timeout after 5s</pre><p>The failure can be triggered through a simple endpoint.</p><pre>GET /payments/run</pre><p>This produces a runtime exception and sends the error into the logging pipeline.</p><h3>Log capture and queue</h3><p>Once the exception is thrown a global exception handler captures it and converts it into a structured log event. Instead of blocking the request thread, the event is pushed into a queue. A background worker continuously consumes events from the queue and forwards them to the agent.</p><h3>Ollama integration</h3><p>The agent sends the captured log to the local model through Ollama.</p><pre>POST http://localhost:11434/api/generate</pre><p>The prompt instructs the model to analyze the error and return a structured response containing a patch, commit message, and pull request description.</p><h3>Git automation</h3><p>Once the model returns a patch, the application applies it directly to the repository workspace. If the generated patch is invalid or empty, the system falls back to a deterministic fix so the pipeline remains predictable.</p><p>After applying the patch, the agent performs a series of Git operations.</p><ol><li>Create a branch named ai-fix-*.</li><li>Add the modified files.</li><li>Commit the changes with a generated message.</li><li>Optionally push the branch.</li></ol><h3>Optional -&gt; GitHub pull request</h3><p>When enabled, the system also opens a pull request automatically using the GitHub REST API. Required environment variables include:</p><pre>AGENT_GITHUB_ENABLED=true<br>AGENT_GIT_PUSH_ENABLED=true<br>AGENT_GITHUB_OWNER=&lt;owner&gt;<br>AGENT_GITHUB_REPO=&lt;repo&gt;<br>GITHUB_TOKEN=&lt;token&gt;</pre><p>Once enabled, the pipeline ends with a ready-to-review PR.</p><h3>Local testing</h3><p>Start by verifying that Ollama and the model are available.</p><pre>ollama list<br>ollama run llama3 &quot;Say ready&quot;</pre><p>Run the Spring Boot application.</p><pre>mvn spring-boot:run</pre><p>Trigger the simulated failure.</p><pre>curl http://localhost:8080/payments/run</pre><p>Within seconds the agent processes the log and creates a new fix branch.</p><p>You can confirm it with:</p><pre>git branch --list &quot;ai-fix*&quot;<br>git log --oneline --graph --decorate --all</pre><h3>Why the fix branch is separate</h3><p>The fix is committed on a new branch instead of main. This mirrors real development workflows where automated fixes should still go through human review.</p><p>~ Code written &amp; generated using codex 5.3</p><p>~ Github Repo — <a href="https://github.com/roshanadhikari2073/auto-pr-creator-ollama-agent">https://github.com/roshanadhikari2073/auto-pr-creator-ollama-agent</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a0658ab311c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cache Stampede // Why Caches Can Become Bottlenecks and How Systems Prevent Cache Stampedes]]></title>
            <link>https://medium.com/@greenboyroshan/cache-stampede-031c685e312c?source=rss-ab25a2d33674------2</link>
            <guid isPermaLink="false">https://medium.com/p/031c685e312c</guid>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[cache]]></category>
            <dc:creator><![CDATA[roshanadhikari]]></dc:creator>
            <pubDate>Wed, 04 Mar 2026 18:56:56 GMT</pubDate>
            <atom:updated>2026-03-04T19:14:29.581Z</atom:updated>
            <content:encoded><![CDATA[<p>A cache can become a bottleneck when many users request the same data at the same time and the cached copy disappears. Normally the cache protects the database because requests are answered from memory, which is very fast. The problem happens when a cache entry expires. At that moment every request that needs that data goes straight to the database. Instead of one database query, the system may suddenly generate thousands or even millions of identical queries. This sudden spike can overwhelm the database and slow the entire system.</p><p>Consider a simple example where a popular product page is cached.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/96836e85f6d87394c28590844421ea77/href">https://medium.com/media/96836e85f6d87394c28590844421ea77/href</a></iframe><p>The system behavior becomes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g__B_sccqwHJcEYkzDArpQ.png" /></figure><p>Even though caching normally improves performance, the expiration creates a sudden traffic spike that the database cannot handle. This situation is called a <strong>cache stampede</strong>.</p><p>Another limitation comes from memory size. Caches like Redis store data in RAM. RAM is fast but expensive and limited compared to disk storage used by databases. Large systems often have terabytes or even petabytes of data. A cache cluster usually holds only a small portion of that data. Because of this limit, only frequently accessed data is stored in cache. Everything else must still be read from the database.</p><p>Engineers use several techniques to prevent cache bottlenecks.</p><p>One method is <strong>request locking</strong>. When the cache expires, only one request is allowed to fetch the data from the database. Other requests wait briefly until the cache is filled again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lxlIGSLtFmiEW-7dD8xSBg.png" /></figure><p>This prevents thousands of identical database queries and replaces them with a single query.</p><p>Another method is <strong>serving stale cache data</strong>. Instead of removing cached data exactly when it expires, the system continues to serve the old value for a short period. At the same time a background worker refreshes the cache.</p><p>Example timeline:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/71aec1c47aee056287b376010f6a37ca/href">https://medium.com/media/71aec1c47aee056287b376010f6a37ca/href</a></iframe><p>Users keep receiving data and the database does not experience a sudden spike.</p><p>Another technique is <strong>random expiration</strong>. If many cache keys expire at the same moment they can create traffic spikes. To avoid that the system adds randomness to expiration times.</p><p>Example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8a473ee87916e5bff78d4cb108efde83/href">https://medium.com/media/8a473ee87916e5bff78d4cb108efde83/href</a></iframe><p>This spreads out the cache refresh events so they do not happen at the same time.</p><p>Systems also scale the cache layer itself. Instead of one Redis server they use multiple nodes so the traffic is spread across many machines.</p><pre>Users<br>  │<br>  ▼<br>Application<br>  │<br>  ├── Redis Node 1<br>  ├── Redis Node 2<br>  ├── Redis Node 3<br>  └── Redis Node 4</pre><p>Each node handles part of the load so the cache layer does not become overloaded.</p><p>Large production systems usually combine several layers together.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hGTs7wRovz129nxvSGJvSw.png" /></figure><p>In this structure most requests are served by caches. If a cache miss happens the read replicas absorb the load. The primary database mostly handles writes and critical reads. This layered design keeps the system stable even during heavy traffic or cache expiration events..</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=031c685e312c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“Healing Trust: Reinventing Cybersecurity with Zero Trust Architecture in Healthcare”]]></title>
            <link>https://medium.com/@greenboyroshan/healing-trust-reinventing-cybersecurity-with-zero-trust-architecture-in-healthcare-58aa772525ed?source=rss-ab25a2d33674------2</link>
            <guid isPermaLink="false">https://medium.com/p/58aa772525ed</guid>
            <dc:creator><![CDATA[roshanadhikari]]></dc:creator>
            <pubDate>Thu, 07 Aug 2025 15:35:16 GMT</pubDate>
            <atom:updated>2025-08-07T15:35:16.917Z</atom:updated>
            <content:encoded><![CDATA[<p>Author : Roshan Adhikari</p><p><strong>Preface</strong><em> — This paper provides a high-level comparison between traditional and modern digital architectures within healthcare organizations, emphasizing their limitations in addressing evolving cyber threats. It underscores the critical advantages of adopting Zero Trust principles within cloud-based architectures, offering a pragmatic approach to strengthening security frameworks. The focus of this paper is not on introducing novel research methodologies or algorithms but rather on illustrating foundational concepts. Additionally, simplified visuals are included to enhance understanding for a broader audience.</em></p><p><strong>Abstract — </strong>The rapid digital transformation in healthcare has expanded the attack surface, increasing vulnerabilities to cyberattacks, data breaches, and ransomware. The adoption of Electronic Health Records (EHRs), Telemedicine, and Remote Patient Monitoring (RPM) has outpaced the capabilities of traditional perimeter-based security models, leaving systems exposed to misconfigured cloud environments, unpatched legacy systems, and decentralized access points. These security breaches pose life-threatening risks to patient safety and severe regulatory and financial consequences. Zero Trust Architecture (ZTA) offers a proactive security framework by eliminating implicit trust and enforcing continuous verification of users, devices, and applications. This paper explores ZTA’s core principles, implementation strategies, and benefits, emphasizing microsegmentation, least-privilege access, multi-factor authentication (MFA), and AI-driven threat detection. Additionally, it evaluates key</p><p>security metrics such as Mean Time to Detect (MTTD) and Mean Time to Respond (MTTR) to measure the effectiveness of Zero Trust in mitigating cyber risks.</p><h4>1. INTRODUCTION</h4><p>The rapid acceleration of digital transformation across industries has introduced unprecedented security challenges, particularly in healthcare, where data sensitivity and operational continuity are critical. Traditional network security models, which rely on implicit trust within internal systems, are no longer sufficient to protect against increasingly sophisticated cyber threats. As healthcare organizations adopt advanced digital solutions, including Electronic Health Records (EHRs), Health Information Systems (HIS), Telemedicine, and Remote Patient Monitoring (RPM)14, they inadvertently expand their attack surface, making security breaches more probable and their consequences more severe.</p><p>Historically, healthcare systems operated within on-premises environments, largely insulated from internet-based threats. However, the shift toward cloud computing, interconnected medical devices, and third-party service integrations has led to a fundamental change in risk exposure. Cyber adversaries now exploit network vulnerabilities, misconfigured cloud environments, and weak access controls, resulting in data breaches, ransomware attacks, and service disruptions. A failure to adequately secure these digital infrastructures not only threatens patient safety but also poses a significant economic and national security risk.</p><p>A security breach in healthcare can lead to immediate operational disruptions, with potentially life-threatening consequences for patients. Moreover, compromises in medical systems can propagate across interconnected infrastructures, disrupting critical healthcare services and violating regulatory compliance frameworks such as HIPAA (Health Insurance Portability and Accountability Act) and GDPR (General Data Protection Regulation). This evolving threat landscape demands a strategic shift from traditional perimeter-based security toward a dynamic, adaptive, and continuously verified security model.</p><p>In response to these challenges, Zero Trust Architecture (ZTA) has emerged as a foundational security paradigm for modern healthcare environments5. Unlike conventional security models that assume trust within the network perimeter, Zero Trust eliminates implicit trust entirely. Every user, device, and system interaction must undergo continuous verification, risk assessment, and strict access control enforcement, regardless of its location or previous authentication status. By adopting Zero Trust principles, healthcare organizations can significantly reduce their attack surface, strengthen regulatory compliance, and ensure the integrity of sensitive patient data.</p><h4>2. RATIONALE FOR ZERO TRUST IN HEALTHCARE</h4><p>2.1 EVOLVING THREAT LANDSCAPE</p><p>The threat landscape confronting healthcare has grown exponentially more sophisticated. Attackers employ varied tactics — ransomware, social engineering, supply chain exploits — and target both large institutions and smaller players9. There is always the risk of targeted attacks to critical systems within health especially during critical moments to force payments such like peak emergency moments. The data can be compromised or encrypted by the hackers thus leading to unavailability. High-profile breaches at major hospital networks often dominate headlines, but smaller clinics and emerging payment apps face similar, if not greater, risk because they typically operate under tighter budget constraints and have fewer dedicated security staff 15.</p><p>In healthcare, aging software and legacy database systems frequently remain in use for critical care workflows14. Patching these systems without causing downtime can be challenging, meaning vulnerabilities may persist. Furthermore, many organizations rely on traditional approaches that were not initially built for robust cybersecurity, offering potential entry points for adversaries 10.</p><p>With the advancement of digital transformation, ranging from routine application updates to the comprehensive overhaul of entire healthcare networks, organizations face an increasing array of security challenges. Even a minor vulnerability can have catastrophic consequences, prompting significant financial investments to fortify these systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bbQ28dRnpwPMnmAV" /></figure><p>Image [1] — “Vulnerable Remote Work System”</p><p><em>“The steps depicted in the image represent a high-level framework for understanding how a digitally transformed architecture might appear. This structure may not be tailored to a specific organization.”</em></p><p>The following steps provide an overview of each layer within the unsecured modern work system — image [1].</p><p>1. Public Cloud Services (Unsecured): Data communication with public cloud environments becomes risky without VPN or secure encryption.</p><p>2. Personal &amp; Work Devices: Remote workers using personal or work devices create potential entry points for cyber threats, especially in insecure home or clinic networks.</p><p>3. Attack Vectors: Threats like malware and ransomware exploit these vulnerabilities, gaining access to critical systems.</p><p>4. Internal Systems &amp; Database Servers: Breaches in endpoint security allow attackers to move laterally, impacting sensitive databases and operational systems.</p><p>5. Third-Party Vendors: External integrations add another layer of risk, as compromised vendors can act as gateways for attackers to infiltrate primary systems.</p><p>2.2 PERIMETER-BASED SECURITY: A LEGACY MODEL</p><p>Historically, organizations relied on perimeter-based security models that operated on the assumption that internal networks were inherently trustworthy. This approach was effective in an era when operations were primarily confined to physical locations, such as on-premises data centers or office environments. For example, hospital staff accessed applications exclusively through hospital computers, and financial data processing took place within secure, in-house data centers. However, the modern landscape has fundamentally shifted. Remote operations have become the norm, with sensitive patient data and critical business logic no longer confined to the physical boundaries of a building. Data traffic continuously flows between remote locations and hospital networks, as healthcare institutions increasingly depend on cloud infrastructures for data storage and processing. This shift has expanded operational boundaries while simultaneously broadening security perimeters.</p><p>Today, the concept of a secure perimeter has become increasingly porous. As healthcare organizations increasingly adopt cloud-based infrastructures for storing and processing sensitive patient data, the security challenges associated with remote access and third-party integrations have become more complex. Remote healthcare professionals, such as doctors, radiologists, and administrative staff, frequently access hospital networks from home offices, mobile devices, or off-site clinics, introducing multiple potential vulnerabilities. These remote workers connect via Virtual Private Networks (VPNs) or Secure Web Gateways, often using Multi-Factor Authentication (MFA) and Single Sign-On (SSO) solutions like Okta or Azure Active Directory. However, many remote environments remain insecure, as home Wi-Fi networks, outdated personal devices, and phishing attacks can serve as entry points for cyber threats.</p><p>In addition, hospitals rely on third-party vendors for billing, insurance processing, and remote patient monitoring, requiring open communication channels via APIs. These integrations create further attack vectors, especially when API gateways are misconfigured, vendor credentials are compromised, or insecure SaaS applications are utilized.</p><p>This shift has created numerous potential entry points into corporate networks. Each remote worker essentially introduces a “mini perimeter,” which is often poorly secured, leaving organizations vulnerable to cyber threats. This new reality demands a reimagined approach to network security that accounts for the decentralized nature of modern operations. Once an attacker breached that mini perimeter — perhaps through a phishing email that yielded an employee’s credentials — there was often little to prevent them from exploring the entire internal environment 3. A single point of exploitation can leave an entire system vulnerable, enabling attackers to move laterally across critical components and resources within the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EvWze3PyQaFk3jlS" /></figure><p>Image [2] — “Vulnerable System Allowing Unsafe Lateral Movement”</p><p>The image [2] illustrates a vulnerable system where remote workers connect directly to internal systems and database servers without robust access controls or segmentation. In this configuration, a single point of exploitation, such as a compromised remote device, allows attackers unrestricted lateral movement across the network, enabling them to access critical resources.</p><p>Traditional approaches are ill-equipped to counter infiltration strategies that exploit lateral movement within networks and thrive on the increasingly blurred boundaries of digital ecosystems. This underscores the urgent need for more adaptive and robust security frameworks capable of protecting interconnected systems in today’s digital landscape.</p><p>2.3 THE ZERO TRUST MINDSET</p><p>Zero Trust inverts the old paradigm. Instead of “trust everything inside,” it demands verification for every entity, every time 5. At the core of Zero Trust architecture lies the principle of microsegmentation, where networks are divided into smaller, isolated zones, each governed by strict access controls. This approach ensures that even if a system is compromised, the attacker cannot freely move laterally across the entire environment. Zero Trust also incorporates continuous authentication, often supported by multi-factor authentication (MFA), to minimize the risk of prolonged misuse of stolen credentials. In this model, users and devices are required to regularly revalidate their access privileges, reducing opportunities for unauthorized activity.</p><p>This policy fundamentally transforms traditional security models by eliminating the assumption of inherent trust for users or devices inside the network. Instead, it requires continuous validation for anyone attempting to gain or maintain access. These validations can be based on factors such as identity, location, or</p><p>device security posture. The result is a dynamic security framework where trust is never static or permanent. Trust levels can shift in real-time, ensuring that even an active session is subject to ongoing scrutiny. This continuous verification approach addresses modern threats and mitigates the risks associated with traditional, perimeter-based security strategies.</p><p>In healthcare settings, Zero Trust principles take on critical importance due to the sensitive nature of patient data and life-critical systems. Healthcare organizations implement microsegmentation to isolate different departments and systems — emergency rooms, radiology, pharmacy, and patient records all exist in separate security zones. For example, a doctor’s credentials alone aren’t sufficient to access patient records; the system continuously verifies their identity, device security status, location, and whether the access pattern matches their normal behavior. Even medical devices operate in isolated segments, preventing a compromised device from affecting others. Each interaction between systems — like when a pharmacy system needs to access patient allergies — requires fresh verification, ensuring that compromised credentials in one department can’t lead to a system-wide breach.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QR1s4yJKtlwOJWK6" /></figure><p>Image [3] — ”Zero Trust Security Model”</p><p>Image [3] depicts the principles of Zero Trust Architecture (ZTA), highlighting its layered approach to securing sensitive systems and data in healthcare or similar environments. At the top of the framework lies Identity &amp; Access Management (IAM), which serves as the foundational layer. IAM enforces continuous verification through mechanisms such as Multi-Factor Authentication (MFA) and Single Sign-On (SSO), ensuring that only verified users and devices can access the network. It also employs Role-Based Access Control (RBAC) and risk-based authentication to dynamically assess and restrict access based on user roles, location, or device posture.</p><p>Moving to the second layer, the model incorporates microsegmentation, a critical aspect of ZTA. The network is divided into isolated security zones, each tailored to a specific department or function, such as the Emergency Room, Radiology Department, Pharmacy Systems, and Patient Records (EHR). This segmentation ensures that even if one segment is compromised, attackers cannot move laterally across the network, thus safeguarding critical systems and data.</p><p>The third layer emphasizes continuous authentication and monitoring, powered by AI-based anomaly detection. This layer actively monitors user behavior, login patterns, and device security. It blocks unauthorized access and movement between segments, ensuring that only users with valid credentials and verified activity patterns can maintain access. Additionally, it re-validates credentials regularly, providing a dynamic security framework that adjusts in real-time to emerging threats.</p><p>Finally, the framework incorporates secure API interactions to address vulnerabilities introduced by third-party integrations. Continuous authentication enforces Zero Trust principles for API communications, limiting access to payment gateways, risk management systems, and other external services. By applying transaction-specific authentication, the system ensures that only authorized interactions occur, further strengthening the network’s security posture.</p><p>This structured approach demonstrates how Zero Trust Architecture systematically eliminates implicit trust, replacing it with continuous verification, strict access control, and dynamic threat monitoring to secure modern decentralized networks effectively.</p><h4>3. PRACTICAL IMPLEMENTATION STRATEGIES</h4><p>3.1 CONSTRUCTING A ZERO TRUST ARCHITECTURE</p><p>Step A: Asset Inventory and Segmentation</p><p>Organizations begin by mapping all servers, devices, user roles, and sensitive data flows. A mid-size healthcare system, for example, might isolate EHR databases, administrative workstations, and IoT devices each within dedicated zones.</p><p>Step B: Least Privilege and Policy Enforcement</p><p>Every account or system is granted only the minimal access necessary to perform its functions. This “least privilege” approach eliminates many paths an attacker could exploit if they compromise a single set of credentials. Identity and Access Management (IAM) systems generate ephemeral tokens, ensuring credentials frequently expire and require re-authentication 18.</p><p>Step C: Automation and Continuous Monitoring</p><p>Zero Trust rules can be enforced by Infrastructure-as-Code, with tools like Terraform or Ansible specifying network configurations and access control lists. Automated scripts regularly audit these settings, alerting teams if configurations drift from the baseline. Regular internal audits, or “micro-pentests,” check each segment to confirm that segmentation and authentication rules remain effective19.</p><p>5.2 DEPLOYING AI-ENHANCED THREAT DETECTION</p><p>1. Data Aggregation</p><p>Logs must be gathered from various sources — user login systems, device telemetry, network traffic, application event logs — and normalized into a standardized format. For instance, a healthcare provider collects EHR logs, medication administration records, and IoT device status updates in a centralized platform20.</p><p>2. Machine Learning Model Lifecycle</p><p>Developers train the system on historical data — both benign usage patterns and known malicious activity from prior incidents or simulation exercises. Models might include supervised learning for known types of fraud or anomaly detection for unknown threats. The system refines its thresholds as it encounters real-world data, preventing an onslaught of false positives21.</p><p>3. Real-Time Scoring and Automated Response</p><p>Upon detecting anomalies — such as an</p><p>account unexpectedly accessing restricted segments or performing unusual transactions — an AI system can temporarily suspend the account, limit network traffic, or alert human analysts for further investigation. Timely responses drastically reduce the window in which adversaries can operate undetected22.</p><p>4. Feedback and Iterative Improvement</p><p>Continuous improvement is essential. Each flagged event is reviewed; if it was truly suspicious, the model is validated, but if it was a legitimate behavior, the model’s thresholds or features are adjusted. This feedback loop ensures the AI adapts to evolving business processes and attacker tactics.</p><h4>4. MEASURING IMPACT AND SUCCESS</h4><p>1. MTTD (Mean Time to Detect) and MTTR (Mean Time to Respond)</p><p>These metrics reveal how quickly suspicious activity is identified and contained. A robust Zero Trust and AI approach often lowers both measures drastically, preventing attackers from achieving deep infiltration.</p><p>2. Zone Breach Isolation Rate</p><p>The frequency with which attacks remain contained to a single microsegment. High isolation rates signal that microsegmentation is functioning effectively, protecting broader systems from large-scale compromise16.</p><p>3. AI Alert Precision</p><p>Balancing the number of correct detections (true positives) with minimal false positives is crucial. Continuous tuning helps security teams avoid “alert fatigue” while ensuring genuinely malicious behaviors are flagged quickly.</p><p>4. Regulatory Compliance Improvements</p><p>Healthcare might track fewer HIPAA violations.. Demonstrable improvements in audits confirm that security gains are more than theoretical — they translate into actionable safeguards16.</p><p><strong>5. CONCLUSION: A COLLECTIVE RESPONSIBILITY</strong></p><p>Zero Trust architectures provide a strong security framework for healthcare organizations. These industries face an ever-growing wave of cyber threats, and outdated security models are no longer sufficient. Traditionally, healthcare institutions relied on perimeter-based defenses, but today, segmenting networks and limiting access to only verified users and devices is crucial. AI-powered monitoring further strengthens security by detecting anomalies and responding before a potential breach impacts patient care.</p><p>Beyond protecting individual organizations, these security strategies carry significant societal implications. In healthcare, disruptions can put lives at risk, can erode patient trust and create economic instability for the health organizations. Given these risks, adopting Zero Trust principles isn’t just a technological upgrade — it’s a necessary shift to safeguard critical services and infrastructure.</p><p>Implementing Zero Trust does require upfront investments in security technologies, employee training, and changes in organizational workflows. However, the long-term benefits — reducing breaches, improving incident response times, and maintaining public confidence — make it a strategic necessity rather than an optional enhancement.</p><p>Even organizations with limited budgets can gradually integrate Zero Trust into their security strategy. By prioritizing the segmentation of high-value systems, introducing AI-driven anomaly detection, and collaborating with industry groups for shared intelligence, even smaller institutions can enhance their defenses over time.</p><h3>REFERENCES</h3><ol><li>IBM Security. <em>Cost of a Data Breach Report</em> (latest edition).</li><li>Federal Reserve System. <em>Financial Stability Insights</em>.</li><li>Verizon. <em>Data Breach Investigations Report</em>.</li><li>Mandiant. <em>Threat Landscape Review: Lateral Movement Tactics</em>.</li><li>National Institute of Standards and Technology (NIST). <em>SP 800–207: Zero Trust Architecture</em>.</li><li>Ponemon Institute. <em>State of AI in Cybersecurity</em>.</li><li>(ISC)². <em>Cybersecurity Workforce Study</em>.</li><li>Cybersecurity and Infrastructure Security Agency (CISA). <em>Critical Infrastructure Sectors</em>.</li><li>Check Point Research. <em>Global Cyberattack Trends</em>.</li><li>Healthcare IT News. <em>Networked Medical Devices and Security Risks</em>.</li><li>OWASP. <em>Top 10 API Security Risks</em>.</li><li>Check Point Research. <em>Polymorphic Malware Insights</em>.</li><li>HIPAA Journal. <em>Ransomware Disruptions in Hospitals</em>.</li><li>Ponemon Institute. (2023). <em>The Impact of Ransomware on Healthcare and Patient Safety</em>.</li><li>Critical Insight, “Hackers shifting focus to small hospitals, clinics, and tech companies to siphon off patient data, report finds,” <em>Fierce Healthcare</em>, Aug. 24, 2022. [Online]. Available: <a href="https://www.fiercehealthcare.com/health-tech/hackers-shifting-focus-small-hospitals-clinics-and-tech-companies-siphon-patient-data">https://www.fiercehealthcare.com/health-tech/hackers-shifting-focus-small-hospitals-clinics-and-tech-companies-siphon-patient-data</a></li><li>Palo Alto Networks. (n.d.). <em>What Is Microsegmentation?</em> Retrieved from <a href="https://www.paloaltonetworks.com/cyberpedia/what-is-microsegmentation">https://www.paloaltonetworks.com/cyberpedia/what-is-microsegmentation</a></li><li>National Institute of Standards and Technology (NIST). (2020). <em>Zero Trust Architecture</em> (Special Publication 800–207). Retrieved from <a href="https://nvlpubs.nist.gov/nistpubs/specialpublications/NIST.SP.800-207.pdf">https://nvlpubs.nist.gov/nistpubs/specialpublications/NIST.SP.800-207.pdf</a></li><li>Palo Alto Networks. (n.d.). <em>What is Zero Trust Architecture?</em> Retrieved from <a href="https://www.paloaltonetworks.com/cyberpedia/what-is-a-zero-trust-architecture">https://www.paloaltonetworks.com/cyberpedia/what-is-a-zero-trust-architecture</a></li><li>CrowdStrike. (n.d.). <em>What is Zero Trust Security? Principles of the Zero Trust Model.</em> Retrieved from <a href="https://www.crowdstrike.com/en-us/cybersecurity-101/zero-trust-security/">https://www.crowdstrike.com/en-us/cybersecurity-101/zero-trust-security/</a></li><li>Graylog. (n.d.). <em>The importance of data normalization for log files</em>. Retrieved from <a href="https://graylog.org/post/the-importance-of-data-normalization-for-log-files">https://graylog.org/post/the-importance-of-data-normalization-for-log-files</a></li><li>Tanium. (n.d.). <em>Machine learning in cybersecurity</em>. Retrieved from <a href="https://www.tanium.com/blog/machine-learning-in-cybersecurity">https://www.tanium.com/blog/machine-learning-in-cybersecurity</a></li><li>Communications of the ACM (CACM). (n.d.). <em>Strengthening security throughout the ML/AI lifecycle</em>. Retrieved from <a href="https://cacm.acm.org/blogcacm/strengthening-security-throughout-the-ml-ai-lifecycle">https://cacm.acm.org/blogcacm/strengthening-security-throughout-the-ml-ai-lifecycle</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58aa772525ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create a GitHub repo directly from the terminal (Linux/Unix)]]></title>
            <link>https://medium.com/@greenboyroshan/how-to-create-a-github-repo-directly-from-the-terminal-linux-unix-8f92573340e8?source=rss-ab25a2d33674------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f92573340e8</guid>
            <category><![CDATA[repositories]]></category>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[roshanadhikari]]></dc:creator>
            <pubDate>Fri, 09 Feb 2024 22:22:02 GMT</pubDate>
            <atom:updated>2024-02-10T03:11:59.171Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9LVPOuiNRX6HyqQr1aDAfA.png" /><figcaption>created using DALLE * E</figcaption></figure><p>Creating a streamlined workflow for GitHub repository creation directly from your terminal can significantly enhance productivity. By crafting a custom zshscript and integrating it seamlessly into your shell environment, you can initiate new projects with a simple command. Let’s walk through the process from scratch, covering everything from script creation to making it a one-word command.</p><h4>Step 1: Creating the Script</h4><ol><li><strong>Open Terminal:</strong> Start by opening your terminal application.</li><li><strong>Create a New File:</strong> Use nano in terminal to create your script file. This is going to create a .zsh file in your directory.</li></ol><pre> nano create_github_repo.zsh</pre><p>3<strong>. Script Content: </strong>Copy the shell script into your editor.</p><pre><br>#!/bin/bash<br><br>#Prompt user for repository details<br>read -p “Enter the repository name: “ repo_name<br>read -p “Enter the repository description: “ repo_description<br>read -p “Is the repository private? (yes/no): “ repo_private<br><br># Convert yes/no to true/false for the GitHub API<br>if [ “$repo_private” = “yes” ]; then<br> repo_private=”true”<br>else<br> repo_private=”false”<br>fi<br><br># Set your GitHub personal access token here<br>GITHUB_TOKEN=”YOUR_GITHUB_TOKEN”<br># GitHub API URL<br>API_URL=&#39;https://api.github.com/user/repos&#39;<br><br># Make the API call to create the repository<br>curl -X POST $API_URL \<br> -H “Accept: application/vnd.github+json” \<br> -H “Authorization: Bearer $GITHUB_TOKEN” \<br> -H “Content-Type: application/json” \<br> -d “{\”name\”: \”$repo_name\”, \”description\”: \”$repo_description\”, \”private\”: $repo_private}”<br><br># Check if the repository was created successfully<br>if [ $? -eq 0 ]; then<br> echo “Repository ‘$repo_name’ created successfully.”<br>else<br> echo “Failed to create the repository.”<br>fi</pre><p>4. <strong>Save and Close:</strong> After pasting and possibly modifying the script, save and exit your editor. In the editor, you can do this by pressing ctlr+o, enter, and then ctlr+x.</p><p>5. <strong>Make the Script Executable:</strong> Before using the script, you need to grant execution permissions. In the terminal, type:</p><pre><br>chmod +x create_github_repo.zsh</pre><h4>Step 2: Integrating the Script into Your Shell Environment</h4><p>To run the script with a single word, create an alias in your .zshrcfile.</p><p>1. <strong>Edit .zshrc</strong>: Open your `.zshrc` for editing:</p><pre>nano ~/.zshrc</pre><p>2. <strong>Add an Alias:</strong> Add a new line to create an alias for your script. For example:</p><pre>alias crgit=’/path/to/create_github_repo.zsh’ <br> <br> Replace `/path/to/` with the actual path to your script.</pre><p>3. <strong>Apply Changes:</strong> Source your .zshrc to apply the changes:</p><pre>source ~/.zshrc</pre><h4>Step 3: Running Your Script</h4><p>Now, you can initiate the creation of a GitHub repository with a simple command. If you went with the alias method, you’d type:</p><pre>crgit</pre><p><strong>Conclusion</strong></p><p>By following these steps, you have not only automated the creation of GitHub repositories but also integrated this functionality seamlessly into your zsh environment. This process exemplifies the power of shell scripting combined with thoughtful shell customization, showcasing how even complex tasks can be simplified to a single command, boosting your efficiency and streamlining your development workflow.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f92573340e8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to setup/install gnome-tweak-tool for Kali]]></title>
            <link>https://medium.com/@greenboyroshan/how-to-setup-install-gnome-tweak-tool-for-kali-c5341e288106?source=rss-ab25a2d33674------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5341e288106</guid>
            <category><![CDATA[kali-linux]]></category>
            <category><![CDATA[gnome]]></category>
            <dc:creator><![CDATA[roshanadhikari]]></dc:creator>
            <pubDate>Wed, 01 Apr 2020 05:26:42 GMT</pubDate>
            <atom:updated>2024-02-11T21:16:33.370Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to install gnome-tweak-tool in Kali Linux</h3><pre>Package gnome-tweak tool is not available, but is referred to by another package<br>This may mean that the package is missing, has been obsoleted, or is only<br>available from another source.<br>E: Package &#39;gnome-tweak-tool&#39; has no installation candidate</pre><p>The above message is what you&#39;ll hit at first when you use the following command</p><p>dev@localhost:-$ sudo apt-get install gnome-tweak-tool</p><p>This shows up when your sources.list file doesn’t have the correct source list and is unable to locate the packages. So, initially, we have to update the list file,</p><p>Make sure your <em>host</em> is working fine and service is known so, in the terminal window we’ll go to the path <em>/etc/hosts</em></p><p>Add the following command to write the <em>host</em> file,</p><p>dev@localhost:-$ sudo nano /etc/hosts</p><p>and then add the localhost.localdomain localhostin the first line of the text file Your file should look like the below image.</p><p>To save the file press CLTR+X and Y</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*992NIOhbtZTvpOerwnmy_Q.png" /></figure><p>After you are done editing the host file then we’ll have to update the sources.list ,</p><p>So in your terminal use the following command.</p><p>dev@localhost:-$ echo “deb <a href="http://http.kali.org/kali">http://http.kali.org/kali</a> kali-rolling main non-free contrib” | sudo tee /etc/apt/sources.list</p><p>Lastly, update the package manager.</p><p>dev@localhost:-$sudo apt-get update</p><p>Now, taking as everything went well the install command is definite to work without any issues..</p><p>dev@localhost:-$sudo apt-get install gnome-tweak-tool</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5341e288106" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating User SignIn and SignUp in Rails 6 using gem “Devise” PART-I]]></title>
            <link>https://medium.com/@greenboyroshan/creating-user-signin-and-signup-in-rails-6-using-gem-devise-part-i-334745e4cd9b?source=rss-ab25a2d33674------2</link>
            <guid isPermaLink="false">https://medium.com/p/334745e4cd9b</guid>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[devise]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <dc:creator><![CDATA[roshanadhikari]]></dc:creator>
            <pubDate>Sun, 29 Sep 2019 16:05:02 GMT</pubDate>
            <atom:updated>2024-02-11T08:40:03.613Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*8_OjwkUoUAf5tlP7Z6oApg.png" /><figcaption>figlet tool used</figcaption></figure><p>It&#39;s a bit cumbersome to start with Railsat the beginning, but don’t worry by the time you get fluent with the Ruby and Rails framework your head will draw every design for you. Let’s start with creating user authentication in the Rails framework. Make sure you have set up your terminal.</p><p>Open your terminal and start with the directory you want to work for your project.</p><pre>~ rails new new_app -d postgresql </pre><p>you might wonder with the initial codes, -d → database “ #we are setting our database.</p><p>Then dive into your project ~cd new_app<em> </em>in the terminal. You might need to drag your project directory into your favorite IDE. Go into your Gemfile and add the following code. Don’t worry we are just installing the device. If you want to hear more about it then follow this link. <a href="https://github.com/plataformatec/devise">https://github.com/plataformatec/devise</a></p><pre>gem &#39;devise&#39; </pre><p>Then type Bundle in your terminal. It will install all the dependencies for the devise. Now let’s add a basic installer for devise. This will generate all required initializers. You’ll see basic instruction texts in the terminal window after the completion of the following command.</p><pre>~ rails g devise:install</pre><p>Among some instructions, you’ll need to add the following code to app/views/layouts/application.html.erb, make sure it&#39;s above &lt;%= yield %&gt;</p><pre>&lt;p class = &quot;notice&quot; &gt;&lt;%= notice %&gt; &lt;/p&gt;<br>&lt;p class = &quot;alert&quot; &gt;&lt;%= alert %&gt;&lt;/p&gt;</pre><p>Now let’s create our user accounts. The following code will generate a model for devise</p><pre>~ rails g devise User</pre><p>Now, let&#39;s create views for the devise, don’t worry about so many firm codes, the following code will generate all the views files of devise, since all such modules are packed inside the gem file of devise. We will generate views files for further customization.</p><pre>~ rails g devise:views</pre><p>Now we’ll create controller files for our pages,</p><pre>~ rails g controller pages home</pre><p>Let’s set up our database for a while.</p><pre>~ rake db:create</pre><p>now we have created our database, let&#39;s migrate the files into our database,</p><pre>~ rake db:migrate</pre><p>Open your routes.rb<em>. Refactor the following code</em></p><p>get ‘pages/home’</p><pre>root &#39;pages#home&#39;</pre><p>just remove get ‘pages/home’ it and make it the root ‘pages#home’</p><p>Now assuming everything worked at your desk too, by hitting</p><pre>~ rails s </pre><p>we’ll have a basic front page on our localhost:3000</p><p>Now, we’ll work to set our homepage, go into the file home.html.erb.</p><p><em>CLTR + P</em> can also be used to bring a search bar to look at pages inside the directory. It will be a bit shortcut.</p><p>Now inside our home.html.erb get rid of the codes inside the file<em> </em>and add the following codes.</p><pre>&lt;% if current_user %&gt; <br>&lt;%= link_to &quot;Sign Out&quot;, destroy_user_registration_path, method: : delete %&gt;<br>else<br>&lt;%= link_to &quot;Sign In&quot;, new_user_session_path %&gt;<br>&lt;%= link_to  &quot;Sign Up&quot;, new_user_registration_path %&gt;<br>&lt;% end %&gt; </pre><p>those paths are the helpers defined by the devise.</p><p>Part 2 . Soon</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=334745e4cd9b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Variables and Self in Ruby]]></title>
            <link>https://medium.com/@greenboyroshan/variables-in-ruby-f01756c2cac4?source=rss-ab25a2d33674------2</link>
            <guid isPermaLink="false">https://medium.com/p/f01756c2cac4</guid>
            <dc:creator><![CDATA[roshanadhikari]]></dc:creator>
            <pubDate>Tue, 24 Sep 2019 12:56:10 GMT</pubDate>
            <atom:updated>2024-02-11T08:35:56.062Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*tiXdRGkPdfYYpuvrsnmqWA.png" /><figcaption>figlet used for the text creation</figcaption></figure><p>The variables in rubyat the start can be quite a difficult thing to grasp. Simply know that variables are something that can store or hold the data in the program. Variablescan be called anywhere inside the program with definite privileges.</p><pre>box = “ I Love Apples”<br>puts box</pre><pre>#Output:- “ I love Apples”</pre><p>Things to remember …</p><ul><li>variables stores passed values,</li><li>They are memory location,</li><li>They can hold any data to be used in programs.</li></ul><h4>Types</h4><p>While learning Ruby you will encounter the symbols $, @, @@@. A brief understanding of them is written below but before that, you should have a hard concept of how OOP works.</p><p><strong>Ruby Global Variables</strong></p><p>Global variablesstarts with $. If we have not initialized the global variable then the value will store nil. <em>Class variables</em> won’t be available across classes, so we have the use of a global variable to make a single variable accessible across the classes. Usually, global variables aren’t recommended. The variable can be altered and can be confusing while securing the heavy applications. It can mess up with overriding. Any function called upon that program can override it and other functions using it will also face with redesigned value of a global variable.</p><p><em>It’s like whether you want a public space to live in or have your own space.</em></p><p><strong>Ruby Class Variables</strong></p><p>They always start with @@ a sign. Class variablesare shared across the subclasses of the class. If not initialized then it will result in error. In short it’s also a kind of global variablewithin the class only. If we want to refer to it then the same class variable syntax should be followed.</p><p><strong>Ruby Instance Variables</strong></p><p>They start with @sign. They are the most common symbol. You won’t have the problem of getting stepped over with it. Each subclass can configure its variable. As with classand globalthey aren’t shared with other sub-classes or attributes. They change from object to object.</p><p><strong>Lastly, local variables</strong></p><p>They always start with lowercase or underscore as the uppercased variables are considered to be constant. They are called localfor a reason as they are only accessible within the block where they are initialized.</p><h3>SELF in Ruby</h3><p>Self refers to the current object. selfin ruby when called gives you access to that referred object. If we are using it with methods then it refers to that method and defines it, while using it with class will refer to the elements of class.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f01756c2cac4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>