Tuesday, June 29, 2010

Wireless connection affected by neighbor


Something strange happed this evening. The wireless connection at home had such a bad signal quality that none of my devices could connect to the router.

At first, I did a router reset. Didn't help. Then I tried to reconnect the cables on the router, just in case. No success here also. Finally, I disabled all of the electronics around the router to make sure it wasn't an interference issue. This failed to solve the problem as well.

As I was troubleshooting the problem, I noticed a new wireless network scanned by laptop I had never seen before. It was broadcasting in the same channel with me (channel 11), and I was getting it with a signal quality comparable to that of mine. This seemed strange. Also the quality of my signal was fluctuating from medium to poor.

I looked it up online, and found that is possible for wireless networks to interfere with each other. I followed the suggestion in the article and changed my channel from automatic (resolved to 11 by the router) to 1. This did the job!

My router is Thomson tg585 v7.

Commands I used:
# sudo iwlist eth1 scan

Update 13 Nov 2010:
The same problem struck again. This time, I found it more convenient to do the scanning by using the "Wifi Analyzer" application, running on my Android Phone.

Thursday, April 29, 2010

Η εμπειρία μου με το Android. Ελλάδα, Ιούνιος 2009 - Απρίλιος 2010


Τον Ιούνιο του περασμένου χρόνου απέκτησα ένα HTC Magic 32A κινητό από την Cosmote. Μέχρι και σήμερα, είναι το πιο διαδεδομένο Android κινητό που πωλείται στην Ελλάδα από τις εταιρίες κινητής τηλεφωνίας. Στον τομέα της υποστήριξής του όμως αναγνωρίζω προβλήματα, κατά τη γνώμη μου σημαντικά, για την διάδοση της συγκεκριμένης πλατφόρμας στην Ελλάδα.

Το συγκεκριμένο τηλέφωνο το αγόρασα με Android v1.5 χωρίς Sense UI. Η έκδοση 1.5 ήταν περίπου ένα μήνα στην αγορά [1] και το Sense αναμενόταν. Το μοντέλο Magic το επέλεγαν τότε σαν τηλέφωνο κυρίως ενθουσιώδεις νέοι που ήθελαν να δουν, να πειραματιστούν, ακόμα και να δουλέψουν πάνω στην πλατφόρμα Android. Αμφίβολη επιλογή για το ευρύ κοινό, αφού επίσημα δεν υποστηρίζονταν τα ελληνικά.

Όλοι όμως αυτοί οι κάτοχοι των Magics περιμέναν 3 πράγματα:
i) την ελληνική ROM, που είχε ανακοινωθεί για τέλος Αυγούστου [2]
ii) το Sense UI, στο οποίο η HTC δίνει μεγάλο βάρος και πιστεύω δικαιολογημένα
iii) την αναβάθμιση σε Android v1.6, όταν την έδινε η Google.

Τον Οκτώβριο του 2009 δόθηκε το Android v1.6 [3] στην Ελλάδα ακόμα περιμέναμε το i) και το ii).

Τον Νοέμβριο του 2009 δόθηκε το Android 2.0 [4] και τον Ιανουάριο του 2010 το Android 2.1 [5]. Για την Ελλάδα δόθηκε επίσημη ROM v1.5 με Sense UI στις 28 Ιανουαρίου [6]. Όχι όμως σαν 'Over the air Update', πρακτική που είχε ακολουθηθεί σε αγορές άλλων χωρών.

Μέχρι όμως να δοθεί επίσημη updated v1.5 ROM με Sense, κυκλοφορούσαν "custom ROMs" για τη συσκευή που υποστήριζαν και ελληνικά και v1.6. Τα forums σφίζαν από συζητήσεις πια είναι η καλύτερη ανεπίσημη ROM και πως να την περάσει κανείς. Οι τολμηροί απολάμβαναν τα οφέλη. Η HTC Ελλάδας, όταν τους ρώτησα γιατί καθυστερεί η έκδοση αναβάθμισης της ROM, μου είπαν πως πρέπει να γίνουν δοκιμές για στην υποστήριξη των ελληνικών. Αυτό δικαιολογία μου φαινόταν εμένα, από την στιγμή που η συσκευή όταν είχε πρωτοκυκλοφορήσει δεν είχε καν ελληνικό πληκτρολόγιο.

