Archive for June, 2006

Tips and Checklist from Pragmatic Programmer

The pragmatic programmer has a list of tips and checklists for programmers. Every tip is a pearl of its own and a programmer needs to keep these in mind. Here is the link to the tips and checklist from the blog coding horror. It is worth taking a print out and framing it near your desk.

Blink this Tips and Checklist from Pragmatic Programmer at blinklist.com    Bookmark Tips and Checklist from Pragmatic Programmer at blogmarks    Bookmark Tips and Checklist from Pragmatic Programmer at del.icio.us    Digg Tips and Checklist from Pragmatic Programmer at Digg.com    Fark Tips and Checklist from Pragmatic Programmer at Fark.com    Bookmark Tips and Checklist from Pragmatic Programmer at Furl.net    Bookmark Tips and Checklist from Pragmatic Programmer at NewsVine    Bookmark Tips and Checklist from Pragmatic Programmer at reddit.com    Bookmark Tips and Checklist from Pragmatic Programmer at Simpy.com    Bookmark Tips and Checklist from Pragmatic Programmer at Spurl.net    Bookmark Tips and Checklist from Pragmatic Programmer with wists    Bookmark Tips and Checklist from Pragmatic Programmer at YahooMyWeb

Comments      Cosmos

Don’t Repeat Yourself (DRY)

When executing a project, we are very good at duplicating a process/code/design at several places. For example if you consider design, with so many frameworks in place in the industry that adress an area of concern, one might designing something that might already be there which has been designed and coded effectively and tested. The DRY principle is to make sure that you are not repeating a process/code/design/architecture in your project. If the separation of conerns has been done effectively, a change in one concern should not affect any other concern and modifications are not needed all over. If the DRY principle is not followed strictly you would run into maintenance issues making changes wherever there is repetition. More on DRY principle here.

Blink this Don't Repeat Yourself (DRY) at blinklist.com    Bookmark Don't Repeat Yourself (DRY) at blogmarks    Bookmark Don't Repeat Yourself (DRY) at del.icio.us    Digg Don't Repeat Yourself (DRY) at Digg.com    Fark Don't Repeat Yourself (DRY) at Fark.com    Bookmark Don't Repeat Yourself (DRY) at Furl.net    Bookmark Don't Repeat Yourself (DRY) at NewsVine    Bookmark Don't Repeat Yourself (DRY) at reddit.com    Bookmark Don't Repeat Yourself (DRY) at Simpy.com    Bookmark Don't Repeat Yourself (DRY) at Spurl.net    Bookmark Don't Repeat Yourself (DRY) with wists    Bookmark Don't Repeat Yourself (DRY) at YahooMyWeb

Comments      Cosmos

Useful Resource #6 - Web developer firefox extension

I was looking at the monitors of my colleagues Sumanth and Rajesh on the screens they were working on a project. I felt some difference in the screen and when I saw it close there were all html tags and style sheets that got displayed in the whole page along with the actual page. I asked them what it was. They told me it was a firefox extension that helps web developers look at the html/style sheet source along with the page. This helps in looking at the whole layout of the page and the styles applied to each element simultaneously rather than going to view source and trying to find out where the element is and what style has been applied. And more often the style sheet is referred from a separate file and you may not be able to view the source of it. I downloaded it and tried the extension on gmail and looked at the div layouts. I am sure this is a great extension that will help any web developer working on the presentation layer. Works only in Firefox browser.

Blink this Useful Resource #6 - Web developer firefox extension at blinklist.com    Bookmark Useful Resource #6 - Web developer firefox extension at blogmarks    Bookmark Useful Resource #6 - Web developer firefox extension at del.icio.us    Digg Useful Resource #6 - Web developer firefox extension at Digg.com    Fark Useful Resource #6 - Web developer firefox extension at Fark.com    Bookmark Useful Resource #6 - Web developer firefox extension at Furl.net    Bookmark Useful Resource #6 - Web developer firefox extension at NewsVine    Bookmark Useful Resource #6 - Web developer firefox extension at reddit.com    Bookmark Useful Resource #6 - Web developer firefox extension at Simpy.com    Bookmark Useful Resource #6 - Web developer firefox extension at Spurl.net    Bookmark Useful Resource #6 - Web developer firefox extension with wists    Bookmark Useful Resource #6 - Web developer firefox extension at YahooMyWeb

Comments      Cosmos

Continuation Server

