Sponsored Links

August 19, 2018

Top 30 ways to become better developer

Here are top 30 tips for becoming a better developer. If you follow all these steps then you already are a better developer.
  1. Read other people's code:
    You need to make a habit of reading code written by other developers. You can learn many things from this. Obviously there are BAD CODES out there but you need to have sharp selection for reading quality code. This will help you learn new techniques, languages and quality code from other developers.
  2. Write shorter methods/functions:
    Always try to make your functions as short as possible and to the point. Writing short methods will help to organize, maintain and test the code. And always remember one tasks one method.
  3. Learn New Language:
    Try learning new language whenever possible. No language is perfect and learning new language helps you to know work around and quirks of languages.
  4. Write a test before coding:
    Before starting to code to develop features first write a test for the feature. It will help to develop feature without possible bugs and going out of track.
  5. Single Responsibility Principle:
    Give single responsibility for a class. It is best practice to give single task to each class. Any class with more than one major responsibility should be broken up into smaller classes.
  6. Learn to Debug:
    Debugging is one of the crucial part of developers. Debugging a problem can take nasty amount of time if you are not used to it. There are many debugging tools out there for you. Use them and get used to it. It will pay you off in future.
  7. Write clean code:
    Writing a clean code is something that is achieved by practice. It won't happen over night. You need to write many lines of code, refactor them and improve them time and again. Also you should be consistent while coding like proper spaces, variable naming, formatting etc. Your code should be readable for other programmers and can understand the motive of code once then read them. Try to make your code as simpler as possible.


...to be continued

December 29, 2017

How to Find any Wi-Fi Password on Windows

Sometimes you may forget the wifi password of your network you are connected or it may be difficult to remember password. So here is the simple command line trick to find out the password. Follow these steps if you’re using Windows 7,8 or 10.

  • Open CMD as an administrator.
  • Paste the following code:
  • netsh wlan show profiles
    You will get a list of the networks that are known to your computer.
  • Now paste the following code. Replace "profilename" with the network name.
  • netsh wlan show profile name=profilename key=clear
    Look for the "Content Key". That is your password.

December 14, 2017

Things to Remember If You Are Developing Your Website

If your are starting to develop your website or starting website development then you should consider user experience also. I am giving some tips to get started here. If you do not know anything about typography, but you care about readability, you should try this as a starting point.

  1. A minimum of 18px font size.
  2. Line spacing of 1.6
  3. #333 for color or thereabouts.
  4. Limit your lines to a width of 700px.
These are few tips for starting. I will keep updating it with other useful tips for starting as developer.

5 Tips to Become a Web Developer

If you ever wanted to become a web developer then here are the five tips to get started with.
  1. You can volunteer or intern in different companies. This is the quickest way to get hired or work as a web developer. So find any local companies or any around you and ask for volunteer.
  2. Your goal is to gain experience in the real world as quickly as possible and build your portfolio. So say yes to every websites including unpaid ones.
  3. You need to build your portfolio to make it strong. So where do you put your work? Well, this can be your own web site and I recommend this if you want to look professional. You can host it on GitHub.com and GitHub.io all for FREE and you can buy your own domain also if you like.
  4. Find a mentor and join local or online coding groups.
  5. There are plenty of open source projects today. You can contribute little by little in those projects to make familiar with the web development world

December 13, 2017

Rare Euro Coins

2 Euros coin dedicated to Grace Kelly was put into circulation in 2007, and it costs between 600 to 1,000 euros. Just 20,000 of them were made. 1 Italian cent was released in Italy 15 years ago, and costs around 6,000 euros. Why? The coins, issued in 2002 have the same design as 2-cent coins.

December 9, 2017

How to clean your Windows Temp folder

The temp folder contains files that are only needed temporally. Unfortunately, these files that are meant to be deleted don't always get deleted after their job is done, resulting in wasted drive space.

To open the temp folder, click Start or go to the Windows 8 Search, type %temp%, and select the folder that appears first. Once the folder is opened, you can manually delete files and folders. But you probably can't delete all of them. Windows won't let you do away with those currently in use. That's fine. You don't want to delete those ones anyway.

In fact, you really don't want to delete any files created since the last time you booted your PC. So if you shut down Windows every night (and I mean shut it down, not sleep or hibernate), and boot clean every morning, you can safely delete any files in Temp not dated today. You can easily do it in an old-fashioned way, DOS-style batch file to automatically clean out the folder every time you boot. Here's the process:

Open Notepad, and type these two lines:

    rd %temp% /s /q
    md %temp%

Save the file as %appdata%\microsoft\windows\start menu\programs\startup\cleantemp.bat. This will create the batch file, cleantemp.bat, inside your Start menu's Startup submenu. Everything in that menu loads automatically when you boot. Windows 8 doesn't have a Start menu. But it still has the folder. And the trick still works.

Enjoy!!!

December 5, 2017

Time Saving Tips for AngularJS Developer

Here are some of the tips while learning and coding on angularjs.

At a high / architecture level:

  1. Do not forget to write your tests. In Javascript, you don't have the compiler to hand hold you and tell you that you did something wrong. And you will want to pull your hair out the next time your app is broken because of a missing letter. And the large your application gets, having the comfort of making large scale changes and refactorings without worrying about broken functionality is amazing. And writing your unit tests is the only way to get there.
  2. Don't put too many things on the scope. The scope is expensive, as it is the one that undergoes dirty checks. Just put exactly what will be displayed on the UI on the scope, and leave the rest as variables in the controller, but not on the scope.
  3. Data is the truth. Let the data drive the app, and not any other way. You should purely focus on getting the data in the right places. The route controlling logic, the watches and the data binding should drive what is visible in the UI.
  4. If you need a UI widget like datepicker, autocomplete then think directive. Wrap all your third party components in directives for easy reuse, as well as to make your app modular. Being able to write <input datepicker> is way better than writing <input id="myinput"> and then in JS, $('#something').datepicker().
  5. Don't do DOM manipulation in your controllers, as well as your services. Try to restrict that work to directives.
  6. If you need to communicate between controllers, there are basically two options. Either create a service which is sigleton and use it to communicate or fire events on the scope, and have the other controller watch. Don't create your own new way outside of these two.
  7. Dependency Injection: Understand it, love it, breathe and live it. That should be the one and only way you ask for and work with services or any dependencies from any of your code.
  8. For directives, try and isolate the scopes so that you can reuse them without worries. Isolating the scope ensures that your directive does not depend on some particular method / variable on a parent scope, and thus can be reused. Pass in whatever you need as arguments to the directive. Use the databinding to ensure you get the updated value instead of the value at that instant.

Basic Linux Commands

Below are some of the commonly used linux commands.
Note: Think twice before using rm -rf / command. :D

Regular Expressions in JavaScript with Examples

Example 1 : To return all the matched strings
var a = "This is regular expression example.";
var regex = /regular/g; // to find string regular
var matches = a.match(regex);


Example 2:  To return all matched numbers
var a = "This is 1 apple, this is 2 apple";
var regex = /\d+/g;
var matches = a.match(regex);

Example 3:  To return number of spaces in the sentence
var a = "How many spaces are there in this sentence?";
var regex = /\s+/g;
var matches = a.match(regex).length;

How to Generate Random Number within the range

This example shows how to generate random number from the range of number given.
function generateRandomNumber(minNum, maxNum) {
        return Math.floor(Math.random() * (maxNum- minNum+ 1)) + minNum;
}
generateRandomNumber(5, 15);

Above code will generate random number between 5 and 15.