GeistHaus
log in · sign up

Obfuscated Memories

Part of irshadpi.me

Personal blog of Irshad Pokkakillath Ismail (Irshad P I)

stories primary
The One Who Got Away
englishstoryliteruxure
How did I wind up here? I usually avoid weddings, especially those of distant relatives, but here I am. My eyes wandered around aimlessly.
Show full content

How did I wind up here? I usually avoid weddings, especially those of distant relatives, but here I am. My eyes wandered around aimlessly.

There were stalls of food arranged on either side of the lawn. Drinks too and several groups scattered here and there.

I walked over to the only group I could recognise there - a few of my distant cousins. I had mastered smalltalk to the point where I could blend in a group without speaking a word. A smile would do as I leaned into listen to them.

“Look at the bungalow? castle! really! Their family is filthy rich!”

“They’re politicians-what do you expect?”

“She definitely got lucky, haha”

Their conversation faded into the background as my eyes landed on someone in the crowd.

She wore a red lehenga, vibrant but still outshone by her round face and sharp eyes. Her wavy hair fell in strands that glistened on the left side of her face. She had a smile like no other, captivating and mysterious.

Our eyes met, and she held my gaze, I smiled awkwardly and she walked toward me senting shivers through my body.

“Have you all eaten?”

She asked us courteously, I stayed silent while a soft “no..” erupted from our tiny crowd. As I followed them to the dining table, I could still feel her eyes on me, glancing back as I sat down.

Usually, I would have left right after dinner, but my eyes kept searching for her and there she was - at the edge of the garden near the lily pond, staring out to the night sky, almost as if she’s having a conversation with the moon.

I gathered my twenty seconds of insane courage to strike up a conversation. “The moon’s stunning tonight, isn’t it?” I said, slightly embarrassed by how cheesy it sounded.

Her anxious face bloomed into a smile as she turned toward me, the wine glass glowing red in the moonlight.

“It is. Lucky are the ones who stargaze every night.”

it felt like I’ve always known her, the conversation sailed along, with more wine and some gin. We talked about everything from here to the moon and beyond. An hour felt like few minutes.

A cousin dragged me to the stage for the family picture as I managed to tell her that I’d be back in minutes.

She wasn’t there when I returned. I couldn’t find her. All that talk and didn’t even ask her name - how stupid of me?

I looked for her in all the places, from kitchen to bedroom. In the rush, I ended up walking to a room, where I found the bride and the groom’s father talking. - I had to apologize and leave quickly. It was a bit weird to find them there on the wedding eve. “Rich family things”, I thought to myself.

I gave up eventually and decided to leave, only to find a notification on my phone. It was in one of the apps I was working on at the time with anonymous feedback and chat. She probably remembered my username when I was discussing about modern dating and the app with her.

“Do you miss me already?”

She replied. Our texts were engaging, just the same intensity as we were in person. More teasing and flirting here and there. When it started crossing boundaries, I told her that I’m good at holding my horses back, controlling myself and not letting go. She said she had to test that.

She came down to meet again, talk and more drinks, until the stalls closed. We were tipsy and out of our minds.

“I know a place we should go right now”

She said it with lust in her eyes and I knew exactly what she meant, as much as I wanted to - I didn’t want it to be like this - drunk and fooling around. The sober part of brain knew what I truly wanted - a future where we stargaze every night.

I hesitated and she sensed it..

“Are you sure you don’t want to?” She asked me.

“You know I really want to, but not like this”

She looked at me in despair and walked back, “I have to go to the washroom, I’ll be back soon.”

That was the last I saw of her, I waited for minutes, almost half an hour. My texts went ignored. Until I got one at last.

“You have a good heart, but it shouldn’t have stopped you. If you knew it will never happen again.”

My heart sank into the floor. I had to find her, I asked my cousins, explained to them everything, they had seen me with her but no one knew who she was. There was only one way to find her. One person we can ask. The bride.

I walked into the house to find the bride, groom and his father in the same room again,. Weird, but I ignored.

The alcohol gave me enough confidence to ask..

“Shana, this is important. Who was that girl I was with earlier? You saw us—she wore a red dress and a small necklace…“

Before she was mouthing “Ra..”, she stopped herself and looked at the groom and the father. Both of them staring at me, confused and angry.

“Why do you want to know?” The groom asked me,.

“I just want to know. It’s important”

“Get out” his father’s voice raised.

I didn’t flinch. I looked at the bride again, waiting for an answer.

She, in a begging expression uttered

“Don’t do this, don’t go behind her, she’s married… “

She nodded her face in denial as she looked at the groom.

Then everything clicked in my head. Like a molten metal hardening. There were already an audience behind us, few servants and close guests wondering what’s going on.

“She…“

“She is his first wife?”

I stood there in disbelief, shattered.. the guy walked towards me as his father searched the shelf for a gun he couldn’t find.

The bride fell to her knees crying and helpless. I turned around and walked out of there, out of the house.

As I stepped out to the moonlight, I realised that all she wanted was an escape.

My phone chimed with a new message

“thank you and goodbye” I stood there processing everything. What a night!

Suddenly, a gunshot echoed from the floor above, ripping through the eerie silence.

https://irshadpi.me/the-one-who-got-away
The Last Dream
englishstoryliterature
“Stop bothering me, I know you’re not real and that I’m dreaming.”
Show full content

“Stop bothering me, I know you’re not real and that I’m dreaming.”

He asked her while twisting and turning in his sleep. He was furiously sweating as his eyelids flicked fast in rhythm with his heartbeats. It was the fourth time that night. He kept trying, trying to fall asleep only to be awakened by a different nightmare. Weirdly enough, the person in those remained the same.

“Why are you talking to me?…“

A floating shadow from the other side of the window addressed him back. Her high-pitched voice was interlaced with a creaky noise, making it sweet yet uncanny. ”.. aren’t you scared of me?”

