Showing posts with label rant. Show all posts
Showing posts with label rant. Show all posts

Tuesday, July 8, 2025

Android Silliness Part II

Last year I documented at great length a mess I went through when a very straightforward morning radio alarm I had set on my bedroom smart speaker had to be replaced by a Google "automation". That post ended with my having successfully implemented a solution.

Well, that was then and this is now. Google recently introduced Android 16 and I recently upgraded my phone from a Pixel 6a to a Pixel 9a. One or both of those events killed my morning alarm. Instead of hearing Google's voice telling me "streaming NPR on WKAR" (my local NPR radio station), I heard "OK, here's a playlist from YouTube Music" followed by some noises that I suspect are used to soften up presumed terrorist before interrogating them.

This was baffling in several ways, starting with the fact that I have never, ever instructed Google to play random music from YouTube Music early in the morning. More baffling is that when I went into the Google automation settings, my morning routine was still there, still marked enabled, and still listed as doing the same things: playing the radio (station = WKAR FM) on the bedroom speaker. Manually triggering it, however, did not work.

I have no idea what the problem was (is), but I eventually found a work around. I changed the "action" setting from playing the radio (one of a menu of possibilities controlled by a multiple select input) to a "custom" action (selected via "Try adding your own (Experiment with custom actions)". That opens a text input where you can type pretty much anything you might verbally ask Google Assistant to do. In my case that meant "Stream WKAR FM radio". To date, that has worked, which I assume means Google has engineers working on a fix for it.

If any Google engineers are reading this, may I recommend consulting the "Redneck Repair Manual" (page 1): "If it ain't broke, don't fix it."

 

Friday, January 17, 2025

Mint Madness

I'm a long time, and generally quite content, user of the Linux Mint operating system. For quite a while now, it has had a very nice Software Manager program that lets you install or uninstall programs, as well as an older program named Synaptic that provides more fine-grained capabilities. Synaptic has not been updated in almost two years. To a lot of computer nerds, that means it needs to be replaced. To me, it's a reminder of the first sentence of the "Red-neck Repair Manual": "If it ain't broke, don't fix it."

Today I upgraded Mint from version 22 (Wilma) to version 22.1 (Xia). To my surprise, the upgrade uninstalled Synaptic and did not reinstall it. There was no warning in the Mint 22.1 release notes that this was going to happen (?!). Fortunately, it remains available in a repository and I was able to reinstall it (somewhat ironically, via Software Manager, its ostensible replacement).

I looked at the Mint message boards, and there was a fair bit of confusion and concern about this, along with some relief when users found out they could reinstall it. Looking for a rationale for the removal, all I could find were some vague assertions about there being better alternatives (Software Manager?) than the aged Synaptic, and speculation that the Mint developers were perhaps trying to push users to Software Manager or something new.

Here's the problem with this: Software Manager is not a replacement for Synaptic. It's fine for installing programs, but as best I can tell it is useless for installing libraries. For example, suppose that I want to install a program or library that will mess around with PDFs, and the installer balks because it cannot find the libpoppler library (or cannot find the correct version of it). With Synaptic, I can search "libpoppler" and see which versions I have installed and which are out there but not installed. Odds are a third-party program or library looking for it wants libpoppler-dev, and if I don't already have it, it's a couple of clicks to install it with Synaptic. If I search Software Manager, it won't find what I need. (As of today, at least, it just suggests Ruby-poppler, which it says contains Ruby bindings for libpoppler, as opposed to libpoppler itself.) There's a switch in Software Manager labeled "Search in package descriptions (even slower search)". I tried that and I can confirm that "even slower" was a massive understatement. "Glacial" might be more accurate. The extra time was for naught; it found an R library that uses libpoppler and one other similarly irrelevant hit, but nothing related to installing libpoppler.

I am at a total loss as to why the Mint folks would take away a convenient way to install libraries (not included in programs). There are other ways to install libraries (including directly from the command line), but I am not aware of any as easy to use as Synaptic ... which I fortunately still have.

Monday, November 18, 2024

Android Silliness

Once upon a time I bought an Insignia smart speaker (with Google Assistant baked in) for my bedroom. I could set an alarm that would stream my choice of radio station using verbal commands ("Hey Google, set a radio alarm for ..."). It worked so well that Google decided to fix it.

At some point I saw a brief item in a tech feed about Google eliminating radio alarms in favor of some sort of automation thing, but my speaker kept on working and I ignored the story ... to my own peril. A few weeks ago, I canceled the existing alarm. When I went to set a new alarm, the speaker's response was "I'm sorry, I don't know how to do that."

After a bit of research, I discovered that the Google Home app now has something called "automations". It turned out a bunch of predefined automations were set on my phone, none of which ever did anything (because I never uttered the necessary incantation?). None were anything I wanted, so I turned them all off and created a new one. Automations involve one or more "starters" (in my case, every day at 6:57 am), one or more "actions" (in my case, play the radio station I want) and a "configuration" (in my case, play it on the bedroom speaker). You can test the automation by tapping a button (and I did). It worked when triggered manually.

So began the adventure. On day 1, the new automation failed to do anything. I woke up on my own (belatedly), changed the time to five minutes or so after I awoke (call it 7:20 am), and it worked. So I reset it to 6:57 am, and the next day it again failed. Eventually I found a notification hidden away somewhere that the automation had failed due to scheduled down time being set. I went to the settings menu in the Home app, found "Digital wellbeing", and sure enough there was a downtime setting. It was set to expire at 8:00 am, leaving me confused as to why the 7:20 am test had worked, but whatever. I deleted it.

Next morning, no luck. I went to the settings for the speaker and found it had its own digital wellbeing setting, which I also deleted. Still no luck, and no notifications I could find as to why it did not work.

I'll skip over the details of a very unsatisfying online chat with a level 1 Google support person (who did not seem to grasp that the 7:20 test working implied that the speaker really was connected to the home WiFi) and an email exchange with a level 2 support person who wanted the speaker's serial number among other things. (That was two weeks ago. Nothing back so far.) With some experimentation, I discovered the following. If I set the alarm time prior to 7:00 am, it did not work at all. If I set it to exactly 7:00 am, it triggered at 7:00 am the first day and 7:02 am every day thereafter. If I set it to 7:01 am, it triggered at 7:01 am every day. (Note that the 7:01 setting triggered a minute before the 7:00 am setting did, which offended me as a mathematician due to the lack of monotonicity.)

Ultimately I got another notification about something to do with downtime, which made no sense to me since I had deleted the downtime settings for both phone and speaker. So I went into the phone settings (not the Home app, but the phone itself). After considerable vertical scrolling, I found "Digital Wellbeing & parental controls". Wallowing around in that, I found a "Bedtime mode" (which was turned off) and a "Do Not Disturb" menu. "Do Not Disturb" was turned off on the phone, but fortunately I got curious and burrowed into the menu. In the "General" section of that menu was a heading named "Schedules" saying I had three schedules set. Two of those were "Gaming" and "Game Dashboard" (no idea what they do or why they were turned on). I forget the title of the third one (I have since renamed it "sleeping"), but that turned out to be what was blocking the alarm. I left the start time at 11:00 pm and changed the end time to "6:45 am next day". It had been set to 7:00 am, which apparently was what caused issues. You can customize what things get blocked (via "Do Not Disturb behavior"), but I didn't bother. Curiously, there is a switch labeled "Alarm can override end time", which was (and remains) turned on. Since that did not allow the automation to trigger before 7:00 am, I assume it only applies to alarms and not automations.

With that tweak, the radio alarm via the speaker started working at 6:57 am, and so I am tentatively going to declare victory. Why we need digital wellbeing setting scattered all over the place under various names is a mystery to me, one of many.

Monday, June 1, 2020

An Idea for an Agent-Based Simulation

I don't do agent-based simulations (or any other kind of simulations these days), so this is a suggested research topic for someone who does.

A number of supermarkets and other large stores have instituted one-way lanes, presumably thinking this will improve physical distancing of customers. I just returned from my local Kroger supermarket, where the narrower aisles have been marked one-way, alternating directions, for a few weeks now. The wider aisles remain bidirectional (or multidirectional, the way some people roll). Despite having been fairly clearly marked for weeks, I would say that close to half of all shoppers (possibly more than half) are either unaware of the direction limits or disregard them. Kroger offers a service where you order online, their employees grab and pack the food (using rather large, multilevel rolling carts), and then bring it out to your waiting car. Kroger refers to this as "Pickup" (formerly "Clicklist"). Interestingly, somewhere between 70% and 90% of the employees doing "Pickup" shopping that I encountered today were going the wrong direction on the directional aisles.

My perhaps naive thought is that unidirectional aisles are somewhere between useless and counterproductive, even if people obey the rules. That's based on two observations:
  1. the number of people per hour needing stuff from aisle 13 is unaffected by any directional restrictions on the aisle; and
  2. obeying the rules means running up extra miles on the cart, as the shopper zips down aisle 12 (which contains nothing he wants) in order to get to the other end, so that he can cruise aisle 13 in the designated direction.
Of course, OR types could mitigate item 2 by solving TSPs on the (partially directional) supermarket network, charitably (and in my case incorrectly) assuming that they knew which aisle held each item on their shopping list (and, for that matter, charitably assuming that they had a shopping list). I doubt any of us do have supermarket TSPs lying around, and that's beyond the skill set of most other people. So we can assume that shoppers arrive with a list, (mostly) pick up all items from the same aisle in one pass through it, and generally visit aisles in a vaguely ordered way (with occasional doubling back).

If I'm right, item 1 means that time spent stationary near other shoppers is not influenced by the one-way rules, and item 2 means that time spent passing shoppers increases (because shoppers have to log extra wasted miles just getting to the correct ends of aisles). So if any of you simulators out there would care to prove my point investigate this, knock yourselves out, and please let me know what you find.

Addendum: I heard an interview with Dr. Samuel Stanley, the current president of Michigan State University, regarding plans for reopening in Fall 2020. During the interview, he mentioned something about creating one-way pedestrian flows on campus. (Good luck with that -- herding undergrads makes herding cats look trivial.) The logic he expressed was that it would reduce face-to-face encounters among pedestrians. Dr. Stanley's academic field is infectious diseases, so presumably he knows whereof he speaks. On the other hand, my impression from various articles and interviews is that droplets emitted by COVID-infected people can linger in the air for a while. So there is a trade-off with one-way routing: an infected person passes fewer people face-to-face, but presumably spreads the virus over a greater area due to longer routes. Has anyone actually studied the trade-off?

Tuesday, October 8, 2019

Numerical Inaccuracy (Linear Algebra Edition)

"There are three kinds of lies: lies, damned lies, and statistics." The origin of the statement is lost in time, but the sentiment lives on. I'm tempted to give it a 21st century update. "There are three kinds of lies: lies, damned lies, and floating point arithmetic."

I am currently working on a research project in which the following problem arises. We start with an $m \times n$ matrix $A$ with $m < n$, and a set of indices $I\subseteq \{1,\dots,n\}$. I need to confirm that $x_i = 0$ for all $i\in I$ and for all $x\in \mathcal{N}$, where $\mathcal{N} = \{x\in \mathbb{R}^n : Ax = 0\}$. There are various names for $\mathcal{N}$; I'll go with the null space of $A$.

How do you test whether a particular component of every vector in an uncountably infinite set is zero? Since $\mathcal{N}$ is a vector space, we can compute a basis for it and just check the basis vectors. If $x_i =0$ for every basis vector $x$ of $\mathcal{N}$, it will be true for every vector in $\mathcal{N}$.

This is going on in a Java program, and I have tried multiple linear algebra packages. Initially I had the idea to use a QR decomposition of $A$ to get a basis for the null space, but that requires (at least as far as I know) an upper triangular $R$ component, and neither of the two most promising packages I tried delivered one. (I'm pretty sure the Javadocs for one or both said $R$ would be upper triangular ... but it wasn't.) So I switched to singular value decomposition (SVD) using the EJML library. SVD is generally slower than QR decomposition, but tends to be more accurate.

I got an answer, but a check performed by the Java program warned me that some of the $x_i$ values that were supposed to be zero were in the vicinity of $10^{-6}$, which is a bit dicey to shrug off as rounding error. (The basis vectors are all normalized, by the way.) So I decided to port $A$ and some other stuff over to R and do some testing there ... which is when the adventure began.

The dimensions of this $A$ matrix were $m=401$ and $n=411$. EJML gave me a basis of 17 vectors, indicating that $A$ had nullity 17 and thus rank 394. (The nullity of matrix $A$ is the dimension of $\mathcal{N}$, and is in turn the difference between $n$ and the rank of $A$.) I tested this by doing QR and SVD decompositions of $A$ (using the qr() and svd() functions from the R base package) and the Rank() function from the R pracma package. The QR and SVD results indicated that $A$ had rank 393 and nullity 18. Only pracma::Rank() agreed with EJML ... and that came with the warning "Rank calculation may be problematic". (As if the rest of this stuff isn't.)

So EJML might have shorted me one dimension in the null space ... or maybe not. The smallest eigenvalues of $A$ from the SVD were as follows:  9.16e-05, 5.37e-06, 1.09e-10, 1.13e-15, 7.56e-16, 6.20e-16, 4.87e-16, 3.79e-16, 3.37e-16, 3.16e-16. So the last seven (italicized) were pretty clearly zero and the preceding one (bold) is maybe zero, maybe not. The SVD does not produce the ten zero eigenvalues resulting from the difference between $m$ and $n$, so basically we're looking at a nullity of 18 if you treat the bold one as zero and 17 if you don't.

The 17 basis vectors EJML gave me were all at least close to zero in all components $i\in I$. R had almost all the designated components $10^{-7}$ or smaller. The pracma::nullspace() function gave me 18 basis vectors (despite pracma::Rank() coming up with a nullity of 17), and some of the corresponding $x_i$ were pretty big (0.29, for example) -- way too big to be zero. So my condition is (probably) satisfied if I believe EJML and (definitely) not satisfied if I believe the R computations.

Hoping for some clarity, I calculated (in R) $Ax$ for each basis vector $x$ from either EJML or pracma::nullspace(). The products with the EJML basis vectors were all zero vectors (meaning no components larger than about $10^{-15}$ in magnitude). For the pracma basis vectors, the products had components around $10^{-9}$ in many cases. So much for clarity. Do we treat $10^{-9}$ as approximately zero and believe pracma, or do we call it nonzero and believe EJML?

I'm not new to the limitations of double-precision arithmetic. My first course in grad school was numerical analysis, and I've had a fair share of adventures with MIP models in CPLEX where the numerics were, shall we say, dicey. Still, it's rather frustrating to have to try multiple packages and then have to judge (meaning guess) which one is lying to me the least.

Saturday, May 28, 2016

Rounding Error

I recently experienced the eight-bazillionth iteration of the following scenario. Someone posts a request for help on a forum. They are doing some sort of MIP model, or possibly something even more advanced (Benders decomposition, column generation, ...), and things are not going well. In some cases they think they have made a coding error; more commonly they think the solver (CPLEX in my personal experience, since that's the only one whose forums I watch) has a bug in it. After substantial back and forth, the key problem emerges: their binary variable came out 1.00000 E-9 or 0.99999999, which is "clearly" neither 0 nor 1.

At this point, my reaction is always the same (add your favorite expletives after every few words): "Don't they know about rounding error???"

In fairness, though, they may not, and perhaps the blame lies on the shoulders of faculty (possibly including me, in my former life). One of the courses I took during my first term of graduate school (in math) was numerical analysis. This is back when mainframes were just making the transition from vacuum tubes to semiconductors, and "user input" was a euphemism for "deck of punch cards". It's also a time when memory was at a premium and, thus, single precision ruled the realm.

(BEGIN TANGENT) I suspect that some readers who are (much) younger than I, and who program, will have noticed that pretty much everything of a floating point nature is automatically done double-precision these days, and may be wondering why single-precision float types still exist. They're a holdover from my youth, and I suspect exist almost exclusively for backward compatibility. (END TANGENT)

I don't recall why I picked numerical analysis as an elective -- whimsy, I think -- but it ended up being one of the most useful courses I took in grad school. The first, and most important, lesson from it was that computers do math inexactly. This should be immediately obvious if you stop to think about it. I learned in childhood that 0.3333... = 1/3, where the ... means "repeated an infinite number of times". Stop the decimal expansion after a finite number of digits, and you get something slightly less than 1/3. Now pretend for the moment that your computer encoded numbers in decimal rather than binary, and that you used the expression 1/3 in a program. The compiler would convert 1/3 to a decimal representation, but not 0.3333... -- because that would require an infinite amount of memory to store, and the computer only has a finite amount. So the computer has to truncate the decimal expansion, and as a result what the computer stores for 1/3 is not actually 1/3. (Now go back to using binary. The same logic applies.)

I'm not going to repeat an entire course in numerical analysis here (too much typing), but another lesson I learned was that, when programming, I should never do strict equality comparisons on anything that was not stored as an integer. Here's a small example that I just ran in R (not to pick on R -- it was just handy):
> sqrt(9) - 2.99999999999999999 == 0
[1] TRUE

To a mathematician, that relation is patently false, but to the program the decimal expansion is "close enough" to 3.

My prof shared one anecdote that has stuck with me for almost half a century now. He told of an engineer who coded his own routine for inverting a matrix and was not particularly careful about dealing with rounding errors (and "stiff" matrices, a topic for another time). The engineer then published a paper which included, at one point, the inverse of a particular matrix, computed by his program, with each entry in the matrix printed to some absurd number of decimal places (five, I think). All the digits to the right of the decimal points were wrong. So were the first couple of digits immediately left of the decimal points. You can ignore the limitations of computer arithmetic precision, but (queue sinister background music) those limitations will not ignore you.

Where I'm going with this is that I learned about the limitations of computer math somewhat accidentally, because I just happened to take numerical analysis. I suspect that some OR/IE programs require it, and I'm pretty sure others (most?) don't. In the interests of reducing frustration for a lot of people (of whom I'm the only one I care about), and perhaps avoiding incorrect results being published, I think we should pressure anyone teaching computational topics in OR (particularly, but not exclusively, integer programming) to provide some minimal coverage of rounding and truncation errors, the IEEE standards for single- and double-precision values, etc. If they cannot (or will not) teach it themselves, they can at least require that the student go learn it as a prerequisite.

Please! I'm begging you!

Thursday, April 3, 2014

The Definition of "Open"

Before I climb up on my soapbox, I probably should make a couple of disclaimers to put what follows in perspective.
  • I am a heavy user of open source software, and in particular of products from the Mozilla Project. My primary email client is Thunderbird. My first web browser was Netscape Navigator (which predates the Mozilla Project), which eventually morphed into Mozilla and, most recently, Firefox. I've used other browsers, depending on the platform, but Firefox remains my primary choice (although I may have to rethink that based on what follows). In fact, I'm typing this entry into Firefox.
  • I am in favor of the legalization of gay marriage. For that matter, I'm in favor of legalizing polygyny and polyandry. I'm not saying that I want to try any of them; I just don't see any reason that the government (at any level) has a compelling interest in forbidding any of them, and doing so clearly creates inequality in the treatment of citizens. (Actually, while I don't want to get into the subject in detail, my personal preference would be to take the government out of the marriage business entirely. Religions should be free to define "marriage" any way they want; the government should let any adults of legal age file paperwork somewhere designating individuals to fill the "marital" roles for which the government has a legitimate interest, such as parenting, advanced health care decisions, mingling and division of assets, etc.)
Wondering what brought all that up? I was sitting in a coffee shop this afternoon, catching up on some reading, when I came across a story that nearly caused me to do a spit take: Mozilla CEO Brendan Eich resigns amid controversy. Here's a short summary of the events it describes:
  1. The Mozilla Foundation, in need of a new CEO, hires Brendan Eich (their CTO).
  2. The fact that Eich donated $1,000 (presumably of his own money) in 2008 to support California's Proposition 8 (a bill to ban gay marriage) resurfaces.
  3. Mozilla's corner of the universe reacts (sample here), or possibly overreacts, to the hiring. As best I can tell from reading a few articles, the reaction is largely if not entirely negative.
  4. Three members of the Mozilla Foundation board resign, but allegedly due to a disagreement on hiring an internal candidate and not due to the donation. (This is reported to be half the board, raising the question of how Eich got hired if half the board was so opposed to him that they would resign in protest.)
  5. Eich resigns (possibly under pressure) and Mozilla issues a statement about it (which reads like a mea culpa for having hired him in the first place).
I have never met Mr. Eich, I have no idea whether he was a good pick for the CEO position, and I'm massively confused about how he would be selected with so much apparent board opposition. As noted above, I don't agree with Eich's position on Prop. 8. What caused me to choke on my coffee, though, is nicely illustrated by this line from the Mozilla blog post:
Mozilla believes both in equality and freedom of speech. Equality is necessary for meaningful speech. And you need free speech to fight for equality. Figuring out how to stand for both at the same time can be hard.

So I think they've figured the "hard" part out. You start out by appointing yourself the arbiter of "equality", and then you define "free speech" to mean "you're free to make speeches agreeing with us". Somewhere on the AfterLifeNet, Voltaire and Evelyn B. Hall are probably installing new browsers. I may need to join them (with the browsers, not the after life, just to be clear).

Postscript: For a list of some choice quotes from Voltaire (or at least attributed to him), you might like "Famous Quotations From Voltaire That Still Apply to the Modern World".

Thursday, January 19, 2012

The Most Desperately Needed Degree Program

This morning I stumbled across an article on Yahoo! Eduction with the provocative title "College Majors That Are Useless". Curiosity made me look at the article. What I saw made me double down on my morning coffee intake, since I assumed my brain was not yet functioning.

Two disclaimers are warranted. First, my majors were mathematics and mathematics (with a little statistics in between), so I have no personal attachment to the listed majors. Second, and somewhat contrary, I've spent almost 39 years at Michigan State University (the former Michigan Agricultural College), a land-grant institution with a very strong College of Agriculture and Natural Resources (CANR) and a respected agricultural extension service. While we are a typical, well-rounded university (strong in physics, education and a variety of other fields), we're very proud here of both our land-grant tradition and our strength in agricultural fields. (Note to snobs: Cornell University is another land-grant university.)

CANR is not hurting for majors, and I have not heard of any problems with placement of those majors, so I was rather shocked to see that the first, fourth and fifth "most useless" majors (agriculture, animal science and horticulture) all came from their domain. As a sidebar, we also offer the other two listed majors, apparel design and theater, albeit in different colleges. The article cites the "National Association of Colleges and Employers' (NACE) 2012 Job Outlook study", which is free to members (whoever they may be), and which apparently "surveyed almost 1,000 employers on their future hiring plans". Our library system does not have it, so I can comment on neither their methods of data acquisition and analysis nor the accuracy with which their findings were reported in the article. Naturally, that won't stop me from commenting on the article itself.

First, as a colleague pointed out to me, the article states that 24,988 agriculture degrees (baccalaureate? all levels?) were awarded (in the United States?) in 2008-2009. Amazingly, again according to the article, 24,988 horticulture degrees were awarded that same year.  (I should have gone to commencement exercises. Do you suppose that the two majors paraded together in pairs, as if boarding the ark?) The article reports 89,140 degrees awarded in fashion design that year, which in another coincidence is exactly the number of theater degrees awarded.  Two cosmic coincidences in the same article ... I wonder what the probability of that is?

For what it's worth, the article cites the source of the degree counts as The Daily Beast's list of "20 Most Useless Degrees". The first "useless degree" cited on that list, in what I consider to be a multilayered bit of irony (and with an apology to yet more of my colleagues), is journalism.

Second, referring to the NACE study, the article states that "[m]any areas of study, such as fashion design and the performing arts, didn't even make the list". Does this mean that two of the five "useless" majors were designated that way because there was little or no data in the study on them?  The article does quote job growth or decline projections for all five majors, including fashion design and theater, obtained from the U.S. Department of Labor.

Third, the criterion of "uselessness" of a major is not clearly spelled out in the article. From the focus on numbers of jobs and projected trends in those numbers, I infer that "uselessness" relates in some way to job prospects.  Operations researchers know that if you are going to develop a normative model, you need to define your criterion or criteria carefully.  This is what drove me to blog about the article: not just that the criterion is at best implicitly specified, but that it is not tied to the data in any logical way that I can see.

Is a major "useless" if the number of related jobs is declining?  That is suggested in the discussion of agriculture, the first (and therefore most?) "useless" major on the list. "... That means less [sic] jobs. In fact, the U.S. Department of Labor projects 64,000 fewer jobs in this field over the next seven years."  Okay, then why is theater (with projected job growth of 11% in the same time frame) third on the list of "useless" majors.

Is "uselessness" based on a glut of applicants?  You might speculate that from the inclusion of fashion design, where the government says there were 22,700 jobs in 2008 (with a projected 1% growth over the next seven years) and the article claims that 89,140 students (all with a dual major in theater?) graduated with degrees.  That would be rather scary if the only relevant job for someone with a fashion or apparel design degree were as a fashion designer (and assuming that fashion designers had a projected career span of more than three months).  My impression, though, is that retail chains like to hire fashion/apparel design majors as buyers, because they bring an understanding of the product to their work.  Similarly, agriculture majors are in demand for more than managing farms; food safety inspectors, sales representatives and marketers for firms selling agricultural equipment or products, buyers for grocery chains etc. may all benefit from that degree.  In any case, if the ratio of jobs to graduates is the concern (and I assume that jobs here include occupied positions, not just open positions), then agriculture (25,000 degrees in '08-'09 versus 1,234,000 "agricultural managers" in 2008) would seem to be a pretty appealing choice.  That's roughly one graduate for every 49 positions, which would be about replacement rate if you assumed 2% turnover per year.  For comparison purposes, if you ran a company with a fixed number of positions, and your employees stayed for life and retired after an average of 40 years on the job, that would be 2.5% turnover.  (By the way, in an article full of statistical "coincidences", I have to look at the first four digits of "1,234,000" and wonder if that's another one.)

