Inkscape vs Adobe Illustrator for Vector Graphics

I’m about to break 100 figures (that’s photos, diagrams, and combinations thereof) for my book, which in current draft is 150 pages. Whenever possible I create vector images because they scale perfectly. The alternative is a raster (pixel-based) image, which is defined for some number of pixels and becomes pixelated when enlarged. Here’s an extreme example: I drew a simple circle, rasterized a copy of it, and then zoomed in on the top section:

The vectorized version stays smooth at any scale, because the rendering engine is essentially told, “The drawing is a black circle, this size with this line thickness.” (The SVG code is actually <circle cx="50" cy="50" r="40" stroke="black" stroke-width="1" />.) The rasterized version is a fixed rendering of that circle using a specified number of pixels, and that’s as detailed as the image can get.

Raster images are natural for things like photos that begin life as pixel arrays. But computer drawings that are built up using primitive shapes and strokes almost always benefit by preserving that construction. A bonus is that vector files tend to be much smaller than legible raster versions – even in the human-readable Scalable Vector Graphics (SVG) format.

I have created vector images directly in Word (more on this later), Excel, and Python (using matplotlib and seaborn). For just $5 I got a Ukrainian freelancer on Fiverr to vectorize a diagram from an old military publication.

Until recently I used Adobe Illustrator to do more serious vector graphics. But my latest copy of that software is from 2007 and doesn’t always work well in Windows 10. (Yes, I got it back when you could buy and keep using an application instead of having to subscribe.) If I did this stuff all the time I would probably subscribe to Adobe Creative Cloud. But I don’t, so I took a look around and found a popular open-source alternative to Illustrator: Inkscape. It took a day to get comfortable with it, and now it’s great for my purposes. For example, I liked this drawing from a 2004 dissertation by Jorma Jussila, and he was kind enough to send me the vector image, which gave me a tremendous head start creating this diagram:

How Microsoft Let Me Down This Week

In college (1998) I wrote a graphics-heavy term paper in Word. I had invested days of work, saving frequently (as always). At some point Word corrupted the document, but I didn’t realize that because I had kept it open on my computer and the in-process version didn’t give a hint that anything was wrong. Until I tried sending it to a printer, at which point it crashed and I discovered that none of the files contained much that could be salvaged. It took a frantic day to reproduce the paper.

Well, that summer I had a great internship at Microsoft, and – not one to hold a grudge – I have been drafting my current book in Word. (As of today the DOCX is 100MB!) But I have been frequently creating and checking PDFs along the way. In the course of these reviews I discovered that Word is unpredictable in creating and handling vector drawing objects. For example, adding a bevel to a circle causes Word to rasterize it, but you probably won’t notice unless you make a point of inspecting things at high zoom multiples.

Create a circle in Word and it’s a vector drawing (left). Add a bevel and Word silently rasterizes it (right).

I also discovered that Microsoft’s PDF printers and export engines rasterize everything, which is not only a loss of detail, but also a travesty given that vectors are a foundation of the Portable Document Format. Fortunately there are free PDF printers (I verified both doPDF or CutePDF) that preserve vectors.

Breakfast

Here is my new favorite breakfast: A chocolate protein smoothie with banana, peanut butter, almond milk, and cold-brew coffee concentrate.

For more than two decades previous my breakfast was half a box of Post’s Great Grains Raisins Dates Pecans. Every few weeks drug stores would put that cereal on sale and I would buy every box on the shelf. (Before COVID sale prices would be $2.50/box. 5+ years ago $2/box. $1.50/box before that, and 20 years ago the (Air Force) base commissary would often sell them for $1/box!) Keeping a stock of more than 60 boxes was not uncommon. Here’s a typical view of my pantry:

My custom is to steep cereal in milk for a few minutes until it gets a little soft. I used to use skim cow’s milk, but some years ago I developed a lactose sensitivity and switched to almond or oat milk.

There was an interlude about 20 years ago after I bought a batch of this cereal that was infested with moths. That took away my appetite for it for a few years, during which I switched primarily to General Mills’ Basic 4 cereal.

In college and earlier my appetite was enormous: In dining halls I would fill my tray with 4-6 bowls of cereal (granted, dining hall bowls aren’t very big), leading people to jokingly suggest that I switch to Total cereal. Total is just boring cereal that General Mills mixes with extra multivitamins. For many years they ran commercials like this showing how many bowls of competing cereals it would take to accumulate those extra vitamins:

Police Perjury (“Testilying”)

Police give misleading or false testimony under oath with such regularity that police testimony in court is often referred to as “testilying.” I previously mentioned this happening in my own case. I have direct experience with another egregious case.

After police served search warrants on my residential property following the murder of a neighbor, my father-in-law who is a business attorney suggested I retain a criminal defense lawyer, largely to act as a bulwark against police abuse. A year later that lawyer was going to trial on a DUI case that depended on a police officer’s testimony that he saw a man driving a car, when in fact it was his wife driving the car and he was at home. The lawyer asked if, given my bona fides in mathematics, I could serve as an expert witness to rebut the cop’s story. I said, “Well send me what you have and I’ll take a look.” Sure enough, I concluded that the cop’s claims were absurd: He said that he was stopped in a parking lot observing an intersection, when a car sped through a stop sign. (The driver was the woman, who was speeding home in a panic because she thought she was having a miscarriage and wanted her husband to drive her to the hospital. The husband was drunk but at home with some friends.) The cop claimed that he was able to catch up to the car close enough to see its occupants before the car had pulled into its driveway a mile and a half down the winding road. Based on the time, distance, acceleration capabilities, and alleged speeds of each vehicle this just did not add up. The reality is that by the time he caught up to the car the wife had stepped out and he could only see the husband and wife next to the open driver-side door of the car.

I prepared my analysis for court, and went to the trial. On the first day, the cop took the stand and lied blatantly. At the end of the day the defense announced its witnesses, which included the husband’s friends who were ready to testify that he was at home. The judge then declared a mistrial because those would be “alibi” witnesses and the prosecutor hadn’t been given enough notice to prepare to attack their credibility. Months later, before the retrial, another lawyer picked up the case and subpoenaed cell phone tower records that showed the husband’s phone at home during the time the wife was driving, and that finally got the prosecutor to drop the charges.

Why did the cop lie in this case? Why didn’t the state investigate or prosecute the cop for lying? The cost to this family was enormous: They were blue-collar workers barely scraping by, and they had incurred more than $5,000 in legal fees. They had to wait over a year for the first trial, during which one of the conditions of the husband’s bail was electronic monitoring (via ankle bracelet), which meant he could only be at a home or at a work location, and he had to pay $15/day for the privilege of being able to work instead of sitting in county jail.

(The bail system in this country also warrants improvement. For example: Why should people who have been charged but not convicted of a crime have to pay the state to remain able to work, when the alternative is to sit in jail unproductively at the state’s expense? Particularly when it is the state’s inefficient administration of its “justice” system that determines how long they will wait for a trial that can exonerate them.)

Criminal Injustice: Jail and Bail

As soon as you are charged with crime, the state can imprison you. And you have to pay for the privilege of remaining free during the months or years it takes to get a trial to establish whether you are in fact guilty of the state’s allegations.

This happened to me in Pennsylvania, and fortunately I was able to post cash bail, which my veteran lawyer promised would be returned in full after the charges were disposed. When the county returned it they deducted 1% in “poundage.” Strangely, my lawyer had never heard of this, and filed a challenge with the court. After a preliminary hearing on the matter, in which the county solicitor failed to present a legal basis for charging a fee on bail, the court asked for briefs and scheduled a formal hearing. To my dismay, before the hearing my lawyer called to tell me that he found a law from the 1980s authorizing the charge. He noted that the county, in its brief, had failed to find it, but as a lawyer he was professionally obligated to notify the court. Even though it would leave me out the $1,500.

Why Chester County Cops Dislike Me

When I lived in Berwyn, Pennsylvania, a neighbor was murdered in her home. I had installed a video surveillance system around my house when I first bought it 6 years prior. (My house was isolated from the street and backed up to a county trail that I thought could be a source of trouble, but to that point nothing bad had happened.) When detectives came knocking I suggested that my video might have picked something up that would help them with the crime. But when we went to the corner of the basement where I had the recorder, we discovered that it had no power because it was plugged into a GFCI outlet that had tripped. The last recordings showed a thunderstorm a few weeks prior.

