Sunday, October 30, 2011

Preventing SIDS with breathing monitors: Nonsense from both sides

I read with interest this Globe and Mail article today about the marketing of devices that purportedly prevent SIDS. Almost everything in the article is an important read for parents of babies. I completely agree that marketing devices with specific medical claims should not be allowed unless there is scientific evidence backing up those claims. And certainly, there is a lot of hocus-pocus at the website

However, I take exception to a quote attributed to Irene Morgan of the  Canadian Foundation for the Study of Infant Deaths. She says that breathing monitors pose "a danger to infants" because "it provides them with a false sense of security".  "High-end baby monitors may lull parents into thinking they don’t have to be as strict with their baby’s sleeping arrangements".

Excuse me?  Is there scientific evidence that these devices have caused harm?

Does using a children's car seat provide a false sense of security? Do parents drive more recklessly because they have installed a proper car seat?  Do people eat a worse diet if have an annual checkup and therefore are placated into thinking any problems caused by their diet will be detected?

I am not comparing car seats to breathing monitors. The former have been proven to save lives, the latter have not. The parallel I am drawing is the questionable assertion that people will be less careful when a safety device is in use. When making such a claim, evidence needs to be given. Perhaps some people will be less careful. But that doesn't mean that the safety device should be banned; it simply means that people using it should be warned that

The American Academic of Pediatrics has a policy that doctors should not prescribe breathing monitors, because research has shown that apnea (temporary cessation of breathing) does not seem to cause SIDS. And there is a small amount of research that says parents are under more stress when using a monitor (because they are talking about premature infants with lots of short periods of apnea, and hence lots of alarms). But there are non-sequiturs here: This research is primarily about premature infants, not normal infants whose parents might buy a regular baby monitor; it is talking about expensive medical monitors, and the research shows that even the stressed-out parents were happy, after the fact, to have used the expensive monitors. I can certainly see that it is important not to recommend an expensive therapy that seems to induce high stress and has no proven benefit. But this is not the same as saying that ordinary people shouldn't use an inexpensive variant in a non-stressful situation where there is no evidence of harm.

We have used an AngelCare monitor with a breathing detector for all three of our children. We love it. We even got a second since our first two children were relatively close in age. This is one of the devices that the Globe and Mail article and the Canadian Foundation for the Study of Infant Deaths is criticizing. To me there is absolutely no comparison between using such a device and using proven-dangerous positioning aids, that the article also criticizes, or following other hocus-pocus on various websites.

The AngelCare monitor has a device that goes under the mattress and seems to do a good job of detecting breathing, or lack thereof. If we remove the baby (so no breathing is present) the alarm sounds.

We had two false alarms early on with two of the children (due to short periods of shallow breathing). I supposed this may have caused us minor and very temporary stress for a couple of minutes. But it is reassuring to know that baby has not somehow smothered herself. And surely if she did suffer SIDS, she would stop breathing and the alarm would sound. It would surely be better to know that so one could call 911 and start CPR, no?

Are we going to do reckless things with our baby because she has a breathing monitor? No. Are other people likely to? If scientists think so, then they should do a large-scale study.

Note: The above is not medical advice. I have no medical training.

Tuesday, October 25, 2011

Nobody should use throwaway dryer sheets because there is an alternative

I don't usually plug products in this blog, however I am making an exception. Today I am going to recommend that everybody cease using traditional throw-away dryer sheets or any form of fabric softener, and instead use Static Eliminator reusable dryer sheets or a similar product.

We bought some five years ago, and they are simply brilliant; they utterly eliminate the need for fabric softener. You just leave two of them in your dryer at all times and you absolutely never get any static cling.The picture below shows them in our dryer. They seem to last forever (we wash them once every year or so). I estimate they have been through the dryer well over a thousand times doing all the wash for our family of five.

What is wrong with traditional dryer sheets with fabric softener?

  • They may contain hazardous chemicals (see this post and this post). I haven't independently verified that, but whether or not it is true, why take the risk when there is an alternative that works just as well. The comments about toxic ethanol in some posts are obviously absurd (alcohol will evaporate in any dryer), but the other ingredients seem to be legitimate things to avoid, especially for those with sensitivities.
  • Why pay the money when you don't have to?
  • Why buy throw-away products that add to landfills?