He was half awake, looking out through the window as the shadow got closer, a silhouette in the moonlight.

“You’re being creepy, but I know I’m still in a dream and that you’re not real. You can’t do anything other than try and scare me in my dreams.”

He waited for a reply. Seconds passed. An uneasy silence filled the void. The figure kept getting vague as it faded away. He went back to sleep.

Another dream.


He’s in an exam hall. Well, it’s not an exam hall. There are a bunch of people. Sixty-four to be exact. Everyone is the same height as him. Sitting down. Meditating or something?

A dystopian future where you rent your brain time to get paid. The downside is that you can’t be occupied with thoughts. You have to keep all your electronic devices away too - including your phone. He was distracted for a while.

Something triggered the system. A guard walked into the room. She asked around, looked around. They weren’t getting the same brain activity output as they should. Was it because he was bothered about his phone? Waiting for a specific text? He couldn’t tell.

She didn’t look alright. Too pretty to be a guard. Her anger didn’t suit her, neither did her uniform. She took out her gun and shot a person sitting three columns away from him.

There were a few seconds of confused silence before the room turned into chaos.

He fell to the floor and held his hands close in a fetal position. She moved her rifle pointing from person to person and eventually him.

No one tried to stop her as she pulled the trigger, jolting him awake. Again.


“For fucks sake.” He burst out as mosquitos buzzed around his ears. They were having a feast that night.

He saw a face across the door to the hallway. Familiar. The same face that of the guard, the one that appeared in the mirror, the same seductive figure that was a shadow in the moonlight. She wore an ordinary nightdress. Her wavy body was visible through the half-transparent cloth.

“Oh it’s you!”

He wasn’t spooked. Just amused.

“You’re clever. But I know I’m still dreaming.”

He continued as he got up from bed

“I can tell because I closed this door. The alarm would go off if anyone were to open it. It didn’t and you’re still just in my dream” He felt proud like a detective who solved a murder mystery.

She just stared down at him as he got closer and closer.

“And this time, I am gonna catch you. To prove that you’re not real.”

He was about to grab her arms as she pulled away and started walking backwards, she wasn’t wearing an anklet, yet her footsteps made a sound that echoed through the empty house. She tried to get away from him as he moved faster.

The wall stopped them eventually as he grabbed her by the arm. Her eyes kept wandering around. Head down. She was shy.

He was in shock, it was unexpected. Isn’t she supposed to be like a hologram? How could he feel her skin and her breath?

Her flesh felt real. Their eyes locked. A woman’s touch. Her skin felt like the smoothest surface he’s ever laid his finger on.

It went the opposite of what he expected. A confrontation of lips as their eyes closed in darkness. He could taste her and it was too real to be a dream.

Something just clicked in his brain. The last few active cells of his nervous system sent down a spark of caution.

‘It has to be a dream. I must wake up.’

And this time he did. Sweating profusely.

He looked around. The window, the mirror and even the ceiling. She was nowhere to be found. He let out a breath of relief. The AC in his room made extra noise in an attempt to try and cool the hallway as well.

Goosebumps fluttered through his body. He took his phone and started writing. What should be the first line? Something that grabs attention! He started typing…

“Stop bothering me, I know you’re not real and that I’m dreaming.”

https://irshadpi.me/the-last-dream
Dynamic Routes on GitHub Pages using SvelteKit and 404 Trickery
techwebsveltesveltekit
Introduction
Show full content
Introduction

The greatest thing about GitHub Pages is that it’s absolutely free to deploy static websites, unlike other alternatives such as Vercel, Netlify and so on. However, there’s a catch – and that’s the word “static”, you can only deploy websites that are compiled into a statically generated website.

There is no way to deploy a website with some kind of dynamic routing. Or is there?

The Problem

When I built shareti.me (to solve the problem of handling timezones that I’ve personally faced), There was the important part of sharing URLs with embedded time.

If I were to deploy it on Github Pages, it meant that I won’t be able to use Dynamic routing, and my URL would look like this:

https://shareti.me/?t=2024-04-05_23:00Z+5:30

I like beautiful URLs, and this one looked ugly. Is there a solution that didn’t involve me having to pay for deployment?, a solution in which the URL can be as beautiful as

https://shareti.me/2024-04-06/3:25/+5:30

Turns out there is.

Solution

When you think about it, it seems like an impossible task. GitHub Pages just host the HTML and other static files, there is no way to have a server component which will read the route and load the page dynamically.

To rephrase the question,

How can there be a page that can catch all the URLs and route to the correct one dynamically?

And then the answer becomes obvious: the 404 error page. Fortunately, GitHub lets you add a custom 404 page which is what we are going to use.

Here’s the code for the project if you want to skip the article and just dive right in

1. Create your app (you can skip this if you already have a project)
npm create svelte@latest my-routed-app
# Select Skeleton Project
# Use TypeScript
# Add ESLint + prettier (I like things neat and pretty)

followed by

cd my-routed-app
npm install
git init && git add -A && git commit -m "Initial commit"
npm run dev -- --open

You would see the skeleton project opening in your web browser.

Welcome to SvelteKit

2. Use static adapter.

For GitHub pages, we need to use static site generation (SSG) mode of SvelteKit. Which is done using adapter-static.

Install the adapter with

npm i -D @sveltejs/adapter-static

And then add it to your svelte.config.js replacing the existing adapter.

svelte.config.js:

- import adapter from '@sveltejs/adapter-auto';
+ import adapter from '@sveltejs/adapter-static';

Add a file called +layout.ts to src/routes directory to specify that the app should be pre-rendered with following content.

/src/routes/+layout.ts:

export const prerender = true;
3. Add an error handler at the root route to catch all errors

