Lorem Ipsum

Lorem Ipsum is a useful website in the world of Web Development.

At the time of web development we might need some dummy text to fill the space. Later we will remove that with the actual data.

Dummy data might be of different types like multiple paragraphs, words, lists etc. Lorem Ipsum is a website which have or generates the dummy data for your need.

It generate dummy data for different languages also.

Read More...

Pomodoro Technique

In my company we started following pomodoro technique last week.

We are using pomodoro technique in pair programming. We switch the role(Navigator, Driver) between pair using this technique. We are using the timer-applet as the pomodoro device, which we set to 25 minutes. After the 25 minute the pair will discuss about the task and next steps to taken care off in the next 5 minutes. Then switch their roles and again start the timer.

This helps to time-box each task. And helps to analyse the task is going in the right direction. And discussing about the task in each 25 minutes make the task more clear.

Read More...

Threading in Python

Recently I implemented threading in my flamesgame app. The steps I took to implement threading are:

First I import the threading library:

import threading

Then I created a class for the thread:

class PostToFacebook(threading.Thread):
     def __init__(self, message):
          self.message = message
          threading.Thread.__init__(self)

     def run(self):
          facebook.post(token, self.message)

Here PostToFacebook is the class which I used for the Threading. And the code to create the thread is:

PostToFacebook("message to facebook").start()

This will invoke the __init__() method, where it set the message value and invoke the run() method which post message to the facebook.

Read More...

unittest - Unit Testing framework for Python

My google appengine application flamesgame is improving with more features. So I thought I have to write tests for the code, to make it maintainable and feel free to modify or refactor the code. In python 'unittest' the Unit Testing framework is available with the Python. All you need to do is import the unittest library:


You can save it as test.py. To run the test just type the command:

python test.py

This is a simple test, for more test cases or complicated scenarios you can check unittest.

The tests for the flamesgame app is available at GitHub.

Read More...

Test Driven Development

TDD is a software development process, where the programmer first write the automated tests for the feature and makes it fail (RED) then write the code for the feature and makes it pass (GREEN) then re-factor the code.
There are many tests frameworks are available. NUnit for .NET, JUnit for Java, RSpec for Ruby on Rails, unittest for Python, etc.

TDD makes the code more maintainable. The other person who is going to work on the code won't feel any fear to touch the code because if anything went wrong the tests will fail and he can find it quickly. TDD makes the programmer more focused. At a time he write code only to fix the the test fails.

There are two approaches in TDD: Outside-In approach and Inside-Out approach.

Outside-In approach is, first we write tests for the high level acceptance of the feature. To support this test there might be some tests which are very low level. So we write tests from High level to low level, and fix the failing tests from low level to high level. Once the High level test is passed you are done with the entire tests for that feature.

In Inside-Out approach we write test for the low level task of the feature. After writing tests for all the low level tasks and makes it pass, we will write tests for the high level or acceptance scenario.

To get more details on TDD in Extreme Programming Visit TDD - Extreme Programming

Read More...