Stay hungry, stay foolish

From past 5 years I have been working with lot of technical teams struggling to version APIs and create API documentation as per spec change. After boom of version control tools like Github & SVN teams are able to track source code but updating API specs for every minor change is still something that developers forget or don’t really care to update on time. It doesn’t matter much if nobody else is consuming their APIs but if APIs are exposed as REST- developer/app should know at same time that something was changed in API.

Teams are still able to track major API version releases but minor spec change in APIs are untracked most of the time, sometimes cause of communication gap and sometimes cause of improper documentation, leading to frustration within teams and products. As developers, how do we version our APIs without giving this responsibility to one more person who has to coordinate with each and every developer of team trying to figure out what was updated and manually updating documentation at end of the day?

Recently, I came across a tool that made my life as a product developer plain sailing. Now the developer who is working on server side API needs to add comments in his code in proper format and anyone from team will be able to generate API document out of it. Whenever server team works on any functionality they update comments in their own code giving it a minor release number if required and team will be able to generate documentation if they have access to latest updated server code without knowing server code language on my local. Take below example for instance

What is ECMAScript?

As per Wiki- ECMAScript(European Computer Manufacturers Association) is a trademarked [1]scripting languagespecification standardized by Ecma International in ECMA-262 and ISO/IEC 16262. We use various implementations of ECMAScript for client side scripting on web. Examples are JavaScript, ActionScript and Jscript.

ECMAScript was developed by Brendan Eich- Father of JavaScript. It was named Mocha, then Livescript and finally JavaScript.

ECMAScript7: The rise of compilers

