Wednesday, September 30, 2009

Using Social Networks for Branding and Increased Traffic

Social networking is a unique tool that is bringing people together for social and business interaction.  Networking sites have also become a valuable SEO tool as it offers a variety of portals for you to advertise your company, what it can offer and gain valuable search engine credibility by staying trustworthy and maintaining a legitimate public profile.  

Networking sites are a free and effective way to drive traffic to your website.  By creating profiles on various networking sites you are able to put your business out there to be seen my millions and potentially send new business your way.  

When people browse the networking sites they do it in very similar ways as they do on Google or Yahoo.  They type in specific keywords to find what they’re looking for.  Implementing basic SEO strategies when putting your profile on these sites is a valuable tool for people and search engines to be able to find you.

When getting involved with social networking sites it is important to not only put your information on there but to be involved with what the site offers.  A lot of these sites are blog sites where you can get involved in discussions pertaining to your business.  The more you are involved and the more blogs you post the better chance you have of the search engines picking it up and increasing your positions in the rankings.

Be very wary of spamming.  Posting keyword stuffed blogs and irrelevant articles all over the place will cause the search engines to devalue your content and drop it from valuable ranking spots.  Make sure you post content that is valuable and important to your reader.  This should not be a hard thing to do if you are running an honest business and have a genuine belief in the goods or service you are providing.  

Keep your friends close and your enemies closer.  Well, hopefully you don’t have too many enemies but when participating in social networking sites it’s important to maintain a positive image as “bad press” goes a long way.  If you are encouraging inappropriate activity or being a general nuisance on these networking sites it’s very easy to build up a lot of negative comments.  These bad remarks will not only tarnish your companies name and good standing but the search engines are very aware when negative comments are out there and if in abundance they will rank very high when people do searches around your important keywords or company name.  

By being actively involved in these networking sites not only promotes your business and helps with search engine rankings but allows you to interact with others in the same industry and can be a great tool for gathering information when doing research.  Honesty and integrity will go a long way in keeping your site at the top of the searches and keep you in good standing with the most important client of all….your customer.

Posted via web from sdn's posterous

How To: Hack WordPress Theme Template Pages

The key to being able to display exactly what you want in Wordpress is understanding Wordpress theme template pages. These are the theme files that display pages, not the ones that perform functions like comments, sidebar, etc. Most of us don’t use the Wordpress default theme that comes with installation, and end up downloading a free theme from the Internet. This is a great way to customize your blog, but not all theme authors code their theme the same way. The capabilities of that theme largely depend on how much time the web designer took to code it, in addition to their knowledge of Wordpress itself.

I’m going to explain everything you need to know to be able to customize all your theme pages any way you want, and this will give you enough information to begin coding your own theme as well. Even if you’re an ‘expert’ theme coder, you should learn something new from this article.

How Wordpress Works

The most important thing you could learn about Wordpress is the Template Hierarchy, or – “the order in which Wordpress calls pages”. The ONLY file that is required in the PHP files of any Wordpress theme is the “index.php”. That’s it! That one file could handle every single function Wordpress performs (if you wanted it to). Or, you could have a Wordpress theme that had a PHP theme for for every single WP function (or anything in between).

The Order of Things

Every time a Wordpress page is called the WP ‘engine’, if you will, determines (through process of elimination) what kind of page it is. It’s kind of like a “where am I?” function. Wordpress says “what page am I…” and in turn tries to call pages in a specific order. If WP doesn’t find the PHP file it needs it just defaults to the “index.php” file and uses it instead. There are 9 basic kinds of pages Wordpress looks for first:

Am I the Home Page?
If WP thinks it’s on the home page it will look for “home.php” first, and “index.php” second.

Am I Post Page?
(Single) post pages look for “single.php” first, and then default to “index.php”.

Am I a ‘Paged’ Page?
(Static) or ‘paged’ pages in Wordpress look for a “pagetemplate.php” first (if assigned when published), “page.php” second, and default to “index.php” last.

Am I a Category Page?
When Wordpress determines it’s on a category page first it looks like a category specific ID page, such as “category-7.php”. If it doesn’t find that it next looks for a “category.php” (which would be used on every category page). If that’s not there is searches for “archive.php”, and last it defaults to “index.php”.

Am I a Tag Page?
If Wordpress is on a tag page it tries to load “tag-slug.php” first, with ’slug’ being the name of your tag. If your tag is ‘wordpress hacks’ the tag slug page would be “tag-wordpress-hacks.php”. It that’s not available, WP next looks for “tag.php” which would load for all tag pages, then “archive.php”, and if that’s not there last it defaults to “index.php”.

Am I an Author Page?
If your blog has multiple authors, first it looks for “author.php” to display the details. If that’s not there, it tries to load “archive.php”, and last it defaults to “index.php”.

Am I an Archive Page?
Archive pages are loaded when Wordpress loads a date based page for previous posts. First it tries to load “date.php”, then “archive.php”, and last it defaults to “index.php”.

Am I a Search or 404 Page?
If WP determines it’s on a search (results) or 404 (not found) page the it tries to load either search.php or 404.php. If not, the default is once again “index.php”.

Am I an Attachment?
Out of all the Wordpress theme template pages, the attachment page is probably the one used least, and I have to admit – I’ve not seen a single one of these in any of the hundreds of themes I’ve downloaded. Wordpress uses these special pages usually for uploaded content, which would explain why it first looks for “image.php”, “audio.php”, “video.php”, or “application.php”. Then it tries to find “attachment.php” or “single.php”, and if none of those are available it also defaults to “index.php”.

Inner Workings of WP Theme Templates

As I said before, you could use a single index.php file to handle the 9 types of pages. You would simply code in some conditional tags, like I showed you in the last tutorial I wrote here on WP Hacks. A single index.php would then just contain code to say if is_home, do this, if is_single do that, etc. That’s a lot of code for just one page, and a bit unorganized – and it doesn’t leave a lot of room for customization.

Coincidentally, like Wordpress searches for 9 basic pages – each theme template page also contains 9 basic Wordpress elements:

  1. a header call
  2. opening of ‘the loop’
  3. a call to get the permalink and (some) meta
  4. a call telling Wordpress what to get
  5. a call to get either the content or an excerpt
  6. (maybe) more meta
  7. closing of ‘the loop’
  8. a sidebar call
  9. a footer call

Those are only the Wordpress elements, of course the PHP code to make them work is usually scattered throughout the appropriate HTML code make your theme’s layout and graphic design work properly. I’m going to explain these elements a bit more so you can understand how you can customize (or create) nearly any theme template page.

Header, Sidebar, and Footer calls

I’m going to handle all 3 of these elements at once, since they are all basically the same. When you see this code in a template:

<?php get_header(); ?>

Wordpress is simply opening the “header.php” file. The same is true for get_sidebar (sidebar.php) and get_footer (footer.php). You could have multiple headers, footers, or sidebars, see the earlier link above for conditional tags.

Opening of “the loop”

The infamous “Wordpress Loop” is when a call goes out to the database to do something until Wordpress says “stop”, i.e. ‘get me the most recent full text posts in their entirety’. The structure of ‘the loop’ changes depending on what kind of page your displaying, and each of the 9 basic types of pages Wordpress tries to load has a ‘loop’.

The opening of the loop generally looks like this:

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

You may see it broken down with have_posts on one line to define conditional tags with the while and the_post on another, but it’s still the opening of the loop, and it’s pretty much the same in all pages. One way to use the multi-line loop opending is to place a parameter between “if have_posts” and the rest by using query_posts in between to show only a single post, posts from a time period, the last post only, posts from certain categories, or even change the ordering of posts being iterated in the loop.

A Call to Get the Permalink and (some) meta
The very last section of the loop opening (the_post) actually makes individual data available through each iteration of the loop. This data referred to usually as “post meta” because it’s descriptors and identifiers for the individual content being looped through. Typically things like the permalink (URL), title, date, etc. I say ’some’ meta, because most themes show some things before the individual post content, and then some after – such as categories and tags.

Here’s a short list of things you can call in post meta: the_permalink, the_ID, the_title, the_time, the_author, the_author_email, the_author_posts_link, the_category, single_cat_title, the_tags, single_tag_titls, edit_post_link, comments_popup_link, comments_rss_link

