Pages

Thursday, September 5, 2019

Darktable for Sony A6400

The latest APSC camera from Sony, the A6400 (ILCE-6400) has a new raw file format which is not supported by Darktable versions currently* in the Ubuntu repos or in the stable PPAs.

The only way to get darktable to open the RAW files from the A6400is to build the latest (unstable) darktable from source. Steps to do this on a vanilla install of Ubuntu are given in a text file below, also available through a Github Gist.

* as of this writing, Sep 5. 2019




Tuesday, May 2, 2017

Notes on Communication and Knowledge

For centuries we have attempted communication "downward." This, however,
cannot work, no matter how hard and how intelligently we try. It cannot
work, first, because it focuses on what we want to say. It assumes, in
other words, that the emitter communicates.

...unless the recipient "hears," communication has not taken place.
Information and communication are different. Communication has not taken
place unless the emitter is sure that the receiver understands what action
is to be taken as a result of, say, a conversation or a memo.

- Peter Drucker

Sadly, there is a villain in our story. The villain is a natural
psychological tendency that consistently confounds our ability to create
ideas using these principles. It's called the Curse of Knowledge. (We will
capitalize the phrase throughout the book to give it the drama we think it
deserves.)

Tappers and Listeners

In 1990, Elizabeth Newton earned a Ph.D. in psychology at Stanford by
studying a simple game in which she assigned people to one of two roles:
"tappers" or "listeners." Tappers received a list of twenty-five
well-known songs, such as "Happy Birthday to You" and "The Star-Spangled
Banner." Each tapper was asked to pick a song and tap out the rhythm to a
listener (by knocking on a table). The listener's job was to guess the
song, based on the rhythm being tapped. (By the way, this experiment is
fun to try at home if there's a good "listener" candidate nearby.)

The listener's job in this game is quite difficult. Over the course of
Newton's experiment, 120 songs were tapped out. Listeners guessed only 2.5
percent of the songs: 3 out of 120.

But here's what made the result worthy of a dissertation in psychology.
Before the listeners guessed the name of the song, Newton asked the
tappers to predict the odds that the listeners would guess correctly. They
predicted that the odds were 50 percent.

The tappers got their message across 1 time in 40, but they thought they
were getting their message across 1 time in 2. Why?

When a tapper taps, she is hearing the song in her head. Go ahead and try
it for yourself - tap out "The Star-Spangled Banner." It's impossible to
avoid hearing the tune in your head. Meanwhile, the listeners can't hear
that tune - all they can hear is a bunch of disconnected taps, like a kind
of bizarre Morse Code.

In the experiment, tappers are flabbergasted at how hard the listeners
seem to be working to pick up the tune. Isn't the song obvious? The
tappers' expressions, when a listener guesses "Happy Birthday to You" for
"The Star-Spangled Banner," are priceless: How could you be so stupid?

It's hard to be a tapper. The problem is that tappers have been given
knowledge (the song title) that makes it impossible for them to imagine
what it's like to lack that knowledge. When they're tapping, they can't
imagine what it's like for the listeners to hear isolated taps rather than
a song. This is the Curse of Knowledge. Once we know something, we find it
hard to imagine what it was like not to know it. Our knowledge has
"cursed" us. And it becomes difficult for us to share our knowledge with
others, because we can't readily re-create our listeners' state of mind.

The tapper/listener experiment is reenacted every day across the world.
The tappers and listeners are CEOs and frontline employees, teachers and
students, politicians and voters, marketers and customers, writers and
readers. All of these groups rely on ongoing communication, but, like the
tappers and listeners, they suffer from enormous information imbalances.
When a CEO discusses "unlocking shareholder value," there is a tune
playing in her head that the employees can't hear.

It's a hard problem to avoid - a CEO might have thirty years of daily
immersion in the logic and conventions of business. Reversing the process
is as impossible as un-ringing a bell. You can't unlearn what you already
know. There are, in fact, only two ways to beat the Curse of Knowledge
reliably. The first is not to learn anything. The second is to take your
ideas and transform them.

This book will teach you how to transform your ideas to beat the Curse of
Knowledge. The six principles presented earlier are your best weapons.
They can be used as a kind of checklist. Let's take the CEO who announces
to her staff that they must strive to "maximize shareholder value."

Is this idea simple? Yes, in the sense that it's short, but it lacks the
useful simplicity of a proverb. Is it unexpected? No. Concrete? Not at
all. Credible? Only in the sense that it's coming from the mouth of the
CEO. Emotional? Urn, no. A story? No.

Contrast the "maximize shareholder value" idea with John F. Kennedy's
famous 1961 call to "put a man on the moon and return him safely by the
end of the decade." Simple? Yes. Unexpected? Yes. Concrete? Amazingly so.
Credible? The goal seemed like science fiction, but the source was
credible. Emotional? Yes. Story? In miniature.

Had John F. Kennedy been a CEO, he would have said, "Our mission is to
become the international leader in the space industry through maximum
team-centered innovation and strategically targeted aerospace
initiatives." Fortunately, JFK was more intuitive than a modern-day CEO;
he knew that opaque, abstract missions don't captivate and inspire people.
The moon mission was a classic case of a communicator's dodging the Curse
of Knowledge. It was a brilliant and beautiful idea - a single idea that
motivated the actions of millions of people for a decade.

- Chip & Dan Heath, Made to Stick

Working with Windows

Over the last few months I have been "forced" (?) to work on(?) with (?) (perhaps despite?) windows. Overall Windows 10 isn't the clunky nightmare that Vista was, and is way better than Windows 7 too. Heck it even has workspaces finally!

Here are a few hacks I had to use to work out some common issues.

1. Machine does not respond to ping
Firewall rule is too strict. To change, go to:
Control Panel> Firewall
Advanced Setting
Inbound Rules:
Enable File and Printer Sharing Rules
2. Remote file access is not possible:
You need to be admin or otherwise have access to C:\ of the machine; then use smb://192.168.X.Y/C$ to access from Nautilus on another machine.

More hacks later. 

Friday, February 5, 2016

HPLIP Binary Plugin Installation

Recently ran into this exact bug with my junk laserjet printer P1108.


From: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=605589#40 

Package: hplip
Version: 3.13.4-1
Followup-For: Bug #605589

since the update to 3.13.4 I cannot seem to print with my P1005.
When sending a job to the printer, a window pops up asking to install the
plugin. When following the dialogs, they end saying that the plugin is
installed, followed by another window saying it failes.
Manually launching hp-plugin completes the plugin installation successfully,
the printer comes alive, but sending a print job goes back to requesting the
plugin.

The solution is here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=605589#50

Briefly:
Create the directory /var/lib/hp
Update hplip-gui
Install/update cups-pk-helper if required
Unplug, then re-plug in printer
HPLip will ask to download and install the plugin, which is a run file.

If you are behind a firewall or your internet connection is dodgy, this automatic download will fail, and you will need to manually download and install the plugin.

In a terminal run hp-plugin
Watch the terminal for URL of the plugin file.

Download *.run file from hplip website.

Tex Studio Keyboard Shortcuts

TexStudio had an annoying habit of jumping to the the previous brace when I wanted to go one word (CTRL + left / right). This is because this key combination is assigned by default to "Next (or prev) word / placeholder".

Fix:
Assign nothing to "Next word / placeholder".
Assign CTRL+Right to "Move cursor right (1 word)"
Assign a different combination, e.g. Meta+Shift+Right to "Next placeholder".
Repeat for left.

PS
Meta = Usu key with the windows logo.
On GNOME the "windows" / meta key is used in lots of shortcuts, so assign carefully.

Wednesday, December 9, 2015

Colored output from Bash

Problem:
I've got colored output from bash (mostly git diffs) which I need to save *with* the coloring intact.

Solution:
- Pipe the output (*with coloring enabled - use --color switch or equivalent*) to a file.
- Get ansifilter
Download source , compile and install.
- Convert input to latex, compile the tex, save the PDF

Friday, August 21, 2015

Inkscape Latex render improvement

This little fix by KaKiLa allows passing of packahe options to the latex renderer (TexText) in inkscape.
To use, back up and then patch your source file eqtexsvg.py (usu. located in /usr/share/inkscape/extensions). Backup and delete the compiled bytecode (eqtexsvg.pyc), then restart Inkscape!

Tip: Remember that python is "indentation space" sensitive. So when you patch the script pay attention to the leading whitespaces.