2013-08-22

Photo album sync fail on iPad with Mac

I'm not usually one to blog complaints about products, but this seems outrageous.  Using the built-in Photo app on an iPad, I've got a bunch of photos organized into albums.  You can download the photos to a Mac in a mass download using the Mac's Image Capture program, or using Mac's iPhoto.  You can backup the iPad's Photo and albums using iTunes, but the backups are inaccessible on the Mac as albums, photos, or files, just pure backup to be reloaded to an iPad in case of "emergency" I guess.  But you cannot download the photo albums to the Mac from the iPad for further use or organization.

Apparently, you cannot download photo albums created on any iOS devices to a Mac for further use or organization at all, and it's been this way since forever.  There is a third-party app called "Phone View" that reportedly can let you do this.

But really?  A simple feature like syncing albums in an Apple built-in app requires a third-party solution?  And it's not obvious when using the beautifully created Apple Photo app on the iPad that album sync was not possible, luring unsuspecting users into creating albums that could not be synced.

This is an especially sad situation for users on iPads or other iOS devices on which they don't have access to install apps.  Where does that ever happen?  Well, corporate and school based usage comes to mind.

2013-08-20

Where are the Canadian STEM students?

A while back I wrote with some details of Canadian educational attainment in Inflated expectations: Are students living in a dream? I've since become interested in the numbers of the so-called STEM fields (Science, Technology, Engineering, and Math) and thought I'd write a supplement to the old post.

Let's start with a highlight that stood out from the old post first. Based on the 2006 Canadian census, and focusing in on the 20 to 24 year old cohort: roughly 78% or so (based on statistics from ACT in Spring 2004, regarding the USA) of high school students expected to get a college or higher degree, but only 35.9% of the above cohort actually got anything of the sort.

