Cleaning Up: CCleaner

December 1st, 2009 No comments
Name: CCleaner
Version Reviewed: 2.26.1050
Operating System: Windows XP, Vista
Price: Completely free.
Site: http://www.ccleaner.com
Good: Cleans just about everything out of your computer.
Registry cleaning function actually seems to work.
Bad: Tries to install Yahoo toolbar if you don’t look at all the options when installing

CCleaner Logo

A nice little app…

CCleaner is always – always one of the first things I install on a computer I’m working on. This is one of those base utilities you use because it does what it says it does and it does it extremely well.  And it does it for free.  CCleaner is also constantly being updated – always a good sign for a free utility.

What does it do?

First and foremost, CCleaner will search the deepest darkest recesses of your harddrive and clean out the cruft you didn’t even know existed taking up your precious space that could be better spent on pr0n family photos.  I’ve had a sixth-month-old PC recover over a gig of hard-disk space, and if you are a power user like me, you could see upwards of ten gigs  of space get cleaned if you run this every few months.  If you are not a power user (like my mom), this will save you a call to your support center/teenager/geek acquaintance when you start getting those “Out Of Space” messages.

The cleaning function of CCleaner covers most of the normal Windows areas, and then goes further to add support for specific applications.  Internet Explorer is covered, of course.  In addition, I’ve seen it cover Microsoft Office 2007, Firefox, assorted Adobe applications, antivirus suites, Java installations, and more.  For the browsers, you get options for cleaning out the caches, browsing histories, etc… CCleaner is extremely thorough.  You will see options for whatever applications that are installed on your machine which CCleaner covers.

A while ago, CCleaner started branching out and cleaning other aspects of your computer.  The biggest button on the interface besides “Cleaner” is “Registry”.  If you are any higher on the geek scale than “end user”, you cringe and cross yourself when you hear that word.  The Windows Registry is half the reason why the Windows operation system (any version) has so many problems. (The other half is gremlins.  I’ve seen them!).  Performing any operation that could be construed as “cleaning” on the registry has historically been a craps shoot – if the craps shoot involved dice, a semi-automatic, and the broad side of a barn.  One wrong move in the registry can destroy your operating system and make it unbootable – or worse, make it act normal until you’ve just hit the period key on the novella you spent all night typing in at which point the screen freezes up so the dying operating system can mock you with your unrecoverable verbiage and force you to hit the reset button yourself.

Dire predictions and past problems aside, CCleaner has never given me a problem with its tidying up of the registry.  In fact, I’ve actually had problems fixed by this, like explorer locking up every once in a while.  I have to say that most of the registry cleaners I’ve used over the years have been dubious in what benefit they gave in that they sometimes wound up causing more problems than they solved – if they solved any at all.  For cleaning the registry and not killing your computer while at the same time actually providing some benefit, CCleaner gets a gold star.

Special Note

When you install CCleaner, pay special attention to the “Install Options” page that comes up.  The bottom option on that page has historically been “Add CCleaner Yahoo! Toolbar and use CCleaner from your browser”.  If you want the Yahoo toolbar, then leave it checked.  Otherwise, make sure you uncheck that option before you hit the final “Install” button.  There’s a plethora of little apps that try to helpfully install unrelated crap when you don’t pay attention.  In this case, it’s excusable because I’m thinking the advertising dollars CCleaner gets from Yahoo for adding the toolbar to the install is helping to fuel continuing development of such a great utility.  That being said, you don’t want your browser to look like this…

Browser Toolbar Overload

In Closing…

Get it.  Install it. Use it every few months if you are not a geek, and every few weeks if you are. CCleaner is one of the few utilities that even my mom could use, and will patently save you time and money – not to mention a lot of space on your hard drive.

  • Share/Bookmark

PC Remote Control: TeamViewer

November 22nd, 2009 2 comments
Name: Teamviewer
Version Reviewed: 4.1.6911
Price: Free for non-commercial use. $700+ for business to enterprise use.
Site: http://teamviewer.com
Good: Free if not being used for profit.
Do not have to install to use.
No router setup required.
No Administrative rights required.
Bad: File transfer is very slow to connect.
No – really, that’s it. Just the file transfer thing.

Teamviewer LogoA little history…

