Category Archives: Technology

Anything related to the field of Technology that I write, be it PCMR, Windows, Ubuntu, Android, Website development, my gadgets, you will find all linked here. Occasionally I also write about my general view on how I use technology to my advantage. Feel free to ask me any questions in comments.

Telegram and WhatsApp

WhatsApp

If I remember correctly I was first introduced to WhatsApp as early as 2012 by one of my IRL friend. It was the thing which was “in” at the time. But it wasn’t that well known. Adoption of WhatsApp spread like wildfire since then, and now in 2018, it’s like everyone who have a smartphone have WhatsApp on their phone. Heck, even the non smartphone, like Symbian have a WhatsApp client now. What started of as a small project in 2009 by Brian Acton and Jan Koum, both former employees of Yahoo, in Mountain View, California, soon grew to be a company worthy to be acquired by the Facebook giant in 2014. The acquisition took just US $19 billion out of Facebook’s pockets, but Zuckerberg knew it was a bargain.

The USP of WhatsApp was it’s simplicity and ad free experience. The founders promised that it will remain ad free for eternity but never promised anything about simplicity. After being bought by Facebook, WhatsApp went numerous changes which traded the simplicity to introduce features like Instagram, which was another social network app company acquired by Facebook in 2012 earlier for mere 1 billion (sounds like a steal in comparison to WhatsApp deal now, isn’t it?).

Telegram

Telegram on the other hand was developed by two Russian brothers, Nikolai and Pavel Durov who had previously founded the Russian social network VK, but had to leave the company after it was taken over by the Mail.ru Group (credit: Wikipedia). From it’s initial release in 2012, it have grown to become a great alternative to WhatsApp and currently is struggling to keep it out of grips of influential like big corporations and government scrutiny.

When I first stumbled on Telegram in October 2015, I confused it with a copy of the app WhatsApp but digging deeper I realized it offered something to the table which WhatsApp couldn’t especially after it’s acquisition by Zuckerburg. I soon began to love Telegram for what it offered and the convenience it bought with it. In those times I use to be a frequent user of IRC and use a channel to communicate most of my online friends. But Telegram changed that. Now I have almost left IRC for Telegram and use it for a lot more reasons then just communication with online friends. I use it as a pastebin, a medium to transfer files, a way to get updates on cryptocurrency and also to chat secretly, if needed.

Difference between WhatsApp and Telegram

I have tired to compare both of the social network app on features and technical factors.

FeatureWhatsappTelegramOpinion
Mechanism for exchanging messagesStore and forwardCloud based (server/client encryption)Messages are stored on server, but highly encrypted. So you can access it even if you lost access to your phone, through a PC. On WhatsApp once a message reaches your phone, you can't fetch it again, in case you change your phone. This could be both good and bad and depends on user preference. Personally I prefer Telegram.
Delete a messageCan delete within 7 minutes of sending a message. Recipient can see you deleted a message.Can delete within 48 hours. Message will be deleted from both you and your recipient's end.Gives user more control over their message. Win for Telegram.
Edit a messageCan't edit.Can edit within 48 hours. User can see that you edited.Gives user more control over their message. Win for Telegram.
Secret ChatNo.Yes. The secret chat uses Client-Client encryption to provide a feature that is very useful. Firstly you can only use secret chat from phone and secondly the messages in the secret chat can be auto deleted after a period of time which we can set. It also uses client-client encryption so nothing is stored on cloud. WhatsApp doesn't allow this feature.

As a bonus, in a secret chat, it would notify you if the recipient takes a screenshot of the screen while you are doing a secret chat.
File TransferMediocre support. There's a limit of just 16 MB on videos. And 100 MB for other kind of files.There's a limit of 1.5 GB and any file can be send.WhatsApp only recently supported sending *any* file (than just media), but its limit of 100 MB makes it less powerful than Telegram. A great win for Telegram.
ThemesNo. Only wallpaper can be changes.Yes. Can be customized a whole lot.There are themes available in market and you can create one too in Telegram. I only use the dark theme, not much customization.
Desktop ClientYes. But the desktop client takes more memory than web interface, and also requires the accessibility of WhatsApp on your phone. Yes. Telegram have a proper desktop client, which can work even if your phone isn't connected to internet. It's because messages are stored on cloud.It's a big win for Telegram. Due to dependency of WhatsApp on phone, it pretty much makes it useless to access WhatsApp in case your phone dies or don't have Internet. Big reason for why I prefer Telegram. It lets me continue from phone or web or desktop client, seamlessly.
Bot supportNo.Yes.Telegram have bot support, which means you can do tasks like use the IMDb bot to search for movie titles right from within the app.
Open sourcePartial. Mostly it's under Facebook's control now.Yes.Telegram is open source in the fact that you can go on github and make a fork to create your own Telegram client.
Bonus featuresNoneMessage to self,
Bloat free,
Self destruct feature
I can use Telegram like a clipboard and also to transfer messages between my phone and PC. It doesn't have stupid social network feature like sharing live updates. Self destruct feature means your account will be auto deleted if you don't access the app for a certain time from a month all the way to a year.

While there are numerous things which are great on Telegram, I haven’t even mentioned that most of the security features were first added on Telegram and later came out with WhatsApp. But the most important thing is the commitment of Telegram founders which are making efforts to make it more secure and not to let big corporate giants controlling them, thereby it promises more security and privacy. For me though, the most important thing is feature and convenience and for that Telegram is perfect. No wonder more and more companies are choosing Telegram for it’s ability to connect to masses.

Setting up WordPress on Debian 9.3 x64 on a Virtual Machine on Windows 10

In this article I am documenting the exact steps that one needs to host a wordpress based site on a Debian based virtual machine (VM). I choose debian since that’s one of the preferred distro based on it’s stability and smaller footprint on resources compared to Ubuntu. But you may very well choose Ubuntu, only some steps in below documentation would differ.

This article deals with following technologies:

  1. Windows 10: The host operating system
  2. Oracle VirtualBox: The Virtual Machine software
  3. Debian 9.3 x64: The distro which we will install on the VM
  4. nginx: The web server
  5. mariadb: MySQL database solutions
  6. php: The package which installs on Debian automatically as a dependency
  7. phpMyAdmin: Administration tool for MariaDB

Continue reading Setting up WordPress on Debian 9.3 x64 on a Virtual Machine on Windows 10

Resurrecting Soft Bricked Moto E

So I had a Moto E that was showing weird issues. Sometimes when it’s rebooted it stucks in bootloop and fails to finish the boot sequence. The home screen just doesn’t appear. I manage to flash a fresh ROM on it and after which it starts to work. I haven’t been able to identify the problem yet, but the turnaround is working good as of now. So I just want to document the process of fixing the soft bricked Moto E:

*** DISCLAIMER ***
Please note that this is just a documentation of the process I followed to fix my Moto E. This is by no means an accurate or official guide to fix your Moto E. If you do mess up your phone trying to follow this documentation, you can't blame me.

The simple procedure for a fresh Moto E is to first unlock the bootloader of Moto E. Which is a simple one time process which includes using the following command in fastboot mode: fastboot oem get_unlock_data. The unlock is complete when you enter a code on Motorola website and they give you a return string to unlock it. The guide is here.

Once the phone is unlocked its time to flash a custom recovery. This is done by downloading the TWRP recovery for Moto E here:  http://d-h.st/1Zp.

And then booting the phone in fastboot mode and sending following command:

fastboot flash recovery moto_e_twrp2.7.0.0_v1.2.img

Once the recovery is flashed you can reboot in recovery mode manually or by following command:

fastboot reboot

From recovery mode you can do all sorts of things like clearing out the cache (which sometimes fixes issues), and going into adb sideload mode. From this sideload mode, you can send sideload commands which can be used to install a custom ROM. The custom ROM for Moto E can be downloaded from below link: http://forum.xda-developers.com/moto-e/development/rom-stock-motorola-lollipop-rom-t3167111. (The one which worked for me was: Retail Dual-SIM (Asia | World) 5.1 ROM (Optimized) v1.1 (287mb) Deodexed).

This ROM can be sideloaded by going into the sideload mode and sending following command:

adb sideload "I:\Moto E\XT1022_Retail_DualSim_51_Optimized_v1.1.zip"

After the above command, it will take some time and progress can be viewed on phone. Once that’s done you can reboot the device and the phone should start. First run takes a lot of times since it “optimizes” the app etc.

This ends the procedure. If you want to recreate all partitions from scratch, you may try to follow the following guide of flashing the stock firmware: http://forum.xda-developers.com/showthread.php?t=2759495.

The above guide tells to download the stock firmware from following location:

http://forum.xda-developers.com/showthread.php?t=2755857

(I choose XT1022_CONDOR_RETAILDSDS_5.1_LPCS23.13-34.8-3_cid7 (Newer Build))

To flash the stock firmware the above guide says to follow the below series of commands:

fastboot flash partition gpt.bin
fastboot flash motoboot motoboot.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot.exe flash system system.img_sparsechunk.0
fastboot.exe flash system system.img_sparsechunk.1
fastboot.exe flash system system.img_sparsechunk.2
fastboot.exe flash system system.img_sparsechunk.3
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1 
fastboot erase modemst2 
fastboot flash fsg fsg.mbn
fastboot erase cache 
fastboot erase userdata 
fastboot reboot

I had to still try to flash the custom ROM instead of stock firmware to get my Moto E to successfully boot.

Commands to Analyze Space through Terminal

This article lists a few ways to analyze the usage space of the hard disk through Terminal.

Space occupied by all folder sorted ascending order:
sudo du -h * | sort -h

The command ‘du’ is used in terminal which stands for disk usage. But the command alone gives listing of all files along with their size. The above command sorts the list, so that the highest space folder appears in bottom of the list. SUDO added since if you want it to run in root folder, normal command won’t have access to system folders.

Space on disk:
df -h

Above command is not path sensitive, which means you can run it from anywhere and also don’t require sudo.

Disk space usage per user:
sudo find . -printf "%u %s\n" | awk '{user[$1]+=$2}; END{ for( i in user) print i " " user[i]}'

Above script (combination of commands) prints disk usage per user and is not path sensitive. The script uses find and awk (extraction command) to give a list of users along with the space they are consuming in bytes.

Viewing first top directories taking space
du --max-depth=1 2> /dev/null | sort -n -r | head -n20

The above command would list top few directories along with their size, sorted in descending order.

Third Party Utility:

On debian, install ncdu by following command:

sudo apt-get install ncdu -s

Once install, you can use the utility ncdu to easily see the size of various folders through a friendly user interface right within Terminal. Here’s the ncdu manual: https://dev.yorhel.nl/ncdu/man
If above command don’t install ncdu try forcing the install by following command:

sudo apt-get install -f -y ncdu

With above command you can pin point the folder which is taking up space in little time. Also note that the sometimes you need to go deeper by using the command, sudo su, to view space of files taken up by say, /var directory.

Which Instant Messenger is best for me?

With all the advances that have happened in the world of Internet, one thing is at the core of it. That is Instant Communication. And from the ages of Internet Chat Relays (IRC) to WhatsApp and everything in between is playing a pivotal role in connecting people from all corners of the globe. And if you are confused as to what Instant Messenger is right for you, here is a flowchart that lets you decide between few of them.

IM_Flowchart

WhatsApp: Everyone uses it since everyone else uses it. But things such as dependency on mobile even if you want to chat on browser makes it a very poorly developed IM.

IRC (Internet Chat Relay): It’s the most powerful IM that the netizens have ever used. You can chat privately, in rooms, on PC, on your phone, use bots, leave offline messages.. really the only limit is your imagination and skills to make more functionality.

Steam: Steam being the most popular client for gaming provides a client for both Windows, Linux and Android. So if you are a gamer you would tend to use it much extensively.

Telegram: It’s currently the most versatile IM as of now. With features such as true cross platform (you can run it on command line!), ability to share self expiring secret messages, cloud storage (so that you don’t loose your chat history) and with the introduction of bots, I am in love with this IM. Also the fact that you don’t need to share your mobile number like WhatsApp makes it perfect for privacy conscious users.

So which IM you use the most and what would be your choice, if you don’t have to come under peer pressure to choose more popular Instant Messenger?

Steps to add a WordPress Site to an existing VPS

I use to have a hard time configuring a new site under a common VPS. So I decided to document the steps for easy reference in future.
Following are the steps to add a new site “site-name.com” under a new user account “username” on your Linux VPS. This is to note that this works if you have the following web service solution stack (LAMP):

Linux OS : Debian
Web server: Nginx (Not Apache)
Database: MySQL
Application Programming Language: PHP

So here we go:

1. Buy the domain. Call it site-name.com.

2. Set the nameserver of the domain to point to the IP address of your VPS under ‘A’ record which stands for ‘Address’. For reference, there are other kinds of record like ‘CNAME’ and ‘MX’, but you don’t need to set them at this point.

3. Create a new user on VPS by command by following command.

sudo adduser username

This command also creates a new home directory for the user.

Continue reading Steps to add a WordPress Site to an existing VPS

Shopping for and Assembling a new desktop PC

What’s a guitarist without his guitar? What’s a painter without his colours? What’s a sailor without a boat? What’s an IT professional without a desktop PC? Answer is common,  “nothing much!”. Hence when one of my friend finally decided to get a PC assembled I was very happy for him. I thought to help him out before other priorities gets hold of him and he changes his mind.

Before, he use to work either on his age old Celeron laptop or on my computer. He use to play games and watch movies on weekends with me. But now that he finally decided to get his own PC, I had a reason to get my geeky hands dirty in assembling a new PC. There’s some kind of charm in shopping for PC components and then putting them together in one coherent piece so that we can then appreciate the modern advancement, human beings now take for granted.

The Research:

I started my research by studying many of the rig suggestions by fellow members on digit forum and also the suggestions put up in digit magazine. After analyzing my friend’s requirements and the suggestions on forum we decided to go with following components:

Component

Model

Monitor AOC 21.5 inch LED Backlit LCD – i2269Vwm Monitor / I2279VWHE / i2267Fwh
LG 21.5 inch LED Backlit LCD – 22MP56HQ Monitor
Processor Intel 3.4 GHz LGA 1150 i3 4130
Intel 3.5 GHz LGA 1150 i3-4150 (BX80646I34150)
Motherboard MSI B85M-G43 Motherboard
Gigabyte GA-B85-D3H Motherboard
HDD WD Blue WD10EZEX 1 TB Internal Hard Drive
RAM Corsair Vengeance DDR3 4 GB (1 x 4 GB) PC DRAM (CMZ4GX3M1A1600C9)
Corsair Vengeance DDR3 8 GB (1 x 8 GB) PC DRAM (CMZ8GX3M1A1600C10)
Cabinet Antec VSK 4000B U3 New Solution Series Cabinet
PSU Antec VP450P I 450 Watts PSU
Optical Drive Samsung DVD Combo
Keyboard Logitech MK200 USB Standard Keyboard
UPS APC 600VA
Router TP-LINK TL-WR841N

As can be noticed, some of the components had two or more choices in them, arranged by priority. After spending considerable amount of time in researching the prices (in offline and online markets) we finally decided to go to “Nehru Place” to see if we can get good deals in the biggest computer hardware market of Asia.

Continue reading Shopping for and Assembling a new desktop PC

Upgrading to Windows 10, the Microsoft’s Comeback

Something Happened.. Classic Microsoft
Yup. That’s what happens, when something happens. Classic Microsoft

Its been a few days that Windows 10 started rolling out to general public. Even people who never saw past XP seemed to be excited about the new Windows 10.

Windows 8 wasn’t a soaring success even for the fans of Windows. Though its predecessor Windows 7 was a leap ahead from the good old XP, the tile interfaced Win 8 proved to be too much of a change. Start Menu had disappeared. It took the users by storm and Windows 8 was rejected by almost everyone, including myself. That’s why Windows 10 is so important for Microsoft. And maybe that’s why Microsoft decided to roll out a free upgrade for anyone who have a genuine license of Win 7 or Win 8.1.

Now people, all over the Internet are exploding with enough queries and concerns to overwhelm Microsoft. People are perplexed, furious and amazed with their own experience of upgrading. While everyone is jumping into the bandwagon of the latest operating system, failed downloads and bugs are putting many users off.

It all began on 29th July 2015. People who had registered for the update got a prompt that Windows 10 is now available and that they can install it after Windows finishes downloading the update files. I got a prompt too and I allowed the update to download.

Windows 10 downloading
Windows 10 downloading

Continue reading Upgrading to Windows 10, the Microsoft’s Comeback

YU Yuphoria Review

I got the opportunity to get my hands on a new YU Yuphoria phone last week. Following are my observations and review first hand.

YU Yuphoria released in the May 2015 as a successor to the phone Yu Yureka which was released in Jan 2015 by Micromax. YU Yureka was the first phone released under the YU tag. At the price point of Rs 8,999, Yureka provided many features to be found in only high end phones. Yuphoria, released after a few months is kind of a down scaled version of the Yureka but have its own strengths to boast on.

