Skip to main content

Posts

What I learned from a $1000 mistake

 Recently I read a Reddit post that was posted on the subreddit r/cscareerquestions. It was posted by a junior developer from the U.S, who travelled across the country for his very first job. In the first week, he was given access to the production DB (But why?). With some false judgement from his side, everything went into mayhem. Long story short, the production data was gone...poof, just like that. A hefty price for a mistake from a junior dev. The guy was fired, and the company said they will take legal actions against the fellow. I am not supporting the junior dev here on his mistake, but in a world, where we celebrate every single minute of success, why don't we ever hear about failure stories much? Failure is the best teacher in many ways, isn't it? I like to share my failure story from my very first company, and how I made a database error that cost my company around $1000. I was working on my very first project back in my first company. Let's say for privacy sake t...

My story of infinite loop on firebase...

   So recently I heard the news of a startup "Announce" getting a bill of $72k and almost bankrupting them in the process. Story can be found here. When I heard the news I was thinking about the same mistake that was made by me. if you are a programmer, chances are that you heard about good old recursion. Recursion is a powerful strategy for solving problems, but with great power comes of course great responsibilities. Missing an edge case in a recursion can cause a huge conundrum and your resources getting exploited pretty quickly, all thanks to the infinite recursion that's been happening on the background. Now in the cloud, recursion is little bit of the same line but brings forth another set of problems as well. In my case, I wrote a cloud function in firebase, that will update the date of a set of documents inside a particular collection when data is being **modified** in the same collection. Yes I know, dumb! I thought of making the cloud function such tha...

My first ever podcast...

 I travel almost one and a half hours a day. It was such a waste of time for me, going through the same roads, travelling the same distance all day. There was no time left for me after my office hours for anything new. Then I got the idea of podcasts. I started listening to name a few and fell in love with the idea of it. I started searching for the best podcasts on the internet and found out one gem, which was released back in April 2018. "The Caliphate", by Rukmini Kallimachi. Rukmini Callimachi is a Romanian born American journalist who is working for The New York Times. Back in 2014, she started her reporting on Islamic extremism and then focused on Al Queda and Islamic State of Iraq and Syria (ISIS). after years of research and study and battling through tough times of reporting, she published a podcast series named "The Caliphate" back in April 2018 with proofs of her findings and the way she got them. "The Caliphate" was a series focused mainly on a...

The work from home/office dilemma

 Covid hit us like anything we have seen in our entire life...(I am talking about people of my age..). The entire daily routine of an average programmer who writes code for a living just shifted itself from one dimension to an entire another one. They were thrown from their ever so normal routine of going to an office block, and then back home once the work is done. And by home I mean a rented one. But Covid just played its game, and we are all back home, where we wished to spend our time most of the time. Now we had two things most individuals are too cared about. A monthly income and a safe place to sleep. There is no spending on rent or extra junk food that we may have bought if we were alone in our other "home". We all loved this idea of remote work.  But is it all good? Well... I mean, it's all good and all that we spend most of our time with our beloved. But is that all for a human being who is at his precious youth? Aren't we allowed to take risks now? Aren...

The ever so common var, let and const

 So in JavaScript world, in whichever way you go, you finally end up with some very basic concepts.   I skipped certain basics while learning JavaScript. Later in life, I regretted it, but then, of course, you don't repeat the same mistake twice. So the very common and pretty basic thing you could see in JavaScript is the concept of  var, let  and  const.   What are they? How do they differ from each other?   Simply put  var, let  and  const  are keywords within JavaScript. All three of them are used to declare a variable. So why do we need three of them? JavaScript is weird. You can even use a variable without initialization in JavaScript. So why take the time to write a keyword. Now for JavaScript, there is a concept called global scope. In a simple browser where you could see JavaScript quite common, the global scope refers to the window object. And in the NodeJs module, this will be the global scope of the module. So if you simp...

Aah..the costly hobby of typing on a mechanical keyboard

 Lockdown happened swift and quick in India. Come forth April I am surfing through the internet and subreddits. I found one particular subreddit named mechanical keyboards. Until then I was happy with my two membrane keyboards, I could game, I could type at a blistering pace (so I thought) everything was normal. But then this clicky heavenly beauty strikes my mind. I could not take it out of my mind. The sweet sweet sound of the key being pressed on a clicky switch, the smoothness of the linear and my personal favourite of the tactility. After many research and study, I decided to buy a mechanical keyboard. But by then the whole world was changed. I learnt that no decent mechanical keyboards are cheap and to get a hold on one of them in India is not an easy feat. After researching a lot, importing one was not an option. The import duty exceeds even 100% some times.    Meckeys was a super cool site to buy mechanical keyboards in India. Thanks to them (but not fully satisf...

My continous fight against a bitcoin miner

I was working on a medium sized company. And one day during one of my project I got the chance to work on a project. And then I got the chance to setup our company server as the development server for the project. I started to setup the server as usual with all the usual stuffs (It's time I do something about it). My initial code setup was a-okay, until I found out that the webpage takes a little bit more to load. This was happening now and then. And when I chat to my colleagues I get to know that they also suffer from the same fate. They thought it was the network issue. I started to look for the issue, in the server. You know how it is. There is no GUI, but all you have is a terminal and that's that. During HTML page inspection on the browser, I could see that at the very end of the page after all the scripts loaded there was this "cute" little piece of script that's been called like 7 or 8 times. https://xmr.omine.org/assets/v7.js (https! so secure...) Well as ...