Example code you might see for post meta would be something like this:

<div class="post" id="post-<?php the_ID(); ?>">

A Call Telling WP What to Get
Next Wordpress will decide how much of the actual individual post content to get for you. How much is gathered from the database depends on whether your look uses “the_content” (to get it all) or “the_excerpt” (to get part of it).

(Maybe) more meta
As I previously mentioned, the common things to see after a post are assigned categories or tags, and sometimes you see an “edit” link here as well. Some themes even put date published meta after the post content.

Closing of ‘the loop’

The code looks like this:

<?php else : ?>
<?php endif; ?>

Typically it’s on more than one line in case you want to build an option in, such as a message “Sorry, we didn’t find anything”. After the sidebar, before the sidebar and footer calls, is where you typically find the “next” and “previous” navigation links.

Bastardized Loops?

Well, just because most loops look like the examples I just gave you, doesn’t mean you can’t bastardize them in just about any way you can imagine. I recommend you read the WP Codex page The Loop in Action for examples of archive, category, and single post formats – as well as static home page.

The Codex official page for the loop has several examples of how to place multiple loops in one page.

Perishable Press has a great tutorial for multiple loops, multiple columns – if you want to try and split your content up. They also have some great loop templates, in addition to a great tutorial of horizontally sequenced posts in two columns.


Armed with just a tiny bit of knowledge, you can hack just about any Wordpress theme template page to do just about whatever you want! Now that you understand (in great detail) how Wordpress calls it’s pages and how the loop works, you can conquer any task! Have fun customizing your blog’s theme!

Posted via web from sdn's posterous

The Selling Of Google AdWords

Throughout 2005, the year after the company went public on NASDAQ, Google commissioned multiple research agencies to run analysis on the importance of Internet search and search advertising in purchasing decisions across a variety of verticals. While part of this research – which the company probably still orders considering how important the business continues to be for Google’s bottom line – eventually finds its way to the Google AdWords product page, it’s interesting to gain some insight into what kind of studies the search giant commissioned and which conclusions the research agencies pulled from the data gathered from direct consumer surveys and other means.

Below are some screenshots from internal documents used by Google to gauge the importance of keyword search in purchasing decisions for industries like B2B technology, logistics, travel, healthcare, entertainment and more which we got our hands on. Bare in mind that this data is relatively old, with some of the research going back as far as March 2005. Nevertheless, it’s a fascinating look at how Google looks at its own core business and how it apparently uses the information weeded out by research agencies to better market AdWords and related services to the verticals cited above.

Below is a screenshot of a graph used in an internal Google presentation, showing survey data collected by Global Market Insite and Media Screen. The research agencies had conducted 300 web-based interviews with consumers that use the Web to research and/or purchase telecom services. In this case, they demonstrated that portals and retail shopping sites were rarely visited first by the surveyed persons when going online to research telecommunication services. 64% went to a search engine first, double the amount of people who answered that they’d visit the website of a telecom service provider before anything else.

The second chart lifted from the docs reveals the agencies also found that more than 70% of all survey respondents preferred Google for their product searching needs over other engines.

For the Beauty vertical, the survey also yielded some insightful data on which other influential information sources respondents indicated as important to them when purchasing beauty products on the Web. Topping the list were Print (49%) and TV (46%), closely followed by search engines searches and POS displays in stores (both 43%). Sponsored links in search results was surprisingly low in the list, with 12% of respondents saying it’s an important resource for them when buying skin care products, fragrances etc.

Google also researched why people use search engines, in this case with regards to people who browse the Web in search for health-related information. The results are likely similar for most major search engines, but what I found noteworthy – considering the topic of health – is that these persons definitely don’t use search engines primarily because they consider them to be trustworthy or sources for objective information.

Here are some embeds of full documents, namely research conducted on the B2B tech, entertainment and travel verticals.

Posted via web from sdn's posterous

10+ extremely useful PHP classes


PHP PSD Reader

A few weeks ago, I wrote an article about this PHP which allow you to display any Adobe PSD file on screen. Very usefull to create preview of PSDs designed for clients, for example.

Browser detect

One of the most common (and boring) problem for front-end developers is definitely cross-browser compatibility. This PHP class will detect almost all browsers and simplify your cross-browser work.


Remember those days without spam? If your website gets spammed in any ways, Akismet can probably help you. When a new comment, trackback, or pingback comes to your site it is submitted to the Akismet web service which runs hundreds of tests on the comment and returns a thumbs up or thumbs down.


The large majority of websites and web apps are using databases to store all kinds of data. ADOdb is a database abstraction library for PHP, supporting MySQL, PostgreSQL, Interbase, Firebird, Oracle, MS SQL and more. ADOdb is quite easy to learn and have lots of nice features as such as extensive portability support, speed and BSD licencing.

HTML Purifier

As it name tells, HTML Purifier is a PHP class created to help you writing a better code. HTML Purifier can remove malicious code and make sure your code is standard-compliant. A great tool for all developers.

Google charts API

Charts are very useful and highly asked by clients, but they can be a lot of work. I remember some years ago when a friend of mine had to create charts using Photoshop every week for one of his clients. Well, this time is gone for good.
With the Google charts API, a simple chart can be created and displayed on screen using as little as 4 lines of code.


pChart is another chart class, and it is as good as Google charts API. Data can be easily retrieved from SQL queries, CSV files, or manually provided.

PHP Excel

Excel documents are highly popular in the corporate world. Considering that fact, there's a strong chance that one of your clients asks for you to create excel files in PHP someday.
Happilly, the PHP Excel engine allow you to easily create and manipulate lots of different files, as such as Excel 2007, Open XML, or PDF.

Country from IP

Some websites are able to detect your location and automatically display information related with your language. How do they do that? Quite simple, they use your IP adress to find your location. The Country from IP class is easy to use and will allow you to get the country a specific IP is from.

Cache Manager

If you're working on a high traffic site, there's not doubt you'll need to cache files in order to improve performance. This will be very easy an simple to do, using this very handy class. A defifinitive must-have, in my opinion.


As I know many of you have a WordPress blog, I just can't finish this article without a great tool for our favorite blogging engine.
WPGet is a PHP class which allow you to easily get infos from a WordPress 2.X database. In other words, it allows you to get posts, comments, etc from a WordPress blog, on a non-WordPress site. Great, isn't it?

Posted via web from sdn's posterous

Tuesday, September 29, 2009

Safety in the Cloud(s): 'Vaporizing' the Web Application Firewall to Secure Cloud Computing

Cloud computing was not designed for security, although organizations such as Cloud Security Alliance (CSA) and Open Web Application Security Project (OWASP) are making great strides in helping the industry solve the myriad security problems confronting cloud computing. The benchmark guidelines established by the CSA in the document, Guidance for Critical Areas of Focus in Cloud Computing, are a great first step. This article is intended to pick up where the CSA guide left off in terms of defining what a distributed Web application firewall (dWAF) should look like in order to meet the standards set within the CSA document.



Alex Meisel is the CTO of Art of Defence GmbH, member of OWASP and Cloud Security Alliance. Alex’s core focus is Web application security.


In order to accurately outline how a dWAF is possible while maintaining all the benefits of a completely virtualized environment – reduced IT overhead, flexible footprint management, virtually unlimited scalability – a brief overview of cloud technology is needed. Far more than simply maximizing current hardware resources to benefit from unused CPU power, today there are three main technologies available in a cloud that provide the backbone for real productivity gains and compelling business services for companies that don’t want to invest in the hardware scaling burdens common today.


Software as a service (SaaS) offers users virtualized software through a thin client, usually any standard Web browser. The benefit for users is access to software without any of the headaches of owning the programs – scaling and resources are taking care of, and patching and upgrades are managed.


Platform as a service (PaaS) provides users with virtual databases, storage and programming languages with which custom applications can be built. This service provides nearly unlimited resources behind the platform and allows customers to scale throughout the lifetime of the application. It is an effective solution for companies ranging from the very small to those serving millions of customers. The customer does not worry about the infrastructure needed to run the services and is billed in per usage model.


