<?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 Keshav Agrawal on Medium]]></title>
        <description><![CDATA[Stories by Keshav Agrawal on Medium]]></description>
        <link>https://medium.com/@keshavagrawal?source=rss-5fae4b757268------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*P6DldlhIvqFGz8AQ-w0SGg.jpeg</url>
            <title>Stories by Keshav Agrawal on Medium</title>
            <link>https://medium.com/@keshavagrawal?source=rss-5fae4b757268------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 20:46:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@keshavagrawal/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[Building a HIPAA-Grade Audit Logging System: Lessons from the Healthcare Trenches]]></title>
            <link>https://medium.com/@keshavagrawal/building-a-hipaa-grade-audit-logging-system-lessons-from-the-healthcare-trenches-d5a8bb691e3b?source=rss-5fae4b757268------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5a8bb691e3b</guid>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[hipaa]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[audit]]></category>
            <dc:creator><![CDATA[Keshav Agrawal]]></dc:creator>
            <pubDate>Wed, 22 Oct 2025 17:36:25 GMT</pubDate>
            <atom:updated>2025-10-22T18:16:07.797Z</atom:updated>
            <content:encoded><![CDATA[<p>A proof-of-concept demonstrating how to build an immutable, cryptographically-secured audit trail that can withstand HIPAA audits and legal discovery</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GBf6mRiMG8w8q_2FN9wYqg.png" /></figure><h3><strong>The $1.25 Million Wake-Up Call</strong></h3><p>When Banner Health, one of the largest nonprofit health systems in the U.S., suffered a ransomware attack in 2016 affecting <strong>2.9 million patients</strong>, the real damage wasn’t just the breach itself — it was what happened during the investigation.</p><p>In 2023, the Office for Civil Rights (OCR) imposed a <strong>$1.25 million settlement</strong>, and the core issue wasn’t the attack, but Banner’s <strong>inability to audit what happened</strong>.</p><blockquote>“A lack of access controls and regular review of audit logs helps hackers or malevolent insiders to cover their electronic tracks, making it difficult for covered entities to not only recover from breaches, but to prevent them before they happen.” — OCR Acting Director Robinsue Frohboese</blockquote><p>Banner Health isn’t alone. Memorial Healthcare faced similar issues when 115,000 patients were affected by employee access violations. OCR found that Memorial had “<strong>failed to implement procedures to regularly review records of information system activity such as audit logs.”</strong></p><p>These cases reveal a critical truth: <strong>HIPAA’s audit controls don’t just require logging — they require comprehensive, tamper-evident audit systems</strong> that can reconstruct exactly what happened, when, and by whom.</p><h4><strong>Beyond Traditional Logging: The Technical Challenge</strong></h4><p>Healthcare systems face unique audit requirements that go far beyond typical application logging:</p><p><strong>Legal Requirements:<br></strong>- <strong>HIPAA § 164.312(b)</strong>: Hardware, software, and procedural mechanisms for recording access to PHI<br>- <strong>21 CFR Part 11</strong>: FDA requirements for electronic records (pharmaceuticals)<br>- <strong>SOX compliance</strong>: For public healthcare companies<br>- <strong>State breach notification laws</strong>: Requiring detailed forensic capabilities</p><p><strong>Technical Challenges<br></strong>- <strong>Immutability:</strong> Logs must be tamper-evident<br>- <strong>Completeness:</strong> No gaps in the audit trail<br>- <strong>Performance:</strong> Sub-millisecond overhead on critical paths<br>- <strong>Scalability:</strong> Handle millions of transactions daily<br>- <strong>Retention:</strong> 6+ years for HIPAA, longer for research data</p><h4><strong>The Architecture: Event-Driven Audit with Cryptographic Integrity</strong></h4><p>Here is a proof-of-concept system that combines <strong>event sourcing,</strong> <strong>temporal data modeling,</strong> and <strong>blockchain-inspired hash chaining</strong> to demonstrate how organizations can create audit trails that withstand both technical and legal scrutiny.</p><h4>System Overview</h4><pre>Application → Kafka Topic → Consumer → PostgreSQL<br>    ↓           ↓             ↓           ↓<br> Producer   Avro Events   Processor   Audit Chain</pre><p>The system consists of four key components:</p><p>1. <strong>Event Inbox</strong> (Idempotency)<br>2. <strong>Temporal Tables</strong> (Complete History)<br>3. <strong>Current Views</strong> (Performance)<br>4. <strong>Audit Ledger</strong> (Hash Chain)</p><p><em>Want to jump in on the </em><a href="https://github.com/keshavagrawal89/health-audit-poc"><em>https://github.com/keshavagrawal89/health-audit-poc</em></a></p><h4><strong>The Four Pillars of Compliance</strong></h4><h4><strong>1. Idempotency: Exactly-Once Processing</strong></h4><p>In healthcare, duplicate processing can be catastrophic. Consider a medication dosage adjustment — processing the same event twice could double a patient’s dose.</p><pre>-- Before any business logic<br>SELECT 1 FROM app.event_inbox WHERE event_id = ?<br>IF FOUND THEN SKIP -- Already processed<br>ELSE<br>  INSERT INTO event_inbox(event_id, checksum) VALUES (?, ?)<br>  -- Proceed with business logic<br>END</pre><p><strong>Legal Impact</strong>: Prevents duplicate charges, medication errors, and provides clear evidence of processing intent during litigation.</p><h4><strong>2. Temporal Data: Complete Historical Lineage</strong></h4><p>Healthcare data changes over time, but regulations require maintaining complete history. Traditional UPDATE statements destroy previous versions—unacceptable for HIPAA compliance.</p><pre>-- Temporal model: Never UPDATE, always INSERT new versions<br>CREATE TABLE appointments (<br>  id UUID NOT NULL,<br>  patient_id UUID NOT NULL,<br>  status TEXT NOT NULL,<br>  version INT NOT NULL,<br>  valid_from TIMESTAMPTZ NOT NULL DEFAULT now(),<br>  valid_to TIMESTAMPTZ,  -- NULL = current version<br>  PRIMARY KEY (id, version)<br>);</pre><p><strong>Example Timeline</strong>:</p><pre>Version 1: scheduled   (09:00) ──┬─ valid_from: 09:00<br>                                 └─ valid_to: 10:30<br><br>Version 2: confirmed   (10:30) ──┬─ valid_from: 10:30<br>                                 └─ valid_to: 14:15<br><br>Version 3: completed   (14:15) ──┬─ valid_from: 14:15<br>                                 └─ valid_to: NULL (current)</pre><p><strong>Legal Impact</strong>: Enables “time travel” queries for any point in history, crucial for malpractice defense and regulatory compliance.</p><h4><strong>3. Hash-Chained Audit: Cryptographic Tamper Evidence</strong></h4><p>Traditional logs can be modified. Our hash-chained audit ledger makes tampering <strong>mathematically detectable</strong>:</p><pre>-- Each audit record links to the previous via cryptographic hash<br>CREATE TABLE audit.ledger (<br>  seq BIGSERIAL PRIMARY KEY,<br>  table_name TEXT NOT NULL,<br>  row_pk TEXT NOT NULL,<br>  op TEXT NOT NULL,        -- INSERT/UPDATE/DELETE<br>  row_after JSONB NOT NULL, -- Complete row data<br>  prev_hash TEXT,          -- Links to previous record<br>  self_hash TEXT NOT NULL, -- SHA-256 of this record<br>  at TIMESTAMPTZ DEFAULT now()<br>);</pre><p><strong>Hash Chain Logic</strong>:</p><pre>Record 1: prev_hash = NULL,     self_hash = SHA256(&quot;&quot; + data1)<br>Record 2: prev_hash = hash1,    self_hash = SHA256(hash1 + data2)<br>Record 3: prev_hash = hash2,    self_hash = SHA256(hash2 + data3)</pre><p><strong>Legal Impact</strong>: Provides cryptographic proof that audit records haven’t been modified, crucial for evidence admissibility in court.</p><h4>4. Automatic Audit Triggers: Zero-Trust Logging</h4><p>Manual logging is unreliable and can be bypassed. Database triggers ensure <strong>every</strong> data modification is audited:</p><pre>CREATE OR REPLACE FUNCTION audit.write_ledger()<br>RETURNS TRIGGER AS $$<br>DECLARE<br>  _row JSONB;<br>  _prev TEXT;<br>  _self TEXT;<br>BEGIN<br>  -- Capture complete row data<br>  _row := to_jsonb(COALESCE(NEW, OLD));<br><br>  -- Get previous hash for chaining<br>  SELECT self_hash INTO _prev FROM audit.ledger<br>  WHERE table_name = TG_TABLE_NAME AND row_pk = _row-&gt;&gt;&#39;id&#39;<br>  ORDER BY seq DESC LIMIT 1;<br><br>  -- Compute new hash<br>  _self := audit.hash_row(_prev, TG_TABLE_NAME, _row-&gt;&gt;&#39;id&#39;, TG_OP, _row);<br><br>  -- Insert audit record<br>  INSERT INTO audit.ledger(table_name, row_pk, op, row_after, prev_hash, self_hash)<br>  VALUES (TG_TABLE_NAME, _row-&gt;&gt;&#39;id&#39;, TG_OP, _row, _prev, _self);<br><br>  RETURN COALESCE(NEW, OLD);<br>END;<br>$$ LANGUAGE plpgsql;</pre><h3>Real-World Data Flow: A Patient Appointment</h3><p>Let’s trace a healthcare event through our system:</p><h4>Step 1: Event Generation</h4><pre>{<br>  &quot;event_id&quot;: &quot;019a0c25-b0d2-75c5-91b3-52a0ffad293a&quot;,<br>  &quot;event_type&quot;: &quot;AppointmentStatusChanged&quot;,<br>  &quot;patient_id&quot;: &quot;019a0c25-0000-7000-8000-000000000001&quot;,<br>  &quot;appointment_id&quot;: &quot;019a0c25-1000-7000-8000-000000000001&quot;,<br>  &quot;old_status&quot;: &quot;scheduled&quot;,<br>  &quot;new_status&quot;: &quot;completed&quot;,<br>  &quot;changed_by&quot;: &quot;dr_smith_001&quot;,<br>  &quot;occurred_at&quot;: &quot;2025-10-22T14:30:00Z&quot;,<br>  &quot;phi_access_reason&quot;: &quot;patient_care&quot;<br>}</pre><h4>Step 2: Idempotency Check</h4><pre>-- Consumer checks: Have we seen this event?<br>SELECT 1 FROM app.event_inbox<br>WHERE event_id = &#39;019a0c25-b0d2-75c5-91b3-52a0ffad293a&#39;<br>-- Result: No rows (new event)<br><br>-- Mark as processing<br>INSERT INTO app.event_inbox(event_id, checksum)<br>VALUES (&#39;019a0c25-b0d2-75c5-91b3-52a0ffad293a&#39;, &#39;sha256_hash&#39;)</pre><h4>Step 3: Temporal Update</h4><pre>-- Close current version<br>UPDATE app.appointments SET valid_to = now()<br>WHERE id = &#39;019a0c25-1000-7000-8000-000000000001&#39;<br>AND valid_to IS NULL;<br><br>-- Insert new version<br>INSERT INTO app.appointments(id, patient_id, status, version, valid_from)<br>VALUES (&#39;019a0c25-1000-7000-8000-000000000001&#39;, ..., &#39;completed&#39;, 2, now());</pre><h4>Step 4: Automatic Audit (Triggered)</h4><pre>-- Trigger fires automatically, creates audit record<br>INSERT INTO audit.ledger(table_name, row_pk, op, row_after, prev_hash, self_hash)<br>VALUES (<br>  &#39;appointments&#39;,<br>  &#39;019a0c25-1000-7000-8000-000000000001&#39;,<br>  &#39;INSERT&#39;,<br>  &#39;{&quot;id&quot;:&quot;019a0c25-1000-...&quot;,&quot;status&quot;:&quot;completed&quot;,&quot;version&quot;:2}&#39;,<br>  &#39;abc123def456...&#39;,  -- Previous record&#39;s hash<br>  &#39;def456ghi789...&#39;   -- New hash linking to previous<br>);</pre><h4>Step 5: Verification</h4><pre>$ python3 services/auditor/verify_audit_chain.py<br>2025-10-22 14:30:07 INFO auditor - Audit chain valid: True (rows=147)</pre><h3>HIPAA Compliance Mapping</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uqgP4kYfofzoxrcEItmKgQ.png" /></figure><h3>Lawsuit-Proofing: When Lawyers Come Knocking</h3><p>When facing federal investigations or class-action lawsuits, our system provides critical advantages:</p><h4>Completeness: No Missing Data</h4><ul><li><strong>Traditional Problem</strong>: “We can’t find the logs for that time period”</li><li><strong>Our Solution</strong>: Cryptographic chain proves no records were deleted</li><li><strong>Legal Impact</strong>: No spoliation sanctions</li></ul><h4>Integrity: Tamper-Evident Records</h4><ul><li><strong>Traditional Problem</strong>: “How do we know these logs weren’t modified?”</li><li><strong>Our Solution</strong>: Hash chain makes tampering mathematically detectable</li><li><strong>Legal Impact</strong>: Expert testimony on cryptographic integrity</li></ul><h4>Temporal Precision: Point-in-Time Reconstruction</h4><ul><li><strong>Traditional Problem</strong>: “What did the system show at 2:47 PM on March 15th?”</li><li><strong>Our Solution</strong>: Temporal queries to exact microsecond</li><li><strong>Legal Impact</strong>: Precise timeline reconstruction for malpractice defense</li></ul><h4>Automated Generation: No Human Error</h4><ul><li><strong>Traditional Problem</strong>: “The administrator forgot to enable logging”</li><li><strong>Our Solution</strong>: Database triggers ensure comprehensive coverage</li><li><strong>Legal Impact</strong>: Eliminates gross negligence claims</li></ul><h3>Performance at Scale</h3><p>Healthcare systems can’t sacrifice performance for compliance. This POC demonstrates optimizations achieving sub-millisecond overhead:</p><h4>Database Optimizations</h4><pre>-- Partitioned audit table for time-based queries<br>CREATE TABLE audit.ledger_2025_10 PARTITION OF audit.ledger<br>FOR VALUES FROM (&#39;2025-10-01&#39;) TO (&#39;2025-11-01&#39;);<br><br>-- Partial indexes for hot queries<br>CREATE INDEX CONCURRENTLY idx_audit_recent<br>ON audit.ledger (table_name, row_pk, at)<br>WHERE at &gt; now() - interval &#39;7 days&#39;;</pre><h4>POC Performance Observations</h4><ul><li><strong>Write latency</strong>: Sub-millisecond overhead in local testing</li><li><strong>Audit overhead</strong>: Minimal impact on transaction processing</li><li><strong>Storage efficiency</strong>: Effective compression with JSONB</li><li><strong>Query performance</strong>: Fast temporal queries with partitioning</li></ul><h3>Beyond Healthcare: Universal Audit Patterns</h3><p>While designed for HIPAA, these patterns apply to any regulated industry:</p><h4>Financial Services</h4><ul><li><strong>SOX compliance</strong>: Section 404 internal controls</li><li><strong>PCI DSS</strong>: Payment card data audit trails</li><li><strong>GDPR</strong>: Article 30 records of processing activities</li></ul><h4>Government/Defense</h4><ul><li><strong>FedRAMP</strong>: Audit and accountability controls</li><li><strong>NIST 800–53</strong>: AU family (Audit and Accountability)</li><li><strong>Common Criteria</strong>: Security audit requirements</li></ul><h3>Technical Implementation</h3><h4>Complete Setup</h4><pre># Complete setup<br>docker compose up -d<br>bash ops/setup-all.sh<br><br># Run demo<br>python3 services/producer/produce_events.py<br>python3 services/consumer/consume_events.py<br>python3 services/auditor/verify_audit_chain.py</pre><h4>Key Files</h4><ul><li>db/02_audit.sql: Hash-chained audit ledger implementation</li><li>db/03_temporal.sql: Temporal table functions and views</li><li>services/consumer/consume_events.py: Idempotent event processing</li><li>services/auditor/verify_audit_chain.py: Cryptographic verification</li><li>ops/clean-slate.sh: Demo reset for reproducible testing</li></ul><h3>References</h3><ol><li><strong>Banner Health Settlement</strong>: U.S. Department of Health and Human Services, Office for Civil Rights. “Banner Medical Center Agrees to $1.25 Million Settlement.” <a href="https://www.hhs.gov/hipaa/for-professionals/compliance-enforcement/agreements/banner/index.html">HHS.gov</a></li><li><strong>HIPAA Security Rule</strong>: 45 CFR §164.312(b) — Audit Controls. <a href="https://www.ecfr.gov/current/title-45/subtitle-A/subchapter-C/part-164/subpart-C/section-164.312">eCFR.gov</a></li><li><strong>Memorial Healthcare Case</strong>: OCR Resolution Agreement with Memorial Healthcare. <a href="https://www.hhs.gov/hipaa/for-professionals/compliance-enforcement/agreements/memorial/index.html">HHS.gov</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5a8bb691e3b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why REST BFF Patterns Beat GraphQL (When They Should): A Practical Field Guide]]></title>
            <link>https://medium.com/@keshavagrawal/why-rest-bff-patterns-beat-graphql-when-they-should-a-practical-field-guide-970db1526322?source=rss-5fae4b757268------2</link>
            <guid isPermaLink="false">https://medium.com/p/970db1526322</guid>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[graphql-vs-rest]]></category>
            <category><![CDATA[bff]]></category>
            <category><![CDATA[system-design-interview]]></category>
            <dc:creator><![CDATA[Keshav Agrawal]]></dc:creator>
            <pubDate>Sun, 21 Sep 2025 15:49:54 GMT</pubDate>
            <atom:updated>2025-09-22T14:11:42.688Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VEeReTCXYIVKMYKCR4zLfA.png" /><figcaption>Striking The Right Balance Is The Key. Know Your Usecase.</figcaption></figure><p>Every engineering team eventually faces the same question: <em>“Should we use GraphQL or just stick with REST?”</em><br>The arguments sound familiar - avoid over-fetching, get a single endpoint, speed up front-end teams.</p><p>Instead of debating in the abstract, let’s test this idea with a realistic system. An <strong>employee benefits (Ben Admin)</strong> portal makes a perfect case study: multiple services, lots of data to stitch together (profile + benefits + payroll), and plenty of sensitive information where predictability matters.</p><p>The experiment: <em>Can a simple REST BFF pattern deliver what most people reach for GraphQL to solve?</em></p><blockquote>Spoiler: yes — and usually with less complexity.</blockquote><p>A quick arch diagram of the simple flow(POC) we are trying to build here:</p><pre><br>┌─────────────────┐    ┌─────────────────┐<br>│  Admin Portal   │    │ Employee Portal │<br>│    (Vue.js)     │    │    (Vue.js)     │<br>└─────────┬───────┘    └─────────┬───────┘<br>          │                      │<br>          └──────────┬───────────┘<br>                     │<br>            ┌────────▼────────┐<br>            │   BFF Service   │  ← Smart REST patterns<br>            │    (FastAPI)    │<br>            │                 │<br>            │ /bff/employers/ │<br>            │ /bff/employees/ │<br>            └─────────┬───────┘<br>                      │<br>        ┌─────────────┼─────────────┐<br>        │             │             │<br>   ┌────▼────┐   ┌────▼────┐   ┌────▼────┐<br>   │Employee │   │Benefits │   │  Redis  │<br>   │Service  │   │Service  │   │ (Cache) │<br>   └────┬────┘   └────┬────┘   └─────────┘<br>        │             │<br>        └─────────────|<br>                      │             <br>                 ┌────▼────┐<br>                 │PostgreSQL│<br>                 └─────────┘</pre><h3>What REST BFF comfortably handles:</h3><ul><li><strong>Field Selection</strong> via ?fields=profile.name,benefits.active</li><li><strong>Composition</strong> (one endpoint, many services)</li><li><strong>Smart Caching</strong> (ETags, Cache-Control, 304s)</li><li><strong>Batching</strong> (multi-resource fan-out/fan-in)</li><li><strong>Graceful Errors</strong> (partial data + structured error objects)</li><li><strong>Type Safety</strong> (Pydantic models)</li></ul><blockquote>If your UI needs fixed, screen-shaped data and your clients are internal, <strong>REST BFF is often the shortest path to value.</strong></blockquote><h3>The GraphQL Hype vs. Reality</h3><h4>What teams hope to get</h4><ol><li>No over-fetching</li><li>One endpoint to rule them all</li><li>Client-driven selection</li><li>Strong typing</li><li>Real-time subscriptions</li></ol><h4>What they actually take on</h4><ol><li><strong>Extra moving parts</strong>: schemas, resolvers, gateways, query cost limits</li><li><strong>N+1 traps</strong> without careful data loaders</li><li><strong>Caching headaches</strong> (HTTP semantics don’t map cleanly)</li><li><strong>Security work</strong> (depth/complexity limits, query allow-lists)</li><li><strong>Learning curve</strong> that slows smaller teams</li></ol><blockquote>GraphQL is fantastic — when you truly need its flexibility. Otherwise, it can feel like bringing a Swiss Army chainsaw to butter toast.</blockquote><h3>REST BFF: The Practical Alternative</h3><h4>Field Selection (replacing GraphQL selection sets)</h4><p><strong>GraphQL:</strong></p><pre>query EmployeeDashboard {<br>  employee(id: &quot;EMP001&quot;) {<br>    profile { name email }<br>    benefits { active plans { planName } }<br>    notifications(urgent: true) { title }<br>  }<br>}</pre><p><strong>REST BFF:</strong></p><pre>GET /bff/employees/me/home?fields=profile.name,profile.email,benefits.active,benefits.plans.planName,notifications.urgent</pre><p><strong>Why it works</strong></p><ul><li><strong>Familiar HTTP</strong> (no new query language)</li><li><strong>Cache-friendly</strong> (ETags/304s work out of the box)</li><li><strong>Minimal tooling</strong> (curl/Postman/browsers just work)</li></ul><h3>Service Composition (replacing resolvers)</h3><p><strong>GraphQL Resolvers:</strong></p><pre>const resolvers = {<br>  Employee: {<br>    profile: (p) =&gt; profileService.get(p.id),<br>    benefits: (p) =&gt; benefitsService.get(p.id),<br>    notifications: (p) =&gt; notificationService.get(p.id),<br>  }<br>}</pre><p><strong>REST BFF:</strong></p><pre>@router.get(&quot;/me/home&quot;)<br>async def get_employee_home():<br>    composer = ServiceComposer()<br>    await asyncio.gather(<br>        composer.add_service_call(&quot;profile&quot;, employee_service.get_profile, emp_id),<br>        composer.add_service_call(&quot;benefits&quot;, benefits_service.get_benefits, emp_id),<br>        composer.add_service_call(&quot;notifications&quot;, notification_service.get_urgent, emp_id),<br>    )<br>    return composer.build()</pre><p><strong>Why it works</strong></p><ul><li><strong>Predictable performance</strong> (no hidden N+1)</li><li><strong>Clear error boundaries</strong></li><li><strong>Easy to trace</strong> (every hop is obvious in logs)</li></ul><h3>HTTP Caching (GraphQL’s Achilles’ heel)</h3><p><strong>GraphQL:</strong></p><pre># Similar queries, different selection sets → cache mismatch<br>query { employee(id: &quot;1&quot;) { name } }<br>query { employee(id: &quot;1&quot;) { name email } }</pre><p><strong>REST BFF:</strong></p><pre>GET /bff/employees/me/profile?fields=name<br># ETag: &quot;abc123&quot;, Cache-Control: max-age=300<br># If-None-Match: &quot;abc123&quot; → 304 Not Modified</pre><p><strong>Why it works</strong></p><ul><li><strong>Standards all the way down</strong> (CDNs, browsers, proxies)</li><li><strong>Predictable keys</strong> (URL + params)</li><li><strong>Less ceremony, more cache hits</strong></li></ul><h3>Partial Data + Structured Errors</h3><p><strong>GraphQL:</strong></p><pre>{<br>  &quot;data&quot;: { &quot;employee&quot;: { &quot;profile&quot;: { &quot;name&quot;: &quot;John&quot; }, &quot;benefits&quot;: null } },<br>  &quot;errors&quot;: [{ &quot;message&quot;: &quot;Benefits service down&quot;, &quot;path&quot;: [&quot;employee&quot;,&quot;benefits&quot;] }]<br>}</pre><p><strong>REST BFF:</strong></p><pre>{<br>  &quot;data&quot;: {<br>    &quot;profile&quot;: { &quot;name&quot;: &quot;John&quot; },<br>    &quot;benefits&quot;: null<br>  },<br>  &quot;errors&quot;: [<br>    {<br>      &quot;code&quot;: &quot;BENEFITS_SERVICE_DOWN&quot;,<br>      &quot;message&quot;: &quot;Benefits data temporarily unavailable&quot;,<br>      &quot;path&quot;: &quot;benefits&quot;,<br>      &quot;details&quot;: { &quot;service&quot;: &quot;benefits-service&quot;, &quot;retry_after&quot;: 30 }<br>    }<br>  ]<br>}</pre><blockquote>Users see what’s available. Engineers see exactly what broke. Everybody wins.</blockquote><h3>Real-World Examples</h3><h4>1. Employee Dashboard</h4><p><strong>Story:</strong> Show profile, benefits, urgent notifications.</p><p><strong>REST BFF call:</strong></p><pre>GET /bff/employees/me/home?fields=profile.name,profile.email,benefits.totalMonthlyCost,notifications.urgent</pre><p><strong>Response(client-shaped):</strong></p><pre>{<br>  &quot;data&quot;: {<br>    &quot;profile&quot;: { &quot;name&quot;: &quot;John Smith&quot;, &quot;email&quot;: &quot;john@company.com&quot; },<br>    &quot;benefits&quot;: { &quot;totalMonthlyCost&quot;: 450.0 },<br>    &quot;notifications&quot;: [{ &quot;title&quot;: &quot;Review Due&quot;, &quot;urgent&quot;: true, &quot;createdAt&quot;: &quot;2024-01-15T09:00Z&quot; }]<br>  },<br>  &quot;meta&quot;: {<br>    &quot;composed_at&quot;: &quot;2024-01-15T10:30:00Z&quot;,<br>    &quot;services_called&quot;: [&quot;employee-service&quot;,&quot;benefits-service&quot;],<br>    &quot;cache_ttl&quot;: 60<br>  }<br>}</pre><h4>2. HR Analytics</h4><p><strong>Story:</strong> Company-wide headcount, payroll, benefits utilization.</p><p><strong>REST BFF call:</strong></p><pre>GET /bff/employers/analytics?period=30d&amp;fields=headcount_trends,salary_analytics</pre><p><strong>Highlights</strong></p><ul><li>Purpose-built HR endpoint</li><li>Pre-aggregated data for performance</li><li>Simple cache keys (period=30d)</li></ul><h3>Performance Snapshot</h3><p>(50 requests, 10 concurrent) excuse my system under load :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4HT_S67CzDbMg_RPrRqgZA.png" /><figcaption>Minimal Local Mac Load Testing</figcaption></figure><h3>Trade-offs (because reality)</h3><h4>REST BFF Strengths</h4><ul><li><strong>Low lift</strong>: HTTP/JSON everyone knows</li><li><strong>Caching that actually caches</strong></li><li><strong>Operational clarity</strong> (tracing, circuit breakers)</li><li><strong>Perfect for internal apps</strong> with stable screens</li></ul><h4>GraphQL Strengths</h4><ul><li><strong>Client freedom</strong> (ad-hoc graphs, many frontends)</li><li><strong>Schema/introspection</strong> for large API surfaces</li><li><strong>Subscriptions</strong> for heavy real-time apps</li></ul><blockquote>Rule of thumb: <strong>If your UI screens are known and stable, you don’t need client-authored queries.</strong></blockquote><h3>Implementation Sketch</h3><p>Screen-shaped endpoints</p><pre>GET /bff/customers/me/dashboard<br># Returns: profile + recent_orders + saved_addresses</pre><p>Field selection</p><pre>if fields:<br>    data = apply_field_selection(data, fields)</pre><p>Smart caching</p><pre>if request.headers.get(&quot;if-none-match&quot;) == etag:<br>    return Response(status_code=304)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qGz8dicNoC4-YLxLoLiwog.png" /></figure><p>Graceful composition</p><pre>await asyncio.gather(profile(), benefits(), notifications())</pre><h3>When to Reach for GraphQL</h3><ol><li><strong>Wildly diverse clients</strong> with unpredictable data shapes</li><li><strong>Public APIs</strong> where flexibility is the product</li><li><strong>Heavy real-time</strong> (subscriptions everywhere)</li><li><strong>Graph-y domains</strong> (social graphs, recommendations)</li><li><strong>Schema-first culture</strong> with strong tooling appetite</li></ol><p>Otherwise, your team likely ships faster with <strong>REST BFF</strong>.</p><p>Code is hosted <a href="https://github.com/keshavagrawal89/rest-based-bff">here</a>.</p><h3>Give it a try!</h3><pre>git clone git@github.com:keshavagrawal89/rest-based-bff.git<br>cd rest-based-bff<br>docker compose up -d<br><br>curl &quot;http://localhost:8100/bff/employees/me/home?fields=profile.name,benefits.active&quot;<br>curl &quot;http://localhost:8100/bff/employers/dashboard?fields=stats,alerts&quot;</pre><p>Here are some quick HR Admin Portal, Employee Portal and ETag Caching screengrabs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zmvKt6edJGg60XAvM-ArCQ.gif" /><figcaption>HR Admin Dashboard | REST BFF</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RbDMN8U3r5tHL6aqfkD6Sg.gif" /><figcaption>Employee Dashboard | REST BFF</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NvUp3WFLysAHn99B6Kq0aw.gif" /><figcaption>ETag caching | REST BFF</figcaption></figure><h3>Conclusion</h3><p>GraphQL is powerful. But most teams <strong><em>don’t need the bazooka.</em></strong><br>REST BFF patterns are the scalpel: sharp, reliable, and easy to wield.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=970db1526322" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Real-time Data Pipeline with Go, Kafka, ClickHouse, and Apache Superset]]></title>
            <link>https://medium.com/@keshavagrawal/building-a-real-time-data-pipeline-with-go-kafka-clickhouse-and-apache-superset-02a4d9c1529d?source=rss-5fae4b757268------2</link>
            <guid isPermaLink="false">https://medium.com/p/02a4d9c1529d</guid>
            <dc:creator><![CDATA[Keshav Agrawal]]></dc:creator>
            <pubDate>Thu, 18 Sep 2025 01:10:40 GMT</pubDate>
            <atom:updated>2025-09-18T01:10:40.386Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HkFEqPZ9w6sdwVpVHB6X6w.png" /></figure><p>In today’s data-driven world, the ability to process and analyze data in real-time is crucial for making timely decisions. Whether it’s for monitoring system performance, tracking user behavior, or analyzing financial markets, real-time data pipelines play a vital role.</p><p>In this blog, we’ll walk you through building a simple data pipeline using Go, Kafka, ClickHouse, and Apache Superset. Our goal is to demonstrate how you can generate both stream and batch data with Go, push it into Kafka queues, consume it with dedicated consumers, store it in ClickHouse, and finally visualize it with Apache Superset. By the end of this guide, you’ll have a fully functional data pipeline ready for real-time and batch data processing.</p><p>We’ll cover everything from setting up the environment and writing Go scripts to configuring Kafka, ClickHouse, and Superset. Let’s dive in and start building a data pipeline that can handle the demands of modern data processing.</p><p>Let’s have a quick look at what are we trying to build with the following flow diagram:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*18m7WkbzwsE9vvdPQtNoew.png" /></figure><p>Seems straightforward, doesn’t it? Indeed, it is — once you grasp the function of each component. From here on out, it’s all about diving into the setup and implementation process.</p><p>Setting Up the Environment ( For local testing — ofcourse it can be migrated to prod environment post few changes which is out of scope of this blog )</p><ol><li>Installation of Kafka</li><li>Installation of Clickhouse Opensource</li><li>Installation of Apache Superset.</li></ol><p><strong>Installation of Kafka:</strong> This is pretty straightforward and I m sure many of us here might already have this in our local system — either through Docker or through binary scripts. For now we can download the latest Kafka from and untar it in local. Post this all we need to do is to <a href="https://kafka.apache.org/downloads">https://kafka.apache.org/downloads</a> and untar it in local. Post this all we need to do is to:</p><ul><li>start the zookeeper(open a terminal and from inside the kafka directory run the following):</li></ul><pre>bin/zookeeper-server-start.sh config/zookeeper.properties</pre><ul><li>start the Kafka server(open a terminal and from inside the kafka directory run the following):</li></ul><pre>bin/kafka-server-start.sh config/server.properties</pre><ul><li>now we need to create the topics — one for stream data which would be receiving continuous data — high throughput — “<strong><em>stream-queue</em></strong>”. And one for batch data or lets say non-frequent data — “<strong><em>batch-queue</em></strong>”.</li></ul><pre>bin/kafka-topics.sh --create --topic stream-queue --bootstrap-server localhost:9092<br>bin/kafka-topics.sh --create --topic batch-queue --bootstrap-server localhost:9092</pre><p><strong>Installation of Clickhouse:</strong></p><p>Clickhouse provides an official docker image for <a href="https://hub.docker.com/r/clickhouse/clickhouse-server/">clickhouse server</a> . Now here we need to take notice of one thing that by default “ClickHouse will be accessible only via the Docker network.” So if all of your connected services are not inside one docker network(which in most cases wont be) — we need to define an explicit port while launching the clickhouse container:</p><pre>docker run -d -p 8123:8123 -p19000:9000 --name codemyles-clickhouse-server --ulimit nofile=262144:262144 clickhouse/clickhouse-server</pre><p>And done. You have a clickhouse server up and running. Want to test it? Clickhouse Docker image comes with clickhouse-client already installed. So all we need to do is to run the following command to verify:</p><pre>docker exec -it codemyles-clickhouse-server clickhouse-client</pre><p>If it opens up a shell with a smiley(quite literally — “:)”) then we are good to go! Let’s move on to our next and last candidate for installation — <strong>Apache superset.</strong></p><p><strong>Installation of Apache Superset:</strong></p><p>We would be using Docker image provided by Apache Superset team but with a small change. By default apache doesn’t come with Clickhouse driver installed so we need to add it to the Dockerfile. Fret not, we got you covered. Just put the following in a file and name it `Clickhouse-Superset-Dockerfile`:</p><pre>FROM apache/superset<br># Switching to root to install the required packages<br>USER root<br>RUN pip install clickhouse-connect<br># Switching back to using the `superset` user<br>EXPOSE 8123<br>USER superset</pre><p>And post this all we need to do it is to build the image:</p><pre>docker build -t superset -f Clickhouse-Superset-Dockerfile</pre><p>And now lets bring the superset container up:</p><pre>docker run -d -p 8080:8088 -e &quot;SUPERSET_SECRET_KEY=your_secret_key_here&quot; --name superset-with-clickhouse superset</pre><p>Almost done. We need to run few of the commands post the container is up:</p><pre>docker exec -it superset superset fab create-admin \<br>              --username admin \<br>              --firstname Superset \<br>              --lastname Admin \<br>              --email admin@superset.com \<br>              --password admin<br>docker exec -it superset superset db upgrade<br>docker exec -it superset superset init</pre><p>We can verify the installation by doing login on the portal: <a href="http://localhost:8080/login/">http://localhost:8080/login/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9vKgRl8vTqM-SGddUBE1gA.png" /></figure><p>And now in our data pipeline setup, to simulate the behavior of multiple backend services pushing events data into Kafka we have written a simple golang script to help us generate a realtime data. This step mirrors real-world scenarios where various components of a system generate events continuously, providing valuable insights for monitoring, analysis, and decision-making.</p><p>This Go script is equipped with two distinct functionalities:</p><ol><li><strong>Stream Data Generation</strong></li><li><strong>Batch Data Generation</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ForEt_C5wpZ9DUvE7qKSoQ.png" /></figure><p>Complete code can be seen from the below link:<br><a href="https://codefile.io/f/C4em1aLNeL">https://codefile.io/f/C4em1aLNeL</a></p><p>All we need to do now is to run the above code in a terminal:<br>`go run main.go`</p><p>Now before we get to the Kafka consumers part we need to make sure our Clickhouse database has a valid table for our incoming data. So lets get back to our clickhouse-client which we discussed earlier and lets create a <strong><em>test</em></strong> database and a <strong><em>finance_data_kafka</em></strong> table:</p><pre>CREATE DATABASE test;<br>CREATE TABLE test.finance_data_kafka ( transaction_id String PRIMARY KEY, account_id String, transaction_date Date, transaction_time DateTime, transaction_amount Float64, transaction_type String, merchant_name String, merchant_category String, card_type String, card_network String );</pre><p>Great! Now we have a table ready to accept INSERTs. Lets fire up your favorite code editor and lets put golang workers and channels to work on different queues. This gives us the flexibility 1) to manage the speed and number of consumers based on the incoming throughput of the traffic, and 2) to do any kind of transformations we would like to do upon the incoming data.</p><p>Complete code file can be found on the below codefile link. While there are many ways to connect to clickhouse with golang sdk we opted to choose the native sql driver of golang and using <strong>http</strong> protocol for communication. One can definitely choose <strong>tcp</strong> protocol as well — details of the same could be found on the clickhouse documentation page.</p><p><a href="https://codefile.io/f/42TgecOMoT">https://codefile.io/f/42TgecOMoT</a></p><p>Here is how we are connecting to clickhouse:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eOa_3-cOzLdCrEdlqrLCdg.png" /></figure><p>And here is how we are launching our different set of workers for `stream-queue` and `batch-queue`:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*wTlfsQ_hP1tH5vJbwfbTUQ.png" /></figure><p>Again — one can launch the consumers based on the traffic and available CPU cores — but as of now this should serve our purpose. Details of streamConsumer and batchConsumer function can be found in the complete codefile link mentioned above.</p><p>So with this we are good to push sample data into Kafka, consume it and finally push it into Clickhouse. All we need now is to connect Apache Superset to clickhouse and build some dashboard. Well that is pretty straightforward:</p><ol><li>Login to superset. Find “Database Connections” under settings.</li><li>Find “+Database” button and lets choose “Clickhouse” from “Choose a Database” dropdown. Note: This is exactly why we added ‘pip install clickhouse-connect’ for our superset dockerfile.</li><li>Enter in database name as “test”. Leave username and password as blank.</li><li>Enter the IP of your host machine — which in this our scenario would be machine on which Clickhouse server docker container is running. Enter the port — remember to check this from the clickhouse docker run command which we ran earlier.</li><li>And we are done!</li></ol><p>Time to dive into chart creation. Crafting charts is a breeze, all thanks to the intuitive Apache Superset UI. There’s just one golden rule to keep in mind: avoid premature aggregation unless you intend to perform further analysis. Why? Well, Superset empowers you to select aggregation functions directly on the dataset (for us, the raw table from ClickHouse, but one can run even a custom query), shaping how data is visualized on the chart.</p><p>For instance, if you’re interested in tracking the influx of transactions every 5 minutes, there’s no need to pre-aggregate by timestamp(GROUP BY?). Instead, define these aggregations seamlessly while configuring the chart in Superset. Ready to explore? Go ahead, give it a try!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kxKkeZz2WC7VRmtTRyXoQA.png" /></figure><p>While the setup may appear deceptively simple, the combination of ClickHouse’s robust ingestion capabilities, the efficiency of GoLang workers and channels as potent data consumers, and Apache Superset’s analytical prowess render this entire setup highly scalable. This means that as your data needs grow, this pipeline can effortlessly accommodate increasing volumes and complexity, ensuring that your analytics infrastructure remains agile and responsive to evolving business requirements. With scalability at its core, this data pipeline is poised to grow alongside your organization, empowering you to unlock deeper insights and drive informed decision-making at scale.</p><p>So, roll up your sleeves, experiment, and let your data pipeline pave the way for a data-driven future. Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=02a4d9c1529d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding NLP and GPT: The Core Differences and Synergies]]></title>
            <link>https://medium.com/@keshavagrawal/understanding-nlp-and-gpt-the-core-differences-and-synergies-0c4adbe440a7?source=rss-5fae4b757268------2</link>
            <guid isPermaLink="false">https://medium.com/p/0c4adbe440a7</guid>
            <dc:creator><![CDATA[Keshav Agrawal]]></dc:creator>
            <pubDate>Thu, 18 Sep 2025 00:49:06 GMT</pubDate>
            <atom:updated>2025-09-18T00:49:06.993Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9Sz70Se0m1vt2my-" /></figure><p>In the world of artificial intelligence and machine learning, it’s essential to distinguish between Natural Language Processing (NLP) and Generative Pre-trained Transformers (GPT). While GPT models have revolutionized the field with their ability to generate human-like text, they are fundamentally built on the principles of NLP. This blog aims to clarify the relationship between NLP and GPT, highlighting how GPT enhances traditional NLP tasks and why understanding core NLP concepts is crucial.</p><p>Additionally, towards the conclusion of the blog, keep an eye out for practical examples showcasing how straightforward NLTK models are more than enough and cost effective than GPT in specific use cases. Don’t miss the concluding statement as we try to keep the whole thing short, crisp and precise.</p><p>What is Natural Language Processing (NLP)?</p><p>NLP is a broad field within artificial intelligence that focuses on the interaction between computers and human language. It encompasses a variety of tasks aimed at understanding, processing, and generating natural language. Key NLP tasks include:</p><ul><li><strong>Text Classification</strong>: Categorizing text into predefined labels.</li><li><strong>Sentiment Analysis</strong>: Determining the sentiment expressed in text.</li><li><strong>Named Entity Recognition (NER)</strong>: Identifying proper names in text.</li><li><strong>Part-of-Speech Tagging</strong>: Assigning parts of speech to words.</li><li><strong>Machine Translation</strong>: Translating text between languages.</li><li><strong>Text Summarization</strong>: Condensing text to its main points.</li><li><strong>Question Answering</strong>: Responding to queries based on text data.</li></ul><p><em>One can say NLP encompasses both the understanding and generation of language(Generative and Non-generative NLP models). The key difference lies in the specific models and techniques used within NLP.</em></p><h3>What are GPT Models?</h3><p>GPT, or Generative Pre-trained Transformer, is a type of advanced language model developed by OpenAI. GPT models are designed to generate coherent, contextually relevant text based on a given prompt. They are pre-trained on vast amounts of text data and fine-tuned for specific tasks, making them highly versatile and capable of performing a wide range of NLP tasks with minimal additional training.</p><h3><strong>The Evolution from NLP to GPT</strong></h3><p>NLP has always included both understanding and generating text. Before the advent of GPT models, generating text was possible but often more limited and task-specific. Researchers and practitioners used various NLP techniques to build systems that could perform specific generative tasks, such as chatbots and automated text completion systems.</p><p>The introduction of GPT models represents a significant refinement in generative NLP. By leveraging the transformer architecture, GPT models can generate more coherent and contextually accurate text than earlier models. They are capable of understanding the nuances of language and producing text that closely mimics human writing.</p><h3>Why Core NLP Concepts Still Matter</h3><p>While GPT models are powerful, they are not a replacement for understanding fundamental NLP concepts. Here’s why:</p><ol><li>Foundation of Knowledge: Core NLP concepts provide the foundation necessary to understand and effectively use advanced models like GPT. Knowing how text processing, tokenization, and basic algorithms work is crucial for troubleshooting and customizing models.</li><li>Task-Specific Solutions: Sometimes, simpler NLP techniques are more appropriate for specific tasks. Not all problems require the computational power and complexity of GPT models. For instance, text classification or sentiment analysis might be efficiently handled by traditional machine learning models.</li><li>Resource Efficiency: GPT models can be resource-intensive. Understanding and implementing basic NLP techniques can offer more cost-effective and efficient solutions for certain applications.</li><li>Customization and Fine-Tuning: A solid grasp of NLP allows for better fine-tuning and customization of models. It enables practitioners to adapt models to specific needs and improve performance on specialized tasks.</li></ol><h3>Scenario: Sentiment Analysis for Customer Feedback</h3><p>Imagine you’re working for a company that receives a large volume of customer feedback through various channels such as emails, reviews, and social media. Your goal is to analyze this feedback to understand customer sentiment and improve your products and services.</p><p>We could easily do this sentiment analysis with VADER: VADER (Valence Aware Dictionary and Sentiment Reasoner) is a rule-based sentiment analysis tool that is effective for social media and customer reviews.</p><pre>from nltk.sentiment.vader import SentimentIntensityAnalyzer<br><br>nltk.download(&#39;vader_lexicon&#39;)<br>sia = SentimentIntensityAnalyzer()<br><br>text = &quot;The product quality is great, but the customer service needs improvement.&quot;<br>sentiment = sia.polarity_scores(text)<br>print(sentiment)<br><br>#{&#39;neg&#39;: 0.0, &#39;neu&#39;: 0.579, &#39;pos&#39;: 0.421, &#39;compound&#39;: 0.7615}</pre><p>Yes we can always call OpenAI api or host our own AI infrastructure with Llama3 etc with multiple GPU machines but will that be cost effective? or is it really required?</p><p><strong>Benefits of Using Core NLP Tools:</strong></p><ol><li>Cost-Effective: Running these NLP tasks on a local server or a modest cloud instance is inexpensive compared to using high-powered GPUs for advanced models. And to this we need to do $/X tokens and API calls with 3rd party APIs.</li><li>Simplicity: For tasks like basic sentiment analysis, traditional NLP tools are straightforward and require less computational power.</li><li>Customization: You can easily tweak the preprocessing steps(tokenize, lemmatize, etc.) and rules to better suit your specific needs.</li></ol><h3>Conclusion</h3><p>While GPT and other advanced models offer powerful capabilities, leveraging core NLP concepts and tools like NLTK can be more practical and cost-effective for many tasks. Basic NLP techniques are often sufficient for tasks like sentiment analysis, providing quick and efficient results without the overhead of advanced AI models.</p><p>In conclusion, it’s not a matter of choosing between NLP or advanced models like GPT, but rather understanding the core principles underlying any Language Model (LLM). NLP serves as the bedrock upon which sophisticated language models are built, providing the essential tools and concepts necessary for text processing, analysis, and understanding. By grasping these fundamental principles and leveraging tools like NLTK, practitioners can not only develop robust language models but also adapt and innovate in the ever-evolving landscape of natural language understanding and generation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0c4adbe440a7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Hope We Remain Human Beings]]></title>
            <link>https://medium.com/@keshavagrawal/i-hope-we-remain-human-beings-c8b0ad0c0486?source=rss-5fae4b757268------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8b0ad0c0486</guid>
            <category><![CDATA[humans]]></category>
            <category><![CDATA[society]]></category>
            <category><![CDATA[pandemic]]></category>
            <category><![CDATA[social]]></category>
            <category><![CDATA[digital-transformation]]></category>
            <dc:creator><![CDATA[Keshav Agrawal]]></dc:creator>
            <pubDate>Mon, 04 Oct 2021 04:10:13 GMT</pubDate>
            <atom:updated>2021-10-07T04:54:58.661Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cjmh7v3_KTidGCnayU0Cpw.jpeg" /></figure><p>A lot of posts and articles are floating around the whole www network and people are talking about “Post Pandemic” world in interviews, news, tv shows and many other digital platforms.<br>Everyone is talking about “contact less” operation which is right “for the moment”. It makes sense to take some extra precautionary measures for a while rather than regretting later. All good here.</p><p>But a very dangerous thing about all these is that everyone is feeding two words in everyone’s mind — “Contactless ‘&lt;operation&gt;’” — without mentioning another set of very important words — “for the time being”. Infact few articles are mentioning that this will become the de facto of our ‘post pandemic world’! An instigation of an unknown fear I would say. Can someone define ‘post pandemic world’? Did we ever term our generation as ‘post endemic world’ post so many endemic diseases in the past? No. We didn’t.</p><p>I see many businesses are evolving around it and kind of forcing people to think only in that direction. We all know that in today’s digital world people are already away from each other and becoming machines. Just have a look at the cycle: at first, we launched many digital technologies which were very effective and took our race further to betterment and made us learn many new things and invent — be it about universe or be it about helping a common man in their daily day-to-day life — boosting economy, science, health and prosperity. <strong>Then</strong> we launched apps to take people away from digital world — to bring them close to the nature — play store and app store are filled with it.</p><p>Point is everything has to be checked and controlled and should come with a lifetime. No unlimited lifetime network plans ever work in real life concept. Much of anything is wrong. Digitization and technology has taken us much further in advancement of multiple fields but also have made us distant from each other — hence another set of apps to brings us close :D — cycle!</p><p>Now again we are turning towards contact-less concept of operations -which by the way is right in all manners to contain any pandemic- cut the root! But the way few folks are building their business around it and promoting things — I fear humans will lose the meaning of word ‘social’ in ‘social beings’. And no — this by no means mean that we start going out suddenly in parks and theaters and start meeting people in groups — No! What it means is we should have some set of hygiene standards in our daily life irrespective there is some pandemic out there or not.</p><p>Let me give couple of examples: People have a habit keeping their bags on the floor in offices and many people’s shoes touch it and the same bag finds it place it in your home with you taking out stuffs from it. Sounds silly? Imagine the same thing during this pandemic period — suddenly this silly example would become a matter of concern of everyone- people would be willing to give it a thought. Why can’t we be precautious about it in our daily life? No, it’s not a matter of OCD(Obsessive Compulsive Disorder) of Hygiene. I normally like to keep my bags on the desk, I like to keep my distance from people whenever I m out there in the world — reason? — No it’s not the fear of catching a disease from them, rather it is about a simple social manner. We travel in Buses, Auto Rickshaws, Metros — many folks don’t have options of having this luxury of distancing and avoiding touching stuffs but what about those who have? Do they maintain a basic level of hygiene in their normal day-to-day life? Look at the unchecked use of hand sanitizers these days -normally when you would find someone using handsanitizer after touching something dirty or may be after touching the wheels of your car or trolley bags etc — it might have got treated as traits of “Hygenic Individual” — with a sense of degradation in it! And now? — its normal? — washing hands has suddenly become a matter of “responsibility of a responsible citizen” — these things were part of mockery earlier and suddenly an exaggerated version of these same things have become a norm now! Funny no?</p><p>Had people followed such basic sanity, like, washing their hands regularly, washing their feet and hands after coming to home, not using their work clothes post reaching home(those who have this luxury) beforehand the steps which we are taking right now might not feel like ‘too much’ to adopt to.</p><p>Amazon had tested a contact less store — no human interaction store in San Francisco last year, a similar super market concept was tested in Bangalore as well where one would come in — browse through products, scan, pay(digital) and go! These things which looked too much then is now looking as a norm or a right thing to do.</p><p>What I want to say is many of us have the luxury of maintaining certain level of hygiene in our daily life. You don’t have to be <em>rich</em> to follow them. Mahatma Gandhi had once said — if a man is poor and doesn’t have clothes to wear then that individual might need help — but if a man is wearing a torn cloth and he doesn’t fix it with Needle and Thread(if he has it) then that’s an example of lazyness!</p><p>I hope we remain human and don’t become too scared to interact with humans<br>- it’s okay to visit frontdesk of a hotel to see a smiling face of a person welcoming you — I don’t want a robot doing that! AI and Tech can definitely keep on opening doors for me in a hotel room — Key less entry! Thats advancement and I do want that for sure!<br>- it’s okay to visit market once in a while and see other folks and browse and ‘touch’ and ‘feel’ things which you are buying for home! You don’t feel the importance of these things right now but god forbid if another natural disaster had to teach us the importance of it in future then it would have been too late by then :) Hope nature doesn’t have to ever teach us that. Ever!</p><p>As Dr Mann from Interstellar movie had said: “<em>Pray you never learn just how good it can be to see another face</em>”</p><p>Take precautions! Be safe! But note — maintain your “social” attribute intact!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8b0ad0c0486" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Electron JS + React JS + Express JS]]></title>
            <link>https://medium.com/@keshavagrawal/electron-js-react-js-express-js-b0fb2aa8233f?source=rss-5fae4b757268------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0fb2aa8233f</guid>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[desktop-app]]></category>
            <category><![CDATA[electronjs]]></category>
            <category><![CDATA[expressjs]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Keshav Agrawal]]></dc:creator>
            <pubDate>Mon, 10 Jun 2019 01:39:23 GMT</pubDate>
            <atom:updated>2019-06-10T01:39:23.879Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*ykecbCvCqEZwLBpkhXfE9Q.png" /></figure><p><strong>Requirement</strong>: Build a simple cross platform desktop app</p><p>Note: I m not a core frontend developer but I keep building many apps as pass time: Web Apps, Desktop Apps etc. So excuse any general conventions not being followed. Intention is to put up a gist on how to connect these 3 dots: Electron JS, React JS and Express JS!</p><p><strong>Requirement in detail:</strong></p><ol><li>App should not require any installation.</li><li>App should be executable directly from a flash drive!</li><li>App should run on any platform: mac OSX, Linux and Windows.</li></ol><p><strong>What did I try?</strong></p><p>Well <a href="https://www.qt.io/">QT Framework</a> is well known in this domain so I quickly jumped on <a href="https://pypi.org/project/PyQt5/">PyQT- pyqt5</a> to be specific. I like python so pyqt was a go-to framework for me. — plus I already had some experience with it. Combine it with <a href="https://build-system.fman.io/">fbs</a> and you get a bundler which generates platform specific executable — ‘.app’ for MacOSX, ‘.exe’ for windows etc.</p><p>But it comes with its own learning curve — biggest one being designing the Fronend — you can’t have a single css file as such. There are provisions to write palette file in PyQT but trust me you will start seeing its limitations as you develop your app. I don’t intend to dive deep into QT Framework here but have to build some context:</p><p>So PyQT helped you with Frontend — but what about backend?</p><ul><li>Well since you can directly call python functions capturing any QT Frontend event you would think I don’t need any backend. Eg: on this button click modify the text of X textbox — possible with just python!</li><li>So what exactly is the issue? — designing every single thing on UI with just QT and linking each and everything with python methods is not an easy task.</li><li>Thoughts turned to render a browser inside PyQT engine using chrome web engine. If that can be done then I would be able to handle frontend with js/html.</li><li>Great! Started working on PyQT Web Engine — lot of hiccups but worked. Now I needed a backend server running to which frontend will make request.</li><li>Started working on integrating Flask/Django app with PyQT — need to use multithread to launch PyQT process on one hand and then Flask/Django server on the other. This both initiation should happen at one single click of App Start!</li><li>Had almost integrated the above combination but then something happened- <a href="https://electronjs.org/"><strong>Electron JS</strong></a><strong> </strong>enters the stage!</li></ul><p>So Electron JS similar to PyQT allows me to achieve Write Once Use Anywhere cross platform apps concept!</p><p>Lets jump into the code(from the Electron JS Homepage):</p><pre># Clone the Quick Start repository<br>$ git clone https://github.com/electron/electron-quick-start</pre><pre># Go into the repository<br>$ cd electron-quick-start</pre><pre># Install the dependencies and run<br>$ npm install &amp;&amp; npm start</pre><p>Bam! And you have it -a simple desktop app:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t8zdlcLlr_-3FtlNRmC_WA.png" /><figcaption>The Famous Hello World Example</figcaption></figure><p>This is good but not exactly what I needed. This I could have easily acheived from PyQT as well. I need a backend nodeJS server and once I start the app I should be able to launch both nodeJS server for backend handling and Electron GUI for handling user interactions -similar to what I was doing with QT and Flask/Django.</p><ol><li>I thought: “Lets install Express JS to make a simple REST API backend”</li></ol><pre>npm install express</pre><p>2. Okay now how do I plug Electron and Express together?</p><p>Lets create a simple app.js which will act as a server for us:</p><pre>(<br>    function() {<br>        &quot;use strict&quot;;<br>        let <em>express </em>= <em>require</em>(&#39;express&#39;);<br>        let <em>app </em>= <em>express</em>();</pre><pre>        <em>app</em>.get(&#39;/&#39;, function(<em>req</em>, <em>res</em>) {<br>           <em>res</em>.send(&quot;Hello world! Lala Seth is here!&quot;);<br>        });</pre><pre>        let <em>server </em>= <em>app</em>.listen(3000, function () {<br>            <em>console</em>.log(&#39;Express server listening on port &#39; + <em>server</em>.address().<em>port</em>);<br>        });</pre><pre>        <em>module</em>.<em>exports </em>= <em>app</em>;</pre><pre>    }()<br>);</pre><p>Now lets have a look at our <strong>main.js</strong> file which must have been created post quickstart elelctron app installation.</p><pre>// Modules to control application life and create native browser window<br>const {<em>app</em>, BrowserWindow} = <em>require</em>(&#39;electron&#39;);</pre><pre>// Keep a global reference of the window object, if you don&#39;t, the window will<br>// be closed automatically when the JavaScript object is garbage collected.<br>let <em>mainWindow</em>;</pre><pre>function createWindow () {<br>    // Create the browser window.<br>    <em>mainWindow </em>= new BrowserWindow({<br>        <em>width</em>: 800,<br>        <em>height</em>: 600,<br>        <em>webPreferences</em>: {<br>            <em>nodeIntegration</em>: true<br>        }<br>    })</pre><pre>    // and load the index.html of the app.<br>    <em>mainWindow</em>.loadFile(&#39;index.html&#39;);</pre><pre>    // Open the DevTools.<br>    // mainWindow.webContents.openDevTools()</pre><pre>    // Emitted when the window is closed.<br>    <em>mainWindow</em>.on(&#39;closed&#39;, function () {<br>        // Dereference the window object, usually you would store windows<br>        // in an array if your app supports multi windows, this is the time<br>        // when you should delete the corresponding element.<br>        <em>mainWindow </em>= null<br>    })<br>}</pre><pre>// This method will be called when Electron has finished<br>// initialization and is ready to create browser windows.<br>// Some APIs can only be used after this event occurs.<br><em>app</em>.on(&#39;ready&#39;, createWindow)</pre><pre>// Quit when all windows are closed.<br><em>app</em>.on(&#39;window-all-closed&#39;, function () {<br>    // On macOS it is common for applications and their menu bar<br>    // to stay active until the user quits explicitly with Cmd + Q<br>    if (<em>process</em>.platform !== &#39;darwin&#39;) <em>app</em>.quit()<br>})</pre><pre><em>app</em>.on(&#39;activate&#39;, function () {<br>    // On macOS it&#39;s common to re-create a window in the app when the<br>    // dock icon is clicked and there are no other windows open.<br>    if (<em>mainWindow </em>=== null) createWindow()<br>})</pre><pre>// In this file you can include the rest of your app&#39;s specific main process<br>// code. You can also put them in separate files and require them here.</pre><blockquote>Remember how <strong>Thor</strong> was holding things together while <strong>Eitri</strong> was building <strong>Stormbreaker</strong> on planet <strong>Nidavellir</strong>? — Avengers fans would know!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*zCNgwXmE6E2wsT3d58VLLw.gif" /></figure><p>Well we don’t have to deal with the wrath of a Neutron star here. We have a simple way:</p><p>If you notice we are loading index.html in our <strong><em>main.js</em></strong> file which is called( via `<strong>electron .</strong>`) when you do:</p><pre>npm start</pre><p><em>look at its </em><strong><em>package.json</em></strong><em> file for more clarity.</em></p><p>Now at the end of index.html you will notice:</p><pre>&lt;script&gt;<br>    <em>require</em>(&#39;./renderer.js&#39;);<br>&lt;/script&gt;</pre><p>Okay! So this <strong>renderer.js</strong> is being called. Great! I opened <strong>renderer.js</strong> and wrote this one single line:</p><pre>let <em>server </em>= <em>require</em>(&#39;./app&#39;);</pre><p>So now when my <strong><em>renderer.js</em></strong> is loaded through <strong><em>index.html </em></strong>it will spawn my express server on <strong>3000</strong> port and simultaneously my GUI is ready and rendered for the user!</p><p>Now I restart my app with <strong><em>npm start </em></strong>command and I can see the same Hello World screen but now a node server is up at the backend to receive request!</p><p>How do you check if the express server is up? Just fire up your favorite browser and visit <a href="http://localhost:3000/"><em>http://localhost:3000/</em></a> if you see “Hello world! Lala Seth is here!” -you are good!</p><p>Okay so front end ready, backend ready -all in a single desktop app which can be run directly on any platform!</p><p>But developer’s greed is infectious! I need bootstrap for better UI management. I need React JS for reuse of components or say -its the new hot thing out there ;)</p><p>To keep things simple I just downloaded a free theme’s css and added it in index.html. Installed bootstrap:</p><pre>npm install bootstrap</pre><p>Now I can beautify those labels, headers, arrange DOM elements around Grids and what not! All you need is to add the following under the head tag of my index.html:</p><pre>&lt;<strong>script</strong>&gt;<br>    // You can also require other files to run in this process<br>    <em>require</em>(&#39;bootstrap&#39;);<br>&lt;/<strong>script</strong>&gt;<br>&lt;<strong>link </strong>href=<strong>&quot;static/css/myfreetheme.min.css&quot; </strong>rel=<strong>&quot;stylesheet&quot;</strong>/&gt;<br>&lt;<strong>link </strong>href=<strong>&quot;static/css/app.css&quot; </strong>rel=<strong>&quot;stylesheet&quot;</strong>/&gt;</pre><p>Designed a simple side menu:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*COwjRugeZPV4_6L10IVtRg.png" /></figure><p>But now I need React JS to handle my click events and render my profile Component and records component respectively as per my side menu.</p><p>So how do I plug React JS and Electron and Express? I would like to write JSX as well.</p><p>So I would need babel and react. And babel-preset-react to let babel know we would be writing JSX!</p><pre>npm install babel babel-cli babel-core <em>babel-preset-react react react-dom react-router-dom</em></pre><p>Folks who have worked on React JS why would they need <strong>react-dom</strong> and <strong>react-router-dom</strong>. I would refrain from explaining their usage here.</p><p>Lets write some react code now! <br>1. Create a <strong>component</strong> folder<br>2. Add a <strong>hello.js</strong> file in that directory.<br>3. Add a <strong>&lt;div&gt;</strong> with id body in index.html.<br>4. Put the following as the content of <strong>hello.js</strong>:</p><pre>let <em>react </em>= <em>require</em>(&quot;react&quot;);<br>let <em>React </em>= <em>require</em>(&quot;react&quot;);<br>let <em>reactDOM </em>= <em>require</em>(&quot;react-dom&quot;);<br>let <em>reactRouter </em>= <em>require</em>(&quot;react-router-dom&quot;);</pre><pre>let <em>Component </em>= <em>react</em>.Component;<br>let <em>BrowserRouter </em>= <em>reactRouter</em>.<em>BrowserRouter</em>;<br>let <em>Switch </em>= <em>reactRouter</em>.Switch;<br>let <em>Route </em>= <em>reactRouter</em>.Route;</pre><pre>class Hello extends <em>react</em>.Component {<br>    render() {<br>        return (<br>            &lt;<strong>div </strong>className=&quot;col-xs-12&quot;&gt;<br>                <strong>Hello World!<br>            </strong>&lt;/<strong>div</strong>&gt;<br>        );<br>    }<br>}</pre><pre>function BaseApp() {<br>    return (<br>        &lt;<strong>Switch</strong>&gt;<br>            &lt;<strong>Route </strong>path=&quot;/&quot; component={Hello}/&gt;<br>        &lt;/<strong>Switch</strong>&gt;<br>    )<br>}</pre><pre>class App extends <em>Component </em>{<br>    render() {<br>        return (<br>            &lt;<strong>BaseApp</strong>/&gt;<br>        );<br>    }<br>}<br></pre><pre><em>reactDOM</em>.render(<br>    &lt;<strong>BrowserRouter</strong>&gt;<br>        &lt;<strong>App</strong>/&gt;<br>    &lt;/<strong>BrowserRouter</strong>&gt;,<br>    <em>document</em>.getElementById(&quot;body&quot;)<br>);</pre><p>Wait! You would also need to setup <em>babel</em> config else it would raise <strong><em>Syntax Error</em></strong> while compiling JSX code in our <strong><em>hello.js</em></strong>. Lets head to our <strong><em>package.json</em></strong> and add the following post our devDependencies section:</p><pre><em>&quot;babel&quot;</em>: {<br>  <em>&quot;presets&quot;</em>: [<br>    &quot;react&quot;<br>  ]<br>},</pre><p>Now lets connect the dots: <strong>react</strong>, <strong>JSX</strong> and <strong>electron</strong>!</p><ol><li>Lets create a file: <strong><em>main.boot.js</em></strong>. Content of <strong><em>main.boot.js</em></strong>:</li></ol><pre><em>require</em>(&#39;babel-register&#39;);<br><em>require</em>(&#39;./main.js&#39;);</pre><p>2. Open <strong><em>package.json</em></strong> and replace:</p><pre><em>&quot;main&quot;</em>: &quot;main.js&quot;,</pre><p>with</p><pre><em>&quot;main&quot;</em>: &quot;main.boot.js&quot;,</pre><p>3. Inside our <strong><em>renderer.js</em></strong> lets add some code(to load our react component):</p><pre><em>require</em>(&#39;./components/hello.js&#39;);</pre><p>Our final <strong><em>renderer.js</em></strong> looks like:</p><pre>let <em>server </em>= <em>require</em>(&#39;./app&#39;);<br><em>require</em>(&#39;./components/hello.js&#39;);</pre><p><strong>Gist:</strong> To make entire thing simple: when you do <strong>npm start</strong> here is how the things flow =&gt;</p><p>npm start =&gt; electron . =&gt; <em>triggers main.boot.js</em> =&gt; <em>install babel hooks in the main process and load main.js</em> =&gt; <em>shows app window and to render html it calls index.html</em> =&gt; <em>this calls renderer.js</em> =&gt; <em>which calls our react component as well as spawns express server parallely</em> and final UI gets loaded!</p><p>Now I have a boilerplate code with all the 3 components integrated: Express JS for REST API, Electron JS for GUI for desktop app and React JS for -you know- again UI!</p><p><strong>One last step | Generating executable</strong></p><p>While there are many modules the one I like the most is: <a href="https://github.com/electron-userland/electron-packager">https://github.com/electron-userland/electron-packager</a></p><p>Show me the code:</p><pre>electron-packager . --all</pre><p>--all will generate executable for all the platforms — mac, windows, linux. There are many options which you can checkout on electron-packager website!</p><p>The above command generated a myapp.app, myapp.exe(for both 32 and 64 bit platform) and linux executable. To quickly test things<br>- I copied the Win32 exe file along with its helper files on a USB Flash drive<br>- Connected the drive to a windows machine<br>- Opened the folder and ran the exe file directly from the Flash drive folder<br><strong><em>- Voila! I see the same “Hello world” window which I saw on my Mac!</em></strong></p><p>We can do all kinds of optimization and improve things before taking things live on production!</p><p>But I hope this blog helps folks out there to have a quick start on Cross Platform Apps!</p><p>Request to readers: Please share your feedbacks. <br><em>Note: Its not a production ready code but to showcase how we can connect three component to make a cross platform app!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0fb2aa8233f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stalking is over. Truecaller is here!]]></title>
            <link>https://medium.com/@keshavagrawal/stalking-is-over-truecaller-is-here-bb2e775a61fe?source=rss-5fae4b757268------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb2e775a61fe</guid>
            <dc:creator><![CDATA[Keshav Agrawal]]></dc:creator>
            <pubDate>Sat, 15 Nov 2014 06:22:10 GMT</pubDate>
            <atom:updated>2021-10-07T02:26:56.272Z</atom:updated>
            <content:encoded><![CDATA[<p>Before you start thinking about the title in a different way let me stop you right there. What you thinking about will be eradicated only when people fix themselves.</p><p>So yeah coming to the point of stalking — what type of stalking are we talking about? “Sales Stalking” — let me describe.</p><p>One fine morning I woke up and thought that lets have a look on some new and upcoming cars in the market. Lets try to get an idea about the on-road price of few cars. Now the first thing you type on your address bar is “car price..” and Google Chrome starts suggesting titles to you(Oh! I am talking about chrome browser btw). So I landup on cardekho.com and some other websites. Honestly saying I have fallen in love with cardekho.com website after they revamped it — ease of searching cars, ease of comparing, price, EMI calculation, loan links etc -everything intuitive.</p><p>But at someplace you HAVE to put in your number. Only at couple of trustable websites you can do that but there <em>will be </em>consequences.</p><p>So you put in your number and then few hours after you get a call from some “Tata” showroom regarding some car model. I was expecting the call in this case and wanted to discuss the EMI plans etc. I discussed, got all the information I needed and I thought the conversation was over. I was so wrong — “When are you planning to buy the car sir?” — a very genuine question. “I am not sure yet. I was just researching and wanted to know about what EMI and loan plans are available.”<br>From the otherside of the call: “Sure. Not a problem. We will let our &lt;some team&gt; know and they will contact you for a test drive whenever you want that.”<br>Me: “No. Thanks but I am still learning driving and I am not planning to buy the car at the moment anyways so I don’t think you need to have that trouble. So no need to update my contact for any further query/request.”<br>Guy/Gal(Multiple calls — once a guy, next time a girl, again guy): “Thats fine sir. We will update here for a call after 3–4 months. February works?”<br>Me: “Phew Yes!”</p><p>Honestly even with this I would say calls are short these days. “They” have learnt the hard way that peoples’ exasperation aint the prize they are looking for.</p><p>One fine morning when you are looking for some co-working office space and you put in your number in a customer channel of that website and bamn! Calls just wont stop! Once a week, thrice in 2 weeks, and multiple times in a month from different dealers and channels/companies.</p><h4>How Truecaller(Android App) helps?</h4><p>Well some <strong>angels</strong> use full feature of true caller and name these numbers as “Mahindra showroom spam”, “office-space spam”, “bank call spam” etc. So once or twice is fine but if you start getting multiple calls next time before picking up the call let truecaller search and show you some result about the number. I have avoided many calls because of “true caller”. Thanks TrueCaller for saving us from “Sales Stalking”!</p><p>I have an honest request with so called Sales people who work on lead generation and meeting new targets — stop stalking! I am no MBA but this is basic people skill(say if you may) to not repeat yourself if person has concluded the call with a note — “thanks, will contact if things change”. This is not how you do sales. Try to understand what the person is saying and try to comprehend with the first call itself if this contact is supposed to be called again by any one in the team again.</p><p>Sometimes I so loath people who talk to customer care rudely or don’t give respect while answering to credit card calls/insurance calls/personal loan calls. They can be politely said “No. I am not interested.” If you are not busy then atleast here them out and know the product and then say “No” ☺ But warn them that “I might not be opting for it.”</p><p>But then sometimes I feel that they are right in talking rudely or just disconnecting the call right away — because these callers/companies just don’t get it that a “No” means “No”.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb2e775a61fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>