Σήμερα πάλι, η HTC δηλώνει, αλλά δεν υπόσχεται, πως μπορεί να δοθεί Android v2.1 ROM για Magic. Θα την αντέξουμε τέτοια αναβάθμιση;

Και αν αναρωτιέστε τι την θέλω την αναβάθμιση, εν μέρη οι λόγοι δίνονται στα Release notes των εκδόσεων του Android. Συνοπτικά, δείτε στην wikipedia τον σχετικό πίνακα [6].

Η δυνατότητα αγοράς εφαρμογών από το Antroid Market είναι μια ακόμα έλλειψη της ελληνικής αγοράς, μετά την έλλειψη (over the air ή wired) αναβαθμίσεων. Αυτή τη στιγμή οι εταιρείες κινητής τηλεφωνίας δεν έχουν προβεί στις απαραίτητες διαδικασίες για να επιτραπεί κάτι τέτοιο. Έτσι είναι αδύνατο να αναπτυχθεί επιχειρηματικότητα στο πεδίο αυτό από τους Έλληνες προγραμματιστές. Επίσης, οι εταιρίες κινητής θα δικαιούνταν, αλλά σήμερα χάνουν, ποσοστά (30% νομίζω) από της αγορές εφαρμογών μέσω του Market. Και θα ήταν καλό να τα παίρναν. Θα όφειλαν τότε, κατά την γνώμη μου, να μειώσουν το κόστος απόκτησης και διατήρησης τέτοιων συσκευών από τους πελάτες τους.

Ελπίζω οι σκέψεις αυτές να φτάσουν στην HTC και να συμβάλουν στην βελτίωση της 'quietly brilliant' εμπειρίας στη χώρα μας. Επίσης, ελπίζω οι πρακτικές που περιέγραψα παραπάνω να μην ισχύσουν και για οι νέες συσκευές που έρχονται στην Ελλάδα. Έτσι, τα νέα Android τηλέφωνα θα έχουν καλύτερη τύχη και μαζί με αυτά ας το κάνουν και για τα παλιότερα, σαν το δικό μου.

Μιχάλης Γιαννακίδης
mgiannakidis.blogspot.com
--
Πηγές:
[1] http://developer.android.com/sdk/android-1.5.html
[2] http://www.imobile.gr/showthread.php?14248-%C5%EB%EB%E7%ED%E9%EA%DC-%E3%E9%E1-HTC-Magic
[3] http://developer.android.com/sdk/android-1.6.html
[4] http://developer.android.com/sdk/android-2.0.html
[5] http://developer.android.com/sdk/android-2.1.html
[6] http://en.wikipedia.org/wiki/Android_(operating_system)#Update_history

Sunday, February 14, 2010

Feeding images to a digital picture frame

My digital picture frame has a limited amount of build in memory. In order to put more pictures on the frame, I choose to resize them to the frame's native resolution of 800x480.

I' m pretty sure that there are applications that manage image collections on Linux and also do image resizing. However, I prefered to use ImageMagic and some scripting to do the job.

My script, dir2w820.sh, takes files from a source directory. These may be images and videos mixed together. Then it resizes JPEG files and copies all others (possibly videos) to the current directory. The target resolution for the images is hard coded to 800x480 in the script, but changing this is trivial.

Here is a usage example. We have the original folder as taken from the digital camera in 'camera' and a destination folder 'picture_frame' that will consist of the contents to place on the frame.

