Failing to get users to voluntarily adopt the Unity desktop manager, Ubuntu is attempting to force adoption by removing the ability to revert to Ubuntu classic interface. Through blogs and forums, the verdict is the same: Unity is a failure. Why is a major Linux distribution like Ubuntu adopting Microsoft tactics to force people into adopting new GUI’s that bring nothing but discontent? Why not solving other usability issues, investing time in improving interoperability with Windows so as to attract new users? Why not addressing other problems that prevent users from moving to Linux? Example: Make sharing a file via SAMBA easier with the authentication integrated with Linux instead of having to play with configuration files.
Archive for the ‘Computing’ Category
Ubuntu 11.10: I know what you need better than you do
Sunday, October 23rd, 2011Second virtual host under apache 2
Friday, September 30th, 2011After messing around with apache 2 configuration files, I finally finally figured out how to add a virtual host sharing the same IP address and port 80. The confusing part is that multiple config files are involved that might step into each other. The key to understand how these different configuration files work together is to be aware of the following statements in apache2.conf:
# Include all the user configurations: Include httpd.conf # Include ports listing Include ports.conf # Include generic snippets of statements Include conf.d/ # Include the virtual host configurations: Include sites-enabled/
Initially the config files are as follows:
- httpd.conf is essentially empty at installation time
- ports.conf contains some default configuration that applies to the default site
- conf.d is a folder containing module specific configuration files
- sites-enabled is a folder containing virtual host specific configuration files
- What you put into these configuration files is more a matter of convention than necessity to get everything working.
- There is another folder called sites-available that contain the configuration files for wannabe virtual hosts. One of these configuration files is default.
- To create a new virtual host
- Copy default into let’s say mynewsite.
- Edit mynewsite and modify modify the folder entries to point to the new site and a line containing “ServerName mynewsite” and save.
- Edit default and add the following lines:
ServerName default
ServerAlias localhost
- Copy mynewsite into sites-enabled folder. However, to do that, use “a2ensite mynewsite” (which I assume means apache 2 enable site mynewsite). Behind the scenes, this command has for effect to copy virtual host specific files from sites-available folder to sites-enabled folder. You can disable the new web site by issuing “a2dissite mynewsite”. (apache 2 disable site, I presume).
A brief manual on how to use ddrescue
Monday, September 12th, 2011Download and burn Ubuntu rescue remix
List the available devices, partitions and file systems
sudo fdisk –l
Change current folder to /mnt. Note that you could mount anywhere but traditionally, mounts are done under this folder.
cd /mnt
Create a subfolder under which the USB drive will be mounted. This USB drive will be used to save the hard disk image. Note that you should use sudo in order to issue the commands as admin.
sudo mkdir folder1
Mount the USB drive on the newly created folder. Use the correct file system (ntfs or vfat for FAT32). Get the correct partition name and number from fdisk -l
mount -t ntfs /dev/sdxn /mnt/folder1
Start ddrescue to make an image of the partition into a file called disk.img (you can select any other file name). logfile is used to log the progress. Again, it can be any file name. This will do a first pass on the partition skipping the failed sectors.
ddrescue /dev/sdxn /mnt/folder1/disk.img logfile
Reissue the same command specifying -r 3 to retry the failed sectors three times. You can select a different number of retries.
ddrescue -r 3 /dev/sdxn /mnt/folder1/disk.img logfile
At this point you can reissue the previous command varying the number of retries to attempt further recovery of sectors that have failed so far.
To access the recovered data, you can either mount the image on a Linux system or copy the disk image into a new hard drive. To mount the image, first create a new mount point (an empty folder under /mnt)
sudo mkdir /mnt/folder2
Mount the image using the loop device that makes the disk image appears as a physical disk
mount -o loop –t ntfs /mnt/folder/disk.img /mnt/folder2
The data can now be accessed by getting into /mnt/folder2 either through the command line or the GUI
To copy the data into a new partition, issue the following command
dd if=/mnt/folder1/disk.img of=/dev/sdxn
where /dev/sdxn refers to the target partition on the new hard drive. Note that this partition should have been created with the exact same size as the original partition. A greater partition than the original would be wasting disk space. Once this is done you can boot Windows and run chkdsk to fix any file system error.
Warning: Issuing dd command with the wrong parameters can destroy your data. Make sure you specify the correct target device after /of=.
Error 1320 or 1317. The specified path is too long during AspenTech installation
Saturday, January 22nd, 2011See http://support.spss.com/student/Troubleshooting/stuResSearchDetail.asp?ID=73598. Although the explanations are meant for another software, it solved the problem and allowed the installer to proceed.
Ubuntu 10.04 – Old bugs back and new useless “features”
Wednesday, May 19th, 2010I recently upgraded from a stable Ubuntu 9.10 to the newly released 10.04. In my early adoption of Ubuntu 9.10, I faced problems with my Wireless USB dongle (LightWave LW-UWNC) that were subsequently fixed through patches that made my Wireless interface reliable. Upon my automated upgrade to Ubuntu 10.10, the old illness was back again. No way to get the wireless working again. Failing to find any solution to the problem, I finally decided to revert back to version 9.10 (at the cost of several hours of work in order to reinstall back all needed software).
Now, as a developer, I am puzzled by the kind of methodology the Ubuntu team is following to keep track of bugs and their fixes. How is it possible to fix a bug and get it back again in an “upgrade”? Moreover, I still do not comprehend the purpose of moving the minimize, maximize and close window buttons to the left and smaller than before. What’s the added value? This is the kind of decisions that may deter potential users from adopting Linux. People want a system that works out of the box and bug free! New features and eye candies although seemingly appealing do not add much value. Those who are after these changes may stay on Windows or Mac and pay the price. I do not believe Linux should strive to beat Microsoft on its own ground. Linux should shoot for stability and providing bug free solid software with good support for all drivers. Offering a good free alternative to Windows away from the consumer driven market is the way to go for a wider adoption of Linux by the average user.
The Dilemma of Constraint Programming
Monday, April 26th, 2010Constraint Programming is yet another application of the concept of Declarative Programming which is about describing a problem rather than devising an algorithm to solve it. Other examples of Declarative Programming include SQL, Linear Programming, HTML, XAML, SVG, and Regular Expressions. The idea is to let the user concentrate on formulating the problem rather than wasting a lot of efforts solving it. It opens the door for non-technical people to exploit the relatively cheap computing resources to solve real life problems that in the past would have required the cooperation of a team of subject experts and IT specialists to solve.
CP follows the same philosophy as LP but allows for a much greater expressive power. This means that problems that would be relatively difficult and tedious to formulate using LP are relatively straightforward when using CP. Example: Solving classic puzzles such as Sudoku or Zebra is relatively easy in CP but would require a complex Mixed Integer Programming (MIP) formulation, MIP being an extension of LP where some or all variables are assumed to be integers.
So, CP seems to be extremely exciting, until you tackle relatively simple problems such as Kuromasu and have a hard time formulating them in CP, for the simple reason that the required built-in constraints that would concisely describe the problem do not exist within any provided CP toolkit. As such you are left with two options:
- Formulate the problem using built-in constraints which proves to be quite convoluted loosing the theoretical ease of formulation, and inefficient because of the hundreds of constraints that have to be generated and ultimately managed by the solver at run time which may result in prohibitively long run times.
- Create user-defined constraints specifically tailored to the problem at hand: This requires understanding the internals of a specific solver such as Choco and implementing the new constraint using imperative programming, which in my opinion completely defeats the purpose of using CP as the declarative paradigm is mostly lost.
One might argue that it is still worth using CP as we may benefit from solvers that can transparently exploit prevalent multi-core CPU architectures. That argument might lose its strength as powerful API’s such as Java 7 Fork-Join and .Net Framework 4.0 Task Parallel Library (TPL) completely shield developers from the complexities of multithreaded programming.
Another aspect that hurts CP is the lack of a standard language and set of constraints so as to allow for portability and decoupling the API/Language from the solver. In LP, standard file formats such .MPS, and .LP allows feeding a problem to different solvers both proprietary and open-source. Moreover, high level languages such as AIMMS and AMPL can be used to model complex problems and use various solvers API’s to solve them. CP is badly in need of such mechanisms if it is to become as widely used as LP. Maybe, high level languages such as AIMMS and AMPL would gain into targeting CP solvers for particular classes of problems that are not well adapted to LP.
This article does not intend to be a CP bashing session. In fact, it stems from some good and bad experiences I had using CP and LP as I was so attracted by the Declarative Programming paradigm that I oversaw the obvious necessity to use the right tool for the right problem. For example, I tried to use LP to solve a scheduling problem and failed miserably as the solver was doing a completely blind search on a large computer generated MIP model (as no heuristics could be provided to guide the search). The other bad experience I had was solving Kuromasu using Choco CP API. It proved complex, inefficient and more difficult to implement than implementing a depth first search algorithm using Plain Old Java. Although I found a CP solution for Kuromasu, the “declarative” formulation was less than obvious and the run-time poor.
Conclusion: Do not use a hammer as a substitute for a screwdriver.
SAP SHAValidator
Tuesday, April 6th, 2010SAP SHAValidator is used to ensure that files downloaded from the SAP site have not been corrupted during download. It does that by calculating a SHA256 cryptographic hash. The problem is that this utility is provided as two JAR files, namely SHAValidator.jar and frog.jar, the later being used as look and feel library. As a result, a long command line has to be issued to launch the utility. I combined the two JAR files into one so as to allow a double-click launch of the utility or issuing java -jar SHAValidator.jar via the command line. Download SHAValidator here.
Moving to Linux
Monday, April 5th, 2010I finally moved to Linux on my desktop. After trying Ubuntu and OpenSUSE, I finally opted for Ubuntu as it has been easier to install software such as Limewire, Google Chrome, Skype and VirtualBox on top of a fresh installation. A word of advice though: Right after a fresh install, launch the auto-update so as to get the latest patches. Failing to do so will make the installation of the previously mentioned software troublesome. Crossover can be used to run windows applications and games on linux. This company is actively contributing code to the Wine opensource project.