All you have to agree with is any one of the above three points, to make the decision to move to reusable dryer sheets.

Of course, the greenest of my friends will say, "if you care that much, just hang your laundry outside." Modern life in sometimes-wet and often-frigid Canada, with three kids, lots of hard work to do, and wood smoke and many outdoor allergens to avoid that get into clothes left to dry, makes that a non-starter unfortunately.

My point is this: there is a big industry out there promoting a product that is absolutely unnecessary. Just say no! Incidentally, we purchase ours online from a local Ottawa store.

One thing I find interesting is that most people who complain about dryer sheets don't seem to even know about the alternative. For example this post doesn't mention the Static Eliminator product or other reusable sheets. There is, however, a mention of reusable sheets in this article from How Stuff Works. Unfortunately they don't cite anyone testifying to their effectiveness.

If you want to encourage others to use reusable dryer sheets, refer them to this post: Five years and counting, with no static cling (except for the odd time when we forgot to put the reusable sheets in the dryer).

Wednesday, October 19, 2011

Occupy protest alternative: A public economic/political simulation everybody can use

I am all in favour of protesting when the objectives are clear, but the current 'occupy' protests will get nowhere, since their objectives are too fuzzy. Later in this post I will propose an alternative.

Essentially the protesters are saying:  "the world economy is in trouble and it's all because of evil corporate greed and evil lobbyist influence on politicians". But what concrete action could be taken to address these grievances? By not stating clear objectives they are saying "politicians (who we don't really trust), delver us from evil". They are protesting on a whim and a prayer.

The protesters are passing the buck to the politicians (and central bankers). But it is absolutely clear that 1) those politicians want to solve the problems so they can get re-elected; and 2) they either have no idea what to do, or vehemently disagree about what to do; and 3) the reality is ultra-complex, and any given solution will have adverse consequences that the politicians and the protesters alike either have no idea about or disagree about.

Let's look at what the protesters consider evil:

  • Corporate greed: What is this exactly? Paying too much money to executives? Solutions would be a) to cap salaries (consequence – the executives might leave for jurisdictions that didn't have caps, or might earn lots of money in other ways such as trading stocks, distracting them from focusing on running their companies); b) to punitively tax corporations that pay excess salaries (consequence – this would just drastically cut profits and crash the stock market, ruining pension plans, increasing unemployment and cutting government revenue); c) to tax the executives a lot more (consequence – they might move corporate headquarters to lower-tax jurisdictions).
  • Lobbyists: Most jurisdictions have already severely constrained corporate donations to politicians, so what further actions could be taken? Ban people representing business from discussing their opinions with politicians? (consequences – it would be ruled invalid by the courts as an infringement on freedom of speech, and would mean that politicians could not be informed of legitimate points of view)

In my opinion, the real problem that we are facing is a dysfunctional political system that favours a) short-term pandering to the electorate with goodies over scientifically analyzed solutions, b) rhetoric over education, and c) protest and ideology over sensible discourse.

This has led to unsustainable deficits, unsustainable energy policy, unsustainable environmental policy, and unsustainable increases in certain kinds of costs such as in health care. The unsustainable deficits are what are wreaking havoc in Europe and the US right now. The other unsustainabilities are waiting in the wings to wreak different kinds of havoc.

Here's my idea that could help lead to a solution:

Create a web tool with a comprehensive model of the world political system, economy and environment. It would have the following features:

  1. Everybody could specify the policies they prefer and see the short-term consequences of these policies on such factors as unemployment, inflation, levels of government service, poverty, crime, standard-of-living, environment, etc. Tea-partiers could chop taxes. Occupy protesters could apply any of the policies I discussed above. The results in the model would be graphically visible.
  2. The assumptions could be varied: Economists, sociologists, scientists and ideologists could all come up with sets of assumptions: To what extent would executives quit if they were taxed much more? To what extent would a carbon tax influence people to reduce their  carbon consumption, and to what extent would more expensive fuel shift investment? To what extent would people who find they have more money due to lower taxes put it into savings, or spend it? To what extent would reducing corporate taxes shift business from one jurisdiction to another, or result in corporations hiring people, raising salaries, or paying dividends? Essentially, the tool would allow members of the public to pick different sets of assumptions, posited by different think tanks, and see the consequences straight-forwardly. The sets of assumptions would be equations, hopefully with some research to back them up; those who wanted to could link to the research to see how believable they think it is. My hunch is that the simulator would give very similar results for most evidence-based sets of assumptions.
  3. The system would have a world-wide perspective. Policies could be adjusted just in one's home jurisdiction, or on a global scale, so people could see whether international agreements could help or not.
  4. The user interface would be very simple, akin to the Three Ontario Votes site or the Vote Compass site, although there would be an ability to turn on more complex capabilities for people with more background. For example, the equations of the assumptions would not be immediately visible, because most people would not understand them.
  5. People could, after exploring various sets of policies, settle on a set they are comfortable with. Perhaps they could even do this for different sets of assumptions (as in point 2 above). The accumulated preferences of people (and the consequences of those preferences) would be visible.