$ ls
camera/ picture_frame/
$ cd picture_frame
$ dir2w820.sh ../camera/*

... when done, you can browse through picture_frame to see the result.

dir2w820.sh:


#!/bin/tcsh
#
#
# Written by Michalis Giannakidis - 2009 -
#
# Released in the public domain as is, without any warranties. Feb 2010
#

set resolution="800x400"

if ( $# == 0 ) then
echo "Convert images to $resolution and copy to current directory."
echo "usage: `basename $0` source_files"
echo "example: `basename $0` ../original/*"
echo "Current directory needs to be different than the source."
exit
endif

set counter = 0

foreach i ( $* )
set counter = `expr $counter + 1`

set bfile = `basename $i`
set bdest = `python -c 'import sys; print sys.argv[1].decode("utf-8").lower().encode("utf-8"),' $bfile`

if ( -f s_$bdest || -f $bfile || -f s_$bfile ) then
echo $counter/$# s_$bdest exists. I refuse to copy.
continue
endif

file $i |grep -q "JPEG image data"
if ( $status == 0 ) then
echo $counter/$# s_$bdest
convert $i -resize $resolution^ -gravity center -extent $resolution s_$bdest
else
echo $counter/$# $bdest copied.
cp -f $i $bdest
endif

end

Sunday, November 29, 2009

Switching to Opensuse



1 upgrade of OpenSuse 11.1 and 2 installations of 11.2


In the last 3.5 years I used Gentoo Linux as the operating system of choice for my personal computer. Apart from Gentoo, I had also done and maintained an ubuntu installation, for use in another personal computer. Eventualy, I got tired of gentoo compilations, and ubuntu sadly collapsed under its own weight. Time to try something new, I say...

In June 2009 (five months ago), I installed OpenSuse 11.1 on a HP EliteBook 8730w. The installation was smooth even though I diverted from default options and

  1. installed from an external CD drive,
  2. installed on two disks, one for the OS and one for home, swap and tmp
  3. the home, swap and tmp partitions were encrypted.
When OpenSuse 11.2 was released this November, I upgraded the 11.1 installation, by using the upgrade instructions from the openSuse wiki. The upgrade was a success, with nothing breaking along the process.

At the beginning of November, I installed OpenSuse 11.2 RC1 on a Fujitsu Siemens Amilo V2020 Pro. This time I stayed with default options in all of the installation steps. Again everything went smoothly, all hardware was detected (I havent tried the modem though) and I had a running system in little time. When 11.2 was released, I updated. No problems here either.

In the last week of November I installed OpenSuse 11.2 on an Acer Asprire1 654ZWLMi. The installation steps went smoothly. However, when the time for the first boot came, where the installation's configuration takes place, the X server failed to start. The cause was the ATI graphics card. I quickly found others with this problem in the OpenSuse forum, in this thread: OpenSuse 11.2 Black Screen. A combination of the suggestions on the thread solved the problem for me. The XServer was "hot-wired" to work with the ATI card and driver: "sax2 -r -m 0=ati". The installation continued from were it left over, without any other shortcomings.

It seems that OpenSuse 11.2 installs quite well on a variety of configurations.

OpenSuse also performs very well for my needs. It offers good administration tools (zypper, YAST) and quality technical information on the wiki and the forums. Still though I consider technical articles in the Gentto wikis and forums superior.

Saturday, October 03, 2009

Contact info on a QR Code

Bar codes containing any kind of information seem to pop up everywhere these days. They get a big boost from mobile devices which support bar code scanner applications like zxing. The format most commonly used is QR Code.

The future of this idea seems promising (quoting):

For example, Wikipedia displays their QR code on the Wikipedia site. I could also see QR codes as a potential business card replacement. You are at a business meeting, you whip out your mobile and the other party does as well. You "scan" her barcode displayed on the mobile and now you have all of her contact information and not only is it stored in your mobile, but it’s now on your desktop in your contact manager. Imagine the possibilities for dating!
 A QR Code containing my personal mail address and this blog's URL appear on the sidebar. Also, I have created different versions containing my business contact information. To generate the images I used the QR Code Generator from the ZXing Project.

Saturday, August 22, 2009

Creating a shared library on various platforms

When applications get bigger and code needs to be shared among different applications, then shared libraries sound like a great idea. To get this done, a multi platform compilation sprint race begins.

Shared libraries are libraries that are loaded by programs when they start. When a shared library is installed properly, all programs that start afterwards automatically use the new shared library. It's actually much more flexible and sophisticated than this, because ... [read more]
The library had to be compiled for Linux, Windows, Mac OS X, AIX, HP-UX, Sun OS and Solaris. Internet search engines along with compiler man pages are the best tools for the job. By looking around, I found the following links useful:

Linux:
AIX:
Mac OS X:
Sun OS, Solaris
HP-UX:
Creation of the shared lib was done for a mid-sized project. The library's build process was based on gmake for Unix and gmake and nmake on Windows. The main application's build system also needed adjustments to use the new library. This is also described in the links above.

Saturday, August 01, 2009

30 days with HTC magic: apps I installed

Its been 30 days with HTC magic. I have installed the following apps, all from the Market:

  • AK Notepad
  • AndNav2
  • Any Cut
  • Astrid Task/Todo list
  • Barcode Scanner
  • CompareEverywhere
  • Compass
  • Connectot
  • File Browser
  • GPS Status
  • Greek Input Method
  • My Maps Editor
  • My Tracks
  • Netcounter
  • Places Directory
  • Shazam
  • Text-To-Speech Library - needed by AndNav2
  • Voice Recorder

Saturday, July 25, 2009

EliteBook 8730w - OpenSuse 11.1 - Multimedia keys

To have the volume multimedia keys to work on OpenSuse 11.1 and the elitebook 8730w, you will need to configure the keys with xmodmap:

put in ~/.Xmodpap:

keycode 176=XF86AudioRaiseVolume
keycode 174=XF86AudioLowerVolume
put in .kde4/Autostart/Xmodmap-autoload:
#!/bin/sh
xmodmap ~/.Xmodmap
issue:
chmod +x .kde4/Autostart/Xmodmap-autoload
You may need to check the location of your KDE Autostart directory. This can be found in System Setttings>Personal>About me.

Sunday, July 19, 2009

femio - A python reader for Finite Element Models

femio is an application that allows you to read a Finite Element Model in one of the supported formats and provide tools and functions on the model's contents. Also, it provides the required functionality to allow the user to create tools and manipulate data. Such tools are: model statistics, model image view (screen shot), keyword removal or substitution, etc.

You can see the projects home page here: femio

Femio is based on an older project of mine: abq2img. Recently, I had the need of converting an ABAQUS input model containing *PARAMETER keywords. I used the abq2img codebase and with minimal work, I was able to achieve my goal. Based on that success, I decided to revive the project and extend its functionality and capabilities to over FEM formats.

Its main advantage is that it provides the low level parsing for FE models. This allows the user to manipulate model data while not having to parse the file and provide support for keywords. Thus creating model previews in PNG format is quite easy:


Sunday, May 24, 2009

(wireless) Kodak picture frame w820 and Linux.


2 days ago I bought a KODAK EASYSHARE W820 Wireless Digital Frame. I intended of using it to stream media from my Linux computer, preferably using its wireless capabilities. The disappointing thing is that the manufacturer only provides software for Windows.

Connection to the internet is quite easy and straight forward. Just follow the instructions in the documentation. When connected, the frame automatically checks for firmware updates and prompts to install them. I upgraded smoothly, and all of my following impressions are based on the latest firmware available: 2008.10.28.

So, I am going through the process of finding the frame's capability to interact with Linux. It seems that three methods are available: USB connectivity, RSS feeds and UPnP support. Frame settings can be reached from the touch interface and through its web UI.

USB connectivity: The frame connects to the computer with a USB cable and is automatically identified as a flash drive. Normal file operations can be performed to transfer images and videos to the internal memory.

RSS feeds: The frame connects to various RSS feeds, most notably Flikr. It also has the capability of logging into a Flickr account. Also, custom URL feeds can be accessed. The configuration of the RSS connectivity is achieved through the frames web UI. You can find the frame's IP by accessing the frame's settings from its built in touch UI.

UPnP support: The frame has a UPnP client built in. However, this is not mentioned anywhere in the documentation that accompanies the product and few references exist in the Internet. I installed mediatomb, a UPnP server, on my laptop. Then through the Network Setting on the frame, connection to my laptop was enstablished and I could access my media, both images and video.

What I find missing from connectivity options it the ability to copy media files directly from the PC, through the wireless interface, to the frame's internal memory. Also, the possibility to change any of its settings through the web interface would be greatly desired.

Tuesday, April 28, 2009

Fake road sign advertisement

Creating fake road signs is fun and quite popular on the internet. I gave it a go and I found out it is not that difficult to create one using standard tools (ex. gimp). Here is the result of my first attempt:


An advertisement of papitsa's blog.

Saturday, April 18, 2009

Blogger Tag Cloud Widget

I wanted to have a Tab Cloud in my blog. However, blogger provides only the Label widget which gives only a list of the blog's labels.

I found this blog entry , which produced something very similar to what I wanted. I modified it so that:

  • it is more to my taste
  • allows for further development and easier modifications.

You can see the resulting Tag Cloud on this blog (collumn on the right) and also in http://www.papitsa.gr/

The installation instructions can be found in the original post.




<b:widget id='Label1' locked='false' title='Tags' type='Label'>
<b:includable id='main'>
<b:if cond='data:title'>
<h2><data:title/></h2>
</b:if>
<div class='widget-content' style='text-align: center;'>
<script type='text/javascript'>
/*
Simple Blogger Tag Cloud Widget
by Raymond May Jr.
http://www.compender.com
Released to the Public Domain
Modified by Michalis Giannakidis :
o) tune parameters to my likes
o) modifications to allow more flexibility in formatting of tags and
allow further development.
*/
//Variables:
var max = 130; //max css size (in percent)
var min = 70; //min css size (...)
var showCount = 1; // show counts? 1 for yes
var minCount = 1; // what is the minimum count for a Tag to be shown? 1 for all.