I've ranted long enough, so let's just conclude this with two thoughts.  The first is that I am, shall we say, unpersuaded by the article.  The second, referring back to the title of this post, and tying into recent posts by Mike Trick and others, is that if I were trying to devise a new college major today, based on need, it would be titled something like "journalistic analytics", and it would focus not on parsing server logs at a site like the Daily Beast but rather on how to draw and present meaningful conclusions from the analysis of data.

Thursday, September 15, 2011

Comment Spam

In the interest of free and open discussion (and because I've been known to make mistakes, which I hope someone will correct), I leave this blog open to comments from anyone, with no registration requirement.  To date I've gotten very little comment spam.  (If you're not sure what "comment spam" is, it's some self-promoting poster child for rectal problems leaving a comment that has nothing to do with the actual blog entry and everything to do with drawing attention to a website they own.)  On the rare occasions when I do get comment spam, Blogger is fairly good about moving it to the spam file on its own.

That raises a point I should make for actual readers (and you both know who you are): if you write a comment and shortly thereafter it seems to have disappeared, don't worry.  Blogger has moved it to the spam file for some reason, but I still get an email ping that the comment was posted.  I always check comments to be sure they ended up in the right place, and if your comment was mistakenly classified as spam (this has happened at least once and at most twice in the history of the blog), I will restore it to its rightful place in the sunshine.

In the past couple of days, I've gotten the same comment spam message twice.  Curiously, Blogger correctly identified it as spam the first time but not the second time.  It's a link to "Team PotentiaMED" web site.  The information blurb on their site is long on meaningless buzz phrases and a bit short on specifics, but I think they are some sort of consulting operation.  I'll let you judge their merits for yourself, if you're curious.  Personally, I automatically assume that any business relying on spam to get customers probably lacks solid reasons to patronize them (the sort of reasons that would make for an effective conventional marketing campaign).  I also don't trust anyone who spams.

By way of contrast, the proprietors of Online Engineering Degree contacted me by email to ask permission to post a comment pointing to one of their pages, a list of Q&A sites.  Instead, I devoted a short post to providing the link, since (a) I thought it might be relevant to readers with an interest in industrial engineering and (b) it was not really relevant as a comment to any particular existing post.  A writer from Masters in Engineering wrote to me asking if I would like to mention a page listing forums and boards for engineers. The sites listed were potentially useful to engineers in general but did not seem very useful to IEs, so I declined.  I want to give both of them credit for doing things the right way.

Now if I can just find a way to report comment spammers to Blogger ...

Saturday, January 22, 2011

OR v. CYA

People who work in operations research tend to believe that governments (and everyone else, but especially governments) would benefit from making more and better use of it. At the heart of operations research is logical, dispassionate analysis of how a system works, and how it can work better, quantifying options and possible outcomes using hard data where possible.

One of the most challenging areas in operations research is risk analysis. The challenges are many, and frequently the most difficult aspects are not algorithmic but rather in assessing probabilities using scant or messy data (how likely is a nuclear power plant to release radiation? we happily lack a large sample of incidents) and in attaching values to outcomes. Particularly problematic is assigning a value to a human life. It is done all the time, by insurers, by juries and, consciously or not, by government agencies. Adding to the difficulty is that mathematical analysis may produce results we as people find uncomfortable.

An example I've heard more than once (for which I have no citation) is whether government (here the Federal Aviation Administration) should require that infants on airline flights be parked in some version of a car seat. I imagine most people, at least before hearing the arguments, would say yes. The picture of an infant turning into a projectile during turbulence or a hard landing is very discomfiting. Against that, the analyst weighs the facts that (a) requiring the infant to be in a conveyor most likely imposes on the parents the requirement to buy another ticket, (b) the cost of an extra ticket will, at the margin, impel some number of families to drive rather than to fly and (c) on a per-mile basis, commercial flight is safer than driving. So requiring a safety seat for infants on flights might, paradoxically, lead to more injuries or deaths to infants during long trips, rather than fewer. (I'm restraining myself from saying something about "throwing the baby out with the bathwater".) (Apparently, I was not successful.)

