On meat and ethics

As a vegetarian, I am often interested in arguments both for and against eating meat. A recent link I read started a chain of fascinating resources arguing in either direction. Spoiler: my opinion hasn’t changed, yay.

It started with this post in 3quarksdaily in defense of eating meat that got me annoyed. It is fairly obvious that animals feel pain, and are intelligent to varying degrees. Saying that the pain of an animal is of a different degree that we cannot fully comprehend is a pretty weak argument. Another gaping hole is in arguing that the non-existence of a cow is somehow worse than the horror it goes through in a farm or slaughterhouse.

I also ended up reading the utilitarian Peter Singer’s ‘All Animals Are Equal‘ paper, and loved it for its clarity. The entire piece is well worth a read for the problems it anticipates, and the thought experiments it proposes.

The truth is that the appeal to the intrinsic dignity of human beings appears to solve the egalitarian’s problems only as long as it goes unchallenged. Once we ask why it should be that all humans—including infants, mental defectives, psychopaths, Hitler, Stalin, and the rest—have some kind of dignity or worth that no elephant, pig, or chimpanzee can ever achieve, we see that this question is as difficult to answer as our original request for some relevant fact that justifies the inequality of humans and other animals.

In another few decades, I won’t be surprised if animal rights acquire the same level of seriousness in public discourse as race, caste and gender equality have in the past few generations.

P.S. This also lead me on an unrelated but interesting overview of Singer’s utilitarian ideas.

Python 3 Unicode annoyances

Every once in a while I feel guilty for not using Python 3, so I spin it up for a few rounds. My experience is usually:

  1. Start using Python 3
  2. oops, UnicodeDecodeError
  3. Go back to Python 2

Looks like I’m not the only one who has this frustration. Knowing when to use encode vs decode was always a frustrating exercise in trial and error. There are some good tips in the linked thread and is worth a thorough read. A useful bit is this comment from redditor Fylwind, part of which is:

  • encode: textual data to binary data.
  • decode: binary data to textual data.

The term “encode” means to a transformation from some high-level structure into bytes, hence in the context of strings it means converting text into binary data.

Q. What are the appropriate data types for textual data and binary data?

  • In Python 3:
    • Textual data is str, written as "foo".
    • Binary data is bytes, written as b"foo".
    • The encode function only works on textual data, and the decode function only works on binary data.
  • In Python 2:
    • Textual data is unicode, written as u"foo". If unicode_literals is enabled, then it’s "foo".
    • Binary data is str (alias: bytes), written as "foo". If unicode_literals is enabled, then it’s b"foo"

No-Cost RHEL Developer Subscription now available

 My past two distros at work and home have been RHEL derivatives so I’m happy to see this news:

Today, Red Hat announced the availability of a no-cost Red Hat Enterprise Linux developer subscription, available as part of the Red Hat Developer Program.
Offered as a self-supported, development-only subscription, the Red Hat
Enterprise Linux Developer Suite provides you with a more stable
development platform for building enterprise applications – across
cloud, physical, virtual, and container-centric infrastructures. 

 No-Cost RHEL Developer Subscription now available – Red Hat Developer Blog