Category Archives: Howtos

Latex writing tips

When writing papers or theses, Latex is the tool of choice for computer science students and researchers. In contrast to WYSIWYG word processors, whether they are locally installed or cloud-based, Latex emphasizes your ability to write text and deals with the layout on your behalf. Even if Latex’s decisions about placing figures and tables are not exactly controllable and not always according to your liking, it is actually very hard to use Latex for the creation of a document that is visually as unappealing as a letter written in word.

Although an author who is new to Latex may get used to the inconvenience of visible tags to represent special text features instead of a direct visual feedback of a WYSIWYG word processor, there are some things that are harder in Latex.

Collaboration

The classical collaboration tool of WYSIWYG users, email, has been impractical compared to Latex’s ability to be used with a version control system such as Git. Cloud-based WYSIWYG processors, however, allow several users to collaborate interactively with each other. This remains hard in Latex, but a Cloud service called Overleaf exists that provides the same feature for Latex users.

It features complete Latex support as well as PDF previews and at the same time also live interaction and side-bar comments. Furthermore, it provides Git access to the underlying repository, which can be cloned into a local directory. Consequently, it is also possible to push local updates into the repository in Overleaf, which permits safe offline working on the same document. The local Git repository can of course also be pushed to a secondary remote node, allowing a user to keep a secondary safe copy.

Spell checking

Spell checking has been notoriously bad for essentially all word processors except Word. This problem has been alleviated for many of us by the arrival of Grammarly. Grammarly calls itself “the free writing assistant”, and it is well capable of protecting us from most spelling and grammatical mistakes that we usually make in English. It can be integrated into Chrome and is already quite effective in its free version.

Interestingly, Grammarly can be used when Chrome is used to write Latex in Overleaf. A discussion on stackexchange reveals how it can be used.

Bibliography

Many people are disappointed that Google Docs has no bibliography system, while Microsoft Word users have access to EndNote. Latex can use several bibliography systems, among them Bibtex, which needs much less attention than EndNote. There is an old tool named bibtex that extracts and converts Bibtex entries according to a format chosen inside the latex document, and there is a younger tool named biber that does the same job. Porting Latex documents (but not the Bibtex files) from bibtex to biber has a learning curve, and I haven’t done it yet.

Most publishers provide options for downloading appropriate Bibtex (as well as EndNote) citations for every book or paper, but in the case of Bibtex, it is possible to collect all of them in one single large collection and refer to its entries from every Latex document that you write.

Just collecting bibliography in such a large file has its disadvantages, however. It is particularly inconvenient when the collection has grown large and you are searching for a specific document whose details you cannot remember perfectly. Of course, a basic text editor can be used to search in that file, but also other features such as grouping by topic are desirable.

This is where Mendeley and Zotero come in. Both are Cloud-based systems that allow you to manage to bibliography and export it in a variety of formats including Bibtex and EndNote. Both of these systems have desktop clients to manage your online collection, and both are capable of storing PDF files of the managed content for you.

Mendeley is today owned by Elsevier, Zotero by the Corporation for Digital Scholarship; a user may prefer the one or the other for this reason. At UiO, the recommended tool is apparently Zotero.

Olvwm on Ubuntu

Olvwm (the OpenLook virtual window manager) is a positively antique window manager originally for SunOS, which I liked very much for its focus-strictly-under-mouse behaviour, thin window borders and pop-over window sliders. OpenLook was deprecated when the (in my opinion: ulgy and bloated) CDE desktop conquered the world, but modern Linux distros are capable of supporting the antique OpenLook applications again. So I gave it a try.

Installing is as easy as “apt-get install olvwm”. In /etc/lightdm/lighdm.conf, I’ve got the block

[SeatDefaults]
user-session=olvwm
autologin-user=myname
autologin-user-timeout=0
allow-guest=false
greeter-hide-users=true
greeter-show-manual-login=true

In /usr/share/xsessions, I’ve got the file olvwm.desktop, which contains

[Desktop Entry]
Name=Open Look
Exec=olvwm -f
Type=Application

That’s all it takes, and you have a pretty blank, autostarting window manager.

To start applications, you can add commands to your right-button context menu by editing <tt>$HOME/.openwin-menu</tt>. Since I’m totally happy with xterm, mine’s here:

"Root Menu" TITLE
"Shells" MENU
        "Shells" TITLE
        "bash"  exec x-terminal-emulator -title bash -e bash
        "ksh"   exec x-terminal-emulator -title ksh -e ksh
        "tcsh"  exec x-terminal-emulator -title tcsh -e tcsh
