Posts

Showing posts with the label development

SVN Setup on Linux Box

Create the Repository sudo svnadmin create /var/svn/repositories/test Allow the Apache to read and write to the repository sudo chown -R www-data:www-data /var/svn/repositories/test Create the permissions file with the first user. sudo htpasswd -c /etc/subversion/passwd dragon Subsequent users can be added by same command WITHOUT the -c option. Edit the apache2.conf file sudo gedit /etc/apache2/apache2.conf <Location /svn> DAV svn SVNParentPath /var/svn/repositories/ SVNListParentPath On AuthType Basic AuthName "Test" AuthUserFile /etc/subversion/passwd <LimitExcept GET PROPFIND OPTIONS REPORT> Require valid-user </LimitExcept> </Location>

Logging messages to Javascript console

Image
If you have had experience of web development and have hands on javascript coding, you will know how difficult it becomes at times when you have to debug javascript code. And it gets worse when you have multiple browsers rendering the javascript in their own ways. I could remember debugging the javascript code manually by putting those crappy and irritating alert() messages in the code to know how the code is being executed to root cause the issue. And if you know what I am talking about, you will know what I am talking about. But browsers have evolved a lot is the last five years and so as the tools for web development. When I first started using the Web Developer addon , it was like I had waited for it since ages for it. And I still feel there is no match for it. Even though the javascript console was available in Firefox, with usage of Web Developer, it was more accessible than ever. Okay. Too much theory. Lets get to point. You need to debug javascript pages and get rid of those al...

A nightmare at the dawn

It could have been great, but now marked as a bugged release. The worst of the times in the life of a developer when a module or code, written with so much dedication and tested rigourously, is marked as a bugged one (Note: I know the analogy is pretty debatable that if it's tested rigourously, then how come it contains bugs. But the fact remains that some bugs do creep up; especially at the crucial junctures of the product development) . But my case is different because what I wrote does not contain any bugs, rather it did not get bundled along with the delivered module, resulting in the broken functionalities and loop holes. And believe me there is no other terrible feeling like it. You seem to think all sort of stuff like - Why I did not check it for once, How could I miss those, What will happen now, What effect would it make on the project, Wish 8-10 hours earlier, I would have known about it, then I could have bundled it, etc. etc. etc. But they are all wild thoughts of your ...

Javascript - parseInt bug

Working in javascript on the my project, I found an interesting thing which I would like to share with you all. parseInt() method in javascript is used to parse a string text into integer. For example to convert String “8” as integer 8 for processing, you will use it as follows: var parsedValue = parseInt(“8”); You can find more details about the parseInt() method on W3C Schools. http://www.w3schools.com/jsref/jsref_parseInt.asp However, there is an interesting bug with parseInt(). When you try to parseInt("08") or parseInt("09"), it returns 0. This is because the leading zero tells the parseInt() method that it is an octal number and 08 is not a valid octal value. Hence the parsing returns 0 as output. So, you might get this scenario when you trying to parse date values or month values containing leading zeros. Workaround: - Use the alternate form of parseInt(value, radix). This form forces the parsing of the string value as per your radix value. 10 indicate for de...