RealVNC, LogMeIn, and my current favourite, TeamViewer.  You’ve heard of them or read about them, but never quite got up the nerve or found the time to try them out.  If you are a true tech or an Evil Genius In Training, then you’ve a need for tools that help you reach out to the computers of the people you are trying to help, if only to avoid the comical but eminently frustrating whos-on-first game of “Now click on the My Computer icon.  No, not my computer – ‘My Computer’… no no no….”

When I say “reach out”, I mean remote control.  Being able to graphically control a computer at a distance has been around for a very long time now – just ask any grizzled old Unix guru about x11 consoles, or one of those poor souls who administrate Windows servers with Citrix.  In the past, being able to do the same thing from one computer to another computer has required quite a bit of router configuration including setting up port forwarding, and installing the server portion of the software on the computer targeted for remote control.  I’ve done this with RealVNC, setting it up so I could remotely support my mother’s computer in Connecticut from Pennsylvania where I currently reside. In the process, I learned a lot about port forwarding, http tunneling, and router setup.

RealVNC worked well, but was prone to that which had me installing and configuring remote access in the first place: User Ingenuity To Destroy.  To wit: Whenever something went wrong with their broadband, my family’s first impulse was to hard-reset the router, as in “reset and loose all my port-forwarding configuration” the router.  You can see what happens next.  I get a call wondering why something-or-other doesn’t work… I try to remote into the computer… I wind up spending twenty minutes explaining to my mother how to http into the router, trying to remember what the router’s default admin password is, how to add the needed configuration… {sigh}

Enter TeamViewer.  This little company created software that goes around the router, allowing you to get into any computer running the software. I’ve heard you can even use this through a corporate firewall.  Yeah – you heard me right.  You can ditch the corporate VPN software and use TeamViewer to get into your computer at work with no fuss.  At least, that’s what I’ve heard.

How to use it…

Teamview is free to use for non-commercial use, meaning if you are going to use it to help you fix your mom’s computer, you are welcome to it, and all you have to do to get it is visit the Teamviewer site.  There are two stages to using teamviewer.  Stage one is to get the person who’s computer you want to look at to download and run the software. This is easier than you think because of Teamviewer’s option to run the software without installing it.  If you go to the download page, you will see that there are two versions – one usually with the moniker “Quick Support”, and the other being the full version.  All you have to do is have the person at the target computer go to teamviewer’s website and download the quick support version.  On the front page, quick support version can be downloaded by clicking on the “Join A Session” button.

Teamviewer Front Page Download OptionsOnce you’ve got your “user” to make it to the teamview webpage and to hit the “Join A Session” button, on IE you can have them hit the run button of the run-save-cancel trio of buttons to come up.  In Firefox, they’ll have to download and run the program.  With that done, your user should see a small window come up with an ID and a Password.  The ID is the identifier of the computer Teamviewer is running on.  The password will change every time you run the quick support module, making sure no one can get into the computer once they have a password for it.   Have the user give you the ID and password, and the complicated part is over.

As the geek in this little exercise, you get to download the full version of the software and use the ID and password to connect to the user.  The really nice thing about Teamviewer is that even the full version does not have to be installed to use it to remote into another computer.  I’ve downloaded it on the computer at my car dealership while getting an oil change to remote into my computer at work and check my mail.  For the full version, you use the “Create A Session” form to enter the ID of the target computer, and then the password when asked.  A few seconds and a little magic later, and you’ll be staring at a window in which the target computer’s desktop will be displayed, fully under your control.

In closing…

A few closing points.  The remote computer is under your control, but the user on the other end is still in control as well, so you can literally get into a fight over mouse control.  Also, if the user’s screen resolution is higher than yours is, the desktop image on your side will be scaled down to allow you to see the whole thing.  This can result in very tiny icons in the image if their resolution is 1680×1050 and yours is 800×600.  I should also mention that there is  a feature for transferring files between the two connected computers, but it’s been very slow when I’ve used it.  I am hoping this will be fixed in version 5.0.

Lastly, Teamviewer does a whole lot more than what has been mentioned here, so my advice is to get it and play around with it.  It is a very useful piece of software and a worthy addition to any geek’s toolkit.

  • Share/Bookmark

Bashed!: Getting the function return as an array.

November 14th, 2009 2 comments
I want to:

You want to get an array back from a function (which exposes your underlying evil intentions)…

