RSSAmplifier

Blog

Aymeric on Software

blog.barthe.phRSS feed ↗32 posts

Latest posts

The End of an Era

Today marks the first time everything I host on the Internet has moved away from a dedicated Linux VPS. This blog had moved to Cloudflare Pages in 2022, and previously it had been hosted on a dedicated server provided by Kimsufi and, before that, Dedibox . However, half a dozen sites and applications remained on that server. It ultimately took about four years to complete the transition. 😱 Why…

Things I Learned in 2020

Let’s get the elephant out of the room: 2020 has been a very different kind of year because of the COVID-19 crisis. I am very fortunate that myself, my wife, our family and close friends have not been – so far – impacted in any meaningful way. However, this blog post is not about COVID-19. In fact, I have been thinking of doing some kind of the yearly retrospective for the last couple of…

My Firefox Setup

Why I Use Firefox I have used Firefox since the very beginning on Windows. I stuck with it even in the early 2010s, when it clearly lagged behind Chrome, because of a profound distaste for Chrome’s GUI and Google’s business practices. In my opinion, Firefox Quantum released in 2017, has addressed most of the performance gap between Chrome and Firefox. In many cases, Firefox feels even…

Powered by Hugo

This blog is now powered by Hugo , a static page generator, and features a refreshed look. This is hopefully the first of many posts after a years long hiatus. Old Setup When I started the blog in 2009, it was powered by a self-hosted Wordpress instance. Since I was getting frustrated with maintaining PHP, MySQL and Wordpress up to date, I decided to switch to Octopress , a statically generated…

The .NET Core Zoo

Unless you have been living under a rock, you may have noticed that Microsoft has been iterating at a furious pace on their .NET Core initiative for the past two years. It is a clean reboot of the .NET Framework that is both open-source and cross-platform, targeting Windows, macOS and Linux. For a company that has historically been an enemy of open-source software, it is difficult not to be amazed…

Let's Encrypt with Nginx

The Objectives One of the major hurdles hampering the deployment of HTTPS on smaller websites like this one, has always been the price of certificates. As much I would have liked to get one, I could hardly justify the cost. That’s why a year ago, when the Let’s Encrypt project was announced, with the promise of free domain certificates, I was particularly excited. I decided to migrate…

Migrated to Kimsufi

Originally, this website was powered by a shared hosting plan on Dreamhost , but I migrated to a fully hosted solution over a year ago . After considering many options, I chose a Dedibox SC gen 2 , a dedicated server solution from Online.net a French server manged hosting provider. The machine features a fairly low spec CPU, a 500GB hybrid SSD-HDD disk, 2GB of RAM and unlimited bandwidth with…

Compute the Balance of a Bitcoin Wallet with node.js and blockchain.info

The Problem As I have explained in great details in a previous post , the balance of a Bitcoin wallet differs from the balance that can be computed by looking at the blockchain. That’s because every time you make a transaction, the Bitcoin software sends back to you, the fraction of the funds that were not sent. These funds are sent back to a new address, invisible to the end users. These…

HFS+ Bit Rot

HFS+ is a terribly old filesystem with serious flaws. I sincerely hope that Apple comes with an update of the filesystem for WWDC 2015. After all they have been working on Swift for the past 4 years and we have just learned about it last week. HFS+ is seriously old HFS+ was released in 1998, in the era of Mac OS Classic. It predates the current Unix based version of OS X by at least three years.…

Why the Blockchain and the Bitcoin Wallet Balances Differ

If you look at a website like blockchain.info or blockexplorer.com , you may notice it is possible to find out the details about a particular bitcoin address, such as the last transactions and of course the balance. If you try this on a Bitcoin address that belongs to you, and fire up the Bitcoin Qt client (aka Bitcoin Core ), you may have noticed a discrepancy. It’s very likely for the…

How I Store my Bytes

