Learning is an Art

January 6, 2009

Subversion 1.5 released Now What ??

Filed under: OpenSource — Tags: , — Vishwajeet Singh @ 12:15 am

Subversion 1.5 is out and its been almost half year to it. Now thought comes to mind where to go from here, Subversion has still a long way to go from here, Subversion developers should not content with accomplishments in 1.5 its still a long way for Subversion to go to be an enterprise software, having said that I would also like to point that penetration of Subversion in enterprise environment has considerably increased but still it has an uphill task and I am sure that Subversion development team is aware of same.

I am big fan of Subversion thats why I sometime ponder about its future, when I see fanatics talking about GIT, Clearcase and Perforce. I was really saddened when Linus trovalds in his speech said “whole point the Subversion project started is wrong” but I have not found anything wrong with the tool, may be I am not as capable as Linus and neither I am into kernel development but Subversion works pretty well for me and so does for my organization, and there are many other Subversion works for them too.

There is a big wish list which people might have for Subversion but I would say to Subversion developer community add the features which are good for tool as whole and keep in mind that Subversion is version control first anything else later.

January 1, 2009

Ballmer Peak

Filed under: Humor, Programming — Tags: , , — Vishwajeet Singh @ 1:48 am
Ballmer Peak

Ballmer Peak

I agree with Ballmer’s Peak; personal experience if you have proper quantity of alcohol and than do coding you are highly efficient but have no comments on whats that quantity as when I try I am not able to reach to that level but some time it happens on its own.

So alcohol is good for programmers; just kidding. :)

September 3, 2008

Is Google Chrome Just Another Browser ?

Filed under: OpenSource, review — Tags: , , — Vishwajeet Singh @ 3:50 am

Google today released windows installer for windows as stated in there blog. It is available for download from the google’s website.

Many people like me must be having this question is this another browser in the race of already packed crowd or it will stand loud and tall amongst it’s competitors like firefox, Mozilla, Internet Explorer to name few. As per google’s blog we can soon expect the binaries for Linux and Mac as well. Let’s take a first cut look into the browser:

  •  Downloading the browser is pretty easy you can download it from google’s website; intensity of Google pushing with chrome shows up with the fact that the promotional link for chrome can be found on the google.com page; which has been empty till today; no promotion and ads; break the rules if it serves and I really don’t see why Google should not do it.
  • As Google has been adding value to the users with gmail; google suggest to name a few here comes another tool from Google’s arsenal chrome is no exception when it comes to giving the best to users.
  • There is something for everyone whether you are end user or a developer
  • As an end user you can experience the classic color combination which is soothing to eyes; memory usage is pretty low when compared with firefox; it consumes around 1/3 to 1/4 when compared with firefox.
  • As developer you can view source at your disposal; debug javascript and javascript console is also available separately
  • It also gives pretty handy functionality called task manager which gives you amount of physical memory consumed by different tabs
  • The best thing which I liked is installer asking you to make google.com as your default search engine or choose some other search engine to be made default.
  • You don’t need to have separate search box for searching; you can search from address bar itself

If I look at the browsers which I have used Chrome stands a strong chance of success and is a clear winner for me in many aspects; this may embark a new era in browsers history. 

Points mentioned above are not exhaustive neither they cover all functionalities available in Google chrome; this is just a first cut look at the browser. 

 

August 22, 2008

Microsoft and OpenSource Nice Comic at xkcd.om

Filed under: Humor, OpenSource — Tags: , , , — Vishwajeet Singh @ 6:31 pm
opensource

Comic on Microsoft and OpenSource

August 12, 2008

Getting Started with Perl on Windows

Filed under: Programming — Tags: , — Vishwajeet Singh @ 11:21 pm

What is Perl?Perl is a programming language referred as Practical Extraction and Reporting Language written by Larry Wall. It was written with a motto TMTOWTDI i.e.

There’s More Than One Way To Do It.

Perl Properties

  • Interpreted Language
  • “Object-Oriented”
  • Cross-platform
  • Extensible, rich set of libraries
  • Used for Web Programming

What do you need?

  • Active state Perl or any other standard Perl interpreter
  • Any text editor such as notepad

You can download Perl installer from ActiveState download website, you will get a list of installers there, download installer for windows.

Install ActiveState Perl, it does not takes much, simply double click on msi installer file and it will guide you through the rest of installation process.

Now that your installation is over simply go to windows command prompt and do the following

perl -v

You should get the result as below

This is perl, v5.8.8 built for MSWin32-x86-multi-thread
(with 50 registered patches, see perl -V for more detail)

