The Endless Debates: E-mail Signature

The Endless Debate covers topics that seems to come up again and again, which seems to have no winner in the end. The classic example of it is the number of spaces after the period. (This particular topic is not covered by me yet, but I will certainly get to it at some point, stay tuned!) The purpose of this series is to not attach people with the opposite view, rather, it’s an exploration of ideas, with the main focus on history, technology, and practicality.

In this article, I will be covering E-mail signature placement, which also covers reply styles.

What’s an E-mail Signature?

If you are sending E-mail daily basis, you know what is it. As many articles1 claims E-mail usages among young people are feeling, let me explain what it is.

Hi,
My E-mail is my password.
Verify me.

-- 
Werner Brandes
Playtronics Corporation

Bottom of E-mail, with the name and the company name is an E-mail signature block.

A Typical E-mail Structure
A Typical E-mail Structure

What’s the argument?

With a single message (or the first message in the thread), there’s not much room for arguments; you begin by starting your message, and then you sign the message at the bottom. This starts to get a bit complicated when someone replies. I will illustrate two cases:

The first one:

Werner Brandes writes:
> Hi,
> My E-mail is my password.
> Verify me.
> 
> -- 
> Werner Brandes
> Playtronics Corporation

Who are you?

-- 
Cosmo
Playtronics Corporation

and the second one…

Who are you?

-- 
Cosmo
Playtronics Corporation

Werner Brandes writes:
> Hi,
> My E-mail is my password.
> Verify me.
> 
> -- 
> Werner Brandes
> Playtronics Corporation

You see two different approaches? The first example is called interleaved-posting and the second one is called top-posting.

What’s the specification say?

Currently, there aren’t any specification stipulate the way E-mail signature need to be placed. It is, however, the convention is to use “-- ” (two dashes, plus space) followed by a new line to separate E-mail signature from the body.

Many E-mail systems assume that this convention is used, for example Mozilla Thunderbird would dim the portion after the separator, visually separating the section of a message from the body. Gmail also treats it differently, too.

Implementations

Gmail

Gmail has a checkbox that says “Insert this signature before quoted text in replies and remove the “-- ” line that precedes it.” Apparently, it removes “-- ” so to prevent many E-mail software to mistreat quoted text as signature blocks.

Mozilla Thunderbird

Mozilla Thunderbird defaults to interleaved-posting style. Can be configured to top post. Like Gmail, I believe it also removes “-- ” when it is set to do top posting.

Microsoft Outlook

I do not actually know how this works with Microsoft Outlook. Mainly because I don’t even have a license for it. I’m assuming it’s using top posting.

Semantic differences

If the purpose of the signature is denote your ownership of the message, there are several ways you can view it. Perhaps, mainly this comes from the way one perceives quoted text.

Quoted text as transcript

This approach takes quoted text as a transcript of the message – therefore the message is signed at the end of the reply. Quoted text is thought to be a transcript, so the sender is not signing it, because it’s not his/her text.

Quoted text as treated text

This is the consideration that quoted text no longer holds parity to the originally replied message, even when they are identical. This is fair view that once it is quoted by someone else, the message was physically outside of original sender’s control.

Rational is that quoted text may or may not be modified, thus signature is very bottom of the message.

Conclusion

It’s actually really pointless arguments, for sure. Consider this, with E-mail system, we already face enough of a difference.

Many E-mail software (Mozilla Thunderbird, Gmail, and countless others) uses Usenet quoting for replying. Which basically means, something like this:

Werner Brandes writes:
> Hi,
> My E-mail is my password.
> Verify me.
> 
> -- 
> Werner Brandes
> Playtronics Corporation

While some use forward quoting (Microsoft Outlook and some others):

----Original Message-----
From: Werner Brendas
Sent: Wednesday, November 26, 2014 8:20 AM
To: Cosmo
Subject: My password

Hi,
My E-mail is my password.
Verify me.
 
-- 
Werner Brandes
Playtronics Corporation

And mixing those two:

-----Original Message-----
From: C
Sent: Wednesday, November 26, 2014 1:32 AM
To: A
Subject: Foobar

