Posts

Showing posts from 2025

Taking Control: From Simple Views to Powerful Exports 🗃️

👨‍🏫 Teaching Moment: Exporting Data Like a Pro It’s been such a rewarding journey guiding Kai through the world of database development. What makes it exciting is that he’s not just coding—he’s thinking about the “why” behind each line. 🧠 One of our latest breakthroughs involved adding a very practical feature: letting the user export data from the app as a CSV file they can save, open, or share. Kai: “I’ve got my grade report showing up perfectly. But how do I get it out of the app so I can send it to someone?” Me: “Great question, Kai! Displaying data is one thing—but exporting it? That’s next-level. We’ll add a button that generates a CSV file, so anyone can open it in Excel, Google Sheets, or any spreadsheet tool.” And so, our mission began: Build an Export to CSV feature. ❓ Why Bother? (Kai’s Classic Question) Kai: “If the data is already in the <GridView> , can’t we just copy it?” Me: “That might work for you, but think about scale....

👨‍💻 Making the College Portal Better & More Secure

  It's been a rewarding few weeks. We've gone from building out a new home page to creating a suite of content pages—for student living, careers, and announcements. The site is starting to feel like a real, functioning college portal. But as the app has grown, Kai and I have shifted our focus from simply adding features to making the existing ones more secure and user-friendly. This has been a crucial learning step for Kai. He's not just building what's visible; he's learning how to build a strong foundation that protects the data and provides a smooth experience for users. 🔑 Step 1: From Direct Queries to Stored Procedures In our initial work on the Students.aspx page, we were using direct SQL statements inside the C# code. This works, but it leaves the application vulnerable to a serious security threat called SQL injection. I explained to Kai that an attacker could input malicious code into a form field to delete data or access unauthorized information. To fix ...

🚀 Level Up Your C# App: From Raw SQL to Secure Stored Procedures

Our conversations on making apps cleaner, faster, and much more secure. It's been a rewarding journey guiding Kai through the world of database development. He's not just following along; he's truly understanding the "why" behind every decision. Recently, we tackled a critical concept: moving from direct SQL queries to secure, efficient stored procedures. Kai: "I’ve got my queries working — they pull back data just fine. Why do we need to change it?" Me: "Great question, Kai. Direct SQL works, but when we think about security, performance, and maintainability, stored procedures give us a big step up." So, in this post, we'll walk through four real examples from our student management system, showing how we replaced direct queries with stored procedures. This is a crucial step in building robust, professional-grade applications. Why Bother? (Kai’s Persistent Question) Kai: "But if it works, isn’t that good enough for...
Image
👨‍💻 Helping Kai Build His First Front-End App It’s been a few weeks since my last post with Kai. We’ve been heads-down coding together, and instead of just talking about database security, we started building a working front end for his application. This has been a big step for Kai — going from SQL tables and stored procedures to actually seeing his app come alive in the browser. We used C# with ASP.NET Web Forms (ASPX) to create login and home pages, and then expanded into pages for courses, students, lectures, grades, and even a small library system.     🔑 Step 1: Building the Login Page Before you can get into the app, you need a secure login. We reused our earlier hashed + salted password system but wrapped it with an ASPX login form. <asp:TextBox ID="txtUsername" runat="server" Placeholder="Username"></asp:TextBox> <asp:TextBox ID="txtPassword" runat="server" TextMode="Password" Placeholder=...

Back to Japan – My First Long-Haul Flight After a Broken Hip ✨

Image
This summer, I took a big step—literally and emotionally. It was my first long-haul flight since breaking my hip, and I wasn't quite sure how my body would hold up on a journey halfway around the world. ✈️☝️ I contacted ANA in advance to let them know about my condition and the need to drink plenty of water due to kidney cysts. The cabin crew were absolutely amazing. 😍 They brought me water bottles frequently, made sure I was comfortable, and even offered extra blankets and pillows. It felt like I was flying business class again! 🍾✋ Though I had to get up and walk a lot (my leg tends to go numb if I sit too long), the journey was far better than expected. On arrival, I was also pleasantly surprised to find that British citizens can now use Japan’s priority immigration gates — no queues at all! 🇯🇵✅ My wife, being Japanese, could go through with me too, which isn’t usually the case in the UK. On Day 1, I met up with my friend Robbie at the airport and had a relaxi...