Over a year ago, I read an article on Mockyblog about storing your personal data on a HP ProLiant MicroServer. After juggling with no less than 4 external hard drives, to palliate the the lack of space on my iMac, I ended up buying this machine and turning it into a Linux powered NAS. After listening to a recent episode of Accidental Tech Podcast , where the host chose a more expensive and…

Fixing the Twitter Timeline in Octopress

On June 11th 2013, Twitter shut down the old 1.0 API and the Twitter sidebar widget of Octopress , the software that powers this blog, suddenly stopped working. In the 1.1 version of the API, every single call is authenticated by OAuth . The intended goal for Twitter was to shutdown third party Twitter clients, in order to monetize content by shoving ads into the face of their users. This…

A JavaScript Object Oriented Programming Technique

There are many conflicting approaches to object oriented programming in JavaScript. On the one hand, the language was designed with prototypal object oriented programming in mind, with the only built-in mechanism for inheritance being object inheritance. However, the language is also fitted with a new keyword of dubious quality which shows aspects of a more traditional class based OO programming.…

Future Proof Backup Strategy

Mechanical spinning disks and modern SSDs are fallible components. Over the course of the past 10 years, I have crashed 3 different hard disks among the dozen that I have owned. It is a far cry from the failure rates announced by manufacturers . So obviously you have backups . But are these up to date? Are you sure your backups work? What if your house burns or someone steals your equipment? What…

Migrated to Octopress

This site came up in February 2009, and has been running the same version of Wordpress (unpatched obviously), with an old theme from Neoease . A slightly hacked up version of the theme is still powering Diskwave website. To say that this blog needed to be refreshed, is an understatement. The blog looked so ugly and I was so ashamed of it, that I pretty much stopped writing for it. My motivations…

Design and Coding Guidelines

Today I was asked to come up with a set of guidelines to help a junior developer. The goal was to create a short bullet point list, of high level design ideas that can be applied to any kind of programming language and technology. Here is the list I came up with. First, I would like to emphasize the facts that these rules are not set in stone. They constitute good guidelines but any developer…

How to Store Passwords Securely

I am not a security specialist, but I would have thought that by now, one year after the humiliating hack of Sony Pictures by LulzSec, people would have learned how to handle passwords properly. Apparently NOT . In the past week, LinkedIn , eHarmony and Last.fm got their password databases hacked and stollen. It’s hard to know how the database was compromised in the first place, but the sheer…

That Strange Flash Resizing Bug when using 32 bits WebViews on Mac OS X

The Problem Have you ever noticed some strange behavior when you resize a WebView hosting resizable Flash content? Does the Flash content seems to be play catch up with the resizing of the WebView? If so you are particularly unlucky. The problem only arises if you have the following set of conditions: The hosted flash content is resized when the WebView itself is resized, a bit like in this…

A History of the DMG File Format