Continuation Server is different from the normal servers in a way that they invert the control from the client to the server. In a typical web application server scenario, the client request is processed by the server and responds back to the client. And the focus is only about that request and response and the application as such do not maintain the state of the application at any point of time. This can be best realized when most of the times we struggle with the back button issue. The application on the server cannot differentiate between a browser’s back button and the one that comes from a link on the page. If not handled through a mechanism this could potentially be catastrophic. For example in my online banking site, there is a feature to transfer the funds to another account. On the screen where I enter the details I find a note like the one below.

Note
In case you are re-trying, first please click here to check the status of your previous payment.

What it really means is once a transaction is submitted and say due to some reason the transaction was successful but the response did not reach the browser (say a blank page is displayed and the browser says it’s done). If you clicked on the refresh button, the same transaction might get invoked again and you end up transferring the amount twice. That is why the above statement is a caution to the users to check if the transaction happened and you are not attempting it again because of incomplete response.

The issue is because the server’s do not store the state of an application but only the state of a request. Through the help of frameworks and session management this could be attacked but would require considerable effort and would increase the complexity of the application. Continuation servers are the ones which stores the state of the application in entire. It is something like every client has its own server and full attention is given to the client. So in the above example when the browser’s back button is pressed the server restores back the state of the application to the previous state which would involve rolling back the transaction. Though the concept is still at an early stage with not so many implementations this could pick up down the line. The continuation server tutorial in BrainBell.com site explains the concept in detail.

Blink this Continuation Server at blinklist.com    Bookmark Continuation Server at blogmarks    Bookmark Continuation Server at del.icio.us    Digg Continuation Server at Digg.com    Fark Continuation Server at Fark.com    Bookmark Continuation Server at Furl.net    Bookmark Continuation Server at NewsVine    Bookmark Continuation Server at reddit.com    Bookmark Continuation Server at Simpy.com    Bookmark Continuation Server at Spurl.net    Bookmark Continuation Server with wists    Bookmark Continuation Server at YahooMyWeb

Comments      Cosmos

Fractals

Fractals had been an area of interest during my initial programming days. A fractal is created using a basic shape or a polygon and recursively repeating it over minor displacement from each other and rotating it simultaneously using trigonometric functions. Creation of fractals requires graphic libraries that can help in drawing shapes. The result is an amazing design. Here is a creative song that looks to be created out of fractals and animated. Have a good weekend.

Blink this Fractals at blinklist.com    Bookmark Fractals at blogmarks    Bookmark Fractals at del.icio.us    Digg Fractals at Digg.com    Fark Fractals at Fark.com    Bookmark Fractals at Furl.net    Bookmark Fractals at NewsVine    Bookmark Fractals at reddit.com    Bookmark Fractals at Simpy.com    Bookmark Fractals at Spurl.net    Bookmark Fractals with wists    Bookmark Fractals at YahooMyWeb

Comments      Cosmos

Continuous Integration

Continuous Integration is one of the principles of Extreme Programming. Continuous Integration helps in bringing up the integration issues early on in the project and resolves them early so that there are no surprises when the project is deployed on the server. Martin Fowler’s site has this article on Continuous Integration that explains in detail the process and benefits behind Continuous Integration. We have a setup a continuous integration environment for J2EE projects with the help of following tools.

  • Subversion - Subversion is an open source version control system that can keep track of the code changes. The developers commit their code to this version control system which is located on a server.
  • Maven - Maven is a project management automation tool that also helps in packaging the application. Our projects are mavenized and follow the Apache packaging structures. Look at my build automation series of posts to know more about mavenizing a project.
  • LuntBuild - LuntBuild is a J2EE based tool that helps in scheduling and executing build automation. It supports build automation tools like Ant and Maven and has a web user interface to configure and manage the schedules. We have a nightly build schedule and continuous integration schedule.

This is what happens in our continuous integration environment. When a developer has completed his/her code he/she runs maven on his/her desktop. Maven runs the unit tests, packages and deploys the application on an application server on the desktop. Once the build is successful and the developer is happy with the results he/she synchronizes his/her code with the Subversion repository. If there are any modifications to the mainline code (the latest and greatest available in the repository), he/she updates the code from the repository to the local environment. He/She again runs the maven script locally to make sure still the build is intact and works fine without any problems. If there are errors then those are fixed until the build is successful on his/her desktop. Once the build is successful on his/her desktop he/she commits the code to the Subversion code repository.

