Category Archives: Other

Cycle route planning for Garmin eTrex Vista on Ubuntu 18.04

Obviously, this is a summer holidays post, not work related. One of my long-term popular posts on this blog is about Using Garmin eTrex Vista HCx with Ubuntu 14.04LTS & QLandkarte GT. That post has the info about how my eTrex is set up to connect to Ubuntu and to use OpenCycleMap, which still works for me. This post is just about the route planning, which has moved on. In short I use Google Maps in cycle mode plot the route, mapsToGPX.com to download a GPX of that route, gps babel to simplify and transfer the GPX file to the eTrex, and QMapShack to view and manage the various GPX files on Ubuntu. For navigation en route I follow a planned track on eTrex and/or on my phone using OSMAnd.

Continue reading

Quick update on W3C Community Group on Educational and Occupational Credentials

The work with the W3C Community Group on educational and occupational credentials in schema.org is going well. There was a Credential Engine working group call last week where I summarised progress so far. The group has 24 members. We have around 30 outline use cases, and have some idea of the relative importance of these. The use cases fall under four categories: search, refinements of searches, secondary searches (having found a credential, want find some other thing associated with it), and non-search use cases. From each use case we have derived one or two requirements for describing credentials in schema.org. We made a good start at working through these requirements.

I think the higher-level issues for the group are as follows. First, How do model the aspect of educational and occupational credentials? Where does it fit in to the  schema.org hierarchy, and how does it relate to other work around verifying a claim to hold a credential? Second, the relationship between a vocabulary like schema.org which aims for a wide uptake by many disconnected providers of data, not limited to a specialist domain or a partnership who are working closely together and can build a single tightly defined understanding of what they are describing. Thirdly, and somewhat related to the previous point, what balance do we strike between pragmatism and semantic purity.  We need to be pragmatic in order to build something that is acceptable to the rest of the schema.org community: not adding too many terms, not being too complex (one of the key factors in schema.org’s success has been  the tendency to favour approaches which make it easier to provide data).

TIL: getting Skype for Linux working

Microsoft’s Skype for Linux is a pain for Linux (well, for Ubuntu at least). It stopped working for me, no one could hear me.

Apparently it needs pulse audio to  work properly, but as others have found “most problems with the sound in Linux can be solved by removing PulseAudio”. The answer, as outlined in this post, is apulse “PulseAudio emulation for ALSA”.

Wikidata driven timeline

I have been to a couple of wikidata workshops recently, both involving Ewan McAndrew; between which I read Christine de Pizan‘s Book of the City of Ladies(*). Christine de Pizan is described as one of the first women in Europe to earn her living as a writer, which made me wonder what other female writers were around at that time (e.g. Julian of Norwich and, err…). So, at the second of these workshops, I took advantage of Ewan’s expertise, and the additional bonus of Navino Evans cofounder of Histropedia  also being there, to create a timeline of medieval European female writers.  (By the way, it’s interesting to compare this to Asian female writers–I was interested in Christina de Pizan and wanted to see how she fitted in with others who might have influenced her or attitudes to her, and so didn’t think that Chinese and Japanese writers fitted into the same timeline.)

Histropedia timeline of medieval female authors (click on image to go to interactive version)

Continue reading

An ending, and a beginning

On 30 June 2017 I will be leaving my current employment at Heriot-Watt University. I aim to continue to support the use of technology to enhance learning as an independent consultant.

I first joined Heriot-Watt’s Institute for Computer Based Learning in 1996 on a six month secondment. I was impressed that ICBL was part of a large, well-supported Learning Technology Centre–which was acknowledged at that time as one of the leading centres for the use of technology in teaching and learning. You can get a sense of the scope of the LTC by looking at the staff list from around that time. Working with, and learning from, colleagues with this common interest was hugely appealing to me; so when I had the opportunity I re-joined ICBL in 1997, and this time I stayed.

In my time at Heriot-Watt I have been fortunate beyond belief to collaborate with people in ICBL and through work such as the Engineering Subject Centre (and other subject centres of the LTSN and then HE Academy), EEVL, Cetis and many Jisc projects. But things change. The LTC was dismantled. A reduced ICBL moved to be a part of the Computer part of the School of Mathematics and Computer Sciences (MACS). Funding became difficult, and while I greatly appreciate the huge effort made by several individuals which kept me in continuous employment, like many in similar roles I frequently felt my position was precarious.  I really enjoyed teaching Computer Science and Information Systems students, and I worked with some great people in MACS, but the work became more internally focused, isolated from current developments…not what I had joined ICBL for.

What next?

When Heriot-Watt announced that it planned to offer staff voluntary severance terms, I applied and was happy to be accepted. My professional interests remain the same: supporting the selection and use appropriate learning resources; supporting the management and dissemination of learning resources; open education; sharing and learning. I do this through work on resource description, course description, OER platforms, I use specific technologies like schema.org, LRMI and wordpress. I intend to continue working in these areas, as an independent consultant and with colleagues in Cetis LLP. Contact me if you think I can help you.

