Setting up Windows to use ls like dir

After spending a lot of time with the unix command line you can get used to simply using the ls command to list the files in the current directory, it can be annoying when the option is suddenly not there on the Windows. Using the cd command to traverse through directories is the same, so it is a bit jarring when suddenly ls does not work.

Fortunately I was able to find a simple way to fix this from Stack Overflow. This approach maps the ls command to the dir, and is so simple that the file to do so can be created with a single statement on the command line.

echo dir %1 > %systemroot%\system32\ls.bat

This statement will create a new bat file that is always visible and will replace ls with dir behind the scenes. Now you can just use the ls command without having to think about what operating system you are running.

10 more levels for Starbeams

Z10Starbeams has been updated to version 2.2 giving the game a total of 220 levels.

About Starbeams

The object of the game is to assign colors to each star in order to ensure that none of the stars are connected to another star of the same color. The game starts off easy, but quickly gets more complex, adding more colors and seven pointed stars that can not be changed.

Starbeams can be downloaded for free for Windows Phone, Windows 8, Windows 10, and BlackBerry 10 devices. A one time in-app purchase is required in order to play past level 25.

Links & Information

IconS150

Writing to a file in a Windows 10 Cordova app

While writing to a file is easy in C# applications, for apps written in JavaScript things are a bit more complicated. Especially if you want to write to a file outside of the app’s sandbox. Fortunately this can be solved using Microsoft’s WinJS libraries.

var exportData = "String of data";
var savePicker = new Windows.Storage.Pickers.FileSavePicker();
savePicker.suggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.documentsLibrary;
savePicker.fileTypeChoices.insert("CSV", [".csv"]);
savePicker.suggestedFileName = "Export.csv";

savePicker.pickSaveFileAsync().then(function (file) {
    if (file) {
        Windows.Storage.CachedFileManager.deferUpdates(file);
        Windows.Storage.FileIO.writeTextAsync(file, exportData).done(function () {
            Windows.Storage.CachedFileManager.completeUpdatesAsync(file).done(function (updateStatus) {
                if (updateStatus === Windows.Storage.Provider.FileUpdateStatus.complete) {
                    //file saved
                } else {
                   //file not saved, failed for some reason
                }
            });
        });
    } else {
        //file not saved, canceled by user
    }
});

This will allow Cordova apps to write out to a part of the operating system where users can easily access the files.

Dropping Google Analytics

Within the past half year, a lot of attention has been given to the excessive bloat that is present in many websites. This has been in concert with discussions over ad blocking, where extensions such as Ghostery block trackers from non-advertising sources as well.

In light of this conversation, why has this blog continued to run Google Analytics? The additional JavaScript adds 42 kilobytes and 0.7 seconds to the page load time. All to collect data that (to be perfectly honest) was never really looked at anyhow. With Google being the only one benefiting from this data collection, the scripts are now gone from this site.

Enjoy this blog knowing that it is now both quicker and more private.

BlackBerry 10 is still dead

Occasionally it is necessary to state the obvious. BlackBerry 10 has received no major OS upgrades in over a year, with none planned for the future. It has been eight months since the release of the last BlackBerry 10 phone, and 15 months since the release of the last flagship device with zero phones announced or rumored for the future. BlackBerry 10 also shut down all their developer programs and announced that “there are no plans to schedule releases of new SDKs and APIs.”

That such a platform is dead should go with out saying.

For those paying attention this has been crystal clear since last summer, with the final nail in the coffin coming with BlackBerry’s release of an Android phone.

Yet last week when BlackBerry announced that they only planned to launch Android phones in 2016 some people found this to be a surprise. The tech press (who should have been paying attention sooner) suddenly started releasing articles about how BlackBerry 10 was dead and abandoned, a good half year after BlackBerry 10 was dead and abandoned.

BlackBerry CEO John Chen then further confused things when he lied and wrote a blog post saying that the company was still committed to BlackBerry 10. Yet the post reiterated that they only planned to release Android phones and would only be supplying security updates to BlackBerry 10 devices.

So despite all the “news” nothing has changed. BlackBerry 10 is still dead.

Ebscer highlights of 2015

With 2016 just beginning, I thought it was worth looking at some of the highlights of 2015.

Overall 4 apps were added for BlackBerry, 3 apps for Windows Phone, and 4 apps for Android.