Skip to main content


Showing posts from 2017

Cargo Cult Design and WHY you should AVOID IT

What is Cargo Cult Design? Have you ever tried to follow other successful games and apps design while working on yours..??.I am not talking about graphics or other stuff. I am talking about those "Special qualities" that we think made it successful.Well at some point or other we all try to make many things as they were in other successful apps. OK Dee i got it..but title of this post is about some Cargo-cult thing..........whats that ?.and whats the problem with this approach..?  The problem is that reason behind these successful ones is not there design,yes it matters but not as much as the their luck. This kind of approach can lead to the the "cargo cult design".This term cargo cult comes from the per-industrial period.You see there were many tribes in pacific region. These tribes were exposed to the cargo coming from western countries.This was obviously beneficial for these tribal people but as the westerners left the cargo ceases to arrive, l

Lets's Learn Document Object Model

Lets's Learn Document Object Model  The " DOM "document object model) allows JavaScript to access the content of a web page.The DOM is like a class monitor, where HTML elements are the like the students of a class.It monitors or keeps track of HTML documents. JavaScript is like class teacher it tell the monitor to do something. Or in other words JavaScript can manipulate HTML elements with DOM. Show Me your ID In DOM you can give  unique names to HTML elements, these are called Id of the element, further this id can be used by JavaScript to manipulate or access the HTML elements.To give id to an element you can use id attribute like this ; <h1 id="Hello" >Hello</h1> ID  Hello then can be then used to access the heading tag <h1> later by Javascript. Let's Catch this guy Now, when we have the name given we can catch this guy and manipulate it. To use this element we use method document.getElementById in our

Powerful Tips for writing better code and increasing productivity

Useful Tips for writing better code and increasing productivity                       I entered the world of programming back in 2011. I had no formal education in programming, I just brought a book and started learning.Today when I look at my journey I realize it I made a lot of mistakes while learning programming and it's not possible to avoid all of them and according to me you should not avoid some of the mistakes that I am made, as these mistakes teach you a lot about programming but there are some mistakes that you should avoid no matter if you are a beginner or an intermediate or an expert. I am about to share some tips with you , you may have heard many of these earlier from other people or if you are studying in some school or university from your teachers or may be you never thought about these.                             Variable Confusion Tip #1  While writing your code please make sure that the variables are defined in a manner that even after

Things to master while learning a new programming language

Are you Learning a new programming language While learning a new programming language we all get confused that what are things that we should focus on.There are many things to learning before diving deeper in any language.But its very hard, many times we are so overwhelmed by the advanced features of language or we want to accomplish something specific in short span of time that we don't put much effort in learning these basic concepts and then we realist that we are making silly mistakes.This happen even with experienced programmers.So here is a list of things to focus on while learning a new language.This may also help you to find right language to learn so, even if you are not learning a language right now but want to learn and you are not able to find the right one for you Keep reading it may help........., THE SYNTAX According to Wikipedia "the syntax of a computer language is the set of rules that defines the combinations of symbols that are consid

Html 5 Canvas Text App Part II

Html 5 Canvas Text App Part II Last time we made the Canvas text app.This time we will add shadows and download functionality to it. Lets get started. If you haven't seen the first part of this series , I recommend you to do so here..., HTML 5 Shadows In html 5 you can give shadows not only to the text. HTML 5 Shadows provides four properties make awesome effects. context.shadowColor For the color of the shadow.Color is given in the format  “#RRGGBB”. context.shadowOffsetX A positive or negative number showing x offset of shadow.  context.shadowOffsetY A positive or negative number showing x offset of shadow.  context.shadowBlur Provides blur filter for diffusion of the shadow. The higher the value, the more diffusion. An example of it can be  context.shadowColor = "#00FF00"; context.shadowOffsetX = 4; context.shadowOffsetY = 4; context.shadowBlur = 1; This will produce this result..., Now