Photograph of a person up a flight of stairs into the open. by flickr user Allen, licensed CC:BY.
Exit, by Allen ( https://www.flickr.com/photos/78139009@N03/) Licence CC:BY. Click image for original.

Flying cars, digital literacy and the zone of possibility

Where’s my flying car? I was promised one in countless SF films from Metropolis through to Fifth Element. Well, they exist.  Thirty seconds on the search engine of your choice will find you a dozen of so working prototypes (here’s a YouTube video with five).

A fine and upright gentle man flying in a small helicopter like vehicle.
Jess Dixon’s flying automobile c. 1940. Public Domain, held by State Library and Archives of Florida, via Flickr.

They have existed for some time.  Come to think about it, the driving around on the road bit isn’t really the point. I mean, why would you drive when you could fly. I guess a small helicopter and somewhere to park would do.

So it’s not lack of technology that’s stopping me from flying to work. What’s more of an issue (apart from cost and environmental damage) is that flying is difficult. The slightest problem like an engine stall or bump with another vehicle tends to be fatal. So the reason I don’t fly to work is largely down to me not having learnt how to fly. Continue reading

Cloning WordPress sites for development

I do just enough theme and plugin development on WordPress to need an alternative to using a live WordPress site for development and testing, but at the same time I want to be testing on site as similar to the live site as possible. So I set up clones of WordPress sites either on my local machine or a server for development and testing. (Normally I have clones on the localhost server of couple of machines I use for development and another clone on a web accessible testing or staging server for other people to look at.) I don’t do this very often, but each time I do it I spend as much time trying to remember what it is I need to do as it actually takes to do it. So here, as much as an aide-memoire for myself as anything, else I’ve gathered it all in one place. What I do is largely based on the Moving WordPress information in the codex, but there are a couple of things that doesn’t cover and a couple of things I find it easier to do differently.

Assuming that the pre-requisites for WordPress are in place (i.e. MySQL, webserver, PHP), there are three stages to creating a clone. A. copy the WordPress files to the development site; B. clone the database; C. fix the links between WordPress and the database for the new site. A and B are basically creating backup copies of your site, but you will want to make sure that whatever routine backups you use are up to date and ready to restore in case something goes wrong. Also, this assumes that you are notwant to clone just one site on a WordPress Multisite installation.

Copying the WordPress files

Simply copy all the files from the folder you have WordPress installed in, and all the sub-folders to where you want the new site to be. This will mean that all the themes, plugins and uploaded media will be the same on both sites. Depending on whether the development site is on the same server as the main site I do this either with file manager or by making a compressed archive and ftp. Make sure the web server can read the files on the dev site (and write to the relevant folders if that is how you upload media, plugins and themes).

Cloning the database

First I create a new, blank database on for the new site, either from the command line or using something like MySQL Database Wizard which my hosting provider has on CPanel. I create a new user with full access to that data base–the username and password for this user will be needed to configure WordPress with access to this database. If you have complete control of over the database name and user name then use the same name username and password as is in the wp-config.php file of the site you are cloning. Otherwise you can change these later.

Second, I use PHP MyAdmin to export the data base from the original site and import it to the one on which you are making a clone.

phpMyAdmin Export screen

Fix all the bits that break

All that remains is to reconnect the PHP files to the database and fix a few other things that break. This is where it get fiddly. Also, from now on be really careful about which site you are working on: they look the same and you really don’t want to set up your public site as a development server. Make all these changes on the new development site.

In wp-config.html (it’s in the top of the WordPress folder hierarchy) find the following lines and change the values to be those for your new development server and database.

define( 'WP_CONTENT_URL', 'http://example.org/blog' );
define( 'WP_CONTENT_DIR', 'path/to/wp-content' );

define('DB_NAME', 'databaseName');

/** MySQL database username */
define('DB_USER', 'databaseUserName');

/** MySQL database password */
define('DB_PASSWORD', 'password');

You might also need to change the value for DB_HOST

Then you need to change the options that WordPress stores in the database. Normally you do this through the WordPress admin interface, but this is not yet available on your new site. There are various ways you can do this, I change the url directly in the data base with PHPMyAdmin, either by direct editing as described in the codex page or from the command line as described here.

mysql -u root -p

USE databaseName
SELECT * FROM wp_options WHERE option_name = 'home';
UPDATE wp_options SET option_value="http://example.org/blog" WHERE option_name = "home";
SELECT * FROM wp_options WHERE option_name = 'siteurl';
UPDATE wp_options SET option_value="http://example.org/blog" WHERE option_name = "siteurl";

You should now have access to the new cloned site, though some things will still be misbehaving.

You will probably have the old site’s URL in various posts and GUIDs. I use the better search replace plugin to fix these.

iesiesIf you do any fancy redirects with .htaccess, make sure that these are written in such a way that works for the new URL.

If you are using Jetpack you will need to use it in safe mode if the development server is connected to the web or development mode if running on localhost. (This is a bit of a pain if you want to test Jetpack settings.)

On a development site you’ll probably want to add this to wp-config.php:

define('WP_DEBUG', true);

If you are running a development or testing server on a web accessible site you probably want to restrict who has access to it. I use the My private site plugin so that only site admins have access.

Keeping in sync

While it’s not entirely necessary that a development or testing site be kept completely in sync with the main one, it is worth keeping them close so that you don’t get unexpected issues on the main site. You can manually update the plugins and themes, and use the wordpress export / import plugins to transfer new content from the live site to the clone. Every now and again you might want to re-clone the site afresh. Something I find useful for development and testing of new plugins and themes is to have the plugin or theme directory that I am developing in set up as a git repository linked to github and keep files in sync with git push and git pull.

Anything else?

I think that is it. If I have forgotten anything or if you have tips on making any of this easier please leave a comment.

Why is there no LearningResource type in schema.org?

A couple of times in the last month or so the question of why isn’t there a LearningResource type in schema.org as a subtype of CreativeWork. In case it comes up again, here’s my answer.

We took a deliberate decision way back at the start of LRMI not to define a LearningResource as a subtype of CreativeWork. Essentially the problem comes when you try to define what is a Learning Resource. Everyone who has tried so far has come up with something like “a resource which is used in learning, education or training”. That doesn’t rule out anything. Whether a magazine like Germany’s Spiegel is a learning resource depends on whether you are a German speaker or an American studying German. In presentations I have compared this problem to that of defining “what is a seat”. You can get seats in all shapes and forms with many different characteristics: chairs, sofas, saddles, stools; so in the end you just have to say a seat is something you sit on. Rather than rehash the problem of deciding what is and isn’t a learning resource, we took the approach of providing a way by which people can describe the educational properties of any Creative Work.

We recognised that there are some “types” of resource that are specific for learning. You can sensibly talk about textbooks and instructional videos as being are qualitatively different to novels and the movies people watch in the cinema, without denying that novels and movies are useful in education. That’s why we have the learningResourceType property. You can think of this as describing the educational genre of the resource.

In practice there are two choices for searching for learning resources. You can search those sites that are curated collections of what someone has decided are educational resources. Or you can search for the educational properties you want. So in our attempt at creating a Google Custom Search Engine we looked for the AlignmentObject. Looking for the presence of a learningResourceType would be another way. The educationalUse property should likewise be a good indicator.

On the first day of Christmas

Prompted by

and with apologies:

On the first day of Christmas
My true love gave to me
A testable hypoth-e-sis

On the second day of Christmas
My truelove gave to me
Two sample means
And a testable hypothesis

On the third day of Christmas
My true love gave to me
Three peer reviews
Two sample means
And a testable hypothesis

On the fourth day of Christmas
My true love gave to me
Four scatter plots
Three peer reviews
Two sample means
And a testable hypothesis

On the fifth day of Christmas
My true love gave to me
FIIIVE SIGMAA RuuuuLE

(I always thought the carol went down hill from there)

Using Garmin eTrex Vista HCx with Ubuntu 14.04LTS & QLandkarte GT

Note (added July 2018) this article was written in Aug 2015. Since then both Ubuntu and QLandkarte have changed. I’ve written an update about Cycle route planning for Garmin eTrex Vista on Ubuntu 18.04

garminI have a rather old Garmin GPS eTrex that I use for GPS on walking holidays and cycle rides. I use it with OpenCycleMap contour maps downloaded from talkytoaster. To plan routes and manage the routes, tracks and maps on Ubuntu I use QLandkarte GT.  This summer was the first time I used this combination on my new PC, and I found some of the config difficult because the info I could find (e.g. this from GPS babel) related to old versions of Ubuntu (not surprising, this garmin is from the Ubuntu Feisty era). What needs doing seems similar but how you do it has changed.

I edited /etc/modprobe.d/blacklist to stop Ubuntu loading the garmin_gps module.  I don’t know if this is necessary, but everything I want seems to work with it there. That file now looks like:

# stop garmin_gps serial from loading for USB garmin devices

blacklist garmin_gps

The to make sure that the Garmin is automounted r/w for all users when plugged in to a USB post I created /etc/udev/rules.d/51-garmin.rules , with the content

SUBSYSTEM=="usb", ATTR{idVendor}=="091e", MODE="0666", GROUP="plugdev"

I found the lsusb and the gpsbabel utility  useful in testing the connexion. With it installed and the etrex plugged in I now see

phil@shuttle$ lsusb
Bus 002 Device 002: ID 8087:8001 Intel Corp. 
[...]
Bus 003 Device 004: ID 091e:0003 Garmin International GPS (various models)

phil@shuttle$ gpsbabel -i garmin -f usb:-1
0 3834401962 694 eTrex Vista HCx Software Version 3.40

And then in QLandkarte I can go to setup | general and under the “device and xfer” select Garmin in the main drop-down and EtrexVistaHCx in the Device Type (other Device options left blank) and happily transfer routes and tracks between the PC and the GPS.

Screenshot from 2015-08-07 09:11:51