Such a tool would have the following benefits:

  • The tool would serve as a massively distributed way to creatively evolve policy alternatives that might actually work
  • People would see the folly of certain policies (e.g. why cutting taxes all-round is unlikely to have the benefit right-wingers expect); this might tone down the rhetoric of the right and the left a little, and result in more sensible, less dogmatic discourse
  • Ordinary people would learn about the real consequences of different policies and might be inclined to vote for politicians who propose the more sensible alternatives
  • People could protest for concrete policies that the simulator shows would give benefits they are interested in.
  • Lobbying could become part of the public discourse, with the lobbyists promoting certain sets of assumptions in the tool.
  • People might tend to tone down their expectations. They might realize that they can't have a cadillac health care system, and might be willing to settle for lower levels of certain kinds of services or higher taxes.

Those with axes to grind might  claim the simulator is nonsense when it doesn't give the results they wish. But since the simulator would be open, they could enter their own 'set of assumptions'. My expectation is that vacuous evidence-less assumptions would be clearly visible as such; in time people would gravitate to assumptions that are more reasonable. Furthermore, the performance of different sets of assumptions could be tracked over time.

Creating a good simulator would be complicated, but I think it could be done by an open-source consortium funded by a few philanthropists and with government funding through charitable tax deductions.

Sunday, October 16, 2011

Umple: status and recent progress

Here's a recap of what's going on in the development of Umple, as of mid-October 2011. This covers the most significant news from the last few months.

People on the Project:

We have had several fourth-year students from universities across Canada working on our project through the UCOSP program. Collectively they have banished several long-standing bugs in the compiler and are now working on some of the changes discussed below. The current three participants are Joshua Horacsek, Joel Hobson and Alvina Lee. We anticipate additional groups of students each semester.

Four graduate students are also very active in improving Umple: Omar Baddredin (state machines), Hamoud Aljamaan (tracing), Miguel Garzon (umplification), and Sultan Eid (C++). Andrew Forward, one of the long-term system architects, remains active and will be working on patterns and empirical studies with Umple.

User Manual and Wiki:

The user manual has been upgraded so most mature Umple features are now described, with examples. The examples can be made 'live' in UmpleOnline. Effort has also been put into improving the organization of the wiki, particularly pages to help people installing Umple and who want to develop Umple itself.


UmpleOnline has seen several important improvements. There are now a variety of ways to open Umple models directly as part of URL. You can open any .ump file on the Internet using the 'filename' argument. You can also open the built-in examples using the 'example' argument, or models you are collaboratively evolving with the 'model' argument. UmpleOnline now also allows you to generate zip files and JavaDoc documentation.

Taken together with the enhancements to the user manual, these features have significantly improved the ability to use Umple to teach UML in the classroom.

Future: UmpleOnline's graphics for drawing class diagrams have some glitches related largely to cross-browser compatibility. We are therefore planning to move towards using a toolkit that will render diagrams using html5. We hope to achieve this within a year, maybe sooner.

Outreach and publicity:

One of our key needs is to have more developers using Umple. This will result in improved quality (through detection and correction of bugs, and discovery of new features) and will hopefully result in more people understanding and adopting our overall philosophy and vision. Hopefully this will in turn improve software engineering more generally.

The Umple Facebook page has received a lot of traffic. We frequently post small news items here. Facebook says that many of these get 100 or more views. Please 'Like' this page. We currently have 21 likes; when we get 25 likes we will be eligible for a much nicer URL in Facebook.

