Tuesday, June 20, 2017

Clean Code

Writing code is not tough job. There is saying that "even monkey can code" but only those codes are clean code which follows proper way or proper order or lets say proper pattern. If person A writes 1000 lines of codes then person B should be able to read and understand the purpose. There are plenty of programming languages and plenty of design pattern and programming paradigm through out the university courses and different online courses. Summary of them all is to create a person who can write readable code (clean code).

Following the syntax and semantics is not only the way to write code. We can create any functionality workable, but think if a change request arise in the same functionality, how much you need to change and how much time you need to spend to understand your own code. Also is the model you just create extensible? We may solve small problem writing if else block for now, but think if multiple condition arises you need to keep on adding else if.
Programming is not like solving the current problem and forget it, it should extensible and feasible for future probabilities.

Saturday, May 16, 2015

Some time with JavaScript

Maze!

The Amazing Mouse Maze!

Click the "S" to begin.

S
E

The object of this game is to guide the mouse cursor through the start area and get to the end area. Be sure to avoid the walls:

Good luck!

Wireless network connection problem in Ubuntu 15.04

When I upgrade my system from Ubuntu 14.10 to 15.04 unexpectedly my wireless connection stopped working. It shows all the available networks but cannot connect to any of them. But wired network is working fine. I googled my problem after couple of minutes this simple thing solved my problem.
Steps:
  • open terminal and go to /etc/modprobe.d/
    • i.e. cd /etc/modprobe.d/
  • open iwlwifi.conf file in any of the text editor 
    • i.e. sudo gedit iwlwifi.config
  • you can see "options iwlwifi 11n_disable=8"  in the last line of the page, either comment it or delete it.
    • i.e. #options iwlwifi 11n_disable=8 #this is single line comment
  • re-start your system and it will works.