<?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 Neo Ver on Medium]]></title>
        <description><![CDATA[Stories by Neo Ver on Medium]]></description>
        <link>https://medium.com/@neover?source=rss-521d227fa4b1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*cWHA3hgBHeyH7p9RJJDfOw.jpeg</url>
            <title>Stories by Neo Ver on Medium</title>
            <link>https://medium.com/@neover?source=rss-521d227fa4b1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 16:49:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@neover/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[Decoding Gen Z at Work: The Mindset Shift Every Manager Needs to Understand]]></title>
            <link>https://neover.medium.com/decoding-gen-z-at-work-the-mindset-shift-every-manager-needs-to-understand-bbbd0f0aa9f8?source=rss-521d227fa4b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/bbbd0f0aa9f8</guid>
            <category><![CDATA[workplace-culture]]></category>
            <category><![CDATA[management]]></category>
            <category><![CDATA[gen-z]]></category>
            <category><![CDATA[work-life-balance]]></category>
            <category><![CDATA[leadership]]></category>
            <dc:creator><![CDATA[Neo Ver]]></dc:creator>
            <pubDate>Wed, 24 Dec 2025 16:49:47 GMT</pubDate>
            <atom:updated>2025-12-24T16:49:47.127Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TBUS_CQZZMZ_ATirAXdFXg.jpeg" /></figure><h3>Introduction: The Generation Rewriting the Rules</h3><p>The tension is palpable in boardrooms across the world. Managers scratch their heads wondering why their newest team members won’t accept “the way things are done,” demand mental health days without guilt, and seem perpetually glued to their phones updating Snapchat during work hours. The instinct is to call it entitlement. But here’s what the data reveals: Gen Z isn’t rejecting work — they’re rejecting a <em>framework</em> that no longer serves the reality of how we live, work, and think about success.</p><p>My interviews with Gen Z professionals across India’s fintech sector revealed something striking. These aren’t demands born from laziness; they’re rational responses to growing up in a digital-first world where mental health crises made headlines alongside school shooters, where the climate is collapsing, and where economic uncertainty is the baseline assumption. When a Gen Z employee says, “I want work-life balance,” they’re not asking for a 9-to-5 world — they’re asking for <em>autonomy</em> over their time and permission to prioritise their psychological survival.</p><p>This blog explores six core mindsets that define Gen Z at work, backed by peer-reviewed research and emerging organizational studies. More importantly, I’ll translate these into practical strategies that help managers build engaged, productive teams instead of presiding over quiet quitters.</p><h3>Mindset 1: Work-Life Balance Isn’t a Luxury — It’s a Non-Negotiable</h3><p>What They Said:<br><em>“If I don’t have pending work, I’d prefer to leave the office and head home.”</em><br><em>“Work-life balance is something we prioritise.”</em><br><em>“If you offer me lower pay with a work-from-home option, I’ll take it.”</em></p><p>What the Research Says:</p><p>The framing around work-life balance for Gen Z is fundamentally different from previous generations. According to a <a href="https://ijrpr.com/uploads/V5ISSUE12/IJRPR36571.pdf">2024 international study</a> on work-life balance preferences, flexible work hours emerged as the most valued benefit among Gen Z workers, followed by paid time off and remote work opportunities. A <a href="https://s2verify.com/resource/gen-z-demands-work-life-balance/">FlexJobs survey</a> found that 70% of Gen Z workers favor hybrid or fully remote work models, explicitly rejecting rigid return-to-office mandates.​</p><p>What’s revolutionary is this: Gen Z would rather earn less <em>and</em> work from home than earn more and commute to an office. When presented with the choice of “low pay + WFH” versus traditional office setup, the research validates what my interviewees told me — they’ll take it. The <a href="https://www.harmonyhit.com/state-of-gen-z-mental-health/">HarmonyHit analysis</a> found that 47% of Gen Z workers would accept lower pay if it meant better work-life balance, and 89% believe you can have both a high-earning career and healthy balance.​</p><p><a href="https://www.brookes.ac.uk/about-brookes/news/news-from-2024/12/study-reveals-mental-health-diversity-and-work-lif">Dr. Simon M Smith from Oxford Brookes Business School</a> emphasized that this isn’t entitlement — it’s a rational response: <em>“Gen Z’s expectations from work reflect the unique pressures they’ve faced growing up in a digital-first world. They grew up immersed in digital technology, with constant exposure to global crises shaping their anxieties.”</em></p><p>This shift is also amplified by social media, where narratives around remote work, travel, and “experiences you can only have in your 20s” have gone viral. The underlying belief: you can always earn money later, but youth is fleeting.</p><p>Manager Implications:</p><p>The old assumption that “serious employees stay late” is dead. Gen Z equates long hours with poor management, not dedication. To engage this workforce:</p><ul><li><strong>Measure outcomes, not hours.</strong> Remote and hybrid arrangements aren’t perks — they’re baseline expectations for talent acquisition.</li><li><strong>Respect boundaries ruthlessly.</strong> If someone logs off at 6 PM, that’s not disengagement; it’s professionalism in the new era.</li><li><strong>Offer autonomy over location.</strong> The manager who trusts their team to deliver from anywhere — and lets them work whenever suits them best, even if that means emails at 1am — builds loyalty; the one obsessed with seat time loses talent.</li></ul><h3>Mindset 2: Continuous Learning is Now a Career Expectation, Not an Option</h3><p>What They Said:<br><em>“I completed my graduation and started working, but I don’t want to stop learning. I’d like to pursue a master’s degree — many of us are even considering PhDs now.”</em></p><p>What the Research Says:</p><p>This statement reveals a seismic shift in how Gen Z views career progression. Unlike previous generations who saw a degree as a finishing line, Gen Z views education as <em>continuous</em> and <em>aligned with career advancement</em>.</p><p>The <a href="https://www.aacsb.edu/insights/articles/2025/04/prove-it-measuring-gen-zs-career-readiness">AACSB research on Gen Z </a>career readiness found that younger workers experience intense pressure to stay ahead through ongoing skill development, and schools that integrate experiential learning with clear career pathways significantly boost student engagement and retention. Gen Z isn’t just open to further education — they view it as non-negotiable insurance against obsolescence.​</p><p><a href="https://www.cogentinfo.com/resources/gen-zs-strategies-for-lifelong-learning-and-upskilling-in-the-digital-age">Cogent Info’s 2024 study</a> found that Gen Z is actively embracing online courses, certifications, and microlearning to gain skills quickly and efficiently. They value employers who invest in their ongoing education. The key differentiator: they don’t want distant, theoretical learning. They want learning <em>linked directly to career advancement</em>.​</p><p>The CCS Learning Academy research highlighted that Gen Z favors non-linear, skills-first career paths rather than rigid ladders — meaning they care less about title progression and more about building specific capabilities.​</p><p>Notably, Gen Z also exhibits growing skepticism toward traditional degrees. A college dropout or lower academic performer can indicate genius rather than failure. Their philosophy: don’t be the sheep that follows academic institutions blindly — carve your own path. This explains why certifications, bootcamps, and demonstrable skills often carry more weight than formal degrees.</p><p>Manager Implications:</p><p>Managers who unlock learning become talent magnets. To support this mindset:</p><ul><li><strong>Build learning into the role. </strong>Allocate 5–10% of working hours for skill development tied to career goals.</li><li><strong>Create transparent skill-to-advancement maps.</strong> Show explicitly: “To move to the next level, you’ll need these 5 capabilities. Here’s how we’ll help you build them.”</li><li><strong>Offer external certifications and courses. </strong>Whether it’s a cloud certification, MBA, or specialized bootcamp — budget for it and encourage completion.</li><li><strong>Mentor for mastery, not mediocrity.</strong> Your job is to help them become the best version of themselves, even if they eventually outgrow your team.</li><li><strong>Host hackathons and creative challenges.</strong> Gen Z values creative freedom over forced assignments. They rebel against rigidity and question “because that’s how we’ve always done it.” Give them problems to solve, not scripts to follow.</li></ul><h3>Mindset 3: Social Media Isn’t a Distraction — It’s a Parallel Professional Identity</h3><p>What They Said:<br><em>“Social media is as integral to our lives as professional work. We need to keep sharing updates on Snap/Insta”</em><br><em>“I need to stay updated on what’s happening in my social circles — frequently.”</em></p><p>What the Research Says:</p><p>This is perhaps the most misunderstood Gen Z behavior by managers. The instinct is to call this unprofessionalism. But the research paints a different picture.</p><p><a href="https://www.atlantis-press.com/proceedings/tceeis-23/125997235">A 2024 study published in Atlantis Press</a> on FOMO (Fear of Missing Out) and Gen Z performance found that social media connectivity is deeply wired into their sense of belonging. However, the research also highlighted a critical risk: excessive social media checking can fragment attention, reduce focus, and negatively impact work performance when left unmanaged. The problem isn’t social media itself — it’s unstructured access during work.​</p><p>What’s fascinating is that Gen Z experiences “compulsive checking disorders” not out of laziness but from a genuine neurological need for connectedness. When you prevent them from checking in, anxiety increases. When you allow structured access, productivity often <em>improves</em> because the underlying psychological need is met.​</p><p><a href="https://papers.ssrn.com/sol3/Delivery.cfm/4964157.pdf?abstractid=4964157&amp;mirid=1">SSRN research</a> further clarified that FOMO stems from unsatisfied psychological needs in real life, and when managed appropriately, social media can actually serve as a stress relief and social support mechanism.​</p><p>Let’s be honest — this constant connectivity also correlates with shorter attention spans and, yes, some degree of laziness bred by doom-scrolling habits. This isn’t an excuse, but context managers must understand.</p><p>Manager Implications:</p><p>Rather than banning Snapchat updates, work <em>with</em> this behavior:</p><ul><li><strong>Normalize and structure social media breaks.</strong> “Take 15 minutes every 2 hours to check your socials” sounds counterintuitive but reduces compulsive checking throughout the day.</li><li><strong>Separate message channels.</strong> Have Slack for work, allow personal phones for social media. Clear separation reduces anxiety.</li><li><strong>Understand the underlying need</strong>. If someone frequently checks in, they’re signaling a need for social connection — which can be met through team bonding, not punishment.</li><li><strong>Build social elements into remote work. </strong>Virtual coffee chats, team Slack channels with memes and life updates, and periodic in-person offsites satisfy this belonging need in professional contexts.</li></ul><h3>Mindset 4: Financial Planning Comes Later; Parental Safety Net is Now</h3><p>What They Said:<br><em>“Why worry now? I’ll earn money later. My parents’ money is available for spending — whatever I earn now is just extra.”</em></p><p><em>“Why start saving now? Most of us have ancestral property anyway.</em>”</p><p>What the Research Says:</p><p>This statement captures a generational paradox that research has documented extensively. It’s not that Gen Z doesn’t care about financial planning — many do. But they refuse to prioritize it over work-life balance, mental health, or personal growth. Gen Z exhibits what researchers call “instant gratification culture” — they prioritize experiential spending and living in the present without long-term financial planning. This isn’t recklessness; it’s a deliberate deferral of financial responsibility.​</p><p><a href="https://www.morningstar.in/posts/76675/mastering-delayed-gratification-for-financial-well-being.aspx">The Morningstar analysis</a> found that this cohort is <em>more inclined toward experiential spending</em>, choosing memories and lifestyle over traditional wealth accumulation — especially when family wealth provides a safety net. Additionally, the <a href="https://www.pwc.com/us/en/industries/consumer-markets/library/gen-z-consumer-trends.html">PwC 2025 spending analysis</a> revealed a striking Gen Z paradox: they cut overall spending by 13% between January and April 2025, yet 64% have tried buy-now-pay-later services, with 40% making late payments. They’re financially careful <em>and</em> financially careless simultaneously.​</p><p>What explains this? Research from <a href="https://www.questjournals.org/jrhss/papers/vol12-issue11/12113745.pdf">a 2024 study on Gen Z financial</a> attitudes found that the instant gratification impulse combined with e-commerce availability combined with easier credit access has created a cohort that spends money now for short-term wants rather than saving for long-term goals. But critically, many Gen Z workers in urban India with family wealth or inheritance expectations genuinely don’t prioritise career-based wealth accumulation the way Boomers or Gen X did.​</p><p>Manager Implications:</p><p>This has profound implications for how you motivate and retain Gen Z:</p><ul><li><strong>Don’t rely solely on salary increases as motivation.</strong> Money matters, but Gen Z’s financial planning horizon is compressed. Immediate, tangible benefits (work-from-home, flexible hours, skill development) often motivate more than promised future earnings.</li><li><strong>Expect delayed career ambition.</strong> They may not hustle aggressively for the next promotion or stretch assignment if they feel financially secure through family resources.</li><li><strong>Create intrinsic motivation through impact.</strong> Focus on purpose, skill growth, and work-life balance rather than “building wealth” or “climbing the ladder.”</li><li><strong>Understand generational wealth dynamics.</strong> Many Gen Z employees have inherited property or family investments. Their relationship to “career success” may be fundamentally different from yours. Rather than judging, adapt.</li></ul><h3>Mindset 5: Mistakes Are Learning, Not Sins — And They Demand Teaching, Not Punishment</h3><p>What They Said:<br><em>“Failures aren’t always failures — take the learnings from them. Don’t stress.”</em><br><em>“If I make a mistake, don’t scold me — teach me how to do better. Not every mistake is going to shut the company down.”</em><br><em>“Don’t want someone screaming at me, because we’re the youngest ones here.”</em></p><p>What the Research Says:</p><p>This is perhaps the most actionable insight from my interviews, and it aligns perfectly with emerging neuroscience on learning and emotional intelligence.</p><p><a href="https://lsb.edu.in/the-gen-z-mindset-importance-of-building-resilience/">Research from Legacy School Bangalore</a> on Gen Z resilience found that Gen Z’s capacity for growth is undeniable when they’re given space to stumble and recover. The critical factor is <em>framing</em>: when mistakes are viewed as natural and necessary parts of growth — not reasons for reprimand — resilience develops. Failures actually activate the neurochemicals necessary for learning through neuroplasticity.​</p><p>The <a href="https://www.niagarainstitute.com/blog/how-gen-z-is-reshaping-leadership-expectations-in-the-workplace">Niagara Institute’s research </a>on leading Gen Z emphasized that authentic leaders openly acknowledge their own mistakes and model a growth mindset. <a href="https://www.forbes.com/sites/taliavarley/2024/02/25/helping-gen-z-learn-to-fail-well/">A 2024 Forbes article</a> on helping Gen Z fail well noted: <em>“Personal experience with failure is key. The act of personally generating solutions to failure forces deeper learning.”</em>​</p><p>Most critically, emotional intelligence research on Gen Z found that soft skills like empathy, communication, and honesty ranked higher than professional success or industry expertise when Gen Z evaluated mentors. When a manager yells, they’re communicating a lack of emotional intelligence — and Gen Z will leave.​</p><p>Gen Z fundamentally believes their talent is an asset to the company — they should be valued and allowed to grow, not disciplined into submission. When they feel undervalued, they’ll take their talent elsewhere without hesitation. They also expect regular appreciation, not just absence of criticism. The instant gratification culture of social media has created a generation with heightened sensitivity to feedback — both positive and negative. Treat Gen Z with care; they are emotionally more sensitive than previous generations, and that’s not a flaw to fix but a reality to accommodate.</p><p>Manager Implications:</p><p>This mindset demands a complete recalibration of how managers respond to errors:</p><ul><li><strong>Separate the mistake from the person.</strong> Say: “This approach didn’t work. Let’s figure out what we learn and try differently.” Not: “This is your fault; you failed.”</li><li><strong>Share your own failures. </strong>When you openly discuss mistakes you made and lessons learned, you give permission for psychological safety.</li><li><strong>Use coaching language.</strong> Instead of “You did X wrong,” ask: “What happened here? What would you do differently next time? How can I help?”</li><li><strong>Appreciate regularly and explicitly.</strong> If they’ve done good work, tell them immediately. You’ll see exponentially higher motivation next time. The social media generation runs on acknowledgment.</li><li><strong>Manage shorter attention spans deliberately.</strong> Constantly reinforce that they’re on the right path. Long periods without feedback create anxiety and disengagement.</li><li><strong>Model emotional intelligence.</strong> Your ability to stay calm under pressure, admit when you’re wrong, and focus on solutions directly determines whether Gen Z trusts you.</li></ul><h3>Mindset 6: Authenticity is Non-Negotiable; Hierarchy is Optional</h3><p>What They Said:<br><em>“I don’t care what society thinks. They don’t pay for us — our parents do.”</em><br><em>“I don’t want to be in a position where I have to lie to my manager and fake needing a sick leave.”</em><br><em>“We’re the youngest ones here — we expect patience and mentoring, not harsh judgment.”</em></p><p>What the Research Says:</p><p>This mindset reveals Gen Z’s deep skepticism of institutional authority and their demand for radical authenticity. <a href="https://eab.com/resources/research-report/gen-z-values-transparency-authenticity/">The EAB research</a> found that 68% of Gen Z read at least three reviews before making purchases, and 79% trust companies that don’t use Photoshop retouching — signaling an almost desperate hunger for authenticity. They can detect manufactured transparency from a mile away.​</p><p>An academic study on preferred leadership styles found that authentic leadership — defined by self-awareness, transparency, and ethical behavior — is increasingly valued by Gen Z employees who seek honesty and integrity. When a manager pretends to have all the answers or hides organizational challenges, Gen Z internally categorizes them as inauthentic and disingenuous.​</p><p><a href="https://www.gallup.com/workplace/692954/anemic-employee-engagement-points-leadership-challenges.aspx">Gallup’s 2024 research</a> found that teams with collaborative, transparent leadership are 21% more productive and have 17% higher retention rates. The shift isn’t just about feelings — it’s about business outcomes.​</p><blockquote>Most importantly, Gen Z fundamentally rejects traditional hierarchies. A <a href="https://www.deloitte.com/global/en/issues/work/genz-millennial-survey.html">2025 Deloitte Global Survey</a> found that only 9% of Gen Z workers prefer top-down management, with the majority favoring open dialogue and collaboration. In a <a href="https://symity.com/wp-content/uploads/2024/05/Jabra-How-Gen-Z-is-disrupting-the-workplace-in-2024-Report-030324-Web_final.pdf">2024 Workable study,</a> 67% of Gen Z workers reported frustration with hierarchical workplaces.​</blockquote><p>Manager Implications:</p><p>To lead Gen Z authentically:</p><ul><li><strong>Be visible and vulnerable.</strong> Share organizational challenges (appropriately). Let them see you think through problems, not just hand down solutions.</li><li><strong>Admit what you don’t know.</strong> Saying “I don’t have that answer; let’s figure it out together” builds trust more than bluffing.</li><li><strong>Make decisions transparently.</strong> Explain the reasoning, the trade-offs, and the constraints — not just the decision.</li><li><strong>Flatten the hierarchy.</strong> Use collaborative decision-making on team matters. Ask for input, genuinely consider it, and explain why you chose one path over another.</li><li><strong>Be consistent between values and actions.</strong> That said, Gen Z values working whenever they want — they might email you at 1am themselves. The issue isn’t timing; it’s expectation. If you email at 10 PM expecting immediate response, that’s the problem. If you’re both working asynchronously on your own schedules, that’s flexibility in action.</li><li><strong>Treat everyone as equals in conversation.</strong> Seniority doesn’t grant permission to be rude or dismissive. Managers who genuinely listen to Gen Z perspectives earn far more respect than those who pull rank.</li></ul><h3>The Broader Pattern: How Each Generation Redefined What “Making It” Means</h3><p>One of my interviewees offered a striking historical observation: “<em>In the last 50 years, each generation has chased something different. Our grandparents fought for food on the table. Our parents pursued stable, skilled jobs. The next generation optimized for maximum earnings. And now? We’re optimizing for quality of life.</em>”</p><p>This captures the arc perfectly. Boomers and Gen X fought for financial security and earnings because scarcity was real. Millennials rode the wave of skill-based economies and early tech wealth. But Gen Z? They inherited a world where financial security exists (for many, through family wealth), where skill-based earnings are uncertain (thanks to automation and AI), and where money alone doesn’t buy happiness (they’ve watched burnout up close).</p><p>This explains <em>why</em> they prioritize work-life balance, continuous learning, and authenticity. These aren’t luxuries — they’re the next frontier of what matters.</p><h3>What This Means for Managers: The Opportunity</h3><p>If you’re frustrated with Gen Z at work, here’s the truth: you’re not managing a deficient generation. You’re managing a generation with <em>different</em> <em>values and psychological needs</em>. The managers who win with Gen Z are those who:</p><ol><li><strong>Lead with transparency and authenticity. </strong>Be real. Admit what you don’t know. Explain the “why” behind decisions, not just the “what.”</li><li><strong>Invest in continuous learning. </strong>Tie skill development directly to promotions. Budget for certifications. Make growth visible, not vague.</li><li><strong>Measure outcomes, not inputs. </strong>Define deliverables, then step back. Trust your team to manage their own time. Presence ≠ Productivity.</li><li><strong>Give feedback relentlessly. </strong>Weekly check-ins, real-time corrections, instant recognition. Don’t save feedback for annual reviews — they’re already dead.</li><li><strong>Create psychological safety. </strong>Normalize failure as data. Ask “What did we learn?” before “What went wrong?” Share your own mistakes first.</li><li><strong>Respect autonomy fiercely. </strong>Let them choose how, when, and where they work. Control the outcomes, not the process.</li><li><strong>Model the growth mindset. </strong>Talk about what you’re learning. Share your failures openly. Vulnerability from leaders unlocks growth in teams<strong>.</strong></li></ol><p>The generation that grew up watching mental health stigma crumble, that values purpose over prestige, and that demands authenticity in an age of filters — they’re not broken. They’re evolved. And the managers who evolve with them will build the most engaged, productive, and loyal teams in modern business.</p><h3>References</h3><ul><li><a href="https://ijrpr.com/uploads/V5ISSUE12/IJRPR36571.pdf">International Journal of Research Publication and Reviews — Work-Life Balance Preferences of Gen Z in the Modern Workplace</a></li><li><a href="https://medium.com/p/bbbd0f0aa9f8/edit">FlexJobs Survey (2024). “Gen Z’s Demand for Work-Life Balance</a>”</li><li><a href="https://www.harmonyhit.com/state-of-gen-z-mental-health/">HarmonyHit. (2025). “State of Gen Z Mental Health 2025</a>”</li><li><a href="https://www.brookes.ac.uk/about-brookes/news/news-from-2024/12/study-reveals-mental-health-diversity-and-work-lif">Oxford Brookes University. (2024). “Study reveals mental health, diversity, and work-life balance are top priorities for Gen Z workers.” Statement by Dr. Simon M Smith, Principal Lecturer.</a></li><li><a href="https://www.aacsb.edu/insights/articles/2025/04/prove-it-measuring-gen-zs-career-readiness">AACSB International. (2025). “Prove It! Measuring Gen Z’s Career Readiness.”</a></li><li><a href="https://www.cogentinfo.com/resources/gen-zs-strategies-for-lifelong-learning-and-upskilling-in-the-digital-age">Cogent Info. (2024). “Gen Z’s Strategies For Lifelong Learning And Upskilling In The Digital Age.”</a></li><li><a href="https://www.ccslearningacademy.com/gen-z-millennials-demand-professional-development/">CCS Learning Academy. (2025). “Why Gen Z and Millennials Are Demanding Professional Development.”</a></li><li><a href="https://www.atlantis-press.com/proceedings/tceeis-23/125997235">Atlantis Press. (2024). “FOMO and Its Effect on Gen Z Performance.”</a></li><li><a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4964157">SSRN. (2024). “A Study on How Social Media FOMO (Fear of Missing Out) Affects Generation Z.”</a></li><li><a href="https://www.morningstar.in/posts/76675/mastering-delayed-gratification-for-financial-well-being.aspx">Morningstar India. (2024). “Mastering Delayed Gratification for Financial Well-Being.”</a></li><li><a href="https://www.dbs.com.sg/personal/articles/nav/financial-planning/gen-z-financial-trends">DBS Singapore. (2020). “Generation Z’s Financial Trends: East vs West.”</a></li><li><a href="https://www.pwc.com/us/en/industries/consumer-markets/library/gen-z-consumer-trends.html">PwC. (2025). “The Gen Z Paradox: Spending Less, Expecting More.”</a></li><li><a href="https://www.questjournals.org/jrhss/papers/vol12-issue11/12113745.pdf">The Academic. (2024). “Generation Z’s Financial Landscape: An Extensive Study of Financial Literacy Behaviour.”</a></li><li><a href="https://lsb.edu.in/the-gen-z-mindset-importance-of-building-resilience/">Legacy School Bangalore. (2025). “The Gen Z Mindset: Importance of Building Resilience.”</a></li><li><a href="https://www.forbes.com/sites/taliavarley/2024/02/25/helping-gen-z-learn-to-fail-well/">Forbes. (2024). “Helping Gen Z Learn to Fail — Well.” By Talia Varley.</a></li><li><a href="https://www.niagarainstitute.com/blog/how-gen-z-is-reshaping-leadership-expectations-in-the-workplace">Niagara Institute. (2025). “Understanding the Gen Z Perspective as a Manager.”</a></li><li><a href="https://www.forbes.com/sites/aytekintank/2025/09/30/4-feedback-methods-that-help-gen-z-employees-grow-faster/">Forbes. (2025). “4 Feedback Methods That Help Gen Z Employees Grow Faster.” By Aytekin Tank.</a></li><li><a href="https://www.hrdive.com/news/confidence-crisis-gen-z-workers-lack-career-mentorship/760223/">HR Dive. (2025). “Amid a Confidence Crisis, Gen Z Workers Lack Career Mentorship.”</a></li><li><a href="https://www.macorva.com/blog/why-gen-z-demands-real-time-feedback-and-how-to-deliver-it">Macorva. (2025). “Why Gen Z Demands Real-Time Feedback and How to Deliver It.”</a></li><li><a href="https://eab.com/resources/research-report/gen-z-values-transparency-authenticity/">EAB. (2020). “How Gen Z’s Demand for Radical Transparency and Authenticity Impacts Higher Ed Leaders.”</a></li><li><a href="https://www.gallup.com/workplace/692954/anemic-employee-engagement-points-leadership-challenges.aspx">Anemic Employee Engagement Points to Leadership Challenges</a>​</li><li><a href="https://theacademic.in/wp-content/uploads/2024/11/27.pdf">The Academic. (2024). “A Study on Preferred Leadership Styles For A New Generation.”</a></li><li><a href="https://careeraheadonline.com/why-gen-z-is-dismissing-traditional-leadership-models-in-the-workplace/">Career Ahead Online. (2025). “Why Gen Z Rejects Traditional Leadership Models in 2025.”</a></li><li><a href="https://www.deloitte.com/global/en/issues/work/genz-millennial-survey.html">Deloitte. (2025). “2025 Gen Z and Millennial Survey.”</a></li><li><a href="https://symity.com/wp-content/uploads/2024/05/Jabra-How-Gen-Z-is-disrupting-the-workplace-in-2024-Report-030324-Web_final.pdf">Workable &amp; All Things Talent. (2024). “Flat Structures and Collaboration: How Gen Z and Millennials Are Reshaping Command Culture.”</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bbbd0f0aa9f8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setup ELK stack with Index Lifecycle Management]]></title>
            <link>https://neover.medium.com/setup-elk-stack-with-index-lifecycle-management-eb9bfb0ae979?source=rss-521d227fa4b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb9bfb0ae979</guid>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[elk]]></category>
            <category><![CDATA[ilm]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[logging]]></category>
            <dc:creator><![CDATA[Neo Ver]]></dc:creator>
            <pubDate>Fri, 09 Apr 2021 13:41:16 GMT</pubDate>
            <atom:updated>2021-04-14T09:27:01.494Z</atom:updated>
            <content:encoded><![CDATA[<p>I was in my last week at my current company and the Spring Boot based microservices we had were producing tons of logs now, because hey, the application worked! ;)</p><p>Apparently, grepping the logs wasn’t proving to be the best utilisation of our time. So, I thought I’ll gift my team with the ELK stack for debugging logs before I move out.</p><p>I looked up for the easiest and stable way to set up ELK and came across this already packaged <a href="https://hub.docker.com/r/sebp/elk/">Docker image of ELK</a>. You can find it’s documentation <a href="https://elk-docker.readthedocs.io/">here</a> and the codebase <a href="https://github.com/spujadas/elk-docker">here</a>.</p><p>This setup is great, it just works once you have setup the Filebeat and start writing logs from your respective containers. As I wanted minimal changes to my existing services to start producing logs into ELK, I thought to setup Filebeat as a sidecar which will read from the corresponding mounted logs being produced by those services.</p><p>I deployed 1 pod running the Docker image for ELK mentioned above, 1 for Filebeat and then tweaked logbacks for respective services to start producing Logstash encoded logs in JSON format in a file; if it’s overwhelming don’t worry, details will follow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IOGQ9-gjPdzC5Rm3OwVd2A.png" /></figure><p>I followed the following steps:-</p><ol><li>Setting up ELK</li><li>Setting up Filebeat to read logs and emit to Logstash</li><li>Setting up service to emit formatted logs for Filebeat</li><li>Fixing the ILM policy</li></ol><h3>Setting up ELK</h3><ol><li>Created a DockerFile using base image as 7.11.2 for ELK</li></ol><pre>#DockerFile - ELK</pre><pre><em>FROM</em> sebp/elk:oss-7.11.2<br><em>ADD</em> certs/logstash-beats.crt /etc/pki/tls/certs/logstash-beats.crt<br><em>ADD</em> certs/logstash-beats.key /etc/pki/tls/private/logstash-beats.key<br><em>ADD</em> configs/heartbeat-30-output.conf /etc/logstash/conf.d/30-output.conf<br><em>EXPOSE</em> 5601 9200 5044</pre><p>2. Created my own cert and key to remove the default one by following instructions from <a href="https://elk-docker.readthedocs.io/#forwarding-logs">Certificates on Filebeat</a> and replacing the default .crt and .key provided in the image as can be seen in line #2 and #3 above</p><pre>openssl req -x509 -batch -nodes -subj &quot;/CN=heartbeat-elk/&quot; \<br>-days 3650 -newkey rsa:2048 \<br>-keyout logstash-beats.key -out logstash-beats.crt</pre><p>3. The current ELK setup uses <a href="https://www.elastic.co/guide/en/logstash/7.x/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-manage_template">Elasticsearch output plugin</a>, which when hooked will result in creating indices on ELK in the format “filebeat-YYYY.MM.DD” as that’s the index pattern mentioned in the 30-output.conf file with the image. We changed this to use ILM because we can’t apply Index Lifecycle Management to indices which are not ending with digits only such as 000001(<em>this is a check on ELK</em>).</p><p>Default 30-output.conf:-</p><pre>output {<br>  elasticsearch {<br>    hosts =&gt; [&quot;localhost&quot;]<br>    manage_template =&gt; false<br>    index =&gt; &quot;%{[@metadata][beat]}-%{+YYYY.MM.dd}&quot;<br>  }<br>}</pre><p>30-output.conf after our change:-</p><pre>output {<br>  elasticsearch {<br>    <em>hosts </em>=&gt; [&quot;localhost&quot;]<br>    <em>ilm_enabled </em>=&gt; &quot;true&quot;<br>  }<br>}</pre><p>Now, once you have enabled ILM flag the image will create the alias as “logstash” and will automatically create index of format “logstash-{now/d}-000001” and will also apply the default “logstash-policy” for ILM which rolls over index after 50GB or 30 days.</p><p>My use-case was to rollover index after 50GB or 1 day and delete it after 3 days.</p><p>4. Docker command to run ELK container locally with a directory mounted for ELK to store it’s data(locally at `/opt/mountedELKDirectory/heartbeat-elk`) between restarts, we mounted it’s location `/var/lib/elasticsearch`</p><pre>docker run --rm \<br>-e RUN_ENVIRONMENT=test \<br>-e ES_CONNECT_RETRY=60 \<br>-v /opt/mountedELKDirectory/heartbeat-elk:/var/lib/elasticsearch \<br>-p 5601:5601 -p 9200:9200 -p 5044:5044  \<br>-t heartbeat-elk</pre><h3>Setting up Filebeat</h3><ol><li>Created a DockerFile as below for Filebeat container. Notice the same .crt file being copied here as well.</li></ol><pre>#DockerFile - Filebeat</pre><pre><em>FROM</em> docker.elastic.co/beats/filebeat:7.11.2<br><em>COPY</em> yamls/filebeat.yml /usr/share/filebeat/filebeat.yml<br><em>ADD</em> certs/logstash-beats.crt /etc/pki/tls/certs/logstash-beats.crt<br><em>USER</em> root<br><em>RUN</em> chown -R root /usr/share/filebeat/<br><em>RUN</em> chmod -R go-w /usr/share/filebeat/<br><em>ENTRYPOINT</em> bash -c &#39;export PATH=$PATH:/usr/share/filebeat &amp;&amp; /usr/local/bin/docker-entrypoint -e&#39;</pre><p>2. Updated the path in our filebeat.yaml as described below to start harvesting logs</p><pre>#filebeat.yaml</pre><pre>filebeat.inputs:<br>  - type: log<br>    json.keys_under_root: true<br>    <em># Json key name, which value contains a sub JSON document produced by our application Console Appender<br>    </em>json.message_key: log<br>    enabled: true<br>    encoding: utf-8<br>    paths:<br>      <em># Location of all our Docker log files (mapped volume in docker-compose.yml)<br>      </em>- &#39;/opt/mountedLogDirectory/heartbeat-logs/*.log.json&#39;<br>tags: [&quot;fb-v1&quot;]<em>#Filbeat YAML version, just some additional metadata which can be used to track different filebeat versions<br></em>processors:<br>  <em># decode the log field (sub JSON document) if JSONencoded, then maps it&#39;s fields to elasticsearch fields<br>  </em>- decode_json_fields:<br>      fields: [&quot;log&quot;]<br>      target: &quot;&quot;<br>      <em># overwrite existing target elasticsearch fields while decoding json fields<br>      </em>overwrite_keys: true<br>  - add_docker_metadata: ~<br><br>output.logstash:<br>    enabled: true<br>    hosts: [&quot;heartbeat-elk:5044&quot;]<br>    ssl.enabled: true<br>    max_retries: 3<br><em># Write Filebeat own logs only to file to avoid catching them with itself in docker log files<br></em>logging.to_files: true<br>logging.to_syslog: false</pre><p>3. And finally to run the Filebeat Container which will be emitting logs to LogStash on “heartbeat-elk:5044”</p><pre>docker run --rm \<br>-v /opt/mountedLogDirectory/:/opt/mountedLogDirectory/ \<br>--net=host \<br>--add-host heartbeat-elk:0.0.0.0 \<br>-t heartbeat-filebeat</pre><h3>Setting up service</h3><ol><li>The only thing required on the service was to update it’s logback to start producing Logs encoded in a format LogStash expects, which I referenced <a href="https://github.com/logstash/logstash-logback-encoder">this</a> to understand and thus created the logback.xml below; this writes to STDOUT in the known format while also producing a log using the LogStash Encoder library.</li></ol><pre>&lt;?<em>xml version</em>=&quot;1.0&quot; <em>encoding</em>=&quot;UTF-8&quot;?&gt;<br>&lt;configuration&gt;<br>    &lt;appender <em>name</em>=&quot;STDOUT&quot; <em>class</em>=&quot;ch.qos.logback.core.ConsoleAppender&quot;&gt;<br>        &lt;encoder&gt;<br>            &lt;pattern&gt;%d{HH:mm:ss.SSS} [%thread] %-5level [%X{mdc.token.key}] %logger{36} - %msg%n&lt;/pattern&gt;<br>        &lt;/encoder&gt;<br>    &lt;/appender&gt;<br><br>    &lt;appender <em>name</em>=&quot;JSON_FILE&quot; <em>class</em>=&quot;ch.qos.logback.core.rolling.RollingFileAppender&quot;&gt;<br>        &lt;rollingPolicy <em>class</em>=&quot;ch.qos.logback.core.rolling.TimeBasedRollingPolicy&quot;&gt;<br>            <em>&lt;!-- Daily rollover --&gt;<br>            </em>&lt;fileNamePattern&gt;/opt/mountedLogDirectory/heartbeat-logs/%d{dd-MM-yyyy}.log.json&lt;/fileNamePattern&gt;<br>            <em>&lt;!-- Keep 2 days&#39; worth of history --&gt;<br>            </em>&lt;maxHistory&gt;2&lt;/maxHistory&gt;<br>        &lt;/rollingPolicy&gt;<br>        &lt;encoder <em>class</em>=&quot;net.logstash.logback.encoder.LogstashEncoder&quot;&gt;<br>            &lt;timestampPattern&gt;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&lt;/timestampPattern&gt;<br>            &lt;shortenedLoggerNameLength&gt;36&lt;/shortenedLoggerNameLength&gt;<br>            &lt;includeMdcKeyName&gt;mdc.token.key&lt;/includeMdcKeyName&gt;<br>            &lt;mdcKeyFieldName&gt;mdc.token.key=X-correlation-id&lt;/mdcKeyFieldName&gt;<br>            &lt;customFields&gt;{&quot;service&quot;:&quot;${SERVICE_NAME}&quot;, &quot;env&quot;:&quot;${RUN_ENVIRONMENT}&quot;}&lt;/customFields&gt;<br>        &lt;/encoder&gt;<br>    &lt;/appender&gt;<br><br>    &lt;springProfile <em>name</em>=&quot;test&quot;&gt;<br>        &lt;root <em>level</em>=&quot;DEBUG&quot;&gt;<br>            &lt;appender-ref <em>ref</em>=&quot;STDOUT&quot; /&gt;<br>            &lt;appender-ref <em>ref</em>=&quot;JSON_FILE&quot; /&gt;<br>        &lt;/root&gt;<br>    &lt;/springProfile&gt;<br>&lt;/configuration&gt;</pre><p>2. To make this work, I had to add the following dependencies in my pom.xml</p><pre>----<br>&lt;logstash.encoder.version&gt;6.6&lt;/logstash.encoder.version&gt;<br>&lt;logback.version&gt;1.2.3&lt;/logback.version&gt;</pre><pre>----<br>&lt;dependency&gt;<br>   &lt;groupId&gt;net.logstash.logback&lt;/groupId&gt;<br>   &lt;artifactId&gt;logstash-logback-encoder&lt;/artifactId&gt;<br>   &lt;version&gt;${logstash.encoder.version}&lt;/version&gt;<br>&lt;/dependency&gt;<br>&lt;dependency&gt;<br>   &lt;groupId&gt;ch.qos.logback&lt;/groupId&gt;<br>   &lt;artifactId&gt;logback-core&lt;/artifactId&gt;<br>   &lt;version&gt;${logback.version}&lt;/version&gt;<br>&lt;/dependency&gt;<br>&lt;dependency&gt;<br>   &lt;groupId&gt;ch.qos.logback&lt;/groupId&gt;<br>   &lt;artifactId&gt;logback-classic&lt;/artifactId&gt;<br>   &lt;version&gt;${logback.version}&lt;/version&gt;<br>&lt;/dependency&gt;</pre><p>My general advice would be to have better nodes for ELK deployment with at least 6–10GB RAM</p><p>I also had to create VMs with few tweaked parameters, particularly the one to increase the vm.max_map_count count as mentioned <a href="https://elk-docker.readthedocs.io/#es-not-starting-max-map-count">here</a>, on Azure:-</p><pre>{<br>  &quot;sysctls&quot;: {<br>    &quot;vmMaxMapCount&quot;: 262144<br>  }<br>}</pre><p>Command to create a new nodepool named “himemorypool” with the tweaked VM parameter saved in a json file(linuxOsConfig.json) containing nodes of type: standard_d4s_v3 and also has custom labels, tags associated for Node Affinity:-</p><pre>az aks nodepool add \<br>--name himemorypool \<br>--cluster-name your-aks \<br>--resource-group your-resource-group \<br>--node-vm-size standard_d4s_v3 \<br>--labels osType=configured \<br>--tags osType=configured \<br>--mode User \<br>--linux-os-config &lt;path-to-file&gt;/linuxOsConfig.json \<br>--node-count 3</pre><p>Now, once I had the new Nodepool with better resources created, I needed to setup an affinity for my ELK containers to be only scheduled on these nodes which I achieved by using the following YAML that mandates this node affinity using `requiredDuringSchedulingIgnoredDuringExecution` annotation. More can be found <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/">here</a> :-</p><pre>--- ELK Deployment YAML<br>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: heartbeat-elk<br>  namespace: your-namespace<br>spec:<br>  replicas: 1<br>  template:<br>    metadata:<br>      labels:<br>        name: heartbeat-elk<br>    spec:<br>      containers:<br>        - name: heartbeat-elk<br>          image: registry.azurecr.io/heartbeat-elk:${VERSION_DEPLOY}<br>          imagePullPolicy: Always<br>          resources:<br>            requests:<br>              cpu: 2000m<br>              memory: 6Gi<br>            limits:<br>              cpu: 3000m<br>              memory: 10Gi<br>          ports:<br>            - name: kibana-port<br>              containerPort: 5601<br>            - name: logstash-port<br>              containerPort: 5044<br>          env:<br>            - name: ES_CONNECT_RETRY<br>              value: &quot;60&quot;<br>          volumeMounts:<br>            - mountPath: /var/lib/elasticsearch<br>              name: heartbeatvolume-test-elk<br>      affinity:<br>        nodeAffinity:<br>          requiredDuringSchedulingIgnoredDuringExecution:<br>            nodeSelectorTerms:<br>              - matchExpressions:<br>                  - key: osType<br>                    operator: In<br>                    values:<br>                      - configured<br>      volumes:<br>        - name: heartbeatvolume-test-elk<br>          azureFile:<br>            secretName: your-secrets<br>            shareName: heartbeatvolume-test-elk<br>            readOnly: false</pre><p>YAML for Filebeat to be mounted to same directory where logs are being produced:-</p><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: heartbeat-filebeat<br>  namespace: your-namespace<br>spec:<br>  replicas: 1<br>  selector:<br>    matchLabels:<br>      name: heartbeat-filebeat<br>  template:<br>    metadata:<br>      labels:<br>        name: heartbeat-filebeat<br>    spec:<br>      containers:<br>        - name: heartbeat-filebeat<br>          image: registry.azurecr.io/heartbeat-filebeat:${VERSION_DEPLOY}<br>          imagePullPolicy: Always<br>          resources:<br>            requests:<br>              cpu: 100m<br>              memory: 1Gi<br>            limits:<br>              cpu: 500m<br>              memory: 2Gi<br>          env:<br>            - name: RUN_ENVIRONMENT<br>              value: &quot;test&quot;<br>          volumeMounts:<br>            - mountPath: /opt/mountedLogDirectory/<br>              name: heartbeatvolume-test<br>      volumes:<br>        - name: heartbeatvolume-test<br>          azureFile:<br>            secretName: your-secrets<br>            shareName: heartbeatvolume-test<br>            readOnly: true</pre><h3>Fixing the ILM policy</h3><ol><li>Once all of these were in place, I checked our Kibana dashboard at our host IP on port 5601. Then we moved to the Stack Management section by going to <em>Hamburger icon on left top &gt; Management &gt; Stack Management</em></li></ol><p>2. Created an index named “<em>logstash-*</em>”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CInm3Hz0w31VUmkIPojvtA.png" /></figure><p>3. I found an already existing Index post step #2, in the format “logstash-YYYY.MM.DD-000001”, which calmed me, as it meant everything is hooked up perfectly.</p><p>4. It had the default lifecycle policy named “logstash-policy” and rollover alias “logstash” tagged to it, as shown in pictures below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K311hx0VTttFS1g0B_NSPg.png" /></figure><p>5. Now I needed to remove those Lifecycles temporarily. Why? Because even if you edit an ILM policy, it’s properties won’t get applied to indices created prior to this update. So we remove the lifecycle, edit the policy and then add the lifecycle back to apply it to this originally created index too. Removal was done by selecting the index, and then going to right bottom corner <em>Manage &gt; Remove Policy</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s50e1AVw1OkjmFBiLwiqJA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Au26FgOaY57PWtNIJO_DKw.png" /></figure><p>6. I edited the “logstash-policy” by going to <em>Data &gt; Index Lifecycle Policies</em>, as shown below. In this case, I changed the rollover period to 1 minute and deletion to happen after 3 minutes for testing and then ultimately settled with changing minutes by days after verifying that it worked.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2JGtmk2STlKFtv_kQYJ2wQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T5QwtSVyO2jHmDrlGALU_w.png" /></figure><p>7. Once this was done I went to DevTools under Management and ran HTTP requests to see the ILM policy related details being applied to my indices</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YiWJOuKTHpbi3VqPEjlX1w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wUxpY81-bmIJvHzL4xG10w.png" /></figure><p>8. ELK takes upto 10 minutes to check &amp; run the lifecycle stages, so don’t worry if you don’t see the stages being rolled-over or deleted right after your mentioned periods. e.g. if you have configured for roll-over after 1 minute, it might take 10 minutes for this status check and initiate rollover.</p><p>9. Lastly I had edited those policies to rollover after 1 day and delete post 3 days from rollover and that can be seen from following snapshots</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B7jaDbcaSqB56_4Rh_JhIw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b2KLae-39QiCWf0jw7a0qw.png" /></figure><p>10. Yeah the theme doesn’t get auto-changed to Dark post your Rollover, you need to do that from Stack Management &gt; Advanced Settings &gt; Dark Mode ;)</p><p>Hope it helps, and saves time to get started with ELK setup powered with ILM.</p><p>References:-</p><ul><li><a href="https://elk-docker.readthedocs.io/">https://elk-docker.readthedocs.io/</a></li><li><a href="https://docs.microsoft.com/en-us/azure/aks/use-multiple-node-pools">https://docs.microsoft.com/en-us/azure/aks/use-multiple-node-pools</a></li><li><a href="https://github.com/spujadas/elk-docker/blob/master/logstash-beats.crt">https://github.com/spujadas/elk-docker/blob/master/logstash-beats.crt</a></li><li><a href="https://github.com/logstash/logstash-logback-encoder">https://github.com/logstash/logstash-logback-encoder</a></li><li><a href="https://www.elastic.co/guide/en/logstash/7.x/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-manage_template">https://www.elastic.co/guide/en/logstash/7.x/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-manage_template</a></li><li><a href="https://stackoverflow.com/questions/63324172/index-lifecycle-policy-for-deleting-old-indices">elasticsearch — Index Lifecycle policy for deleting old indices — Stack Overflow</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb9bfb0ae979" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[After spending 5 years in Tech, my advice to final year students in college]]></title>
            <link>https://medium.com/swlh/after-spending-5-years-in-tech-my-advice-to-final-year-students-in-college-a290ed544821?source=rss-521d227fa4b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/a290ed544821</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[college]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[covid19]]></category>
            <dc:creator><![CDATA[Neo Ver]]></dc:creator>
            <pubDate>Sat, 06 Jun 2020 12:19:22 GMT</pubDate>
            <atom:updated>2020-06-13T14:06:43.634Z</atom:updated>
            <content:encoded><![CDATA[<h3>After spending 5 years in Tech, my advice to Final year students in College</h3><figure><img alt="Cracking a coding interview in these tough times" src="https://cdn-images-1.medium.com/max/1024/0*l2cJFHD0nw535s--" /><figcaption>Photo by <a href="https://unsplash.com/@andrewtneel?utm_source=medium&amp;utm_medium=referral">Andrew Neel</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>We know time’s are tough and getting a job in tech for those who are in college, seems like a tough nut to crack now.</p><p>But nothing beats the fundamentals, if you stick to the basics and have a bit of a luck, things might just work out for you.</p><p>I was thinking what would I advise myself had I been in this state, having the pressure to secure a job in my final year, even after knowing that many who already had jobs have lost it due to this crisis. So I ended up summarising those thoughts I feel are important to consider right now, as following:-</p><p><strong>1. Language — </strong>When we are in college this is one thing everyone obsesses about; how many languages does someone know to code in. I used to feeling insecure knowing my friend next room could code in 5 languages! Now, I just laugh on those thoughts.</p><blockquote>Language is just a tool</blockquote><p>Imagine yourself in 1920, you and your friend both are farmers, each of you own some piece of land, would you be worried if you got to know that your friend knows 5 tools, probably no. As long as you know how to use the tools you have and the farming skills, you’re sorted. It’s exactly similar.</p><p>Pick a language, any language you feel comfortable with and master it. I keep following this thought of my own:</p><blockquote>Be a Jack of all trades and master of one</blockquote><p>It’s good to know multiple languages, that helps you understand what thought process designers of a language had, which one will suit better and when, remember it’s a tool. Knowing multiple languages helps you use the perfect tool for your problem. But at this stage you’re okay even by just sticking to one.</p><p>I’d suggest you to have a full grasp on any OOP language, pick Python for example, it’s one of the most sought after language in industry and considering the situation we’re getting into I believe it’s going to rule backend development.</p><p>If you’re into frontend or want to be a full stack developer, have a sound understanding of Javascript and a framework such as React, Angular or Vue.js</p><p>There’s plenty of resources on internet to learn a language, some are :-</p><p>i. <em>It’s own documentation</em> — Language writers document what are the offerings of any language and that’s the first source to understand what it does. For example, Python’s documentation is <a href="https://docs.python.org/3/tutorial/index.html">here</a></p><p>ii. <em>Learning by doing </em>— If you find going through documentations boring, you have platforms like <a href="https://www.hackerrank.com/">HackerRank</a>, <a href="https://www.hackerearth.com/">HackerEarth</a>, <a href="https://leetcode.com/">LeetCode</a> where you can learn articles and solve problems that will prevent you from dodging off and will provide you hands-on experience.</p><p>iii. <em>Books</em> — You can always search for the books on the languages in your college library or in the book store. Personally, I haven’t been a big fan of books because they don’t get updated automatically like online sources do. Software keeps evolving there are new functions, features being released and some older ones being deprecated owing to the current state of development. That’s why I prefer online tools over offline ones. But if Books are the way for you, then I’m sure Internet can help you with good list of books too.</p><figure><img alt="Data Structures and Algorithms" src="https://cdn-images-1.medium.com/max/1024/0*P7z2ccc9FHBcJs3A" /><figcaption>Photo by <a href="https://unsplash.com/@markusspiske?utm_source=medium&amp;utm_medium=referral">Markus Spiske</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>2. Data Structures &amp; Algorithms — </strong>If Language is your tool, Data Structures &amp; Algorithms or popularly known as DSA is your technique. I can’t stress enough on this that DSA is the primary area of evaluation when you’re fresh out of college. Because the industry knows you didn’t have any real life experience of developing Softwares for a living, but they know that any Software is developed on two core items: <em>Data Structures which defines how the data should be stored</em> and <em>Algorithms which lays out the flow of execution</em> of this data to result in the desired output. Thus DSA is the principal skill of evaluation of fresh candidates in a Job interview.</p><blockquote>Once you have picked a language of your choice understand how the common Data Structures like Arrays, Lists, Dictionaries, Stacks, Queues, Graphs are implemented in that language. Understand it in such a way that you could even implement those Data Structures on your own if asked to, so go to the source code, read the comments, understand its implementation, believe me it’ll also give you perspective in how to write good code.</blockquote><p>After understanding the DS read about the famous Algorithms and their implementations, understand what is the time &amp; space complexity for an algorithm. It’s of paramount importance.</p><p>Any tech interview assesses you on 3 elements :-</p><ol><li>The <em>Data Structure</em> you use to store/handle the data</li><li>The <em>Algorithm</em> you use to solve the problem</li><li>The <em>Complexities</em>: space and time. Can you optimise it ?</li></ol><p>Whenever you see any problem think about these 3 things before jumping on to writing solution. There are plenty of Books and resources available on internet such as portals like <a href="https://www.geeksforgeeks.org/">GeeksForGeeks</a>. If you want to read about DS for job interviews that’s a different ballgame than when you read about it in a classroom. Because theories are intended for you to understand the basics, so that may be tomorrow you can be an inventor of a new Data Structure or Algorithm but, in Job interviews you’re tested on how you can utilise the tools(language) and techniques(DSA) at your disposal to tackle the problem at hand on your daily job.</p><figure><img alt="Github" src="https://cdn-images-1.medium.com/max/1024/0*MmLdctrHcu1OKrO_" /><figcaption>Photo by <a href="https://unsplash.com/@yancymin?utm_source=medium&amp;utm_medium=referral">Yancy Min</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>3. Pet Projects — </strong>After having a grasp on a language and understanding the DSAs its time to put all the pieces together and to make it functional. Any Software that we use in our day-to-day lives were made using the same principles, they solved a problem by using the tools &amp; techniques they thought fitted best for their problem.</p><p>You know one thing that all Softwares have in common; they always start small. Be it an application like WhatsApp, a language like Python, a library like Apache Commons Lang or, a framework like Django, they all started small somewhere and then became big when people invested their time on it and kept on adding more functionalities.</p><p>We’re living in an era when Open Source is powering literally every company major or minor.</p><p>Tech industry heavily relies on the tools and technologies that are open for use and has been contributed by motivated developers for free. It helps everyone to save time on re-inventing the wheel. My suggestion would be to create an account on <a href="http://github.com/">Github</a> and explore it. Read about the tools that interest you, read their documentation, source code and additionally understand how the software Git works in itself. It might be too complex for now but have an overview. Because chances are you’ll be using it at your workplace later and having the working understanding of it will be definitely advantageous.</p><p>Once you have an understanding of Git as a tool and Github — the platform use it for either implementing any small ideas of your own and open source it or, contribute to any existing open source project that interests you. I can assure you that your Github profile will have significant advantage over your Facebook profile in a tech interview.</p><blockquote>Learn how to clone, commit, push and ship something on Github. Contribute to it.</blockquote><figure><img alt="Machine Learning" src="https://cdn-images-1.medium.com/max/1024/0*3YjvaTWi6gOh6FpX" /><figcaption>Photo by <a href="https://unsplash.com/@franckinjapan?utm_source=medium&amp;utm_medium=referral">Franck V.</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>4. Machine Learning &amp; Artificial Intelligence— </strong>I’m sure you’re aware of this new buzzword in tech town about ML &amp; AI. This is the new era of computing. Everyone’s onto it. Every company is trying to establish itself as a significant player in this domain because it gives them their superiority and also because it’s important due to the competition that gets fuelled by it. We were already sitting on tons of data and now we have the tools to process, analyze &amp; understand it.</p><blockquote>You have to have an understanding of ML &amp; AI, it’s not a choice.</blockquote><p>Although, at this stage, it’s good to have even just a basic understanding of it, read about it in your leisure. It’s an ocean so don’t sabotage what’s currently expected from you(DSA for instance) by going deep into MLAI. Although if you have time feel free to explore, it’s quite interesting actually. Also, if you have a Python background that will help, as majority of tools and libraries in this area use Python, check <a href="https://www.tensorflow.org/">TensorFlow</a> for example.</p><p>For the workforce you’d be joining it’ll be a necessary skill in a few years, to have a hold on MLAI concepts and to use the related tools. Hence at this time I’d advise you to understand about it’s first principles, because if you are clear with the fundamentals it doesn’t matter what tools you’ll be using in future the basics will never change.</p><p>Part of understanding the rudiments of MLAI also consists of reading about Statistics and Probability. Refresh on it. Have a sound understanding of those concepts, they’ll come in handy for comprehending MLAI concepts.</p><figure><img alt="Social Networking" src="https://cdn-images-1.medium.com/max/1024/0*xxjXRuA4_bDRXoVB" /><figcaption>Photo by <a href="https://unsplash.com/@helloimnik?utm_source=medium&amp;utm_medium=referral">Hello I&#39;m Nik 🎞</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>5. Social Networking — </strong>Considering the population that has the required skill sets now, it’s obvious that the competition has gotten fierce. Remember, coding is a skill so your background or the number of years of experience in it doesn’t matter as much as your actual skills. Someone with a non CS background can write a better code or can develop something optimal than you. So do not think having a degree from college or even any certificates matters to the industry, especially these days when anyone can have them.</p><blockquote>The mantra is to focus on real experience of writing softwares over acquiring certificates or badges by registering or buying them. No one cares.</blockquote><p>Even if you have the skills, to get ahead in the line of applicants you need connections. I’d recommend you to have a <a href="https://linkedin.com/">LinkedIn</a> profile created right now. Start filling your achievements and you’ll understand where you stack up against the other profiles you’ll see there. It’s a place where you can show off your skills to people in the industry and recruiters directly. Use it to your advantage. Those who are already there have an edge over you. Specially in these crisis times, you’ll always cherish having a good network of people who know your work or at least have a way to reach you based on your skills.</p><p>One more advice on this would be to not be afraid of rejections. If you’re interested in some Professor’s work do not hesitate to drop a message, mail them your work. If they like it, they’ll reply you. If not, what’s the damage anyway!</p><figure><img alt="Coding Challenges" src="https://cdn-images-1.medium.com/max/1024/0*JpeOhCDCQ4iUoqyH" /><figcaption>Photo by <a href="https://unsplash.com/@cdr6934?utm_source=medium&amp;utm_medium=referral">Chris Ried</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>6. Participate in Challenges —</strong> Once you have the tools, techniques and skills ready it’s time to test it! Register yourself on coding platforms such as <a href="https://www.codechef.com/">CodeChef</a>, <a href="https://codeforces.com/">CodeForces</a>, <a href="http://hackerrank.com/">HackerRank</a>, <a href="http://hackerearth.com/">HackerEarth</a>, <a href="https://leetcode.com/">LeetCode</a> whichever suits your taste and pace. For cracking any interview practise is the key, it doesn’t matter how good you were at some point or, what your IQ is.</p><blockquote>One who has practised will always have significant advantage over others.</blockquote><p>It’s like a war, even you have your gears on and the best weapons, you just won’t have the reflex or tactics to utilise them when required and thus you’ll lose it. Participating in these challenges will keep you on edge and also work as a continuous feedback loop for assessment. Also, while practising go for the timed contests, because that’s what real interviews would be. You won’t have the chance for coming up with the ideal solution in 4 hours, you’ll be racing against time so keep that in mind. In fact, if you’re performing well in CodeChef or CodeForces short contests, trust me, chances of doing great in your interview are pretty high. So keep learning and practising together, it’s a parallel process not a serial one.</p><figure><img alt="Luck" src="https://cdn-images-1.medium.com/max/1024/0*AH84rYEEV52gSFXq" /><figcaption>Photo by <a href="https://unsplash.com/@markusspiske?utm_source=medium&amp;utm_medium=referral">Markus Spiske</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>7. Luck — </strong>Yeah, I know, so far you have done great in your school, college. You have good grades and have practised tons of coding challenges too, so why do you need luck.</p><blockquote>Well, believe it or not, so far in my experience I can say cracking an interview is 60% tech skills, 10% soft skills and 30% luck.</blockquote><p>Now when I say luck, it basically consists of all those unknown random things that happen which are not in your control.</p><p>Got late for the interview because you had a flat tyre and the interviewer had already made up his mind about some other candidate that got interviewed before you ? well, that’s luck.</p><p>Didn’t answer the solution by following the approach the interviewer wanted to hear, even when it was correct overall? that’s luck too.</p><p>You can’t do anything about them and just have to accept the result by owing it to this “luck” factor. The only thing in your hand is to keep preparing and interviewing and hope some day this luck is in your favour or at least neutral.</p><figure><img alt="Mindfulness" src="https://cdn-images-1.medium.com/max/1024/0*OnSw2wwGVdWAaKMG" /><figcaption>Photo by <a href="https://unsplash.com/@khouser01?utm_source=medium&amp;utm_medium=referral">Keegan Houser</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>8. Mindfulness— </strong>The feeling of having a secure job after passing out of your college is an unparalleled emotion. It’s an experience of lifetime. There are so many <em>firsts</em> associated to it.</p><p>But not having one might be emotionally taxing for many, and it’s understandable. It’s always important to remember it’s a journey with a destination, it might get over soon for some and some might arrive later and that’s okay. Until the destination is reached, keep sailing, keep practising, correct your course if required. Discuss with your friends who have already made it, talk to seniors. Talk to your friends and family. It’s at times like these we realise the true value of people we have in our lives.</p><blockquote>It takes a Pandemic to realise us as humans again.</blockquote><p>While preparing it’s very easy to ignore your health, but remember I told you cracking an interview is like a war, you can’t fight it without being physically and mentally sound, no matter what tools or armours you have at your disposal. So do not ignore either your physical health or your mental health. Exercise, practise Yoga, go for a walk or run, do whatever it takes to take a break and focus on yourself for a bit. Use apps like <a href="https://play.google.com/store/apps/details?id=com.getsomeheadspace.android">HeadSpace</a>, <a href="https://play.google.com/store/apps/details?id=com.calm.android">Calm</a> if it helps. Sleep and eat properly, it’s important. It’s a marathon and not a sprint, so pulling out an all nighter will just make you lousy the other day.</p><p>You need to understand and accept that the times are tough, and they are not going to be over anytime soon, so even if you’re getting rejected continuously, do not give hope. You’ll reach there. Have faith in you and your efforts.</p><p>I’d also recommend to find beauty in this craft — Coding. I believe Software development is an art which has science underlying it. The sheer ability to be able to convert your ideas into something impactful that touches other lives is so powerful. Have an idea ? Create an app or a website. Who knows may be while going through these tough times you get some idea that the entire world was just waiting for.</p><p>Did you know that WhatsApp co-founder Brian Acton was <a href="http://fortune.com/2014/06/05/whatsapps-acton-facebook/">rejected by Facebook</a> when he applied for a job there in 2009. In 2014, the messaging service sold itself to the social network for $19 billion, making Acton, among others, wildly wealthy.</p><blockquote>So the bottom line is, don’t give up and never loose hope!</blockquote><p>Always keep in mind that everyone has their own unique journey and when you look back that’s exactly what differentiates you from everyone else. Because the experiences you gain and the kind of person you become, gets shaped during that journey.</p><figure><img alt="Sailing in Storm" src="https://cdn-images-1.medium.com/max/1024/0*qElJPWAI6ZMKSRGJ" /><figcaption>Photo by <a href="https://unsplash.com/@jeremybishop?utm_source=medium&amp;utm_medium=referral">Jeremy Bishop</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote>Good luck sailing in storm…</blockquote><p>Some additional resources for reference :-</p><ol><li><a href="https://info.hackerrank.com/rs/487-WAY-049/images/HackerRank-2020-Developer-Skills-Report.pdf">HackerRank’s 2020 Developer Skills Report</a></li><li><a href="https://www.flipkart.com/introduction-algorithms-3rd/p/itmdwxyrafdburzg">Book: Introduction to Algorithms</a></li><li><a href="https://www.flipkart.com/data-structures-algorithms-made-easy/p/itmezunqtqmhwwcf">Book: Data Structures and Algorithms Made Easy</a></li><li><a href="https://www.flipkart.com/operating-system-concepts/p/itmdytmgzqvszmq6">Book: Operating System Concepts</a></li><li><a href="https://www.amazon.in/Cracking-the-Coding-Interview/dp/0984782869">Book: Cracking the Coding Interview</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a290ed544821" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/after-spending-5-years-in-tech-my-advice-to-final-year-students-in-college-a290ed544821">After spending 5 years in Tech, my advice to final year students in college</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Views on “Views”]]></title>
            <link>https://neover.medium.com/views-on-views-6e8ed5b759a3?source=rss-521d227fa4b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e8ed5b759a3</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[database-design]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[database-development]]></category>
            <dc:creator><![CDATA[Neo Ver]]></dc:creator>
            <pubDate>Sat, 29 Sep 2018 21:42:29 GMT</pubDate>
            <atom:updated>2018-09-30T06:02:27.051Z</atom:updated>
            <content:encoded><![CDATA[<p>No, we’re not going to discuss about Philosophy. We’re talking about Database Views, which I believe are quite underrated!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RJfqNMfbmnXw3NVQBFLCOg.jpeg" /></figure><p>Views in database context are defined as logical database objects referred as “virtual table”; for the user it’s like a table where you can run queries and get results but internally it doesn’t store that data. Cool right?</p><p>As Wikipedia defines it:</p><blockquote>A <strong>view</strong> is the result set of a <em>stored</em> query on the data, which the database users can query just as they would in a persistent database collection object. This pre-established query command is kept in the database dictionary. Unlike ordinary <em>base tables</em> in a relational database, a view does not form part of the physical schema: as a result set, it is a virtual table computed or collated dynamically from data in the database when access to that view is requested.</blockquote><p>Now, the first question that arises is why do we need a View when we already have tables. The answer to that are the advantages Views offer over tables:-</p><ol><li><strong>View provide an abstraction over tables</strong> — If you come from an Object-oriented programming background, you know the advantages of Interface and Abstract classes. Similar to them in database, View can be seen as an Interface to access the <em>real</em> underlying data. The user doesn’t need to worry about how those data are internally stored or joined to each other.</li><li><strong>Added flexibility for design </strong>— You must have faced the situation where you wanted to change the structure of a table or rename a column but couldn’t because you’re afraid where it might break things. Well, if you consume data from Views that won’t bother you ever. Because after changing the tables all you need to update is your View definition and you’re done. None of your consumers will ever get to know what changed underneath, so you can keep experimenting!</li><li><strong>Restricted access over your data </strong>— Since, Views are mostly defined to represent only the data that is supposed to be consumed by the users, your metadata like <em>created, modified on</em> or <em>by</em> won’t ever reach them. This gives you a better control over the access to the internal data that consumers have. Also, Views are read-only (generally), so no need to worry about giving direct access over your actual database tables and facing some nightmare of accidental data purge.</li><li><strong>Simplifies complex database querying </strong>— Have you ever been lost writing those long SQLs where at some point you start scratching your head and lose track what are you joining on with what, which variables are being sourced from where. Well I have, for sure. How can View help you with that? It’ll ensure that you scratch your head only once while writing it’s definition and will promise you to never bother again, until you go back and change something. Once View is created everyone else can just do a simple SELECT * FROM that view and will thus save time re-inventing the wheel. Isn’t it truly <a href="https://en.wikipedia.org/wiki/Don%27t_repeat_yourself"><strong>DRY</strong></a><strong>!</strong></li><li><strong>Especially beneficial for aggregations </strong>— Views can benefit you exceptionally if your SQL queries involve multiple joins across the tables and then do some aggregations like SUM, COUNT, AVERAGE etc. Cases like generating reports and analytics can utilize Views so that when queried gives you the latest calculated results from the database in a jiffy.</li><li><strong>Roles for privilege access </strong>— As we know Database Administrator (DBA) can define roles to represent different groups of users, and then grant membership in one or more roles to any specific user account (schema). In addition, they can grant table-level or view-level permissions to a role as well as to a specific user. This gives a granular control over the data access to different users in an organization. One of the most important uses of views is in large multi-user systems, where they make it easy to control access to data for different types of users.</li><li><strong>Enables backward compatibility and easier data migration </strong>— Planning for migrating to some other database or changing the schema? If you’re using Views for your data access then you’re in luck. Views can be used to provide a backward compatible interface to emulate a table that used to exist but whose schema has changed. Distributed queries can also be used to define views that use data from multiple heterogeneous sources. This is useful, for example, if you want to combine similarly structured data from different servers, each of which stores data for a different region of your organization.</li><li><strong>Parse once, run forever </strong>— Every time a query is run, it has to be parsed and loaded into the SQL optimizer, consuming valuable time and resources. If the query is saved as a view, then these overhead activities will only be performed once at the time the view is created.</li><li><strong>All these benefits at the cost of nothing </strong>— In general Views don’t store anything. The database contains only the definition of a view, not a copy of all the data that it presents. Unless indexed, a view does not exist as a stored set of data values in a database. Although the benefits of Views has been extended to store data under <a href="https://en.wikipedia.org/wiki/Materialized_view">Materialized views</a>, that’s not under the scope of this story.</li></ol><p><strong>As we all know there are always two sides to every story, Views have some disadvantages too, but honestly as per me they are totally outweighed by the benefits they offer.</strong></p><p>Some of the disadvantages of Views are :-</p><ol><li><strong>Performance </strong>— Querying data from a View might seem to be less performant, it can be slow especially if it is created based on other Views.</li><li><strong>Dependency </strong>— As we create a View based on underlying tables of the database. We need to update the View definition whenever we change the structure of these tables that the View is associated with.</li><li><strong>CRUD Support</strong> — Most of the Views are read-only and in fact that’s the best way to gain max out of them. But then one might need to execute INSERT, UPDATE, or DELETE operations on Views which is not normally supported by all Views. In general, in order to support these operations, the primary key and required fields must be present in the view.</li></ol><p>In conclusion, I believe we should always try to create a wrapper of Views over our underlying data if possible, specially while dealing with tables in a relational database.</p><p>Let me know your thoughts…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e8ed5b759a3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why relations matter]]></title>
            <link>https://neover.medium.com/why-relations-matter-c12e054cab8e?source=rss-521d227fa4b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/c12e054cab8e</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[database-development]]></category>
            <category><![CDATA[best-practices]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Neo Ver]]></dc:creator>
            <pubDate>Sat, 29 Sep 2018 10:36:37 GMT</pubDate>
            <atom:updated>2018-09-29T14:20:39.857Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tC_sK-gwoUaPkDZ7RObwBg.jpeg" /></figure><p>Once upon a time, no, actually yesterday, I was working on a project where we faced a problem that got me thinking, why do relations matter.. even in Database!</p><p>Okay, let me tell you the problem first. I had to store multiple sets of tuples, each corresponding to it’s type associated with a key in a relational database.</p><p>Overwhelmed? Don’t worry, the image below will hep you understand.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aFNM9IDaLOZ0Wd12rk_OEQ.png" /><figcaption>Keys have defined set of Types which contains a set of Tuples</figcaption></figure><p>This data was going to be accessed via the keys to get the associated sets of tuples for different types. I had two choices:-</p><p><strong>a</strong>. Dump the data into the DB via converting those sets to delimited tuples (CSV may be), and create a set out of them while reading from database by splitting them using the same delimiter or,</p><p><strong>b</strong>. Store the tuples into their respective “type” tables and assign a uniquely generated key to each of them. Similarly, assign generated ID to the main “key” and dump it to the database, and then, create “association” tables to map the relationships between the entities. <em>Tuples</em> will be mapped to <em>Keys</em> via Foreign Keys in the Association tables.</p><p>Obviously, option <strong>(a) </strong>looks <em>easy peasy</em> and in fact, makes sense at first too; looking at how the data is going to be accessed.</p><p>But obviously, as you’ve already guessed by now, I chose option <strong>(b)</strong> instead!</p><p>Reason? well, read on…</p><ol><li><strong>We obeyed First Normal Form</strong> — 1NF is the least one could expect from a relational database. A database is in first normal form if it satisfies the following conditions:-</li></ol><ul><li><em>Contains only atomic values</em></li><li><em>There are no repeating groups</em></li></ul><p>2. <strong>Optimal Storage utilization</strong> — 1NF helped us remove redundancy in storage and thus saving space. Even if a tuple occurs thousands of time for different keys, we’ll only save that tuple once in our database in option (b) which is not the case with option (a) where we’ll have to store the tuples as many times they occur.</p><p>3. <strong>Easier to query and analyze data </strong>— Consider the following questions to be answered via SQL queries:</p><blockquote>i.<em> </em>Get the list of keys having a particular tuple under a given type <em>— It’s a simple SQL join for option (b) while we’ll have to scan all the rows for this column containing value </em>like<em> the tuple we’re looking for in option (a)</em></blockquote><blockquote>ii. Get the key and the count of tuples containing maximum number of tuples for that particular type<em> — As you know in option (b), by using functions like “COUNT” and “MAX” you are already ready with the answer, while for getting the same results in option (a) we’ll have to split the values first by the delimiter and then take that count and do the same for all rows in that table. Done? now consider doing this for a table containing 2 Million rows and each column containing around 25 Thousand delimited tuples. How’re you feeling?</em></blockquote><p>4. <strong>Performant scans by creating index</strong> — To improve the performance of scanning we can create indices over the tuples, keys and the uniquely generated IDs under option (b). While indexing over the columns containing delimited tuples will be of no use and thus indexing can never help improve our lookup performance in option (a)</p><p>5. <strong>Maintenance made easy with partitions and sharding </strong>— If the data grows huge(which is usually the case) queries against it can no longer be completed within SLA requirements due to the amount of data that needs to be examined. We’ll have to then partition the data to make it manageable and improve query fetch times. But even if we partition the data in both the options (a) and (b) based on <em>keys</em>. Partitioned data in (a) will still be huge because over time, it grows horizontally and not vertically. Thus, making the effect of partitions go void.</p><p>6. <strong>What if my set grows enormously and breaches the specified limits</strong> — If we go via option (a), we can’t store a set longer than what fits in the column right? But fortunately, we’ll never encounter such limits in option (b), because the association mapping table can grow vertically as much as you want, that is what it the relational database has been designed for.</p><p>7. <strong>What if I want to access all tuples in some specified order</strong> —In cases where we want to list all distinct tuples in alphabetically sorted order. You understand how long will it take in option (a) where it has to identify all the unique values first(which will take ages to finish) and then sort them, while in option (b) they already are unique and sorting is trivial of course.</p><p>8. <strong>What if we want to join the tuples with some other table in future</strong> — As we know, we don’t know the future. If for some use case, we need to map the tuples associated with keys to some other data table in future, we’ll be doomed via option (a), while option (b) will smile at us!</p><p>9. <strong>Better understanding of your data</strong> — We can gain understanding over our data via simple SQLs, like what is the average tuple size, or what is the average number of tuples associated to the key for a mentioned type if we choose option (b). In fact, while inserting data we found out that some of the tuples being inserted were just being saved as “?” literals and not the actual characters. That’s when we got to know that the <em>Collation</em> type of our table didn’t support those Arabic characters, we changed that to appropriate type and voila! We could have never sensed that while persisting them in sets through option (a) and those tuples would have been sitting there, never being accessed and not to forget at the cost of removing the original values.</p><p>10. <strong>No delimiter can be God </strong>— No matter which delimiter you choose, you can never sleep with peace knowing that at some point, the delimiter you’ve chosen to split those tuples could be a part of the tuple itself. Option (a) has that vulnerability. As soon as any of our tuples start containing our chosen delimiter, things will start going haywire.</p><p><strong>Still not convinced ? OK, look what people say…</strong></p><blockquote>Sometimes you face the unfortunate situation that someone has stored list of comma-separated values in a table column. This is a very bad design, which is in direct conflict with the mindset that relational databases are designed from, to wit that a cell should hold a single value. These columns with comma-separated values should almost always be redesigned to be child tables. (The use of almost in the previous sentence is highly questionable. The exceptions are extremely rare.</blockquote><blockquote>— <a href="http://bit.ly/2IoKYQi">http://bit.ly/2IoKYQi</a></blockquote><blockquote>Accessing delimited data values embedded within a larger field generally results in [very] poor application performance. It almost always results in “Table Scans” because indexes can’t be meaningfully used.</blockquote><blockquote>The first antipattern that Bill Karwin discusses in his book <a href="http://rads.stackoverflow.com/amzn/click/1934356557">“SQL Antipatterns”</a> is <strong>Jaywalking</strong> (because an intersection is avoided). The antipattern specifically lists out the problems associated with storing comma separated values when you need to use them separately (for instance, querying the table becomes complicated)</blockquote><blockquote>— <a href="http://bit.ly/2DDbnLm">http://bit.ly/2DDbnLm</a></blockquote><blockquote>Doing it like you have suggested by cramming the tags into one field may seem to make sense now, but it will prove to be difficult to maintain and difficult/time consuming to pull the values out efficiently as your application grows in size or the amount of data grows a lot larger.</blockquote><blockquote>— <a href="http://bit.ly/2xYpNjg">http://bit.ly/2xYpNjg</a></blockquote><p>In conclusion, I believe we should always try to go with relational schemas in a relational database unless we have a very compelling reason not to do so!</p><p>Let me know your thoughts…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c12e054cab8e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>