Saturday, 18 October 2025

Implement an ORM (Object-Relational Mapping) in a Perl Catalyst application using complex DBIx::Class Module

Here's a detailed example using a simple "events" table to demonstrate how to work with DBIx::Class in a Catalyst application.


Step 1: Define Your Database Schema

For this example, let's use a simple `events` table with the following schema:

CREATE TABLE events (

    id INTEGER PRIMARY KEY AUTOINCREMENT,

    title VARCHAR(255) NOT NULL,

    start_date DATE NOT NULL,

    end_date DATE NOT NULL,

    description TEXT

);

Read more »

Labels:

Friday, 17 October 2025

How to Get File Creation and Modification Dates/Times in Shell/Bash

 When working with files in a shell or bash environment, it’s often useful to retrieve metadata such as file creation and modification dates/times. Below are several methods to achieve this across different platforms like Linux and Windows.

1. Modification Date/Time

Retrieving the modification date and time of a file is straightforward and works across both Linux and Windows platforms.

Read more »

Labels:

Wednesday, 15 October 2025

lets Solve Conda Activation Issues on Windows


If you’re a Windows user getting into Python and data science, you’ve likely encountered Miniconda or Anaconda during your setup. These tools are fantastic for managing packages and environments, but occasionally, you might bump into some hitches when setting up or switching environments, especially on Windows. Today, let’s dive into a common issue where users are unable to activate a new conda environment, repeatedly prompted to run conda init.

Understanding the Issue

When trying to activate a conda environment (conda activate test_env), users are sometimes met with an error suggesting they should run conda init. Running conda init seemingly has no effect, as the error persists.

The root of this issue often lies in the integration of conda with your shell (in this case, Bash running on Cmder in Windows). Even after including Miniconda in the PATH as instructed during installation, the shell might not properly recognize conda commands.

Steps to Resolve the Issue

Here’s a more detailed guide on how to ensure your environment can be activated without repeatedly seeing the conda init prompt:

Step 1: Re-run Conda Initialization

Instead of just running conda init, specify your shell directly to ensure the correct initialization scripts are modified. For Bash in Cmder, use:

conda init bash

This command attempts to configure your Bash shell to integrate properly with conda, modifying necessary startup scripts like .bashrc.

Step 2: Verify and Modify PATH Manually

Even after running conda init, sometimes the PATH isn’t correctly set. You need to ensure that the directory containing conda is indeed in your PATH. You can check this by opening a new command prompt and typing:

echo %PATH%

If you do not see paths leading to your Miniconda/Anaconda directories, you need to add them manually. Here’s how you can do it:

  1. Right-click on ‘This PC’ or ‘My Computer’.

  2. Click on ‘Properties’.

  3. Navigate to ‘Advanced system settings’ and then ‘Environment Variables’.

  4. In the ‘System variables’ pane, find and select the ‘Path’ variable, then click ‘Edit’.

  5. Add new entries for the following paths (replace C:\Users\Username\miniconda3 with your actual installation path):

    • C:\Users\Username\miniconda3
    • C:\Users\Username\miniconda3\Scripts
    • C:\Users\Username\miniconda3\Library\bin
  6. Confirm all dialogs by clicking ‘OK’.

Step 3: Restart Your Shell

After adjusting your PATH and running conda init for your specific shell, close your command line interface (Cmder, in this case) completely and reopen it. This ensures all changes take effect.

Step 4: Activate Your Environment

Now, try activating your environment again:

conda activate test_env

This should work without prompting you to run conda init again. If it does, you are now ready to use your conda environment!

Troubleshooting Persistent Issues

If you still encounter issues, it might be a good idea to check for any conda updates or reinstall Miniconda, ensuring that you follow the installation prompts carefully. Sometimes, starting afresh removes any configuration errors introduced during the initial setup.

Setting up conda on Windows can occasionally test your patience, but with a careful approach to initializing conda and setting up your PATH, these initial hurdles can be overcome. Remember, accurate configuration at the start can save a lot of time and frustration later!

Labels:

Monday, 13 October 2025

10 Free Projects to Get Started with AWS

Are you interested in learning more about Amazon Web Services (AWS) but not sure where to start? Look no further! In this blog post, we'll explore 10 free projects that you can build using AWS services. These projects cover a range of topics, from serverless computing to machine learning, and everything in between. By the end of this post, you'll have a better understanding of the capabilities of AWS and have some hands-on experience to boot!


Build a Serverless Web Application:

Serverless computing is all the rage these days, and AWS Lambda is at the forefront of this trend. With Lambda, you can run code without provisioning or managing servers, making it easy to build scalable web applications. In this project, you'll learn how to create a simple web application using AWS Lambda and API Gateway. You'll also get familiar with the basics of serverless architecture and how to deploy your application to production. 

Get started here:  https://lnkd.in/gCgdvmYK

Read more »

Labels:

Thursday, 9 October 2025

Top Free DevOps Tutorials and Courses on Udemy

Are you looking to learn DevOps but not sure where to start? Look no further! This article will provide you with a list of top free DevOps tutorials and courses available on Udemy. Whether you're a beginner or an experienced professional, these courses will help you enhance your skills and knowledge in DevOps practices and tools.


1. Introduction to DevOps, Habits and Practices:

This course is perfect for those who are new to DevOps. It covers the basics of DevOps, its habits, and practices. You'll learn how to create world-class agile, lean, and continuous delivery teams that can deliver high-quality software quickly and efficiently. Check it out here: https://lnkd.in/dsvQQcYj

Read more »

Labels:

Tuesday, 7 October 2025

GraphQL vs REST API: A Comparative Study

GraphQL and REST are two prominent approaches for building APIs. REST has been around for a long time, offering a simple way to structure and interact with web services. GraphQL, developed by Facebook in 2012, is a more modern alternative that addresses some of the limitations of REST. This blog post provides a comparative analysis of GraphQL and REST APIs in tabular format, along with examples of input endpoints and their respective outputs.

Comparative Analysis

1. Data Fetching

Aspect GraphQL REST
Querying Data Allows querying multiple resources in a single request Requires multiple requests to different endpoints for related data

Example Query { user(id: "1") { name, email, posts { title } } }

GET /user/1 and then GET /user/1/posts

Example Output {"data": {"user": {"name": "John", "email": "john@example.com", "posts": [{"title": "First Post"}]}}} {"name": "John", "email": "john@example.com"} / [{"title": "First Post"}]

Read more »

Labels:

Saturday, 4 October 2025

The Git & Github Bootcamp Part 7- Master on essentials and the tricky bits: rebasing, squashing, stashing, reflogs, blobs, trees, & more!


The Power of Reflogs - Retrieving “Lost” Work

1. Introducing Reflogs

Reflogs are a mechanism in Git that records updates to refs (branch heads, tags, etc.), effectively logging every state your repository has been in. This includes commits, merges, and even failed attempts at rewriting history.

2. The Limitations of Reflogs

Reflogs are local to your repository; they are not shared when you push or pull changes. They’re meant for recovering local changes that may have been lost or mistakenly altered. Additionally, entries in reflogs expire after a certain period (default is 90 days for commits that can no longer be reached and 30 days for reachable commits).

Read more »

Labels: