Saturday, April 29, 2017

Step By Step Guide to Install React Native and Create Mobile App in OSX


Recently in projects we decided to use React Native to create cross platform mobile application. I faced some difficulties in installing ReactNative so here in this blog I will explain getting started with React Native and create cross platform mobile application.

1) Install Xcode and Xcode command lines tools.

Get Xcode from Mac App Store. Click Here

2) Install Xcode Command Line Tools, Open terminal and run following command.

xcode-select --install

3) Install Homebrew, Homebrew is a package manager to install missing package on OSX. Open terminal and run following command.

ruby -e "$(curl -fsSL"

4) Install NodeJs and NPM. React comes package in NPM so we have to install it. Run following command in terminal

brew install node

After installation check with following command to see if it's installed.

node -v

npm -v

5) Install watchman with home brew.

brew install watchman

6) Install The React Native CLI

Node.js comes with npm, which lets you install the React Native command line interface.

Run the following command in a Terminal

npm install -g react-native-cli

7) Create React Native Project, run following commands in terminal.

react-native init ReactNativeTest

cd ReactNativeTest

Now run it with following command.

react-native run-ios

It will run application in iOS simulator.

react-native run-ios is just one way to run your app. You can also run it directly from within Xcode.

Step By Step Guide to Install and Create ReactJs Application in OSX


Recently we have decided to use ReactJs for building mobile web applications and I faced some difficulties in setting up ReactJs in OSX so here in this blog I will explain step by step procedure from installation of ReactJS to creating and running application and Getting started with ReacJs in OSX

1) Install Xcode and Xcode command lines tools.

Get Xcode from Mac App Store. Click Here

2) Install Xcode Command Line Tools, Open terminal and run following command.

xcode-select --install

3) Install Homebrew, Homebrew is a package manager to install missing package on OSX. Open terminal and run following command.

ruby -e "$(curl -fsSL"

4) Install NodeJs and NPM. React comes package in NPM so we have to install it. Run following command in terminal

brew install node

After installation check with following command to see if it's installed.

node -v

npm -v

5) Next we will install React, run following command in terminal.

npm install react

6) Now we will install Command line utility to create react app. Run following command in terminal.

npm install -g create-react-app

7) Create new react app. Run following commands in terminal.

create-react-app ReactApp
cd ReactApp
npm start

It should display following message in terminal.

And it will open ReactApp in your default browser.

That's it, Now you can work on ReactApp code and just refresh it in browser to see effect. Hope this helps you.

Saturday, April 15, 2017

Graduate From WhatsApp University

Strange title, right? Since WhatsApp was launched, it has phenomenal number of users. I should say people are addicted to it now. After WhatsApp many other messenger apps came and went but it could not affect WhatsApp. WhatsApp users were never decreased and it's increasing year by year. That is good, everyone should be connected to social world through technology and WhatsApp is doing phenomenal job in connecting people with features like chats, voice calls, video calls and groups it's allowing users to stay in touch with others. On WhatsApp daily billions of messages are sent and received.  If there is a breaking news it can go viral in matter of minutes in WhatsApp. But here question is are all those messages and facts exchanged over WhatsApp true? At what level we should trust the information on WhatsApp? 

Unfortunately the situation right now is everyone trust WhatsApp information blindly. They don't go in depth of information. They don't even try to verify it twice before assuming it to be correct. That's why I gave title to this post as 

"Graduate From WhatsApp University" 

I have seen this lot of time. Everyone believes that if it's on WhatsApp, it's true. Many of them show off their knowledge because they read it on WhatsApp and even when you ask for proof, they say it's on WhatsApp, isn't it enough?

No it's not enough, WhatsApp is not reliable source of fact of information. Sometimes it's true that informations on WhatsApp are correct but not every time. WhatsApp is the source used to mis lead the people and it's also a source to circulate propaganda and unfortunately this propaganda becomes fact as soon as it's over WhatsApp and every one believe it. 

So if you are addicted to WhatsApp, please make sure you don't become "Graduate From WhatsApp University" All the information on WhatsApp are not correct. Think twice before you believe it and forward it to someone else. It may create panic among users and you may become victim of fraud. For example, read one of my blog here on how fraud information are circulated on WhatApp and how you can be safe from it.

I am not denying that, WhatsApp is source of knowledge and information. People share information on their fields and as well as other fields. But they don't check about facts of information of other fields. As soon as you got some information, you just forward it to others and it became viral. So it's possible that some information might be mis leading or wrong but since it is on WhatsApp it become fact. 

Take my example, I am a computer engineer but if I show off my knowledge of economics by reading it from WhatsApp, I will be a Graduate of Economics from WhatsApp University. But I don't want to be that and that's why I published this post.