How the hell?
get_haxlog_types() {
    declare -a types
    types[0]="TRACE"
    types[1]="DEBUG"
    types[2]="INFO"
    types[3]="WARN"
    types[4]="ERROR"
    echo "${types[@]}"
}
logTypes=( `get_haxlog_types` )
echo "${logTypes[@]}"
echo "${logTypes[0]}"
echo "${logTypes[2]}"
WhaaaaaaAAAAA?

The above is a slightly modified function from one of my open source bash projects. To see this work, you will need to put the above into a file, and then make that file executable (like chmod 777 [filename] or some such).

There are two parts to this solution – how the function returns and how you assign output of the function to a variable. Let’s start with how the function returns. I’m going to tell you something that will blow your mind here, so try not to utter primal screams and throw various innocent electronics devices around when the light shines. Ready? The return of the function has nothing to do with this.

Yeah – do you see a “return” statement anywhere in the code snippit above? No? That’s because we are not “returning” our array values – aaaand because functions return a numerical value specifying the success or lack thereof of the function execution. In simple terms, “0″ = good. Anything else = “AAAAaaaaahhhhhrrrrg!” The secret sauce of the solution to your problem is something that you are probably already doing if you’ve spent any time working with shell scripting. It’s all in the “echo”.

In a function, as in a shell script, the echo command is your best friend. Most of the time you are just echoing the value of a variable in your script in an attempt to figure out at just what point your code decided to hate you. In this case you are using the fact that the backtick command substitution will take the function name string (get_haxlog_types) and run it as a script command, which then echos the contents of the array you created within that function.

The command substitution doesn’t finish the job, however. To see why, take away the subshell parenthesis and see what you’re left with. A little setup in the example script first:

logTypes=`get_haxlog_types` 
echo "${logTypes}"
echo ${logTypes}
echo "@ = ${logTypes[@]}"
echo "0 = ${logTypes[0]}"
echo "2 = ${logTypes[2]}"

… and then run the script. I’ve called my “test” because I have no imagination:

[root@vps tmp]# ./test
TRACE DEBUG INFO WARN ERROR
TRACE DEBUG INFO WARN ERROR
@ = TRACE DEBUG INFO WARN ERROR
0 = TRACE DEBUG INFO WARN ERROR
2 = 
[root@vps tmp]#

What you’re left with is the array getting echoed in the function (echo "${types[@]}") as one long string and being assigned to the logTypes variable, which is not what we are looking for. To get the echoed string assigned out as an array variable, we use ever useful subshell to get the string filtered through the IFS (internal field separator), which then breaks the string up by the spaces and assigns the now line break (LF) delimited string to the logTypes variable as an array, rather than a single string. Exempli gratia:

The set up, now with subshell secret sauce…

logTypes=(`get_haxlog_types`) 
echo "${logTypes}"
echo ${logTypes}
echo "@ = ${logTypes[@]}"
echo "0 = ${logTypes[0]}"
echo "2 = ${logTypes[2]}"

And the results we’ve wanted:

[root@vps tmp]# ./test
TRACE
TRACE
@ = TRACE DEBUG INFO WARN ERROR
0 = TRACE
2 = INFO
[root@vps tmp]#

That’s all there is to it.

  • Share/Bookmark
Categories: bash Tags: , , , ,

Bashed!: Assigning a directory listing to a variable

November 8th, 2009 No comments
I want to:

You need to get a directory listing into a variable so you can iterate through it and do things (horrible, unspeakable things) to the child files and directories.

How the hell?
DIRECTORY="/root/example"
dirListing=(`ls ${DIRECTORY}`)
WhaaaaaaAAAAA?

We will go over this from the inside out. First, the variable expansion ${DIRECTORY} translates to whatever you have set the variable “DIRECTORY” to. In our example, we’ve set “DIRECTORY” to an example directory I created for this little tutorial:

[root@vps ~]# mkdir example
[root@vps ~]# touch example/one
[root@vps ~]# touch example/two
[root@vps ~]# touch example/three
[root@vps ~]# touch example/four

Next, the backticks (or backquotes), eg `…`, tell the processor to treat everything in them as command line text. This is called a command substitution. This means without the backticks, ls ${DIRECTORY} is a string. Inside the backticks, it is a command.