Infrastructure as a service (IaaS) allows users access to virtually unlimited resources to build and manage their own virtual network. Customers can commission and decommission virtual resources depending on their need. The most obvious benefit is that there is no end-of-life for hardware anymore for the customers. The providers move them according to their service level from hardware to hardware without any downtime.


The common user benefit of services available through a cloud is access to key resources via the Internet, which provides an incredible degree of scaling without the need to invest in expensive hardware infrastructure.


Cloud Applications Are Highly Exposed to Threats


Accessing cloud technologies requires a thin client, and the world’s most commonly used thin client for this purpose is a Web browser. This means the vast majority of all applications on the Internet have some kind of Web and/or application server on which the business logic is implemented. Currently, most of the money spent on security goes into firewalls and antivirus solutions, but in the last 10 years the typical target for attacks has shifted from the network layer to the application layer because the operating systems and services available to the general public were cut down. As a result, it is now easier to target the application logic or framework of an application than the actual server behind the hardened network perimeter. Applications are mostly developed by the businesses themselves and not every developer considers security the highest priority, which leads to a wide variety of problems.


The IBM X-Force® 2008 Annual Report highlights that Web application vulnerabilities are the Achilles’ heel for corporate IT security. The impact of not being able to secure these vulnerabilities is far reaching.







Further, attack vectors increase exponentially in correlation with the mainstream adoption of cloud computing. Their increase is dictated by hosting and delivering infrastructure, platform and software. Establishing a comprehensive patch management system is the common solution offered by most in the industry, however, in practice this approach has proved very difficult and costly. Typical Web applications are built on open source components, by third parties, who rely on Web frameworks. This approach has the obvious benefits of interoperability and shortened development time, however, patching becomes exponentially more difficult. A flaw in one piece of open source code must be patched for each instance it is used throughout each application in which it is used. In a cloud setting, this becomes a very large issue.

 Applications developed specifically for a cloud are often very complex, designed for access speed, scalability and flexibility for third-party development through an open API. For example,, Google Docs, MySpace, Facebook and Twitter, are all prime examples. These ‘as a Service’ applications are developed two ways today: by moving on-premise applications to a cloud, and by developing and operating applications directly in a cloud.

Applications that are forced out of the internal company network and into a cloud carry the risks of exposing protected software to Web threats it was not designed to combat. Common security threats include injection attacks, cross site scripting or cross site request forgery.


There are a variety of services available for developing in a cloud, such as MS Azure Services, Google App Engine or Amazon EC2. There are many security challenges involved in developing Web applications in a cloud. For example, parameter validation, session management and access control are 'hotspots' for attackers. Developers not trained in those three fields of application development will most definitely create/develop applications that have security problems.




Why a Traditional Web Application Firewall Will Not Work


In a cloud, the infrastructure and the services are shared between customers, meaning one set of hardware is used by many business, organizations and even individuals. Each of these cloud operator customers adds a unique layer of policy settings, use cases and administrative enforcement requirements. For the cloud or service provider, security quickly becomes very complex. The average provider may have 10,000 customers subscribing to its service, each with varied policy settings for individual divisions within the company. The service provider now has to manage an nth degree of application filter settings.


Currently, Web application firewalls (WAF) and other security solutions are restricted to hardware appliances, which creates a serious bottleneck for cloud service providers. Dedicated hardware boxes simply don't allow for reasonably scalable levels of multiple administrators’ duties within a box’s singular security policy mechanism. Ironically, in addition to the traditional network hardware, cloud service providers are forced to have a rack full of dedicated WAF machines – one per customer – that take up space and eat up resources. Security becomes counter to the efficiency promises of a fully virtualized environment. This cost is passed on to customers, increasing adoption barriers to mainstream cloud computing.


In an ideal world, applications would be designed from the ground up to meet the rigors of a virtualized world, integrating security measures directly into the applications and thus solving a core problem with current cloud computing. Until the industry reaches this ideal), traditional Web application firewall boxes are preventing the industry from reaching the full potential of a cloud computing.


Defining the Distributed Web Application Firewall (dWAF) for Cloud Protection


Web application security in a cloud has to be scalable, flexible, virtual and easy to manage.


A WAF must escape hardware limitations and be able to dynamically scale across CPU, computer, server rack and data center boundaries, customized to the demands of individual customers. Resource consumption of this new distributed WAF must be minimal and remain tied to detection/prevention use instances rather than consuming increasingly high levels of CPU resources. Clouds come in all sizes and shapes, so WAFs must as well.


The dWAF must be able to live in a wide variety of components to be effective without adding undue complexity for cloud service providers. Today’s providers are using a variety of traditional and virtual technologies to operate their clouds, so the ideal dWAF should accommodate this mixed environment and be available as a virtual software appliance, a plug-in, SaaS or be able to integrate with existing hardware. Flexibility with minimal disruption to the existing network is central.


A Web-based user interface must allow customers to easily administrate their applications. Configuration should be based on the applications under protection, not defined by a singular host, allowing far more granular settings for each application. Ruleset configuration must be supported by setup wizards. Statistics, logging and reporting has to be intuitive and easy to use and must also integrate seamlessly into other systems. Most importantly for a dWAF, multi-administrator privileges must be made available and flexible enough to effectively manage widely divergent policy enforcement schemes. Cloud providers should look for a set of core protections.


Detection and Protection


Foundational security using black, white and grey listings for application requests and responses must be possible. To make sure pre-set policy enforcements are not activated or deactivated without approval from an administrator, deployment and policy refinement through establishing rulesets must be possible in a shadow monitoring or detection-only mode. Once the shadow monitoring ruleset is stable, only then should it be allowed to deploy in an enforcement mode on the dWAF. This allows complete transparency for the administrator into the real-world effect of this ruleset, while at the same time allowing layered rulesets to be tested without compromising existing policy enforcement. Avoiding false positives and relaxed established defenses is essential for a real-world, usable dWAF in a cloud.


Automated learning and ruleset suggestions based on intelligent algorithms or recommendations from a static source code analyzer or Web vulnerability scanner are also desirable from a manageability view. Again, this only holds true if the administrator retains full control over activation/deactivation of each ruleset. Without this control, wanted traffic may become blocked and policy settings would become compromised.


Application Shielding


Pro-active security functions are highly recommended to reinforce any application in a cloud. Detection is simply not enough for today’s Web application security. Features like transparent secure session management, URL encryption and form-field virtualization will provide strong deterrence to attack, while saving application development and deployment time. These features are effective because session management, URL encryption and form-field virtualization is done at the dWAF level and not in the application itself.


An authentication framework support that enables businesses to consolidate their applications under one management schema is also desirable for a dWAF. This enables users to handle the authentication in front of their applications rather than behind, which adds another perimeter of security. A consolidation of all applications with dedicated rights-management ability is also a strong usability function that will make an administrator’s life easier.


Integration with Existing Technology


Avoiding vendor lock-in is a common best practice for both networking and application security. Any technology that is added to an infrastructure, platform or application itself must connect as seamlessly as possible with existing technology. Security is all about layering technologies to create the best possible protection, so a dWAF must communicate freely between a security incident and the event management system (SIEMs).

Posted via web from sdn's posterous

"Dummies" strikes again with SOA

Welcome to Service Oriented Architecture For Dummies, 2nd IBM Limited Edition. Service Oriented Architecture (SOA) is the most important technology initiative facing businesses today. SOA is game changing, and early SOA successes make it clear that SOA is here to stay. This book introduces you to the basics of SOA in context with the real life experiences of seven companies. Seen through the varied business environments depicted in each of the case studies, we hope you will recognize that SOA is more than a bunch of new software products strung together to allow technology companies to have something else to sell. SOA represents a dramatic change in the relationship between business and IT. SOA makes technology a true business enabler and empowers business and technology leaders alike.

Posted via web from sdn's posterous

Expert Web Site Optimization Secrets