Umple is listed on all the important open-source directories, specifically

  • Ohloh: We have 4 people who indicate they use Umple. Interestingly, they calculate that our code base must have resulted from over $4million of work, when in fact total funds paid have been on the order of $200k, since this has been largely developed by PhD and masters students. We are listed on the second page of their UML tools directory; if 7 more people indicate they use Umple, then we would be listed on the first page.
  • The Open Source Directory: We are currently rated as 4.5 stars.
  • Freshmeat: This is the standard place to post release notifications.

We encourage everybody to +1, 'Like', and indicate they 'use' Umple on all these sites.


We are going to make a new formal release of the compiler soon (1.15). This will incorporate a lot of bug fixes and enhancements that have been recently made. UmpleOnline always uses the 'bleeding edge' of the compiler, so is ahead of the formal release cycle; you can try out the forthcoming 1.15 there. With the formal 1.15 release, we will change Umple to compile itself using 1.15.

Recent changes to the compiler (available in UmpleOnline and will be available in 1.15):

Issue 221: isX methods now are generated by the compiler from Boolean attributes. This is consistent with Java conventions. Note that getX methods are also still generated for compatibility.

Issue 26: Singleton classes no longer generate constructors that require arguments. The 'lazy' keyword can now be applied to any attribute, if you don't want it to appear in the constructor; the fix to issue 229 is to default all attributes to lazy. In addition associations to other classes with a '1' end will instead be interpreted as 0..1.

Issue 229: The generate clause can now take an argument specifying a directory where the code will be output. This is useful for build scripts. You can have different generate clauses for each language (e.g. java and PhP). You can use the 'override' keyword to ignore any subsequent generate clauses.

Issue 146 and issue 227: Comments placed immediately before a class in Umple now appear in the generated code. In Java these are generated in such a manner that they will appear in generated JavaDoc documentation.

Issue 137: Use of depend after the isA keyword no longer fails.

Issue 172Tracing: You can now use the 'trace' keyword followed by an attribute name to output a record of changes. You can also do this conditionally. This is the first phase of large tracing capability being added to Umple. Tracing of associations will be added soon.

Issue 223: Developer debug mode: This will allow developers of Umple to determine the Jet template where generated code originated (this is actually not active yet, but when completed, it will be a key part of 1.15).

Plans for the compiler for the next few months:

1. Issues 238, 239 and 240History and final states: These enhancements to state machines are under development. Both are part of UML. They may make it into 1.15, or may be released later. Entering a final state would result in deletion of the object. If there are several concurrent regions in a state machine, the deletion would only occur when all regions reach the final state.

2. Issue 66Useful error messages. The biggest weakness in Umple currently is that its error messages just point to the point of failure of a parse. In UmpleOnline, even that is missing. UCOSP students are working now on building the infrastructure for comprehensive error reporting. This would include reporting parser errors as well as semantic errors in Umple (e.g. making a class a subclass of itself) and errors from the base-language compiler that is used to compile methods. Once this is all done, Umple should appear to any programmer just like any other compiler.

3. Issues 154155, 236 and others: Spacing issues in the parser. The parser is overly sensitive to the location of spaces. This is being addressed.

4. Issue 19: C++ generated from Umple. We have enabled 'generate cpp'; initially this is a clone of Java. Over the next few months we will adapt the code so it is proper C++.

In addition, further work on tracing will be accomplished, and the first public release of the umplificator tool might become available

Known bugs:

Several bugs have recently surfaced that warrant note:

Windows 7: Although Umple can be used in Windows 7, Umple itself seemingly can't be developed in Windows 7 due to bugs that remain unresolved at this time. Development of Umple can be performed on Mac, Linux or earlier versions of Windows.

Issue 235: Compiler generated in Mac OS adds escape characters to quotes. Although the compiler should be identical no matter where it is built, there is currently an issue with a compiler built on Mac OS when the ="initial value" notation used. A compiler generated on another platform will work fine on Mac OS.

Saturday, October 15, 2011

Top degrees: Computer Science PhD and Software Engineering Bachelors

An analysis by the website presents interesting data that should encourage high-school students to enter the computing profession.

They rank PhD in Computer Science as the second-best degree, and Bachelors in Software Engineering as the third-best degree. Bachelors in Computer Science is not far behind at 7th.