If you get these lines on command prompt, it means that Perl is successfully installed on your machine.

My First program

Just open your favorite editor and type the following lines

#this is my first program
print "Hell World this is my first program";

Your hello world program is ready save it as “helloworld.pl” in any directory you feel like.

Go to command prompt and change the current directory to directory where you have saved your “helloworld.pl” and type on command line

perl helloworld.pl

You will get output as: Hell World this is my first program

Key things to notice:

  • Everything that starts with a hash is a comment in perl
  • Perl statement ends with a semicolon

Perl is a lot more than this hello world program, this was just to give you taste of Perl.

I will be back soon with more elaborate articles on Perl, please keep checking this place.

August 5, 2008

Apache WebDAV and Subversion Autoversioning

Filed under: OpenSource — Tags: , , — Vishwajeet Singh @ 11:56 pm

What is WebDAV

WebDAV stands for “Web-based Distributed Authoring and Versioning”. It is a set of extensions to the HTTP protocol which allows users to collaboratively edit and manage files on remote web servers. The tragedy, though, is that despite the acronym, the RFC specification doesn’t actually describe any sort of version control. Basic WebDAV clients and servers assume only one version of each file or directory exists, and can be repeatedly overwritten.

It was only few years, later RFC 3253 added versioning concepts to WebDAV, placing ‘V’ back in DAV, hence the term DeltaV. WebDAV/DeltaV clients and servers are often called just “DeltaV” programs, since DeltaV implies the existence of basic WebDAV.

Original WebDAV standard has been widely successful. Every modern computer operating system has a general WebDAV client built-in, and a number of popular standalone applications are also able to speak WebDAV — Microsoft Office, Dreamweaver, and Photoshop to name a few. On the server end, the Apache webserver has been able to provide WebDAV services since 1998 and is considered the de-facto open-source standard. There are several other commercial WebDAV servers available, including Microsoft’s own IIS.

DeltaV has not been so successful; it’s very difficult to find any DeltaV clients or servers. The few that do exist are relatively unknown commercial products.

Subversion client is not a fully-implemented DeltaV client. It needs certain types of things from the server that DeltaV itself cannot provide, and thus is largely dependent on a number of Subversion-specific HTTP REPORT requests that only mod_dav_svn understands. And also mod_dav_svn is not a fully-realized DeltaV server. Many portions of the DeltaV specification were irrelevant to Subversion, and thus left unimplemented.

Autoversioning

Though Subversion is neither a full DeltaV client nor the Subversion server a full DeltaV server, there is silver lining known as Autoversioning.
Autoversioning is an optional feature which is defined in the DeltaV standard. A typical DeltaV server will reject a WebDAV client attempting to do PUT to a file that’s under version control. To change a version-controlled file, the server expects a series proper versioning requests: something like MKACTIVITY,CHECKOUT, PUT, CHECKIN. But if the DeltaV server supports Autoversioning, then write-requests from basic WebDAV clients are accepted. The server behaves as if the client had issued the proper series of versioning requests, performing a commit under the hood. In other words, it allows a DeltaV server to interoperate with ordinary WebDAV clients that don’t understand versioning.

To activate autoversioning, you will need to add directive known as SVNAutoversioning in Apache httpd.conf file and set it as on.

<Location /repos>
DAV svn
SVNPath /path/to/repository
SVNAutoversioning on
</Location>

When SVNAutoversioning is on, all write request to from WebDAV clients result in automatic commits. A generic log message is auto-generated and attached to each revision.

For reference on how to set up Subversion repository as network share drive using Windows Web-folders please read Using Subversion Repository as WebShare.

References:

August 1, 2008

Scour.com - Socializing Search a Quick Look

Filed under: review — Tags: , , , — Vishwajeet Singh @ 5:29 am

In this article I am going to share my observation on a search engine scour.com; which claims to be a social search engine.