//Begin code:
var range = max - min;

function labelObj() {}

//Build label Array
var lb = new Array();

var most = 1;
<b:loop values='data:labels' var='label'>
var item = new labelObj();
item.label = (&quot;<data:label.name/>&quot;);
item.url = (&quot;<data:label.url/>&quot;);
item.count = (&quot;<data:label.count/>&quot;);
lb.push(item);

if ( most &lt; &quot;<data:label.count/>&quot; ) {
most = (&quot;<data:label.count/>&quot;);
}
</b:loop>


//Labels sort, ignore case
function sortLabels(a, b) {

aa = a.label.toLowerCase();
bb = b.label.toLowerCase();
if ( aa &lt; bb ) {
return -1;
} else if ( aa &gt; bb ) {
return 1;
} else {
return 0;
}
}
lb.sort(sortLabels);


//Begin HTML output
for (x in lb) {
if(x != &quot;peek&quot; &amp;&amp; x != &quot;forEach&quot;
&amp;&amp; lb[x].count &gt;= minCount){

//Calculate textSize
var textSize = min + Math.floor((lb[x].count/most) * range);
//Show counts?
if(showCount == 1) {
var count = &quot;(&quot; + lb[x].count + &quot;)&quot;;
}else{
var count = &quot;&quot;;
}
//Output
document.write(&quot;<span style='font-size:&quot; + textSize +
&quot;%'><a href='&quot; + lb[x].url + &quot;'>&quot; + lb[x].label +
count + &quot;</a></span> &quot; );
}

}
</script>
<b:include name='quickedit'/>
</div>
</b:includable>
</b:widget>

