OverviewHello all if you are heard the word developer and wonder what they are and what they will do, and want to become a developer. This is the place to get start to become a developer. In this article I am going to setup the environment to write your first “Hello world” program and share it to the world.
Who is a DeveloperA lot of people think, if they can write some code, they qualify as a developer. But it is not like that, if you don’t take ownership and responsibility for solving the overall, real business/user problem you are not consider as a developer.A good developer should understand the overall problem and its context. He has good problem solving skills, take ownership by being a part of the team and having a sense.
Before starting you have to understand the below terminology which is always used while talking between developers.
|Analysis||Understand your requirement and analysis with existing system|
|Design||Draw your understanding of the problem in visible manner|
|Coding||Translate your design into any of the programming language|
|Testing||Validate your program satisfies your requirements|
|Debugging||Dig through the code to understand where your program fails to satisfies your requirement|
|Profiling||Get the performance data of your program to make it faster and better|
Choose your platformCurrently there are three major platform available for development.
Setup your Linux EnvironmentIf you have Linux OS on your machine you can skip this section. Here I am going to explain you how to setup the Linux environment on your windows or MAC based platform. Before starting you need to download the Development tools from the given link
MiniLinux – It is a simple light weight Linux CLI Application which mimics the Linux Terminal.
MiniLinux was developed by me on top of mobaxterm with additional plugin support which allows you to get the entire Linux environment on one click.
Click here to download the MiniLinux.
There are other tools which provides the Linux Environment on windows like Cygwin, Installing Linux on Virtual machine, Mobaxterm free version. But setting up these environment is very complex task for beginner. When I start try to setup the cygwin in my machine at first time I am literally pissed off and I went to install the Ubuntu as a dual OS in my machine. So To avoid all sort of juggling I have created a “MiniLinux” on top of free mobaxterm with additional plugins to get a real flavor of Linux.
Select your EditorChoosing your editor is the import thing as developer you have to do before writing your code. If you are windows user after hearing the word editor obviously the name Notepad will come to your mind. But it is not really a editor, the name suggest it is simple note taking application. So always it is better to avoid using Notepad to write your program. You have to select the editor which will increase your productivity. If we talk about editor there are two famous editor in the open source world called “VIM” and “EMAC”. In open Source world we classify the developer into two category one who uses VIM and other who uses EMACS. Both are best editor which allows you to write a code in fast phase and increase your productivity. But selecting the one completely depends on the individuals. Here I am VIM guy so I will go with VIM.
You don’t need to download anything to setup your VIM editor I already bundle it in MiniLinux application. So just click on the MiniLinux Application, It will open the application which looks similar like your command prompt in windows. In the terminal just type vim to get start the vim editor.
VIM editor has three modes.
- Command Mode [press ESC and colon : to go to command mode]
- Insert mode [press “I” or “O” to go to insert mode]
- Visual Mode [ press “v” to go to visual mode]
|$> vim||Open the empty vim editor|
|$> vim filename||Open the file in vim editor/create new file|
Basic vim CommandsAll the vim commands only work in command mode, so always press ESC + : to go to command mode and execute the below commands.
|I or O||Go to insert mode|
|w||save the contents|
|wq||save and quit the file|
|q!||quit without saving the file|
|gg||go to top of the file|
|G||go to end of the file|
|1||go to start of the line|
|$||go to end of the line|
|:help||to open the help menu|
Setup the Local GIT AccountGIT is a distributed revision control and Source code management system.When you are working in corporate world you may have to develop a program with multiple people, and all may use the same file to develop different functionality in it, So we need a tool which helps the team cope with the confusion that tends to happened when multiple people are editing the same files.
Here I am going to explain the steps required to setup a local GIT in your machine. As MiniLinux bundle with GIT so you don’t need to download any special program to setup GIT. Just open the MiniLinux Application, in terminal type the below command
$> git --help
Which shows the usage of git tools. Execute the below list of commands to setup your local GIT in your machine
|$> mkdir myrepo|
|$> cd myrepo|
|$> git config –global user.name “Senthilkumar M” << Use your name here >>|
|$> git config –global user.email email@example.com << User your mail id here >>|
Write a hello world programNow your Linux environment is ready and your editor also ready to accept your code then what let start writing a simple hello world program in C. As a Developer you have to develop your code in different programming language but for beginning purpose I will start demonstration in C.
Open your vim editor and start typing/copy the below program.
$> vim hello.c
printf(“Hello world now I am a Developer \n”);
$> gcc hello.c –o hello
If your program compiles successfully without any error you will see a file in your current directory called hello. Type the below command to run the program.
$> Hello world now I am a Developer
Share your program through GITUntil you not share your code to the world no one know you are the good developer. Sharing your program to others makes a positive impact on you career development. Company who want to recruit you will see your code and understand your coding ability before calling you for interview. To share you code to other we have open source GIT web called github where you need to create your public repository to upload your code. You can refer my GIThub blog to setup your git hub account. Before doing that first commit your changes into local GIT.
Type the below commands to commit your changes.
“Words inside the quote are command explanation ”
|$> git status “ This command show you the files which not committed”|
$> git add hello.c hello.exe “Add the files to git ”
$> git status “Now it will show the different result then previous”
$> git commit –m “initial commit” “This is the commit msg”
$> git status “It will show nothing to commit mean your changes committed”
$> git log “It will show your commit history author name and date/time press q to come out”
To share your code to the world please refer my GIT blog to create an account in GITHUB website. Thanks for spending your time reading my blog. Happy coding. Feel free to give comments here. If you struck anywhere in they above steps send a mail to me firstname.lastname@example.org