What are Disk Images Disk Images have always been popular on the Mac. They play a similar role to “ISO” images on other platforms, in the sense that they can be used to clone medias or can be mounted/unmounted as a virtual disks. However DMG images offer a LOT more functionalities than traditional ISO images: They can hold a partition table, and therefore contain more than one volume. (Typically a…

Sharing a VPN connection with VMWare fusion

Rationale My company has set up a VPN access that can be used from home. This proved to be extremely useful last winter when I got snowed in, and I have used it occasionally ever since. The VPN system we use ( Sonicwall ) is not supported on MacOS X, and Sonicwall only provides connection software for Windows. I have tried to use IPSecuritas but I could not find a way to configure it properly. The…

First Public Release of DiskWave

I have not been blogging a lot lately. Truth be told, I was busy coding… WhichSize DiskWave is a freeware for MacOS X 10.6 (hence Intel Macs only for now) that can recursively size the directories on your drive. This allows to quickly identify and reclaim wasted space. It is freely available here: http://diskwave.barthe.ph/ DiskWave was basically hacked in a weekend, but this is not a new idea. I…

Force Windows to Refresh the Desktop (and Start Menu)

Today I learned a new trick. When you programmatically delete a shortcut from the Desktop folder, Windows is usually smart enough to update the Desktop and the recently used programs section of the Start Menu . But sometimes, it does not work, and you are left with a “ghost” icon. As a regular end user, you can hit the F5 key to force a refresh of the Desktop , but for the Start Menu…

Make LoadLibrary() Failures Silent on Win2k

For a custom installer application, I have been working on a crude but efficient way to determine whether a particular version of the C runtime (CRT) needs to be installed or not. The technique I use is simply to check if a dummy DLL linked to the CRT libraries would load up properly. This works well, except for one small detail. When the CRT is not installed, on Windows 2000 ~~~only~~~, the…

XCode Has Dropped Support for Java!

I guess this is hardly news to anyone but me, since I have not written a single line of Java for the past 4 years, but apparently Xcode has dropped the support for Java projects. As of Xcode 3.2.1, there is no way to create a command line or Swing application project which is fully managed by Xcode. There is still support for the Java syntax in the text editor and the java compilation tools are…

C++ Object Initialization and Error Handling

This column is in no way revolutionary. But looking back in the past, when I was learning C++, this is the kind of summary that I would have liked to read. So here it is, for the happy few! Object Initialization In C++, there are two common idioms with regards to object construction and initialization: the constructor fully initializes the object : this idiom makes it impossible to construct an…

The $2,000 one line bug fix

Today, after 4 days of work, I have finally fixed a bug. The fix? Removing a single line of code which should have been there in the first place! The Bug Sometimes, and at random, our application was crashing on exit. The crash was always some dodgy memory access violation. This happened after calling a SendMessage() to HWND_BROADCAST … I did not quite understand what was wrong with it, but…

Don’t Use Standard library/CRT Functions in Static initializers/DllMain!

The Problem Today, my colleague and I , have found a bug in OpenSceneGraph . Everybody knows that singletons are evil and may cause cancer , but that does not prevent OpenSceneGraph from using them all over the place. One of them, in particular, is initialized in the static context, and happens to call the standard library function getenv() . This was the beginning of all our troubles: from time…

How to use WM_SETICON Properly

How NOT to use WM_SETICON It’s not rocket science, but you’d be surprised to see how many people get this wrong. Here’s a code snippet of what people usually do: const HICON hicon = :: LoadIcon ( :: GetModuleHandle ( 0 ), MAKEINTRESOURCE ( IDR_MAINFRAME ) ); if ( hicon ) { :: SendMessage ( hwnd , WM_SETICON , ICON_BIG , reinterpret_cast ( hicon )); :: SendMessage ( hwnd , WM_SETICON , ICON_SMALL ,…

Fast Subversion Update on a Rarely Updated Large Third Party Repository

I have a project with a large repository, which contains a lot of ThirdParty sources and binaries, that are seldom updated. While subversion might not be the best suited tool for the job, the size of that repository is not insane enough to consider using something else… yet! The problem with that rarely updated large repository is that performing an svn update on it can take quite a while even…

10 Tips to Avoid Spam

I set up email on my phone and, even though I did not receive that many spams, it was more annoying than on a computer. Over the past few months, I have changed one of my main email addresses and took some radical steps to fight against spam. Here are my few tips for a spamless life: Do not publish your email address anywhere. Do not register your email address anywhere. If you need to register to…

Use the iPhone SDK on old Mac PPC machines

Apple states that the iPhone SDK should only be used on Intel Macs. However, the compiler, emulator and code signing tools work perfectly on older PPC Macs provided you work around the arbitrary limitations of the installer. My iMac broke down so I had to revert to using my old and venerable PowerBook using Mac OS X 10.5.6 (9G55). I used the first public SDK ( md5=96849e4a17674d55d5af75b2d1d6579f…

Changing a Signed Executable without Altering Windows Digital Signatures

It should not be possible, but it is… sort of. How it Works Microsoft Authenticode works as follows: it computes a cryptographic hash of the executable file. The hash is then used to make a digital certificate which is authenticated by some trusted authority. The certificate is attached to the end of the PE executable, in a dedicated section called the Certificate Table. When the executable is…