<?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 Dheeshana De silva on Medium]]></title>
        <description><![CDATA[Stories by Dheeshana De silva on Medium]]></description>
        <link>https://medium.com/@dheeshanadesilva2002?source=rss-90ffc063b51f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*nNYafSf3BPQQQ_RxzEHKSw.jpeg</url>
            <title>Stories by Dheeshana De silva on Medium</title>
            <link>https://medium.com/@dheeshanadesilva2002?source=rss-90ffc063b51f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 17:22:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dheeshanadesilva2002/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building a Secure Full-Stack Application: The BookFair 2026 Platform]]></title>
            <link>https://medium.com/@dheeshanadesilva2002/building-a-secure-full-stack-application-the-bookfair-2026-platform-90d2325a46d1?source=rss-90ffc063b51f------2</link>
            <guid isPermaLink="false">https://medium.com/p/90d2325a46d1</guid>
            <dc:creator><![CDATA[Dheeshana De silva]]></dc:creator>
            <pubDate>Mon, 31 Aug 2026 12:54:42 GMT</pubDate>
            <atom:updated>2026-08-31T12:54:42.866Z</atom:updated>
            <content:encoded><![CDATA[<p>Modern web applications require more than simply implementing CRUD operations. They need a well-structured architecture, secure authentication, reliable data management, and carefully designed access controls.</p><p>The <strong>BookFair 2026</strong> platform is a comprehensive full-stack application developed to manage book stalls, vendor reservations, ticket generation, and administrative operations. The project demonstrates how modern technologies and security practices can be combined to build a scalable and secure web-based system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vjn-LFHPrk8sEHijQUBaiw.png" /><figcaption>Figure 1: BookFair 2026 Login page</figcaption></figure><h3>Technology Stack &amp; Architecture</h3><p>The platform follows a modern full-stack architecture built with industry-standard technologies:</p><ul><li><strong>Frontend:</strong> React with Vite and Tailwind CSS</li><li><strong>Backend:</strong> Java 17 and Spring Boot</li><li><strong>Data Access:</strong> Spring Data JPA and Hibernate</li><li><strong>Database:</strong> PostgreSQL</li><li><strong>Authentication:</strong> Auth0 with OpenID Connect (OIDC)</li><li><strong>Token Generation:</strong> JWT</li><li><strong>QR Code Generation:</strong> ZXing</li><li><strong>Email Services:</strong> Automated email notifications</li></ul><p>The frontend communicates with the Spring Boot REST API, while PostgreSQL provides persistent data storage. Authentication and authorization are handled through a combination of Auth0 and application-level JWT-based security.</p><h3>Key Features</h3><p>The platform was designed to provide functionality beyond a traditional CRUD application.</p><h4>Interactive Stall Reservation</h4><p>Vendors can browse and select available stalls based on size and floor. The system supports different stall categories, including <strong>small, medium, and large stalls</strong>, while maintaining the availability status of each stall.</p><h4>Automated QR Code Ticketing</h4><p>After a successful reservation, the backend generates a unique QR code token using <strong>ZXing</strong>. The generated ticket is then automatically delivered to the vendor through email, providing a convenient digital reservation confirmation.</p><h4>Role-Based Access Control</h4><p>The system implements <strong>Role-Based Access Control (RBAC)</strong> with three primary roles:</p><ul><li><strong>ADMIN</strong> — Full access to system management and administrative operations</li><li><strong>EMPLOYEE</strong> — Access to assigned operational features</li><li><strong>VENDOR</strong> — Access to stall reservations and personal booking information</li></ul><p>Each role is provided with appropriate interfaces and API permissions to prevent unauthorized operations.</p><h4>Authentication with Auth0 and OpenID Connect</h4><p>Security is a core component of the platform. The initial authentication implementation used locally managed <strong>JSON Web Tokens (JWTs)</strong>. The authentication architecture was later enhanced by integrating <strong>Auth0</strong> using the <strong>OpenID Connect (OIDC)</strong> protocol.</p><p>The authentication flow works as follows:</p><ol><li>The user selects <strong>Continue with Google</strong> or <strong>Continue with Auth0</strong>.</li><li>The React application redirects the user to the Auth0 hosted authentication page.</li><li>After successful authentication, Auth0 redirects the user back to the application with an ID Token.</li><li>The ID Token is sent to the Spring Boot backend through the /api/auth/oidc-signin endpoint.</li><li>The backend validates the token using Auth0’s <strong>JSON Web Key Set (JWKS)</strong> and verifies its cryptographic signature.</li><li>Once the token is successfully validated, the system provisions the user in PostgreSQL if the account does not already exist.</li><li>A local JWT is then issued for maintaining stateless application sessions and enforcing application-level authorization.</li></ol><p>This architecture combines a dedicated identity provider with application-level role management, providing both secure authentication and control over internal authorization.</p><h3>Security Considerations: OWASP Top 10</h3><p>Security was incorporated into the architecture rather than treated as a final-stage enhancement. Several common web application vulnerabilities were addressed through appropriate design and implementation practices.</p><h4>SQL Injection</h4><p>Database operations are handled through <strong>Spring Data JPA and Hibernate</strong>, avoiding direct SQL string concatenation for application queries. This helps ensure that user-provided values are handled safely through parameterized database operations.</p><h4>Cross-Site Scripting (XSS)</h4><p>React automatically escapes values rendered through JSX, providing an important layer of protection against common XSS attacks. The application also avoids unsafe rendering patterns wherever possible.</p><h4>Cross-Site Request Forgery (CSRF)</h4><p>The API uses stateless authentication with JWTs transmitted through the Authorization: Bearer header rather than authentication cookies. This architecture significantly reduces traditional CSRF exposure associated with automatically submitted browser cookies.</p><h4>Broken Access Control and IDOR</h4><p>Access control is enforced on the backend rather than relying on frontend restrictions.</p><p>For example, instead of allowing a request such as:</p><p>GET /reservations/user/5</p><p>the application can identify the authenticated user directly from the validated security context and retrieve only that user’s reservations.</p><p>This prevents vendors from simply modifying a user ID in a request to access another vendor’s information.</p><h3>Challenges and Technical Lessons</h3><h4>Understanding the Opaque Token Problem</h4><p>One of the challenges encountered during Auth0 integration involved token validation.</p><p>The backend initially returned errors such as <strong>“Encrypted JWT rejected”</strong> when attempting to validate a token obtained through the Auth0 React SDK.</p><p>The underlying issue was related to requesting an access token without configuring an appropriate API audience. Depending on the Auth0 configuration, the resulting access token may not be a JWT suitable for direct application-level JWT validation.</p><p>The solution involved correctly distinguishing between <strong>ID Tokens</strong> and <strong>Access Tokens</strong>, configuring the Auth0 API audience appropriately, and ensuring that the backend validates the token type intended for the API.</p><p>This highlighted an important lesson: OAuth 2.0 and OpenID Connect tokens serve different purposes, and selecting the correct token for a particular security flow is essential.</p><h4>PostgreSQL and H2 for Development</h4><p>During development and testing, repeatedly running a local PostgreSQL instance added unnecessary overhead for certain development tasks.</p><p>Spring Boot’s support for <strong>H2 Database</strong> provided a lightweight alternative for rapid development and testing. The application configuration could be switched between H2 and PostgreSQL, allowing faster experimentation while preserving PostgreSQL as the primary production database.</p><h3>Key Learning Outcomes</h3><p>The development of the BookFair 2026 platform provided practical experience across several important areas of modern software engineering.</p><h4>Security as an Architectural Concern</h4><p>Security should not be treated as a feature added at the end of development. Authentication, authorization, token management, and protection against unauthorized data access must be considered during the architectural design stage.</p><h4>Practical Understanding of OIDC</h4><p>Integrating Auth0 provided hands-on experience with concepts such as <strong>OAuth 2.0, OpenID Connect, JWTs, JWKS, token claims, and identity providers</strong>.</p><p>Understanding the difference between authentication and authorization was particularly important when designing the application’s security architecture.</p><h4>Full-Stack Integration</h4><p>The project demonstrated how multiple components can work together within a complete application:</p><p><strong>React → Spring Boot REST API → Spring Data JPA → PostgreSQL</strong></p><p>Additional services such as QR code generation and automated email delivery extend the system beyond basic data management and demonstrate practical full-stack integration.</p><h3>Conclusion</h3><p>The <strong>BookFair 2026</strong> platform demonstrates how a modern full-stack application can combine functionality, security, and maintainability within a single system.</p><p>From interactive stall reservations and automated QR ticket generation to Auth0-based authentication and backend-enforced authorization, the project provided practical exposure to real-world software engineering challenges.</p><p>The most important lesson is that meaningful software development goes beyond writing code. Building real applications requires understanding architecture, security, authentication protocols, database design, API communication, and the trade-offs involved in choosing different technologies.</p><p>For developers learning full-stack development, building a complete application around a real-world problem can provide valuable experience that tutorials alone cannot offer.</p><p><strong>Explore the Codebase:</strong><br>The complete, sanitized source code for the Book Fair 2026 platform can be found on GitHub:<br><a href="https://github.com/Dheeshana-DeSilva/architecture_project">View the Repository Here</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90d2325a46d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beyond Localhost: A Beginner’s Guide to Deploying Full-Stack Apps]]></title>
            <link>https://medium.com/@dheeshanadesilva2002/beyond-localhost-a-beginners-guide-to-deploying-full-stack-apps-965379991a60?source=rss-90ffc063b51f------2</link>
            <guid isPermaLink="false">https://medium.com/p/965379991a60</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[full-stack-development]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Dheeshana De silva]]></dc:creator>
            <pubDate>Fri, 22 May 2026 17:50:54 GMT</pubDate>
            <atom:updated>2026-05-22T17:50:54.042Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HdKB4xUVlGs2qNxh09tEiA.png" /></figure><p>Building a full-stack application on your local machine is exciting. Everything feels smooth when the frontend runs on localhost:5173, the backend runs on localhost:5000, and the database connects perfectly.</p><p>But the real challenge begins when you want other people to use your application.</p><p>This is where deployment comes in.</p><p>Deployment means taking your application from your computer and making it available online. In simple words, it is the process of moving your project from <strong>localhost</strong> to the <strong>real world</strong>.</p><p>This article explains full-stack deployment in simple terms, covering hosting, environment variables, builds, databases, and common deployment issues.</p><h3>What Is Localhost?</h3><p>When you develop an application, you usually run it on your own computer.</p><p>For example, during development, your app may run like this:</p><ul><li><strong>Frontend:</strong>http://localhost:5173</li><li><strong>Backend:</strong> http://localhost:5000</li><li><strong>Database: </strong>running locally or connected through a cloud service</li></ul><p>This setup works only on your device. Other users cannot access your app because localhost means “this computer.”</p><p>So, when your app is ready, you need to host it on the internet.</p><h3>What Is Production?</h3><p>Production is the live environment where real users access your application.</p><p>For example: https://myapp.com</p><p>In production, your application should be:</p><ul><li>Secure</li><li>Fast</li><li>Stable</li><li>Connected to the correct database</li><li>Accessible from any device</li><li>Ready to handle real users</li></ul><p>Local development is for building and testing. Production is for real usage.</p><h3>Understanding Full-Stack Deployment</h3><p>A full-stack application usually has three main parts:</p><ul><li>Frontend → What users see</li><li>Backend → Business logic and APIs</li><li>Database → Where data is stored</li></ul><p>For example, in a MERN stack project:</p><ul><li>React → Frontend</li><li>Node.js → Backend</li><li>Express → API server</li><li>MongoDB → Database</li></ul><p>Each part must be deployed properly.</p><h3>Step 1: Prepare Your Project Before Deployment</h3><p>Before hosting your app, make sure your project works properly on your local machine.</p><p>Check these things first:</p><ul><li>Frontend runs without errors</li><li>Backend runs without errors</li><li>Database connection works</li><li>API requests work correctly</li><li>Login and register functions work</li><li>Images or file uploads work</li><li>No secret keys are exposed in the frontend</li></ul><p>Never deploy a broken project and expect hosting to fix it. Hosting platforms only run your project. They do not automatically solve coding issues.</p><h3>Step 2: Separate Frontend and Backend URLs</h3><p>In local development, your frontend may call the backend like this:</p><pre>http://localhost:5000/api/products</pre><p>This works locally, but it will not work in production.</p><p>After deployment, your backend will have a real URL, such as:</p><pre>https://my-backend.onrender.com</pre><p>So your frontend should call:</p><pre>https://my-backend.onrender.com/api/products</pre><p>A good practice is to store the backend URL in an environment variable.</p><p>Example:</p><pre>VITE_API_URL=https://my-backend.onrender.com</pre><p>Then use it in your frontend:</p><pre>const API_URL = import.meta.env.VITE_API_URL;</pre><p>This makes your project cleaner and easier to manage.</p><h3>Step 3: Understand Environment Variables</h3><p>Environment variables are used to store important configuration values.</p><p>Examples include:</p><pre>PORT=5000<br>MONGO_URI=your_database_connection_string<br>JWT_SECRET=your_secret_key<br>CLOUDINARY_API_KEY=your_cloudinary_key</pre><p>These values should not be written directly inside your code.</p><p>For example, avoid this:</p><pre>mongoose.connect(&quot;mongodb+srv://username:password@cluster.mongodb.net/app&quot;);</pre><p>Instead, use this:</p><pre>mongoose.connect(process.env.MONGO_URI);</pre><p>This is safer because sensitive data such as passwords, API keys, and secret tokens should not be pushed to GitHub.</p><h3>Step 4: Deploy the Backend</h3><p>The backend handles API requests, authentication, database operations, and server-side logic.</p><p>Common backend hosting platforms include:</p><ul><li>Render</li><li>Railway</li><li>Fly.io</li><li>DigitalOcean</li><li>AWS</li></ul><p>For a beginner-friendly project, Render and Railway are often beginner-friendly options.</p><p>When deploying a Node.js backend, the hosting platform usually asks for:</p><ul><li>Root directory</li><li>Build command</li><li>Start command</li><li>Environment variables</li></ul><p>For example:</p><pre>Build command: npm install<br>Start command: npm start</pre><p>Your package.json should include a start script:</p><pre>&quot;scripts&quot;: {<br>  &quot;start&quot;: &quot;node src/server.js&quot;,<br>  &quot;dev&quot;: &quot;nodemon src/server.js&quot;<br>}</pre><p>In production, the platform usually runs: npm start</p><p>So make sure the start script is correct.</p><h3>Step 5: Deploy the Frontend</h3><p>The frontend is the user interface of your application.</p><p>React projects are commonly deployed using:</p><ul><li>Vercel</li><li>Netlify</li><li>Firebase Hosting</li><li>AWS Amplify</li></ul><p>For a Vite React app, the build command is usually: npm run build</p><p>The output folder is: dist</p><p>For Create React App, the output folder is: build</p><p>The hosting platform uses this build folder to serve your frontend online.</p><h3>Step 6: Connect the Frontend to the Backend</h3><p>After deploying both frontend and backend, update the frontend environment variable.</p><p>Example:</p><pre>VITE_API_URL=https://your-backend-url.com</pre><p>Then your frontend API service can use it like this:</p><pre>import axios from &quot;axios&quot;;</pre><pre>const API = axios.create({<br>  baseURL: import.meta.env.VITE_API_URL,<br>});</pre><pre>export default API;</pre><p>This prevents you from hardcoding backend URLs everywhere.</p><h3>Step 7: Configure CORS</h3><p>CORS stands for Cross-Origin Resource Sharing.</p><p>In simple terms, it controls which frontend websites are allowed to communicate with your backend.</p><p>During development, your frontend may run on:</p><pre>http://localhost:5173</pre><p>In production, it may run on:</p><pre>https://myapp.vercel.app</pre><p>Your backend must allow requests from your frontend domain.</p><p>Example in Express:</p><pre>import cors from &quot;cors&quot;;</pre><pre>app.use(cors({<br>  origin: &quot;https://myapp.vercel.app&quot;,<br>  credentials: true<br>}));</pre><p>For development and production, you can use environment variables:</p><pre>app.use(cors({<br>  origin: process.env.CLIENT_URL,<br>  credentials: true<br>}));</pre><p>Then in your backend environment variables:</p><pre>CLIENT_URL=https://myapp.vercel.app</pre><p>Wrong CORS settings are one of the most common deployment problems.</p><h3>Step 8: Use a Cloud Database</h3><p>A local database works only on your computer. For production, you need a cloud database.</p><p>Examples:</p><ul><li>MongoDB Atlas for MongoDB</li><li>Supabase for PostgreSQL</li><li>Neon for PostgreSQL</li><li>Railway Database</li><li>AWS RDS</li></ul><p>For a MERN app, MongoDB Atlas is commonly used.</p><p>Your backend connects to the database using a connection string:</p><pre>MONGO_URI=mongodb+srv://username:password@cluster.mongodb.net/databaseName</pre><p>Make sure your database allows access from your hosting platform. In MongoDB Atlas, this usually means configuring network access.</p><p>For many beginner deployments, developers allow access from all IPs using:</p><p>0.0.0.0/0</p><p>This is convenient, but for serious production systems, stricter security rules are better.</p><h3>Step 9: Handle File Uploads Properly</h3><p>If your app uploads images, do not store them permanently inside your backend project folder.</p><p>Why?</p><p>Because many hosting platforms use temporary storage. Files may disappear after redeployment or server restart.</p><p>Instead, use cloud storage services like:</p><ul><li>Cloudinary</li><li>AWS S3</li><li>Firebase Storage</li><li>Supabase Storage</li></ul><p>For example, in an e-commerce app, product images should be uploaded to Cloudinary or another storage service, and only the image URL should be saved in the database.</p><h3>Step 10: Build the Frontend Correctly</h3><p>Before deploying the frontend, always test the production build locally.</p><p>For Vite:</p><pre>npm run build<br>npm run preview</pre><p>This helps you catch errors before deployment.</p><p>Sometimes an app works in development but fails after building. Common reasons include:</p><ul><li>Wrong import paths</li><li>Case-sensitive file names</li><li>Missing environment variables</li><li>Incorrect API URL</li><li>Unused or broken dependencies</li></ul><p>For example, Windows may allow this:</p><pre>import Navbar from &quot;./components/navbar&quot;;</pre><p>But production servers may expect the exact file name:</p><pre>import Navbar from &quot;./components/Navbar&quot;;</pre><p>Small mistakes like this can break production builds.</p><h3>Step 11: Set Up Authentication Carefully</h3><p>If your app uses JWT authentication, check these areas before deployment:</p><ul><li>JWT secret is stored in environment variables</li><li>Tokens expire after a reasonable time</li><li>Protected routes are working</li><li>Frontend sends the token correctly</li><li>Backend verifies the token correctly</li></ul><p>Never expose your JWT secret in frontend code.</p><p>This is wrong:</p><pre>const secret = &quot;myjwtsecret&quot;;</pre><p>The JWT secret belongs only in the backend.</p><h3>Step 12: Check Common Deployment Issues</h3><p>Here are some common problems developers face during deployment.</p><h4><strong>1. Backend works locally but not online</strong></h4><p>Possible reasons:</p><ul><li>Missing environment variables</li><li>Wrong start command</li><li>Wrong database connection string</li><li>Server is not listening on process.env.PORT</li></ul><p>In production, avoid hardcoding the port:</p><pre>const PORT = process.env.PORT || 5000;</pre><h4>2. Frontend cannot connect to backend</h4><p>Possible reasons:</p><ul><li>Wrong API URL</li><li>CORS error</li><li>Backend server may be sleeping</li><li>HTTPS/HTTP mismatch</li></ul><p>Make sure the frontend uses the deployed backend URL, not localhost.</p><h4><strong>3. Login works locally but fails in production</strong></h4><p>Possible reasons:</p><ul><li>JWT secret is missing</li><li>CORS credentials are not enabled</li><li>Cookies are not configured properly</li><li>Wrong API base URL</li></ul><p>If you are using cookies, production configuration needs extra care with sameSite, secure, and domain settings.</p><h4>4. Images are not loading</h4><p>Possible reasons:</p><ul><li>Images were stored locally</li><li>Image paths are incorrect</li><li>Cloud storage URL is not saved properly</li><li>File upload middleware is misconfigured</li></ul><p>For production, use a proper image hosting service.</p><h4>5. Page refresh gives a 404 error</h4><p>This commonly happens in React apps using React Router.</p><p>For example, this route works:</p><pre>https://myapp.com/products</pre><p>But after refreshing, it shows 404.</p><p>This happens because the hosting server does not know how to handle frontend routes.</p><p>Platforms like Netlify need a redirect rule:</p><pre>/* /index.html 200</pre><p>Vercel usually handles this more smoothly, but configuration may still be needed depending on the project.</p><h3>Step 13: Use Logs to Find Errors</h3><p>When something fails in production, do not guess blindly. Check logs.</p><p>Hosting platforms provide logs for backend errors.</p><p>Logs can show:</p><ul><li>Database connection errors</li><li>Missing environment variables</li><li>Port errors</li><li>Build failures</li><li>Runtime crashes</li><li>API errors</li></ul><p>Logs are one of the most useful tools during deployment.</p><p>A good developer learns to read error messages carefully instead of ignoring them.</p><h3>Step 14: Final Deployment Checklist</h3><p>Before sharing your live project, check the following:</p><ul><li>Frontend is deployed</li><li>Backend is deployed</li><li>Database is connected</li><li>Environment variables are added</li><li>CORS is configured</li><li>Authentication works</li><li>API requests work</li><li>Images load correctly</li><li>Protected routes work</li><li>Build has no errors</li><li>No secret keys are exposed</li><li>GitHub repository does not contain .env files</li></ul><p>Also test the app from another device or browser. This helps confirm that the application is truly working online, not only on your computer.</p><h3>Production Is Different from Development</h3><p>A deployed app should not be treated like a local project.</p><p>In production, you should think about:</p><ul><li>Security</li><li>Performance</li><li>Error handling</li><li>Environment variables</li><li>Database backups</li><li>API protection</li><li>User data safety</li></ul><p>Even if your project is small, learning these concepts early will help you become a better developer.</p><p>Deployment teaches you how real applications work outside your laptop.</p><h3>Final Thoughts</h3><p>Deployment is an important step in becoming a real full-stack developer.</p><p>Writing code is only part of the journey. A complete developer should also understand how to make an application available to real users.</p><p>At first, deployment can feel confusing because many things change when moving from localhost to production. The frontend gets a real URL. The backend gets a real server. The database moves to the cloud. Environment variables must be configured properly. CORS rules become important.</p><p>But once you understand the process, deployment becomes much easier.</p><p>The key is to think of deployment as a checklist:</p><ul><li>Build the app</li><li>Host the frontend</li><li>Host the backend</li><li>Connect the database</li><li>Add environment variables</li><li>Fix CORS</li><li>Test everything</li></ul><p>Every deployment teaches you something new. The more you deploy, the more confident you become.</p><p>Taking a project from localhost to production is not just a technical step. It is the moment your application becomes real.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=965379991a60" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bridging the Gap in Renewable Energy: A Hybrid Supercapacitor-Battery Solar System]]></title>
            <link>https://medium.com/@dheeshanadesilva2002/bridging-the-gap-in-renewable-energy-a-hybrid-supercapacitor-battery-solar-system-e80f460f3934?source=rss-90ffc063b51f------2</link>
            <guid isPermaLink="false">https://medium.com/p/e80f460f3934</guid>
            <category><![CDATA[solar-power]]></category>
            <category><![CDATA[renewable-energy]]></category>
            <dc:creator><![CDATA[Dheeshana De silva]]></dc:creator>
            <pubDate>Wed, 24 Dec 2025 16:50:14 GMT</pubDate>
            <atom:updated>2025-12-24T16:50:14.116Z</atom:updated>
            <content:encoded><![CDATA[<p>As part of the Undergraduate Symposium &amp; Innovation Exhibition (ICAPS 2025) at the University of Kelaniya, I had the opportunity to explore cutting-edge research aimed at solving real-world energy crises. One standout project addressed the intermittency of solar power through a clever “hybrid” storage approach.</p><h3>Research Overview</h3><ul><li><strong>Research Title:</strong> Supercapacitor Battery Hybrid PV System For Off-Grid Applications</li><li><strong>Authors:</strong> Amaraweera T.R., Premasiri R.M.H.D., Piyumal P.L.A.K., Ranaweera A.L.A.K., and Kalingamudali S.R.D.</li><li><strong>Affiliation:</strong> Department of Physics and Electronics, University of Kelaniya</li><li><strong>Paper ID:</strong> 16 (ICAPS 2025)</li></ul><h3>Introduction</h3><p>Off-grid photovoltaic (PV) systems play a crucial role in providing sustainable electricity to rural and remote communities. However, the intermittent nature of solar energy significantly affects the reliability and stability of power delivery. To address this limitation, the researchers propose a hybrid energy storage system that combines supercapacitors (SCs) with lithium-ion batteries. This hybrid approach aims to integrate the fast energy response of supercapacitors with the long-term energy storage capability of batteries, thereby improving overall system performance.</p><h3>Objectives</h3><p>The main objective of this research is to design, implement, and evaluate a hybrid PV system that integrates supercapacitors and batteries. The system is expected to enhance power stability, efficiency, and reliability under varying operating conditions in off-grid environments.</p><h3>Methodology</h3><p>A laboratory-scale hybrid PV prototype was developed to analyze system behavior under six manually switchable operating modes. These modes demonstrate different power-sharing strategies among the PV array, supercapacitor bank, battery, and load:</p><ul><li><strong>Mode 1:</strong> PV array directly powers the load</li><li><strong>Mode 2:</strong> PV array powers the load and charges the supercapacitor bank</li><li><strong>Mode 3:</strong> PV array powers the load and charges the battery</li><li><strong>Mode 4:</strong> PV array and supercapacitor bank jointly power the load</li><li><strong>Mode 5:</strong> PV array and battery jointly power the load</li><li><strong>Mode 6:</strong> Load is powered only by the battery</li></ul><p>Relay-based switching was used to control power flow, and system efficiency was evaluated for each mode. A block diagram of the proposed system architecture was also presented in the poster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*3lhyQQlHSV4Ij4iqCf8WqA.jpeg" /><figcaption>Figure 1: Research poster for Paper ID 16, presented at the ICAPS Undergraduate Symposium &amp; Innovation Exhibition 2025.</figcaption></figure><h3>Results</h3><p>The experimental results showed noticeable efficiency variations across the six operating modes. Modes that utilized both the PV array and energy storage components demonstrated improved performance compared to single-source configurations. The results confirmed that supercapacitors effectively handle rapid charge–discharge cycles, while batteries ensure uninterrupted power delivery over longer durations.</p><h3>Future Outlook</h3><p>The team aims to further this research by:</p><ul><li>Implementing <strong>automated switching</strong> (removing the need for manual relay control).</li><li>Adding <strong>MPPT (Maximum Power Point Tracking)</strong> control for real-time optimization.</li><li>Testing the system in varied environmental conditions to ensure scalability for larger homes or facilities.</li></ul><h3>Discussion and Conclusion</h3><p>The hybrid PV system successfully demonstrated the advantages of integrating supercapacitors with lithium-ion batteries. Supercapacitors provided quick response during transient conditions, reducing sudden stress on the battery. Meanwhile, the battery ensured continuous energy supply when solar power was unavailable. Compared to single-storage systems, the hybrid configuration improved efficiency, reliability, and load stability, making it well-suited for off-grid applications.</p><h3>Reflection</h3><p>Attending ICAPS 2025 was an inspiring look into how physics and electronics can be applied to create sustainable, green energy solutions for Sri Lanka and beyond. This project, in particular, highlights the importance of hybridizing technology to overcome the natural limitations of renewable energy.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e80f460f3934" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DesilOS — A Simple Operating System to Display Hardware Information]]></title>
            <link>https://medium.com/@dheeshanadesilva2002/desilos-a-simple-operating-system-to-display-hardware-information-cda0fc47cd6d?source=rss-90ffc063b51f------2</link>
            <guid isPermaLink="false">https://medium.com/p/cda0fc47cd6d</guid>
            <dc:creator><![CDATA[Dheeshana De silva]]></dc:creator>
            <pubDate>Wed, 25 Jun 2025 15:29:07 GMT</pubDate>
            <atom:updated>2025-06-25T15:48:50.190Z</atom:updated>
            <content:encoded><![CDATA[<h3>DesilOS — A Simple Operating System to Display Hardware Information</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/0*Y2bnLJZ6jCl4DaJ4.jpg" /></figure><h3>Introduction</h3><p>Ever wondered how operating systems detect your hardware? <strong>DesilOS</strong> is a lightweight 16-bit operating system built entirely with <strong>Assembly language</strong>, inspired by the simplicity of MikeOS. Its main purpose? To display real-time hardware information straight from the BIOS, without needing any fancy interface or bloated software.</p><p>Let’s take a look at how this minimalist OS works behind the scenes and what it can teach you about system programming.</p><h3>What is DesilOS?</h3><p>DesilOS is a bootable OS kernel that starts from a raw binary and runs directly on x86 machines or virtual machines like <strong>QEMU</strong>. It offers a simple command-line interface and lets users type info to reveal:</p><ul><li>RAM size (base, extended, total)</li><li>CPU vendor and brand</li><li>Number of hard drives</li><li>Mouse presence</li><li>Serial ports</li><li>CPU features (FPU, MMX, SSE, SSE2)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-vas4FTzykt_hbUY" /></figure><h3>Tools and Technologies Used</h3><p>To build <strong>DesilOS</strong>, I used the following:</p><ul><li><a href="https://www.virtualbox.org/wiki/Downloads"><strong>VirtualBox</strong></a> <em>(optional)</em> — For real hardware-like testing.</li><li><a href="https://ubuntu.com/download/desktop"><strong>Ubuntu 24.04.2 LTS</strong></a> — Development environment.</li><li><strong>NASM (Netwide Assembler)</strong> — To write and assemble x86 Assembly code.</li><li><strong>QEMU</strong> — A lightweight emulator to test the OS without rebooting the system.</li><li><a href="https://code.visualstudio.com/download"><strong>Visual Studio Code (VS Code)</strong> </a>— As the code editor for writing assembly files with syntax highlighting.</li><li><a href="https://mikeos.sourceforge.net/"><strong>MikeOS bootloader</strong></a> — to get started quickly</li></ul><h3>Goals of DesilOS</h3><p>The main goals of DesilOS were:</p><ul><li>Boot directly using BIOS (Real Mode).</li><li>Display a welcome message.</li><li>Show basic CPU and memory information.</li><li>Learn how BIOS interrupts work.</li><li>Understand how low-level system programming feels.</li></ul><h3>Setting Up Your Development Environment</h3><p>For DesilOS development, we use <strong>Ubuntu</strong> and <strong>Visual Studio Code</strong>. Here are the essential commands for setting up your environment:</p><ol><li><strong>Update Package List:</strong> Always ensure your system’s package information is up-to-date.</li></ol><pre>sudo apt-get update -y</pre><p><strong>2. Install NASM (Netwide Assembler):</strong> This is the core tool that will compile your .asm assembly source files into raw binary executables (.bin).</p><pre>sudo apt-get install -y nasm</pre><p><strong>3. Install Virtualization Software (QEMU Recommended):</strong> DesilOS is designed to run in a virtualized environment. QEMU is a powerful, open-source emulator that you can use for testing your OS image.</p><pre>sudo apt-get install -y qemu qemu-system-x86</pre><p><strong>4. Build Your OS Components (Using Custom Script):</strong> After writing your assembly code (e.g., boot.asm for the bootloader and kernel.asm for your OS kernel in Visual Studio Code), you&#39;ll use your custom build script to compile them ..</p><pre>sudo ./build-linux.sh</pre><p><strong>5. Run DesilOS (Using Custom Script):</strong>you can boot your OS using your custom test script. This command is also executed in your terminal (e.g., the integrated terminal in Visual Studio Code).</p><pre>sudo ./test-linux.sh</pre><p>With these steps, your environment will be fully prepared. Now, let&#39;s explore what DesilOS looks like in action!</p><h3>Booting into DesilOS</h3><p>Once booted, DesilOS clears the screen and displays a welcome message:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/981/1*X0anG3_TX5qWvHA1tfWAaA.png" /></figure><p>Here, you can type commands like info, help, or clear.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*566jJHffwQnW9AW0VlF78w.png" /></figure><h3>Hardware Detection in Action</h3><h3>Memory Detection</h3><p>When you type info, DesilOS uses BIOS interrupts to detect:</p><ul><li><strong>Base memory</strong> using INT 12h</li><li><strong>Extended memory</strong> using INT 15h, AH=88h</li><li><strong>High memory (&gt;16MB)</strong> using INT 15h, AX = E801</li></ul><p>It adds up all the values and shows total memory in megabytes. A great example of using low-level interrupts for system diagnostics!</p><h3>CPU Vendor &amp; Description</h3><p>DesilOS runs the CPUID instruction to fetch:</p><ul><li>CPU vendor (e.g., Intel or AMD)</li><li>Full brand string (e.g., “Intel(R) Core(TM) i5…”)</li></ul><h3>Drive and Port Detection</h3><p>It uses BIOS Data Area and I/O port probing to detect:</p><ul><li>Number of hard drives</li><li>Number of serial ports</li><li>Base I/O address for serial port 1</li></ul><h3>Mouse Status &amp; Features</h3><p>The OS checks if a mouse is connected using BIOS INT 33h.</p><p>Lastly, it checks the CPU’s feature bits using CPUID to identify support for:</p><ul><li>FPU (Floating Point Unit)</li><li>MMX</li><li>SSE / SSE2</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x3lsjLQVLUJX1xQYkdw-Ng.png" /></figure><h3>Learning Value</h3><p>DesilOS is a fantastic starting point if you’re learning:</p><ul><li>How real-mode OS kernels work</li><li>BIOS interrupts and hardware detection</li><li>CPUID, INT 10h, INT 13h, and more</li><li>Raw x86 assembly development</li></ul><h3>Try DesilOS Now</h3><p>Repository from GitHub:</p><p><a href="https://github.com/Dheeshana-DeSilva/DesilOS"><strong>Repository Link</strong></a></p><h3>Final Thoughts</h3><p>Building DesilOS was a deeply educational journey. Crafting even a basic operating system from scratch offers a rare, hands-on look into how computers truly function beneath modern abstractions. DesilOS demonstrates that with just a few kilobytes of Assembly, it’s possible to create a functional and insightful system.</p><p>For anyone curious about systems programming, starting a small OS project is an excellent way to learn. Start simple, stay curious, and enjoy the journey into the heart of computing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cda0fc47cd6d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is DevOps? A Simple Guide for Beginners]]></title>
            <link>https://medium.com/@dheeshanadesilva2002/what-is-devops-a-simple-guide-for-beginners-106eb3d7fc25?source=rss-90ffc063b51f------2</link>
            <guid isPermaLink="false">https://medium.com/p/106eb3d7fc25</guid>
            <dc:creator><![CDATA[Dheeshana De silva]]></dc:creator>
            <pubDate>Sun, 04 May 2025 13:21:22 GMT</pubDate>
            <atom:updated>2025-05-04T13:21:22.416Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s fast-moving tech world, businesses want to build and deliver software faster than ever. But doing it quickly <strong>without breaking things</strong>? That’s where <strong>DevOps</strong> comes in.</p><p>Let’s break it down in a simple way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Vv4mtmwiu3k3DUlf.png" /></figure><h3>What is DevOps?</h3><p>DevOps is a combination of two words: <strong>Development</strong> and <strong>Operations</strong>.</p><p>It’s a way of working that brings software developers and IT operations teams together. They work as one team to build, test, and release software faster and more efficiently.</p><p>In short, DevOps helps people build better software and deliver it quickly.</p><h3>Why Was DevOps Created?</h3><p>In the past, developers wrote code and handed it off to the operations team, who was then responsible for running the code, fixing issues, and managing servers. This separation of duties often led to delays and communication breakdowns.</p><p>DevOps addresses these challenges by fostering collaboration between development and operations teams, emphasizing automation, and promoting shared responsibilities. This approach streamlines workflows, reduces errors, and accelerates the delivery of software.</p><h3>Key Goals of DevOps</h3><ul><li>Deliver software faster</li><li>Reduce errors and bugs</li><li>Improve teamwork</li><li>Keep systems stable and reliable</li><li>Respond to changes quickly</li></ul><h3>What Makes DevOps Different?</h3><p>What sets DevOps apart is its focus on continuous software development. Unlike traditional methods, where updates are released in large batches, DevOps enables frequent, incremental updates sometimes even on a daily basis.</p><p>This approach allows for continuous building, testing, and releasing of software. As a result, users benefit from faster delivery of new features and quicker resolution of bugs, leading to improved satisfaction.</p><h3>Key Practices in DevOps</h3><p>Let’s look at a few main practices in DevOps:</p><h4>1. Continuous Integration (CI)</h4><p>Developers keep adding their code into a shared space. Every change is automatically tested to catch problems early.</p><h4>2. Continuous Delivery (CD)</h4><p>Software is always ready to be released. This avoids “last-minute panic” before big launches.</p><h4>3. Automation</h4><p>Manual work is replaced with scripts and tools. This saves time and reduces mistakes.</p><h4>4. Monitoring</h4><p>Teams keep an eye on how systems and apps are performing. If something breaks, they know right away.</p><h3>Tools You Might Hear About</h3><p>As you dive into DevOps, you’ll come across tools like:</p><ul><li><strong>Git</strong> (for code sharing)</li><li><strong>Jenkins</strong> (for automation)</li><li><strong>Docker</strong> (for packaging software)</li><li><strong>Kubernetes</strong> (for managing apps)</li><li><strong>AWS / Azure</strong> (for cloud hosting)</li></ul><h3>DevOps and the Cloud</h3><h3>DevOps and the Cloud</h3><p>Cloud computing and DevOps work hand-in-hand to make development faster and more efficient. Cloud platforms provide the <strong>infrastructure</strong> for DevOps teams to deploy and manage applications easily.</p><ul><li><strong>Scalability</strong>: The cloud allows DevOps teams to scale resources up or down based on need. No more worrying about running out of server space.</li><li><strong>Flexibility</strong>: With the cloud, you can deploy your app anywhere — on the web, in different regions, or across various devices.</li><li><strong>Cost-efficiency</strong>: You pay only for what you use, so you avoid unnecessary expenses.</li></ul><p>Using cloud services like AWS, Azure, or Google Cloud simplifies automation, monitoring, and deployment processes, making DevOps even more powerful. It’s a game changer for teams looking to move faster.</p><h3><strong>Why DevOps Skills Are in Demand</strong></h3><p>In today’s fast-paced tech world, companies need to move quickly. They want to release apps faster, resolve issues instantly, and keep customers satisfied. To achieve this, they need professionals who understand <strong>DevOps</strong>.</p><p>DevOps professionals help improve the development and deployment processes. They enable companies to deliver high-quality software at speed. As a result, DevOps skills are highly sought after in the job market.</p><p>Learning DevOps opens the door to various tech roles, such as <strong>DevOps Engineer</strong>, <strong>Site Reliability Engineer (SRE)</strong>, and <strong>Cloud Engineer</strong>. These positions are not only in demand but often offer competitive salaries.</p><p>With the growing need for faster and more reliable software delivery, DevOps expertise is becoming an essential skill for the future of technology.</p><h3>How Can You Start Learning DevOps?</h3><p>Start small. Here’s what you can do:</p><ol><li><strong>Learn basic Linux commands</strong></li><li><strong>Understand Git and GitHub</strong></li><li><strong>Try simple CI/CD with GitHub Actions or Jenkins</strong></li><li><strong>Watch beginner videos on YouTube</strong></li><li><strong>Build a small project and deploy it</strong></li></ol><h3>Conclusion</h3><p>DevOps is not just a tool or a job title; it’s a collaborative approach to working more efficiently. It’s about improving how teams work together to deliver software quickly and reliably.</p><p>If you have a curious mindset, enjoy problem-solving, and like working with both code and systems, DevOps could be the right path for you. You don’t need to be an expert coder to start. What matters most is having the right mindset: a focus on learning, continuous improvement, and collaboration.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=106eb3d7fc25" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Hidden World of Software Licensing]]></title>
            <link>https://medium.com/@dheeshanadesilva2002/the-hidden-world-of-software-licensing-1ff891015088?source=rss-90ffc063b51f------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ff891015088</guid>
            <dc:creator><![CDATA[Dheeshana De silva]]></dc:creator>
            <pubDate>Sat, 03 May 2025 07:50:29 GMT</pubDate>
            <atom:updated>2025-05-03T07:50:29.971Z</atom:updated>
            <content:encoded><![CDATA[<p>Software is everywhere; from the apps on your phone to the tools powering your favorite websites. But have you ever stopped to think about the legal rules that govern how software can be used, shared, or modified? That’s where software licenses come into play. Whether you’re a developer, a business owner, or just someone who uses technology, understanding software licensing is crucial. Let’s break it down.</p><h3><strong>What is a Software License?</strong></h3><p>A software license is a legal agreement between the person or company who made the software and the person using it. Instead of giving full ownership, the license gives permission to use, copy, or sometimes change the software, depending on the rules it sets.</p><p>Without a license, using software could break copyright laws. Licenses also help control how software can be used whether it’s for private use, business, or open-source projects. That’s why it’s important to choose the right license for your software, whether it’s a personal project, a company product, or something you’re sharing with the world.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bfY8yI5ITgTQtIJb.jpg" /></figure><h3><strong>Types of Software Licenses</strong></h3><p>Let’s walk through the main types of software licenses you might encounter. These categories help define how freely the software can be used, shared, or modified.</p><h3>1. Public Domain</h3><p>Software in the public domain is the most “free” you can get. Anyone can use, modify, or distribute it without restrictions. It’s like an abandoned park that open to all.</p><p>Example<strong>:</strong> Some old or government-funded software falls into this category.</p><h3>2. Lesser General Public License (LGPL)</h3><p>This is a more flexible version of the GNU General Public License. It allows you to link to open-source libraries in your own software, which makes it popular for developers who want to mix free and commercial code.</p><h3>3. Permissive Licenses</h3><p>Also known as “BSD-style” licenses (like MIT, Apache), these allow people to use, change, and even sell software with few conditions. The main requirement is usually just giving credit to the original creators.</p><p>This is great for businesses and startups who want flexibility without legal headaches.</p><h3>4. Copyleft</h3><p>A type of open-source license that requires any modified versions to also be open-source.</p><p>Example: GNU/Linux, WordPress.</p><h3>5. Proprietary Licenses</h3><p>This is the strictest category (Apple, Microsoft, or Adobe) You can use the software, but everything else (modifying, copying, redistributing) is usually off-limits.</p><p>Example: Microsoft Word. You can use it, but you can’t alter its source code or share it.</p><h3>What About Copyright Law?</h3><p>Copyright automatically applies to original works, including software, the moment they’re created. This means developers don’t need to register their code for it to be protected though adding a license clarifies how others can interact with it.</p><ul><li><strong>How Licenses Interact with Copyright</strong>: A license grants permissions despite copyright restrictions.</li><li>For example, an open-source license might say, “You can use this code if you credit the author,” overriding the default “all rights reserved” copyright.</li><li><strong>Infringement Risks</strong>: Using unlicensed code or violating license terms (e.g. : ignoring a copyleft requirement) can lead to lawsuits or forced removal of the software.</li></ul><h3>Ownership vs Licensing</h3><p>Here’s a common misconception: When you “buy” software, you’re not actually buying ownership. Instead, you’re purchasing a license to use it under specific terms.</p><ul><li><strong>Ownership</strong> stays with the creator or company. They retain control over how the software evolves and who can modify it.</li><li><strong>Licensing</strong> grants limited rights. For example, a company might license software to employees but forbid sharing it externally.</li></ul><p>This distinction is why you can’t legally resell proprietary software or use a single license for multiple installations unless explicitly allowed.</p><h3>Choosing the Right License for Your Project</h3><p>When choosing a software license for your project, consider the following:</p><ul><li>If you want to allow maximum flexibility for others to use your code in proprietary applications, choose a permissive license like MIT or BSD.</li><li>If you want to ensure that any changes to your code remain open-source, a copyleft license like the GPL is the right choice.</li><li>If you want to retain full control over the software, a proprietary license may be the best option.</li></ul><h3>Conclusion: Licensing Made Simple</h3><p>Software licensing is the gateway to how software is shared, modified, and distributed. Whether you’re working on an open-source project or a proprietary application, understanding the different types of licenses and their implications is essential for managing your software’s legal standing.</p><p>From the MIT License’s permissiveness to the GPL’s commitment to free software, the choice of license will shape how your project evolves and how others interact with it. With careful consideration of your goals, whether for wide distribution or strict control, the right license ensures that your software remains protected, respected, and shared in the way you envision.</p><h3><strong><em>References</em></strong></h3><p>[1] American Bar Association. An overview of “open source” software licenses. www.abanet.org/intelprop/opensource.html. Accessed Sept. 2009.<br><br>[2] J. Cohen. Statistical power analysis for the behavioral sciences (2nd ed.). Lawrence Earlbaum Associates, Hillsdale, NJ, 1988.<br><br>[3] M. Di Penta and D. M. Germán. Who are source code contributors and how do they change? In 16th Working Conference on Reverse Engineering, WCRE 2009, 13–16 October 2009, Lille, France, pages 11–20. IEEE Computer Society, 2009.</p><p>[4] <em>Software Licensing Said to be Set For Dramatic Shifts</em>, 2004, [online] Available: <a href="http://www.informationweek.com/story/">http://www.informationweek.com/story/</a> show Article.jhtml?articleID=18401482.</p><p>[5] <a href="https://www.oreilly.com/library/view/producing-open-source/0596007590/ch09.html">https://www.oreilly.com/library/view/producing-open-source/0596007590/ch09.html</a></p><p>[6] <em>Understanding Open Source and Free Software Licensing</em> by Andrew M. St. Laurent (O’Reilly Media).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ff891015088" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stored Procedures in MySQL]]></title>
            <link>https://medium.com/@dheeshanadesilva2002/understanding-stored-procedures-in-mysql-d5f4f538e6c9?source=rss-90ffc063b51f------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5f4f538e6c9</guid>
            <dc:creator><![CDATA[Dheeshana De silva]]></dc:creator>
            <pubDate>Mon, 27 Jan 2025 15:58:44 GMT</pubDate>
            <atom:updated>2025-05-02T07:43:49.748Z</atom:updated>
            <content:encoded><![CDATA[<h3>What Are Stored Procedures?</h3><p>Stored procedures are like recipes for your database — they are pre-written sets of SQL instructions stored directly on the database server. Instead of writing the same code repeatedly, you can simply call a stored procedure to perform specific tasks. They’re great for simplifying complex operations, such as conditional logic, loops, and error handling.</p><p>Think of it this way: if your database needs to perform a frequent task, like calculating monthly sales totals, a stored procedure can handle it in one efficient step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*3EuwJpCsBgN0qDkOSSUJfw.jpeg" /></figure><h3>Why Use Stored Procedures?</h3><h4>The Advantages:</h4><ol><li><strong>Faster Performance</strong>: Since stored procedures are precompiled, they run faster by skipping query parsing every time.</li><li><strong>Reusable Code</strong>: Write once, use many times! Stored procedures save you from repeating yourself.</li><li><strong>Added Security</strong>: Instead of giving users direct access to tables, you can grant access to stored procedures.</li><li><strong>Centralized Logic</strong>: Keep your database logic in one place for better organization and consistency.</li><li><strong>Less Network Traffic</strong>: Multiple SQL statements can run in one procedure call, reducing back-and-forth communication.</li></ol><h4>The Disadvantages:</h4><ol><li><strong>Hard to Debug</strong>: Debugging stored procedures can be tricky due to limited tools.</li><li><strong>Increased Server Load</strong>: Complex logic may slow down your database server.</li><li><strong>Not Always Portable</strong>: Procedures written for one database may not work on another.</li><li><strong>Maintenance Challenges</strong>: Making updates to stored procedures requires database access and careful testing.</li></ol><h3>How to Create and Run Stored Procedures in MySQL</h3><h4>The Basics:</h4><p>Here’s the structure of a stored procedure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*pQih3zVsVI9FT8I_tia23g.png" /></figure><h4>Example:</h4><p>Let’s say you want to calculate the total sales:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*252lmrEwPKlPe9nVvfcBYw.png" /></figure><h4>Running the Procedure:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*KFoTCEeWAodfhsVctA72iQ.png" /></figure><p>That’s it! The procedure calculates the total sales and stores the result in @total.</p><h3>A Real-World Example: Employee Bonus Calculation</h3><p>Imagine a company needs to calculate employee bonuses based on their performance ratings. Here’s how a stored procedure can help:</p><h4>Writing the Procedure:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/1*F-Zyezc7PLsX9cn_vT_Ptw.png" /></figure><h4>Using It:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*_NgC9EjRzzIRkR-qoPyTuA.png" /></figure><h4>What’s Happening Here:</h4><ol><li>The procedure takes an employee ID as input.</li><li>It looks up the employee’s performance rating.</li><li>Based on the rating, it calculates the bonus and returns it.</li></ol><h3>Conclusion</h3><p>Stored procedures are a powerful tool in MySQL for handling repetitive and complex tasks efficiently. They help improve performance, centralize logic, and reduce redundancy. By using them wisely, you can simplify database management and enhance application functionality.</p><h3>References</h3><p>1. Robbins, C. (2023). What are stored procedures in MySQL? Database Journal. <a href="https://www.databasejournal.com/">https://www.databasejournal.com</a></p><p>2. Smith, A. (2022). Advantages and disadvantages of stored procedures: A practical guide. Tech World Insights. <a href="https://www.techworldinsights.com/">https://www.techworldinsights.com</a></p><p>3. Gupta, R. (2023). Writing and executing stored procedures in MySQL: Step-by-step tutorial. MySQL Mastery Blog. <a href="https://www.mysqlmasteryblog.com/">https://www.mysqlmasteryblog.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5f4f538e6c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding the CIA Triad in Cyber Security]]></title>
            <link>https://medium.com/@dheeshanadesilva2002/understanding-the-cia-triad-in-cyber-security-d11facb1de3b?source=rss-90ffc063b51f------2</link>
            <guid isPermaLink="false">https://medium.com/p/d11facb1de3b</guid>
            <dc:creator><![CDATA[Dheeshana De silva]]></dc:creator>
            <pubDate>Tue, 16 Jul 2024 05:56:02 GMT</pubDate>
            <atom:updated>2024-07-16T14:40:44.559Z</atom:updated>
            <content:encoded><![CDATA[<p>In the modern era, where we depend so much on digital information, keeping our data safe is more important than ever. One of the greatest methods to do this is by using the CIA Triad. This model focuses on three main areas: Confidentiality, Integrity, and Availability. Let’s break down each of these terms and how they help protect our data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fmMLe7GL-PDbWMSKUHug-A.png" /></figure><h3>What is the CIA Triad?</h3><p>The CIA Triad is a basic concept in cyber security. It stands for:</p><h4><strong>Confidentiality</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*k6vFicmi-Z7ZWbD2DcegSw.png" /></figure><p>Keeping information private and only available to those authorized. Encryption (the coding of information) and strong passwords can help with this.</p><h4><strong>Integrity</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/1*qLPw6lnvC1xQOubkTgy9sg.png" /></figure><p>Ensure that the information is accurate and unchanged. This entails keeping data from being modified by unauthorized individuals. Checksums and digital signatures are examples of tools that help to ensure integrity.</p><h4>Availability</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*1mHEe4ur3QjO3mqxp-mCDA.png" /></figure><p>Making sure information is available when required. This include shaving measures in place to ensure that services work properly, such as backup servers and disaster recovery plans.</p><h3>Why Should You Use the CIA Triad?</h3><p>The CIA Triad is crucial for several reasons,</p><ul><li><strong>Complete Protection -</strong>It covers all aspects of data security — privacy, accuracy, and accessibility.</li><li><strong>Risk Management-</strong>Helps identify and reduce risks related to data breaches, unauthorized changes, and data loss.</li><li><strong>Compliance-</strong>Many laws and regulations require adherence to these principles to protect personal and sensitive information.</li><li><strong>Trust-</strong>Protecting data builds trust with customers and partners, enhancing your organization’s reputation.</li></ul><h3>When Should You Use the CIA Triad?</h3><p>The CIA Triad should be applied in various situations,</p><ul><li><strong>Creating Security Policies- </strong>When setting up rules for how to protect information, use the CIA Triad as a guide.</li><li><strong>Assessing Risks-</strong>Use the triad to identify weak points in your security and address them.</li><li><strong>Implementing Security Measures-</strong>Ensure all three aspects are covered when installing security systems like firewalls or encryption.</li><li><strong>Handling Security Incidents -</strong> During a security breach, the triad helps determine which aspect (confidentiality, integrity, or availability) is affected and guides the response.</li></ul><h3>Example Scenarios</h3><ul><li><strong>Scenario 1 - Protecting Confidentiality in a Bank</strong></li></ul><p>Imagine a bank needs to protect its clients’ financial information. By encrypting data and demanding strong passwords and multi-factor authentication, the bank guarantees that only authorized individuals have access to sensitive data.</p><ul><li><strong>Scenario 2 - Ensuring Integrity in a Hospital</strong></li></ul><p>A hospital must maintain accurate patient records. The hospital is capable of identifying any illegal modifications to medical records thanks to digital signatures and checksums. Frequent verifications guarantee the correctness of the data.</p><ul><li><strong>Scenario 3 - Maintaining Availability in an Online Store</strong></li></ul><p>An online store needs its website to be available to customers at all times. By using backup servers and having a plan for dealing with technical problems, the store makes sure its website stays up and running, even during busy shopping times.</p><h4>Other Security Frameworks that Use the CIA Triad</h4><p>There are other security frameworks that use the CIA Triad principles, such as:</p><ul><li>NIST Cybersecurity Framework</li><li>ISO 27001</li><li>CIS Controls</li><li>COBIT</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d_gLNZGmsAWepPXOjGAJJA.png" /></figure><p><strong>Conclusion</strong></p><p>The CIA Triad is an important concept in cyber security that guarantees a holistic approach to data protection. Organizations that prioritize confidentiality, integrity, and availability can protect their data, manage risks, comply with rules, and preserve stakeholder confidence. Whether developing security policies, identifying risks, or responding to events, the CIA Triad provides a dependable framework for strong security.</p><h4>References:</h4><p>1.<em> Smith, S. (2023, February). Towards a scientific definition of cyber resilience. In International Conference on Cyber Warfare and Security (Vol. 18, №1, pp. 379–386).</em></p><p>2. <em>Annarelli, A., Nonino, F., &amp; Palombi, G. (2020). Understanding the management of cyber resilient systems. Computers &amp; industrial engineering, 149, 106829.</em></p><p>3. <em>Enoch, S. Y., Moon, C. Y., Lee, D., Ahn, M. K., &amp; Kim, D. S. (2022). A practical framework for cyber defense generation, enforcement and evaluation. Computer Networks, 208, 108878.</em></p><p>4. <em>Greiman, V. (2023, June). Known Unknowns: The Inevitability of Cyber Attacks. In European Conference on Cyber Warfare and Security (Vol. 22, №1, pp. 223–231).</em></p><p>5. <em>Dacorogna, M., Debbabi, N., &amp; Kratz, M. (2023). Building up cyber resilience by better grasping cyber risk via a new algorithm for modelling heavy-tailed data. European Journal of Operational Research.</em></p><p>Thank you for taking the time to read this article on the CIA Triad in cyber security. I hope you found the information helpful and easy to understand.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d11facb1de3b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>