Showing posts with label Tools. Show all posts
Showing posts with label Tools. Show all posts

Wednesday, 22 August 2012

Engine Yard Has Steped forward by adding Node.js support

Hi,


Enine Yard is one of the top most PAAS providers in the Cloud environment. Presently Ruby On Rails and PHP are playing around at Engine Yrad. Now Engine has added Node.js to its Support and This will help startups to build application fastly.

With the addition of Node.js to the Engine Yard Cloud supported frameworks, developers can deploy highly scalable and concurrent systems.

You can start deploying Node.js application into Engine yard and let share your views.

Thank You,
Uma Mahesh.

Wednesday, 15 August 2012

Best SCRUM tools

Hi,

I would like to share few thought on SCRUM tools that are most popular in the Tech world.

Agile methodology plays an important role in the software application development, Its bought a wide difference in the application development strategy.

Here are the few tools I have used till now.

1)  Basecamp  Its a product of 37 signals.

2) JIRA

3) Pivotal Tracker 

Here are few more tools that I have seen.

4) Rally 

Let share your views with the tools you have used, by posting comments to this.

Thank You,
Uma Mahesh.

Tuesday, 3 July 2012

mongodb tutorial

MongoDB is an open source, high-performance, open source NoSQL database.

Compared to relational DBMS, Mongodb is quite different. In MongoDB you store JSON-like documents with dynamic schemas.


Install mongodb depending on the OS you are working on.

Here is the link where you can download them

http://www.mongodb.org/display/DOCS/Quickstart

I have Installed mongodb directly from ubuntu software center.

after installation restart the mongo server

> sudo service mongodb start

You may prompted with "start: Job is already running: mongodb". This means mongo server was already running.

run the below command to connect to mongodb

> mongo

MongoDB shell version: 1.8.2
Tue Jul  3 12:41:59 *** warning: spider monkey build without utf8 support.  consider rebuilding with utf8 support
connecting to: test

In the above case mongodb by default connect to test database.

lets now create your first record as below

> db.test.save({a: 1})

The above command will create record in database. To view the record just run the find statement as below

> db.test.find({a: 1})
{ "_id" : ObjectId("4ff29c16ab6b02ddb38d978a"), "a" : 1 }


create second record by adding another column parameter

> db.test.save({b: 1, name: 'uma mahesh'})

to view the record

> db.test.find({b: 1})
{ "_id" : ObjectId("4ff29c41ab6b02ddb38d978b"), "b" : 1, "name" : "uma mahesh" }


to find all the records that were created, just run the below command

> db.test.find()

{ "_id" : ObjectId("4ff29c16ab6b02ddb38d978a"), "a" : 1 }
{ "_id" : ObjectId("4ff29c41ab6b02ddb38d978b"), "b" : 1, "name" : "uma mahesh" }


To view list of all databases in mongodb, run the below command

> show dbs

Thsi will display list of databases as below

admin    (empty)
local    (empty)
test    0.0625GB




Thank You,
Uma Mahesh.

Sunday, 1 July 2012

remove trailing whitespace before git commit

Hi,

Trailing whitespace always makes noises in version control system. We should remove trailing whitespace to avoid annoying other team members.

While working with remote developers we should follow some coding standarts and should form a habit to remove trailing whitespace before committing.


We can do it by git pre commit hook or deleting trailing whitespace by our own.

I hope all the IDE will support the code re-factoring. I am using rubymine and I used to refactotr code as below.

In rubymine

> On the main menu, choose Code | Reformat Code, or press Ctrl+Alt+L.

> In the Reformat Code dialogue box, specify the reformatting scope:
The current file.
Selected text.
All files in the current directory, including or omitting subdirectories.

> Click Run.


Thank You,
Uma Mahesh.

Sunday, 10 June 2012

Integrating mailchimp in ruby on rails application

Hi,


MailChimp provides Free email marketing service. You can simply design your email template with nice tools provided by mailchimp and can easily send to list of members that were maintained in the mailchimp list directory.

MailChimp provides many features, For now I am just concentrating on the creating user record in the MailChimp List.

