Google documents vs Microsoft word

0

Today I tried google document in order to replace Microsoft word. It’s been 4 years since I have stopped using Microsoft Products other than doing some University project or when I need to use C# or SQL Server 2012 for data warehousing. At beginning when I tried google drive, I thought today is last day for Microsoft office on my Mac laptop. But unfortunately there are so many features missing in google documents and its a long way before I can replace Microsoft office for google drive. Here are list of feature that is missing in google documents.

1. No proper way to have table of content. I know you can insert table of content but it is not very professional and there is no page number in table of content. There is only one default style and we don’t have many choice.

2. It doesn’t check grammar errors for me.

3. If I put multiple white spaces between words than google document doesn’t inform me.

5. If I start my sentence will lower case “i” than google document doesn’t inform me.

6. It doesn’t have templates for cover sheet.

7. Reference is not possible other than few add-ons.

8. It doesn’t support feature of showing synonymous for certain words. English is not my first language, so I use this feature a lot to improve documentations while doing university assignments.

I know google have introduced add-ons functionality for google documents but currently there are not many of them available. May be in future there will be lot of add-ons available and one day I can completely replace Microsoft word but until then I am going to stick to Microsoft word.

Testing Controller with Rspec

1

Rspec is awesome when it comes to testing. In this post I am going to post code for simple controller and than I am going to post some code to test this controller. Both code and test can be refactored further but I am not refactoring them at this moment so that they will be easier to read. Once our test will pass then we will try to refactor it.

First of all, here is my code of controller which have seven default actions.


class PostsController < ApplicationController
  def index
    @posts = Post.all
  end

  def show
    @post = Post.find(params[:id])
  end

  def new
    @post = Post.new
  end

  def create
    post = Post.new(params[:post])
    if post.save
      flash[:notice] = "Post created sucessfully."
      redirect_to root_path
    else
      flash[:error] = "Post creation failed."
      render :new
    end
  end

  def edit
    @post = Post.find(params[:id])
  end

  def update
    post = Post.find(params[:id])
    if post.update_attributes(params[:post])
      flash[:notice] = "Post upaded sucessfully."
      redirect_to root_path
    else
      flash[:error] = "Post update failed."
      render :edit
    end
  end

  def destroy
    Post.find(params[:id]).destroy
    flash[:notice] = "Post deleted sucessfully."
    redirect_to root_path
  end
end

Now below in my test for this controller. While testing controller we should focus mainly on three things:
1. We should check if instance variable has been set properly for view or not?
2. We should check what template response is going to render or which action its going to redirect.
3. Finally, If flash notice and flash errors has been properly set or not.

We don’t need to test anything more than this into controller. We should not test if our create method is going to increase database count or not. These type of tests doesn’t belong in controller test.

require 'spec_helper'