Teaching Kai About Cybersecurity: The CIA Triad, Strong Passwords, and SQL Injection Protection

Image
Introduction When it comes to cybersecurity, many people think of secret agents and high-tech gadgets. But in reality, protecting data online comes down to a simple yet powerful concept called the CIA triad — Confidentiality, Integrity, and Availability. In this post, I’ll share a teaching session I had with Kai, walking him through these principles and showing how they relate to building secure login systems. We’ll cover why strong passwords matter, how to detect SQL injection attacks, and how to write database functions and stored procedures to keep our systems safe. What Is the CIA Triad? CIA stands for: Confidentiality: Ensuring data is only accessible by those authorized to see it. Integrity: Making sure data isn’t altered or tampered with by unauthorized users. Availability: Guaranteeing data and systems are accessible when needed. These three principles are the foundation of cybersecurity and help guide how we design secure applications. The Con...

💻 Part 6: From Code to Click – Security, Permissions & Building Kai’s Dashboard

July 1, 2025 After learning stored procedures and date functions, Kai was ready for the next challenge: making the database safe   and building something real people could click and use. 🔐 Permissions: Who Gets to Do What? We started with a simple but powerful idea: not everyone should be able to change everything. I told Kai, “Imagine giving teachers the keys to mark attendance, but not delete students by accident.” We created roles in SQL Server: CREATE ROLE TeacherRole; GRANT EXECUTE ON MarkAttendance TO TeacherRole; Then added a user and assigned the role: CREATE LOGIN Teacher1 WITH PASSWORD = 'SecurePass123!'; CREATE USER Teacher1 FOR LOGIN Teacher1; EXEC sp_addrolemember 'TeacherRole', 'Teacher1'; “So Teacher1 can mark attendance, but nothing else?” Kai asked. Exactly. Principle of least privilege in action. 🔒 🧩 Kai’s First Dashboard UI Then the big one: Kai brought me a sketch a simple web page with two boxes: Who is enrolle...

🔄 Why I Live Frugally: My Turning Point Toward a Sustainable Life

Let’s be honest—frugal living isn’t just about saving money. For me, it became something bigger . Something deeper . Years ago, I worked at Tesco and saw something that’s stayed with me ever since: piles of perfectly good food thrown away . Not because it was spoiled, but because of "what ifs"—what if someone got sick, what if the date label caused issues. That’s when it hit me. We waste so much. And not just food— furniture, electronics, clothes, everything. Back then, we didn’t throw things away lightly. I grew up in the '80s and '90s, when frugality wasn’t a trend—it was normal . TVs cost £500 or more, and computers? £2,000+. If it broke, you didn’t bin it. You fixed it. You saved up. You upgraded. You made things last. And when the TV broke? You didn’t scroll Amazon for a new one—you called the TV repairman. Now? We live in a throwaway society , where mattresses are dumped on the street, clothes are worn once for Instagram, and most computers can’t even b...

⚖️ Growth, Judgment, and the ADHD Stereotype

Yesterday, I found myself in a conversation in an online group about ADHD and autism — a space that I usually turn to for support, learning, and connection. But this time, something felt off. There were several posts generalising people with ADHD, suggesting that most prisoners have ADHD and that “people like us” can’t change. Some even went as far as to say that those with ADHD are destined for crime or failure. I couldn’t stay quiet. 🧍 I Spoke Up – And Got Shot Down I shared a bit of my own truth. That I wasn’t a perfect kid. That yes, I made some bad choices growing up — but I learned, changed, and grew. That’s what people do when they’re supported and when they get the chance. But instead of thoughtful replies, I was attacked. Called contradictory. Accused of excusing crime. The irony? I was trying to show that people with ADHD can grow and take responsibility — and that it’s wrong to define someone solely by their past. 📢 ADHD Is Not a Life Sentence ADHD doesn’t mak...

Part 5: Stored Procedures, Date Functions & Real-World Reports 📆🛠️