So moral of the story is don't be a Graduate From WhatsApp University. First of all check for the facts and see if information is correct or not and then forward it to someone else and show off it to someone else.

Tuesday, April 4, 2017

Chatbots should be Smarter

Recently I published a blog on Why business will need a chat bot. You can read it here.

Why Each Business Will Need A Chat bot

In that blog I mentioned that this bots need to be very very smart to interact with humans. The algorithms should be powerful to have conversation with humans because humans will do every possible tricks to trap bots and sometime it fails. Survival of fittest, rule of Darwin is applicable to AI as well. Only strong and intelligent algorithm will survive. If you are creating bot make sure you make it really smart, then only it will survive.

Lets start blog by one incident I recently had with bots. I was working with Amazon AWS and faced some issue in it and solved it my self so as per my practice I immediately published a blog and published on twitter. Following is my tweet.

And I got reply from AWS twitter bot.

Technically bot is not wrong as I mentioned word "not working" in my tweet but that was my blog title but it understood as an issue and replied with suggestion so it's not complete fail but as I mentioned bots need to be smart enough to identify what exactly customer needs and reply to it.

Along with Artificial Intelligence a chat bot needs Emotional Intelligence (EI) to understand human emotions. As we move into the future, AI needs humanizing qualities to improve the way it interacts with us, meets our needs for information, and even controls the other technology around us. As AI becomes more ubiquitous, society needs chat bots to become emotionally intelligent if they are to be used to their full capabilities. Humanizing the chat bot is the next step toward a more connected and integrated future. Blending technology with human capabilities such as emotion and empathy can revolutionize the workplace and other facets of life. In my opinion, smarter AI is one of the most exciting prospects of the future.

Monday, April 3, 2017

Tips for Better Audio Recording


This is again bit different blog than programming. Recently I worked on a video course for Packt Publishing. You can find more details on it from following link.

Beginning Laravel

This is video course where I have to speak and work on computer and my computer screen and audio will be recorded to create the course.  Packt Publishing team gave me good tips and suggestions for audio recording. In this blog I am going to explain some more tips which I used while recording and that really helped me lot.

Tip 1 : Prepare a script and stick it in front of you

When you are doing work on computer and at the same time you have to explain what you are doing. It may be possible that you may lost the flow and you forgot on what to speak. So to avoid this, it's better, you write down everything from beginning to end and put it on paper and stick that paper in front of you while you are recording so either you can simply read from it or in case when you forget something and confused in what you have to speak, you can look into the paper in front of you and start reading from it. If you can stick each single paper in front of you that will be good. This way you don't have to flip paper as flipping paper will also make some sound and that may spoil your recording. For one of the video which I recorded, the script was of six pages and I set each paper in front of me on cardboard so I can easily read it. You can either type the script and take print out or it can be hand written but make sure you have good hand writing so you don't have any difficulty in reading it.

Tip 2: Record after mid night

For audio recording, you need a quite place. Best place is recording studio but you can afford it for small course so either have do it at home or some other quite place. But at every place there is some disturbance of out side sounds. For example I tried a weekend home but it was remote place and there were lots of bird around it so there was constant sound of tweeting. My office is near to highway so there is constant sound of vehicle passing by.  So best time for the recording is at mid night at home around 3:00 AM in night. At this time you will not have any disturbance as people around are sleeping and there is no vehicles coming and even birds are sleeping so there will be a quite atmosphere and you can record everything easily.

Tip 3 : Practice it couple of times before final recording

As a programmer I can write code easily as nobody is watching my screen so if I make any mistake that will be fine. But recording the screen is different scenario. If you make a mistake you may have to redo everything again so it's better to have some practice before you go for final recording. Practice entire flow couple of times so that you will have good confidence. So when you go for final recording, you can easily do it without any issue as you had a good practice of it and you don't have much retake of your recording. 

Beginning Laravel Video Course

Here is something unusual I did apart from programming. My first ever video course "Beginning Laravel" with Packt Publishing

In this course you will learn about basics of Laravel Development. First section is about installation of Laravel. This section will start with introduction of Laravel and installation of Laravel in Mac, Windows and Linux. Then we will cover, basics of Laravel including, understanding of Framework Structure, basics of Artisan Commands, Composer, Core Concepts of Laravel, MVC structure, Database Migrations, Laravel Controllers, Models and Views etc. In last section
We will finish this course by creating simple Web application with Laravel which will have CRUD operations and basic validations in final section, this will help you getting started with Laravel Development. If you are interested in learning Laravel then this is the course you are looking for. You can buy it at following link.

Beginning Laravel Video Course

Hope you will like this course. Let me know your feedback in comments.