Manually Download and Install VMware Tools

The automatic VMmare Tools install is convenient. However, I needed to run Ubuntu 14 as a guest with an old version of VMware Player (because it is the standard, at my employer). The old Player would not download a Tools that was newer than the Player.

The packages appear to be at https://packages.vmware.com/tools/esx/latest/index.html

Why I Do Not Use Pages on the Mac

Apple is not really into backward compatibility. When they release a new version of Pages or Numbers, it will open files from the previous version. Generally speaking, you can’t go back 2 or 3 versions. This means that every time you upgrade iWork, you’re really supposed to find all of your old files and upgrade them.

I’m not going to do that.

As ugly as it is, Office is big on backward compatibility. You can still open really, really old Word or Excel files in recent editions of Office.

I Hate My MacBook Pro

I have an early 2011 MacBook Pro. I’m one of the people who has been hit by the solder problem on the GPU see https://discussions.apple.com/thread/4766577?start=480&tstart=0. Of course, it happened a few months after my AppleCare expired, when my MacBook was just over 3 years old. At this point, I can use my MacBook only if I never activate the discrete graphics chip. If I activate the chip, the Mac crashes within a few minutes.

I could send it off to have it “reballed” for about $200. That would be OK except I’d be out of service for about a week, and I have to deal with packing and shipping it, and it might get ruined.

For now, I’m trying to live with it. I’m really upset with Apple. I expect a $2000+ computer to last much longer. I’m considering moving back to Windows. In the meantime, I have to get by with this laptop, so here’s where I’ll capture the tweaks to prevent use of the discrete graphics card.

This whole episode has left me feeling vulnerable to hardware failure. It came at a very bad time. If I were using a Windows PC, I’d be creating a P2V (physical to virtual) backup on a weekly basis, and I could pick up where I left off on any machine that runs VMware, by copying my VM there. Can’t do that with OS X. I like OS X, but hardware failure has to be part of my planning since it just happened.

  • Install gfxCardStatus 2.3 and set it to Integrated
  • Edit each Parallels VM and configure it as follows (to prevent Parallels from overriding gfxCardStatus and setting Discrete mode)
    • Options/Optimization/Power = Longer Battery Life
    • Hardware/Video/3D Acceleration = Off
    • If you set 3D off, (Parallels says)[http://kb.parallels.com/en/9607] you need only 32MB of video memory
  • I have read that for both Parallels and Fusion, you need to force Integrated graphics before you start the app – not just before you start a VM. i.e. If you need to force Integrated, shut down ALL VMs, set gfxCardStatus to Integrated Only, then start Parallels or Fusion.

Update: See MacBook Pro Video Repair Success

Mac OS X Says File In Use, But File Isn't In Use!

Sometimes, when you try to move or delete a file/folder on a Mac, it says “The operation cannot be completed because the item is in use”. If you are certain that the item is NOT in use, then it got locked at some point and the app ended without unlocking it. To manually unlock a file:

chflags nouchg filename

or

chflags -R nouchg foldername

Debugging JavaScript Problems in Internet Explorer

I work in an environment where IE 8 is the norm. Sometimes our web sites use JavaScript. Sometimes they have problems. Here are some notes on JS debugging in such an environment.

Attempt to duplicate the behavior in Firefox. You still have to make it work in IE, but knowing whether the issue is due to a browser quirk or a flat-out bug in your code will help to guide your debugging strategy.

Sometimes the best approach is the oldest technique in the book. Add code to show where the execution flow has gone. Sprinkle lots of console.log calls in your code. Start by putting one at the beginning and ending of every function, before and after every loop. For example, if you have a function called i_am_broken, you might put as its first line:

    console.log("i_am_broken entry");

and as the last line put

    console.log("i_am_broken exit");

IE is broken, with regards to console functions. If F12 Developer Tools is not open, the console object does not exist, and your code will throw errors when you access the console object. To work around this, add the following code (from ):

// Avoid `console` errors in browsers that lack a console.
(function() {
    var method;
    var noop = function () {};
    var methods = [
        'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
        'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
        'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
        'timeStamp', 'trace', 'warn'
    ];
    var length = methods.length;
    var console = (window.console = window.console || {});

    while (length--) {
        method = methods[length];

        // Only stub undefined methods.
        if (!console[method]) {
            console[method] = noop;
        }
    }
}());

Movie Video Too Dark on Mac/Macbook When Using VLC

If the movie is too dark when playing a video on your Macbook, and you’re using VLC, press Command-E to bring up the Video Effects. This is also available from the Window menu (not the Video menu).

Create High Memory, CPU, and Disk Use, for Stress-testing Windows

Sometimes you need to generate 100 percent CPU use, or memory exhaustion, or slow system response due to high disk I/O.

See http://blogs.msdn.com/b/vijaysk/archive/2012/10/27/tools-to-simulate-cpu-memory-disk-load.aspx

“CPU Stress” (aka cpustress.exe) is at http://download.sysinternals.com/files/CPUSTRES.zip . It can use up from 1-4 logical processors.

Need to use up all your memory? See http://download.sysinternals.com/files/TestLimit.zip . TestLimit can soak up varying amounts of RAM.

SQLIO can generate lots of disk activity. (SQL Server people like to test with it, hence, the name.) http://www.microsoft.com/en-in/download/details.aspx?id=20163

Autoexec for Excel

I wanted to run code on startup/opening an Excel workbook. I tried

Sub Auto_Open()
    Debug.Print "Got here"
    MsgBox "auto_open"
End Sub

It didn’t run when opening the workbook. (Yes, I enabled macros via the Trust Center. I also checked to be sure it was stored in the ThisWorkbook object.) I tried Public and Private variants. It just wouldn’t start. So I changed it to the following, and it runs.

Private Sub Workbook_Open()
    Debug.Print "Got here"
    MsgBox "auto_open"
End Sub