Once the command is run, the results are run through the IFS filter (internal field separator). Since one of the characters assigned by default to the IFS variable (${IFS}) is a space, the spaces in our directory listing become delimiters, and the resulting string is broken up.

So far, we’ve got the command:

dirListing=`ls ${DIRECTORY}`

… and that seems to treat us well. The directory listing is assigned to the dirListing variable, so you would see something like this:

[root@vps /]# DIRECTORY=/tmp
[root@vps /]# dirListing=`ls ${DIRECTORY}`
[root@vps /]# echo ${dirListing}
four one three two

Notice that the string looks still to be all one line? It isn’t really – try using double quotes and you’ll see how the string is now broken up by the IFS:

[root@vps ~]# echo "${dirListing}"
four
one
three
two
[root@vps ~]#

So why aren’t we happy yet? Well, if you knew a little bit more about variable expansion in bash, you’d then realize that with the echo command, we are technically asking the shell to print out either ${dirListing} or ${dirListing[0]}. The former means the entire string assigned to the dirListing variable, and the latter means the first element of the dirListing array. If we try echoing the first element of an array however, we get this:

[root@vps ~]# echo "${dirListing[0]}"
four
one
three
two
[root@vps ~]#

The string was broken up, but unless you use double quotes to print it out, you don’t see the LF line breaks, and the entire output was assigned as a long string again – not as the array we are looking for. To get an array, we need to use a subshell. Now the subshell does quite a bit, but we are only interested in one particular effect is has on the output of delimited strings when that output is assigned to a variable. Yes, that is a VERY specific use case of subshell parenthesis! Try this:

[root@vps ~]# (`ls ${DIRECTORY}`)
-bash: four: command not found
[root@vps ~]#

In my case, “four” is the name of the first file in my “/root/tmp” directory. The subshell tried to execute it, like it is supposed to. If that file had been executable, it would have been run, and then the next file name would have been executed. We aren’t looking for execution though – we want the broken up string assigned out as an array. Let’s run the same command and this time assign the output to our variable…

[root@vps ~]# DIRECTORY="/tmp"
[root@vps ~]# dirListing=(`ls ${DIRECTORY}`)
[root@vps ~]# echo $dirListing
four
[root@vps ~]# echo ${dirListing}
four
[root@vps ~]#

Remember that using the ${…} form of variable designation actually outputs either the value of the variable or the first element of the array (eg: ${…[0]})? Looks like the we got our array output! Let’s check the next few elements to make sure:

[root@vps ~]# echo ${dirListing[1]}
one
[root@vps ~]# echo ${dirListing[2]}
three
[root@vps ~]# echo ${dirListing[3]}
two
[root@vps ~]#

See? That wasn’t so hard, was it?

  • Share/Bookmark
Categories: bash Tags: , , , ,

Adsense Nonsense

February 12th, 2009 No comments

If you look around my humble little blog here, you are probably noticing a dearth of content.  Given that I’ve just started out in my blogging phase, something possibly every true tech head goes through, the short list of posts so far is perfectly understandable.  What is also understandable is my wish to make some kind of money off all this effort I’m putting into my literary work of vanity, a wish I took to the web in an effort to find an advertiser that would share their earning with me in exchange for some small share of real estate in my posts and on my front page.

Advertising on blogs and the like is a break-even to small comfort proposition, unless your name is Ariana Huffington.  Apparently, because I did not know this before my mental spewing venture, once you start advertising on your site, your entire existence consists of clicking the refresh button on your webalizer or statpress log pages like a rabid chain-smoking day-trader.  Actually posting  contents becomes secondary.  Given that the need to make even the small amount necessary to cover your hosting costs for your site, finding an advertising company that will both treat you right and pay you well becomes very important.  Keep those two things in mind as we go on…

After much research on the internet machine, I settled on Google Adsense.  There was a lot of information out there on their Adsense service, and even more pixels dedicated to get-rich-quick schemes using the service.  Signing up for Adsense for free and adding some JavaScript to my site and then collecting money sounded pretty good to me.  Even though I’ve just started, I’m knowledgeable enough and definitely egotistical enough to be sure that I’m going to continue adding content for a while to come, assuring me a growing number of clicks and therefor a growing check from the guys who claim the motto “Do no Evil”.   I make money.  Google makes money.  Google’s advertisers make money.  Everyone wins.