This misfortune really piqued the police. They came back with search warrants, not only for my surveillance system, but also for all of my computers! (Evidently, at least in Chester County, Pennsylvania, judges will sign any warrant put in front of them.) They took all my electronics to their “computer forensics lab” and told me I would get them back when they got around to imaging them. They didn’t care that my job and income depended on my computers. They seemed determined to punish me for … I guess buying a house next door to someone who would later be murdered, and failing to monitor my private video recorder?

It takes a few hours to make a forensic copy of a hard drive, but the police didn’t return my computers for over a week. Months went by and they didn’t return my surveillance recorder (which stores everything on a standard hard drive that is easily cloned). I repeatedly asked the detectives and the assistant district attorney (ADA) who had joined the murder investigation (still unsolved) to return it, and they did not. I suggested that if they wouldn’t clone it they could just keep the hard drive and return the recorder to me, since I could install a new drive to get it back in operation. They continued to ignore me. So more than a year later I petitioned the court that had warranted its seizure to order them to return it to me. The ADA really didn’t like that!

I mention all of this because it provides another explanation for why some Chester County law enforcement officers subsequently took a special interest in harassing me. To be continued…

Bullies and Mismatched Senders

As described in Malcom Gladwell’s book Taking to Strangers, a strong body of research has revealed that many people have mannerisms that are incorrectly interpreted by others. The academic literature refers to such people as “mismatched senders,” because their non-verbal communication does not match what they intend to communicate. Or rather, to place the blame where it belongs: Many people erroneously think that they can deduce things from non-verbal communication, and mismatched senders are the victims of that error.

I am a mismatched sender. I have often been told this by people who become acquainted with me. Apparently my bearing superficially suggests an arrogance that really isn’t there. I am prone to smile or laugh when I am nervous or confused. Et cetera. Unless you have read Gladwell’s book, you might be surprised at the problems this can create.

I have also been a target of bullies my whole life. Physical bullying mostly stopped when I became dangerous: At age 12 I gave two bullies black eyes and that was the end of that. There was no payoff to psychological bullying because I didn’t have many friends and didn’t seem to care.

But I’m still an attractive target to people who are looking for somebody to take down a notch. Where do bullies go when they grow up? I believe a disproportionate number go into law enforcement, where they are equipped and paid to bully, and where their victims are at a systemic disadvantage to defend themselves. Police abuse has finally gotten enough attention that this should not be a controversial hypothesis. And this hypothesis might explain some of the abuse I have personally suffered at the hands of law enforcement. (More on that to come in future posts….)

Criminal Injustice: Missing Evidence

Previously I described how being battered by “Alice,” my mentally ill girlfriend, resulted in police arresting me. In this post I will briefly highlight some of the subsequent violations of rights and law committed by the police and prosecutors in that case.

When police entered my house, they ordered me to come out of my office where I had retreated to avoid further battery at the hands of Alice. I complied and was met with two police officers pointing their Glocks at me with their fingers on the triggers. Pointing a firearm at a person constitutes felony assault if not justified. (See the prosecution of the McCloskeys for a recent and famous example.) Were the police justified in assaulting me? The system will never consider that question for several reasons. First: Police officers virtually never stop or hold to account their “brothers in blue” for committing crimes. Second: Even when criminal acts of police are reported, prosecutors virtually never pursue them. Third: This particular assault was not recorded, and here it gets suspicious: Both officers were wearing body cameras. One of them was oriented in such a way that we could see his finger on the trigger, but could not clearly see where his gun was pointed. I believe that the other officer’s body camera did record him pointing his gun at me. However, when we subpoenaed the footage the police claimed that his body camera had failed to record anything until a minute after I was in handcuffs, so that’s all we got.

That’s not the first piece of peculiarly missing recordings. I was taken to the detention area of the local police station. Cameras and signs there prominently declare that everything is recorded at all times. It was there that police read me the Miranda warning, and in response I clearly told the two officers in attendance that I did not want to answer questions while under arrest. One of the officers was wearing a body camera. A few hours later the police questioned me at length. I assumed that, because I had objected to custodial interrogation, my statements could not be used against me if I was charged with any crime. Well, it turns out that all recordings of the detention area from that day were “accidentally” not saved, and the officer who heard me invoke my rights had his body camera audio muted during that period (as is, he claimed, department policy), though after he left the area he was recorded telling another cop who asked about me, “He’s not talking.” I was in fact charged and tried for crimes in this incident, and when I objected to the use of my subsequent interrogation based on having invoked my right, the judge said, “Well, we don’t have a record of you invoking your rights, but what I will do is admonish the police to be more careful in preserving these recordings in the future.”