I would like to randomly point out few of my observations

  • They are try to give a new face to search introducing socialization in searching; instead of reading full clicking on link and reading whole thing I can read comment from fellow users; provided some body has already commented on th result, but again this can easily be spammed with useless and misleading comments I really don’t know how they are going to handle that.
  • The search is cumulative of results from scour, msn, yahoo, google that possibly could give you good results but what I got was not always useful; but still it is a good feature to see in place. But I would like to know what they are doing with all these results before displaying it and how they are claiming that result is optimum.
  • If you type a string which does not give any result on any of the search engines it goes into unknown state and even does not tell you whats wrong; it keeps on displaying searching; I have reported this to them but no response.
  • Time taken for search is higher than any other search engine but that should be expected as it searching three search engines and giving you the results but magnitude is higher than what is expectable; the search which took Google 0.06 seconds scour took around 2.13 seconds and as we say time is money a lot of money is getting lost out there.
  • Worst part for me is that while browsing a result you can not find out what page of the site you are as you get a constant link like this http://scour.com/view/result/?URL=http://www.python.org/ this will remain like this what ever page you navigate; this has a reason behind it to enable you to vote and comment on the result but from usability point of view its not good.
  • They are trying to buy publicity and attention; they have some point system for different actions like searching, commenting on search results, voting on search results and if you are able to reach 6500 points you get $25 visa gift card; I even read some one complaining of being banned when he was about to reach the mark; this raises some fingers on credibility of the company but I will leave it on company to answer that.

I would like to conclude with a thumbs up to them for the idea but idea can only become great if it can be implemented properly. You can not get success and publicity just by throwing some dollars here and there.

July 28, 2008

Getting Started with CSS

Filed under: web design — Tags: , , — Vishwajeet Singh @ 5:48 pm

What is CSS
CSS is an acronym for Cascading Style Sheets. CSS is a style language that defines layout of HTML documents. CSS covers fonts, colors, margins, lines, height, width, background images, advanced positions and a lot more things.

Why CSS was required?

HTML tags were originally designed to define the content of a document. The layout of the document was supposed to be taken care of by the browser, without using any formatting tags. As the Netscape and Internet Explorer started adding new HTML tags and attributes (like font and color attribute) to the original HTML specifications, it become pretty difficult to create Web Sites where the content of HTML documents was clearly separated from the document’s presentation layout. To solve this problem, the World Wide Web Consortium (W3C) - the non profit, standard setting consortium, responsible for standardizing HTML - created STYLES in addition to HTML 4.0.

What I Should Know Before Starting?

You should have basic understanding HTML 4.0 or XHTML 1.0

What CSS can do For Me?

You can control layout of many HTML documents from single style sheet

You can change layout at will, without messing with HTML code

Getting Started

CSS is made of three parts: a selector a property and value

Selector

The selector is normally the HTML element/tag you wish to define, the property is the attribute you wish to change, and each property can take a value. The property and value are separated by a colon, and surrounded by curly braces:

h1
{
font-family:Times New Roman
}

Assigns Times New Roman font to all h1 tags.

If you wish to assign multiple properties, you can do it by separating properties by separating by a semicolon as shown below:

p
{
text-align:right;
color: green;
font-family: Times New Roman;
}

Above example shows how to define a right aligned paragraph, with a green text color.

Grouping Selectors

You can group selectors. Separate each selector with a comma. In the example below we have grouped all the header elements. All header elements will be have font family Times New Roman:

h1,h2,h3,h4
{
font-family: Times New Roman;
}

Selector with Classes

With classes you can assign different styles to same type of HTML elements

p.red {color : red}
p.green {color: center}

You have to use the class atribute in your HTML document as shown below

<p class="red">
This paragraph will have red color.
</p>
<p class="green">
This paragraph will have green color.
</p>

Do not start a class name with numeral. It will not work in Firefox.

Writing Comments in CSS

Comments are as important as code itself, so now we will see how to write comment in CSS. Comment in a CSS file starts with “/*” and ends with “*/”. As shown in example below

/*Begin Header Type */
h1{font-family:Times New Roman; color: red}
h2{font-family:Verdana; color: blue}
h3{font-family:Arial; color: green}
/*End Header Type */

Inserting Style Sheet in Your HTML Document

<head>

<link rel=”stylesheet” type=”text/css” href=”BlueMariner.css” />

</head>

Where BlueMariner is the name of your CSS File.

CSS validator

To make it easier to observe the CSS standard, W3C has made a so-called validator which reads your stylesheet and returns a status listing errors and warnings, if your CSS does not validate. CSS Validator can be also downloaded from W3C WebSite.

July 24, 2008

Using Subversion Repository as WebShare

Filed under: OpenSource — Tags: , , , — Vishwajeet Singh @ 10:33 am

This article assumes that you have installed and running Apache Server 2.0.59 and Apache is hosting your Subversion 1.4.4 repositories on windows XP machine. Might work with other versions and other Operating Systems also but same is not tested as far as I am concerned.

Step1: Changes in Apache httpd.conf

Add SVNAutoversioning directive in your Apache’s configuration file as shown below, which can be found in conf directory Apache installation.