After ES6 (2015), there was huge rise in number of developers switching from traditional way of writing JavaScript to start using compiled code generators. Compiled code generators compiles code written in other languages to JavaScript. Our favourite JS code compiler is Babel(https://babeljs.io/) as it is actively supporting ES7 (ECMAScript 2016). For example Babel compiles following code:

Gulp and Grunt: Automate your workflows

Measuring programming progress by lines of code is like measuring aircraft building progress by weight. – Bill Gates

With active usage of tools like Gulp and Grunt companies and developers started automating workflows for JavaScript applications. These tools helped developers in doing lot of automated tasks like library upgrade, automated testing, folder structure creation and so on. If you didn’t use Gulp and Grunt in your projects till now and make a New Year resolution to automate your build process and automate JavaScript tasks for an easier life.

The incredible Node.JS

Node.js foundation grew to more than 3 million users. Companies like Intel, IBM and Joyent used Node.js to create software architectures, real-time location tracking services and IoT. With npm lives of developers became lot easier as they could do a lot of heavy architecture creation using CLI. Also I heard companies switching from traditional Java/PHP technology stack to next gen Node.js for their active products.

How rise of ECMAScript revolutionized cross-platform apps

This year we saw a lot of people moving from native to cross-platform and vice versa. Keeping same codebase across all platforms helped companies and developers to launch their products in really less time when compared to writing code in different languages for each platform. With tools like npm creating a Cordova application became one liner.

A lot of start-up advertisers and enthusiasts ask me about importance of video advertising. Recently, I met one friend who wanted to embed video ads in his app and website, the kind of ads you see on Gaana.com or auto play videos on Facebook which auto start and pause when you scroll.

Businesses also ask what kind of videos will work for their business. Here are few tips.

Shorter is better – watch trailer before you go for movie

Video length significantly determines how many people are going to watch your video. Just like you prefer to watch movie’s trailer before planning to spend 2 hours to watch entire movie, people prefer to watch 30 seconds trailer about your business, if they like the trailer they will definitely watch 30 mins video about your business and maybe turn to your loyal customers.

Quality of video – short creative motivating story

After length its quality of video that you are putting on your website or app. A short creative story that motivates customers to go for your business rather than other players in market is the key.

Viral – market your video using various channels

This is one term that is viral over internet. I remember when people used to share videos over email, when YouTube was not there. “The Spirit of Christmas” was distributed over email and it led to creation of adult comedy animation series “South Park”. Now you have got lot of channels like YouTube, Facebook, Twitter and other social media platforms. Utilize them well.

I feel, video advertising is in huge demand right now but there is no inventory. There are a lot of online tools that you can use to create good videos for your business. I am pasting small list here.

Great, you created Facebook like video experience. You can manipulate viewport based on your requirements. You can also check live demo here.

Story behind Adele’s latest hit ‘Hello’–

There were rumours that Adele wrote this song after her breakup. As per her official interview if she would have written ‘Hello’ for her lost love it would be full of pain. But this video was not intended to be on ‘dark side’. The other side is not dark. There was a girl in her 20’s going through bad phase and people called her immature, emotionally stable on social media and compared her to Taylor Swift and there is a mature lady writing from a place out of her comfort zone and singing ‘Hello from the other side’.

I will be skipping traditional TO DO app tutorial here, as you can find it anywhere on web. Rather, I will try to explain few scenarios that developers come across while developing apps using JavaScript frameworks in real-time.

In this tutorial we will be covering

Setting up development environment for Meteor?

How to integrate your Meteor application with Mongo DB?

How to secure your Meteor application?

Setting up development environment for Meteor
Most popular IDEs like Sublime, Webstorm and on-cloud IDE- Cloud 9 integrates seamlessly with Meteor. I am a fan of Sublime so I will explain how to set up autocomplete engine into Sublime Text 3. You can visit Meteor website and setup your own IDE.
Open Sublime Text-

From menu bar select preferences-> Settings -Users

If you have not made any changes from time you installed Sublime replace contents of file with following code-

Now press Cmd/Ctrl+Shift+P and type Install. You will see ‘Package Control: Install Package’ in menu. Select it and press Enter. Now search for TernJS and click on it. Package will install automatically. Restart Sublime and you will see your Sublime just got smarter and it can autocomplete Meteor code for you.

How to integrate your Meteor application with Mongo DB?
We already have Meteor code running on local server. Now let’s add DB support. Meteor comes bundled with MongoDB so you don’t need to include it again, still if you wish you can do custom setup but let’s not discuss it in this tutorial as pre bundle itself is self-sufficient to create end-end application.

Lets create Fishes collection.

Fishes = new Mongo.Collection("fishes");

It creates a MongoDB collection called Fishes and creates a cache connected to server.

and you will see both client and server have a new beautiful red fighter fish. If you noticed, you were able to alter DB using Javascript without authenticating with server which is a security breach. This is beacause Meteor has insecure package selected by default.

To remove insecure package navigate to your project folder in Command Line /Terminal and run-

meteor remove insecure

Now enable the accounts system and UI using following command from root directory of project-

meteor add accounts-ui accounts-password

I find package control really useful. They make your life lot easier by taking care of entire setup for useful technical modules, as in this example entire user management. Few years back implementing secured login module was estimated around 100 hours which came down to 1 minute with recent advancement in web technologies.

Now add login buttons to your app. Paste following blaze template anywhere in code. I will paste it in header.

Server Side Javascript has come long way, and after launch of Node.js in July 2011 gained lot of popularity as idea of using same language on client and server bought in code and software architecture uniformity in software applications. Even though Brendan Neich‘s Netscape already had vision to use same programming language on client and server but at that time people were using Pentium I/II processors which were not powerful enough to support Javascript Interpreters. In case you don’t know Brendan Neich he’s creator of Javascript and co-founder of Mozilla. In present generation of more than 2 billion smartphones you can get Phone with 1.2 GHz processor for less than $40. Seeing boom in processing speed of devices software developers started integrating Javascript interpreters like SpiderMonkey & Rhino in their applications. Some started using Jaxter server that embeds entire Mozilla Firefox Browser Engine in web server giving access to Ajax and Javascript within application.

Now when we have brief history of Javascript let me explain how to setup Meteor and create a simple server side Javascript application.

Now you can use your favourite code editor to change HTML and CSS and see if changes are getting reflected in your application without refreshing browser. If you can see updated HTML in your browser, congrats you deployed your first Javacsript Server Side Application. It’s called hot code push.

6 of 8 people in India go through workplace harassment without knowing they are being harassed. Wanted to share this important piece of advice for wellbeing of employees as well as employers.

To employers- you don’t owe your employees, they just work for money and cause they trust in you.

To employees- Know your rights, be aware. Even if you make mistakes no employer/boss has right to harass you.

Labour inspector from the Labour Department are employed for the well-being of the employee issues and there is no fee as such. Following are some common example of workplace harassment:

Dispersion of malevolent and untrue rumours, scandal or innuendo at the workplace. Isolating an individual socially and professionally in the office.

Threatening a person or dominating him/her unfairly.

Deliberately discouraging one or hindering his/her job.

Physical abuse or intimidating someone with abusive languages.

Eliminating one from his roles and responsibilities without any reason.

Altering instructions and guidelines constantly.

Imposing unrealistic deadlines intentionally to make an individual fail.

Holding back important information or tenaciously providing wrong information.

Cracking offensive jokes verbally or in written, especially in front of or about female colleagues.

Sneaking into someone’s personal life, spying or pestering him/her.

Causing unnecessary pressure on a particular person by assigning heavy workload when others are free.

Making on sit idle without any work which is also a way to create mental pressure on a worker. Often companies take this way to make their employees surrender for voluntary retirement schemes.

Screaming or showing vulgarity to an employee.

Intentionally and unreasonably criticizing an individual on regular basis.

Ridiculing one’s opinions. Unjustifiable punishment for trifles.

Holding back deserved leaves, promotions and training.

Blocking applications for training, leave or promotion.

Meddling with one’s personal belongings behind his/her back.

When any of the above happens to an individual, it indicates that he/she is falling prey to employee harassment. Be it the employer or co-workers, there are legal terms via which the offenders can be punished.

Indian constitution guarantees gender, racial and religious equality as the ‘Fundamental Right’ of the residents of the country in Part III, Articles- 14, 15, 16 which implies for the workplace as well. Hence one faces discrimination by the employer because of his/her race, complexion, gender, caste or origin; he/she can immediately seek legal advice by consulting with a lawyer. The ‘Directive Principles of State Policies’ of Part IV encompasses the cultural and socio-economic rights of Indian citizens.