The prosecutor in the trial also tried to exclude a terrifying audio recording of Alice threatening to kill me and herself. That recording would fall under the category of “potentially exculpatory evidence,” which prosecutors are duty-bound to produce to the defense. (They did not produce it, but I happened to have separately saved the recording, which is how this came to light.) Withholding exculpatory evidence (“Brady material“) is a flagrant violation of the prosecutor’s oath of office, and also a violation of a lawyer’s professional obligations. This was brought to the judge’s attention. Did the judge impose sanctions on the prosecutor for attempting to corrupt due process in his court? No. Was the prosecutor investigated by the bar? No. My lawyer explained to me, “That’s business as usual here.”

There was audio recording of the night in question that Alice had created by (bizarrely) activating and hiding a digital dictaphone in the living room. That device was seized by the police during a warranted search. However, the detective who had analyzed it was retired and unavailable for the trial. Written police reports are not admissible at trial unless authenticated by an officer. My lawyer attempted to get the detective who replaced the retiree to confirm, under oath, what the report said. The detective evaded doing so. My lawyer told me, “I know all of these cops. Some of them are good guys. He is not one of them.”

Lady Justice struggling with all the missing evidence

Borderline Personality Survivor

I survived a relationship with a woman – who I’ll just refer to using the generic name Alice – with borderline personality disorder (BPD). I had never heard of this, and I had no idea how dangerous BPD can be to a romantic partner. Here’s an excellent article about borderline personality. Or watch forensic psychologist Shannon Curry testify about BPD in the Depp v Heard civil trial: When I saw that I thought, “OMG, she could be talking about Alice.”

Before I met Alice, I had a general notion that women can be emotional and irrational and that was just part of life. (Note: BPD is primarily diagnosed in women.) So when Alice began to exhibit those behaviors I figured, “Yeah, she’s a little extreme, but you have to take the bad with the good.” A particularly dangerous part of BPD is the fear of abandonment: Once triggered, that fear would send Alice into a desperate rage. When Alice became violent I would try to retreat to defuse the situation. But in BPD, a partner retreating triggers the fear of abandonment, and in those episodes Alice would do anything possible to prevent me from escaping her presence. I bear scars from her grabbing and clawing at me. She would hide my keys to prevent me from driving away. More than once, she literally tore my shirt off as I tried to flee on foot. After I escaped, she would text and voicemail me the most horrific threats she could conjure.

And then, some hours later, she would recover and would be effusively apologetic. After too many of these incidents I told Alice that if it happened again that would be the end of the relationship. She contritely accepted that ultimatum. Her behavior had become so threatening that I also said that I needed some failsafe to protect her and myself in case it did happen again. To that she said, “Look, it’s the fear of you leaving in that moment that really makes me see red. You’re a big guy, so just restrain me until I get over it. If you don’t leave I’ll calm down quickly.”

She went several months without an incident. And then, one night, she flipped out again. So I tried to restrain her. I had 50 pounds and 8 inches of height on her. How hard could it be? It turns out that even a relatively small woman in a rage takes an enormous effort to physically contain. I didn’t want to hurt her, so I held her wrists so that she couldn’t claw me. Then I sat on her hips so she couldn’t kick me. Then I held her from behind so she couldn’t bite me. (I was almost certain that one bite to the back of my neck had broken my skin and I would have to go to a hospital for intravenous antibiotics.) After at least half an hour of this she was still enraged and fighting, and I began to doubt my strength to continue protecting myself (and her, since her tirade of threats included all manner of self-harm). Then I remembered that I had recently bought handcuffs to use in photos that I do of firearms (like these). With considerable effort, I maneuvered us to the room where those were stored and eventually got her hands loosely cuffed behind her back. That did not dissuade her at all. She came back at me, so I ran to the bedroom, got her on the bed, and straddled her thighs while keeping her head far enough away that she couldn’t bite me. I begged her to stop, cajoled her to snap out of it, tried to reason with her; but her verbal and physical assault continued for hours. I finally accepted that her suggestion that she would calm down if I didn’t leave was not going to work. So I gave up on that idea: I got her on her stomach, removed the handcuffs, and ran to my office. She was hot on my heels and I barely got the door closed. Then she began ramming the door. I braced my back against the door with my feet pushing against a heavy desk. She actually managed to pound the door latch through the strike plate, and I began to worry that I couldn’t keep her out since it was then just the weight of me and this desk on a slick wooden floor opposing her attack on the door. And then … she got another idea: Alice called the police.