Well – no they don’t.  Let Me Explain — No, There Is Too Much.  Let Me Summarize.  I signed up for their service, got my account, created a few ads and even dared a channel.  I put the ads on my site using a Wordpress plugin called Smart Ads.  After a day, the ads started matching the content on my site.  I told people about my new blog – friends, family, etc… After a week, I had about $18.00 in my account, spurring dreams of the blog actually paying for itself and possibly providing a little extra with which I could buy new tech.  I was very happy.  And then it happened.  I logged into my account one morning about a week after I opened it and I got the dreaded message:

Account Disabled

Your AdSense account for this login is currently disabled. We recommend checking your email inboxes for any messages we may have sent you regarding your account status. Sometimes our messages can be caught by email filters, so please be sure to check the Bulk/Spam folders of your email accounts as well. If your account was disabled for invalid click activity, please visit our Disabled Account FAQ for more information.

Well.  That sucks.

I Did What?

After the initial shock, my brain kicked into overdrive to asses the situation, running through hundreds – nay, thousands of options which streamed in front of me terminator HUD style, each being evaluated against a laundry list of variables to determine the exact cause of my embarrassment.  Only one conclusion rose to the top of my full statistical analysis of all the possible vectors.  That conclusion: “What the hell!?!”

Next stop was my email account, in which I found this wonderfully helpful missive…

While going through our records recently, we found that your AdSense account has posed a significant risk to our AdWords advertisers. Since keeping your account in our publisher network may financially damage our advertisers in the future, we’ve decided to disable your account.

Please understand that we consider this a necessary step to protect the interests of both our advertisers and our other AdSense publishers. We realize the inconvenience this may cause you, and we thank you in advance for your understanding and cooperation.

If you have any questions about your account or the actions we’ve taken, please do not reply to this email. You can find more information by visiting https://www.google.com/adsense/support/bin/answer.py?answer=57153&hl=en_US.

Sincerely,

The Google AdSense Team

You’re kidding me…  This site?  MyTechHell.com?  What was the significant risk? – that they might learn something about hardware?  Is the Java language anathema to the advertisers?  To quote one great American cartoon character – “What did I did wrong?”

Having exhausted my almost non-existent knowledge on the subject of getting rejected by online advertising companies, I turned once again to the internet machine to find solace and an answer as to how to remove the scarlet “R” from my account.  On my first page of results, however, I found a whole different story.  Go ahead – do a search with the words “adsense account disabled” and see what comes up.  You’ll find exactly what I did: Google seems to be running a grift of epic proportions.

They’re Doing What?!?

For the most part, you can figure out a lot by taking a look at the information on adsenseaccountdisabled.com.  The gist of that site and other sites, blog entries, and forums is that Google will suddenly and without warning cancel people’s accounts in what seems to be a completely arbitrary fashion.  In my case, this website was approved for an account, and a week later they suddenly found that it violated their T&C (Terms and Conditions).  The difference between when they approved my site and disapproved of it?  One post.  A post reviewing a Logitech Mouse.  I already knew that Google uses pidgeons to rank web pages,   but could it be that they are using cats to manage their Adsense business?

cat-on-computer funny_cat_pictures_pc_2

It is a sad fact that by all accounts, only about one percent of those so ejected from Adsense are ever allowed to return.  Using the link included in your rejection letter to get the appeal form is almost worthless given this statistic.  Even worse, most people have no idea what they did to incur Google’s wrath.  Oh, I’m sure there are a lot of people who say they didn’t do anything while they shut down their auto-click applications, but it is statistically improbably that the number of site owners having this problem would all turn out to be click fraudsters or porn magnates, and the only answer anyone has ever gotten from Google is this:

Because we have a need to protect our proprietary detection system, we’re unable to provide our publishers with any information about their account activity, including any web pages, users, or third-party services that may have been involved.

Riiiiggggghhhht…  So Google thinks my website is somehow harmful to their advertisers (even though they approved my site only a week before), but they can’t tell me exactly what they found that was considered harmful, and whatever it was was so egregious an affront to their terms of service that no warning was given before termination.  Oh – wait… I forgot.  There’s no evidence anywhere on the ‘net that warnings are ever given.  It’s the equivalent of telling someone out of the blue that they’ve broken the law and sending them directly to death row.