Their criteria combine job demand and salary, and are based on data from the US Bureau of Labor Statistics. This is not the only study to come to similar conclusions; every year fresh studies say the same thing. For example CareerCast rated software engineering the top career earlier this year, and another study used BLS data to draw interesting charts showing that software engineering is expected to dominate new job creation among all technology jobs.

I always tell people that software engineering and computer science degrees are among the few that essentially guarantee good jobs in the student's field of study. Note that most computer scientists end up practicing software engineering when they are actually hired (for my discussion of the differences, written a decade ago but still valid, see here) and I consider a CS graduate in an SE job to be, broadly speaking, practicing 'in their discipline'. Students who obtain most other degree types have a much higher chance of having to settle for a career outside the discipline of their degree. This includes degrees in the ever-popular biosciences or social sciences.

However a decade after the famous supposed tech-crash, a lot of members of the public remain incredulous when I tell them the above. They still have in their mind the total fallacy that computing is a field with high unemployment, largely because they have heard media reports of layoffs at prominent companies. But other hiring companies abound and there have been huge numbers of high-tech startups in many areas of the world.

At the University of Ottawa, where I am a professor, our first-year enrolments in these fields have only just this year begun to approach the levels of the mid-to-late 1990's, after being dramatically down for 7-8 years. Enrolments are still well behind their tech-boom peak of a decade ago. Meanwhile we are bombarded by companies desperately trying to hire people, but unable to find them. Co-op students complain of having too many interviews (which takes too much time away from their studies). By their fourth year, many of our top software engineering students have found jobs in at companies like Google, Adobe and Oracle at their head offices in the US – sucking fresh talent out of the local Ottawa market. A quick plug: UOttawa pioneered software engineering education in Canada and internationally; when our students go to these companies they report that colleagues from very prestigious US universities admire their abilities.

My message is this (and it is a message I have been telling people for 10 years): Tell anyone you know who is in high school or has kids of that age, and who has any interest in technology, to go into software engineering or computer science. There never was a crash of employment in the field, just minor blips that have long since passed. There are plenty of jobs as the above links show. In my own city, here are some links from job-posting aggregator Jooble to companies hiring now using 'software' and 'computer programmer' keywords.

As for doing your PhD in Computer Science (second-top job). I am glad to be one of those people! It is overall a great career. And most of my PhD graduates are doing well. However, new PhD's in Computer Science shouldn't count on becoming a professor any time soon, there are very few openings precisely because of the lack of undergraduate students over the last decade. This will hopeful rectify itself over the next decade, but consistent undergraduate enrolment increases are needed first. One of my five PhD graduates is a professor; two are independent consultants and two are working for high-tech startups. The challenge for those who are not actually professors is to maintain their research skills and publication record while waiting for the faculty-position job market to loosen up a bit.

Friday, October 14, 2011

Steve Jobs: A Personal Inspiration

Here's are my personal thoughts about what Steve Jobs has meant to me, and how I hope many aspects of his like will continue to serve as an inspiration to me for many years to come.

I have been an Apple user since the earliest days, and have exclusively used Macs as my personal computers since 1984.

It was partly the stark simplicity of the early Macs, and of many later Apple products, that led me to focus my career on usability and simplicity in software engineering.

But perhaps, above all, it is Steve Job's rejection of many technology dogmas, and his advice to not be afraid of changing course, and even quitting a job that one doesn't like, that I think it is most important to take as an inspiration.

Steve Jobs quit college to pursue his dreams. While I don't recommend that people quit their studies or jobs on a whim, I certainly believe that if somebody doesn't feel they are following a life path or career path that leads to fulfilment, then changing course is critical, even if it is risky and frowned upon by others.

This encourages me to question the norms of my profession, and to try new approaches, even in the face of discouragement by others. My career passions are writing, software design and teaching. Yet a professor of computer science is boxed in by narrow criteria of how they should publish. A former Dean even told me that I should not be developing software since, that did not constitute research.

I have spent a lot of time on educational research, even though that is looked at by many others as a second-tier research topic.

Recently I have made a decision change the way I do research, even though this means fewer papers and may cost me future grants. I have a passion for what I believe is the future of software development – model-oriented programming. And I want to develop Umple as an example of this and a vehicle for exploring ideas in that domain. To do that I have to put personal effort into actually doing software engineering (including model-oriented programming itself), which takes time away from writing papers. I also have to require the same of my graduate students and have to be fastidious about software qualities such as usability, and other matters that many researchers would say should not be my concern.