Thursday, March 05, 2009

Determining the age of a Linux installation.


Have you ever been curious of how old your current Linux installation is?

Three indirect ways of finding this out follow:

  1. Retrieve info from the filesystem (ext2-ext3 only).

    Provided your installation has an ext[23] filesystem,
    run as root:
    dumpe2fs -h <device> |grep "Filesystem created"
    Usually, at least the boot partition is of this type.

  2. Investigate the dates of files in the root directory.

    Run the command
    ls -lu /
    This will show you the access times of the contents of the root directory. In most cases directories like /bin should be unmodified since their creation during the system install process.

  3. Investigate system log files.

    All Linux systems keep log files. They place them in the same directory, usually in /var/log/. Pick a log, like syslog or wtmp, and look the first lines of the file. A date of the log entry will be available. Note though, that most distributions rotate and compress log files periodically. In this case, you need to look up this information in the oldest log archive. Also, old log archives may be automatically deleted, so finding the installation log messages is impossible in this case.
The age of my current Gentoo installation is 3 years 9 months:

dumpe2fs -h /dev/hda2|grep
"Filesystem created"
dumpe2fs 1.39 (29-May-2006)

Filesystem created: Thu Jun 9 16:09:37 2005


Saturday, November 01, 2008

Αφίσα με θέμα την Οδικη Ασφάλεια

