Moved away from Blogger

After using Blogger for more than 15 years, I moved away from Blogger. My main issue is that Google Search bot is not indexing Blogger. With 346 posts right now it indexed only 22. It’s close to a year that I added back the current domain for this blog and it’s still not indexed. It used to get indexed a few years ago. I made the blog private for a while and now it’s not indexing citing it will overload the server. The Google Search Console shows Crawled – currently not indexed and Discovered – currently not indexed.

The page was found by Google, but not crawled yet. Typically, Google wanted to crawl the URL but this was expected to overload the site; therefore Google rescheduled the crawl. This is why the last crawl date is empty on the report.

This means the crawling is going to make Blogger overloaded, so crawl is not performed. So, there is no much point in keep using Blogger. I had sent support requests to sc-tools-support@google.com, but got no response. Asked at Search Console Help Community but it did not help. Bing, DuckDuckGo are indexing posts just fine.

Let’s see how WordPress goes. The reason I choose WordPress was because I need to have the migration done quickly. I tried using Cryogen, Hexo and Jekyll static site generators but all failed to convert the Blogger XML.

API Tester Pro v2.0 Released

API Tester Pro v2.0 is released to the iOS App Store. This release brings major changes to data storage. It includes iCloud syncing per workspace. Also allows to keep workspaces locally on device with seamless switching between iCloud or local workspaces. The changes and improvements in this release are listed below.

• Enable iCloud syncing when creating a new workspace. If syncing is disabled workspace will be created on device only.
• Seamless switching between local and iCloud workspaces
• Response details screen UI enhancements
• Added option to copy response details table values on long press

Script to Copy MP3 ID3 Metadata Between Folders

I wrote a Python script to copy mp3 ID3 metadata from all files in the source folder to the corresponding file in the destination folder. I have lots of old mp3 files which are of low bit rate and I have new files with higher bit rate. The newer files don’t have metadata information. For the old files I had added them manually along with album art. It would be painstakingly time-consuming to manually add them again. This script automates that process. The script is available from the GitHub mp3-copy-id3-metadata repository.

Visual Studio Code Settings for Flutter Project

We can have Flutter project specific settings for VS Code so that all developers who work on it have a consistent experience. Below is my settings.json file. Add this to the .vscode folder under your project root directory.

{
    "dart.debugExternalPackageLibraries": false,
    "dart.debugSdkLibraries": false,
    "dart.lineLength": 150,
    "[dart]": {
        "editor.codeActionsOnSave": {
            "source.organizeImports": "explicit",
            "source.fixAll": "explicit",
            "source.quickFix": "explicit",

        },
        "editor.formatOnSave": true,
        "editor.rulers": [
            150
        ],
        // disable built-in highlighting and use Dart's ability to highlight only exact references
        "editor.selectionHighlight": false
    },
    // always switch to debugging console when starting a debug session
    "debug.internalConsoleOptions": "openOnSessionStart",
    "files.insertFinalNewline": true,
    "files.trimTrailingWhitespace": true
}

I am using the ruler and line length as 150 instead of 80 so that we don’t have too much code wrapping. It makes code very unreadable in my experience.

Install and Run Windows from External Disk on a Mac Without using BootCamp

This guide will walk you through installing Windows 10 on an external hard disk drive and booting from it on an Intel mac. No need to use BootCamp Assistant and partition the mac hard drive. We can do dual boot.

Before proceeding make sure you have an USB drive for drivers, external hard disk (SSD recommended connected to Thunderbolt port) for installing Windows and wired keyboard and mouse.

1. First we need to download the BootCamp drivers for the mac model that the Windows will be running on. For that we can use Brigadier. We can also use BootCamp Assistant > Action > Download Windows Support Software to download the drivers.
2. We need an USB drive formatted as ExtFAT and copy the driver files to it. With Brigadier you will a dmg file. Mount it. With BootCamp Assistant it extracts the contents to the folder specified during download. Copy the contents to the USB drive. The drivers inlcude two folders $WinPEDriver$ and BootCamp.
3. We need Windows for this step and Hasleo WinToUSB. We can use a Windows VM also. I used VMWare because WinToUSB is not detecting my SSD on Parallels.
3. Next format the external hard disk with ExtFAT format and connect it to Windows VM.
4. Download Windows 10 iso file from Microsoft.
5. From the Windows VM, run WinToUSB and select the Windows To Go USB option.
Note that the Windows installed on the SSD will be in Windows To Go mode.
    Select the Windows 10 iso file for the installation source. Choose the required edition from the dropdown.
    Select the SSD for the destination drive.
    For Partition Scheme choose GPT for UEFI
    For Installation mode select Legacy. Virtual hard disk size is not relevant for this option. No need to enable BitLocker. Click Proceed.
This will format the SSD and install Windows to it. Once done, reboot the mac.

WinToUSB

6. On reboot hold Option key so that boot menu will appear and select the EFI Boot option with SSD disk icon (mostly the last one in the row). This will boot into Windows from where we can setup Windows account. We need wired keyboard and mouse as the magic mouse and keyboard won’t work without drivers. I am using iMac for dual booting Windows. I didn’t try it on a Macbook. Probably the keyboard and trackpad won’t work without drivers. Continue the setup process and Windows loads!
7. Next plug in the USB with the drivers and run the Setup.exe in the BootCamp folder. Check if WiFi, sound, magic mouse, keyboard etc. are working. For me all drivers were not installed from this step. I had to manually install them. Check Device Manager to see if there are unknown devices.