"Shells" END PIN
"Clock" MENU
        "Clock" TITLE
        "xclock"        exec xclock
"Clock" END PIN
"Browsers" MENU
        "Browsers" TITLE
        "Chrome"        exec google-chrome
        "Firefox"       exec firefox
"Browsers" END PIN
"Utilities" MENU
        "Clipboard..."  exec xclipboard
        "Refresh" DEFAULT                       REFRESH
        "Window Controls" MENU
                "Open/Close" DEFAULT    OPEN_CLOSE_SELN
                "Full/Restore Size"     FULL_RESTORE_SIZE_SELN
                "Back"                  BACK_SELN
                "Quit"                  QUIT_SELN
        "Window Controls" END PIN
        "Window Menu..."                        WINMENU
        "Restart olvwm"                         RESTART
"WM Utilities" END PIN
"Exit from X..."                                EXIT

With its tiny amount of overhead, waiting for the desktop is not an issue. According to a comparison, olvwm consumes only 1.2MB of main memory, compared to Gnome’s 150 and KDE’s 200.

Basler Pylon SDK for GigE Vision Cameras

The Pylon SDK is a C++ framework that follows the convetions of the GigE Industry Vision standard. This SDK is the only way to access the Basler Pilot and Ace cameras. It supports Linux and Windows, both in 32 and 64 bit. The libraries themselfes are closed-source. In theory and when the SDK abstractions are used correctly it should be possible to exchange camera models without re-writing the application software. Using cameras from other vendors should require a simple re-compilation only. As of today the most recent version of the SDK is 2.1.0beta. Read more

Installing the Basler Pylon SDK 2.1.0 on Ubuntu 9.04

Basler Pilot GigE Vision CameraThis is the install procedure for the Pylon Linux SDK 2.1.0 on Ubuntu Jaunty (9.04). The instructions differ slightly from the previous SDK and Ubuntu versions. For the install procedure of Pylon SDK 2.0.3 on Ubuntu 8.04/8.10 see this post. Because Pylon 2.1.0 is not built for Ubuntu 9.04 some packages from previous Ubuntu versions have to be installed manually as described below. Please report if you encounter problems on newer Linux versions. Read more

Setting up a local Apache for HTTP-POST file uploads

Because of filesystem restrictions on the iPhone we don’t have access to our quality assessment results directly. Hence, we need a way to submit the collected data to a remote machine. HTTP seems to be the perfect protocol for this task and POST the recommended method. Using HTTP-POST we can save the data into normal files or we can even put the data into a database. However, this method requires a properly configured Webserver and a server-side script to handle the POST requests (Apache just forwards the posted data to this script). The following procedure explains a very simple and insecure setup for Apache 2 on Mac OSX. Don’t use it on publicly accessible Webservers because you will quickly end up with a rootkit installed! Read more

Reliability and Validity in Experiment Design

(text copied from Wikipedia)

The key traditional concepts in classical test theory are reliability and validity. A reliable measure is measuring something consistently, while a valid measure is measuring what it is supposed to measure. A reliable measure may be consistent without necessarily being valid, e.g., a measurement instrument like a broken ruler may always under-measure a quantity by the same amount each time (consistently), but the resulting quantity is still wrong, that is, invalid. For another analogy, a reliable rifle will have a tight cluster of bullets in the target, while a valid one will center its cluster around the center of the target, whether or not the cluster is a tight one.

Both reliability and validity may be assessed conceptually and mathematically. Stability over repeated measures of the same test can be assessed with the Pearson correlation coefficient, and is often called test-retest reliability. Similarly, the equivalence of different versions of the same measure can be indexed by a Pearson correlation, and is called equivalent forms reliability or a similar term. Internal consistency, which addresses the homogeneity of a single test form, may be assessed by correlating performance on two halves of a test, which is termed split-half reliability; the value of this Pearson product-moment correlation coefficient for two half-tests is adjusted with the Spearman-Brown prediction formula to correspond to the correlation between two full-length tests. Finally, possibly the most commonly used index of reliability is Cronbach’s α, which is equivalent to the mean of all possible split-half coefficients. Other approaches include the intra-class correlation, which is defined as the ratio of variance of measurements of a given target to the variance of all targets.

Validity may be assessed by correlating measures with a criterion measure known to be valid. When the criterion measure is collected at the same time as the measure being validated the goal is to establish concurrent validity; when the criterion is collected later the goal is to establish predictive validity. A measure has construct validity if it is related to other variables as required by theory. Content validity is simply a demonstration that the items of a test are drawn from the domain being measured.

« Older Entries