Posts

Showing posts from 2009

Version Control Policy: Best Practices

Image
Your code base is always under version control (if it's not, it's high time you did!), and developers are always scared about taking updates or committing files, under some supernatural fear, that an update will wipe out their local changes. This causes a lot of trouble in the team, when some developers have not updated their code base since a long time. I've compiled below a checklist of best practices. Before you check in your code to subversion, here are a few points to follow. Ensure that there are 0 (zero) serious CheckStyle, PMD, FindBugs error (warnings should be reviewed). If you need an exception Checked in Code must build with all dependencies (not just your module). Checked in Code must not break unit tests. Checkins without comments should be noted as a build break caused by the developer.  Before committing your changes to repository, it is advisable to synchronize the files, run an update and then commit your changes.

Software Versioning

Software versioning for the end consumer is a very vital part of the software release cycle. It is one of the primary identifiers for consumers to report issues against in a software. It also helps the development team to identify, if the features/bug fix made it through the release. We follow a similar pattern, which can be useful for you too. The version number is strongly tied to the SVN (also valid for other version control systems) branching and tagging convention. Hudson (CI server) also plays an important role in stamping the build number.

Online Recruitment Firm

One of my friend’s over the past few months has been speculating starting her own recruitment firm, but was not sure how to go about investing & setting it up. So we got together and brainstormed a few ideas. We created a list of tools that are of utmost importance for her work. It turns out Microsoft Office, MS Word more precisely is one of the most sought after tools by recruiters, followed by Microsoft Outlook for email. 95-98% of the people seeking jobs send their resumes in MS Word format. Time immemorial email is one of the fastest and most efficient way of bulk communication. Using MS Office is expensive, and word documents are a prime target for carrying viruses. We needed a document reader, an email client and a strong anti-virus software.

Staging environment using VMware

(This document is aimed more towards Java & VMWare, but the same can be replicated for any other language & environment) Abstract You have a team of developers working on different modules for a project-product which are inter-dependant. Each developer diligently writes unit & integration tests supporting their code. You want to set-up an agile test environment to run the unit tests & staging server for integration test, but purchasing hardware for multiple machines is a constraint. The following article provides a guide on how virtualization tools like VMware can be used to set-up staging or QA environment (Agile).

DWR & Hibernate Lazy Loading

Time immemorial, we are all aware about the famous lazy load exceptions in Hibernate. Using a detached object does not exactly hide us from the issue. We are using DWR in our application and found that when marshalling (or unmarshalling if you insist) a detached object to JSON, DWR was erratically trying to call a null (lazyly loaded) object, causing LazyLoadExceptions. We did not want to use OpenSessionInViewFilter as it is evil (some day I'll post all the consolidated rantings as one). You can google and find a lot of info around it. As a quick fix we did what one would first think of, "It's a demo, just eager load it!". Well the demo was over and now was the time to investigate a better solution, and we did find it. It was no rocket science, the solution was available in front of us all along, we just did not look hard enough. When using DWR, there are BeanConverters available which are responsible for this marshalling process. There was one for Hiberante,

By Contract or By Convention

Should we be using interfaces for everything and making everyone explicitly implement them or should we trust that everyone follows the same convention.

2 DTO or not 2 DTO

Since the new project began I've been think about this over and over again reading as many posts and taking ideas from different posts and blogs. The more I read, the less I knew. Below is a collection of few links I've come across which have some conclusive and non-conclusive decisions/arguments, some of these post lean towards POJO's and some towards DTO(Data Transfer Object). Frankly I was not been able to convince myself on what to use. (Leaning more towards POJO's as detached objects).