Web Development

Hemingway Editor review

To improve the content of my websites I looked into writing tools recently. It is easy just to hit the “ABC” button in WordPress or copy your text in Word, but that won’t tell you if your text has style errors. The first tool I stumbled upon was Grammarly, but some digging suggests they have a terrible privacy policy. Next, I stumbled upon Hemingway Editor. It seemed to do everything I wanted (at first). As I wanted the ability to save files locally, I forked over the cash ($19.99) for the desktop app (Windows version).

I’ve now tried the Hemingway Editor for a few days, and well, it’s not bad nor great. One of the biggest issues is that it checks only for style errors. It doesn’t check spelling or grammar. So you inevitably end up having to copy your content into another editor (like Word) to do that. Having to copy text back and forth is a bit of a drag. So for this issue alone I will try something else next, probably ProWritingAid.

But core functionality isn’t my only gripe with the Hemingway Editor. When you open the app, it shows an empty document that for some reason is automatically marked “unsaved.” Which means it asks you to save the empty & unchanged document if you try to close it, and if you open a file it’ll do so in a new window instead of the existing window. Opening existing files is also a bit of a drag: there isn’t a “Recent Files” menu option.

More indefensible is that .hemingway files aren’t associated with the application during installation, and if you try to associate them manually, it turns out the app has no support for that! Meaning, if associate the app with .hemingway files and try to open them, it’ll just open an empty document instead. Something else I found out while trying to create the file association for the app is that it installed itself into the “AppData” folder. I’m not an expert in Windows software development, but I doubt that’s the right location.

So in conclusion, would I recommend it and is it worth its money? No. But of course you can still use it for free online.

Edit: I ended up going for Grammarly after all (but using the standalone app and not as browser plugin). And ProWritingAid too. I’ll probably end up using all three tools together. What made me reconsider Grammarly was: in the original text of this review (I used it to test all three), I accidentally wrote “expect” instead of “expert.” That’s not an easy mistake to spot, yet Grammarly did it. ProWritingAid isn’t bad either though not as smart, and it sometimes makes suggestions that make little sense. There is no substitute for your brain as the best proofreader.

Corrupted files during development using PhpStorm & Vagrant

I’m currently trying to develop my own WordPress theme from scratch (called “Tengu” but be warned: at time of writing it’s nowhere near usable yet). And I encountered a rather odd bug: part of the style.css file would get corrupted when viewing through the browser.

I am using PhpStorm on Windows and for live testing I use a virtual machine using Vagrant. On it I was using a plain, hardly modified installation of nginx to serve a WordPress test blog. As it turns out, by default nginx configuration turns the “sendfile” option on which usually makes sense, but sendfile apparently is extremely unreliable when used with remote file systems (in my case, VirtualBox extensions).

The quick solution: turn sendfile off during development (look for the appropriate line in /etc/nginx/nginx.conf). Supposedly this also applies to Apache btw. The problem went away immediately when I did that.

Source: https://coderwall.com/p/ztskha/vagrant-apache-nginx-serving-outdated-static-files-turn-off-sendfile

Free image hosting: lessons learned (Part 1)

This is probably going to be a series of posts, hence the “Part 1” in the title. I have now ran the same free image hosting site (ImageHost.org) twice: the first time was in the fall/winter of 2004 (only a few months indeed) and the second time was while a lot longer: from fall 2007 to early 2011. During those times I have encountered numerous problems, which I’d like to share.

First like any venture, think before you begin. Do at least some planning ahead about what level of service you want to provide and how you might go about solving certain problems. For example while there are undoubtedly some standard scripts you could use, you probably want to be able to write your own scripts in order to create a unique experience and also to be able to fix problems as they arise, rather than having to ask/pay someone else to fix them for you.

One such technical problem is scaling. While you can probably start with your image hosting service on a VPS or entry-level server with limited resources, eventually you will reach a point when the daily amount of new uploads and image requests may be to much for a single server to handle. So plan how you are going to scale beyond a single server from the start.

Also think about how you are going to pay for hosting. Free image image hosts consume a lot of resources: both in terms of hard drive space and bandwidth. In order to prevent your server’s HDDs from melting you might also want to invest in loads of RAM (for file caching) as well. Those kind of servers don’t come to cheaply. I can’t say I’m an expert in this area as lack of profitability was one of the reasons I closed the site earlier this year.

But I can give some advice: try to find some way to discourage hotlinking to images (rather than viewing the images on your site where they’ll be accompanied by ads) and if necessary don’t hesitate to ban users or (referring) sites that do excessive hotlinking if they don’t otherwise contribute to your service in other ways.  While hotlinking is a key feature of a free image host it is also something that is only a money drain as no ads are displayed when an user hotlinks to an image. The square box type ads work best by the way, so find a way to put them beside an image (as above or below they’ll probably won’t get noticed).

Also expect your service to be abused. Not always on a daily basis, but some abuse can be severe. For example, what if a spammer uses an automated script to uploads thousands of images and uses it in an spam campaign? Expect to receive some nasty e-mails, and if you don’t respond soon enough your servers might even be turned off (even if they were not the source of the actual spam e-mails). Furthermore no matter how well you try to educate users about your service’s rules, expect there to be always those that upload adult content (including the disturbing/illegal kind), gore/extreme content or copyrighted material. If you never want to be exposed to images like that, you’d better quit.

This is it for this edition; expect future posts to go a bit more in dept regarding certain (technical) issues.


Keep WordPress & phpMyAdmin up-to-date with a single command

Notice: see this follow-up post for better ways of keeping WordPress & phpMyAdmin up-to-date.

Keeping up-to-date with the latest versions of commonly used web software such as WordPress and phpMyAdmin can be a bit of a drag if you would have to manually download, unzip and upload new files through FTP each time a new version is released.

But keeping WordPress and phpMyAdmin up-to-date can be as simple as logging into your server with SSH and executing just a single command. The key to this is that these software are being developed using version control software like Subversion and Git. Not only developers can take advantage of this however; you as end-user can use them as well.

First you’ll need to install Subversion and/or Git of course. On Debian (and Ubuntu presumably) you can do this by simply running the following command (as root):

aptitude install subversion git-core

Once either or both have been installed, I can simply recommend the excellent Installing/Updating WordPress with Subversion article in the case of WordPress.

For phpMyAdmin you will need to following commands from the root directory where you would want to install phpMyAdmin in:

git clone https://github.com/phpmyadmin/phpmyadmin.git
cd phpmyadmin/
git branch --track STABLE origin/STABLE
git checkout STABLE
git pull

In case of a new install don’t forget to copy “config.sample.inc.php” to “config.inc.php” and editing it where applicable (see the phpMyAdmin documentation for more info). To keep it up-to-date, then simply run the following command from the “phpmyadmin” folder  whenever a new version is released:

git pull

This command should not overwrite custom files like the configuration file.

Update April 2012: it would appear phpMyAdmin has moved to GitHub, so the URL above has been updated.

Go to Top