How to Unrecover Deleted Files

Through an accident, I blame the dog for this one, my entire documents folder got deleted this morning. To compound the issue, the folder was 'too big' for the wimpy Recycle Bin, so the files were permanently deleted. When I realized what had happened, I nearly went into shock.

Customer documentation, contracts, important pictures of aforementioned dog, all down the drain. I'm definitely going to have a bad day now...I thought.

After normal breathing resumed, I learned 2 things.

  • System Restore does not help unrecover files
  • I really should have backed up my computer

I'm calmly writing this blog post because I found Free Undelete by Recoveronix Ltd. Free Undelete will look for deleted files and directories and restore them to their former glory. Brilliantly simple to use, and priced at $0 for personal use, I am a fan for life.

Recoveronix Ltd has an entire suite of recovery products like:

Get familiar with this list. I know grad students that would give their right arm to get back a mistakenly deleted thesis.

Important!! Read This!!

If you are furiously downloading Free Undelete right now to recover files of your own, pay attention to the following tips from the FreeUndelete folks:

Proper Usage Techniques

A deleted file is essentially an area on disk designated as free and ready to accept data (such as contents of some other file). Luckily, unless the area has already been overwritten, it still holds the contents of the deleted file. Due to this fact it is possible to undelete files.

This fact also dictates the following procedure for using FreeUndelete:

  1. Stop any activity on the disk you are going to undelete files from! Remember that writing to that disk can damage the contents of the deleted files. Examples of disastrous activity include: copying files to the disk, installing programs there or running programs that use the disk as their swap media.
  2. Download and install FreeUndelete. Whenever possible, save the setup executable and install the program to a disk that does not hold files you need to undelete.
  3. Run and use FreeUndelete.
  4. 14712 Views Print Print Comments (7) Random, Wow

Tip to Speed Up Your Website - Compress CSS

There are a number of ways to speed up a website. An easy one would be to compress asset files and compact the files. This has been widely done for Javascript files with popular tools such as JSMIN and Packer.

The general idea behind compression/combination is to reduce the number of characters that must be sent over the wire as well as reduce the number of HTTP calls that must be made. Each time a browser gets a request to download a JS file, there is a certain amount of overhead incurred in negotiating and completing the HTTP request. Combining all JS files into one file is a great way to speed up a web application.

Everyone Already Knows This, Right?

Probably. However, CSS files can often be as numerous and verbose as Javascript files. How come there no public outcry for CSS compression/combination?

There happens to be a compressor/combinator that handles CSS files, the YUI Compressor. For most web application developers, YUI Compressor is an annoying tool to use because, as a java application, it must be installed and run from the command line. Yuck!, right?

Scriptalizer, developed by ColdFusion luminary Aaron Lynch, is a web front end for the YUI compressor. Scriptalizer has handled Javascript compression/combination for a while now and is a nicely designed, easy to use tool. Aaron recently added support for CSS compression/combination. Now, dealing with CSS files is as simple as dealing with JS files.

How well does it work?

I added all 14 CSS files from The Health Challenge and compressed/combined them with Scriptalizer. Here are the results:

  • Number of Files Before: 14
  • File Size of All Files: 35.42 KB
  • Number of Files After: 1
  • File Size of All Files: 19.96 KB

As you can see, the reduction was significant. Not only have I cut the size of my CSS assets by ~50%, I have also removed 13 HTTP connections.

I searched and found CFSearching

I've been working on The Health Challenge over the last month and ran into a usability issue using my CFChart implementation. Apparently with enough data points, the labels would all jam into each other and become an unreadable mess. Have a look...

CFChart is actually a wrapped up implementation of WebCharts 3D, a full featured charting engine. ColdFusion ships with a Chart Stylizer that adds significant functionality to the generated charts. I've been using this Chart Stylizer for years now. However, I couldn't find an option to help me out with this X Axis Traffic Jam. Through a bit of google magic, I ended up on a blog I'd not seen before called CFSearching which addressed this issue for the Y Axis and after digging around the stylizer, I found a similar option for the X Axis.

view plain print about
2 <groupStyle skipLabels="{SkipLabels}"/>
Problem solved! See:

CFSearching has a number of very nicely written articles about CFChart, iText, Coldfusion and other important topics. For example, have you ever wanted to Create a Gantt Chart with CFChart or what about Calling ColdFusion functions from PDFPageEvents in iText? There are some very good articles up at CFSearching, go take a look!

Comment Spam Reduced to 0

Whaddya mean? Spam on

Blame popularity, notoriety or just plain old dumb luck. The blog has been recently attacked by a particularly motivated spammer crew operating from IP addresses in China and Russia. This meant endlessly going into my blogCFC administration and removing any spam posts from the night before. Annoying, redundant and frustrating.

Sounds Annoying, Redundant and Frustrating, what did you do?

In a moment of intense frustration, I pulled every IP address in my block list and wrote a script to block the entire Class A address for that specific spammer. Even though this solution would block whole countries and over 2 billion people from adding their comments to the conversation on, it was a decent tradeoff to not deal with these persistent spammers.

Hmm... Seems drastic, like killing a fly with a shotgun

As the Rage subsided, I realized that even that Nuclear option was really only a temporary solution. I'd be forced to chase an endless stream of IP addresses and would still subject my readers to assaults of Viagra, Batteries and WoW gold. There had to be another way...After a litte effort, I reached the 0 Comment Spam solution

0 Comment Spam? Do Tell!

Jake Munson wrote a library called CFFormProtect. This library protects any form from robotic spam and well as human entered spam. It has all sorts of tests that it uses to grade comments as spamorific or legit and blocks the spamorific ones from posting. Imagine if ColdFusion had an IsSpam() function.

How long did it take you to implement?

From start to finish, about 20 minutes. That includes downloading the project, reading the docs, and altering the appropriate parts of BlogCFC.

That's it? Why didn't you do it sooner?

A good question. I've asked myself that. A few times.

And you have gotten 0 Comment Spam?

Yeah, 0. Not a single one. The weeks leading up to this I had been assaulted from numerous sources, sometimes as many as 30 comment spam a night. Now I get 0.

What are you waiting for? Go Download CFFormProtect today!

10565 Views Print Print Comments (15) Wow

TransferORM gets closer to 1.0 release

The word on the street is Transfer 1.0 will be in release candidate status at CF.Objective 2008. I've actually overheard that the Transfer code in SVN ( ) is complete and ready for the 1.0 release, all that remains is documentation. Mark Mandel has been quite specific that the 1.0 release will be properly documented. It appears as if he has been quite busy. I just stumbled upon the new Transfer documentation and MAN is it looking sweet!


AOP in the database

A good friend of mine is an excellent Oracle Trainer / Consultant. I noticed an article on his blog about rewriting queries on the fly. Quite interesting stuff. Similar to method interception in Aspect Oriented Programming, a query can be substituted over another in real time.

Like it or not, there are millions upon millions of lines of software code where values and rules are hardcoded. Using DBMS_ADVANCED_REWRITE isn't for the feint of heart. If a system had embedded or hard coded rules and needed to change over to a new set of rules, this technique could help ensure compliance and speed up the development time.

Should a system be built around this method? Certainly not, but if a legacy system needs to be updated quickly and accurately, this technique is gold in the right hands.

Steve Karam explains: Trick 2 Rewrite a Query At Runtime

4919 Views Print Print Comments (2) Wow