Με αφορμή μια προκήρυξη διαγωνισμού αφίσας με θέμα την Οδική Ασφάλεια από το ΓΕΣ, έφτιαξα την παρακάτω αφίσα:



η οποία έτυχε ιδιαίτερα θερμής υποδοχής από την διοίκηση της μονάδας όπου υπηρετώ.

Η αφίσα σχεδιάστηκε έχοντας σαν πρωταρχικούς στόχους την οπτική απλότητα και την άμεση αποτύπωση του μηνύματός της στον αποδέκτη.

Η απλότητα της αφίσας καταδεικνύεται από τα τρία γραφικά στοιχεία που συνθέτουν το θέμα της: το κείμενο, ένα απλό σκίτσο αυτοκινήτου και ένα σήμα του Κ.Ο.Κ. Η απλότητα επιλέχθηκε θεωρώντας ότι όταν δεν υπάρχει τίποτα που να μπορεί να αφαιρεθεί, τότε έχει επιτευχθεί ένα άριστο αποτέλεσμα.

Ακολούθως, η αμεσότητα της επικοινωνίας με τον αποδέκτη επιτυγχάνεται μέσω του κειμένου με τον τονισμό των γραμμάτων «ΠΑΥΤΕ». Η προσταχτική αυτή λέξη, μια παράλλαξη του «πάψτε», τονίζεται στο θέμα της αφίσας και συνδέει μεταξύ τους πέντε σπουδαίους παράγοντες της οδικής ασφάλειας. Μέσω των γραμμάτων της λέξης αυτής, μπορούν με ευκολία να μεταφερθούν ή να διδαχθούν στον αποδέκτη, οι κανόνες αυτοί. Αντιστρόφως, από την λέξη «ΠΑΥΤΕ», μπορεί και ο αποδέκτης μόνος του, να τους αναζητήσει.

Συμπληρώνοντας τα προηγούμενα, σκοπίμως στο θέμα της αφίσας δεν υπάρχει κάτι που να προσδιορίζει και να σχετίζεται με το σύνθημα «ΠΑΥΤΕ». Αντίθετα αυτό αφήνεται στην φαντασία του αποδέκτη ο οποίος, με βάση το θέμα της αφίσας, μπορεί να συνδέσει το «ΠΑΥΤΕ» με τους δικούς του κανόνες όπως αυτοί ταιριάζουν σε κάθε πτυχή της καθημερινότητας. Για παράδειγμα:

  • ΠΑΥΤΕ (πάψτε) να τρέχετε
  • ΠΑΥΤΕ (πάψτε) να οδηγείτε απρόσεχτα
  • ΠΑΥΤΕ (πάψτε) να οδηγείτε υπό την επήρεια αλκοόλ
  • ΠΑΥΤΕ (πάψτε) ό,τι μπορεί να οδηγήσει σε ένα τροχαίο ατύχημα
και άλλα παρόμοια.

Η αφίσα είναι μεγέθους Α3, με 300 dpi ανάλυση και μπορείτε να την βρείτε, σε πλήρη ανάλυση, εδώ.

Thursday, May 01, 2008

Remove obsolete objects form a library archive using GNU make


The build system of an application I work on, stores each compilation object in a library archive (using GNU ar). With every project build, the contents of this archive are updated with new objects from the compilation. This is achieved by running ar -cru library.a $(OBJECTS)

Moreover, the archive needs also to be updated when files (and thus their objects) are removed from the project. The most convenient phase for this to happen is during the build.

The required archive updating, can be performed with the following part in the Makefile (consider this a template, since it cannot be used as is)

