Should we give Firefox another chance?

While the Mozilla Firefox vs. Google Chrome seems to be a topic that comes up once in a while, while the recently, it is dwarfed by close to 60% of the market share by Chrome.  Recently there was an article called It’s time to give Firefox another chance.

The article emphasizes that the next version of Firefox Quantum will be the major release for Firefox.

I have been using Chrome as my primary web browser for a long time, while before, I have been using Firefox. But recently, I am finding I am using more Firefox more often.

From few different perspective, here are my thought on this topic. With this article, I am not making assertion that the one browser is better than others, but to get the foundation out so it can be compared time to time.

Platform Support

Chrome and Firefox both supports Windows, Linux, and Mac. Thus they are on par with this perspective.

Feature Comparisons

Browser Sync

Chrome supports syncing via Google Sync, and Firefox via Firefox Account. They offer similar functionality. Both Chrome and Firefox offer encrypted sync. Perhaps Firefox’s sync feature is a little more comprehensive as it supports history syncing while Chrome seems to be limited in this regard.

Security

Both Chrome and Firefox are discovered with good number of security issues. (and it is important they are addressed in timely manners, too!) Discussing these can be article of its own, so I am focusing here regarding the security feature.

Chrome has been supporting sandboxing and most recent version of Firefox is supporting it as well. From more robust multi process design with Chrome (more of that in later) perhaps in this area, Chrome has bit of edge compared to Firefox.

One thing I like about Firefox that lacks on Chrome is the support of master password, which you can lock password store with the master password.

Also Firefox has a useful extension called Firefox Multi-Account Containers, which can isolate session cookies, which makes it easier to confine certain sites (like Facebook) to reduce tracking.

Chrome has recently moved toward hiding security information from the browser interface, perhaps to make it more user friendly. One illustration of this problem is that they are making jump through some hoops to be able to look up certificate information. (Through developer tools.) While this can be turned back on through experimental features, it is bit concerning they are hiding this information for the sake of user friendliness; if that’s the reason.

Operating System Integration

Chrome uses operating system’s own certificate management where available, which makes it easy to integrate in environment where internal certificate (while this is not a best practice, but it happens!) or internal Active Directory authentications are used.

Firefox, in contrast, uses Network Security Service, which basically is a security storage independent of the system. This makes the system less integrated with the one configured through the system. While configuring Active Directory authentication for Firefox is certainly possible, it is not a simple one-click process.

With this regard, Chrome seems to integrate a little better with the operating system.

Google Service Integration

This is somewhat silly notion when Chrome is designed by Google who owns those Google services. One of the major blocking factor is if there’s Chromecast involved, as at least from the desktop, there is no practical way to control it outside of Chrome.

Other than that, aside from some services that heavily expect Chrome to be used, most of Google Service should work on both of those browsers.

Mobile Versions

With extensions support, it appears Firefox for Android, also known as Fennec feels like a mobile port of the desktop version rather than the scaled down version, which is the way every time I use Chrome I can’t help notice.

Internal Designs

Chrome is designed from the ground up with multi-process utilization in mind, which this development was relatively recent with Firefox. While they work similar, with this regard, perhaps Chrome has a slight advantage of this in stability. Multi process support for Firefox, called Electrolysis can be disengaged for having incompatible feature sets (like accessibility) or extensions. This problem usually comes from the older type of extensions, and perhaps will soon go away when Firefox 57 only supports WebExtension.

Other Features I Love

Firefox features a reader mode. This mode is very useful when reading long article as it removes a lot of clutter off the document. (Also supported on a mobile version as well!)

 

Working Around Extreme Lag of Google Chrome

Update (2016-02-22): Developers have implemented changes to address this issue. While you won’t see the benefit of these changes immediately, it is certainly “coming soon” at this point.

I have been experiencing excessive lag on Google Chrome on Linux for a while, and I have been searching for solutions. The issue itself, has been reported in different incarnation of bug reports, including issue #424082 on Chromium bug reporting system.

Recently, it was tracked by one of the Chromium developers that some font configuration is causing an unnecessary call to fontconfig, giving it bit of a performance penalty.

Perhaps this problem wouldn’t have affected so much about western fonts, because of relatively less load involved in the system to parse western font sets (though I’d think increased CPU load would have been observed, albeit in shorter duration.)

If you are affected by this issue, you’d seen a significant lag in UI interaction, including input to the Omnibox, as well as other actions such as menus.

Unfortunately, a good number of Japanese users may have been encountering this issue, as very common fonts (at least on Linux) such as IPA fonts would have been one of fontsets that can cause this issue.

To work around, in case of KDE, you will have to install kde-config-gtk-style and change GTK styling to use fonts other than ones affected by this issue. (On Gnome, it would be gnome-tweak-tool.)

Note that you will have to restart Chrome everytime you change this setting.

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.

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.

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!