Next step is telling Svelte how to handle errors which includes 404 Not found.

Create a file named +error.svelte in routes with the following content

/src/routes/+error.svelte:

<script lang="ts">
    import { page } from '$app/stores'; 
</script>

<h3> Requested page path is {$page.url.pathname} </h3>

Save it and then open a random URL in browser http://localhost:5173/random/nested/path/

You would see the following.

Random URL Path

4. Add a page which uses the route you passed dynamically.

Create a new folder called pages inside src and add a new file TerminalView.svelte.

(This page here is an example, you would ideally customize as per your app. Where the page handles how to parse the pathname with slashes.)

/src/pages/TerminalView.svelte:

<script lang="ts">
	export let pathname: string;
</script>

<div class="container">
	<div class="titlebar"></div>
	<span>{pathname} $</span>
	<span class="blinker">&#32;</span>
</div>

<style>
	.container {
		background: black;
		height: 600px;
		width: 800px;
		padding: 10px;
		margin: auto;
		margin-top: 5vh;
		border: 1px solid #acacac;
		border-radius: 6px;
		box-shadow: 0px 0px 20px #acacac;
	}

	span {
		color: rgb(15, 255, 67);
		font-family: monospace;
	}

	.blinker {
		opacity: 1;
		margin-bottom: -2px;
		height: 13px;
		margin-left: 6px;
		border-left: 2px solid rgb(15, 255, 67);
		animation: blinker 0.9s steps(2, start) infinite;
	}

	@keyframes blinker {
		to {
			visibility: hidden;
		}
	}
</style>

Then import it and use the page in +error.svelte

/src/routes/+error.svelte:

<script lang="ts">
	import { page } from '$app/stores';
	import TerminalView from '../pages/TerminalView.svelte';
</script>

<TerminalView pathname={$page.url.pathname} />

Now if you open a random URL, say http://localhost:5173/home/admin/secrets

You’ll get the following.

Terminal View

5. Push the code to GitHub.

Go to github.com, create a new repository,. Set the origin URL in our project and push the code so far.

git remote add origin git@github.com:[YOUR_USERNAME]/[YOUR_REPOSITORY].git # Replace with your values
git branch -M main
git push -u origin main
6. GitHub pages configuration.

Add the gh-pages package.

npm add -D gh-pages

Add the deploy script to package.json

package.json:

  "build": "vite build",
+ "deploy": "vite build && node ./gh-pages.js",
  "preview": "vite preview",

At the root directory of project, create a file named gh-pages.js with the following content:

gh-pages.js:

import { publish } from 'gh-pages';

publish(
	'build',
	{
		repo: 'https://github.com/[YOUR_USERNAME]/[YOUR_REPOSITORY_NAME].git', // Replace with your values
		user: {
			name: 'Author Name',
			email: 'Author Email'
		},
		dotfiles: true
	},
	() => {
		console.log('Deploy Complete!');
	}
);

7. Providing a custom 404 page.

GitHub Pages calls /404.html by default as the custom error page. So we need to add a route for the same so that the 404 Error gets handled by SvelteKit and not by gh-pages.

in src/routes/, add a new directory named 404.html,

Then create a file named +page.svelte inside 404.html:

/src/routes/404.html/+page.svelte:

<script lang="ts">
	import { page } from '$app/stores';
	import TerminalView from '../../pages/TerminalView.svelte';
</script>

<TerminalView pathname={$page.url.pathname} />
8. Fix relative paths.

Change your svelte.config.js to disable relative paths and set the base path to your repository name, note that depending on your BASE URL, this config may change. If you have a custom domain, the base parameter doesn’t have to be changed. Read using a custom domain to know more.

In my case, the app will be deployed at [ROOT_DOMAIN]/my-routed-app, which is why I gave /my-routed-app

svelte.config.js:

import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';

/** @type {import('@sveltejs/kit').Config} */
const config = {
	preprocess: vitePreprocess(),

	kit: {
		paths: {
            base: process.env.NODE_ENV === 'production' ? '/[YOUR_REPOSITORY_NAME]' : '',
			relative: false,
        },
		adapter: adapter()
	}
};

export default config;

9. Deploying

Create an empty file called .nojekyll inside static folder, to tell GitHub Pages to not use Jekyll.

static/.nojekyll:

Run the following

npm run deploy

You might have to give access to GitHub through a sign in popup.

Once the deploy process is complete, your page will be available at the URL specified (which in my case happened to be https://irshadpi.me/my-routed-app/)

Project code and example

All the above code is pushed to repository my-routed-app with correct commits for your reference. If you have any further questions, feel free to ask in comments below.

Drawbacks

The most obvious drawback is that the HTTP Response code for the page would be 404, which is not SEO friendly and will throw errors in the development console. This is more of a gimmick than an actual way to handle dynamic routing.

That said, for for some projects, this might just work well, as it did for ShareTime - https://shareti.me/2024-04-08/4:20/+5:30

Using a Custom Domain

If you have a custom domain, you can set it up by following instructions here.

You will have to add the root domain to your project in the file static/CNAME as used in this case.

https://irshadpi.me/deploying-sveltekit-dynamic-routes-github-pages
The Mother Cat
englishstoryliterature
This story is also available in Malayalam
Show full content

This story is also available in Malayalam

The Mother Cat

She has been a usual visitor ever since we moved to our new house. “The Mother Cat”!

She had brown skin, a round beautiful face filled with courage and vigour and a full stomach.

Usually, my grandma has the habit of naming every single cat - even the stray ones. But in this case, she didn’t name her. We just called her “The Mother Cat” (taḷḷa pūcca in Malayalam)

She used to lay on the sack inside the barn when it rains and on the north slope of our house otherwise. She had a special ability to know whenever we bought fish at home.

She is not guarding (I won’t even call it guarding!) the house out of love, her target, of course, is having food. Grandma liked her a lot too. Somehow, she got a special consideration than other cats.

When she disappeared for a few days, we were kinda sure about it - as we expected, she gave birth to 4 beautiful kittens! The delivery was comfortable in the barn itself. Four cute kittens, one white, two brown, and one slightly darkish brown.

Gradually, the kittens started walking, they learned to fetch food from us, touch grandmas legs and walk around to please her, to make beautiful little “meow sounds”. Days passed as they grew up.

Two of the kittens were strangely close to each other one of them was brown and another was dark brown. They always walked together, touched each other and acted like they were a couple. We used to call them “the sisters”. And one sudden day, the mother cat stopped coming. She was not there to get fish that day, and only two of her kittens - the sisters were there.. somehow she and other two kids had disappeared.

She probably passed away. Grandma was very sad about it, and so were me and mom. somehow, something felt missing without her.

Then for weeks, it was both of them, the sisters. Although they were not our house cats, they were a big deal to us and we always used to talk about them, keep the leftover food for them. Slowly, we started to forget about the mother cat.

Weeks passed. Both of them grew up. And somehow, they grew apart, relations - like everything else are not forever right?

Then it was only the darker sister, other sister stopped coming at all. Grandma called her “diii” (slang for a girl in Malayalam) and we just called her “cat”, since there were no other cats in our life.

And one sudden day, we heard that sound, yes!!, the same sweet “meow”, it’s her, the mother cat!. Mom called me and grandma to the front and she was sitting there on top of the wall, proud as always, pregnant again. we were happy when she let out another sweet loud “meowww”


Now, let me rewind a bit. Let me talk about my observation, the truths, things we didn’t see and notice. Or in other words - just rambling silly thoughts of me when the power was down and I had nothing else to do.

It’s not so simple as we think. All these are very well planned by the cats. They have a council, they allocate grids of houses groups of cats, and then assign each cat to a house even before a new house is being built. She was assigned to our house.

The cats assigned slowly learn and understand the humans living there, they know old aged women are easier to please. They are specially trained cats to slowly subdue humans and fetch food. Every cat is tasked with a mission.

Everything went according to plan for her. She came here, got into our hearts, had enough food and freedom when she gave birth, she started training her kittens with us, teaching them all she knows about the mission, making them prepared for the life. then after the training period, she left for another duty when a new task got assigned for her.

When she left, both of her kittens were then assigned to our house, when they grew up, the food was not enough for both of them, so they had to split apart, sadly. And one of them continued!

Meanwhile, the mother cat returned after completing her mission. Maybe for the next mission. Let’s wait and see!

Pictures

The Mother Cat The Mother Cat

The Sisters The Sisters

Corrections and comments are welcome :)

https://irshadpi.me/mother-cat-english
തള്ളപ്പൂച്ച
malayalamstoryliterature
This story is also available in English
Show full content

This story is also available in English

തള്ളപ്പൂച്ച

പുതിയ വീട്ടിലേക്ക് മാറിയ ദിവസം തൊട്ടേ അവൾ പതിവായി വീട്ടിൽ വരാറുണ്ട്. “തള്ള പൂച്ച”!

തവിട്ടു നിറം, സൗന്ദര്യം നിറഞ്ഞ - ശൗര്യവും വീര്യവും ഉള്ള മുഖം. പ്രസവിക്കാൻ അടുത്ത പോലെ നിറഞ്ഞ വയറും…

സാധാരണ വീട്ടിൽ വരുന്ന തെരുവു പൂച്ചകളെ വരെ പേരിട്ട് ആണ് ഉമ്മമ്മ വിളിക്കാറെങ്കിലും ഈ പൂച്ചയ്ക്ക് എന്തോ, പേരൊന്നും ഇട്ടില്ല. “തള്ള പൂച്ച”. അങ്ങനെ തന്നെയാണ് വിളിക്കാറ്.

മഴ പെയ്യുമ്പോൾ വിറകുപുരക്ക്‌ ഉള്ളിലെ ചാക്കിൻ മേലും, മഴ ഇല്ലാത്തപ്പോൾ വടക്കേപുറത്തെ ചായ്‌പിലും ആണ് താമസം. വീട്ടിൽ മീൻ വാങ്ങിച്ച കാര്യം ആദ്യം അറിയുന്നത് അവളാണ്.

സ്നേഹത്തിന്റെ പുറത്തൊന്നും അല്ലാട്ടോ തള്ളപ്പൂച്ച വീടിന് കാവൽ ഇരിക്കുന്നത്. ഭക്ഷണം തന്നെ ആണ് ഉദ്ദേശ്യം, പിന്നെ ഉമ്മുമ്മക്ക്‌ എന്തോ, നല്ല ഇഷ്ടമാണ്. മറ്റു പൂച്ചകളെക്കാൾ ഒരു പ്രത്യേക പരിഗണന കൊടുക്കാറുണ്ട്.

കുറച്ച് ദിവസം ആയിട്ട് കാണാതെ ആയപ്പോൾ ഞങ്ങൾക്ക്‌ ഉറപ്പായിരുന്നു. വിചാരിച്ച പോലെ തന്നെ തള്ളപൂച്ച പ്രസവിച്ചു. വിറകു പുരയിൽ തന്നെ ആയിരുന്നു സുഖപ്രസവം. നാല് കുഞ്ഞുങ്ങൾ, ഒരു വെളുത്തതും, രണ്ടു തവിട്ട്‌ നിറം ഉള്ളതും, ഇത്തിരി കൂടെ ഇരുണ്ട നിറമുള്ള ഒന്നും.

പയ്യെ പയ്യെ കുട്ടികളും പുറത്ത് ഇറങ്ങിത്തുടങ്ങി. തള്ളയുടെ കൂടെ ഭക്ഷണം വാങ്ങാനും, തള്ള കരയുന്ന അതേപോലെ തന്നെ മധുരം നിറഞ്ഞ ശബ്ദത്തിൽ മ്യാവൂ കരയാനും.., ഉമ്മുമ്മയുടെ കാലിൽ മുട്ടിയുരുമ്മി നടക്കാനും അവർ പഠിച്ചു. ദിവസങ്ങൾ കടന്നുപോയി…

കുട്ടികളിൽ രണ്ടുപേർ ഒരു പ്രത്യേക തരത്തിൽ സുഹൃത്തുക്കൾ ആയിരുന്നു… ഏതു നേരവും മുട്ടിയുരുമ്മി ആണ് നടത്തം, രണ്ടുപേരും തമ്മിൽ എന്തോ ഒരു ഹൃദയബന്ധം ഉള്ളത് പോലെ, അങ്ങനെ പെട്ടെന്നൊരു ദിവസം തള്ളപ്പൂചയെ കാണാതായി… വരാതെയായി… മീൻ ചോദിക്കാൻ ഈ രണ്ടുപേരും മാത്രമേ വന്നുള്ളൂ ആ ദിവസം. അവരെ ഞങ്ങൾ വിളിക്കാറ് പെങ്ങൾമാർ എന്നാണ് ഒരെണ്ണം തവിട്ടു നിറവും.. മറ്റേത് അൽപം ഇരുണ്ട നിറവും.

തള്ളപ്പൂച്ച മരിച്ചുപോയിരിക്കും. ഉമ്മുമ്മ നല്ല വിഷമത്തിൽ ആയിരുന്നു, അതുപോലെതന്നെ ഞാനും ഉമ്മയും . എന്തോ അതിനെ കാണാതെ ഒരു സുഖമില്ലാത്ത പോലെ..

പിന്നെ അങ്ങോട്ട് അവർ രണ്ടുപേരും മാത്രം ആയി വീട്ടിലെ പൂച്ചകൾ. വളർത്തുന്ന പൂച്ചകൾ അല്ലെങ്കിലും ഞങ്ങൾക്ക് എല്ലാവർക്കും വലിയ കാര്യം തന്നെ ആയിരുന്നു അവർ. തള്ളപൂച്ച പോയത് മെല്ലെ മറന്നുതുടങ്ങി…

ആഴ്ചകൾ കഴിഞ്ഞുപോയി… പെങ്ങൾമാർ വലുതായി… എന്തോ, ഒരുമിച്ച് കാണാതെ ആയി. അവർ തമ്മിൽ ഉള്ള അടുപ്പം മെല്ലെ ഇല്ലാതായ പോലെ, മറ്റെല്ലാം പോലെ തന്നെ ബന്ധങ്ങളും എന്നെന്നേക്കും അല്ലല്ലോ?

പിന്നെ ഇരുണ്ട പൂച്ച മാത്രം ആയി സ്ഥിരം അതിഥി. പേരൊന്നും ഇട്ടിട്ടില്ല… “ഡിീ” എന്നാണ് ഉമ്മുമ്മാ വിളിക്കാറ്… ഞങ്ങൾ “പൂച്ച” എന്നും… വേറെ ആരും ഇല്ലാലോ പൂച്ച ആയിട്ട്.

അങ്ങനെ ഇരിക്കെയാണ് ഇന്നലെ, ദേ.. വീടിന്റെ മുന്നിൽ നിന്ന് ഒരു പരിചിതമായ ശബ്ദം!! അതേ.. തള്ള പൂച്ച തന്നേ.. ഉമ്മ എന്നെയും ഉമ്മുമ്മയെയും വിളിച്ചു കാണിച്ചു തന്നു… അതേ, ഒരു മാറ്റവും ഇല്ല… മതിലിനു മുകളിൽ അഭിമാനത്തോടെ ഇരിക്കുന്നു. വീണ്ടും ഗർഭിണി ആണ് എന്ന് തോന്നുന്നു.

സന്തോഷത്തോടെ നിൽക്കുന്ന ഞങ്ങൾ മൂന്നുപേരെയും നോക്കി ഉറക്കെ ഒരു “മ്യാവൂ” കരഞ്ഞു.


ഇനി പറയാൻ പോകുന്നത് ഇതിനൊക്കെ പുറകിലെ എന്റെ നിരീക്ഷണങ്ങൾ… സത്യങ്ങൾ, ഞങ്ങൾ കാണാതെ - ശ്രദ്ധിക്കാതെ പോയ കാര്യങ്ങൾ. അല്ലെങ്കിൽ ഒരു പവർകട്ട് ദിവസം വേറെ ജോലിയൊന്നും ഇല്ലാത്തതിനാൽ ഞാൻ ആലോചിച്ചു കൂട്ടിയ ചിന്തകൾ…

നമ്മൾ വിചാരിക്കുന്ന പോലെ അല്ല കാര്യങ്ങൽ… പൂച്ചകൾ ഇതെല്ലാം മുൻകൂട്ടി പ്ലാൻ ചെയ്തിട്ടുണ്ട്. അവർക്ക് ഒരു കൌൺസിൽ ഒക്കെ ഉണ്ട്. പഞ്ചായത്തുകളും വാർഡുകളും പൂച്ചകൾ തിരിച്ചു വീതം വെച്ചിരിക്കുകയാണ്. പുതിയ വീട് പണി തുടങ്ങുമ്പോൾ തന്നെ ഒരു പൂച്ചയെ ആ വീട്ടിലേക്ക് നിയോഗിക്കും . തള്ളപ്പൂച്ചയെ ഞങ്ങളുടെ വീട്ടിലേക്കാണ് നിയോഗിച്ചത്.

മെല്ലെ മനുഷ്യന്മാരെ മനസ്സിലാക്കി അവരെ കയ്യിലെടുത്ത് അവരിൽ നിന്ന് ഭക്ഷണം വാങ്ങിച്ചെടുക്കാൻ പ്രത്യേക പരിശീലനം ലഭിച്ച മാർജാരൻമാർ. വൃദ്ധരായ സ്ത്രീകളെ പ്രീതിപ്പെടുത്താൻ എളുപ്പമാണെന്ന് അവർക്ക് അറിയാം. ഓരോ വീടിന്റെയും ദൗത്യം ഓരോ പൂച്ചകൾക്ക് ആണ്.

എല്ലാം പ്ലാൻ ചെയ്ത പോലെ തന്നെ ആണ് നടന്നത്. തള്ള പൂച്ച ഇവിടെ വന്നു. ഞങ്ങളുടെ മനസ്സുകളിൽ ഇടം പിടിച്ചു. പ്രസവിച്ചു കഴിഞ്ഞപ്പോൾ കുട്ടികളെയും പരിശീലിപ്പിച്ചു. പിന്നെ അടുത്ത ദൗത്യത്തിന്റെ വിളി വന്നു, അങ്ങോട്ടേക്ക് പോയി. മക്കളെ രണ്ടുപേരെയും ഈ വീട്ടിലേക്ക് നിയുക്തമാക്കി. അമ്മയുടെ പരിശീലനം ലഭിച്ച മക്കൾ ഞങ്ങളെ കയ്യിലെടുത്തു.. പിന്നെ മെല്ലെ മെല്ലെ കൊറോണ വന്നതിനു ശേഷം മീൻ വാങ്ങുന്നത് കുറഞ്ഞപ്പോൾ പെങ്ങൾ മാർ വലുതായപ്പോൾ അവർ മനസ്സിലാക്കി, “ഒരാൾക്ക് ഉള്ള ഭക്ഷണം മാത്രമേ ഇവിടെ നിന്ന് കിട്ടുന്നുള്ളു”, അവർ രണ്ടുപേരും പിരിയേണ്ടി വന്നു.

ഇതിനിടെ തന്റെ ഉദ്യമം പൂർത്തികരിച്ച തള്ളപ്പൂച്ച വീണ്ടും വന്നിരിക്കുന്നു. ചിലപ്പോൾ അടുത്ത ദൗത്യം കൊണ്ടാവാം! കാത്തിരുന്നു കാണാം…

ചിത്രങ്ങൾ

തള്ളപ്പൂച്ച തള്ളപ്പൂച്ച

പെങ്ങൾമാർ പെങ്ങൾമാർ

തിരുത്തലുകളും അഭിപ്രായങ്ങളും ക്ഷണിക്കുന്നു :)

https://irshadpi.me/mother-cat-malayalam
An Attempt to Crack the Entombed Maze Generation Algorithm
codestudypuzzle
Attempting to solve what I thought was an interesting challenge only to find out it was not. So I proposed a new challenge.
Show full content

Work in Progress

So I came across this problem in the List of unsolved problems in computer science - Wikipedia1 on a boring Saturday evening when I was randomly browsing the web.

A bit of background

Entombed is an Atari 26002 game released in 1982. The game has a very simple gameplay. Try out the game here: Entombed

There’s a vertically scrolling maze (which is also symmetric) and player has to go through the maze avoiding enemies and picking up make-break boosters (which are useful for making a wall or breaking one)

The game has been subject to academic research particularly for its maze generation. Since the Atari 2600 had a limited ROM size, the mazes were too big to store on the ROM, and after researchers evaluated3 the game’s ROM, they found that the mazes were generated during runtime.

Defining the problem

The mazes that were produced in the game were unsolvable without efficient use of the make-break item (Which adds the game factor to it). However, during an interview with the Paul Allen Newell who previously worked on the game, it is said that they were able to come up with an algorithm which consistently generates solvable mazes in the interview with Paul Allen Newell4

The story of the algorithm is that one night after work, Duncan and I went out for a beer and ended up coming up with this “problem” of wondering whether one could generate an endless maze that always had a solution. At the time, we weren’t thinking of a game per se, it just seemed like an interesting puzzle for us to solve. We worked out the algorithm and, since I knew how to program a VCS system (Duncan was Vectrex only), I spent a weekend coding something up. We were surprised at the elegance of the algorithm as it gave us the ability to dial in a “difficulty factor” (via a bit setting) and we could prove that there was not only a point where it became unsolvable

(Here, “VCS” refers to Atari Video Computer System and not Version Control System)

So the question I was actually interested in is

Is it possible to come up with a maze generation algorithm which only produces a solvable maze using the 5 context bits (two bits to the left and three bits above)?

Simply upon inspection, we can see that the maze that is generated within the game itself is unsolvable. Although the title of this post is about Entombe and it’s mazes, we’re past that and I am starting to question why this problem is even on the list of unsolvable problems1. The maze generated isn’t solvable and not special except for the aesthetics of it. A reddit thread about this in /r/programming seems to agree with me5, which sadly I stumbled upon only after spending enough time on this.

However, I will move on to defining a new problem and possibly try to answer it.

Solvability

A vertically scrolling maze of MxN grid (M width and N height) can be defined as solvable if you can add two empty rows on the top and bottom of the maze respectively to make it Mx(N+2) and there exists a path from the top row to the bottom row. This is more or less an informal definition, but very

For example, The maze given below is solvable

A maze with solution There exists a path from the top to the bottom

But the one below is not. A maze without solution No path is present

It is trivial to come up with an algorithm for generating mazes that are always solvable. A straight line path from top row to bottom row is solvable by definition, however we’re not interested in that, so our definition of mazes needs to be more tricky.

Definition for an Interesting maze

As mentioned, a maze which is just “Solvable” isn’t of particular interest. It is very trivial to generate it and solve it. So I am going to add 2 more criteria for the generated maze. I came up with these criteria after a bit of reference on mazes6

1. The maze should be simply connected or perfect, i.e, it should have no loops and should have one and only one solution.

This means that the maze should both be solvable and not be very easily solvable (like a hallway of empty blocks).

2. The maze should have at least one dead-end

A dead-end can be defines as an empty cell in the maze which is not the start or end cell and has only one path out of it. A maze without any dead-end will be a very easy one to solve, but instead, we want the maze to be challenging enough.

Now, I am defining an Interesting Maze as a maze which satisfies both 1. and 2.

So our problem definition becomes

Is it possible to come up with a maze generation algorithm which produces a solvable perfect maze with at least one dead-end^ using the 5 context bits (two bits to the left and three bits above)?

X is generated using the bit values of a, b, c, d and e.

Attempting a solution

Before approaching the solution, my intuition for the answer is “No”, it is not possible to generate an Interesting maze with only using the given context-bits for generating the next bit.

Take P to be our initial Conjecture

P: It is possible to construct a vertically scrolling perfect maze with at least one dead-end using the cell values of previous two blocks in the same row and left, middle and right cells on the row above it

Assume our generated maze Z has a thick wall with two cells width on either sides (This doesn’t affect our original conjecture since adding solid walls on sides will not interfere with the original solution)

Ehhm… Waitt!!

As I was trying this out in paper to order to prove it, I actually was able to come up with a configuration that generates a perfect maze (with only one path and no loops) and with more than one dead-ends, although it doesn’t look very challenging, it does satisfy all the criteria and it is trivial to show that the maze will satisfy these conditions (Since no random selection is involved). Here is the configuration for those who are interested (You might want to toggle the first row to something like 1, 1, 0, 1, 1, 1, 1, 1, …)

A maze which is perfect and has dead-ends Well, that was a bit disappointing

And even adding some randomness makes the maze a bit better, but still kinda not challenging.

Here, the ? indicates bits which are randomly chosen.

This maze looks a bit more interesting at least At least this one is a little bit better

Following are the rules used for this particular maze

		00110 - 1
		00111 - 0
		01000 - R
		01011 - 1
		01100 - 1
		01101 - 0
		10000 - 1
		10001 - 1
		10010 - 1
		10011 - 0
		11000 - 1
		11001 - 1
		11011 - 1
		11100 - 0
		11101 - 0

Okay, but this is not what I want, I want a maze that is challenging as well, and something that could be randomized although not strictly a requirement at the moment. So it’s time to re-define our “Interesting Maze” a little bit more so that it actually is interesting!

Work in Progress

References:

  1. List of unsolvable problems in Computer Science  ↩2

  2. Atari 2600 

  3. An archaeological examination of an Atari 2600 game 

  4. Interview with Paul Allen Newell 

  5. The mysterious maze generating code hidden in an early video game 

  6. Maze Algorithms 

https://irshadpi.me/cracking-entombed-maze-generation
My Browsing List
readingarticlesvideoscollection
Following are some of the interesting stuff from the web. They mostly revolve around Programming, Life lessons and other stuff that I find interesting or funny. This also serves as a reference list for me when I want to show one of these to someone.
Show full content

Following are some of the interesting stuff from the web. They mostly revolve around Programming, Life lessons and other stuff that I find interesting or funny. This also serves as a reference list for me when I want to show one of these to someone.

I’ll be adding more as I go. So do check back later. If you feel like you have something that you think I will enjoy, let me know :)

Articles Random
  • Jon Skeet Facts - Chuck Norris style jokes but for programming. Always cracks me up 😂
Videos

Programming

Life and science

Others

People

Some of the personal websites that I find interesting

  • Donald Knuth - One of the best programmers of our time, created LaTeX, wrote TAOCP
  • Fabrice Bellard - Creator of FfMpeg, QuickJS, TCC and a lot of fantastic stuff. An underrated gem of a programmer.
  • Martin Fowler - Software Engineering, Refactoring and stuff (aimed more at the industrial aspect than the creative aspect.)
https://irshadpi.me/browse-list
Best of Music Grid!
musiccode
Best Of Music Grid
Show full content
Best Of Music Grid

Following are some of the best compositions that I came across (mostly taken from here ). If you have one to share, post the link in comments (You might need a GitHub account!)

The story

Few days ago, I made a simple Music Grid taking inspiration from a widget inside a stress reliever app called AntiStress. It was a joyful experience building it with Svelte and Tone.js.

I shared it with some friends and they seemed to like it. So one of my friends suggested me to post it on HackerNews which I did and it died with getting around like 7 upvotes. So I went to sleep and next morning I woke up and saw a sudden raise in stars on my GitHub repo!

Apparently, someone else had posted it (Thanks Abhai) and that post got to the front page of HN within hours!

It was fun to see a lot of people enjoying making music in a silly music grid and sharing it with the world, so I decided to collect the best submissions here in this page!

https://irshadpi.me/best-of-music-grid
How NOT To Create Something
lifestylecode
Show full content

My Mac

The Crisis

It’s 29th of March, 2020. India has been under a nationwide lockdown since 25th to contain the Covid-19 Pandemic.

Even before the lockdown, we were given work from home for the entire week and I kind of knew this was going to come. I wanted to create something in my free time (As I am going to have too much of it.).

Before all of this happened, I’ve been busy trying to learn Algorithms, Data Structures and get better at solving programming questions. I had put up daily goals and were successfully completing them in a streak. But this all stopped when I started the plan to “make” something.

What am I Going to Make?

I had few ideas. One of them was an idea to make a game that’s similar to the popular “Psych by Ellen”1 game, but with some additional features and UI/UX improvements to make it a lot better (I’m sorry Psych devs, the idea is brilliant, but the implementation can be a lot better). Also, the last time I tried to play Psych, they showed me a notifications which read along the lines of