So may Jobs rest in peace, and may he serve as an inspiration to help people like me who don't want to have to slavishly follow the norms of their profession and instead to follow their passions.

Thursday, October 13, 2011

Tax fairness for citizens residing in other countries

I have been watching the situation wherein the US is threatening to tighten demands on its citizens to file a US tax return pay US taxes, even when they reside in other countries.

This morning, there is an interesting article in the Globe and Mail that proposes that the Canadian government retaliates and forces the millions of Canadians living in the US to do the same. That would hurt those Canadians, but the idea is that US banks, who would have to report income to Canada, would lobby against the whole silly situation.

This issue interests me for two reasons: The first is that I am a dual UK-Canadian citizen. I long ago filed relatively simple papers with the UK stating that I am a resident of Canada, allowing my small UK income (book royalties) not to be taxed at source. This required certification by the Canada Revenue Agency that I have been paying taxes to Canada that include my foreign income. I certainly don't have to file a tax return there and I don't have to repeat that non-residency filing – it was a one-time matter. I would be very concerned if even small aspects of the US model of citizen-taxation were to be adopted by the UK. The likelihood of this happening is small, but it gives me the shivers to think about it. Going through the paperwork of filing one country's complex tax return is a necessary chore; but doing two forms in order to actually be double-taxed would be horrendous. Even if a tax treaty allowed me to deduct the taxes paid in the country of residence, the multiplication of paperwork is just a nasty thought. To increase everybody's productivity, all countries should seek to minimize the amount of paperwork its residents or citizens have to file.

My second interest is that I have fastidiously avoided anything that will end up forcing me to file a US tax return or even get a US Social Security Number simply because situations like this make me ultra-wary of any involvement with the IRS. The Canada Revenue Agency and the Canadian tax system seem so much friendlier. I have on various occasions been offered small US contracts, or honoraria. Some of these would have resulted in tax deduction at source, or would have required a US Social Security Number. I want to maintain my privacy and only reveal data to the government in the country where I live and obtain services. I see the US's desire to have non-residents file complex forms to be excessive. Before accepting any US source of funds (e.g. being paid to review a book), I ensure that there will be no requirement for a SSN or taxation at source. As a result I have repeatedly turned down such offers. I have even turned down volunteer tasks because the agency in question has had a requirement for an SSN in its registration process. Two of my daughters were given a single share each in entertainment companies as gifts when they were born. The minuscule dividends are taxed at source, and I am threatened that unless I file IRS paperwork, I may be considered (as guardian) to have abandoned the shares; so be it (I am told the solution is to transfer the shares to a US brokerage account, something I intend to investigate).

One can imagine the motivations the US has to force its citizens to file a tax return: It is concerned about its wealthy citizens ostensibly living and earning income in tax havens like the Cayman Islands, yet 'visiting' the US for a large portion of the year. Maybe it also feels that even if they are non-residents, they still are entitled to such costly benefits as consular assistance, defence of their freedom, the right to vote and the maintenance of the US political system on their behalf, etc.

These are legitimate concerns. Offshore tax havens should, however, be tackled in other ways (diplomacy, banning domestic banks from dealing with banks in countries that don't reasonably tax their residents, taxing transfers of funds to those countries, etc.). I would be fine to require a citizen to file taxes to their home country if they live in a designated tax haven, and to make agreeing to this part of the process of obtaining a passport. A designated tax haven could be, for example, a country that has little or no personal income tax.

Consular services and the right to vote while a non-resident, if allowed, could be paid for by fees for passports or non-resident voter registration. Perhaps if people want to go to risky countries they should have to declare this in their passport application and pay a significantly higher fee (a form of insurance), or else agree in advance to lower-priority help if they run into trouble in such countries.

As a resident of Canada, I have to declare my foreign income, and would have to declare substantial foreign assets, if I had any. I am fine with this. I would also be fine filing a US tax return in any year I lived there, even for a couple of months. US citizens living abroad should essentially be treated the same way as I would be if I lived in the US, or the way I am treated by the UK. A simple declaration of non-residence (with evidence of paying foreign taxes) should be enough. I actually think that if the IRS were friendlier, they might in fact find that people are more willing to pay taxes to them.