Enter your friendly federal, state or local government representatives. They are locked into a perpetual (re)election cycle, so making decisions that would at first blush seem insensitive or uncaring is bad for business. When it comes to national security, the worst thing they can do is appear to do nothing. The guiding principle seems to be that good theater trumps good analysis.

Thus, after the attacks on the World Trade Center and Pentagon in 2001, the federal government instituted a variety of security procedures at airports that many fliers view as cosmetic at best. Some of the perpetrators were in the U.S. on expired student visas, so the federal government made student visas harder to get (and, in the process, scared off a significant number of international students, costing U.S. universities a fair bit of money.) In the aftermath of an attempt to smuggle explosive devices into the U.S. on cargo flights, the Transportation Safety Administration has moved up its target date for screening of 100% of air cargo, a move that was already in the works. What is unclear is the extent to which any rigorous analysis of costs and benefits went into any of these decisions. At least some of the new policies likely have helped avert additional attacks. Some may have created new jobs. Some assuredly imposed new costs on businesses, and some make air travel (already less than a thrilling prospect for those of us in sardine class) even less comfortable.

Whenever another event triggers a panicky reaction (and I'm waiting to see what the Tucson shootings yield), I think back to what my English relatives lived through during the Blitz, and the "duck-and-cover" drills of my childhood. (I lived about midway between New York City and Brookhaven National Laboratory, so I figured no matter which way the wind blew I was going to be in the radiation's path.) Back then people seemed a bit more accepting of risk, and the fact that Bad Things Happen and sometimes they just cannot be prevented, and elected officials were less concerned about theatrics.

