Recent Posts
Diovo Technology Blog
Return To Blog Listing
This blog will primarily feature technology stuff. But, there are no clear-cut bounadres for subjects diovo will deal with. You can expect things like: Design, Usability, Development, Security etc.
Recent Posts Tagged With 'programming'
Get cached images from your visitors
[Updated: code changes to reduce the file size by 50%] Jeff Atwood (Coding Horror fame) was in for a horror when he realized that his server crashed and his data was gone and due to some reason, the backup mechanism was not working. The complete da...
Recursion & bad examples
If you ask a typical computer science graduate from Kerala to write a program to print the nth Fibonacci number, most of them* will invariably give you the following function: int fibonacci (int n){ if(n<2){ return n; }else{ ...
Fine-tuning the StackOverflow theme
Being a regular user of StackOverflow, I was constantly being haunted by some of the small design issues in the website. Look at the screenshot below (click to enlarge): I have this problem that I get really confused when visiting websites with a lo...
Using sessions in WordPress
WordPress does not use sessions to hold data. It is a stateless application. This means that if you want to use sessions in your plugins or custom modifications of WordPress, you may need to do a little hack to enable sessions. Edit your wp-config....
Why you probably should not learn Java
There are a lot of programming languages out there and people are always confused about the programming language they should use to develop their applications. We see a lot of people asking the question “Which programming language should I use...
JavaScript: how to set focus in page load
You have this nice little login form in your home page… …and you want people to directly login as soon as they get to the site. To facilitate this, you have set up a small JavaScript code to set the focus automatically to the username t...
Writing your own encryption algorithm? Duh!!
One of my friends was talking to me: Hey you see that guy? He is a very good programmer and he knows a lot of stuff. I asked him whether he knew anything about this encryption algorithm. He told me that he knows a lot about encryption algorithms. In ...
Nails into the wall using Stack Overflow
Online forums and Q&A sites are very helpful in giving answers to technical questions. That is until when they are not. In a recent Stack Overflow podcast, Jeff Attwood and Joel Spolsky illustrated how most of the online forums work (or don’t):...
Portability of Java
In the last semester of our computer engineering course, we had to do a project work which comprised of building and demonstrating a software system. We were given the following instruction: “You must develop the softwares using the Java Progra...
No Testing = FAIL
For a national paper presentation contest in a reputed engineering college, they developed a website for participant registration. Before opening the website, they changed the database table name to a better one. (You know, these developers have go...
Hashing is not a substitute for string comparison
The last day I saw an interesting abuse of hash functions. In an application that processed strings, there was a part where it compared medium sized strings. Instead of using the in-built string comparison routine, they calculated the hash values of ...
Don’t catch exceptions if you are not going to handle them
It is a bad idea to have an application with exception handling like this: catch(SQLException sqlexception) { //This is not supposed happen } This is not supposed happen?!! Seriously? We all know that exceptions are not supposed to h...
Quick tips for database programmers
Since you are smart, you know these things anyway. Just tell your friends too. Avoid using select * from in your queries. Why? Selecting every column in the table reduces the performance of the database, the network and the application in general. Al...
The truth about ignorance
We all know a lot about a whole lot of things. We know a little about a lot of other things too. We have heard of a lot of stuff that we don’t know anything about. i.e, We all know that there are certain stuff that we don’t even know abou...
The funny caching problem
There are many situations when solutions to problems they are supposed to solve only aid in magnifying the problem. Here is one case I came across. There was an application that queried data from the database. It was working fine till somebody got th...
Sanitizing user data: How and where to do it
User data can be dangerous. Whatever the user supplies as data, especially in a web application, cannot be assumed to be safe. On the contrary, there are many malicious users who try to exploit every security vulnerability in your application. XSS, C...
Choosing the length of your database password
Your choice of passwords shows how important the data secured by the password is. If the password for your email account is passw0rd, it means that the data in your email is not important enough (or that you don’t care much about the importance of ...
Are foreign keys really necessary in a database design?
Recently I asked a question in StackOverFlow: Are foreign keys really necessary in a database design? As far as I know, foreign keys are used to aid the programmer to manipulate data in the correct way. Suppose a programmer is actually doing this in ...
Voidy now in beta
Voidy is in beta now. The basic chatting functionality is working fine. The good news is that 50+ of my friends are already using it and giving feedback. The bad news is that since I have not done any PR stunt and since voidy is not featured in any ...
Why Outsourcing Sucks
Most of you don’t even need to read this post to know why outsourcing your software development work to cheaper countries may not ultimately help you. You already know why. The thing is that many people outsource their work to IT hubs like Bang...
Development of Voidy started
Voidy is a IM tool. It will be mainly used for simple group chats. The development of voidy just started. I will update on it when anything intersting comes up. If you really are interested, you can sign up for a beta account by sending me an email....
Message boxes are dead
Every one of us have experienced the bitter taste of a message box staring us at when we try to accomplish some task with our software. Message boxes are used to convey some information, usually thought as important information, to the user and ask h...
How to design software registration keys
Design keys which satisfy two conditions. You will be selling these keys with your software. In the software test for only one condition. Users will anyway reverse-engineer your code and generate fake keys for your software, but these keys will satis...
Who taught who taught you?
In one of my undergraduate classes, a lecturer was teaching the C language. Here is how he explained the while loop: “The while loop will continue in the loop as long as we do not provide the exit condition”. Then he showed us basic structure of ...
Why you should validate all form fields
Cross-site scripting (XSS) and SQL injection attacks are real and growing threats in the web. Malicious users try to exploit any kind of security vulnerability they find in web applications. That is the reason why every single input field in your web...
When not to use a framework
Recently I came across a web application that had just two JSP pages. What does it do? It takes a value from the user and displays his points based on the value. And can you guess the number of back-end files used to help this process? There were 23 ...
More Features Vs Clean UI
After a whole lot of reading from the web about how you can improve the efficiency of your products, you have come to the conclusion that you need to rework on your plans to build the product. You should remove clutter from the software. You have dec...
Code Debugging
The only thing that is more difficult than understanding a programmer’s code is understanding his incomplete code....
The Copy/Paste Standard
Copying data and pasting it wherever necessary is a huge advantage that the field of computers has brought us. It was not possible in earlier communication or data manipulation technologies. Copy/Pasting data saves a lot of time thereby directly affe...
Taking Your Users For Granted
There was small coffee shop in my place. The coffee was great and I used to go there regularly with my friends. Since the coffee was very good, many people came there to hang out with friends. The coffee business was running great. One day they st...
