Posts

Ah. To be rejected

 Rejection is hard, probably the hardest part of life  From a program, from a loved one, from anything that seems to be of consequence. And then I wonder why that is. It feels super personal, like the world is conspiring against you, like you made all these mistakes and that its all your fault When rejection strikes, its important to identify these feelings. Its okay to grieve, its ok to feel lost and hopeless because whatever it is that you trying to achieve did hold value for you, so that makes sense.  But whats not ok is associating that with your self worth as a person  Take the loss. Learn from it. Move on in life. Be ok with being rejected, and hopefully one day success will come knocking.  Trying to make myself feel better, along with all of you cheers.  Muneeb

Project Euler Q2

Image
I've recently begun to re-teach myself, to learn how to think more structurally. My goal isn't really to get to an answer but to understand why I think the way I think, so I spent some time on the 2nd question on Project Euler Solving this with brute force was mentally frustrating, but more so because I could feel there was a faster way to do it, just not sure what that was. What was interesting was that I saw there was a sequence, every 3rd term was even. But despite knowing that, it was hard to develop some sort of formula to solve. Heres the question: Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: [1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ] By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms If you want to try it out yourself: https://projecteuler.net/problem=2

Thought Experiment

Image
  I was 17 when I had my first car accident Behind the wheel since 13, not encouraged, but not uncommon for Pakistan, it took 4 years. Rowdy boys packed into the car, music on blast, yelling a lot of noise was the recipe. And then boom It wasn't a big accident, just a fender bender, but enough to depress me for the rest of the evening. It was a new car, how was I going to explain it to my parents I got home and remember being super scared, sliding through the font door I found my grandfather sitting in the living room, he captured my face and asked what was wrong. Nervously, I explained what had happened His response was simple, almost nonchalant "Things are made to be used, they get damaged and they break. It is a consequence of living" I stopped. He was generally very had on me, so this came as a surprise Its been a while since his passing, but to this day I sit and ponder. Each syllable was etched wisdom from his years. That was the day I truly felt he had lived a long...

A Thousand Flames

A Thousand Flames  You were the sum of a thousand flames I, a moth drawn to your endless light A palate of cinders and ash Yours was an unimaginable warmth Mine was solace from the storm Ours was a love purified by fading embers   I could never tell where you began and I ended   For my hands are tattooed still with scorch marks of your touch And if I could live it again, certain in how it ends A lifetime would be fair price, for another fleeting moment of us Forgive my courage today, for the wind grows ever stronger A new storm is approaching and the season turns Too long have I huddled over this dying flame, it aches to be free There is no wood left to burn   But know that your warmth has never left me

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....