Let's Make an Html 5 Text Canvas App

Let's Make an Html 5 Text Canvas App So last time we made a cool tileboard ,this time we will make a Html 5 canvas text App.Sounds cool here's what we are going to have at the end of this post.. The Idea.     So i was making this video and i made every slide in blender3d(Iknow that's a bad idea) and it was a pain in the........ so i Was wondering if there is easy way to do it...and i am still wondering. My Story which not at all useful for you ........ So I ended up with this idea.....this is first part as this project is little big.... 1) An app which let us create slides and export them... 2) Slides may include text and images. 3) Text and images can have some basic effects like shadows.... If you DON'T KNOW JAVASCRIPT you can follow my learning javascript series which is short and sweet introduction to the world of javascript......., Learning JavaScript V Learning Javascript Part IV Learning Javascript Part III Learn

Make a HTML5 Canvas Colorful Tile Board Part II

Make a HTML5 Canvas Colorful Tile Board Part II So last time we created a HTML 5 Canvas TileBoard in javascript . But it was not so flexible and we were not able to control it properly. So Lets develop this project it little more.                   THE IDEA 2) User can Change the Background color of the Board 2) User can assign a single color to some specific tiles 3) User can clear the Canvas Completely (Just for fun). THE IMPLEMENTATION Lets Make the Background color Chooser First, we can implement it with HTml5 Color Chooser So add this Code to your Html File. <input type="color" value="#ff0000" id="ColorChooserBG"> Create a new function for drawing Backgorund function drawBG() { ct.fillStyle = document.getElementById("ColorChooserBG").value; ct.fillRect(0,0,Can.width,Can.height); } Call this Function in  Draw()

Learning Javascript Part VI

Learning Javascript Part VI Loops and Jumps So we Learned about Functions in javascript and how useful they are when we want to reuse code.But what if we want to do some thing more often, like what if we want something to happen multiple times.For instance what if we want to print something multiple times on console.Lets say thousand times.Again it would be ridiculous to do it ourselves.So what can helps in this.A loop can this problem and in any programming language they are meant to do it.A loop statement is used when we want to repeat some programming statements until a specified condition is reached. There are basically four types of loops. 1) For Loops 2) While Loop 3) Do- While Loop The Basic concept of  a loop is checking the condition and doing somenthing. For Loop Let's first discuss about for loop .The for loop have initialization, condition checking and increment/decrement done very nicely and easily. The Syntax of for loop is shown below.

Learning Javascript Part V

Learning Javascript Part V So we learned about arrays and objects earlier, this time we are going to take a look at the Functions.If you have'nt checked out the earlier tutorials then i recommend you to do so. Please open your console in browser to understand better.If you are new to this series then please first go through the earlier posts as this is an follow up series.Every post is short and sweetso don't worry much about it. Need Of Functions Lets say i want to do some thing like lets say a + b , but i want to do it five times at different place in my code.So one way to do this is that I copy-paste it 5 times at the places i need it.But What if I am working on a much bigger code and want it thousand times, than doing the  Copy paste is not a good idea.  Here comes the functions, simply a function is a way to bundle code so that it can be reused.In this post we will learn how to make function and use them.Lets get started. A Basic Function Syn

Make a HTML5 Canvas Colorful Tile Board

Make a HTML5 Canvas Colorful Tile Board We have already know how to draw shapes in html 5 canvas,now lets apply that knowledge to make something more interesting. We all love colorful environments. So lets create a Tile Board. The IDEA 1.)A canvas with many tiles. 2.)Each tile will have its own different color. 3.)User will have the ability to redraw the Tile Board. The IMPLEMENTATION Now we will implement the idea.Lets get started....., Lets create a simple Html 5 file. <!DOCTYPE html> <html> <head> <title>TODO supply a title</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> </body> </html> Now create a html 5 canvas. <canvas width="600" height="400" id="Can" ></Canvas> Now Create a