All posts by Mayank Mishra

How to contribute to naukri engineering open source projects

open-source  Open Source Culture is one of the best things that came up in the software industry so far. We are seamlessly growing much faster in the field just because high end software like apache, mysql, nginx, nodejs, linux, etc. are available to use and reprogram as per our needs for free. But the thing is, it works only when people like us contribute to the community. Most of the programmers want to contribute to open source but they think it as difficult and time consuming. They assume that to make an effective contribution they need a big project and unlimited free time. This is not true at... Read More

Running optimization on MyISAM Engine truncated the whole table !

Web development is always full of surprises whether you are developing website, maintaining databases or trying to save yourself from hack attempts.Recently We encountered a strange behavior of MyISAM engine in mysql5.4+ version when We tried to optimized the table containing around 50GB of data but it truncated showing this . mysql> select count(1) from templates; +----------+ | count(1) | +----------+ | 0 | +----------+ 1 row in set (0.00 sec) We lost almost 53GB data of templates which were uploaded by users. Luckily we had backup of that mysql instance, so we... Read More

array_merge behaving differently on 32-bit and 64-bit architecture

PHP has a large number of functions one of which commonly used is array_merge. It basically merges 'n' number of arrays. We have used it quite often in my code and found out that it does not preserve keys when moved from 32-bit architecture to 64-bit. Let's figure out why this happened ? Recently We moved our ubuntu servers from 32-bit to 64-bit. Then suddenly some of arrays started losing their indexes which were working on previous server. Then we figured out it was an issue with array_merge. Code was using big numbers as indexes in multiple arrays which needs to be merged. Here... Read More

Choosing an SSO Protocol: SAML over OAuth2

Creating a new login for each system is not such a good user experience. As we know it is hard to remember more login credentials as we use more applications, this came as a problem which made us to thing about Single Sign On Service. If you have logged into an application (mobile app or web app) by clicking on a 'Login/Signup with Facebook' button you would know what we are talking about.   As a user you really doesn't want to know how SSO works, you just really want to need is a smoother user experience and a fewer logins and passwords to remember. So to provide this functionality we... Read More