Foo bar bar bar
A writes:
> Foo bar
> 
> B writes:
>> Foo bar bar
>>
>> -----Original Message-----
>> From: C
>> Sent: Wednesday, November 25, 2014, 9:00PM
>> To: B
>>
>> Foo bar
>>
>> A writes:
>>>
>>> Foo bar

You see? We are already forced to live much greater difference when it comes to E-mail. Placement of signature, or even reply style is least of our worries.

I Transitioned Local E-mail Management to Gnus

I have been mostly using E-mail on Gmail interface, as I use Gmail and Google Apps (or, I guess they changed their enterprise offering to Google Apps for Work…) I have been using Mozilla Thunderbird once in a while. In normal circumstance, it would have been OK, but here are some issue of bit slow for the load.

Basically my requirements were:

  1. I literally receive a few hundred of E-mail a day and it needs to be able to handle that. Not that I have to read over every single E-mail with details, but there are a handful of mailing list articles I’d like to triage.
  2. Being able to author and send text E-mail (more on it later)
  3. I use Mac and Linux, and cross platform is a must. (This is one of reasons, in addition to bitter experience in the past that I would never use Microsoft Outlook — in case someone would suggest this — and it’s not great at handling #1 point above.)
  4. Support OpenPGP
  5. It must be able to support multiple account (Home and Work)

So this left me with few choices. Pretty much even 3rd point would disqualify a lot of choices to begin with. Then I just thought, Emacs already has built-in mailer, and considering every platform I ever have to interact would have it already installed, mainly because I use it daily.

So this is how I landed on Gnus.

In the case of myself, the following was an advantage I have found of this set up:

  • It pretty much fulfills my requirements.
  • As far as authoring text E-mail, it’s one of the most powerful softwares you can find out there. After all, it’s a text editor.
  • Gives me full control, won’t try to hide things from me.
  • It’s relatively easy for me to service it myself to modify or extend its parameter and functionality, knowing some Emacs Lisp.
  • Works with Org-mode. (See here.)

Things I purposely didn’t consider are:

  • Search facility — I felt it’s better to leave it up to Gmail interface, considering how fast it can search. Beside some automatic tagging, pretty much my E-mail is managed chronologically, and searching for E-mail more than I can glance over would require some serious deep searching. I have determined that after E-mail gets old enough to past certain point, it would be too old to be useful, and never get touched. Although, I still keep a copy of it, they are pretty much dormant, so I tend to leave the structure flat.
  • Notification — The age of smartphone (and I even have smartwatch) made it quite unnecessary for me to receive notification from my mailer. Although I can have Gnus pull E-mail and notify of new E-mail arrival, I purposely didn’t configure it.
  • Richtext authoring — I do not need fancy HTML/Rich text authoring. If you know me, I don’t purposely send out E-mail with mark ups. I’d rather stick with plain text and occasional use of simplified markdown. (Only time you’d see any formatted E-mail is coming from me is when I send the message out from my phone — because Gmail for Android sends the message out that way. I don’t know the reasoning behind the use of formatted E-mail as opposed to plain text considering you can’t really take advantage of rich formatting on that app.) Occasionally some ill-behaving (and possibly misconfigured) mailer sends me E-mail without alternative MIME part for text. In this case, I’d just read that portion of E-mail on the browser. (K-H command works very well to make this happen.) By the way, if you send mail this way, your E-mail will be ignored and/or will be sent to the very end of my queue.

So if you care about those points, my experience wouldn’t be too useful to begin with, so you can stop reading here.

Considering I have multiple Gmail/Google Apps account, I had to have something that manages multiple SMTP address.
I used using ‘gnus’ to read mail article from the emacs 30 Day Challenge useful to configure this. What I did not do was fully automated the process of choosing SMTP server, as there are fairly complex set of E-mail aliasing I have to take care, so I left some manual control to configuring this information by myself when sending E-mail, specifically by configuring X-Message-SMTP-Method and From fields. The code from the site is still incorporated, to validate that only valid E-mail addresses are ever specified in such configuration. This is primarily done by the code like below:

(defun gnus-set-mail ()
  (interactive)
  (message-goto-from)
  (kill-whole-line)
  (insert "X-Message-SMTP-Method: smtp smtp.googlemail.com 587 example@gmail.com.com\nFrom: Example \n\n")
  (message-goto-body)
  )

Further, I’ve replaced the default key map for toggling thread view (gnus-summary-toggle-threads initially defined as C-M-t to C-c C-t simply because I use C-M-t for opening a console on my Linux machines. (I currently use KDE, but I find this shortcut like Unity useful.) Configuring this is actually easy, by the way:

(define-key gnus-summary-mode-map "\C-c\C-t" 'gnus-summary-toggle-threads)

Gnus contains powerful E-mail authoring feature called MML, which basically allows me to mark up MIME structure. This would allow me, for example, to insert arbitrary MIME parts into E-mail. While I don’t do so much of this, nonetheless, this would allow me to fine tune the way attachments are configured, for example.

Defining MIME parts, each with different character set.
Defining MIME parts, each with different character set.

Smooth sailing so far, but I like to improve few of process to fit my needs, which I will be exploring as they becomes necessary!

Google Camera Depth Map Collection

Some pictures interpreted by Google Camera

You can extract these using the following:

exiftool -X -b $1.jpg | sed -n -e 's/.*<XMP-GDepth:Data>\(.*\)<\/XMP-GDepth:Data>.*/\1/p' | base64 -d > $1_depthmap.png
exiftool -X -b $1.jpg | sed -n -e 's/.*<XMP-GImage:Data>\(.*\)<\/XMP-GImage:Data>.*/\1/p' | base64 -d > $1_preprocessed.jpg

IMG_20140501_223102

IMG_20140428_213657

IMG_20140425_130548

IMG_20140422_105423

IMG_20140421_233153

IMG_20140421_201310

IMG_20140421_191650

IMG_20140421_190502

IMG_20140421_190310

IMG_20140420_180758

IMG_20140420_145350

IMG_20140419_214114

IMG_20140419_201449

IMG_20140418_204300

IMG_20140418_200805

IMG_20140417_100545

On generating UUID

I have been using UUID for several different things now, and I have been using uuidgen program available on Linux.
Since I use Emacs, I wanted to better way of generating UUID right from Emacs.

Ergoemacs has good coverage about it back in 2011 about it.

There is a example that uses the uuidgen program:

(defun insert-random-uuid ()
  (interactive)
  (shell-command "uuidgen" t))

The above pretty much solves problems for generating UUID, but I wanted to have a solution that generates UUID inside Emacs, just in case it’s needed.

The example codes, Ergoemacs have posted seems to the job, however, I’ve noticed the original piece of code fixed the first character of the fourth segment character “a” (which actually generates a valid UUID, as this character needs to be either 8, 9, A, or B. I’ve modified this code slightly to generate one of those characters instead of it being always “a” which would be the following.

;; by Christopher Wellons. 2011-11-18. Editted by Xah Lee.
;; Edited by Hideki Saito further to generate all valid variants for "N"
;; in xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx format. 
(defun insert-uuid-internal ()
  "Insert a UUID. This uses a simple hashing of variable data."
  (interactive)
  (let ((myStr (md5 (format "%s%s%s%s%s%s%s%s%s%s"
                (user-uid)
                (emacs-pid)
                (system-name)
                (user-full-name)
                (current-time)
                (emacs-uptime)
                (garbage-collect)
                (buffer-string)
                (random)
                (recent-keys)))))
    
    (insert (format "%s-%s-4%s-%s%s-%s"
                    (substring myStr 0 8)
                    (substring myStr 8 12)
                    (substring myStr 13 16)
            (format "%x" (+ 8 (random 4)))
                    (substring myStr 17 20)
                    (substring myStr 20 32)))))

Also one thing to note is that it’s generally better to use uuidgen where available, as it generates one from /dev/urandom, which tied to various random number sources — although, for the scope of generating uuid, it may not that be critical as likelihood of collision would still be low.

A full code is available on HidekiBin.

How Far Can a $300 Laptop Go?

When my last laptop decided to give up on me, giving me a one blink on caps lock, which apparently means that CPU has failed, I needed to get a replacement quick.

I decided to search for Linux laptops, because that’s what I used on my last machine. I could either shop some specialized vendors for laptop, or as I always do, search Amazon.com.

Then I found this device called Acer Aspire V5-131-2887.


This is a very inexpensive $300 laptop that is pre-installed with a variant of Linux called Linpus. Just because my preference, I’ve reinstalled Ubuntu running KDE desktop.

According to Amazon.com, this device has:

  • Intel Celeron 847 1.1 GHz
  • 4 GB DDR3
  • 320 GB 5400 rpm Hard Drive
  • 11.6-Inch Screen
  • Linux

Usually, when it comes to computing, it’s pretty much you get what you paid for, and this computer is not an exception. For instance, I wouldn’t expect this machine to do heavy computing, such as video editing and 3D modeling.

Yet this Intel HD Graphics GPU built into the CPU is actually not that bad of graphic processor, capable of displaying 3D contents with very surprising speed; I just don’t think I would play cutting edge games on it but nonetheless provides adequate speed for applications like Google Maps in WebGL mode. Another good thing about this particular GPU is that it’s one of most well supported series of graphic card on Linux.

This machine is equipped with 1.1GHz processor, which is not very fast, even at yesterdays standard, but it is very smooth, and in very good thermal profile. (It’s usually around 50C.)

as for connectivity, this computer provides 802.11a/b/g/n and Bluetooth. It is a nice touch, it provides those as even more expensive machines of often lacks 802.11a and Bluetooth. (Amazon’s listing is missing those features, you may want to go to a product page for Acer Aspire V5-131-2887 for more complete information.)

Would I recommend this laptop? Absolutely, but only if you know something about Linux. For example on Ubuntu, it worked, but I had to modify grub setting to make brightness adjustment work. If you don’t know what that means, maybe you want to stay away. But then, if you are considering learning how to deal with Linux, at $300, maybe this is a good start!

4+ Things I don’t Miss About Windows

So now I have transitioned my desktop into Linux, this means I no longer have any system that runs Windows (at least at native capacity.)

1. No more crappy update systems

Apparently, Windows has a defect (that roots from Windows XP) on its Windows Update driver, that can cause very high disk load on every startup/resume, mainly, for parsing datastore.edb file. This actually caused in bit of issues trying to use my system. Essentially, every time I turn on my machine to use, it’d take at least 10 minutes to “stabilize.” This has happened in three of prior systems, and latest machine, which is i7-2600 with 16GB didn’t help solve this issue either.

Besides, I have a lot of complaints of how the update system works on Windows. Unfortunately, Windows pretty much requires restart and just about any updates, perhaps thanks to its locking file system, too.

2. I am no longer underprivileged citizen of the system

Why am I getting “Access denied” when you are using your machine as Administrator? Because on Windows, you are not the man of the house. Windows has layers of the system that prevents people from doing stupid things in their system.

Essentially, on Windows, you are prevented to do a lot of stupid things. This mentality often causes cases where I know what I’m doing, but the system is not letting me do that.

For instance, on Linux and other Unix system, you can cause a bit of damage by doing something like:

sudo rm -rf /*

I am more than willing to take a risk, and if this command does kill my system, that’s my own fault. After all great power comes with great responsibilities.

 3. Exiting out from the blackbox

In any computing, you can’t really escape from error messages. Things happen in many degrees of issues. Some are minor, and some are major. If anything goes crazy on Linux, I can usually just type dmesg to find out what exactly happened in few seconds. Windows also has logging facility, but even after spending a long time trying to boot system event logs, information I can get is extremely limited. Something as simple as a defective thumb drive is a bit hard to investigate under Windows.

4. Locking file system

You can’t delete or move files that are in use. This is somewhat a legacy from old Windows versions. On Linux, you can do these things as executables are mostly preloaded into RAM, hence many system updates don’t require a reboot of the system.  Most of system has more RAM than you ever use, so this is very ridiculous notion that you still can’t do this on Windows.

Ranting continues…

Another thing I want to point out is that Microsoft has been harsh on IT professionals (well, I don’t know if I’d call myself “IT professional” but I do maintain a handful of systems…) lately. TechNet Plus was a useful resource in evaluating softwares, so I can support the platform that I don’t necessarily use. First, they degraded its contents of the subscription, and then they decided to retire it altogether. I was paying my own hard earned money to stay on top of the platforms I have been supporting. An enterprise may be able to move to MSDN, but smaller business, which relies heavily on personal expertise of staff, this won’t be very realistic. Anyways, Microsoft no longer seems to care. So why should I care? That’s pretty much what I will have to tell people from now on.

Sushi and RFID

So I was eating Sushi today — the kind that rotates on a belt.
I have already known that these Sushi belt systems have way to track expiration, so that those Sushi plates won’t be circling around on the belt forever making the health department unhappy.

IMG_20130511_191405

So I ate a few plates of Sushi, and then turned it over to see what’s underneath. It seems like something built inside it.

IMG_20130511_192931

So I was curious if it is any proprietary RFID system, or perhaps Felica?

Screenshot_2013-05-11-19-12-28

It turns out it is using NXP chip SL2ICS20.

Screenshot_2013-05-11-19-34-59

Screenshot_2013-05-11-19-35-09

Digging it deeper, it doesn’t look like the chip contains so much of information, however there were slight deviation between each plates.

Screenshot_2013-05-11-19-35-39

Screenshot_2013-05-11-19-35-58

While the display shows each datablock being unlocked, RFID chip itself was still locked (perhaps not permanently locked) so it could be that the system still keeps track of how many times plates has passed through the checkpoint, among other information.

Upgrading Org-mode 8.0

Org-mode 8.0 is out, and overall, it looks like interesting update to already awesome package for Emacs.

This update is dirsruptive updates, which means there are something that can be broken and requires updates.

One of the issue I had was how it handles LaTeX output.

For instance, I had the following in my init.el (I opt to put my config into .emacs.d/init.el instead of .emacs…)

(require 'org-latex)
(add-to-list 'org-export-latex-classes
 '("jarticle"
 "\\documentclass{jarticle}"
 ("\\section{%s}" . "\\section*{%s}")
 ("\\subsection{%s}" . "\\subsection*{%s}")
 ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
 ("\\paragraph{%s}" . "\\paragraph*{%s}")
 ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

The above is actually an incompatible for 8.0, and it had to be updated so it is:

(require 'ox-latex)
(add-to-list 'org-latex-classes
 '("jarticle"
 "\\documentclass{jarticle}"
 ("\\section{%s}" . "\\section*{%s}")
 ("\\subsection{%s}" . "\\subsection*{%s}")
 ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
 ("\\paragraph{%s}" . "\\paragraph*{%s}")
 ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

The tricky part is that it won’t complain until you try to issue org-export-as-latex, which actually is not supposed to exist in 8.0. (the corresponding function of 8.0 is org-latex-export-to-latex) What happened was that by requiring org-latex, it loaded corresponding functions from 7.9.3 version built into Emacs itself.

So if you have any statements like above, do make sure to update or you will run into problems.

You can see if you have a correct installation of org by M-x org-version. You can also try to get a complete list of org-export- and if you see any more than the following, you may have some issue in your configuration.

Possible completions are:
org-export-dispatch org-export-insert-default-template
org-export-stack org-export-stack-clear
org-export-stack-mode org-export-stack-remove
org-export-stack-view

Setting Emacs Custom Splash

Since there were some inquiries about this one… This is actually built-in function of Emacs.

emacs-homebrew

First, prepare a graphic file for it. Any size probably will do as long as it’s small enough that fits on the screen. Default graphic is 270×217, so you may want to choose it. Any format that Emacs supports will do. Perhaps XPM will be the best choice.

Now, go into the customize screen using M-x customize

customize

Typing in fancy splash, and it should filter entries to the single one. If it says Default, flip it to File, then specify full path to the graphic you have prepared earlier, and save.

fancyset

Then it should be displayed when you go in by C-h C-a.

Have fun!

Why I Love LaTeX

My History with LaTeX

I have been using LaTeX and its variant (mostly pLaTeX variant, for doing Japanese documents) for about 10 years now. Back when I was in school, I have used to take a note in real time. (Back around that time, Org-mode was still about to be released. If I’d do anything differently today, I’d take a note in Org-mode, and perhaps export it to LaTeX or other formats.) I even negotiated, for some class, that I can submit assignments in PDF output from \LaTeX, which I did get favorable responses from all I asked. As a premise, most others submitted non-coding assignments on paper — some submitted electronically, presumably with Microsoft Word format. (How they can live with formula editor on Microsoft Word, is outside of my comprehension…)

Why You Should Use LaTeX?

To me, LaTeX is a superior document creation tool compared to other forms of document creation.

Flexibility in Toolchain

Essentially, working on a document using an office suite is pretty much take-all-or-nothing. If you are completely sold to an application software you are using, that’s great, but if not, you either have to continue working in an environment you are not satisfied with, or should you choose to integrate process using another method, such as alternative softwares — that’s when things get very awkward. While most of office suite applications provide some support for interfacing with other applications, which could be through set of APIs, or scripting, but because of the complexity of the software, customizing those environments could well be a full time job of its own.

LaTeX file is essentially a plain text format with markup. Any text editors can handle LaTeX files. If the editing LaTeX file, learning LaTeX commands are not your cup of tea, then there are many “IDE for LaTeX” systems you can use instead. One such application I’ve used in the past is called TeXnicCenter which provided menus and toolbar access to many of commonly (and some obscure) commands available in LaTeX. If you are being intimidated by the markup nature of LaTeX, you may want to try it, or many other editors around.

Because of a text based workflow, it integrates very well among other tools. For instance, I use Org-mode to create a document. Org-mode is a very versatile tool that can be used for many forms of data management and authoring. Perhaps because Carsten Dominik, the original author of Org-mode is an astronomy professor, Org-mode is designed so it works very well with LaTeX system.

This provides multiple export path as well. While I prepare a document as a document, the same document also can be used to output as an HTML page. (It is also worthwhile to mention that the HTML output from Org-mode is clean enough that it validates as XHTML strict.)

Clear Separation of Style and Contents

You may have come across the documents that are horribly formatted. I have seen a document that the heading was merely done by change of font size, spacing between paragraph being adjusted by an empty line of different font size; the list goes on and on. This comes from overemphasis of so called WYSIWYG (What You See Is What You Get) concept, where what you see on the screen is what you get as a result. For instance, when you print out the document, the result will be what you see on the screen. (While some may disagree with this notion, but it was premise as marketed back then.)

Even after sociological emphasis is shifted from circulation of document as a paper, and electronic transmission, collaboration, and management, mindset of users were never shifted, and as a result, poorly formatted documents are being produced, perhaps in a degree of hundreds of Terabytes per seconds world wide.

Bad formatting was, perhaps, acceptable when paper trails were the center of focus; after all, noone really cared how data that resulting print was originated from, as long as it is legible.

LaTeX in nature, often enforces document markups, which makes it much harder to do it wrong way. It is still possible to format document in LaTeX wrong way, but either makes getting what you want done more challenging, or will cause errors.

Better Version Control

LaTeX document is a text file, so the document can be version controlled as easily as computer program codes. Difference between version can be inspected easily. This is fundamentally different from how many of Office Suite applications record changes; essentially they are keylogger system where user actions are recorded into the document. If this feature is not enabled when the document is being written, or information is lost for some reason, recovering difference information between two document often provide inaccurate information. Moreover, merging difference from multiple sources are often very difficult because of the nature that style information often interleaved within the document.

Want Try It Out?

Installing LaTeX to your computer is easier than ever, as there’s installation package called TeX Live which includes most of programs you will need to get started. Depending on your preference, you may want also install aforementioned editing software, but your favorite text editors should do a trick.