I think the 2011 census is now available, but to keep the comparison focused on 2006 (I don't want to redo the old post), I will continue to cite numbers from the 2006 Census [1].

Looking at just the Canadian population between the ages of 20 to 24 years, by highest certificate, diploma or degree attained:

type of highest certificate, diploma or degree attainedtotal [2]% of cohort size
20-24 cohort, total size2,071,895100%
only a high school certificate or equivalent889,27542.9%
no certificate, diploma or degree at all286,05013.8%
some kind of post-secondary qualification (trades certificate, diploma below bachelor level, PhD, etc.)896,57543.3%
some kind of post-secondary qualification (trades certificate, diploma below bachelor level, PhD, etc.) in STEM fields258,30512.5%
some kind of university certificate, diploma or degree344,79516.6%
some kind of university certificate, diploma or degree in STEM fields87,0004.2%

Look at that, unemployment notwithstanding, the education "system" converted only 4.2% of the 20 to 24 cohort into STEM university credentialed workers after a long arduous process for the students involved.

Sure, the STEM university credentialed group represents 25.2% of all those who attained any university credentials at all, but it turns out in the context of the entire cohort, it's just a drop in the bucket. That is seriously concerning especially from an economics policy standpoint.

According to University Completion, "It has long been argued...university graduates, as a group, earn more, on average, than college graduates do", which might imply we ought to "sell" more university education, any university education. "However, recent research suggests the field of study may be more important...One study, for example, found that males with university degrees in academic disciplines—such as the humanities, education, biology, and agriculture science—earned less than half of that earned by males with university degrees in vocational and applied disciplines—such as commerce, medicine, and engineering" (ibid.).

So, not surprisingly, what field you study makes a difference! What's more, "Canadians with scientific degrees tend to earn more. Five years after graduation, engineers earn about $10,000 more annually than fine arts and humanities graduates, and upwards of $5,000 more than social science graduates. These earnings are in line with computer and physical sciences" (Percentage of Graduates in Science, Math, Computer Science, and Engineering).

What the research suggests, then, is that we ought to be "selling" more university education specifically in STEM and commerce fields. It's not just about helping students earn more money after graduation, but as I've noted in the past [3], the very fact the labour market provides greater incentive for a given occupation is evidence there isn't enough people entering that career path in the economy.

So let's get out there and sell more university STEM education!

Easier said than done, of course. Certainly for STEM fields, but to some extent for commerce fields as well (especially economics), a strong basis in math is a pre-requisite to success. That means to get more students into STEM and commerce fields, we may also have to get more students to learn more math and to learn it better as a pre-requisite — and that means high school math.

Therein, I'd argue, lies a big part of the problem with getting more students into STEM fields. It turns out high school math is hard, and getting more students to attain a high-level of math skills is also hard. In fact, "The proportion of Canadian [15 year old] students with high-level mathematics skills dropped slightly between 2003 and 2009" (Students With High-Level Math Skills) — that's six years of stagnation, if not decline.

So where are the Canadian STEM students? Don't be surprised you can't find them: literally over 95% of the 20 to 24 cohort just aren't into STEM.

[1] The numbers in the table were pulled from two Statistics Canada sources: Population 15 years and over by highest certificate, diploma or degree, by age groups (2006 Census), and Major Field of Study - Classification of Instructional Programs, 2000 (13), Highest Postsecondary Certificate, Diploma or Degree (12), Age Groups (10A) and Sex (3) for the Population 15 Years and Over With Postsecondary Studies of Canada, Provinces, Territories, Census Metropolitan Areas and Census Agglomerations, 2006 Census - 20% Sample Data.

[2] I should come clean and say that the numbers are off by five (5). I don't really know why, seeing the numbers are pulled straight from Statistics Canada. I assume it has something to do with the normalization adjustments they do to different tables, or some small error in counting. When the numbers are in the millions, I doubt being off by five is a big deal in this particular case.

[3] See Why push math education onto students?


2013-08-15

2010 MacBook Pro black screen graphics switching bug workaround

Apple 15 inch MacBook Pros from mid 2010 were manufactured with some hardware defects causing it to intermittently freeze or stop displaying video on the built-in or external display. Apple has been replacing affected machines' motherboards, but the problem seems to persist even afterwards, but less frequently.

Any program that makes the system switch graphics processor can trigger the defect.  Typically, for example, the system starts up using the Intel integrated graphics, then you open Chrome, which kicks it over to the Nvidia discrete graphics.  Later, you quit Chrome and when it switches back to the Intel integrated graphics, the screen may now flicker and then go black.

Strangely enough, a workaround exists.  Sleep the computer at least once after starting up.  Once it's gone to sleep at least once, the defeat seems to no longer be triggered upon graphics switching.

Resources:

  1. MacBook Pro (15-inch, Mid 2010): Intermittent black screen or loss of video
  2. Apple acknowledges 2010 MacBook Pro black-screen bug
  3. Lion randomly crashes - black screen
  4. Black screen with flickering on top on MacBook Pro 6,2

2013-08-13

Mounting Mac HFS+ disk volumes as read and write on Ubuntu

I gave up trying to find a volume format for an external hard drive that has read and write capable "tri-platform" (Mac, Windows, and Linux) open-source reliable drivers.  For now, a modern volume format that works between Mac OS X 10.6 and Ubuntu 12.10 Quantal machines is good enough, and that seems to mean HFS+.

To be specific, that means volumes formatted as HFS+ (case-sensitive) without journaling on a drive that is GUID Partition Table (GPT) partitioned.  Journaled HFS+ will not be writable in Linux at all, ever, with current Linux drivers.

How do we make an un-journaled HFS+ volume writable in Ubuntu?

In Ubuntu, make sure you have hfsprogs and hfsplus installed.  A terminal command like sudo apt-get install hfsprogs should do it.  It might even already be pre-installed by Ubuntu.

2013-08-07

Firefox 23 removed Advanced JavaScript Settings: how to get them back

The all new Firefox 23.0 removed a bunch of old features, including the blink tag. Most people won't care, because they are old features or, by now, reserved only for really advanced users. Things like the Advanced JavaScript Settings were removed along with the ability to disable JavaScript in general.

It makes sense given that nowadays, JavaScript is a given for basically all web apps. But strangely the Advanced JavaScript Settings features were removed from the Preferences window, which I liked using to fine-tune what I want disabled (because the vast majority of JavaScript is fine with me).

Specifically, there were five options. For now, the features are still there, but hidden in the about:config options screen (type "about:config" as the URL to see it).  Here are the about:config equivalent of the now hidden Advanced JavaScript Settings:
 Enjoy the new Firefox!

2013-08-06

Mounting Ext2/Ext3/Ext4 USB Flash Drives on Mac: Read Only Success

As I've written in Mounting TrueCrypt Ext2/Ext3/Ext4 Volume on Mac: Read Only Success, it is possible to mount TrueCrypt volumes formatted as Ext2, Ext3, or Ext4.  It turns out the same software (TrueCrypt being optional) can let you mount USB Flash drives in those formats as well.

I could only get it to work in read-only mode though.  The software you'll need to install are, in this order:

  1. OSXFUSE (2.6.0 at time of writing).  This is the successor to MacFUSE, which is no longer maintained and should be considered outdated.  Make sure to install the MacFUSE compatibility layer when installing OSXFUSE (you may have to choose this explicitly under custom install within the installer).
  2. Fuse-ext2 (0.0.7 at time of writing).  More Fuse-ext2 documentation is available.
The tricky part is actually to find a USB Flash drive formatted correctly.  I did some testing on this, and found that technically, a USB Flash drive whose partition map scheme reads as Master Boot Record in Apple's Disk Utility program, equivalently, its partition type reads as W95 FAT32 in GNOME Disks (née GNOME Disk Utility, née Palimpsest), is required.  Then a volume created within that partition scheme that is formatted as Ext2, Ext3, or Ext4, can be mounted in read-only mode on a Mac (given the above two software are installed).

I could not get it to mount in read and write mode.

Note that if you format the drive in GParted - Gnome Partition Editor, it may inadvertently partition it in some Linux format that Macs cannot read at all (Mac OS X will prompt you to initialize the drive, thus erasing all data).  I used GNOME Disks to format just the volume to Ext2/3/4, without erasing and re-partitioning the disk.

In my opinion, the state of affairs of disk formats is really quite sad when it comes to cross-platform interoperability.  There is no easy to use, reliable, and modern file system that is full featured on all three major platforms: Windows, Mac, and Linux.  The closest is FAT file system, which is decidedly not modern.

2013-08-01

Select columns by filtering on column names with Clojure Incanter

Incanter is a pretty amazing library for working with data.  With a table of data, it's easy to select rows of data to work on by filtering on the data in each row.

For example:

(let [data (to-dataset [{:a 1 :b 2} {:a 3 :b 4}])]
        ($where {:a {:$gt 2}} data))

That will select all rows where given a row, its data under column :a is greater than 2.

But what if you want to filter the dataset to get rid of certain columns?  Say you only want column 0.  This can do that:

(let [data (to-dataset [{:a 1 :b 2} {:a 3 :b 4}])]
        ($ :all 0 data))

What if you want columns 0 and 2?  This can do that:

(let [data (to-dataset [{:a 1 :b 2 :c 3} {:a 3 :b 4 :c 5}])]
        ($ :all [0 2] data))

What if you want to select by column name, e.g. only selecting columns with name :a and :b?  This can do that:

(let [data (to-dataset [{:a 1 :b 2 :c 3} {:a 3 :b 4 :c 5}])]
        ($ :all [:a :b] data))

Here's the tricky one.  What if you want to select by column name, but you want to match the column name against a regular expression (say only names containing a vowel)?  The $where method only lets you select rows of data based on a query — it's a row-wise filtering operation.  We want column-wise filtering on column-names.

My first attempt involved taking the dataset, turning it into a clojure map, then filtering on the map's keys, and finally turning it back into an Incanter dataset.  But doing so ran into a problem in Incanter: to-dataset and to-map are not inverse functions of each other.

That is to say, there exists a file of data *filepath* that can be read into Incanter with read-dataset such that this does not work: (to-dataset (to-map (read-dataset *filepath*))).  For example, if the file is a CSV spreadsheet file with missing data in some cells (not nil, not 0, just no data).

Turns out the solution is much easier:

(let [data (to-dataset [{:a 1 :b 2 :c 3} {:a 3 :b 4 :c 5}])
        columns (filter #(re-find #"aeiou" (str %)) (:column-names data))]
        ($ columns data))

The idea is to create a list of column names of the columns you want, then use that list of column names with $ to select them out of the dataset.

Column-wise selection isn't as convenient as selecting row-wise, but this is one way that works.