Category Archives: Tips

RSpec Matchers: Be careful while testing boolean values

While testing methods that return boolean values in ruby (the ones that end in ‘?’), try to avoid following matchers: method_returning_true?.should be_true or method_returning_false?should be_false This is because, ‘be_true’ and ‘be_false’ matchers considers ‘nil’ to be false and anything other than ‘nil’ to be true. When we write methods in ruby which end with question [...]

Search Google Visually

Today I came across an online tool that allows you to see the screenshot of pages in the google search result. You can give it a try at “Veesual.com” While I found the concept to be interesting, I was wondering what could be the use of looking at screenshots of pages in search result. What [...]

Simple equivalent of “With” statement in C#

Consider the following class in C# public class Person { private string name; private int age; public string Name{ get {return name;} set { name = value; } } public int Age{ get {return age;} set { age = value; } } } If I want to set the value of Name and Age property [...]

Fixing SyntaxHighligher plugin in WordPress Blass2 theme

Yesterday I installed and activated Blass2 theme for this blog. I liked this theme as it was very simple and free from any extra graphics. After installing the theme, I discovered that “SyntaxHighlighter Evolved” plugin which I use to display code segments, was not working. I searched for other themes which are similar to blass2 [...]

After file and photo sharing, it’s time for “code sharing”

If we want to share a file or photos while chatting with our friends on internet using IM tools like GTalk, we use file sharing services available online. These services allow us to upload a file to their servers and give us a link which we can share with our friends. But what if you [...]

Missing attachment detector in Gmail

It is really embarrassing to send an email with an attachment and actually forgetting to attach the file you were supposed to mail along, isn’t it? In my case, I often forget to attach files to emails if I’m typing it in hurry. Sometimes, I even end up receiving replies from recipients of those emails [...]

Fixing NTLM authentication in Windows 2003

We had an application written in C# .Net, which used to communicate with Alfresco Enterprise Document/Content Management System. The application was using Alfresco’s NTLM component for authenticating users against their AD (Active Directory) user account. The application worked perfectly while we were testing it on Windows XP system. However, on Windows 2003 64 Bit system, [...]

Be careful while using ‘replaceAll’ and ‘replaceFirst’ methods of String class in Java

Most of the time, while trying to replace a substring in a given string, either all its occurrences or just the first one, java programmers tend to use ‘replaceAll’ and ‘replaceFirst’ methods provided by String class in Java. Java programmers like to use these methods to replace substrings as compared to ‘replace’ method of String [...]

Something useful: A WYSIWYG WordPress theme editor

Here’s an oldie but a goodie. Confounded by trying to track down fancy-looking WordPress themes? Check out this Web- based theme editor that lets you tweak every nook and cranny of a theme then spit it back to your server to go live. You can add columns, change fonts and backgrounds, even throw in a [...]

Active mind and software development

Every software developer knows the importance of his or her own mind. Well, I feel that software development itself is an excellent mind game where an active mind can help you to drive the design and development of your software effectively. If you are involved in the development of software for a domain where requirements [...]