Who needs an MIT license when you can have a Beerware license?! 😂

Image for post
Image for post
Photo by Bill Oxford on Unsplash

Please Note: Software licensing is serious!

A software license is a legal instrument (usually by way of contract law, with or without printed material) governing the use or redistribution of software.

Here I have listed some funny licenses that may make you laugh.

TL;DR Noting serious here! Read this just for fun!

1. Beerware license: Buy the publisher a drink.

/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <phk@FreeBSD.ORG> wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a beer in return. …


Good-to-know code Snippets for every dart Developer.

Image for post
Image for post
Photo by Barn Images on Unsplash

Dart is a client-optimized language for fast apps on any platform.

Well, what does this mean?

JavaScript is dominating client side technologies so far but dart is gaining a lot of attraction these days. Already flutter, which is a cross platform mobile framework, already passed the github stars over react-native in its very early age.

I am developing with react-native for over 3 years and recently I have tried flutter. The development experience I would say is simply awesome.

It’s fast, has out-of-the-box widgets, and hassle free debugging and troubleshooting.

Here I have listed some of the useful code snippets to know while writing software with dart. …


Funny ways to remember what your server wants to say

Image for post
Image for post
Photo by Taylor Vick on Unsplash

All HTTP response status codes are separated into five classes or categories. The first digit of the status code defines the class of response, while the last two digits do not have any classifying or categorization role.

This writing tried to help you to determine or narrow down the problem you are facing while talking to your server.

1xx: Hold on

With only 3 codes (100, 101, 102), the 100 series is the shortest one. Basically, what it does is return an information message such as “I am working on it”. No success or error, just a “Roger that!”

2xx: Here you go. I am Fine. Its a Success

A code 200 is the one you want to see the most of in your logs: it means the request was successful. Either it has returned something, or it has returned nothing but successfully completed the processing on the server. It’s the server saying: “Here you go”. There are 7 variants, from 200 to 206. …


Docker Commands that every software should know

Image for post
Image for post
Photo by Andy Li on Unsplash

Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Well that all developer is aware of.

Here I have listed some basic docker commands that every software developer should be familiar with.

Note: This list will enrich as days go on. Feel free to write comment is anything missed.

1. List Containers

docker ps 
# your can add available [OPTIONS] below
docker ps -aq
# only shows IDs

[OPTIONS] few are .. More you can find from here

--all 
# or -a Show all containers (default shows just running)
--filter
# or -f Filter output based on conditions…


Must to know Terminal Command that developers should know!

Image for post
Image for post
Photo by Goran Ivos on Unsplash

Software developer often need to do certain things from terminal like sdk setup, module installation etc.

Here I have listed some of the high frequency terminal command that you mush have to know. This list will enrich as days go on.

Note: Please write in comment if I missed anything important!

Comment Something in Terminal Command

# this is a comment

Print Something in Terminal

echo "Hello World"  # print new line after Commandprintf "Hello World\n"

cd to root directory

cd ~ # move to Home directory of your Machine

Show Current Path

pwd # My Current Path

List files and folders

ls # list all folders and filesls -l# List the contents of the directory, including file date, size, #permissions and other…


Tiny Mojo Writing for Developers !

Image for post
Image for post
Photo by Caspar Camille Rubin on Unsplash

Developer all over the world is having a strange time of working from home continuously for several month. Its really tiresome and boring to stay all day at home looking at and typing code.

This is a developer Mojo Writing.

Very tiny Writing ! Read this just for fun !

- JavaScript getting more use cases. Indeed !

- Community !

- Christianity vs JavaScript

- The Real Strength

- Well, its Yes and also No

- Sort arrays in Javascript

- JavaScript in 2020

- Javascript Developers!

- JavaScript bad

- Javascript Developers

- Javascript, Java and C++

- Javascript is a Java framework

- IE Shut Down !

- Web Developers

Thanks for reading. Happy JavaScripting. 🍿


Read this just for Fun !

Image for post
Image for post
Photo by Katrina Berban on Unsplash

Developer all over the world is having a strange time of working from home continuously for several month. Its really tiresome and boring to stay all day at home looking at and typing code.

This is a developer Mojo Writing.

TL;DR Noting serious here ! Read this just for fun !

Q: Which programming language is the shortest?

A: HTML. Because it doesn’t have a neck between its <head> and <body>.

Q: How do JavaScript developers break up?

A: They always promise to callback

Q: Why do developers use mechanical keyboards?

A: To strongly type their code.

Q: Where do developers drink? …


From Robert C. Martin (Uncle Bob)’s Clean Code: A Handbook of Agile Software Craftsmanship.

Image for post
Image for post
Photo by Christina @ wocintechchat.com on Unsplash

The phrase “software engineering” was terms at conferences organized by NATO in 1968 and 1969 to discuss the ‘software crisis’. If we consider 1968 as the starting point of software engineering as a profession, it is over 50+ years of engineering practice.

“ Even bad code can function. But if code isn’t clean, it can bring a development organization to its knees. Every year, countless hours and significant resources are lost because of poorly written code. But it doesn’t have to be that way ” from Clean Code: A Handbook of Agile Software Craftsmanship.

It is not enough for code to work. …


Traditional and The Better Way

Image for post
Image for post
Photo by Daniel Vogel on Unsplash

The factory pattern is a type of Object Oriented pattern which follows the DRY methodology. As the name suggests, object instances are created by using a factory to make the required object for us.

Lets consider we have the three following classes:

// Our Three class based.class Dog {}class Cat {}class Person {}

Now we want some function to whom we will ask for an object in plain string and that function will return an instance of the object we wanted.

Image for post
Image for post
Factory Method in Simple

Traditional Implantation using Switch

var factory = function(key) {
var instance;
switch (key) {
case 'dog':
instance = new Dog();
break;
case 'cat':
instance = new Cat();
break;
default:
instance = new Person();
break;
}
return instance;
}
console.log(factory('dog'));

Replacing the Switch with Object Literal.

var factory = function(key) {
var map = {
dog: Dog,
cat: Cat,
person: Person
};
return new map[map.hasOwnProperty(key) ? key : 'person']();
};
console.log(factory('dog'));

Thanks for reading! 🍻


Good-to-know Array Manipulation Function for every JS Developer.

Image for post
Image for post
Photo by Charles Deluvio on Unsplash

JavaScript is a powerful language, because you can write an entire software without adopting any other programming language at all.

And without array manipulation do you think it's possible to write a software?Here I have tried to list some frequently used array operation you may need to use.

Tried to talk less , Code more. Directly used code example without documentation like stuff

Array includes

const array = [1,2,4];
console.log(array.includes(3)) // false as item 3 is not present

Array Filter

const product = [{productId: 12, name: "Monitor", price:100, sku:"12341"},{productId: 14, name: "Mouse", price:10, sku:"12342"},{productId: 15, name: "Keyboard", price:12, sku:"12343"},{productId: 16, name: "Headphone", price:20…

About

XOR

Software Writer. Now Learning Flutter.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store