Category Archives: Tutorials

Four Simple Ways to Network with Other Bloggers

Four Simple Ways to Network with Other Bloggers

Networking with other bloggers is very important if you want to blog to succeed. Other bloggers can not only provide you with valuable back links, but also necessary exposure to make your name in the niche. Most famous bloggers network with other bloggers. You cannot expect to succeed in the field of blogging all by yourself.

Just writing high-quality content is not sufficient if you want to succeed in blogging. While it is true that high-quality content gets ranked well in search engines, it is also true that it takes time before it is discovered by other webmasters and bloggers and linked organically. Thus it is essential to actively promote your articles/blog posts and try to create back links from high quality websites and blogs.

There are many techniques to create back links. For example, you can use directory submissions, article marketing, direct link exchanges and various other similar techniques. These techniques work well provided you use them properly and don’t do them excessively. However, nothing comes close to networking with other bloggers for promoting your blog posts. This blog post, I will explain about four simple techniques that can help you in networking with other bloggers more efficiently.

Comments

Commenting on other blog posts is an effective way to network with other bloggers. It is quite simple and is a no-brainer. All you to do is find interesting blog posts and post relevant comments about the articles. However, it is important that the comments you post be relevant and not excessively critical. Use your real name while commenting as it will add to your credibility. Many people use targeted keywords as the username. This practice better be avoided.

image

Blogging about other blog posts

If you find an interesting blog post, you can write your opinion about it on your blog. Most blogging platforms leave a ping back when you link to particular blog posts, so the blogger will know that you have written something about his/her blog post. Ensure that you write a genuine article and again don’t be excessively critical. Don’t get into blogging wars!

Blogging and Webmaster forums

Many bloggers and Webmasters often visit blogging and Webmaster forums such as Digital Point. By joining such forums, you can directly interact and network with fellow bloggers and webmasters. There are also many other advantages of joining such forums. Try to find three or four good forums and actively participate in the discussions. It will be quite helpful in the long run.

Guest blogging

Guest blogging is a very good technique for building back links and your reputation in the niche. It is quite simple in principle. All you have to do is write high-quality articles sent request other bloggers to post them. And normally most bloggers will accept guest posts because it is quite advantageous for them as well. If you ask me, I would say that guest blogging is the best technique for building back links and your reputation in the blogosphere.


How To: Create Email Templates in Gmail

Gmail is one of the most popular email services available today. Almost everyone I know uses Gmail for all their email needs. There are other email providers such as Hotmail and Yahoo but many people have moved from these services to Gmail because of the good features it offers.

The main advantage of using Gmail is that you can access all other services offered by Google with one login. If you are a webmaster or a blogger, a Gmail account is a definite must have. It will not only improve your email productivity but also help you in promoting your website/blog by using the various webmaster tools provided by Google.

Gmail comes with many features that will save your time and improve your productivity. One of the best features of Gmail is the canned response feature. This allows you to create email templates so that you don’t have to type the same emails again and again.

What is Gmail canned response?

Sometimes you get similar emails asking the same questions. For example, I get around 3 to 4 guest post requests everyday. You can’t type the same email again and again and answer each email individually. Of course, you can create a ‘master’ email and save the text somewhere on the hard disk and copy and paste it into your emails. However, this is not very convenient. Gmail canned responses allow you to create email templates so that you can automatically respond to emails without having to type them manually. This feature is good for improving your email productivity because it will save you plenty of time.

Image

How to create email templates in Gmail?

If is very easy to create predefined email templates in Gmail. First, login to your Gmail account and compose an email. After you typed the email, click on “Canned Responses” and choose “New Canned Response”. Enter an appropriate meaningful name so that you can identify it later.

To use a Gmail template, click on Canned Response -> Insert -> Select the template which you created. The text in the template will automatically get inserted into the body of the email. All you have to do next is make any changes that may be needed and send the email.

It it a good idea to include your signature into the template. This is a good way to promote your blogs/websites, affiliate products and other services that you offer.


Learn how to program in Ruby on Rails – Getting started

Guest post by Sherri Jones

Ruby is a dynamic, open source programming language with primary focus on simplicity and productivity. What makes Ruby stand out is its elegant syntax that is easy to read and quick to write. Before we start learning Ruby on Rails, it’s important to know what it is about.

Let’s start with the fundamental principles of ruby on rails.

Convention over Configuration (CoC)

CoC translates to “follow these naming conventions and the framework will just figure out what to do by itself.” The “CoC” model promises better productivity by removing much of the repetitive explicit configuration and mapping and allowing developer to specify only unconventional aspects of the application. For example, if there is a class User in the model, by default table name will be users. Consequently, Ruby on Rails conventions lead to less code and less repetition.

Don’t repeat yourself (DRY)

“Don’t repeat yourself” principle is aimed at repeating code as little as possible, making it easier to make changes later on in the development cycle. If the code exists in only one place, it only needs to be changed in one place. Rails provide several facilities, including helpers and libraries, that help in implementing DRY code. DRY code has the information located in a single, noticeable place. For example, using the ActiveRecord module of Rails, we don’t need to specify database columns in class definition. Instead, Ruby on Rails can fetch the table details from the database using the Class name.