Police showed up to find a woman freely roaming my house and saying that I had locked myself in my office, where I had a bunch of guns. They called out to me and I thought, “Well at least now she’s their problem.” Ha! Never underestimate the ability of police to make a bad situation worse. They ordered me to come out with my hands raised. I emerged as instructed to find two cops pointing their Glocks at me with their fingers on the triggers. I complied with their commands and was promptly and tightly handcuffed and sat on a chair. I described what had happened. I was bleeding from bites and scratches to my face, neck, and arms. Alice had no visible injuries. So did police conclude that I should be taken to a hospital and Alice should be referred to mental health professionals? No. The police decided that I should be arrested and jailed while Alice should be taken to file for a restraining order against me.

This was the beginning of an outrageous experience with the criminal justice system, which I might make into a series. Suffice it to note for now: BPD can be extremely dangerous to a partner. And a woman, no matter how small, can inflict serious physical injuries on a man – particularly when he is unwilling to injure her in his defense.

Yale Course Critique (A Brief History)

Spring cleaning my paper files I found copies of the Yale Course Critique from when I was an undergraduate in the 1990s. I wrote for that publication, served as a department coordinator, and was a senior editor 1998-1999.

The Yale Course Critique was a student production, affiliated with the Yale Herald. At the end of each semester, volunteers collected paper surveys and, for those courses with sufficient responses, aggregated ratings and summarized feedback in a 3-4 paragraph blurb. We printed a few thousand copies (sponsored by ads) and distribute them in dining halls at the beginning of each semester when students were trying to figure out which of the ~1,000 available Yale University courses to enroll in.

When I first encountered the Yale Course Critique I knew this was my kind of project: Collecting and disseminating data to help improve peoples’ ability to make important choices? And the university didn’t support this? Sign me up!

But why, I wondered out loud, wasn’t the University itself doing this? Most professors and departments distributed survey forms to students at the end of the semester. Only some agreed to share those with the Yale Course Critique. For those that didn’t, we had to solicit student feedback separately – in dining halls, and even posting volunteers outside the larger lectures to distribute and collect our survey forms from students.

I became a crusader for the cause. First as a “department coordinator” I tried (with some success) to convince individual professors and department heads to voluntarily share their surveys with us. As a senior editor I aggressively lobbied leaders in the Yale College Faculty to make sharing survey data a university policy. We did not succeed in that before I graduated in 1999, but I just spent some time researching this and found that by April 2002 the (student) Yale College Council passed a resolution requesting the university to “create a comprehensive online course critique,” and by November 2002 the Yale College Faculty unanimously agreed.

There has been some subsequent intrigue: By 2014 Yale College, now in full control of the data, tried to limit its use. They threatened students who summarized it on a separate website. In response to that another enterprising student, Sean Haufler, wrote a browser app that produced the summaries directly in client browsers.

I couldn’t find much history of the Course Critique. There is mention of one in 1969. Another shows up in 1985 with a note that none had been published since 1982. The “Yale College Course Critique” I joined appears to have been revived in 1993: The hardcopies in my archive show Volume 3(#2) dated September 1996, through Volume 6(#1) dated January 1999. Not much was captured online. Here are are few pages from fall issues in 1996, 1997, and 1998:

Violin Accessories

When I resumed seriously playing I had some very old accessories. In the picture below on the right is the old rag I used to wipe up rosin dust, and an old block of rosin, both dating back roughly 30 years.

David Bookstaber's new violin accessories

In addition to new strings I got new rosin, a new dust cloth, and in that little black cylinder next to the violin are concert ear plugs I began to wear in my left ear while practicing to prevent further hearing damage.

I spent some time researching strings to find something that would dampen the excessively bright timbre of this violin. Some suggested getting synthetic core strings, and I now play on Pirastro Violino strings, although the improvement over other strings I tried is subtle at best.