Ok, so maybe secrets is a bit superlative in this case, nevertheless, several of the topics touched on in this post remain a mystery to many clients and professionals alike, so we thought we should expose some keys to well-performing web sites in more detail. Before we begin, let’s address the first possible question of “who cares?” Well yes it’s true that almost everyone has broadband and even the new iPhone will be pretty speedy on the web, what will always be true is that users don’t like to wait. In fact, what we can be sure of is that as devices become faster, a user’s patience will dramatically decrease. So to fight the attrition (user’s becoming so frustrated with a site’s performance that they never return), often caused by slow web site performance, we must always keep web site optimization in the back of our minds. After all, nothing kills a killer app’ faster than slow performance.

There have always been great tools and resources that help web developers and the like improve the user experience of their sites by following some best practices. However, what are often difficult to come by are some specific techniques that not only satisfy the requirements of the best practices, but also address issues that are even more circumstantial. In other words, we’re going to share some techniques that resolve nearly all of the most significant performance issues that web sites and web applications can face.

Understand first how your page(s) load by using Firebug for FireFox 2+ or IEInspector for Internet Explorer 5+. For those interested in Safari, you should check out this post from the webkit (Safari) team. It’s straight forward to find the area within either plug-in that allows you to observe the HTTP transactions and understand the behavior of your page from a transactional standpoint. We recommend using Firebug because it’s free; however using the IEInspector will allow you to see the page render behavior differences between IE and FF. Some relevant issues that impact performance that we’re not going to address in this post are:

  • Rendering performance — how does your markup and style sheet actually behave as the browser renders it and how does that impact the perceived speed of the page from a user’s perspective.
  • Database latency or page parse time — Dynamically generated pages or assets called in a page, like using PHP for server side includes or generating a table of data from a database entries play a role in the performance of a web site and we’ll set those issues aside for now and assume that you’ve optimized these factors as far as you can using server-side script caching, database caching etc.
  • External objects — that is objects that are not locally hosted on your domain like Google Analytics for example. Fortunately they do compress their JavaScript for us, no doubt using some of the techniques discussed later in this post.

As Aaron Hopkins said: “Try benchmarking common pages on your site from a local network with ab, which comes with the Apache web server. If your server is taking longer than 5 or 10 milliseconds to generate a page, you should make sure you have a good understanding of where it is spending its time.” We’re also going to assume that you’ve moved beyond the use of inline JavaScript and CSS; there are countless references and ongoing debates out there on how to deal with functionality semantics and presentational issues. Now there are some questions that need to be answered in order for you to proceed with effective use of the browser plug-ins we recommended:

  • Who is your target audience and what are the limitations of their browsing environments?
  • How much data would your server end up having to deliver if it was answering requests of thousands of concurrent users?
  • Aside from the actual “horsepower” of your web server and the quality/limitations of your server’s bandwidth, what are the things that you can change about your site that will realize the biggest impact? In other words, let’s apply the 80/20 rule.

The following concepts satisfy nearly any conceivable answer to the questions above:

  1. Reduce file sizes of assets and reuse them as much as possible
    Obviously this is the most simple of steps, and includes optimizing file sizes of: images, JavaScript files, CSS files, the HTML itself and so on. We won’t get into the techniques to optimize all of these because that’s a Pandora’s Box to be certain. Firebug’s “Net” tab will show you the weight (size) of all of the objects required to render the page you loaded. Take steps to reduce these as much as you can. Some concepts like: using strict DTDs, removing comments from your code, white space removal and the like to reduce file size are nice, but as you will find out for yourself are not pivotal to achieve the desired results. Again, remember the 80/20 rule, we want to improve our user experience without destroying our ability to maintain the site or make it accessible to as many user agents as possible. So instead of modifying your development process, take advantage of sound techniques as they relate to your CSS or JavaScript coding. Organize (and configure) your content to be cached. Which means avoid using: query string variables whenever possible, dynamically generated assets (images, CSS, JavaScript, markup etc), unless you mean to send the headers to the browser to force caching of your assets. Caching is definitely an imperative if your site uses query string variables or has other obvious issues that indicate to the browser that a document (page) should not be cached. Again we’ll leave that issue to another discussion since there are numerous solutions to that issue. Firebug will allow you to observe the headers of objects that are downloaded to review the headers associated with each object to make sure you’re getting the desired result. I’d encourage you to make sure you disable the browser cache (and any other non-essential plug-ins for that matter) using the Web Developer toolbar throughout your testing.
  2. Optimize HTTP transactions
    Now that file size is reduced and you’re confident that assets you desire to be cached are cached, endeavor to reduce the number of HTTP transactions. Again go back to the “Net” tab in Firebug and pay attention in particular to the number of transaction required to generate the entire page. From an image standpoint intelligent use of the sprites technique lends itself to image reuse, caching and optimized http transactions (a few larger files, rather than many small ones). As far as CSS, JavaScript are concerned, concatenate these files to further reduce HTTP transactions.
  3. Further reduce the size of text-based assets
    Let’s explore the benefits of HTTP compression. Many (at least more than in past years) web hosts support this “out-of-the-box” for the HTML MIME type. Server load aside, unfortunately compression of .html is simply not enough for high traffic sites that are not putting all of their CSS and JavaScript directly into their HTML documents (we don’t recommend optimization technique this for countless reasons). The effects of applying HTTP compression to a site is night and day, but unfortunately the leverage of this approach needs to be applied to all text based objects/assets required to render a page.In fact, HTTP compression really makes your AJAX applications really perform, but if you really plan things out you should be able to cache some of your AJAX events.
  4. Reduce the number of files
    We’ve learned how to compress our text based assets to reduce their weight and we’ve learned how combining related assets allows us to continue to use CSS Frameworks and/or compartmentalize our JavaScript so that our development style or preferences don’t impact the user experience. Now let’s finalize this process by pre-compressing our static content. There are scripts out there that are easy to find that will save you some time in achieving this result, but let’s be clear once again about what we’re up to in this step. Having the server do the heavy lifting of compressing your assets on-the-fly is great, but it doesn’t really scale. By combining and storing the compress version of the concatenated CSS or JS file, what you’re doing is further optimizing the performance of your web server, because what it’s now able to do is send static content, the very thing that all web servers excel at. This tip is vital to reaching that happy place we promised, when we said we would alleviate the most painful issues of most sites.
  5. Put everything in its place
    Web development fundamentals teach you to compartmentalize your CSS and JavaScript for maintainability and caching benefits, however, where is the best location of these external objects in your document? Most would agree that CSS belongs in the <head> of the page and they’d be correct, as for JavaScript, we encourage you to put only that code that’s required for accessibility of your interface in the <head> and everything else can be placed just above </body> at the bottom of the document. In this way, your presentation file is downloaded and cached and used to render the page, meanwhile users with fast connections can begin interacting with the page while the heaviest JS code is last to load (and then cached). Combined with the tip above, this approach allows you to avoid making sacrifices to make rich user experiences.
  6. Scale to fit
    Revisiting the issue of scale, now from a different point of view, use of a Content Delivery Network (CDN) has become a much more accessible solution to this problem. Since the days when Akamai was seen as an innovator and the “only” solution the problem of insatiable demand for a sites content (or to overcome poor developmental practices), the CDN has been instrumental in reducing latency in delivering objects to users by providing multiple regional POPs for your assets. There are a number of other more affordable leverage points for content delivery, nothing against Akamai, but these other options put this powerful solution in the reach of more people. When your web applications simply are not performing as well as you would like during peak times per day a CDN allows you to offload the busy work of delivering static assets and focus your web server on the thinking. Obviously point #4 should not be skipped when moving to this solution as you’ll see more leverage than you can imagine when these solutions are combined, not to mention save a tremendous amount on bandwidth charges (~60% usually). Meanwhile users will feel like your site or application has more speed because most of the assets a given user will be downloaded will come from the closest possible point on the web.
  7. Throw some horses at it
    For more complicated situations, you can look at throwing more hardware at the problem when the previous items have all be addressed and implemented. Specifically I’m referring to the Amazon Computing Cloud. This tip deals more with the web server component of solutions, so we’ll just consider this a bonus tip for those of you looking to make some computationally intense applications. This is a phenomenal offering from Amazon (and there are even others to consider from them) to be able to instantly scale and access a tremendous a lot of computing resources on-the-fly. Services like BrowserCam come to mind for solutions like this one.