RESTful Architechture:

REST-style architectures consist of clients and servers. Clients initiate requests to servers; servers process requests and return appropriate responses.

MVC Architechture:

M – Models, which contain Business logic (like fetching, adding or updating database records)
V – Views, which contains the response to be shown to user
C – Controllers, which contains actions to receive requests and their parameters ,process them (through model methods) and send responses to users (through views)

It clearly differentiates the Business logic, views and request processing and helps to make the code DRY. Hence it makes maintenance easier.

Starting web development with Ruby on Rails

Now that you are familiar with the principles and understand that Rails is an MVC framework, let’s learn how to program in Ruby on Rails. Below is a basic walk through on getting started .We will be using Rails3. Assuming that you have everything installed (If not, you can refer http://rubyonrails.org/download), create your first rails application with following instructions on your command prompt.

rails new my_app

What did it just do? It created the basic app for you, along with a complete basic directory structure, as shown above. In the created Basic Directory, app folder is for assets, models, controllers and views, config folder to have all types of configurations, db folder for database details and log folder to contain all types of logs.

Let’s walk through each of the folders that were created in detail:

1. app
This will contain the model, view, controller, helpers, mailers of the application. (in Rails 3.0.x) . In Rails 3.1.x though it will have an additional folder named assets where your css, images and js will live.

2. config
The config contains configuration settings of your application. Below are some of the most important files that you will need to play with often:

routes.rb: Define the resources of your application and how would the incoming request map to your controllers here.
environment.rb: This is a where it all begins and the first file that is loaded by the rack server.
database:yml: Configure your database here. One for each environment
application.rb: Any pre initialize code before your Rails application is loaded goes here.
config/environments: Folder environments will contain environment specific configuration file that you will need to manage each environment separately. You can certainly define more environments as needed.

Initializes folder contains files that will be loaded just after your rails application is loaded with its gems and plug-in.

3. db
db/migrate: As you build your application and add new models or modify existing ones, you can add a migration that will run against your database. All your migrations live in this folder.
db/schema.rb: The schema will have the structure details of the models used in the application.

4. doc: Ruby doc is a ruby framework for creating documentation for your code. You assist ruby doc with commenting in your code and it will auto generate documentation for your code in this folder

5. log: It contains all the log files like development.log, production.log, test.log and server.log. we can write other log files as well in this folder

6. public: The public will have all the static files which will not change like “index.html, images, style sheets, java scripts” used in our application. (up to rails 3.0.x)

The public will have all the static files which will not change like “index.html” used in our application. (From rails 3.1.x)

7. script: Script folders hold files to launch and manage various tools that you will use with your rails application. For instance, you could have a script to generate code and launch the web server.

8. test: Rails foster test driven development. Test folder contains all your fixtures and different test cases like unit, functional, integration and performance tests.

9. tmp: The tmp will contain the temporary files which will be used by our application like “sessions, sockets, cache, pids”.

10. vendor: The vendor will contain the libraries provided by the third party vendors like “plugins” used to add functionalities to your application.

11. README: The README file will contain all the description of the directory structure and the details about rails application

12. Rakefile: Rake is similar to make in UNIX world. You can configure your important tasks here.

13. config.ru: The config.ru file is used by Rack-based servers to start the rails application.

14. Gemfile: All the gems that your rails application uses are listed in the Gemfile.

Terminal Commands to Remember:

cd my_app -> Enter into the generated rails3 app
gem install bundler -> If bundler gem is not installed
bundle check -> To check all the required gems installed or not
bundle install -> To install all the required gems

Generate required set of files for your model / controller / complete set including model and controller, by just running any of the below commands

rails g model user – > It will generate model and required migration using above command
rails g controller users – > It will generate controller and views folder using above command
rails g scaffold user – > It will generate model, migrations, controller with basic CRUD actions and their views using scaffold command
rake db:migrate – > To run migrations which were not run
rails s – > To run server on default port: 3000
rails s -p 3021 -> To run server on port: 3021
rails c -> To RUN CONSOLE

Editing Files:

For editing rails files, following Editors or IDEs can be used.
Free editors – Vim, Sublime, Redcar, Gedit(gmate plugins)
Paid editors – Textmate
Paid IDE – RubyMine
Free IDE – Netbeans

Embedding Rails code into HTML:

As we know, static HTML files end with .html extension, Embedded ruby files ends with .html.erb extension in Rails. We can maintain our views as dynamic by using these Embedded ruby(erb) files. From here onwards we mention these Embedded ruby files as erb files.

In erb Files, if something is

written in <% %> –> will be executed as ruby and will not return anything
written in <%= %> –> will be executed as ruby and will return string
Ex: To show 5 numbers each in a new line, in plain html, we need to write as below

<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>

Using Embedded ruby, we can show the same as below

<ul>
<% 1.upto 5 do|n| %>
<li><%= n %></li>
<% end %>
</ul>

We can add / update appropriate views in app/views to change the content we see in response to the requests.

Author Bio:

Sherri Jones is a Web-Developer and Ruby Programmer. She is looking for interesting projects particularly on ruby on rails. For more details visit at idyllic-software.com.