Extending the life of TomTom wearables
TomTom recently announced
it would stop operating their supporting infrastructure by the end of September
following its earlier decision
to exit the wearables market.
This means that its products, such as sports watches, will become effectively
useless, as they will no longer be able to export their activities and
sync them with tracker sites.
Throwing away an otherwise fine watch only because its maker decided to
shut down its proprietary infrastructure seems like a sad waste.
Here is how you can download the watch’s data and
upload it to Strava, a popular activity tracker,
using open source software.
Continue reading "Extending the life of TomTom wearables"Last modified: Friday, November 3, 2023 5:57 pm
Error handling under Unix and Windows
One thing that struck me when I first encountered the 4.3BSD Unix
system call documentation in the 1980s, was that each call was followed
by an exhaustive list of the errors associated with it.
Ten years later, when I was going through the Windows API, I was
disappointed to see that very few functions documented their error
conditions.
This is a big deal.
Continue reading "Error handling under Unix and Windows"Last modified: Wednesday, September 30, 2020 0:00 am
Auto-correct text entered with the wrong keyboard layout
To enter text in some languages you press a special key
combination (e.g. Alt-Shift) to toggle the keyboard layout.
The keyboard layout context is typically kept separately for each window.
This is generally good, but forces you to remember (or check) the
current layout every time you switch to another window.
If you forget to do that, the text you type will come out as gibberish.
To me this happens often enough that I automated the fixing of such
text.
Continue reading "Auto-correct text entered with the wrong keyboard layout"Last modified: Tuesday, July 21, 2020 3:16 pm
Of BOOL and stdbool
The C99 standard has added to the C programming language a
Boolean type, _Bool
and the bool
alias for it.
How well does this type interoperate with the Windows SDK BOOL
type?
The answer is, not at all well,
and here’s the complete story.
Continue reading "Of BOOL and stdbool"Last modified: Tuesday, September 5, 2017 7:50 pm
Using the HP 4470c Scanner Under Windows 7
Neither
Hewlett Packard nor
Microsoft Windows 7
offer native support for my HP 4470c scanner.
Throwing a working scanner away to buy a new one only because some
software was missing seemed like a waste,
so I looked for an alternative solution.
This is how I made it work using SANE,
an open source framework for scanners.
Continue reading "Using the HP 4470c Scanner Under Windows 7"Last modified: Sunday, November 27, 2011 6:54 pm
Batch Files as Shell Scripts Revisited
Four years ago I wrote
about a method that could be used to have the Unix Bourne shell interpret
Windows batch files.
I'm using this trick a lot, because programming using the Windows/DOS
batch files facilities is decidedly painful, whereas the Bourne
shell remains a classy programming environment.
There are still many cases where the style of Unix shell programming
outshines and outperforms even modern scripting languages.
Continue reading "Batch Files as Shell Scripts Revisited"Last modified: Wednesday, August 4, 2010 11:21 pm
Useful Polyglot Code
Four years ago I blogged about an
incantation that would allow the Windows command interpreter (cmd) to execute
Unix shell scripts written inside plain batch files.
Time for an update.
Continue reading "Useful Polyglot Code"Last modified: Tuesday, January 12, 2010 6:52 pm
Fixing the Orientation of JPEG Photographs
I used to fix the orientation of my photographs through an application
that would transpose the compressed JPEG blocks.
This had the advantage of avoiding the image degradation of a
decompression and a subsequent compression.
Continue reading "Fixing the Orientation of JPEG Photographs"Last modified: Sunday, June 14, 2009 8:20 pm
Suspend Windows from the Command Line
I used to leave my computer up all night, but I've come to realize that this
is ecologically unsound.
Now I suspend it before going to sleep, but this missed running
a daily job that used to run at 03:00 am.
The job marks my students' exercises and send me email with the next day's
appointments.
I thus decided to schedule the task to wakeup my computer at 3:00 am,
run the job, and then suspend it again.
The Windows scheduler allows you to specify a wakeup option,
but not a subsequent suspend.
Furthermore, it seems that Windows lacks a way to suspend from the
command line (while maintaining the ability to hibernate), and the
only free tools on the web are distributed in executable form,
so I ended writing a small tool myself.
Continue reading "Suspend Windows from the Command Line"Last modified: Monday, October 6, 2008 7:25 pm
Unzipping Files in Order
Over the past couple of years I've enjoyed listening to the
audio edition of the
Economist newspaper.
The material is superb
(although I occasionally get the feeling of listening to the
Voice of America),
the articles are read in a clear voice,
the data's encoding is plain MP3,
unencumbered by digital rights (restrictions) management silliness,
and the audio format is convenient to listen on the metro or while jogging.
Unfortunately, the articles in the audio edition's zip file are
haphazardly ordered, which, until today, marred the enjoyment of my listening.
Continue reading "Unzipping Files in Order"Last modified: Thursday, September 11, 2008 6:05 pm
Open and Closed Source Kernels Go Head to Head
Earlier today I presented at the
30th International Conference on Software Engineering a
research paper comparing the
code quality of Linux, Windows (its
research kernel distribution),
OpenSolaris, and
FreeBSD.
For the comparison I parsed multiple configurations of these systems (more than ten million lines), and stored the results in four databases, where I could run SQL queries on them. This amounted to 8GB of data, 160 million records.
(I’ve made the databases and the SQL queries available
online.)
The areas I examined were file organization, code structure, code style, preprocessing, and data organization.
To my surprise there was no clear winner or looser, but there were interesting differences in specific areas.
Continue reading "Open and Closed Source Kernels Go Head to Head"Last modified: Friday, May 16, 2008 1:44 am
Many Ways to Skin a Window
Every couple of years,
users of a Microsoft Windows application I wrote a long time ago
start complaining that the application crashes when they exit from it.
Every time it turns out that the reason is a Windows message that tells
the application's main window to close
in a way that was not originally foreseen.
Continue reading "Many Ways to Skin a Window"Last modified: Thursday, December 13, 2007 9:15 pm
The Double-Edged Sword of Proprietary Platforms
A recent
Slashdot article comment
wondered how Windows Vista managed to break existing applications,
despite Microsoft having complete control over the platform.
Continue reading "The Double-Edged Sword of Proprietary Platforms"Last modified: Thursday, June 21, 2007 11:28 am
Internet Explorer's Cleaner Look
Today the Microsoft update on my Windows machine asked me to upgrade
the Internet Explorer to version 7.0.
My bank refuses to work with any browser other than IE,
so, although I'm using SeaMonkey
as my everyday browser, I'm also forced to keep a current copy of IE.
The installation's banner reinforced some of the fears I have
regarding Microsoft's technical prowess.
Continue reading "Internet Explorer's Cleaner Look"Last modified: Friday, December 15, 2006 3:10 pm
SeaMonkey vs Internet Explorer Revisited
In an older blog entry
I compared the complexity of Mozilla with that of Internet Explorer
by looking at the components each linked to.
Recently, comments to a Slashdot posting I made, noted
that I was comparing the two products on different platforms and
source with binary dependencies.
I therefore set out to compare the binary dependencies of the two
under Windows.
Continue reading "SeaMonkey vs Internet Explorer Revisited"Last modified: Tuesday, August 8, 2006 6:17 pm
Batch Files as Shell Scripts
Although the Unix Bourne shell offers a superb environment for combining
existing commands into sophisticated programs, using a Unix shell
as an interactive command environment under Windows can be painful.
Continue reading "Batch Files as Shell Scripts"Last modified: Friday, June 16, 2006 3:58 pm
Software Complexity: Open Source vs Microsoft
In a readable and interesting paper titled
CyberInsecurity: the cost of a monopoly
seven notable security experts argue that the Microsoft's near monopoly
in the desktop operating system and office productivity markets is creating
a dangerous monoculture that exacerbates the effect of security vulnerabilities.
Continue reading "Software Complexity: Open Source vs Microsoft"Last modified: Friday, October 3, 2003 7:33 pm