Gbelbe's geeky notepad
Gaet's random stuff on technology, Linux, and other
Tuesday, February 07, 2012
Quitter Flickr pour Picasa
voici la méthode pour y arriver
http://nrek.co/technology/how-to-abandon-flickr-for-picasa/
Monday, January 10, 2011
Coding with CodeIgniter
1) Everything should be done inside the "Application" folder
2) In the "Config" folder are all the files corresponding to setup, it's possible to add some with the same format.
$config['tablo1']['sous-tablo1'] = "lambda"
(the array should be "$config")
=> important: if you want some config files to be loaded directly in your app:
in autoload.php file, locate the config part and specify which file should be loaded at application startup.
(it's divided in core classes, helpers, l
Only files needed often should be loaded here. Otherwise we can always specify it once we will need it with :
$this->load->config('analytics'); (for example)
3) Routes
inside the config folder: routes are settings for default URLs:
for example, if we want the default homepage to display "analytics" controller (file analytics.php inside controllers folder)
we modify the line :
$route['default_controller'] = "welcome"; to "analytics".
4) Controllers
Each app needs at least a controller to work.
(Views are where templates are set, models are where business-database access library can be written)
A controller match the URL: filename and class should match.
-> the controller file is written in lowcase: analytics
-> the class inside the file has the same name with a Maj : Analytics
this class should extend the "Controller" class.
Note: if the class has a constructor method (method with the same name as the class), it should always call the parent controller class. (parent::Controller(); )
this class should implement the index function that will call display.
URL matching: url/class/function/parameter
To print directly a result: inside the "index()" function, place an echo or a print.
To redirect it to a view: $this->load->view('name_of_the_view', $data_array);
to transmit variables to the view, it should be set into an array:
$data_array['color']="blue";
$data_array['todo']=array('biloute','machin2','truc3');
arrays and objects can also be transmitted...
5) Views
Views can take the name they want and can be organized into folders
To use variables transmitted by the data array from the controller, place php short tags like =$color?>
6) working with DB
- make sure database classe is loaded in the autoload settings or directly in the controller's constructor class.
- make sure the database setting file is ok
SELECT to select a table (this will put all the table in an array
data_array['requete'] = $this->db->get('table');
with where:
$this->db->where('field-to-query', 'where-variable')
INSERT
$this->db->insert('comments', $_POST);
to display result in the view file: foreach($requete->result() as $row)
to count number of results: $requete->num_rows();
7) working with URL
check that the url helper is loaded either in the autoload file (settings) or in the controller's constructor $this->load->helper('url');
Display part of the URL
$this->uri->segment->3; get the thrid segment of the uri (variable)
Create a link
inside the view file, we can use a anchor function to create a link.
anchor('analytics/report', 'link name')
this link will link to the function "report" in the controller analytics.
Redirect
redirect('controller_name/controller_function')
8) working with forms
check that the form helper is loaded
inside the View file, we can use functions to generate forms tags:
form_open('analytics/destination')
form_hidden('name', $this->uri->segment('3'))
9) Models
Models are PHP classes that are designed to work with information in your database.
structure of a model class:
class Model_name extends Model {
function Model_name()
{
parent::Model();
}
}
Models can then be used in any controller, but should be loaded in the controller's constructor first.
$this->load->model('indicators_model');
10) Adding your own Library
To add your own library, we can place library classes inside Application/libary
Library file name should start with an uppercase, and the class name should be the same as the file name.
Important: if you want to use any data from a config file or any other file,
rather than using "$this->", you should access it with
$CI =& get_instance();
$variable = $CI->config->item('item-in-my-config-file');
(note it should be inside the constructor or any other method)
11) Unit Tests
check that the unit_test library is loaded in the constructor class
$this->load->library('unit_test');
then do the tests as follows:
echo $this->unit->run($data, 'is_array', 'est-ce un tablo');
Library used to enable TDD : Toast (see http://jensroland.com/projects/test/toast/)
test files should be added into /application/controller/test directory
To run all the tests in a test class, simply point your browser to the class name:
http://www.example.com/test/my_test_class
To run an individual test, point your browser to the test function, WITHOUT the 'test_' prefix:
http://www.example.com/test/my_test_class/some_action
to run all the tests classes in the /test/ folder at once, point your browser to the Toast_all controller:
http://www.example.com/test/Toast_all
Attetion: check that Toast_all is in upper case
Note: toast can be used with libraries and models
and they should be loaded first in the test's controller constructor
for ex: $this->load->model('indicators_model');
then properties or methods of the model class can be used inside tests:
$this->indicators_model->get_last_ten_entries();
Wednesday, June 16, 2010
Tomcat - What it is and how to install it on Linux
Apache is a webserver : it is used to serve static files (html for ex) to internet client.
If we want to develop a dynamic website we need to install a software that can interpret a dynamic (server side) language.
Here is the role of Tomcat, for Java. (similarly, we would need to install a PHP module into Apache so that the server could be able to understand php files)
http://www.coderanch.com/t/85639/Tomcat/Difference-between-Tomcat-Apache-Web
2) Installing tomcat on linux:
http://www.howtogeek.com/howto/linux/installing-tomcat-6-on-ubuntu/
Monday, January 25, 2010
Installer et parametrer SVN pour developper une appli Web
Voici mes anciennes notes sur l'installation et config de SVN pour le web. L'idee est de creer un repository qui actualise a chaque modification un serveur web, et permet ainsi d'avoir les avantages de SVN sans avoir a faire de "commit" a chaque petite modification.
1)-------SVN Install:
==============================
(apache2 and mod_dav needs to be already installed)
--> First need to install SVN
# yum install svn ( or check on the web for how to get subversion)
# yum install mod_dav_svn ( and mod_dav if mod_dav not yet installed)
--> configure mod_dav to interact with svn
open subversion.conf (in Fedora, it is located at /etc/httpd/conf.d/subversion.
Add the following :
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /var/www/svn/users/passwords
Require valid-user
DAV svn
SVNParentPath /usr/local/svn
This will link the web directory /svn/repos ( http://host_address/svn/repos) to the
SVN directory located at the following path: /var/www/svn/repos
The AUTH lines, tells apache to launch an authenticate box to prevent anybody from
accessing http://host_address/svn/repos
it will look for the users and passwords in the file "passwords"
To prepare this file, CD to /var/www/svn/users/
# htpasswd -cm passwords gbelbe (htpassword file_name user_name)
(then to add new accounts don't forget to do htpasswd -m and not -cm)
==============================
Subversion software should be installed and working
==============================
2)----SVN Setup
==============================
Note on repositories organization:
------------------------------
We need to create 3 distinct SVN Repos to make it easier to
upgrade from Dev server to test server and production server.
1 for Development[gdm], 1 for Documentation[gdm_doc], 1 for test[gdm_test]
When we want to upgrade our test or production server, we will only
update the application data (gdm repository) to the web serverm,
We don't need to update test and doc repository (and shouldn't for security purposes)
so it's better practice to keep them in distinct repositories.
Note: as for the SQL data, it's better to keep it included into the dev repository,
as we need to record all change in db structure with DDL scripts at the same "time"
(the same revision nr or version) as we make modification on the system, it will help
to keep track of the database modifications at each step of the software version.
SVN Repositories placed at /var/www/svn/repos
=================
1) first repos for system development: gdm
we change working directory to /var/www/svn/repos
# cd /var/www/svn/repos
we create a svn repository
# svnadmin create gdm
(to remove a repository, only delete it) # rm -Rf gdm
we ensure that the owner and group of this repository is apache:
ls -la
chown -Rf apache.apache gdm
we create a repository structure:
# mkdir /tmp/gdm
# mkdir /tmp/gdm/trunk
# mkdir /tmp/gdm/branches
# mkdir /tmp/gdm/tags
we import this structure:
# svn import /tmp/gdm http://localhost/svn/repos/gdm
===================
The SVN Directory is ready to use, we need to prepare working copies
===================
then create a working directory inside the webserver served directory
in our setup, apache is configured to serve files under /var/www/html
on se positionne ds le rep html #
# cd /var/www/html
on checkout le repository gdm
# svn checkout file:///var/www/svn/repos/gdm/
(this will checkout only the trunk to a new folder named "gdm")
be sure to change the ownership rights to apache user and group
chown -Rf apache.apache gdm
=====================
1) automatic update of website checkout
Note : only needs to be done if the repository is a development server.
If the svn repository is for a Development website,
we can automatically update the website Checkout each time
anyone commit a file. (that way the developpers can view the result
of their work on the local website)
this is done through a post-commit script:
cd to the svn repository:
cd /var/www/svn/repos/
cd hooks
copy the file post-commit.tpl to post-commit
edit the file post-commit with vi:
add the following lines after the line #!/bin/sh
(note: /var/www/html/gdm is the dir where gdm repository will be served by apache)
cd /var/www/html/gdm
/usr/bin/svn up --username apache --password apache
* make sure the post-commit file is owned by apache,
* give the file execution rights
* make sure the directory in the web server is created /var/www/html/gdm
chmod 0777 post-commit
chown apache.apache post-commit
Test: try to modify a file in this repository from your computer and commit,
check if the file is updated on the webserver.
==> check the ownership of the files (it should be apache.apache)
Friday, May 15, 2009
Programmer un microcontrolleur avec linux (premiere etape, branchements)
La semaine derniere je suis tombe sur des blogs decrivant l'interet des microcontrolleurs:
Les microcontrolleurs sont la base de l'electronique embarquee, et sont present partout (televiseur, voiture, appareils photo numeriques, certains telephones portables). Il s'agit simplement d'un ordinateur miniaturise comportant tous les elements principaux sur un seul circuit imprime: processeur, ROM, Memoire flash, et ports IO. Le tout a un prix et une consommation electrique tres faible.
Leur puissance n'est pas encore tres elevee mais suffisante pour faire tourner un programme unique.
>> Une explication interressante
Depuis 2-3 ans, les microcontrolleurs ont bien evolues, et les logiciels pour les programmer aussi. La gamme des AVR, est open-source et permet a tout le monde de les programmer. De nombreux projets a la frontiere entre l'electonique et l'informatique ont ete devleloppes par des amateurs, realisation de robots, lecteurs mp3...
La serie AVR de la marque ATMEL sont programmables en open-source. Apres avoir trouve une test-board sur taobao.com, j'ai donc commence a m'interresse au sujet.
Mes interets personels sont les suivants:
--> Permet de s'"amuser" un peu en assembleur
--> Permet mieux comprendre le fonctionnement bas niveau des ordinateurs (un microcontrolleur c'est un mini pc integre dans une puce minuscule). Vue la faible puissance des composants, la programmation se fait au niveau le plus bas.
--> Tester les potentialites du bidule. Ca ne coute rien, et ca a l'air plutot puissant, il y a surement quelque chose a faire avec??
La plaque de developpement que j'ai recupere sur le net s'appelle AVR Butterfly:
La premiere etape a ete de reperer le port Serie et de monter les branchements avec un cable serie (style cable imprimante).
Saturday, May 09, 2009
Kannel setting up a SMSC for sending / receiving SMSs from an application
Most of the informations that helped me came from the following websites:
http://swik.net/User:marc/Chipmunk+Ninja+Technical+Articles/Setting+up%2...
and, a very good explanation about how all the SMS and mobile stuff is working:
http://www.developershome.com/
http://www.linuxquestions.org/questions/linux-networking-3/kannel-incomi...
>> notes:
Start the bearerbox and smsbox with verbose :
then go to the following url to send sms:
http://127.0.0.1:14013/cgi-bin/sendsms?username=My_User&password=My_Pass...
Check the resulting page for success and look at the bearerbox and smsbox verbose message while sending.
To get the status of the bearerbox:
http://localhost:14000/
Huawei eg162 in ubuntu, and AT commands
On the last post, I have been able to connect linux with the Chinese HuaWei eg162 gprs modem, but i still had the following problems:
The modem only worked when I booted the computer while it was plugged in.
Impossible to make it work while hotplugged.
I couldn't connect directly send AT commands through it.
> after spending some time on the web and trying some drivers from vodafone
https://forge.betavine.net/frs/?group_id=12&release_id=243 (should be working for e220 and others, but no success for me).
I came across to this blog post, which was the solution:
http://www.mohdshakir.net/scripts/bash/huawei-e220-dialer
Basically, it states that the problems comes from the uhci module (universal host controller interface) which is in charge of recognizing USB devices.
just type these two lines, to reload the uhci module and start it over again
sudo modprobe -r uhci_hcd
sudo modprobe uhci_hcd
Connecting to the web through a GPRS modem in linux
The modem I tested is a HuaWei, eg169g, sold in China as a 2.5g modem. The method should work with other models of the same brand.
1) right after plugin the modem, check that it is well recognized by linux,
dmesg | tail should give you the proper port and success/failure message telling you that a modem has been added.
(it should be something like : /dev/ttyUSB0 or /dev/ttyACM0
Note that with some older kernels (for ex. CentOS 5.2 is still 2.6.18) it can be recognized as a CDrom or a memory stick/
If so, then you have to look on the web to install a program called usb-modeswitch, that will enable to recognize your modem as a modem.
2) install wvdial, the ppp tool for wireless modems.
to configure the modem, type
# wvdialconf /etc/wvdial.conf
if it doesn't work, saying that your modem was not recognized, you can try again after rebooting your PC without unplugging the modem.
3) if this step was ok, edit the wvdial.conf file and modify username and password value. (in China, you can add whatever value ) it shouldn't be necessary to modify any other value.
the value after "Phone" is something like *99***1# , depending of your mobile operator. (this if for china mobile). It shouldn't be necessary to modify it.
4) try it:
$ wvdial this command launch the modem, which should be printing your IP address and the ones of your DNS servers.
if it doesn't show any errors but looks like the script is hanging, it shows that it's workign.
you can check it by looking if a new ppp port is open with the following command:
ifconfig
5) if ifconfig is showing an open and workgin ppp port, but you still cannot connect with it, it may come from a bad routing table or DNS records.
you can edit your default dns with this file : /etc/resolv.conf
and check your computer's route with the route command
route -n
if you see some default routes for another port than ppp, or wrong route for ppp port (for ex eth0) you can delete them with the following command.
route del (see the man for more details on this command).
After deleting the rules, retry wvdial, and it should work.
Modifying the locale environment in your computer
Here are the commands you should use to modify your environment for a default language settings.
the command : $ locale
lists your current language environment.
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
These are all environment variables defined when your computer starts. You can modify them temporarily (until the next reboot) with the export command.
Instead of having to export all of them, you can just use the command
export LC_ALL="zh_CN.utf8" for ex. , that will modify all of them at once
(check it by typing locale, and by using a command such as "man", it should display the prompt in the new language.)
If you want to conserve this locale the next time you reboot, you also have to edit a configuration file in /etc. It should be either /etc/default/locale or /etc/environment depending on your system
Upload pictures to Flickr from command line
download flickr_upload from here:
http://linux.softpedia.com/get/Programming/Libraries/Flickr-Upload-21349.shtml
then wget, untar it and follow the README instructions. You may have to install one or two dependancies.
Then that's pretty easy to use, read the man first (man flickr_upload) then you can easily upload a directory with the following command:
flickr_upload --tag='"HuiHangGuDao" "Route du the Anhui HangZhou"' --friend 1 *
[upload all pictures inside this directory, and set 2 tags + only enable friends to view pics]
others options are also available from the man.
Gnokii (part 2)
Process to connect nokia 3110 to a linux server to setup a smsd and receive sms to a mysql database.
------------------------------------------------------------
1) get new version of gnokii (latest source, not available through yum or apt)
2) install libusb from yum or apt to be able to compile with usb cable support (dku2 and dke2 for nokia)
3) you need to install libmysqlclient and libmysql-devel from yum or apt if you want to use smsd with mysql
4) ./configure --enable-libusb
if an error appear (in centos-5.2) asking you about XML::parser library missing, install it through "yum install perl-XML-Parser"
5) make
6) try "make install" as root. If library problem, add a link as follows and retry
ln -s /usr/local/lib/libgnokii.so.4 /usr/lib
7) copy the udev rule inside source directory to /etc/udev/rules.d and check that it is working by connecting your phone to the usb cable
lsusb, to get the id, then
lsusb -d id:
the ls to the following path:
$ ls -l /dev/bus/usb/yourBUSnumber/yourDeviceNumber
crw-rw-r-- 1 root plugdev 189, 260 2008-06-08 17:42 /dev/bus/usb/003/005
if that gives you a file owned by user plugdev, that should be ok.
8) create a db and tables witht the sql file available inside the source directory.
try the server with the following command:
smsd -m mysql -u yourdbusername -p yourdbpass -c yourdbhost -b theinboxmemorytype (IN or ME or SM according to mobile type)
checks a few seconds that the server start and check if the tables get filled by the sms retrieved from the mobile.
9) list files inside the mobile ( begining of the process to retrieve mms)
gnokii --getfilelist 'A:\*' for internal memory
gnokii --getfilelist 'B:\*' for external sdcard memory
---------------------
useful sources:
mms support : http://archives.free.net.ph/message/20090310.113029.cb3525ce.pl.html
gnokii wiki: http://wiki.gnokii.org/index.php/DKU2
Sending SMS with Linux and your mobile phone (the gnokii way)
I came across different resources on the web, the most advance SMS/WAP server being Kannel, but it seems that it doesn't accept connections frrom USB cables.
I found 2 softwares able to handle this : gnokii and gammu (gammu is a branch splitted from gnokii).
Here is what i did :
1) install gnokii : with apt or yum (but the versions installed is far from the latest so if it's not compatible with your phone, you may have to hand-install the latest one.
2) check the port where your mobile has been connected:
dmesg | tail (right after having connected your phone to usb)
check which port is returned:
for me, by seeing the following line I assume that the port is ttyACM0
cdc_acm 4-2:1.1: ttyACM0: USB ACM device
to be verify that this port is the right one, you can ls on dev directory to check if it is listed:
ls /dev/ttyAC* for exemple listed my port.
3) when you get the right port, you can start configuring gnokii
edit the gnokiirc vim /etc/gnokiirc
the main settings to change are:
port = /dev/ttyACM0
model = 3110 (for my mobile phone)
connection = dku2libusb (or AT if no other connection is available)
In fact AT is a basic communication protocol for most mobile phones, it will work to send sms and retrieve phone info, but you barely can do anything else with it. The best is to find if any other mean to connect to your phone using proprietary driver exists.
good resources can be found on the nokia website to see which cable does your mobile phone uses:
http://europe.nokia.com/A4678148
mine uses dke-2 which was not supported directly by gnokii and gammu, but trial and error made it work with dku2libusb for gnokii.
other useful resources (for my phone)
GNOKII
www.gnokii.org
http://www.nabble.com/Nokia-3110c-td19382514.html#a19386835
http://www.nabble.com/Gnokii-0.6.27-Cannot-Identify-Nokia-3110C-td205801...
Tune Apache MPM for better performance
After a few checks using top and free commands, it was clear that apache was step by step eating all the server memory until the swap was so high that it brought the server unresponsive.
The usefull command that helped me a lot was:
watch free -m
leaving an auto-refreshing window showing the memory being used.
the top command was also very useful to track the processes eating the memory, using the key ">" to switch from processor usage to RAM usage listing.
After being sure that the server crash was due to apache, I finally came by a blog dealing with the tuning of MPM module in apache configuration file. Tuning this enables your website to be optimised to handle simultaneous connections but can also leaves many processes consuming a lot of RAM...
here are two intersting pages, one for tuning apache to drupal
http://drupal.org/node/215516
How to change key binding in fluxbox window manager
Today i came into a problem when I had to work on a power point presentation I didn't finished at the office.
After installing openoffice, I realized that no action was bound to the printscreen button on my keyboard.
After working on some tutorials here is the summary of the method i came with:
First look out for the "name" of the key you want to bind, use a program called "xev" (just type xev)
then press the key you want to bind, and look for how it's called:
KeyPress event, serial 29, synthetic NO, window 0x2400001,
root 0x6a, subw 0x0, time 325551491, (303,246), root:(360,324),
state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
Here is the result when I pressed Alt key, you can see the exact name "Alt_L", in parenthesis by looking inside the text.
then process to bind your key with the action you want:
>> open the fluxbox setting, in your home folder look out for the ".fluxbox" directory
>> open the "keys" file
>> The key we want to bind is called "Print" so here is the line I have to add in the Keys file:
None Print :ExecCommand scrot -d 1 screensnapshot_"$(date)".png
"None" means no modificator (shift or any other)
Print is the key name i want to bind
":ExecCommand" is the tag to place before adding a command
"scrot -d 1 ..." is the command to print screen
To make it work be sure that scrot has been installed on your system or apt-get for it. (apt-get install scrot)
restart fluxbox
a new png file should appear in your home folder every time you press on the pintscreen key :-)
Disks partitions for a linux 1U production server
I have been looking on the web for a little bit of time now before to decide how to setup our new production server. Here is a summary of what i've read in forums and other websites.
Partitions is a very hot discussion and it seems that there are not very clear answers.
Partitioning is good for the following reasons:
1) segregation of data
it's always good to keep data and OS programs separated, to be able to quickly reinstall the OS without affecting all data.
Data means mainly /home and /var directories
> It is tempting to do a partition for /etc, but this won't work as boot scrits are found in /etc and need to be accessible from the same partition as root to be able to boot the OS.
2) quick recovery from crash
the time needed to do a disk recovery can be very long and depend on the size of the partition. Having only one partition can make the recovery process very long.
3) keeping the system from crashing due to a full disk
a system with a full root (/) partition will crash
spliting self-growing partitions such as /var and /home will keep it from crashing due to a full disk
4) speed
data on the external part of a Hard Disk are faster to access because external sectors have a bigger circumference than inner sectors.
When setting up partitions it is hence better to begin with the one needing faster disk access, so that they will be located on the external part of the disk.
Here is the scheme i thought for our 1U LAMP server:
/boot
/swap
/
/var
/var/www
/var/mysql
/var/log
/home
larger partitions will be /var/www and /var/mysql
/var/log has been setup to keep in control the size of log files so that they don't fill up the root partition.
Auto resizing a large group of Pictures on linux
mogrify -resize 35% *.jpg &
this command from Image-Magick will easily resize all of the pictures in a specific directory. Note: this will affect resize all pictures in your current directory (but won't save the originals!).
If you wan to resize and send them in another directory you can do as follows:
mkdir thumb
# creates a dir to put your resized pics
ls *.jpg | xargs mogrify -resize 35% -path thumb
# looks for all jpg pictures in your current dir, then resize them to 35% and send the result in you newly created "thumb" dir.
Configure Apache url-rewrite module for clean urls
http:/www.yourwebsite.com/article/add/story
(to be compared to www.yourwebsite.com?q=article...)
step 1: check if mod_rewrite is activated
The command "apachectl -M" or "apache2ctl -M" (depending on linux distro) will list all activated modules.
step 2: activate the module
On ubuntu distro, if the module is not activated, just cd to the /etc/apache2/mods-enabled directory and add a link to the "rewrite.load" file that should be available in your mods-available directory.
ln -s ../mods-available/rewrite.load rewrite.load then reload apache and check that your module is activated (step1)
step 3: inside sites-available dir (for ubuntu), add a Directory directive with the AllowOverride variable set to All.
Options Indexes FollowSymLinks MultiViews
------> AllowOverride All
Order allow,deny
allow from all
this should be ok, url rewrite scripts should work within the directory specified in the directive.
chmoding and chowning files inside hidden dirs
chmod -Rf or chown -Rf
won't have any effect for dotted (hiddend) directories. In practice, this is a good thing, as it avoids changing bu mistake permissions in setting directories.
In some case anyway you wish to recursively modify the permissions of many subdirectories, including hidden ones.
then you can always use the useful "find" command for something such as:
find . -exec chmod 755 * {} \;
find . is looking for anything inside your dir, then use the -exec modifier to apply the command you wish to each of the files returned by find.
Connecter un PC(linux) et un Mac avec NFS
Supposons que le PC sous linux avec les fichiers en partage est: 10.0.0.1
et le Mac, qui se connecte au PC est a l'addresse 10.0.0.5
1) installer nfs sur le PC
2) modifier le fichier /etc/exports comme suit:
/home/gbelbe/documents 10.0.0.5(rw,insecure,sync)
(j'exporte le dossier /home/gbelbe/documents uniquement pour la machine 10.0.0.5)
note: sans l'option insecure, la connection ne se fait pas sur ma version de macos.
3) une fois le fichier export modifie,
exportfs -a
4) A partir du Mac, ouvrir le finder puis menu "Go", et "Connect to server"
ensuite entrer la l'addresse nfs:
nfs://10.0.0.1/home/gbelbe/documents
Thursday, March 12, 2009
Classification and navigation on the web, tagging with facets
Currently preparing the second version of our website, we have come up with an uneasy problem: Categorization of our content. This is a common problem but I felt that after doing 2 consecutive focus groups with mothers, classification of the information of interest to them was quite a difficult and broad subject. One quick solution was to add-up a few cagegories and modify them later, let them tag and check from time to time which tags come the most often and rebuild the categories afterward.
After a few not-so-successful meetings, we came up with 2 successful website where we got a positive experience with categorization and navigation (it's clearly related). Facebook does a fairly good job at asking a good amount of data from users, data that can come both from pre-defined categories and by free tags (textboxes). And Taobao.com doing a wonderful job at presenting the information through very easy-to-browse categories.
From this point onward, I did a bit of research and came up with an interesting model, which may look pretty obvious at first but which is nevertheless very interesting.
This article is well worth reading to understand the evolution of classification models following the appartion of the web.
A) Traditional classification model (ontology or taxonomy) is in most cases inadapted to large data sets common from the web. They are difficult to maintain and to make evolve and are not very easy to navigate either for users (we are all different and don't always think of the same category for the same item). On the other hand, usability testing shows the obvious fact that users tend to prefer organized and structured content. (nobody likes to feel "lost").
B) The (free) tagging model is the action of letting users assign “keywords” to content without any constraint. It has become very popular for articles in blogs, links in delicious, or tagging pictures in Flickr… It has come at a time when the top-down approach of categoy models was seens as unadapted to the web, disorganized in structure. Tagging, on the contrary is a bottom-up approach which let end-users categorize the content. The model is also very evolutive. As we know with "tag-clouds" it shows the current situation of the content inside a website.
But Tagging, even though it solves many problem of traditional taxonomy (static categories defined a-priori) leads to new problems: in different research papers, UI (User Interface) experts shows that Tags are a bad navigation tool, as they lack "context" and logical relationship. Tag-clouds are a nice tool to view the current situation of a websites' content, but they are very inefficient to navigate as keywords are often totally unrelated and a word without context can have many different meanings. The lack of context and the synonyms homonyms makes it also not very practical to use for users.
To enhance the usefullness of tags for end-users some website have developped tag-clusturing models. (flickr is creating groups of pictures of similar interests by grouping pictures that have some common tags in common.) while this concept is an improvement to user experience, tests shows that users still prefer ordred (classified) data rather that simple grouping of common terms.
D) Faceted classification is another not-so-new classification concept that is gaining some interest in the web, especially associated with the Tagging concept. In short the concept is based on the idea that any item has a set of orthogonal (meaning not related) properties or dimensions, and that we can classify items by giving each of them a value on these properties. For example, if we want to classify mobile phones, we can define a few dimensions (facets) as "price", "brand", "color"... [note that to be a true facet, one item cannot have two values in the same dimension - it cannot be a nokia & a motorola ].
From this basic concept, follows a powerful organisation and navigation system, very adapted to the web. At the difference of traditional taxonomies, multiple facets enable many starting point in the browsing or searching experience. (you can start by brand or by price...) and add a context to the tags, which make them more meaninful for users.
This concept is very well explained in the following presentation: