Posts

Inspecting hard-to-get elements in the DOM

Image
Today I learned how to inspect hard-to-get elements in the DOM, you know, the ones that you open but close as soon as you try to inspect them. I used a simple CSS trick in the console So what you basically do is that you go into the console, you set a delay timer and then run the debugger. Before the debugger starts you open the elements that e.g in my case it was a dropdown and then you wait for the debugger to pause your screen The command is  setTimeout(() => {debugger;},3000) Whats happening here? We are essentially  A. running the debugger   B. Adding a wait timer before the debugger is launched, in this case of 3 seconds Step 1. run command in console  Step 2. open the view you want  Step 3. wait for DOM to freeze and then inspect elements accordingly  This just freezes the DOM essentially, it currently works for Chrome, it should also work on other browsers #SWE #FE 

The nights the trees whistled

About 10 years ago, I knocked on a door, but not before forcing a smile. It opened and I looked down to see a little girl with jet black hair, no more than 4 standing in the doorway just staring at me. Before I could say a word, she started speaking in fluent Punjabi, asking why I was there; was I there to give her Pizza? She had been waiting for her Pizza. I instinctively started laughing, something I had been having trouble doing for a while  My laughter triggered quick footsteps from within the house and a middle-aged gentleman came to the door. After glaring at the child he spoke to me in English, we exchanged the Pizza and the money. And as I turned to leave, the child pointed at me and said "Punjabi" The gentleman looked at her and me and then asked me, in Punjabi, if I was Punjabi. I laughed and said I was, but not from where he was thinking. We ended up standing in the doorway for the next ten minutes, exchanging stories of hot summers and ceiling fans of unkempt gard

The Sword of the Mountains

                                                                                         A Short  by     Muneeb Sahaf The winter snow had made the ground harder, so Amir found it more difficult to dig the hole. He chose a spot on the west side of a low hill, where his mother had always loved to watch the sun rise. “A new beginning,” she’d say cheerfully. “Maybe today will be better?” He often wondered how she managed to stay so optimistic despite all she had seen. That was just who she had always been, for as long as he could remember. But for all her optimism, the last few days had been anything but better. Her cough had worsened steadily. On the first day, they had to stop because she had trouble walking. On the second day, she became too weak to sit upright. By the third day, she slept, and that was that. Now, Amir was alone. Only a few days ago, she had been singing as they walked—the old song about the prince of Kashmir and the fallen angel. How he tricked her into leaving the sky

illogical. Literally

Logic is the fundamental basis of how cognizant, self-aware people form their decision. It influences things as mundane as grocery purchases, to things as vital as who to choose as a life partner  (I would like to believe the spectrum has those two ends, or maybe grocery shopping can be replaced with choosing which socks to wear, anyway, I digress) For the longest period of time I think I was pretty illogical. I made decisions based on impulse, I made life choices based on past experiences rather than anticipating their impact and long term consequences. Call me stupid, I wouldn't mind, since I call myself more harsh things than that anyway, because its true, I was stupid. Extremely Stupid But it doesn't end there. I wasn't JUST stupid, I was illogical. I didn't know how to think, and I wasn't taught how to think. This extreme oversight in my education is not a fluke in my opinion. You've probably noticed this too; the vast majority of people that surround you a

Do I actually persist?

We often think things are happening to us and only us. We forget that the world is billions of years old, that we walk on the footprints of trillions that have come before us.  A close friend of mine recently got waitlisted for a much awaited scholarship, she immediately lost all hope, and started thinking this is it. This is what my life is. All this happens to me. Im not destined for success. The universe hates me She didn't say this to me directly but I could feel it through her conversation and through her actions. I sat down with her and decided to research a little bit on what options she had while waiting for the reserve list to come out In only a few google searches, it became evident that there were people who had the girt and the tenacity to continue down the road of pursuing the same prestigious scholarship for three years or more.  What stood out to me as I read those accounts from other scholars was how disheartened even I had felt when I heard about my friends reserve

The Sunday after

 I sit here today as I try to ponder on the inner workings of my mind on this silent afternoon, the Sunday after my escapades. It is something I often do after a long bout of extroverted-ness, my chronic condition of expanding more energy than I would care to on various musings of life. So much has happened in the past three weeks, but most of it too private to tell-tale on a public blog.  But know this: there's a bitter coffee to my right, just within reach, and then the ever pervasive sound of the ceiling fan running as my mind tries to count its rotations with accuracy. I sit donning a jade shalwar kameez, buttons of the sleeves in place, back straight as it soothes the pain, I am back in the confines of sunny equatorial Lahore, the city of gardens, home to guardrails of the Punjab.  I am reminded, suddenly and somberly of my grandfather, typing as I typed, with both hands on his keyboard, fingers pushing buttons, the learnings of his typewriter days being translated to the memo

Can recycled roads cause heart attacks ?

Image
You read a headline that says "Road made completely of recycled plastic" and you think this is great for the environment. They're cleaning up plastic waste and reusing it, until you realize the abrasion and wear from vehicles and the weather causes microplastics to spread into the environment at an accelerated pace. Microplastics will stick to the tyre and go as far as the car can take them, think of a bee carrying pollen from a flower, rain water will cause the upended plastic to seep into the soil -> from the soil to your food -> to the food of the animal that becomes our food -> to our bodies and so on. Then diseases that you cant identify that seem to emerge seemingly without cause. But there is cause, the only thing that you can count on in this world is that there is certain cause and effect. Over the years Ive come to question everything, even seemingly innocent headlines about recycling  - microplastics 100x what we thought before, in plastic water bottle