In there era of sound-bite politics and tweet-length policy discussions, though, I'm afraid that OR is trumped by the political credo CYA. Better to be seen doing something pointless than to be perceived as doing nothing.

(The preceding rant was motivated by the INFORM blog challenge for January: O.R. and Politics.)

Monday, September 6, 2010

Give Developers Crappy Machines

The subject line no doubt sounds like heresy in some quarters, but I have my reasons.  Software developers typically get pretty fast workstations with multicore processors, lots of memory, big displays (and/or multiple displays), etc.  It makes sense from a productivity standpoint. The problem is that in many cases it disconnects them from their user base.

Case in point: I recently downloaded the (free) academic version of CPLEX Optimization Studio 12.2 from IBM and installed it on my home PC.  My home PC is a one-lung eMachines box running Win XP (and hence a gaggle of defensive programs -- antivirus, firewall, etc.).  I do "serious work" on other, faster machines (running Linux), but this one is good enough for handling mundane chores, including some programming.  I have both the Eclipse and Netbeans IDEs on it (sorry Eclipse fans, but so far I haven't found any Eclipse tools for building GUIs that match Netbeans).

So I'm looking for the documentation for CPLEX 12.2.  In past versions, this would be some combination of HTML files, PDFs and (on Windows) CHM (Windows help) files.  In the latest version, though, they've taken a different route.  The Start menu has links to various help entries, but they all point to the same thing -- they launch the help component of OPL's IDE.  In other words, to look up anything, I have to launch a stripped/modified version of Eclipse, which can take between one and two minutes on my PC.  (After the first launch, subsequent launches go faster.)  Between the IDE and the instance of Java it runs on, it eats upwards of 130MB of RAM, which seems like a pretty big footprint for a help browser, particularly if I've got a programming IDE going (both Eclipse and Netbeans run on Java themselves), a web browser and maybe an e-mail client open, etc.  I have to wonder whether the developers would have gone with an IDE-only help system (no separate HTML or PDF docs, no CHM files) if they'd been forced to use it themselves on a system like mine.

There may be a lesson here for OR people, too.  I think sometimes we over-engineer solutions (I know I'm prone to this) because we're comfortable with specifying mutation rates for genetic algorithms or deciding whether to use dual simplex or barrier algorithms.  In our case, the key is not so much to "walk in the user's shoes" by living with the user's resources so much as to put ourselves in the user's head and see how much of what we're putting in front of them would generate a big "huh??".

Friday, August 27, 2010

The Sting of Rejection

In the latest issue of OR/MS Today, there's an interesting and provocative letter from Professor James Ignizio.  You may well know his name from the literature on multicriterion decision making.  Certainly his record (about 150 peer reviewed journal articles) speaks for itself, and (largely out of jealousy :-) ) I will not comment further on it.  Pride of authorship aside, if Prof. Ignizio has a paper he thinks makes a publishable contribution, I'm inclined to respect his judgment.

His letter describes a similarity between his first submission to an OR journal (Operations Research, to be price) and his most recent submission, 40 years later, both of which were rejected. The first rejection, of a paper that described the solution to an important real-world problem (if I can use "real-world" to describe space travel), specified insufficient advancement of OR theory (my emphasis added), while the most recent gives a similar "insufficient contribution" reason. (The rapid turnaround of the most recent paper guarantees that this was a "desk rejection" by the editor.)

I had a similar experience years ago, with a paper on quantity discounts co-authored with a colleague in operations management from another school. The problem was his, the methodology mine. The solution method mixed a bit of nonlinear programming, some Lagrangean relaxation and a dash of partial enumeration. The rejection criterion from the first journal to which we submitted was that the solution approach, while somewhat novel, used off-the-shelf methods and did not involve any brand new techniques. (The paper was subsequently accepted by a different OR journal of comparable stature.)

What my experience and Prof. Ignizio's have in common is that the rejection criterion seemed to focus on a lack of advancement of theory and/or lack of a brand new algorithm. I could understand this from Math of OR, but it seems to be an increasingly common attitude among top OR journals in general. There may be a lack of appreciation in some quarters for (a) whether a significant problem is being solved (and I'll stipulate freely that the problem in Prof. Ignizio's paper was more significant than the one in our paper) and (b) whether the solution approach, if not an algorithmic breakthrough in itself, might trigger a "hey, I can use that" response in a reader struggling with an entirely different problem.

In defense of journal editors, the pendulum can easily swing too far the other way. I've reviewed entirely too many "look, we can solve this with an (obvious) linear programming model" submissions (not to mention a student-written conference paper which posed a goal programming model with a single criterion). Clearly some contribution threshold has to be met to justify slaughtering more trees for journal pages.

All that said, though, the academic publication model in OR appears to be gravitating toward something along the following lines: theoretical and computational breakthroughs go into high level journals (where they are likely to be read by other people doing theoretical research and not so much by potential users); models and solution techniques for actual problems go to high level journals if there is something singularly clever (and not at all obvious) about either the model or the solution; and moderately clever models and solutions for realistic problems are relegated (if I dare use that word) to journals in application area (where the readers may appreciate the result but not understand the model or methodology very well) or to Interfaces (where the details will typically be omitted). That may short-change operations research practitioners (who will miss a potentially useful contribution if it is published in a content-area journal far from their own domains) and academics trying to be relevant despite the odds.  (As an example of the latter, I co-authored an application paper years ago in the Canadian Journal of Forestry.  I'm told by people who should know that it's a well-respected journal in the forestry domain, but I'm in a business school, so I got about the same amount of credit I would have gotten for hitting TV Guide. Fortunately, I was too obtuse to be deterred.)

I'm not sure what the right answer is.  I do think some journals are making a conscious effort to be more inclusive.  Whether they're succeeding remains to be determined. Meanwhile, practitioners complain about the lack of relevance of academic "theorists", and we academics wonder why.