So let’s see how techniques 1-5 combine to take shape:

HTTP Compression Report
Click the image for a larger view

It’s hard to argue with results!

A bonus tip is to use YSlow to get even more from Firebug! We’ve achieved some great performance with our home page:

Firebug: Net View
Click the image for a larger view

But YSlow shows us where we can still improve:

Firebug: YSlow
Click the image for a larger view

Unfortunately YSlow doesn’t pick up on the pre-compressed content we send to users, we’ll have to play with our headers more to satisfy #3 and #4 at the same time no doubt. We will work on these things as we see the need; regardless the techniques we discuss (points 1-5) are demonstrated in the results shown in these screen shots. Many of you may be familiar with some classic tools like Andy King’s Web Page Analyzer are a great starting point for identifying some troublesome areas of your page, but in recent years yahoo’s developer network has really put in a single place the findings that we’ve uncovered ("the hard way") over the years. Unfortunately, as with this post, you’ll still have to develop your own solutions, nonetheless we’d recommend heading over to, they’ve done a great job documenting best practices for creating optimal user experiences, including:

  • Reduce HTTP requests (as stated above)
  • Reduce DNS lookups
  • Avoid HTTP redirects
  • Make your AJAX cacheable
  • Post-load components
  • Pre-load components
  • Reduce the number of DOM elements
  • Split components across domains
  • Minimize the number of inline frames
  • Eliminate 404s (file not found errors)

For many sites and in most situations only a few of the above are of concern, but those of you out there with an older sites or applications may benefit from going through the pages of their content, server, cookie, CSS, JavaScript, mobile and image best practices. The only thing I should warn you about when delving into these best practices is that as with anything you can have too much of a good thing. So once again we suggest the 80/20 rule, do what’s required for the maximum gain. Nevertheless, Yahoo!’s developer network has grown into a great resource to say the least.

So tell us what you think, if you’re interested we can put together some examples for you and/or touch on server related optimization techniques as well.

Posted via web from sdn's posterous

Sunday, September 27, 2009


Richard Dawkins, in his book The God Delusion, has described Pantheism as “sexed-up atheism.” That may seem flippant, but it is accurate. Of all religious or spiritual traditions, Pantheism - the approach of Einstein, Hawking and many other scientists - is the only one that passes the muster of the world's most militant atheist.


So what's the difference between Atheism and Pantheism? As far as disbelief in supernatural beings, forces or realms, there is no difference. World Pantheism also shares the respect for evidence, science, and logic that's typical of atheism.


However, Pantheism goes further, and adds to atheism an embracing, positive and reverential feeling about our lives on planet Earth, our place in Nature and the wider Universe, and uses nature as our basis for dealing with stress, grief and bereavement. It's a form of spirituality that is totally compatible with science. Indeed, since science is our best way of exploring the Universe, respect for the scientific method and fascination with the discoveries of science are an integral part of World Pantheism.


If you are looking for atheist groups or freethought groups or brights groups and email lists, and if you would like ones that do a lot more than just attack religion, then you may well find World Pantheism the place you were looking for.


Why go beyond straight atheism?

Does atheism need sexing up? As such, atheism answers only a single question: is there a creator God, or not? That's an important question, but if your answer is "no" it is only a starting point. You may have reached that viewpoint based on your respect for logic, evidence and science, and those too are vital values. Yet after you've reached that initial "no God" answer, all the other important questions in life, all the options for mental and emotional wholeness and social and environmental harmony, remain open.


If atheism, humanism and naturalism are to advance, then they need approaches that don’t simply leave the individual alone in the face of an increasingly threatening physical, social and international environment. They need ways of life that offer as rich a range of benefits as traditional religious ones.


Atheism is advancing. Growing numbers of people, across almost all nations, declare themselves to be non-religious or atheistic. Atheistic books on religion, like those of Dawkins, Sam Harris or Christopher Hitchens, are best-sellers.


But so far atheism and atheist groups have focused on attacking conventional religions, especially the Western theistic religions of Judaism, Christianity and Islam. It’s true that these religions often come with high costs: submission to written or priestly authority, belief in terrifying concepts such as demons, Apocalypse, Last Judgment and Hell, or the drive to impose one’s beliefs or religious values on other people. In many cases they give cachet and endurance to backward, repressive or destructive social values, developed in agrarian societies many centuries ago. And it's valuable to highlight these costs.


The attractions of religion

But negative critiques will not suffice. There are many motives beyond fear or habit why people hold fast to old religions or convert to new ones. There are many reasons besides ignorance and folly why they make religion the center of their personal and social lives.


Religions are not just a confidence trick on the part of prophets and preachers, or a self-destructive aberration on the part of believers. They have had social survival value in the past, and they continue to provide individual and personal benefits today, and these benefits are the source of their continuing numerical strength.


Religions provide communities of mutual support.

They overcome existential isolation and alienation, giving people a meaning for their lives and a sense of their place in the universe and nature.

They provide remedies for grief at the death of loved ones, and for the fear of one’s own death.

They combat the feeling of helplessness in a threatening world full of crime, conflict and disaster.

These benefits show up in the form of better health and longer life.


Of course, if you’re buying these benefits at the price of abandoning logic, ignoring evidence, believing in contradictions and impossibilities, teaching your children to fear a God who is getting ready to destroy the planet, signing on for social values that repress the rights of others, let alone sacrificing your life to slaughter those who disagree with you, then maybe the price is too high.


A naturalistic spirituality

Are these negatives an inevitable part of the bargain? They may well be an inevitable part of belief in the unbelievable or of uncritical adherence to ancient scriptures.


But is it impossible to get the benefits that conventional religions offer, without giving up one penny of the value offered by reason, science, and progressive respect for the human rights of everyone? Don’t we need approaches that offer the same range of advantages as supernatural religions – but without the costs?


Can there be such a thing as a religion without god, an atheistic religion or a religious atheism? The Buddhism of the Pali scriptures does not have a God or gods. Nor does the Taoism of Lao Tzu or ChuangTzu.


Can there be such a thing as a completely naturalistic form of “spirituality” with no supernatural elements?


At World Pantheism we have been exploring this possibility since the beginning of 2000 CE. We do so through our global and local mailing lists, through our magazine Pan, and through a growing number of local groups. We have lists about scientific and philosophical ideas, as well as about practical ways of developing our naturalistic spirituality. You can find links to these on our main page.


Our completely naturalistic Pantheism does not believe in any supernatural beings, forces or realms and is fully compatible with atheism and skepticism. As Richard Dawkins writes:

Pantheists don't believe in a supernatural God at all, but use the word God as a nonsupernatural synonym for Nature, or for the Universe, or for the lawfulness that governs its workings.

In practice, while a significant minority of our members like and use the word God to express the depth of their feelings for Nature and the wider Universe, the majority do not use the word about their own beliefs.


There are other names for similar approaches, such as religious naturalism or naturalistic paganism. We have gone with Pantheism simply because it's the best known, and has a long pedigree.

Posted via web from sdn's posterous

Why I Am An Atheist?

A new question has cropped up. Is it due to vanity that I do not believe in the existence of an omnipotent, omnipresent and omniscient God? I had never imagined that I would ever have to confront such a question. But conversation with some friends has given me, a hint that certain of my friends, if I am not claiming too much in thinking them to be so-are inclined to conclude from the brief contact they have had with me, that it was too much on my part to deny the existence of God and that there was a certain amount of vanity that actuated my disbelief. Well, the problem is a serious one. I do not boast to be quite above these human traits. I am a man and nothing more. None can claim to be more. I also have this weakness in me. Vanity does form a part of my nature. Amongst my comrades I was called an autocrat. Even my friend Mr. B.K. Dutt sometimes called me so. On certain occasions I was decried as a despot. Some friends do complain and very seriously too that I involuntarily thrust my opinions upon others and get my proposals accepted. That this is true up to a certain extent, I do not deny. This may amount to egotism. There is vanity in me in as much as our cult as opposed to other popular creeds is concerned. But that is not personal. It may be, it is only legitimate pride in our cult and does not amount to vanity. Vanity or to be more precise "Ahankar" is the excess of undue pride in one's self. Whether it is such an undue pride that has led me to atheism or whether it is after very careful study of the subject and after much consideration that I have come to disbelieve in God, is a question that I, intend to discuss here. Let me first make it clear that egotism and vanity are two different things.

