2013.06.19
How to Create Your Own Git Server
Although I'm a happy (also paying) user of GitHub's offerings,
there are times when I prefer to host a private repository
on a server I control.
Setting up your own Git server can be useful
if you're isolated from the public internet,
if you're subject to inflexible regulations,
or if you simply want features different from those offered by GitHub
(and other similar providers).
Setting up a Git server on a Unix (Linux, Mac OS X, *BSD, Solaris, AIX)
machine isn't difficult,
but there are many details to observe.
Here is a complete guide.
Continue reading "How to Create Your Own Git Server"Last modified: Wednesday, June 19, 2013 2:20 pm
2012.09.22
How to Calculate an Operation's Memory Consumption
How can you determine how much memory is consumed by a specific
operation of a Unix program?
Valgrind's Massif subsystem could help you in this regard,
but it can be difficult to isolate a specific operation from
Massif's output.
Here is another, simpler way.
Continue reading "How to Calculate an Operation's Memory Consumption"Last modified: Saturday, September 22, 2012 5:46 pm
2012.08.07
Importing an RCS Project into Git
RCS stands for Revision Control System.
You may have never heard it, because it's more than a quarter-century old;
a paper
describing it was published in 1985.
Although its commands are still available in most Unix distributions
and it's one of the easiest systems to use in a single-user scenario,
it is clearly showing its age when compared to more modern systems.
Here is how to move an existing project managed with RCS to the
21st century and Git,
while preserving all its history.
Continue reading "Importing an RCS Project into Git"Last modified: Tuesday, August 7, 2012 7:19 pm
2012.01.08
Mind Mapping
In a recent
NPR interview the journalist
described how I used a mind map to organize my work while I
served as Secretary General for Information Systems
at the Greek Ministry of Finance.
A number of people asked me for more details;
if you're interested read on.
Continue reading "Mind Mapping"Last modified: Sunday, January 8, 2012 7:42 pm
2011.12.28
Pretend Invitations
Choosing between people you want to invite to a function and people you
have to invite is sometimes difficult.
Say Alice wants to invite Tom, Dick, and Harry to a party, but she'd actually
prefer if Dick didn't show up.
Here's how Alice can send invitations by email from an email-capable
Unix system to achieve the desired result,
while covering her scheming with plausible deniability.
Continue reading "Pretend Invitations"Last modified: Wednesday, December 28, 2011 1:29 pm
2010.10.14
Synchronizing Thunderbird's Replied Flag
My main email client is Thunderbird, but I also use BlackBerry's and Apple's
clients,
all through the same IMAP account.
Disconcertingly, email messages to which I have
replied through the other clients don't show up in Thunderbird with the
"replied" () icon.
This means that when I browse my email using Thunderbird,
I waste time trying to remember whether I have responded
to a particular message.
Here is how I solved the problem.
Continue reading "Synchronizing Thunderbird's Replied Flag"Last modified: Thursday, October 14, 2010 1:40 am
2010.08.24
Sane vim Editing of Unicode Files
Being able to use plain alphabeitc keys as editing commands
is for many of us a great strength of the vi editor.
It allows us to edit without hunting for the placement of
the various movement keys on each particular keyboard,
and, most of the time,
without having to juggle in order to combine particular keys with
ctrl
or alt
.
However, this advantage can turn into a curse when editing files
using a non-ASCII keyboard layout.
When the keyboard input method is switched to another script
(Greek in my case, or, say, Cyrillic for others)
vi will stop responding to its normal commands, because it will
encounter unknown characters.
Here is how I've dealt with this problem.
Continue reading "Sane vim Editing of Unicode Files"Last modified: Tuesday, August 24, 2010 1:24 am
2010.08.04
Batch Files as Shell Scripts Revisited
Four years ago I wrote
about a method that could be used to have the Unix Bourne shell interpret
Windows batch files.
I'm using this trick a lot, because programming using the Windows/DOS
batch files facilities is decidedly painful, whereas the Bourne
shell remains a classy programming environment.
There are still many cases where the style of Unix shell programming
outshines and outperforms even modern scripting languages.
Continue reading "Batch Files as Shell Scripts Revisited"Last modified: Wednesday, August 4, 2010 11:21 pm
2010.01.12
Useful Polyglot Code
Four years ago I blogged about an
incantation that would allow the Windows command interpreter (cmd) to execute
Unix shell scripts written inside plain batch files.
Time for an update.
Continue reading "Useful Polyglot Code"Last modified: Tuesday, January 12, 2010 7:52 pm
2009.12.27
How to Get a Glowing Recommendation Letter
Students who do well in my courses often come to me asking for a
recommendation letter for graduate or postgraduate study.
I only write letters for students I know well
and I can honestly recommend, so some end up with a glowing
recommendation while others leave empty handed.
While I was drafting a few letters today,
it occurred to me that obtaining a good recommendation letter
is a lot easier if you've planned for it well in advance.
Continue reading "How to Get a Glowing Recommendation Letter"Last modified: Sunday, December 27, 2009 6:53 pm
2009.10.21
Basic Etiquette of Technical Communication
Parents spend years trying to teach their children to be polite, and some of us had to learn at school how to properly address an archbishop. Yet, it seems that advice on courteousness and politeness in technical communication is in short supply; most of us learn these skills through what is euphemistically called “on the job training.” With enough bruises on my back to demonstrate the amount and variety of my experience in this area (though not my skill), here are some of the things I’ve learned.
Continue reading "Basic Etiquette of Technical Communication"Last modified: Sunday, December 27, 2009 6:43 pm
2009.10.15
Tags for Bibliography References
I love writing my papers in LaTeX.
Its declarative style allows me to concentrate on the content,
rather than the form.
I even format the text according to the content,
keeping each phrase or logical unit on a separate line.
Many publishers supply style files that format the article according
to the journal's specifications.
Even better, over the years I've created
an extensive collection
of bibliographies.
I can therefore use BibTeX to cite works with a simple command,
without having to re-enter their details.
This also allows me to use style files
to format references according to the publisher's specification.
Yet, there is still the problem of navigating from a citation to
the work's details.
Here is how I solve it.
Continue reading "Tags for Bibliography References"Last modified: Thursday, October 15, 2009 9:25 am
2008.09.11
Unzipping Files in Order
Over the past couple of years I've enjoyed listening to the
audio edition of the
Economist newspaper.
The material is superb
(although I occasionally get the feeling of listening to the
Voice of America),
the articles are read in a clear voice,
the data's encoding is plain MP3,
unencumbered by digital rights (restrictions) management silliness,
and the audio format is convenient to listen on the metro or while jogging.
Unfortunately, the articles in the audio edition's zip file are
haphazardly ordered, which, until today, marred the enjoyment of my listening.
Continue reading "Unzipping Files in Order"Last modified: Thursday, September 11, 2008 6:05 pm
2008.04.28
In Presentations Less is More
A couple of months ago I prepared the slides for a paper I will present
at the
30th International Conference on Software Engineering.
After reading Garr Reynolds's book
Presentation Zen: Simple Ideas on Presentation Design on Presentation Design and Delivery
I became enlightened, and I decided to redo the presentation from scratch,
creating less cluttered, more focused, and simpler slides.
Continue reading "In Presentations Less is More"Last modified: Monday, April 28, 2008 0:12 am
2008.03.28
A Minute Minute Minder
Today I delivered the opening
keynote address
at the 4th Panhellenic Conference on Computer Science Education.
For a number of reasons (more on that later) I wanted to keep track of
my progress during the presentation.
For this I put together a minute minder that displayed the
time from the presentation's start and the slide I should be in.
I could thus adjust my pace to finish as planned.
Continue reading "A Minute Minute Minder"Last modified: Saturday, March 29, 2008 7:22 am
2008.01.04
Curing MIDlet Bluetooth Disconnects
Over the last few days I've been writing a
MIDlet
to collect GPS coordinates and cell identifiers.
I'm doing this
in an effort to look at what algorithms might be needed
in order to implement something similar to Google's
My Location
service.
Here is a Google Earth example of the data I'm collecting.
Yesterday,
I reached a point where I was collecting all the information I needed,
but the program was often plagued by random disconnections of the Bluetooth
link to the GPS.
Continue reading "Curing MIDlet Bluetooth Disconnects"Last modified: Friday, January 4, 2008 2:13 pm
2007.12.08
Global Web Site Redirect
I recentry moved UMLGraph to its
own dedicated web site.
After the move a friend pointed out that all the links in
Martin Fowler's web page on
UmlSketchingTools would now stop working.
Continue reading "Global Web Site Redirect"Last modified: Saturday, December 8, 2007 8:55 am
2007.11.22
Cover Letters for Publications in LaTeX
I admit it.
Although I compose most of my journal publications in LaTeX,
I use Microsoft Word for writing the cover letters.
The university's letterhead is provided in Word, and setting
up and compiling a LaTeX document for a single text
page is not worth the trouble.
Continue reading "Cover Letters for Publications in LaTeX"Last modified: Thursday, November 22, 2007 12:30 am
2007.09.27
A Programmer's Bookshelf
A first year student at a nearby university wrote to me asking for
advice on becoming a hacker
(according ESR's
definition, he clarified).
He sent me a laundry-list of 18 programming languages he aimed to learn
by the time he graduated, and asked for other recommendations.
I've learned a lot from reading books,
so I compiled two reading lists for him.
Continue reading "A Programmer's Bookshelf"Last modified: Thursday, September 27, 2007 10:49 am
2007.08.28
The Treacherous Power of Extended Regular Expressions
I wanted to filter out lines containing the word "line" or a double quote
from a 1GB file.
This can be easily specified as an extended regular expression,
but it turns out that I got more than I bargained for.
Continue reading "The Treacherous Power of Extended Regular Expressions"Last modified: Tuesday, August 28, 2007 10:37 am
2007.03.06
The Power of Reusable GUI Elements
One can manipulate any graphical element of the
Squeak environment by bringing up
its halo:
a rectangular set of icons representing actions that one can perform
on any object.
At first I found it cumbersome to have to go through the halo
in order to perform any action, like recoloring an object or
changing its name.
Later I saw that this method is incredibly powerful.
Continue reading "The Power of Reusable GUI Elements"Last modified: Tuesday, March 6, 2007 4:53 pm
2007.02.04
How to Embed Citations in Diagrams
Diagrams in scientific publications occasionally link to other elements
of the publication, such as bibliographic or section references.
Maintaining consistency between the citations in the diagram
and the publication can be tricky, but a small Perl script
can automate this process.
Continue reading "How to Embed Citations in Diagrams"Last modified: Sunday, February 4, 2007 9:32 pm
2006.12.25
The Capacitor Plague Hits a Baby Monitor
Good baby monitors are hard to come by.
Many tend to be oversensitive, others switch from squelch mode to
transmission with a loud hiss that is more irritating than a baby's
cry.
We were very satisfied with a Tomy Walkabout Digital
1998 baby monitor, until the day it started emitting a squeaking
sound.
Continue reading "The Capacitor Plague Hits a Baby Monitor"Last modified: Monday, December 25, 2006 12:41 am
2006.11.22
So Long as there's a Jingle in your Head, Television isn't Free
Yesterday I switched from an ancient version of the "free" Adobe Reader to
the current version 7.0.
I spent the morning studying some fairly tricky technical documents.
Within that interval I often caught my eyes glancing to the top right of the
Adobe Reader's display window where
an advert button flashed as it changed its content.
Needless to say, this change of focus interrupted my train of thought,
and got me out of "flow mode".
Continue reading "So Long as there's a Jingle in your Head, Television isn't Free"Last modified: Saturday, November 25, 2006 6:19 pm
2006.11.15
White Noise Calms Babies
A week ago I told my colleague
Damianos Chatziantoniou
that drying the body of a newborn baby with a hair drier keeps
it consistently dry avoiding rashes, and also calms the baby down.
Today he told me the advice worked wonders.
Many parents have discovered that sources of white noise, like the sound
of a vacuum cleaner or a hair drier, seem to calm down a baby's
crying spell.
Continue reading "White Noise Calms Babies"Last modified: Wednesday, November 15, 2006 8:54 am
2006.09.21
UML Class Diagrams from C++ Code
I needed a UML class diagram of the classes I use in the implementation of
CScout refactoring browser.
I drew the last such diagram on paper about four years ago, so it was
definitely out of date.
I always say that whenever possible documentation should be automatically
generated from the code, so I decided to automate the task.
Continue reading "UML Class Diagrams from C++ Code"Last modified: Thursday, September 21, 2006 11:49 am
2006.07.19
Efficient Human Multitasking
I sometimes hear colleagues complaining that they can't get anything done,
because they have too many tasks in their head.
I've found that in order to increase the efficiency of my work
I need a moderately large selection of pending tasks.
This allows me to match the type of work I can do at a given moment
with a task in the most optimal way.
Continue reading "Efficient Human Multitasking"Last modified: Wednesday, July 19, 2006 0:00 am
2006.06.16
Batch Files as Shell Scripts
Although the Unix Bourne shell offers a superb environment for combining
existing commands into sophisticated programs, using a Unix shell
as an interactive command environment under Windows can be painful.
Continue reading "Batch Files as Shell Scripts"Last modified: Friday, June 16, 2006 3:58 pm
2006.05.01
Debuggers and Logging Frameworks
As soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered.
— Maurice Wilkes discovers debugging, 1949
The testing, diagnostic, and repair equipment of many professions is horrendously expensive. Think of logic analyzers, CAT scanners, and dry docks. For us the cost of debuggers and logging frameworks is minimal; some of them are even free. All we need to become productive, is to invest some time and effort to learn how to use these tools in the most efficient and effective way.
Continue reading "Debuggers and Logging Frameworks"Last modified: Friday, December 15, 2006 10:15 am
2006.04.24
Public Bookmarking
You're searching the internet to answer a question you have,
and after some painstaking detective work you locate the answer.
Where do you store the answer for future reference?
Continue reading "Public Bookmarking"Last modified: Monday, April 24, 2006 3:42 pm
2006.03.01
Bug Busters
Although only a few may originate a policy, we are all able to judge it.
— Pericles of Athens
Popular folklore has our profession's use of the word bug originating from a real insect found in an early electromechanical computer. Indeed, on September 9th of 1947 the Harvard Mark II operators did find a moth obstructing a relay's contacts. They removed it and dutifully taped it in the machine's logbook. However, engineers were using the term "bug" many decades before that incident. For example, in a 1878 letter Edison used the term referring to the faults and difficulties he was facing while moving from an invention's intuition to a commercialisable product.
Continue reading "Bug Busters"Last modified: Friday, December 15, 2006 12:32 am
2005.11.17
How to Sort Three Numbers
Quick: how do you sort three numbers in ascending order?
Continue reading "How to Sort Three Numbers"Last modified: Thursday, November 17, 2005 11:01 am
2005.11.14
Supporting Java's Foreach Construct
Java 1.5 supports a new
foreach
construct for iterating over collections.
The construct can be used on arrays and on all classes in Java's Collection
framework.
I searched the internet for an example on how to make my own
classes iterable with this construct, but could not find an example.
Continue reading "Supporting Java's Foreach Construct"Last modified: Sunday, November 13, 2005 11:27 pm
2005.10.04
Hard Disk Failure
I tell everybody that the question is not whether your hard drive
will fail, but when it will fail.
My laptop's drive started emmitting a loud grinding sound last Saturday.
Continue reading "Hard Disk Failure"Last modified: Tuesday, October 4, 2005 11:14 am
2005.03.01
Dear Editor
Machines should work. People should think.
— Richard Hamming
Dear Editor,
I know that you are nowadays often taken for granted, and that many programmers consider you a relic of an older age. Yet, programmers continue to spend an inordinate amount of time with you, and often listen to your advice. As you have no doubt observed I am often mistreated; in this letter I have written my most common grievances hoping you can convince them programmers to behave better toward me in the future.
Continue reading "Dear Editor"Last modified: Tuesday, December 12, 2006 9:19 pm
2005.02.07
Macro-based Substitutions in Source Code
A friends asks:
"How can one easily replace a method call (which can contain
arguments with brackets in its invocation code) with a simple
field access?
Continue reading "Macro-based Substitutions in Source Code"Last modified: Tuesday, February 8, 2005 1:50 pm
2004.12.27
Who Maintains the GNU Plotutils?
The GNU plotutils
package contains a reimplementation of a pic language processor.
I find pic invaluable for drawing diagrams;
in fact the sequence diagram editor in my
UMLGraph system, depends on it.
The current version is 2.4.1, and was released in July 2000 - almost four years ago.
I have discovered two bugs, but no one seems to be maintaining the package.
This is unfortunate.
Continue reading "Who Maintains the GNU Plotutils?"Last modified: Monday, December 27, 2004 3:34 pm
2004.08.25
Continous Bookmarking
When editing documents or code, my not so agile fingers, often trigger
a movement or search command that accidentally throws me to a random
location in the text I am editing.
How can I return back?
Amazingly, I noticed I am using exactly the same trick for returning back
on both the vim editor I use for most of
my editing tasks, and Microsoft Word I use for collaborating with many
colleagues.
Continue reading "Continous Bookmarking"Last modified: Wednesday, August 25, 2004 9:57 am
2004.08.11
Patching Framework III
Time warp.
I needed to read some old files I wrote in 1992 using the Ashton-Tate
Framework III program.
Unfortunately, trying to run the program under Windows XP resulted in a
"Divide overflow
" error.
A bit of searching on the web revealed that the problem was related
to the system's speed (1.6GHz).
Apparently, Framework tries to calculate the speed of the machine
by dividing a fixed number with a loop counter;
on modern machines this results in the overflow.
Continue reading "Patching Framework III"Last modified: Thursday, August 12, 2004 9:47 am