In the development server we have LuntBuild installed and configured to manage build automation schedules. A schedule is similar to UNIX cron job that gets triggered every 15 minutes. The project’s details and the Subversion details are configured in LuntBuild. When the schedule is kicked off a process determines if there is a change in the Subversion repository since the last build. If no change is detected then it goes to the sleep mode. If a change is detected, it gets the mainline code (latest) from the Subversion repository and triggers maven. Note that the maven project object model (pom.xml) is also part of the code and gets checked in into the Subversion. If the build is successful, the build output (an enterprise archive file) is copied to the JBoss application server’s directory. Since JBoss has hot deployment feature (with this I don’t need to restart the application server when I want to deploy a new version of the application. It sniff’s changes and picks up the changes automatically) the integrated application is available for testing. LuntBuild sends out a mail to the developers whether the build was successful or failure. If the build is a failure then the developers take appropriate action by looking at the build logs and correct the issues.

Since Maven runs automated unit tests and also generates test results, site documentation of the build and API documentation, it is linked from our project wiki site so that anybody in the team can see what the latest with the application is. Since the site generation would require some additional time in the overall build process this is done only during the nightly build (this is another schedule configured in LuntBuild that gets triggered midnight every day).

Some discipline would be required from the team in order to use continuous integration effectively. This article from Martin Fowler points out the disciplines required to have an effective continuous integration environment.

Blink this Continuous Integration at blinklist.com    Bookmark Continuous Integration at blogmarks    Bookmark Continuous Integration at del.icio.us    Digg Continuous Integration at Digg.com    Fark Continuous Integration at Fark.com    Bookmark Continuous Integration at Furl.net    Bookmark Continuous Integration at NewsVine    Bookmark Continuous Integration at reddit.com    Bookmark Continuous Integration at Simpy.com    Bookmark Continuous Integration at Spurl.net    Bookmark Continuous Integration with wists    Bookmark Continuous Integration at YahooMyWeb

Comments      Cosmos

Useful Resource #5 - A foundation book on programming

How to Design Programs - An Introduction to Computing and Programming” is an online book from MIT press. It is a good foundation read for those who want to get started with programming. A beginner should understand the foundations clear before jumping on to working on projects. Programming is easy once the foundation on computers and programs is strong. And to have that foundation a lot of analogy and association with real life situations is important. As I said in the series of posts on mind maps, the brain works associatively. The more a person is able to associate the concepts with his own experiences and visual imagination, the more chances they are stored in the long term memory. This book is one that contains good analogies and is a good start to lay that foundation.

Blink this Useful Resource #5 - A foundation book on programming at blinklist.com    Bookmark Useful Resource #5 - A foundation book on programming at blogmarks    Bookmark Useful Resource #5 - A foundation book on programming at del.icio.us    Digg Useful Resource #5 - A foundation book on programming at Digg.com    Fark Useful Resource #5 - A foundation book on programming at Fark.com    Bookmark Useful Resource #5 - A foundation book on programming at Furl.net    Bookmark Useful Resource #5 - A foundation book on programming at NewsVine    Bookmark Useful Resource #5 - A foundation book on programming at reddit.com    Bookmark Useful Resource #5 - A foundation book on programming at Simpy.com    Bookmark Useful Resource #5 - A foundation book on programming at Spurl.net    Bookmark Useful Resource #5 - A foundation book on programming with wists    Bookmark Useful Resource #5 - A foundation book on programming at YahooMyWeb

Comments      Cosmos

Social Entrepreneurship

My friend Avinash Vaidya, CEO of eForte systems is stepping into social entrepreneurship. He gave us an excellent talk about social entrepreneurship and the prerequisites to become one. Visit Avinash’s blog “GlobalRipples” to know more about social entrepreneurship. GlobalRipples is intended to be the stage to bring in people who have a model to make a social cause and bring in interested people who can help in making that model real and sustain by itself. Good luck Avinash.

Blink this Social Entrepreneurship at blinklist.com    Bookmark Social Entrepreneurship at blogmarks    Bookmark Social Entrepreneurship at del.icio.us    Digg Social Entrepreneurship at Digg.com    Fark Social Entrepreneurship at Fark.com    Bookmark Social Entrepreneurship at Furl.net    Bookmark Social Entrepreneurship at NewsVine    Bookmark Social Entrepreneurship at reddit.com    Bookmark Social Entrepreneurship at Simpy.com    Bookmark Social Entrepreneurship at Spurl.net    Bookmark Social Entrepreneurship with wists    Bookmark Social Entrepreneurship at YahooMyWeb

Comments      Cosmos

Next entries » · « Previous entries

Creative Commons License  This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.