When SVNAutoversioning is active, write requests from WebDAV clients result in automatic commits. A generic log message is auto-generated and attached to each revision. Before activating this feature, however, understand what you’re getting into. WebDAV clients tend to do many write requests, resulting in a huge number of automatically committed revisions. For example, when saving data, many clients will do a PUT of a 0-byte file (as a way of reserving a name) followed by another PUT with the real file data. The single file-write results in two separate commits. Also consider that many applications auto-save every few minutes, resulting in even more commits.

If you have a post-commit hook program that sends email or generates RSS feeds, you may want to disable email and feed generation either altogether, or on certain sections of the repository.

<Location /repos>

DAV svn

SVNPath /path/to/repository

SVNAutoversioning on

ModMimeUsePathInfo on

</Location>

ModMimeUsePathInfo allows mod_mime which is Apache’s module to attempt automatic deduction of the mime-type on new files that enter the repository via autoversioning. The module looks at the file’s named extension and possibly the contents as well; if the file matches some common patterns, then the the file’s svn:mime-type property will be set automatically. For this you will have to uncomment or add the load module directive for mod_mime.

LoadModule mime_module modules/mod_mime.so

Make sure that this line is present in load module section of httpd.conf and uncommented.

Now your Apache is set to accept DeltaV or WebDAV Clients.

Step2: Creating Network Share

Create network share i.e. a web share on some client machine or you can do it on same machine.

Go to My Network places -> add network place

You will see add a network place wizard click on next, than you will ask where you want to create this network place click next.

You will see a window as shown below asking you to enter Internet or network address

Enter http path to your repository, please don’t forget to add port number to it. e.g. http://myserver/repos and click next than you will be asked for authentication enter your credentials for repository access and than it will ask you the name of your network share enter any name you want.

Your repository is mounted as network or Web Share.

Now you can edit your files and cross check your repositories log messages to see auto commits and auto generated log messages. Which say’s commit by a non DeltaV client.

But before really using it you should make sure that you should know what you are doing. As far as I see this can be of great help to people who are non-developer and want to manage documentations with customers and among there team with actually needing a Subversion client lie Tortoise, many people think it’s a killer feature and I am no exception to it but the bottom line is that it comes at cost and you should know what the cost is and you are willing to pay it.

July 20, 2008

Ten Reasons Why You Should Use Subversion

Filed under: OpenSource — Tags: , , — Vishwajeet Singh @ 10:28 am

CVS was pretty good for me. I was not too happy but didn’t have many options either. Then one day, my friend told me about Subversion, the new age version control system. I decided to give it a shot and today I proudly admit that was one of the best decisions I ever took.

Why you should avoid using CVS

Commits are not atomic: that means if your commits fail in between the commit process then you end up in an inconsistent state and after that CVS gives you a lot of pain if you try to commit something.

Un-versioned Directories: As CVS deals at file level there is no versioning at the directory level

Pretty slow branching and tagging

No History of copy, move and rename: No history is maintained while renaming files i.e. if you rename a file all history associated with it is lost and we say it’s a version control! Same is true with moving and copying.

There are a lot many things that I can write, but my aim is not to criticize CVS, but to tell you why you should use Subversion.

Atomic commits: Commits are truly atomic which means either your commits succeed completely or fail completely; you will never be in inconsistent state.

File and Directory rename without losing history: You can happily rename your files without losing history at all.

Copy and Move: Restructure your directory anytime you feel with losing your revision history.

Branching and tagging is cheap operation: Branch as you like and as much you like; it’s fast and simple.

Sends diffs both ways: No bandwidth issues at all, whether you use it through intranet or the internet; as it sends diffs both ways.

Secure network access through https using ssl: It’s pretty important for teams working at different geographical locations to have secure access.

Support for binary files: Subversion treats binary files same as text files. Whether a file is binary or not does not affect the amount of repository space used to store changes to that file, nor does it affect the amount of traffic between client and server. For storage and transmission purposes, Subversion uses a diffing method that works equally well on binary and text files.

Easy backups: You can take backups pretty easily using svnadmin ‘dump’ and ‘hotcopy’.

Migration support for CVS and VSS: Migration scripts are readily available for CVS as well as VSS but people using CVSNT might not have enough luck to migrate successfully using the cvs2svn script.

Folder level access controls: There’s better, more granular security as well; you can set folder level permissions.

There are a lot of points I have missed, as my article is drop in the ocean of the limitless possibilities with Subversion. I’d be happy to hear your feedback on such points and on the article in general.

Older Posts »

Powered by WordPress