“We are getting too much load which is causing issues to the game servers. Please try again later if you have trouble creating game”

So yes. Among some other brilliant ideas, I chose this. This seems doable and could be nice too to have an open source version of it.

Starting Off…

To be fair, I started off pretty well. I’ve been trying to learn ruby on rails and Svelte for a while, so my initial idea was to pick rails as the backend and Svelte as the frontend.

But no, I got off on the wrong foot with Ruby, too much issues and hiccups again and it didn’t go as smooth as the first blog project (Because I’m a noob in Ruby/Rails, okay?. Don’t Judge me!). But more because I was in a hurry. I wanted to see results fast.

I also didn’t listen to a friend’s advice on learning Rails slow and steady. I just wanted to make the thing; I wanted to see the results fast. (that maker instinct, you know?).

So I did the next best thing. I used Django for the backend and it was a smooth sail. Thanks to https://djangobuilder.io/, Creating models, creating REST APIs, authentication, everything was done within a day. I had also made the sequence diagram for entire game flow in PlantUML. Everything was going smooth. I was happy.

Life Gets Boring (And So Does Work)

Well, now I have a solid design, I know how to implement it. I know what to do next and that’s when I got bored of it. So I did what any fullstack developer who gets bored of writing backend will do - I started doing the frontend for the game.

Initially, my plan was to make it as a progressive web app that can be played by anyone anywhere from any device, and also open source - But these two will likely not provide a smooth gaming performance when the user wants to switch apps, or do something else, etc.. So then I decided to make it using the unofficial Svelte-Native framework. It again started off great, and again I got bored of writing code that I know how it’s going to be (I don’t know, maybe it’s the isolation combined with lack of satisfaction doing this.)

What Did I Do Next?

So I stopped. Yes, you read that right. I quit. I didn’t want to make it anymore, I got tired of it.

Don’t get me wrong. I still think it’s a great idea and something that can be made in a week or two, I just lack the motivation to do it anymore.

Remind you, I also had my day job (I usually spent 8+ hours on work every day, even if I’m working from home.) and I can’t go out and life gets tiring pretty quick. So, I get a little time to spend on the project and spending these little time on a small pet project which you’re no longer motivated in makes you question your life choices.

So this is where I am right now. I quit and I’m back to learning Algorithms, Data Structures and solving competitive programming problems (Atleast that makes me feel satisfied when I see an AC submission :) )

Footnotes Everything gets boring. Sooner or later

Even if it’s something you’re truly passionate about, it might get boring at one point in your life. Give up or take a break. It’s your choice

Curse of knowledge slows you down (but in a good way though)

Back then when I was in college, making something was easy because I just wrote code as I went on. I didn’t care about the maintainability/architecture/performance/testing concepts of the codebase. I just wrote code and it worked (quite Poorly, with a lot of bugs I had to fix later)

Now, after working with some of the best people in the industry for around 2 years, writing good quality/maintainable code with unit and integration tests, automated CI deployments, I can’t just go back to writing code careless like I used to. I question every line that I write and every choices I make. I read documentation more than I used to and think about all the real life error scenarios that might happen. This all slows me down a lot, but fortunately, that does make my code a lot better and I feel satisfied at the end of the day about having it.

Give it time folks

Rome wasn’t built in a day. Don’t look for results within a day or two. This was a mistake that I did. I kept on rushing and I wanted to see results quick. Maybe, just maybe, if I was a little more patient - I would still be continuing the work (and not writing this blog at all)

Take a break!

Yes I did take a break. I tried my hands on some doodling, a little bit of writing (all not worth sharing at the moment), and watching my favourite TV shows too.

What am I going to do next?

I don’t know. Honestly, I have no clue. I don’t even know what I’m going to have for lunch tomorrow; but if I knew, then that’d be less interesting right?, maybe it’s the not-knowing part that makes our lives a little bit more interesting. You got some suggestions?

  1. Psych is a party game in which people can put up fake answers to questions (which can be from a particular theme) and score points by making other people pick your made up answer. Except it really doesn’t have to be a party game. You should be able to play it online with anyone across the world. 

https://irshadpi.me/how-not-to-create-something
Engineering Wisdom
engineeringcode
I’ve had a lot of Higher Secondary graduates coming up and asking me…
Show full content

I’ve had a lot of Higher Secondary graduates coming up and asking me…

Why should I take Computer Science when I can take any other branch and learn coding parallely?, I’ve heard CSE is too easy anyway.

Should you take any engineering stream and learn programming on the side?

First of all, that’s not how it works. That’s not how any of this works. Sorry to disappoint you; but Computer Science != Programming. It’s a lot more than that. Programming is to computer science like masonry is to Civil Engineering (or Wiring is to Electrical Engineering). If you really want to build a career in software industry, take CSE. and study it well. Otherwise, your plan is going to fail.

So you’re planning to take CSE?

Thinking it will guarantee you a job no matter what? Sorry to disappoint you too; again, Computer Science != Programming.

Programming is a necessary skill you need to learn and master on your own. Having a degree for namesake would not take you anywhere.

So my advice to all you freshmen will be to learn new stuff on your own, work on your ideas and build cool stuff, learn algorithms and data structures to the core. Simply, Stand out from the rest.

And finally, If you have the potential, talent and moreover the will to follow your passion, that’s pretty much enough than a useless degree you hold. Just internet alone can teach you more stuff than your college ever will.

But that’s not a reason to skip going to college. It provides you with -

  • A place to explore possibilities.
  • Facilities and freedom to follow your passion.
  • People of the same frequency as you.
  • The right kind of exposure.

Originally posted at: https://twitter.com/irshadshalu/status/1013666177602555906?s=20

https://irshadpi.me/engineering-wisdom