Is programming a creative pursuit?

So is programming a creative activity or not? This article offers a good point of view to which I agree.

The ByteBaker

It’s becoming clear that we, as a society, are placing a larger and larger emphasis on innovation and creativity while at the same time bemoaning the lack thereof. There are some activities that we instantly recognize as creative pursuits: painting, music, writing, theatre. And also more modern ones: graphics, web design, info graphics and industrial design, font design and lettering. But when it comes to modern acitivities and professions one of the elephants in the room is programming. The question that’s been on my mind: is programming a creative pursuit?

Programming is problem-solving. It’s about coming up with ways to do things that couldn’t be done before (or at least doing them better). But that’s just the beginning. Once you figure out a way to solve the problem you then create something – a program – that embodies your solution. The program is what goes ahead and solves…

View original post 523 more words

Linux swappiness

Recently I had the brilliant idea of adding a second Linux distribution to my computer and install it along with the already existing W7 and Ubuntu installations. The problem was that I had no extended partitions available and none of the MBR slots were free. I had 2 OSs, a large shared data partition and a swap one. I had to do something so I replaced the shared partition with an extended one and inside I made 2 logical partitions. Also I wanted partitions to be more neatly organised so I had also deleted the swap partition to place it near the Ubuntu one. For this to happen I had to make Ubuntu stop using swap memory. During the past week I noticed strange (very slightly) performance drops (even though I have a reasonable 4 GB of memory) and today I realized I forgot to turn the swap back on (I actually thought Linux would just start using the new one and didn’t bother checking).

While installing a virtual machine on Ubuntu, VMPlayer threw out an error just 1 minute before it died, it was a recommendation to add swap space to the machine.

Terminal part

Turning off swap

sudo swapoff

Turning on swap

sudo swapon -a

And here was the problem.

Error: swapon: cannot find the device for UUID=e6e677c9-5da6-49d5-930c-5210c83356fe

I suppose the config file kept the UUID of the old swap partition that I removed, another clue that pointed to this problem was given by Ubuntu itself. At boot time, while loading the system it used to halt for a few seconds during the purple startup screen and say something like UUID e6e677c9-5da6-49d5-930c-5210c83356fe could not be found – abort mounting or mount manually. I had seen computers before showing such behaviour (at university) but had never knew what was wrong. The config file responsible is /etc/fstab. here I found the UUID for the swap partition and replaced it with the right one.

To find the UUID of the current partitions:

sudo blkid -o list (man page)

sudo vim /etc/fstab

Effect: (viewed with blkid)

/dev/sda6 swap (not mounted) a87bc3d5-d477-460f-8017-131f84fcdfd8

/dev/sda6  swap             <swap>         a87bc3d5-d477-460f-8017-131f84fcdfd8

Cubieboard2 headless radio

Using cubieboard2 connected to the internet and a pair of speakers to play internet radio. It can be controlled through ssh from anywhere, currently using android tablet (with terminal emulator).

Terminal music player: cmus
sudo apt-get install cmus

Basic usage:
– open cmus with cmus command
– press “5” for entering browse mode
– open .pls or .m3u or any other live streaming/music file and enjoy

The internet radio files .pls and .m3u files are actually metafiles like HTML or XML files, with an address inside pointing to the actual stream. However, the player will not be able to play any BBC radio station. Their radio streams use mms protocol which is not supported by cmus.
http://en.m.wikipedia.org/wiki/Comparison_of_audio_player_software

The only problem about this is that the players process will be killed if ssh connection is broken. To avoid this use tmux.

Terminal multiplexor – tmux
sudo apt-get install tmux
Useful links:
http://www.dayid.org/os/notes/tm.html
http://danielmiessler.com/study/tmux/
http://blog.hawkhost.com/2010/06/28/tmux-the-terminal-multiplexer/

Basic usage:
– create a new tmux session: tmux new -s radiostream
– from within this tmux session start cmus
ssh connection may now be interrupted and reattached at a later time (to change the radio for example) using tmux a -t radiostream.

Project idea: alarm clock using radio.

E: Sub-process /usr/bin/dpkg returned an error code (1)

Linux errors I encountered today:

Errors were encountered while processing:

man-db

phpmyadmin

libapache2-mod-php5

E: Sub-process /usr/bin/dpkg returned an error code (1)

After trying several thing I found a post on Ubuntu forum forum: link; which offered the answer.

To make dpkg forget about those partially installed packages I had to delete the files they created in this folder:

/var/lib/dpkg/info

cd /var/lib/dpkg/info

sudo rm man-db.*

sudo rm phpmyadminman-db.*

sudo rm libapache2-mod-php5.*

And finally I managed to uninstall phpmyadmin.

sudo apt-get remove –purge phpmyadmin

Next:

ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)