After creating his first VIEW , Kai was buzzing with confidence. He said, “It’s like building a custom window into the data.” Exactly right. And that window is just the beginning — now, we’re ready to give him **buttons** to push. Enter: stored procedures . What’s a Stored Procedure? I explained it like this: “Imagine writing a script that does something useful — and then saving it with a name. Anytime you want to run it, you just call the name.” Kai’s eyes lit up. “So… like a shortcut?” Yep. And shortcuts matter when you’re dealing with real-world tasks, like enrolling students or checking attendance. CREATE PROCEDURE EnrollStudent @StudentID INT, @CourseName NVARCHAR(100) AS BEGIN INSERT INTO Enrollments (StudentID, CourseName, EnrollmentDate) VALUES (@StudentID, @CourseName, GETDATE()); END We ran it like this: EXEC EnrollStudent @StudentID = 3, @CourseName = 'Math Fundamentals'; Kai smiled: “So I just tell it what I want, and it figures out the rest?” That’s the magi...

✨ We’re Not Broken — We’re Wired Differently: Understanding ADHD, Autism, and Dyslexia ✨

One of the most common misunderstandings I come across is when people assume that conditions like ADHD, autism, and dyslexia are mental health problems. They’re not. These are neurodevelopmental conditions , and the difference between that and a mental health condition is incredibly important to understand. 🧠 Neurodevelopmental ≠ Mental Health Let’s get one thing clear: ADHD (Attention Deficit Hyperactivity Disorder) Autism (including what was once called Asperger’s) Dyslexia These are neurological, lifelong conditions that affect how the brain is wired — how someone processes information, learns, communicates, moves, and experiences the world. They are present from birth or develop early in life. In contrast, mental health conditions like depression, anxiety, PTSD, or bipolar disorder are typically related to mood, emotion regulation, trauma, or chemical imbalances. These can come and go, and often need very different forms of support. 🌍 So Why Does the Conf...

Teaching Kai and Ted About Money: From Pocket Money to Planning for the Future 💷🌱

Life moves fast, and so do teenagers. As Kai (17) and Ted (16) grow older, I’ve become more and more aware of how important it is to teach them about money — not just how to spend it, but how to manage, save, and eventually invest it too. I’ll be honest: I wasn’t great with money when I was younger. I grew up on a council estate, and while I didn’t have a bad life — in fact, I know others had it much tougher — I wasn’t really taught about saving or long-term thinking. I started working permanently at 15, and because I didn’t have much as a kid, I spent nearly everything I earned. I lived paycheck to paycheck, and saving was something I thought I could never afford to do. Fast forward to today — life looks different. I live much more frugally, but not joylessly. I still go out and enjoy myself, but I do it within my means. And now, I want better for my boys. I want them to have options, peace of mind, and financial confidence that I didn’t have when I was their age. Step One: Ba...

Learning to Protect the Data: Transactions, Rollbacks, and Responsibility 🛡️

As Kai’s confidence grew, it was time to introduce one of the most important concepts in professional database work: transactions . Up to this point, we’d explored how to change data, but not necessarily how to protect ourselves from mistakes — and trust me, every developer makes mistakes! 😅 We started by imagining the database like a bank . When you transfer money, it doesn’t just disappear from one account and magically appear in another — the system needs to make sure both actions happen together, or not at all. That’s where transactions come in. They act like a safety net, saying: “Only make these changes permanent if everything works correctly.” BEGIN TRANSACTION; -- Remove old course DELETE FROM Enrollments WHERE StudentID = 1 AND CourseName = 'History'; -- Add new course INSERT INTO Enrollments (StudentID, CourseName, EnrollmentDate) VALUES (1, 'Computer Science', GETDATE()); COMMIT TRANSACTION; Kai was fascinated. “So it’s like doing a swap, bu...

SQL & Smiles: Kai's Computing Adventure

Life, for our family, has always been a beautiful, colourful "mish-mash." From the bustling streets of Hong Kong and the serene beauty of Japan, to the vibrant energy of Singapore, and now back to the familiar comfort of the UK, we've collected stories, experiences, and a unique perspective on the world. And through it all, one constant joy has been watching my incredible son, Kai, grow. Kai is autistic, and I navigate the world with my own mix of dyslexia and ADHD. This means our learning journey, and indeed, our whole lives, are often a little different – sometimes challenging, but always full of unexpected triumphs. We find our own ways to connect, to learn, and to thrive. One of my biggest missions as a parent is to give Kai the best possible start in life, especially as he gets older and faces the challenge of finding his place in the working world. It's no secret that many talented neurodivergent individuals struggle to secure employment, often through no fa...