describe PostsController do
  let!(:first_post)  { Post.create(:title => "Test Title", :body => "Test Body")}

  describe "GET 'index'" do
    before { get :index }

    it "assigns @posts" do
      expect(assigns(:posts)).to eq([first_post])
    end

    it "renders the index template" do
      expect(response).to render_template("index")
    end
  end

  describe "GET 'show'" do
    before { get :show , :id => first_post.id }

    it "assigns @post" do
      expect(assigns(:post)).to eq(first_post)
    end

    it "renders the show template" do
      expect(response).to render_template("show")
    end
  end

  describe "GET 'new'" do
    before { get :new }

    it "assigns @post" do
      expect(assigns(:post)).to be_a_new(Post)
    end

    it "renders the new template" do
      expect(response).to render_template("new")
    end
  end

  describe "POST 'create'" do
    context "when valid" do
      before { post :create, :post => {:title => "Test Title", :body => "Test Body"} }

      it "will redirect to root path" do
        expect(response).to redirect_to(root_path)
      end

      it "will set flash[:notice]" do
        expect(flash[:notice]).to be_present
      end
    end

    context "when invalid" do
      before { post :create, :post => {:title => "Test Title", :body => ""} }

      it "will render new template" do
        expect(response).to render_template("new")
      end

      it "will set flash[:error]" do
        expect(flash[:error]).to be_present
      end
    end
  end

  describe "GET 'edit'" do
    before { get :edit, :id => first_post.id }

    it "assigns @post" do
      expect(assigns(:post)).to eq(first_post)
    end

    it "renders the edit template" do
      expect(response).to render_template("edit")
    end
  end

  describe "PUT 'update'" do
    context "when success" do
      before { put :update, :post => {:title => "Update Title", :body => "Update Body"},:id => first_post.id }

      it "will redirect to root path" do
        expect(response).to redirect_to root_path
      end

      it "will set flash[:notice]" do
        expect(flash[:notice]).to be_present
      end
    end

    context "when not success" do
      before { put :update, :post => {:title => "", :body => ""},:id => first_post.id }

      it "will render new template" do
        expect(response).to render_template("edit")
      end

      it "will set flash[:error]" do
        expect(flash[:error]).to be_present
      end
    end
  end

  describe "DELETE 'destroy'" do
    before { delete :update, :id => first_post.id }

    it " will redirect to posts path" do
      expect(response).to redirect_to root_path
    end

    it "will set flash[:notice]" do
      expect(flash[:notice]).to be_present
    end
  end
end

Refactored Version of Rspec

Below is refactored version of Rspec, its smaller in size than previous test.

require 'spec_helper'

describe PostsController do
  let!(:first_post)  { Post.create(:title => "Test Title", :body => "Test Body")}

  describe "GET 'index'" do
    before { get :index }

    it { expect(assigns(:posts)).to eq([first_post]) }
    it { expect(response).to render_template("index") }
  end

  describe "GET 'show'" do
    before { get :show , :id => first_post.id }

    it { expect(assigns(:post)).to eq(first_post) }
    it { expect(response).to render_template("show") }
  end

  describe "GET 'new'" do
    before { get :new }

    it { expect(assigns(:post)).to be_a_new(Post) }
    it { expect(response).to render_template("new") }
  end

  describe "POST 'create'" do
    context "when valid" do
      before { post :create, :post => {:title => "Test Title", :body => "Test Body"} }

      it { expect(response).to redirect_to(root_path) }
      it { expect(flash[:notice]).to be_present }
    end

    context "when invalid" do
      before { post :create, :post => {:title => "Test Title", :body => ""} }

      it { expect(response).to render_template("new") }
      it { expect(flash[:error]).to be_present }
    end
  end

  describe "GET 'edit'" do
    before { get :edit, :id => first_post.id }

    it { expect(assigns(:post)).to eq(first_post) }
    it { expect(response).to render_template("edit") }
  end

  describe "PUT 'update'" do
    context "when success" do
      before { put :update, :post => {:title => "Update Title", :body => "Update Body"},:id => first_post.id }

      it { expect(response).to redirect_to root_path }
      it { expect(flash[:notice]).to be_present }
    end

    context "when not success" do
      before { put :update, :post => {:title => "", :body => ""},:id => first_post.id }

      it { expect(response).to render_template("edit") }
      it { expect(flash[:error]).to be_present }
    end
  end

  describe "DELETE 'destroy'" do
    before { delete :update, :id => first_post.id }

    it { expect(response).to redirect_to root_path }
    it { expect(flash[:notice]).to be_present }
  end
end

Testing Routes using Rspec

1

Most Rails developers don’t test their routes separately, they write controller test and try to catch every possible scenarios in a controller test. Today I learned how to test route separately. I have created seven routes using

  resources :posts

Here are lists of routes thats been created by above code.

  rake routes

     root        /                         posts#index
    posts GET    /posts(.:format)          posts#index
          POST   /posts(.:format)          posts#create
 new_post GET    /posts/new(.:format)      posts#new
edit_post GET    /posts/:id/edit(.:format) posts#edit
     post GET    /posts/:id(.:format)      posts#show
          PUT    /posts/:id(.:format)      posts#update
          DELETE /posts/:id(.:format)      posts#destroy