Hardware

YU Yuphoria
YU Yuphoria

As a owner of Moto X (1st gen), the specs of Yuphoria baffled me initially. Yuphoria had similar specs as that of Moto X 1s gen but cost only Rs 6,999. That’s 3.5 times less price than that of Moto X 1st gen with similar features. Lets see the specs at a glance.

Yuphoria is a 4G phone with 5 inch screen size, have a layer of Gorilla glass 3 and sports a pixel density of 294 ppi with its 720p resolution. It’s powered with Snapdragon 410, Quad-core 1.2 GHz Cortex-A53 chipset which contains graphics capability of Adreno 306. Snapdragon is Qualcomm’s first 64 bit SOC. In terms of storage it comes with an internal memory of 16 GB (of course less for actual use) but is expandable to 32 GB. The phone contains 2 gigs of RAM enough to never let you go out of memory when playing high end games (for a couple of years at least).

Yuphoria Back
Yuphoria Back

It’s 8 mp primary camera have autofocus, flash and can shoot up to 1080p video. It can snap upto 3264 x 2448 pixels in image resolution. The front cam is 5 mp and seems impressive. The phone is supplied power through a 2230 mAh Li-Ion battery, which boasts of upto 160 hr of standby time on 3G, and 7 hrs of talktime. Continue reading YU Yuphoria Review

Auto Mounting Drives in Ubuntu

If you are using Ubuntu in dual mode with Windows you must be having a few partition that are NTFS. By default these NTFS drives are not auto mounted. So while you have the partitions, you won’t be able to access them if you don’t mount it.

As you already may know that in Ubuntu (and Linux in general) there are no drives. Combine it with the fact that the root directory starts from a forward slash (/). Every drive in Linux is ‘mounted‘. So when you insert a DVD disk the content of the disk may be mounted to a directory /media/username/DvdLabel. Here DvdLabel is the name of the mounted directory which was taken from the label of the disk.

Similarly if you have a partition with the label, say, Documents when you click the Documents partition, it is then that the Documents partition (or drive) is mounted to /media/Documents.

By default Ubuntu doesn’t mount the partitions when it starts. You have to click the partition in Nautilus (or Files, the file explorer) once so that it can be mounted. This can be irritating since when an application starts which requires a partition they will result in error. Eg, if you have set dropbox to sync to files to Documents drive or Transmission to download files to Multimedia drive.

You can make these NTFS drives automount with Ubuntu by various method as described in this page. But its a long and complicated read. So here is the method explained simply.

Find out Label and UUID

First you need to know the exact Labels and UUID of the drives. Consider UUID (Universally Unique Identifier) as a unique identifier for the drive which will never change (unless you format the drive, re-partition it, or manually change it). To know the Label and UUID you need to use the command blkid command. This command when used with sudo will give you a list of all the partitions along with its Label and UUID. Like below:

vyom@VyomNix:~$ sudo blkid
[sudo] password for vyom: 
/dev/sr0: LABEL="Alpha_0515" TYPE="udf" 
/dev/sda1: UUID="30986b83-1234-4eeb-a30a-482223df145f" TYPE="ext4" 
/dev/sda2: LABEL="WinServer" UUID="3F1234AB1233423C" TYPE="ntfs" 
/dev/sda3: LABEL="Recovery" UUID="A12345E12345AF1B" TYPE="ntfs" 
/dev/sda4: UUID="0659-9A568" TYPE="vfat" 
/dev/sda6: UUID="b1234321-ad5f-4ddd-89ac-eed1234c56c7" TYPE="swap" 
/dev/sda7: LABEL="Digital" UUID="33FA6E12GA6DF687" TYPE="ntfs" 
/dev/sda9: LABEL="Entertainment" UUID="123FHE3E3N98BF65" TYPE="ntfs" 
/dev/sda10: LABEL="Documents" UUID="37MME50B21B7C65B" TYPE="ntfs" 
/dev/sda11: LABEL="Spare1" UUID="654EF123456CAF7E" TYPE="ntfs" 
/dev/sda12: LABEL="Spare2" UUID="68D774EB5DBFPOOI" TYPE="ntfs" 
vyom@VyomNix:~$

Continue reading Auto Mounting Drives in Ubuntu