So here I am, a user of a great many of Google’s wares including Chrome, gmail, search engine (of course!), etc…  and yet as far as their advertising department is concerned, I’m a depraved villain trying to take their money.  Well, I’ve got three questions for them that they will probably never answer.

  1. If you can detect fraudulent clicks, why aren’t you just filtering them out?
  2. How in the name of all that is good and pure does one click on an ad on your own site constitute enough click fraud to dole out the same punishment you apply to people who spend years creating systems to hide thousands of fraudulent clicks a day from you to scam you out of thousands of dollars a month?
  3. I know you want to protect your “algorithm” (who’s name is probably Mrs. Whiskers) from the world at large, but what the hell did you find so offensive on a site about technology???

Keep in mind that I did not fall into the “click fraud” category.  I was summarily accused of posing “a significant risk to [Google's] AdWords advertisers.“  Even if the risk was that I did not have enough content yet, I’d be fine with that (and very busy for the next few weeks), but there’s no way to tell what the problem could possibly be.

Where’s My Check?

And people are loosing major money because of this problem.  I lost $18.xx dollars.  Not enough for me to cry over, but there are stories on the ‘net about people loosing their accounts with thousands of dollars in them, and suspiciously, they almost without fail seem to have their account yanked only a day or two before a check is supposed to be cut.  Even more suspiciously is where that money supposedly goes.  Let’s go back to Google’s “You’re Screwed” FAQ:

According to our Terms and Conditions, publishers disabled for invalid click activity may not receive any further payment. The earnings on your account will be properly returned to the affected advertisers.

Please also note that we place stop payments on any outstanding checks for accounts that have been disabled for invalid click activity. We ask that you refrain from depositing any checks you may receive in the future, as your bank may charge fees for depositing a stopped check.

I challenge anyone reading this to find one advertiser that actually got a refund check or had their fees reduced due to click fraud.  It would seem no one on the ‘net can find one, with several helpful Adclick users chiming in that they’ve never seen a penny returned to them for anything.  What’s more, if Google can determine click fraud so swiftly that the advertisers are never charged for invalid clicks, then what’s the deal with disabling accounts where one or two misplaced clicks occurred?  I have two cats that live with me that love walking over keyboards, and sometimes I’d like to verify what the ads placed on my site are linking to, and several other reasons why canceling for even a click or two a day is absolutely ludicrous.

I Has A Sad…

This whole post may constitute a long, drawn-out rant, but considering the sheer number of people having the same problem, I feel that adding my voice to theirs can only help to keep bubbling this problem up to the top of the general consciousness, and hopefully spur someone who can actually do something about it (Lawyers? Start your class action lawsuit engines!), to call Google Adsense what it’s starting to look like – a major scam.

In the end, for me at least, what really galls me is that I have been accused of doing “wrong” when I do my very best to be a good netizen.  Even given all the evidence that Google is doing this to thousands of people and by all maths, making a LOT of money off of it, I still get a twinge thinking that just maybe I really did do something wrong.  Hopefully this “problem” with Adsense will be corrected in the near future and give me a little vindication, but then again, the posts on the ‘net go back as early as 2006, so I’m not going to hold my breath.  If you are reading this, I’d think long and hard before I signed up for Adsense, because there’s a good chance you’ll get that apologetic email and most likely right when you’re about to collect a check you were really counting on.

And now, for your clicking pleasure, here are a list of links to the sites I found most informative on this subject:

Addendum

I foolishly tried to get reinstated.  Google says to expect a reply up to 48 hours from when you submit your “I did what?” query.  I got mine a little under the 72 hour mark, and what a surprise:

Hello,

Thanks for providing us with additional information. However, after thoroughly reviewing your account data and taking your feedback into consideration, we’ve re-confirmed that your account poses a significant risk to our advertisers. For this reason, we’re unable to reinstate your account. Thank you for your understanding.

As a reminder, if you have any questions about your account or the actions we’ve taken, please do not reply to this email. You can find more information by visiting https://www.google.com/adsense/support/bin/answer.py?answer=57153.

Do they realise what kind of animosity they are engendering on the ‘net with whatever secret policy they are using to cancel our accounts?

  • Share/Bookmark
Categories: Blogging Tags: , , ,