Makefile


obj: $(OBJECTS)
ifneq (,$(filter-out $(OBJECTS),$(wildcard $(OBJECT_DIR)*.o)))
$(warning "Deleting unused object files...")
ifeq (ar,$(firstword $(AR)))
-$(firstword $(AR)) -d $(LIBRARY) $(filter-out $(OBJECTS),$(wildcard $(OBJECT_DIR).o))
else
$(warning $(LIBRARY) may contain obsolete objects: $(filter-out $(OBJECTS),$(wildcard $(OBJECT_DIR)*.o)))
endif
rm -f $(filter-out $(OBJECTS),$(wildcard $(OBJECT_DIR)*.o))
rm -f $(filter-out $(OBJECTS:.o=.d),$(wildcard $(OBJECT_DIR)*.d))
endif


The above assumes that you are using GNU make and GNU ar. Also, dependencies are stored per source file, along with the objects and removed with them.

With the auto removal of objects, manual update or full rebuild of the archive is unnecessary. Also, headaches and hard to track errors, coming from doubly defined functions in the archive and obsolete code being used, are avoided.

Sunday, April 27, 2008

Θεσσαλονίκη - Καλαμάτα, αναζήτηση δρομολογιού ΟΣΕ από το www.ose.gr

Στη προσπάθεια μου να μετακινηθώ μέ σιδηρόδρομο από τη Θεσσαλονίκη στην Καλαμάτα, επισκέφτηκα τον ιστοτόπο του ΟΣΕ (www.ose.gr). Η ημερομηνία του ταξιδιού μου ήταν η 12 Μαΐου 2008, ενώ η αναζήτηση των δρομολογίων έγινε στις 20 Απριλίου.

Συνάντησα τα εξής προβλήματα:


  1. Βάζοντας για αφετηρία τη Θεσσαλονίκη, δεν υπάρχει προορισμός στην Πελοπόννησο.

  2. Βάζοντας για αφετηρία τον "ΣΣ. Καλαμάτας", στην αναζήτηση προορισμού και στο γράμμα Κ δεν υπάρχει ο σταθμός του Κιάτο. Αντίθετα, τον βρίσκω στο Π (για Πάτρα)

  3. Καθώς η εύρεση επιθυμητών δρομολογίων φαίνεται αδύνατη, δοκιμάζω το Θεσσαλονίκη -> Αθήνα. Και εκεί η αναζήτηση αποτυχαίνει. Με δοκιμές βρίσκω πως δεν υπάρχουν δρομολόγια καταχωρημένα για μετά της 10 Μαΐου.


Η σελίδα του ΟΣΕ ήταν αργή και μη εξυπηρετική. Επιπλέον δεν υπάρχουν πολλά χαρακτηριστικά που υπάρχουν στις αντίστοιχες υπηρεσίες άλλων μέσων μεταφοράς.

Αργότερα έμαθα πως για να πάει κανείς με τρένο από τη Θεσσαλονίκη στην Καλαμάτα, πρέπει πρώτα να πάει Αθήνα. Από εκεί, με τον προαστιακό να φτάσει Πάτρα και κατόπιν, αφού αλλάξει και πάλι τρένο, θα κατευθυνθεί για Καλαμάτα. Μάλλον τέτοιου είδους δρομολόγια δεν μπορεί να τα χειριστεί το πρόγραμμα αναζήτησης δρομολογίων του www.ose.gr. Η τηλεφωνική υπηρεσία εξυπηρέτησης πελατών ήταν σαφώς πιο εξυπηρετική.

Tuesday, April 22, 2008

Release cvsxxdiff v1.5

cvsxxdiff version 1.5 was released today.

In this release many significant changes are introduced, as you can see from the ChangeLog. At the moment, there are no plans for a new project version with major features.

Saturday, March 29, 2008

Αποστολή SMS από τη γραμμή εντολών

Από τα πρώτα προγράμματα που έγραψα σε C ήταν το mycosmos, ένα πρόγραμμα αποστολής SMS από τη γραμμή εντολών μέσω μιας web υπηρεσίας.