Now below I have written tests for each routes


require 'spec_helper'

describe "Routes" do
  describe "PostsController" do
    it "routes get index" do
      expect(:get => "posts").to route_to(
        :controller => "posts",
        :action => "index"
      )
    end

    it "routes get new" do
      expect(:get => "posts/new").to route_to(
        :controller => "posts",
        :action => "new"
      )
    end

    it "routes get show" do
      expect(:get => "posts/1").to route_to(
        :controller => "posts",
        :action => "show",
        :id => "1"
      )
    end

    it "routes post create" do
      expect(:post => "posts").to route_to(
        :controller => "posts",
        :action => "create"
      )
    end

    it "routes get edit" do
      expect(:get => "posts/1/edit").to route_to(
        :controller => "posts",
        :action => "edit",
        :id => "1"
      )
    end

    it "routes put update" do
      expect(:put => "posts/1").to route_to(
        :controller => "posts",
        :action => "update",
        :id => "1" 
      )
    end

    it "routes delete destroy" do
      expect(:delete => "posts/1").to route_to(
        :controller => "posts",
        :action => "destroy",
        :id => "1"
      )
    end    
  end
end

If you want to write test for un routable routes than here is code for that

   resources :posts, :except => [:show]
  
    it " does not route to get show" do
      expect(:get => "posts/1").not_to be_routable
    end

You can place your routes tests inside controller folder but I created a new folder name routing. If you name your folder anything other than routing that you have to add a type to your describe like this

describe YourController, :type => :routing do
...
end

OR

describe YourController, :type => :controller do
...
end

Script to clone git repo or update git repo

0

Yesterday there was question on Stackoverflow.com how to clone a git repo using a script or update a git repo if it already exists in a local machine. Here is my quick solution that i wrote using ruby. There are many things that can be improved in this script but I am not going to improved them now. We can add a rescue block when we are trying to communicate with github.

REPO_PATH = '/Users/full_path/to_repo'
REPO_NAME = 'xxx'
GITHUB_URL = 'git@github.com:xxx/xxx.git'


def change_dir_to_repo
  Dir.chdir(REPO_PATH)
  puts system('pwd')
end

def git_repo_exists?
  if Dir.exists?(REPO_NAME)
    puts "Git repo #{REPO_NAME} exists."
    update_git_repo
  else
    puts "Git repo #{REPO_NAME} does not exists."
    clone_git_repo
  end
end

def clone_git_repo
  system("git clone #{GITHUB_URL}")
  puts "Done"
end

def update_git_repo
  puts "Changing directory to #{REPO_NAME}"
  Dir.chdir(REPO_NAME)
  puts "Changing branch to master"
  system('git checkout master')
  puts "updating git repo"
  system('git pull')
  puts "Done"
end

change_dir_to_repo
git_repo_exists?

Password Generator in Ruby

0

This is the simple password generator that i wrote in Ruby. Firstly i am creating array of characters, numbers and symbols and then i am putting all those arrays in sigle place called secret(which is array). While I am joining all these arrays together, I am calling “Shuffle” method on them so that every time secret array have elements in different order. Once my secrete array is ready then I am generating password from secrete array. First of all i am using shuffle method on secrete array and then i am taking first 15 elements from secrete array using “take” method. I could have also used range(0..14) but I prefer using “take” method and finally I am joining all those 15 elements together using “join” method. Its very simple and useful method. This method will generate random password when ever its called.

def password_generator
  secrete = []
  char_array = ("a".."z").to_a
  num_array  = (0..9).to_a
  symbol_array = %w[! @ # $ % ^ & * ( ) _ - + = { [ } ] : ; " ' < , > . ? /]

  secrete.concat(char_array.shuffle)
  secrete.concat(num_array.shuffle)
  secrete.concat(symbol_array.shuffle)

  password = secrete.shuffle.take(15).join
end

Outputs

$j4″kzp8;}.@)hu
qkxu#'{6&i,>r3?
l5,v%a};t’31$?w
?>w4&c@o(}){+#2
^h[w<cg’x3y*6a$

Markdown Language

0

Last week in my job I was asked to update few documents on Github about setting up developers environment. When i looked at the readme.md document on Github, it looked like a HTML document but when i opened the file on text editor it was not written in HTML. At that time i learned something about markdown language. Markdown language is easy to read and easy to write plain text format, which can be easily converted to HTML. In fact its so easy that it can be learned within 30 min without any previous knowledge of HTML. Below are few of the tags used in markdown language.

Markdown Heading 1
# Heading 1

Html Heading 1

<h1>Heading 1</h1>

Markdown Heading 2
## Heading 2

Html Heading 2

<h2>Heading 2</h2>

Markdown Heading 3
### Heading 3

Html Heading 3

<h3>Heading 3</h3>

Markdown bold
**bold text**

Html bold

<strong>bold text</strong>

Markdown italics
*italics text*

Html italics

<em>italics text</em>

Markdown bold and italics
***bold and italics***

Html bold and italics

<strong><em>bold and italics</em></strong>

Markdown blockquote
> this is a quote.

Html blockquote

<blockquote>this is a quote.</blockquote>

Markdown Ordered list

1. first item
2. second item
3. third item

Html Ordered list

<ol>
	<li>first item</li>
	<li>second item</li>
	<li>third item</li>
</ol>

Markdown unordered list

* first item
* second item
* third item

For unordered list using markdown language we can use either “*”,”+” or “-” symbols.

Html unordered list

<ul>
	<li>first item</li>
	<li>second item</li>
	<li>third item</li>
</ul>

Markdown Strikethrough
~~this is strikethrough.~~

Html Strikethrough


<del>this is strikethrough</del>

Markdown Table

Column 1 | Column 2 | Column 2
---------|----------|---------
Row 1 | Row 1 | Row 1
Row 2 | Row 2 | Row 2
Row 3 | Row 3 | Row 3

Html Table

<table>
<tr>
   <th>Column 1</th>
   <th>Column 2</th>
   <th>Column 3</th>
</tr>

<tr>
   <td>Row 1</td>
   <td>Row 1</td>
   <td>Row 1</td>
</tr>

<tr>
   <td>Row 2</td>
   <td>Row 2</td>
   <td>Row 2</td>
</tr>

<tr>
   <td>Row 3</td>
   <td>Row 3</td>
   <td>Row 3</td>
</tr>
</table>

There are many other tags available for markdown language which can be easily found on internet.

Editor for Markdown

There are many editors found for Mac,Windows and Linus which can convert markdown tags to Html tags. However I am using MOU on Mac. MOU can convert markdown language to html format as soon as you type them on MOU screen.It helps you see the output of what you have written. Currently MOU is on beta version and can be download for free from this link.MOU also allows to convert .md file into pdf file or convert .md(markdown) into html file.It comes with different templates, including template for Github.

Ruby Visibility : public, private and protected

1

Now a days I have started learning Ruby and/ Rails because my new job requires these languages. While programming in Ruby, it feels so natural and syntax of Ruby is much cleaner compared to other programming languages that i did in the past. However there are few confusing things in Ruby when you come from other programming languages such as Java, C#, C++ etc. One of those things are methods visibility in Ruby. In Ruby every methods are public by default.

class Foo

  def say_hello
  	puts "Hello World"
  end

  def say_bye
  	puts "Good Bye"
  end

end

now in above code both the methods “say_hello” and “say_bye” are public by default so if i create object of Foo class and call methods “say_hello” and “say_bye” it will work as expected


foo = Foo.new
foo.say_hello    # will print "Hello Wolrd"
foo.say_bye      # will print "Good bye"

Now lets make method “say_bye” to private, in Ruby to make any method private we write keyword private and then define methods underneath the word private. Any method written after word “private” will all be private

class Foo

  def say_hello
  	puts "Hello World"
  end

  private

  def say_bye
  	puts "Good Bye"
  end

end

foo = Foo.new
foo.say_hello    # will print "Hello Wolrd"
foo.say_bye      # Error: calling private method

So far everything is working as expected. We know that we can’t call method “say_bye” directly on foo object because “say_bye” is private method but we can call method “say_bye” inside “say_hello” method. So far nothing new. Now lets create another class called “Bar” which will inheritance from “Foo” class


class Bar < Foo

  def say_bar
  	puts "I am bar."
  end

end
bar = Bar.new
bar.say_bar     # will print "I am bar."

Now from langauges like Java, we know that during inheritance, child class will inherit public and protect methods from parent class. But in Ruby it’s different, in Ruby child class also inherit private methods as well. To demonstrate this concept lets call private method “say_bye” of “Foo” class inside “Bar” class

class Bar < Foo

  def say_bar
  	puts "I am bar."

  	say_bye
  end

end
bar = Bar.new
bar.say_bar      # will print "I am bar."
                 # Good Bye"

If we see the result we print out “I am bar” and “Good Bye”.This shows that in Ruby child class inherite private method from parent class. You can call those private methods inside your class but you can not call them on object. Code show below will not work because you are trying to invoke private method directly on the object.

bar = Bar.new
bar.say_bye   # Error     

Another surprising feature of Ruby which i haven’t seen in languages like Java is, even you make your methods private, you can still force it and call it as public. Ruby understands that’s its programmers responsibility to know what they are doing. It allows method to be private but if programmers still want to invoke private methods then Ruby won’t stop programmers from doing so. We can invoke private methods by using “:send”.


foo = Foo.new
foo.say_hello       # will print "Hello Wolrd"
foo.send(:say_bye)  # will print "Good Bye"


bar = Bar.new
bar.say_bar         # will print "I am bar."
bar.send(:say_bye)  # will print "Good Bye"

Interview questions for graduate/junior software developers

18

Last month i went through couple of interview process and decided to post the questions that i was asked during my interview. These questions are combination from all the interview i went through. This questions are not suited for advanced developers, its only suited for recent graduates or junior developers.

  1. Tell us something about yourself.
  2. Other than study and programming, what you like to do during your free time.
  3. What is the hardest project you have done while you were at university.
  4. What is difference between overwriting and overloading in OOP.
  5. Tell us about your experience while working in team.
  6. How do you manage conflicts in a group assignments.
  7. Write a sql query to join two tables in database.
  8. Imagine you have two array a = [1,2,3,4,5] and b =[3,2,9,3,7], write a program to find out common elements in both array.
  9. ( Related to question no 8.) Can you write this without using for loop?
  10. ( Related to question no 8.) If i sort those arrays will it make any difference in your code? Can you write better code if arrays are sorted?
  11. What is different between ArrayList and Set.
  12. What is music? ( i was surprised when one company asked me this question ).
  13. Write sql query to find out total number of item sold for certain product and list them in descending order. ( need to use aggregate function )
  14. What would you like to learn from us? ( i was impressed by this question, there was only one company who asked me this question. This means that they were willing to teach new developers)
  15. When you move from one technology  to another technology, how do you prepare/learn for it?
  16. Draw UML diagram for vending machine. ( This question was not for face to face interview, it was emailed to me )
  17. What is your favourite programming language? ( Be very careful while answering this question, programmer are attached to their favourite language, so dont hurt their feelings while answering this question )
  18. Other than programming units, what units have you studied? Do you like units related to business management?
  19. Can you email us some of your work that you have done? ( i was asked this question in almost every job interview )
  20. What is use of index in database? Give us example of columns that should be indexed.
  21. What is use of foreign key in database?
  22. Why you decided to study software development?
  23. What is you motivation in  life?
  24. What is you goal for next 5 year? What do you want to become in future?
  25. What is MVC pattern?
  26. Have you heard of any design patter? Please name and explain couple of them.
  27. I have a bug that needs to be fixed: The receipt printer is printing in French. I am told to write a test to validate that is broken even before I look at where its’ going wrong. Isn’t that a bit silly? It’s broken, that’s why I’m fixing it, why don’t i write a test After i fixed it?
  28. What is the point of a final field?
  29. In what way are immutable objects useful?
  30. I call setsize(new Dimension(640,480)) on JFrame and it comes up as 640,480.I then set JPanel to its ContentPane and call setSize(320,240) on the panel, but for some reason, the panel takes up the whole JFrame. What could be the problem? ( Java question )
  31. What i a Heavyweight vs Lightweight component?Can you name instant of both. ( Java question )
  32. A query to a table in my database is slow, so i decided to speed it up by adding an index to every column on that table. Why is this not such a good idea?
  33. What is your dream job? It’s a dream job so it don’t need to be real job. Just anything imaginary.
  34. Do you have any question? ( don’t say that you don’t have any question. Try to ask something because it shows that you are interested in them)

Final Suggestion

Almost every company asked me to show projects that I have done. Make sure you have some projects ready and available in github. Also at the end of interview every company will ask you ” Do you any question? “. Don’t say NO. Prepare list of questions in advance. Below are few questions that i asked to person who was interviewing me:

  1. What IDE do you use?
  2. What version control system do you use?
  3. Will someone mentor me during my initial learning phase?
  4. What is next process after this interview?
  5. When will i be notified about my interview result?
  6. If i get selected what will be main area that i will be working on?
  7. Do you work on weekends? ( I asked this question to get rough idea of how many hours i will be working in a week. I need lots of hour 🙂 )

Once interview is finished, dont forget to say THANK YOU. Even your interview did not go as expected, always thanks to person who interviewed you. Attending lots of interview is important because it will prepare you for next interview.

After interview i was selected by couple of different companies, in my next blog i will write how i decided which company i will be working for.

I would also suggest to ready few of interview books to prepare for your interview. Below are few books that I recommend reading for your interview.

Codility

14

Codility( http://www.codility.com) is web application which helps employer to filter best programmers from average programmers. Codility Limited is based in London, UK.

Codility saves time of software talent recruiters by filtering out job candidates who cannot write correct program.

Codility administers short programming tests and checks whether solutions are rock solid.

During recruitment process employers can use Codility and choose different programming tests which can be emailed to candidates. Candidates can solve the problem on web browser and can submit the solution by clicking the submit button. Once solution is submitted Codility performs range of testing on the source code and try to evaluate which canidate solved the problem in best way. Normally you can write the soultion for interview test under 20 lines of code but if your algorithum is not robust then it will fail the Codility test. During validating the source code, Coditiy internal application will test your program with both valid and invalid data. On top of that it also measures how long your algorithum is taking to process large amount of input. Normally during test you can see the requirement for Bio O notion on the screen such as O(1), O(N) etc. The good thing about codility is that candiate can use the language they are comfortable with.

Now you must be wondering why i am writing about this company. Well during one of my job interview i was asked to do online test on Codility website, I thought that it will be multiple choice question and it will be very easy to pass the test. Once i reached home, i opened Codility website and decided to try few of their sample questions. For one of their sample question i was not able to understand the question so i skipped to the next one. Well next question i understood but i did not realized that i will be tested on speed of my algorithum. So i started writing code for sample test in Java, it was so difficult to write code on their browser because it breaks all the indentation and curly brackets; are placed on the wrong places. If codes are not indented nicely then i can’t even read my own code 🙂 . Well after finishing the solution i submitted to see my result. Guess what? I FAILED the test. The test result failed me on timing. At that stage i got so nervous, that i decided to try another sample test and i was not able to solve it within time limit( I guess sample test need to be solved within 30 min, I can’t remember exact timing). On that night i could not sleep, i felt like i am hopeless and not able to write simple line of code.

Next day i asked my friend to try Codility sample test and he failed as well, well now i was relieved 🙂 . Next day i asked one of top student of my class to try sample test and he failed in timing test as well. I was really scared that i will not get face to face interview with this company.But anyway i decided to try the actual test whose link was emailed to me. Before starting my test i opened my java IDE and clicked link to begin my test.My first question was to reverse a String, i was so happy after looking at that question and finished it quickly. But since i was scared,i started testing my code with different data. My second question was about “Nested Parentheses” where you will write a code to find if parentheses are properly nested on not. If your have brackets like this ” ( ) ” or ” ( ( ) ) ( ) ” then it means that it is properly nested but if you have bracket like this ” ( ( ) ” or ” ) ) ) ( ( ( ” then it means that its not properly nested. And i was supposed to handle String of length 200,000 characters.

It took me rougly 10 minute to plan how i am going to solve the problem and i came with following algorithum.

  1. Remove all spaces from String.
  2. Count the length of String, and find out if its odd or even number. If string is odd number then it is not properly nested.
  3. If String is even number then run a loop and remove all matching ” ( ) ” character from the string.
  4. Now check the length of String, if length is zero then String is properly nested else its not.

Once i figure out the algorithum, i started writing my code. Below is solution of my code.


class Solution
{
    public int nesting ( String S )
    {
        int result = 1;

        if(S.contains(" "))
        {
            S = S.replaceAll(" ","");
        }

        while(S.contains("()"))
        {
            S = S.replaceAll("\\(\\)", "");
        }

        if(S.length() != 0)
        {
            result = 0;
        }

        return result;

    }
}

Tips for sitting down for Codility test

  1. Only attempt test when you are completly free.
  2. Don’t type your code in Codility browser, decide which language you will be using and open your IDE before the test.
  3. IDE helps alot because you don’t have to remember whole API.
  4. Sit down for test where there is no distraction.
  5. Down try to solve the problem as soon as you get the question, think nicely and plan your algorithm on the paper first.
  6. Once you write your program,  test it will lots of invalid data. You can test your program on Codility browser.
  7. Practice sample test before sitting down for actual test.
  8. Don’t use nested for loops or nested branch statements in you solution(try to avoid them).
  9. RELAX.

My Final Thoughts

I prefer to be tested by humans rather than machines because i can explain to humans what i am thinking and how i am going to solve the problem. If i miss one comma in my program then human can understand it but if i miss one comma in program then machine can’t understand it and I may fail because of comma( if you are really scared of comma then learn Ruby language 🙂 ).

But on the positive side Codility can definitely save lots of time for employers  Company can not interview all the candidates who send them resume and I dont believe in resume because no one writes real thing on their resume. Every one says that they are punctual on their resume but on the very first day of their job they are late. In those cases Codilty can help employers to filter few candidates  for face to face interview. If i will ever own a software company then i may use software like Codility to help me with recruitment process or i may ask all my candidates to draw UML diagram for certain problem domain.

BTW i got 190/200 in my actual test.

Hello World

2

I am a Software Development student and i have created this blog to keep record of what I am learning as a programmer/developer. I don’t think that anyone will find any useful information on my blog. I am just going to use this blog to keep track of what i am studying and how i am learning.

So far i have done different programming languages at university such as Java, C#, C++, PHP and many more. I find myself very comfortable with java at this stage. One thing i love about my university is that they force us to learn new languages. If i am doing any unit in C# on semester one than next semester i have to use different language for different unit. At the beginning i was thinking why they are not allowing us to use the languages that we are comfortable with; but later on i realised that they were trying  to teach us how to learn new languages.

During every semester break, i pick up one new language and try to learn on my own. When i was doing Java, i used to think java is best but once i started learning C# i like the way of using properties, and many other things. After learning C# my java became more stronger, more i learned new languages more i started getting better at my previous languages and i became more open minded.

After trying different languages i started to see strength and weakness of different languages and now while writing code for projects, i first decide which language to choose and then work according to that. I know in future i need to specialise in fewer technologies but for now i am going to try to learn as many languages as i can.

English is not my native language so please dont go crazy on me. As i mentioned earlier this blog is just to keep track of what i am learning and how i am learning.

And btw I really love foobar : )