Inorder to Implement mailChimp in ruby on rails application, we have nice gem hominid(https://github.com/terra-firma/hominid). Hominid provides required methods to connect to MailChimp api.



Lets start by creating an account in mailchimp by registering as a free user. Once you logged in to MailChimp You can get the required api access details from the 'API Keys & Authorized Apps' section under the 'Account' tab. You can get api key from that section.


--------------------------

Add the gem to your gem file.
> gem "hominid"

---------------------------
Configure the mailchimp credentails(api) details in yml file under config/mail_chimp.yml

common: &default_settings
  api_key: "asfgtc4a6cd9917tyuhb752867c23eb5-er5"
  subscriber_list: "g67b678706"

development:
  <<: *default_settings
test:
  <<: *default_settings
demo:
  <<: *default_settings
staging:
  <<: *default_settings

production:
  api_key: "xxxxxxxxxxxxxxxxxxxxxxx"
  subscriber_list: "xxxxxxxxxx"

------------------------------

Load the configuratiosn in initializer file in config/initializers/mail_chimp.rb

MAIL_CHIMP = YAML.load_file("#{Rails.root}/config/mail_chimp.yml")


--------------------------------

Craete a class with Mailchimp under model folder models/mail_chimp.rb

class MailChimp
  include Hominid

  def self.add_user(user)
    h = Hominid::API.new(MAIL_CHIMP[Rails.env]['api_key'])
    h.list_subscribe(MAIL_CHIMP[Rails.env]['subscriber_list'], user.email, {'FNAME' => user.first_name, 'LNAME' => user.last_name}, 'html', false, true, true, false)
  end

  def self.unsubscribe_user(user)
    h = Hominid::API.new(MAIL_CHIMP[Rails.env]['api_key'])
    h.list_unsubscribe(MAIL_CHIMP[Rails.env]['subscriber_list'], user.email)
  end

end

------------------------------
You need to call the above methods in your user class after creating the user by using call back 'after_create' in models/user.rb

 after_create :create_user_record_in_mailchimp

def create_user_record_in_mailchimp
MailChimp.add_user(self)
end

----------------------------------

The above explanation helps you to create user record in mailchimp list while user creates in the rails application.


Thank You,
Uma Mahesh.

Friday, 1 June 2012

couldn't parse YAML at line (Psych::SyntaxError)

I have used YML file for configuring globally few things for the application.

I have alligned the yml file with correct structure and correct indentation. Stil it trows the following error

  couldn't parse YAML at line (Psych::SyntaxError)

There is a tool YAML Lint http://www.yamllint.com/ helped me to check the yml allignment that I have coded was correct or wrong

Just copy and past your code in that site and click go It will Display the error line if you have any error's.

Thank You,
Uma Mahesh.

Wednesday, 30 May 2012

Sunday, 27 May 2012

Rubymine usage and tips

Hi,

Here are few steps which can help you on using the rubymine.

Ctrl+Shift+Backspace (Navigate | Last Edit Location) brings you back to the last place where you made changes in the code.
Pressing Ctrl+Shift+Backspace a few times moves you deeper into your changes history.


Use Ctrl+Shift+F7 (Edit | Find | Highlight Usages in File) to quickly highlight usages of some variable in the current file.
Use F3 and Shift+F3 keys to navigate through highlighted usages.
Press Escape to remove the highlighting.


To see your local history of changes in a file, invoke Local History | Show History in the popup menu. You may navigate through different file versions, see the differences and rollback to any previous version.
Use the same popup menu item to see the history of changes on a directory. You will never lose any code with this feature!


Ctrl+E (View | Recent Files) brings a popup list of the recently visited files. Choose the desired file and press Enter to open it.
Besides recent files, you can easily bring up the results of the usage searches that you have performed recently. To do that, use the same Ctrl+E shortcut with the Find tool window having the focus, and select the desired find usages result from the Recent Find Usages popup.


Use Alt+Up and Alt+Down keys to quickly move between methods in the editor.

Use the Ctrl+Shift+V shortcut to choose and insert recent clipboard contents into the text.


The shortcuts such as Ctrl+Q (View | Quick Documentation), Ctrl+P (View | Parameter Info), Ctrl+B (Navigate | Declaration) and others can be used not only in the editor but in the code completion popup list as we

To open any particular method or field in the editor quickly, press Ctrl+Alt+Shift+N (Navigate | Symbol) and start typing its name.
Choose the symbol from a drop-down list that appears.

Use Alt+Shift+C to quickly review your recent changes to the project.


With a single keystroke, you can apply another code style/coloring scheme or keymap right from the editor. Just press Ctrl+Back Quote (View | Quick Switch Scheme), to specify the scheme you want to change.


Thank You,
Uma Mahesh

Friday, 25 May 2012

Best file comparision utility or tool

Hi,

In the application/project development we may have situation where we need to compare the two similar files to know what changes have been made in them.

I have used recently one of the best tool to compare files and folders and which made easy for me while integrating the code while working with multiple developers on same project.

Here is the tool:  Beyond Compare

Its a tool where we can compare two files or folders with the same and name and it shows the difference of code/text by comparing them. We can also push the newly added code from one file to another with same just by single click.

You can download the software form here.

Download Beyond Compare


Thank You,
Uma Mahesh.