Όμως ο καιρός πέρασε, η web υπηρεσία άλλαξε και το mycosmos έπαψε να δουλεύει. Έτσι τον Δεκέμβριο του 2007 το ξαναέγραψα από την αρχή, δημιουργώντας αυτή τη φορά το climycosmos.

Η έκδοση 0.4 του climycosmos είναι αρκετά πλήρης. Είναι απολύτος αυτόνομη από εξωτερικές εξαρτήσεις και πλήρως παραμετροποιήσιμη για καθημερινή χρήση. Τις παράμετρους αποτελούν:
i) ο λογαριασμός χρήστη και οι κωδικοί εισόδου μέσω του οποίου θα αποσταλεί το μήνυμα
ii) ο ονομαστικός προσδιορισμός του παραλήπτη, μέσω ενός στοιχειώδους τηλεφωνικού ευρετηρίου
Τα παραπάνω αποτελόυν ιδιαίτερα σημαντικά γνωρίσματα, απαραίτητα κατά την γνώμη μου, που δίνουν μεγάλη ευχρηστία στην εφαρμογή.

Όλες οι παράμετροι του προγράμματος ορίζονται από τον χρήστη και αποθηκεύονται σε ένα αρχείο κειμένου με όνομα .climycosmos.ini Η μορφή του αρχείου είναι εξαιρετικά απλή και ξεκάθαρη:


[Default]
username: 69XXXXXXXX
password: XXXXXXXX

[account2]
username: 69XXXXXXXX
password: XXXXXXXX

[Phonebook]
contact1: 69XXXXXXXX
contact2: 69XXXXXXXX
contact3: 69XXXXXXXX

Μέσω αυτής της παραμετροποίησης καθίσταται δυνατή η αποστολή μυνημάτων από τη γραμμή εντολών με τις ελάχιστες δυνατές παραμέτρους, πχ:
climycosmos -t contact1 -m "Γεια σου". 
Ασφαλώς το σύνολο των παραμέτρων μπορούν να περάσουν και άμεσα από την γραμμή εντολών.

Το climycosmos διανέμεται δωρεάν, κάτω από την GPLv2 άδεια χρήσης.

Tuesday, March 25, 2008

Office decoration using origami

My interest in origami folding, found some usage as means of office decoration. Some nice examples are given in the photographs that follow.

Roses



Bird (flying parrot) over Chamaedorea


Birds hanging from the ceiling


This technique creates quite a good result and a pleasant environment. The existence of moving decorations that one can even play with, give joy. Also, the addition of colors in the working place is great!

Tuesday, March 11, 2008

Report compilation total time using GNU make


When working constantly on the same application, it is very useful to have an idea of the time it takes to compile. Having this information allows you to plan your work ahead, compare machines, developing environments, etc.

I have put together this Makefile, to print the total compilation time. It requires gmake and the UNIX shell utilities date, bc, echo and printf.


Makefile


# Time expressed as the seconds of the year. More portable than seconds since
# the epoch: `date +%s'
COMPILE_START_TIME := $(shell date +\(%j\*24\*60\*60+%H\*60\*60+%M\*60+%S\))
COMPILE_CURRENT_TIME = `date +\(%j\*24\*60\*60+%H\*60\*60+%M\*60+%S\)`


# Print the time difference between Tcurrent and Tstart. This function can be
# used after any target, as shown in the form: (see example)
# $(call print_timer,$(COMPILE_CURRENT_TIME),$(COMPILE_START_TIME))

# args: Tcurrent = $(1), Tstart = $(2)
define print_timer
@CT=$(1) && \
printf "Compilation total time: %.2d:%.2d (min:sec)\n" \
`echo "($$CT - $(2))/60" | bc` \
`echo "($$CT - $(2))%60" | bc`
endef


all: target

target:
@echo "Compiling for 2 seconds ..." && sleep 2 && echo Done
$(call print_timer,$(COMPILE_CURRENT_TIME),$(COMPILE_START_TIME))


Using this Makefile and running make, produces the following output:


Compiling for 2 seconds ...
Done
Compilation total time: 00:02 (min:sec)