In the first place, I have altogether failed to comprehend as to how undue pride or vain-gloriousness could ever stand in the way of a man in believing in God. I can refuse to recognize the greatness of a really great man provided I have also achieved a certain amount of popularity without deserving it or without having possessed the qualities really essential or indispensable for the same purpose. That much is conceivable. But in what way can a man believing in God cease believing due to his personal vanity? There are only two Ways. The man should either begin to think himself a rival of God or he may begin to believe himself to be God. In neither case can he become a genuine atheist. In the first case he does not even deny the existence of his rival. In the second case as well he admits the existence of a conscious being behind the screen guiding all the movements of nature. It is of no importance to us whether he thinks himself to be that supreme being or whether he thinks the supreme conscious being to be somebody apart from himself. The fundamental is there. His belief is there. He is by no means an atheist. Well, here I am I neither belong to the first category nor to the second.

I deny the very existence of that Almighty Supreme being. Why I deny it shall be dealt with later on. Here I want to clear one thing, that it is not vanity that has actuated me to adopt the doctrines of atheism. I am neither a rival nor an incarnation nor the Supreme Being Himself. One point is decided, that it is not vanity that has led me to this mode of thinking. Let me examine the facts to disprove this allegation. According to these friends of mine I have grown vain-glorious perhaps due to the undue popularity gained during the trials-both Delhi Bomb and Lahore conspiracy cases. Well, let us see if their premises are correct. My atheism is not of so recent origin. I had stopped believing in God when I was an obscure young man, of whose existence my above mentioned friends were not even aware. At least a college student cannot cherish any short of undue pride which may lead him to atheism. Though a favorite with some professors and disliked by certain others, I was never an industrious or a studious boy. I could not get any chance of indulging in such feelings as vanity. I was rather a boy with a very shy nature, who had certain pessimistic dispositions about the future career. And in those days, I was not a perfect atheist. My grand-father under whose influence I was brought up is an orthodox Arya Samajist. An Arya Samajist is anything but an atheist. After finishing my primary education I joined the DAV. School of Lahore and stayed in its Boarding House for full one year. There, apart from morning and evening prayers, I used to recite "Gayatri Mantra" for hours and hours. I was a perfect devotee in those days. Later on I began to live with my father. He is a liberal in as much as the orthodoxy of religions is concerned. It was through his teachings that I aspired to devote my life to the cause of freedom. But he is not an atheist. He is a firm believer. He used to encourage me for offering prayers daily. So, this is how I was brought up. In the Non-Co-operation days I joined the National College. it was there that I began to think liberally and discuss and criticize all the religious problems, even about God. But still I was a devout believer. By that time I had begun to preserve the unshorn and unclipped long hair but I could never believe in the mythology and doctrines of Sikhism or, any other religion. But I had a firm faith in God's existence.

Later on I joined the revolutionary party. The first leader with whom I came in contact, though not convinced, could not dare to deny the existence of God. On my persistent inquiries about God, he used to say, "Pray whenever you want to". Now this is atheism less courage required for the adoption of that creed. The second leader with whom I came in contact was a firm believer. Let me mention his name-respected comrade Sachindra Nath Sanyal, now undergoing life transportation in connexion with the Karachi conspiracy case. From the every first page of his famous and only book, "Bandi Jivan" (or Incarcerated Life), the Glory of God is sung vehemently. In the last page of the second part of that beautiful book his mystic-because of Vedantism – praises showered upon God form a very conspicuous part of his thoughts.

"The Revolutionary leaflet" distributed- throughout India on January 28th, 1925, was according to the prosecution story the result of his intellectual labor, Now, as is inevitable in the secret work the prominent leader expresses his own views, which are very dear to his person and the rest of the workers have to acquiesce in them-in spite of differences, which they might have. In that leaflet one full paragraph was devoted to praise the Almighty and His rejoicings and doing. That is all mysticism. What I wanted to point out was that the idea of disbelief had not even germinated in the revolutionary party. The famous Kakori martyrs –all four of them-passed their last day in prayers. Ram Prasad Bismil was an orthodox Arya Samajist. Despite his wide studies in the field of Socialism and Communism, Rajen Lahiri could not suppress his desire, of reciting hymns of the Upanishads and the Gita. I saw only one man amongst them, who never prayed and used to say, "Philosophy is the outcome of human weakness or limitation of knowledge". He is also undergoing a sentence of transportation for life. But he also never dared to deny the existence of God.

UP to that period I was only a romantic idealist revolutionary. Uptil then we were to follow. Now came the time to shoulder the whole responsibility. Due to the inevitable reaction for some time the very existence of the Party seemed impossible. Enthusiastic comrades – nay leaders – began to jeer at us. For some time I was afraid that some day I also might not be convinced of the futility of our own program. That was a turning point in my revolutionary career. "Study" was the cry that reverberated in the corridors of my mind. Study to enable yourself to face the arguments advanced by opposition. Study to arm yourself with arguments in favor of your cult. I began to study. My previous faith and convictions underwent a remarkable modification. The Romance of the violent methods alone which was so prominent amongst our predecessors, was replaced by serious ideas. No more mysticism, no more blind faith. Realism became our cult. Use of force justifiable when resorted to as a matter of terrible necessity: non-violence as policy indispensable for all mass movements. So much about methods.

The most important thing was the clear conception of the ideal for which we were to fight, As there were no important activities in the field of action I got ample opportunity to study various ideals of the world revolution. I studied Bakunin, the Anarchist leader, something of Marx the father of Communism and much of Lenin, Trotsky and others the men who had successfully carried out a revolution in their country. They were all atheists. Bakunin's "God and State", though only fragmentary, is an interesting study of the subject. Later still I came across a book entitled 'Common Sense' by Nirlamba Swami. It was only a sort of mystic atheism. This subject became of utmost interest to me. By the end of 1926 I had been convinced as to the baselessness of the theory of existence of an almighty supreme being who created, guided and controlled the universe. I had given out this disbelief of mine. I began discussion on the subjects with my friends. I had become a pronounced atheist. But, what it meant will presently be discussed.

