Javascript Libraries and Tools.
Here are some javascript libraries and tools that I find useful:
http://jquery.com/
http://www.bitrepository.com/ajax-login-modal-box.html
http://tablesorter.com/docs/
Comment on Javascript Libraries and Tools.
Perforce/VSS/CSV and Subversion: Mistakes Made
A Bug/Version control software story:
I figured I would share one of my most embarassing development stories with the whole wide internet. This happened about 10 years ago and never happened again since so I think I’ve learned from the mistake.
I had been working on a particularly crappy piece of code that no one else in the company wanted to do. I call it crappy because no one in their right mind would go about trying to modify MFC code to do what I was doing.
I was Hacking MFC to make tab panes for dialogs that had a particular behaviour. At the time I had barely an inkling of win32 coding at the time and modifying MFC is was a lesson in pain I wouldn’t want to inflict on my worst enemy.
After spending nearly a week or more I had just finished the tabbed dialogs and went to check in my completed work.
I had not checked in my work for nearly a week but since everything seemed to work AOK I went to check it in.
However, instead of checking in my code I mistakenly got the lastest code I checked in. It overwrote all of my work and changes up until that point.
Lets just say I had a panic attack. I’ve had 1 case before that where someone else had overwritten my code but up until that point I’ve never had that myself. In the previous case I was able to retrieve the code because it was on a FAT disk system. For whatever reason this time around I wasn’t able to get my code back. (NTFS ARGGG)
All I know is I didn’t retrieve files this time around and within a couple weeks I was out of a job.
What did I learn from that mistake?
1. Check your code in daily. If the class compiles. Check it in.
2. Use an editor that has a local history. (eclipse, etc)
That way if you do “get latest” over some file you can restore it.
Occationally I do “get lastest” over code I had not intended. However with the tools and experience
I’ve found the mistakes can be minimized.
Comment on Perforce/VSS/CSV and Subversion: Mistakes Made
Javascript prompt() replacements
javascript prompt() replacement.
I wanted a simple to use function to ask the user for some information.
The javascript prompt() function seemed like a good way of doing this until
you notice the security issues with IE.
So I visited google and started looking for replacements.
http://www.anyexample.com/webdev/javascript/ie7_javascript_prompt()_alternative.xml
Tried it out. Works. Didn’t like the design.
http://www.skybound.nl/products/javascript/Prompt/
Tried it. Works. Not polished.
http://meteora.astrata.com.mx/
Tried it. Works. Works and looks nice.
http://abeautifulsite.net/2008/12/jquery-alert-dialogs/
Tried it. Using it based on suggestion from another developer.
Comment on Javascript prompt() replacements
Finding and Removing duplicate data from SQL Tables
Here’s an decent article with various methods of finding duplicate data in databases with SQL.
http://www.delphifaq.com/faq/delphi/database/f20.shtml
Removing duplicate data can be a troublesome task as well. One of the fastest ways to do so involves creating a new table with a unique index to the column you wish to purge of duplicate data.
Then you copy data over form the original table to the new using a insert ignore into table ( columns ) select columns from table type of query. Don’t forget the “ignore” otherwise the batch insert will fail at the first case of a duplicate piece of data.
Comment on Finding and Removing duplicate data from SQL Tables