Archive for the ‘super quick tip’ Category


why disabling right click is pointless

May 8, 2008

A few people out there think that if they add some simple JavaScript to disable right clicking, their code will be safe. For those of you wondering, yes, this can be done. And yes, it is totally pointless.

Here is a link to the script:

Web developers dream of the day when there (client-side) code would be completely invisible to visitors. Why, you might ask? Because, it takes time to develop sweet scripts to make a website functional; who wants some script kiddie stealing borrowing there precious scripts. Not only that, Mac users could care less about right clicking, they only have a single click!

Normally by right-clicking (in Windows) on a web page, you have access to such great features like: properties, view page info, exporting options (depending on your browser), and the infamous view page source. The thing is, you could also view a page’s source (and other exciting options) by clicking on your browsers tool bar and finding the same option. And if you think that you might be protecting your images by disabling this function, just remember that there is a little thing called cache.

With this in mind, why would someone want to disable right clicking? Is there any functional reason that someone would do so? Please, someone tell my why you would want to do this, I just don’t get it.


Count records using ExecuteScalar in ASP.NET

April 15, 2008

After much research, it was incredibly annoying to try and find a decent script on how to count records from a database using ASP.NET (via VB). I gathered from different resources and wrote a simple script to get the job done. I decided to post it in case anyone is going through the same headache I just went through.

You can put this in a function and return the record count easily. The following is a simple example of how to count records using ExcuteScalar in ASP.NET.

Dim SQLString As String = “SELECT Count(columnName) FROM tableName
yourDBConnection As New SqlConnection()
yourDBConnection.ConnectionString = yourConnectionString

cmd As New SqlCommand()
Dim recCount As Integer


cmd.Connection = yourDBConnection
cmd.CommandText = SQLString
recCount = Integer.Parse(cmd.ExecuteScalar().ToString)


‘Return recCount

Happy programming!


custom validators

October 31, 2007

If you are a dot net user, then you know that the built in functions for validating user input is a designers dream. You can even customize the validator to check for your own custom strings. Because writing them can be a pain, is a user submitted site where people post their own custom validation strings. This is a tremendous time saver when your busy writing applications to save time for someone else (or your self, either way 😉 )


smart object

October 30, 2007

Whenever you drop an image in your (CS3) Photoshop file, make it a habit of converting that layer into a smart object. This will retain the quality of the image if you plan to re-size it later. If you don’t make it a smart object and you re-size your image smaller, then re-size it bigger later, you will end up with a crappy picture. There are some set backs to creating a smart object; can’t link up layer masks, can’t edit the actual layer, can’t sample to the layer, stuff like that (this is fine, simply duplicate your layer in question and rasterize it). Either way, it will be a life saver if you are ever in pixel hell.


screen captions rock

September 17, 2007

Web designers sometimes come out with some beautiful layouts and color schemes; why not steal borrow them? If you happen to stumble upon a nice site, use the “Print Screen” function on your keyboard and paste it in photoshop (or whatever you use to tinker with images).

From here, you could set up guidelines, get color schemes (by sampling colors), and get inspired to create your own work. Now don’t get all carried away and use every idea exactly the way you saw it. The last thing you want to do is get recognized on Improvise and get inspired to design your own creation. You never know, someday people will start stealing borrowing from you.


alt tags

August 22, 2007

This is what an alt tag can do.
(Firefox users will not see the error above. Check this post out on Internet Explorer)

Next time your browsing the net, if you roll over an image you’ll often see some text. The message is generated from the alt tag properties on an image. It provides visitors useful information about the image. It’s also a sweet spot for search engines to pick up on important key words.

It’s a simple tag; alt=”some text”. It’s good to have if your visitors have images turned off on their browsers. Try and be as descriptive as possible with your alt tags. That doesn’t mean you have to bore your visitors with a paragraph of information. Keep it simple. If your image is promoting an event, you can put the event name, date, and time.

Again, don’t underestimate the power that search engines have on key words located in alt tags.


take a break

June 14, 2007

When your doing web/print work, it can sometimes be a headache. There have been times that I forgot to eat just trying to debug something. Staring at your monitor non-stop can not only due damage to your eyes, but it can have an effect in your work. It may sound obvious but without an intermission, working can seem endless.

Take a break! Then you should get your ass back to work.