In May 1927 I was arrested at Lahore. The arrest was a surprise. I was quite unaware of (he fact that the police wanted me. All of a sudden while passing through a garden I found myself surrounded by police. To my own surprise, I was very calm at that time. I did not feel any sensation, neither did I experience any excitement. I was taken into police custody. Next day I was taken to the Railway Police lock-up where I was to pass full one month. After many day's conversation with the Police officials I guessed that they had some information regarding my connexion with the Kakori Party and my other activities in connexion with the revolutionary movement. They told me that I had been to Lucknow while the trial was going on there, that I had negotiated a certain scheme about their rescue, that after obtaining their approval, we had procured some bombs, that by way of test one of the bombs was thrown in the crowd on the occasion of Dussehra 1926. They further informed me, in my interest, that if I could give any statement throwing some light on the activities of the revolutionary party, I was not to be imprisoned but on the contrary set free and rewarded even without being produced as an approver in the Court. I laughed at the proposal. It was all humbug.

People holding ideas like ours do not throw bombs on their own innocent people. One fine morning Mr. Newman, the then Senior Superintendent of CID., came to me. And after much sympathetic talk with me imparted-to him-the extremely sad news that if I did not give any statement as demanded by them, they would be forced to send me up for trial for conspiracy to wage war in connexion with Kakori Case and for brutal murders in connexion with Dussehra Bomb outrage. And he further informed me that they had evidence enough to get me convicted and hanged.

In those days I believed – though I was quite innocent – the police could do it if they desired. That very day certain police officials began to persuade me to offer my prayers to God regularly both the times. Now I was an atheist. I wanted to settle for myself whether it was in the days of peace and enjoyment alone that I could boast of being an atheist or whether during such hard times as well I could stick to those principles of mine. After great consideration I decided that I could not lead myself to believe in and pray to God. No, I never did. That was the real test and I came, out successful. Never for a moment did I desire to save my neck at the cost of certain other things. So I was a staunch disbeliever : and have ever since been. It was not an easy job to stand that test.

'Belief' softens the hardships, even can make them pleasant. In God man can find very strong consolation and support. Without Him, the man has to depend upon himself. To stand upon one's own legs amid storms and hurricanes is not a child's play. At such testing moments, vanity, if any, evaporates, and man cannot dare to defy the general beliefs, if he does, then we must conclude that he has got certain other strength than mere vanity. This is exactly the situation now. Judgment is already too well known. Within a week it is to be pronounced. What is the consolation with the exception of the idea that I am going to sacrifice my life for a cause ? A God-believing Hindu might be expecting to be reborn as a king, a Muslim or a Christian might dream of the luxuries to be- enjoyed in paradise and the reward he is to get for his sufferings and sacrifices. But what am I to expect? I know the moment the rope is fitted round my neck and rafters removed, from under my feet. That will be the final moment, that will be the last moment. I, or to be more precise, my soul, as interpreted in the metaphysical terminology, shall all be finished there. Nothing further.

A short life of struggle with no such magnificent end, shall in itself be the reward if I have the courage to take it in that light. That is all. With no selfish motive, or desire to be awarded here or hereafter, quite disinterestedly have I devoted my life to the cause of independence, because I could not do otherwise. The day we find a great number of men and women with this psychology who cannot devote themselves to anything else than the service of mankind and emancipation of the suffering humanity; that day shall inaugurate the era of liberty.

Not to become a king, nor to gain any other rewards here, or in the next birth or after death in paradise, shall they be inspired to challenge the oppressors, exploiters, and tyrants, but to cast off the yoke of serfdom from the neck of humanity and to establish liberty and peace shall they tread this-to their individual selves perilous and to their noble selves the only glorious imaginable-path. Is the pride in their noble cause to be – misinterpreted as vanity? Who dares to utter such an abominable epithet? To him, I say either he is a fool or a knave. Let us forgive him for he can not realize the depth, the emotion, the sentiment and the noble feelings that surge in that heart. His heart is dead as a mere lump of flesh, his eyes are-weak, the evils of other interests having been cast over them. Self-reliance is always liable to be interpreted as vanity. It is sad and miserable but there is no help.

You go and oppose the prevailing faith, you go and criticize a hero, a great man, who is generally believed to be above criticism because he is thought to be infallible, the strength of your argument shall force the multitude to decry you as vainglorious. This is due to the mental stagnation, Criticism and independent thinking are the two indispensable qualities of a revolutionary. Because Mahatamaji is great, therefore none should criticize him. Because he has risen above, therefore everything he says-may be in the field of Politics or Religion, Economics or Ethics-is right. Whether you are convinced or not you must say, "Yes, that's true". This mentality does not lead towards progress. It is rather too obviously, reactionary.

Because our forefathers had set up a faith in some supreme, being – the Almighty God – therefore any man who dares to challenge the validity of that faith, or the very existence of that supreme being, he shall have to be called an apostate, a renegade. If his arguments are too sound to be refuted by counter-arguments and spirit too strong to be cowed down by the threat of misfortunes that may befall him by the wrath of the Almighty, he shall be decried as vainglorious, his spirit to be denominated as vanity. Then why to waste time in this vain discussion? Why try to argue out the whole thing? This question is coming before the public for the first time, and is being handled in this matter of fact way for the first time, hence this lengthy discussion.

As for the first question, I think I have cleared that it is not vanity that has led me to atheism. My way of argument has proved to be convincing or not, that is to be judged by my readers, not me. I know in the present, circumstances my faith in God would have made my life easier, my burden lighter and my disbelief in Him has turned all the circumstances too dry and the situation may assume too harsh a shape. A little bit of mysticism can make it poetical. But I, do not want the help of any intoxication to meet my fate. I am a realist. I have been trying to overpower the instinct in me by the help of reason. I have not always been successful in achieving this end. But man's duty is to try and endeavor, success depends upon chance and environments.

As for the second question that if it was not vanity, then there ought to be some reason to disbelieve the old and still prevailing faith of the existence of God. Yes; I come to that now Reason there is. According to. me, any man who has got some reasoning power at his command always tries to reason out his environments. Where direct proofs are lacking philosophy occupies the important place. As I have already stated, a certain revolutionary friend used to say that Philosophy is the outcome of human weakness. When our ancestors had leisure enough to try to solve out the mystery of this world, its past, present and the future, its whys and wherefores, they having been terribly short of direct proofs, everybody tried to solve the problem in his own way. Hence we find the wide differences in the fundamentals of various religious creeds, which some times assume very antagonistic and conflicting shapes. Not only the Oriental and Occidental philosophies differ, there are differences even amongst various schools of thoughts in each hemisphere. Amongst Oriental religions, the Moslem faith is not at all compatible with Hindu faith. In India alone Buddhism and Jainism are sometimes quite separate from Brahmanism, in which there are again conflicting faiths as Arya Samaj and Sanatan Dharma. Charwak is still another independent thinker of the past ages. He challenged the authority of God in the old times. All these creeds differ from each other on the fundamental question., and everybody considers himself to be on the right. There lies the misfortune. Instead of using the experiments and expressions of the ancient Savants and thinkers as a basis for our future struggle against ignorance and to try to find out a solution to this mysterious problem, we – lethargical as we have proved to be – raise the hue and cry of faith, unflinching and unwavering faith to their versions and thus are guilty of stagnation in human progress.

Any man who stands for progress has to criticize, disbelieve and challenge every item of the old faith. Item by item he has to reason out every nook and corner of the prevailing faith. If after considerable reasoning one is led to believe in any theory or philosophy, his faith is welcomed. His reasoning can be mistaken, wrong, misled and sometimes fallacious. But he is liable to correction because reason is the guiding star of his life. But mere faith and blind faith is dangerous: it dulls the brain, and makes a man reactionary.

A man who claims to be a realist has to challenge the whole of the ancient faith. If it does not stand the onslaught of reason it crumbles down. Then the first thing for him is to shatter the whole down and clear a space for the erection of a new philosophy. This is the negative side. After it begins the positive work in which sometimes some material of the old faith may be used for the purpose of reconstruction. As far as I am concerned, let me admit at the very outset that I have not been able to study much on this point. I had a great desire to study the Oriental Philosophy but I could not get any chance or opportunity to do the same. But so far as the negative study is under discussion, I think I am convinced to the extent of questioning the soundness of the old faith. I have been convinced as to non-existence of a conscious supreme being who is guiding and directing the movements of nature. We believe in nature and the whole progressive movement aims at the domination of man over nature for his service. There is no conscious power behind it to direct. This is what our philosophy is.

As for the negative side. we ask a few questions from the 'believers'.

If, as you believe, there is an almighty, omnipresent, omniscient and omnipotent God-who created the earth or world, please let me know why did he create it ? This world of woes and miseries, a veritable, eternal combination of numberless tragedies: Not a single soul being perfectly satisfied.

Pray, don't say that it is His Law: If he is bound by any law, he is not omnipotent. He is another slave like ourselves. Please don't say that it is his enjoyment. Nero burnt one Rome. He killed a very limited number of people. He created very few tragedies, all to his perfect enjoyment. And what is his place in History? By what names do the historians mention him? All the venomous epithets are showered upon him. Pages are blackened with invective diatribes condemning Nero, the tyrant, the heartless, the wicked.

One Changezkhan sacrificed a few thousand lives to seek pleasure in it and we hate the very name. Then how are you going to justify your almighty, eternal Nero, who has been, and is still causing numberless tragedies every day, every hour and every minute? How do you think to support his misdoings which surpass those of Changez every single moment? I say why did he create this world – a veritable hell, a place of constant and bitter unrest? Why did the Almighty create man when he had the power not to do it? What is the justification for all this ? Do you say to award the innocent sufferers hereafter and to punish the wrong-doers as well? Well, well: How far shall you justify a man who may dare to inflict wounds upon your body to apply a very soft and soothing liniment upon it afterwards? How far the supporters and organizers of the Gladiator Institution were justified in throwing men before the half starved furious lions to be cared for and well looked after if they could survive and could manage to escape death by the wild beasts? That is why I ask, 'Why did the conscious supreme being created this world and man in it? To seek pleasure? Where then is the difference between him and Nero'?

You Mohammadens and Christians : Hindu Philosophy shall still linger on to offer another argument. I ask you what is your answer to the above-mentioned question? You don't believe in previous birth. Like Hindus you cannot advance the argument of previous misdoings of the apparently quite innocent sufferers? I ask you why did the omnipotent labor for six days to create the world through word and each day to say that all was well. Call him today. Show him the past history. Make him study the present situation. Let us see if he dares to say, "All is well".

From the dungeons of prisons, from the stores of starvation consuming millions upon millions of human beings in slums and huts, from the exploited laborers, patiently or say apathetically watching the procedure of their blood being sucked by the Capitalist vampires, and the wastage of human energy that will make a man with the least common sense shiver with horror, and from the preference of throwing the surplus of production in oceans rather than to distribute amongst the needy producers…to the palaces of kings built upon the foundation laid with human bones.... let him see all this and let him say "All is well".

Why and wherefore? That is my question. You are silent.

All right then, I proceed. Well, you Hindus, you say all the present sufferers belong to the class of sinners of the previous births. Good. You say the present oppressors were saintly people in their previous births, hence they enjoy power. Let me admit that your ancestors were very shrewd people, they tried to find out theories strong enough to hammer down all the efforts of reason and disbelief. But let us analyze how far this argument can really stand.

From the point of view of the most famous jurists punishment can be justified only from three or four ends to meet which it is inflicted upon the wrongdoer. They are retributive, reformative and deterrent. The retributive theory is now being condemned by all the advanced thinkers. Deterrent theory is also following the same fate. Reformative theory is the only one which is essential, and indispensable for human progress. It aims at returning the offender as a most competent and a peace-loving citizen to the society. But what is the nature of punishment inflicted by God upon men even if we suppose them to be offenders. You say he sends them to be born as a cow, a cat, a tree, a herb or a best. You enumerate these punishments to be 84 lakhs. I ask you what is its reformative effect upon man? How many men have met you who say that they were born as a donkey in previous birth for having committed any sin? None. Don't quote your Puranas. I have no scope to touch your mythologies. Moreover do you know that the greatest sin in this world is to be poor. Poverty is a sin, it is a punishment.

I ask you how far would you appreciate a criminologist, a jurist or a legislator who proposes such measures of punishment which shall inevitably force man to commit more offences? Had not your God thought of this or he also had to learn these things by experience, but at the cost of untold sufferings to be borne by humanity? What do you think shall be the fate of a man who has been born in a poor and illiterate family of say a chamar or a sweeper. He is poor, hence he cannot study. He is hated and shunned by his fellow human beings who think themselves to be his superiors having been born in say a higher caste. His ignorance, his poverty and the treatment meted out to him shall harden his heart towards society. Suppose he commits a sin, who shall bear the consequences? God, he or the learned ones of, the society? What about the punishment of those people who were deliberately kept ignorant by the haughty and egotist Brahmans and who had to pay the penalty by bearing the stream of being led (not lead) in their ears for having heard a few sentences of your Sacred Books of learning-the Vedas? If they committed any offence-who was to be responsible for them and who was to bear the brunt? My dear friends: These theories are the inventions of the privileged ones: They justify their usurped power, riches and superiority by the help of these theories. Yes: It was perhaps Upton Sinclair, that wrote at some place, that just make a man a believer in immortality and then rob him of all his riches, and possessions. He shall help you even in that ungrudgingly. The coalition amongst the religious preachers and possessors of power brought forth jails, gallows, knouts and these theories.

I ask why your omnipotent God, does not stop every man when he is committing any sin or offence? He can do it quite easily. Why did he not kill war lords or kill the fury of war in them and thus avoid the catastrophe hurled down on the head of humanity by the Great War? Why does he not just produce a certain sentiment in the mind of the British people to liberate India? Why does he not infuse the altruistic enthusiasm in the hearts of all capitalists to forgo their rights of personal possessions of means of production and thus redeem the whole laboring community – nay the whole human society from the bondage of Capitalism. You want to reason out the practicability of socialist theory, I leave it for your almighty to enforce it.

People recognize the merits of socialism in as much as the general welfare is concerned. They oppose it under the pretext of its being impracticable. Let the Almighty step in and arrange everything in an orderly fashion. Now don't try to advance round about arguments, they are out of order. Let me tell you, British rule is here not because God wills it but because they possess power and we do not dare to oppose them. Not that it is with the help of God that they are keeping us under their subjection but it is with the help of guns and rifles, bomb and bullets, police and millitia and our apathy that they are successfully committing the most deplorable sin against society- the outrageous exploitation of one nation by another. Where is God ? What is he doing? Is he enjoying all I these woes of human race ? A Nero; A Changez : Down with him.

Do you ask me how I explain the origin of this world and origin of man? Alright I tell you. Charles Darwin has tried to throw some light on the subject. Study him. Read Soham Swami's "Commonsense". It shall answer your question to some extent. This is a phenomenon of nature. The accidental mixture of different substances in the shape of nebulae produced this earth. When? Consult history. The same process produced animals and in the long run man. Read Darwin's 'Origin of Species'. And all the later progress is due to man's constant conflict with nature and his efforts to override it. This is the briefest possible explanation of this phenomenon.

Your other argument may be just to ask why a child is born blind or lame if not due to his deeds committed in the previous birth? This problem has been explained away by biologists as a more biological phenomenon. According to them the whole burden rests upon the shoulders of the parents who may be conscious or ignorant of their own deeds led to mutilation of the child previous to its birth.

Naturally you may ask another question though it is quite childish in essence. If no God existed, how did the people come to believe in him? My answer is clear and brief. As they came to believe in ghosts, and evil spirits; the only difference is that belief in God is almost universal and the philosophy well developed. Unlike certain of the radicals I would not attribute its origin to the ingenuity of the exploiters who wanted to keep the people under their subjection by preaching the existence of a supreme being and then claiming an authority and sanction from him for their privileged positions. Though I do not differ with them on the essential point that all faiths, religions, creeds and such other institutions became in turn the mere supporters of the tyrannical and exploiting institutions, men and classes. Rebellion against king is always a sin according to every religion.

As regards the origin of God my own idea is that having realized the limitations of man, his weaknesses and shortcoming having been taken into consideration, God was brought into imaginary existence to encourage man to face boldly all the trying circumstances, to meet all dangers manfully and to check and restrain his outbursts in prosperity and affluence. God both with his private laws and parental generosity was imagined and painted in greater details. He was to serve as a deterrent factor when his fury and private laws were discussed so that man may not become a danger to society. He was to serve as a father, mother, sister and brother, friend and helpers when his parental qualifications were to be explained. So that when man be in great distress having been betrayed and deserted by all friends he may find consolation in the idea that an ever true friend was still there to help him, to support him and that He was almighty and could do anything. Really that was useful to the society in the primitive age.

The idea of God is helpful to man in distress.

Society has to fight out this belief as well as was fought the idol worship and the narrow conception of religion. Similarly, when man tries to stand on his own legs, and become a realist he shall have to throw the faith aside, and to face manfully all the distress, trouble, in which the circumstances may throw him. That is exactly my state of affairs. It is not my vanity, my friends. It is my mode of thinking that has made me an atheist. I don't know whether in my case belief in God and offering of daily prayers which I consider to be most selfish and degraded act on the part of man, whether these prayers can prove to be helpful or they shall make my case worse still. I have read of atheists facing all troubles quite boldly, so am I trying to stand like a man with an erect head to the last; even on the gallows.

Let us see how I carry on : one friend asked me to pray. When informed of my atheism, he said, "During your last days you will begin to believe". I said, No, dear Sir, it shall not be. I will think that to be an act of degradation and demoralization on my part. For selfish motives I am not going to pray. Readers and friends, "Is this vanity"? If it is, I stand for it.

Bhagat Singh (1930)
June 18, 2002

Posted via web from sdn's posterous