This shows bluetooth, camera, network, and other controller driver. Click on each item, right click and choose Update Driver. Choose Browse my computer for driver and select the USB drive driver folder. Make sure Include subfolders is selected. This will find the appropriate driver and install it. The Audio device appears in the Device Manager but there is no sound. To fix this go to $WinPEDriver$\Cirrus, right click cs4208_38.inf and choose Install. Try changing the volume now. If no sound is heard, reboot. The sound will work. For me Magic Mouse appears under connected devices in Bluetooth, but it did not work. Remove it from the Bluetooth devices and add it back. Now the mouse started working but scroll did not. I installed $WinPEDriver$\AppleWirelessMouse\AppleWirelessMouse.inf and \$WinPEDriver$\AppleBluetoothBroadcom\AppleBTBC.inf. Now the mouse stopped working. So I removed it from the Bluetooth devices list and rebooted. Then turned off the mouse and turned on it. Added the mouse from Bluetooth devices and it worked.
8. On reboot Apple logo will be shown and then the boot menu appears where we can choose the Macintosh HD to boot into macOS or Windows SSD device to to boot into Windows.

For dual booting Windows I recommend booting from external disk instead of internal bootcamp partition as it will keep the mac hard disk intact and you get more space.

Ergonomics

Mouse Scroll Direction
The mouse scroll direction is different in Windows and if you want to invert so that magic mouse works similar to mac, follow the below steps.
Open Device Manager and expand Mice and other pointing devices. This will show HID-compliant mouse For me there are 3 HID-compliant mouse entries. For each right click, check Properties, under Details tab, select Device instance path. Note down these values in case something goes wrong. Mine appears like this.

HID\VID_413C&PID_301A\7&B109508&0&0000
HID\VID_05AC&PID_8296&MI_01\7&3161E94&0&0000
HID\{00001124-0000-1000-8000-00805F9B34FB}_VID&0001004C_PID&0269\9&11F581C4&2&0000

Now open Registry Editor from search and under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\HID and find the HID value that you obtained. Expand it to find Device Parameters, click on it and change the hexadecimal value from 0 to 1 for FlipFlopWheel. Do this for each HID value. Exit Registry Editor and reboot. This will change the mouse scroll direction.

Below is a PowerShell (invert-mouse.ps1) script that automate this. Run it as administrator and reboot to invert the mouse.

# invert mouse

Get-PnpDevice -Class Mouse -PresentOnly -Status OK | ForEach-Object {
    "$($_.Name): $($_.DeviceID)"
    Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\$($_.DeviceID)\Device Parameters" -Name FlipFlopWheel -Value 1
    "+--- Value of FlipFlopWheel is set to " + (Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\$($_.DeviceID)\Device Parameters").FlipFlopWheel + "`n"
}

Control Key Remapping to Command
On Windows the Command key opens up the Start menu. On Magic Keyboard I find the Control key combination a bit difficult to type. Also having consistent keyboard layout between Windows and macOS helps. To remap the keys, download and install PowerToys from Microsoft. Open PowerToys and enable Keyboard Manager. Then under Remap add two key remappings.

+---------------+---------------+
| Select        | To Send       |
+---------------+---------------+
| Press Command | Press Control |
| Press Control | Press Command |
+---------------+---------------+

Enhancements
Hibernation is disabled by default. If you want to enable it open Run using Windows + R and run gpedit.msc. In the Local Computer Policy > Computer Configuration > Administrative Templates > Windows Components > Portable Operating System double click Allow hibernate(S4) when starting from a Windows To Go workspace choose Enabled. Restart and Hibernate will appear under Power option. For me system is not restoring the workspace after starting for hibernate.

Change Volume using Function Keys
For this we need to use AutoHotkey program. Install the the v2 version. Then create a file volume-btn.ahk with the below content.

#Requires AutoHotkey v2.0
#SingleInstance Force

F10::Volume_Mute
F11::Volume_Down
F12::Volume_Up

Double click the file to run the script. This will map the function keys to volume controls. To auto start this mapping place the shortcut to this file in the startup folder.

Sound Mute on Login
Another issue I found is that the audio volume level is reset to 0 after login. If play sound on login is enabled I can hear the Windows chime on boot, but the volume is 0 after login. I couldn’t find any system settings that can fix this. So here is a bat script (set-volume.bat) that will set the volume to 25 on boot.

@echo off
setlocal

REM First set volume to zero and increase it by 25%
set zeroVolume=-65535
set volume=16383

set nirCmdPath=C:\bin\nircmd\nircmd.exe

"%nirCmdPath%" changesysvolume %zeroVolume%
"%nirCmdPath%" changesysvolume %volume%

endlocal

This script uses a command line program NirCmd. Extract it to C:\bin\nircmd\. Save the set-volume.bat script in C:\bin\. Create a shortcut. Press Win+R and run shell:startup which will open the startup folder. Move the shortcut to this folder. Now the script will run on every login which will set the volume to 25.

NB: The hibernate not working might be due to the Windows To Go mode. When I run Windows installed to the internal disk without any dual boot hibernate works.

Parallels Wins Again on Sonoma (Intel) for Windows Gaming

Previously I had posted about how Parallels works well for macOS under macOS. I had recently setup Windows 11 VM running under macOS Ventura with VMWare Fusion 12 for gaming. I had Crysis 3 working in it flawlessly. I recently upgraded my mac to Sonoma. I then tried playing the game and it won’t load the gameplay. It loads the game menu and when I click resume game, it loads the stage but then freezes the entire VM and BSOD after a while. I tried Sekiro and few other graphics intensive games and all leads to BSOD. I did not change any VM spec. I tried Witcher and it worked. Matrix The Path of Neo also worked. Matrix is an old game and I expect it to work without much graphics.

Basically VMWare is not working for gaming in Sonoma. I tried VMWare Fusion 13 also. So I gave Parallels a try. Installed Windows 11 and Crysis 3. Copied the saved game from VMWare and the game worked without any issues! So Parallels once again proves its worth.