Archive for the 'Interesting Stuff' Category

Obsessive Compulsive Disorder

Or OCD for short.

A recent “Help Me Help My Child” documentary shown on Arts Central was on 2 separate cases of 2 kids from different background with this disorder.

My short review..

One was about 7 years old who kept “hearing” a voice in his head, and he thought he would kill himself and his family.

Another was a teenager, but was obsessed with tidiness or perfection. That made it hard for others to live or interact with him.

Both were brought to see a psychiatrist by their mothers, but its wasn’t that easy even though the psychiatrists were specialised in this field.

Both had to over cover come their anxiety, and it seemed it both cases, the psychiatrists gave them confront their own anxiety by place more anxiety on them, until they could accept it.

It was nice to observe that in these families, their parents were very patient to them, and tried to talk to them about their behavior or illness. This was in contrast to my thought that parents would just lash out at these children in their frustrations.

Ubuntu Tweaks (Part 2 - Repository and Packaging)

Continued from Part 1 of my series on Ubuntu tweaking.

When I first planned to run Ubuntu 6.10 “Edgy Eft”, many reviews on the net showed that not everyone is happy, some whom might think its not edgy enough, some who had their systems broken because they tried to upgrade.

Remember one of my reason I installed Ubuntu? The nature of Ubuntu and its community makes it easy to use, customise and repair the system. In this post, I would show ways to play with your ubuntu system- using apt, guides on the net, and using some other packaging or unified installation software.

Ubuntu

Apts
Apt (Advanced Packaging Tool) was perhaps the reason why many chose Debian. The Ubuntu repositories could then be the very reason that others like me chose ubuntu. Apt-get, Aptitude are very useful and powerful commands to play with. However after trying Ubuntu Synaptic Package Manager for time, I love it for these reasons:

- It has a gui (Graphical User Interface) for those who wouldn’t even touch a shell.
- Its really easy to add, disable, delete sources
- Easy to find, mark and install many packages at one go
- Download packages simultaneously, with ability to resume, making downloads faster
- Notifies you of updates and easy to access via its tray icon.

Even now I use Synaptic a lot and recommend it, apt-get and aptitude are still as important and good to learn and use. Read about aptitude versus apt-get

Finding Ubuntu Repositories
Having nice repository sources is perhaps all you need for a long time. Using these packages, I find that it is even easier to search and install software compared to Windows.

1st, you can uncomment the less official but supported ubuntu sources from /etc/sources.list or preferably do so in Synaptic. Next try out source-o-matic a Ubuntu source.list generator which produces a source list based on selection of criteria you chose. Ubuntu geek has a source list for Edgy Eft which is worth taking a look. Lastly for sources, for the more adventurous, I would recommend Treviño source list which including many packages compiled by him.

Other Debian Packages
Automatix is an Automated GUI installation script which installs the common software people demands. Read here as their official site seems down.

When using lots of “super-cow powers” apts, dun forget they are basically Debian packages. Finding and downloading debian packages is a very simple way to install applications. See GetDeb - Click And Run - Software Portal

Other Packaging
One of Apt/Deb uses is that they are a solution to dependencies. However, it is not the only solution around. Many package management exists for other distros - portage (emerge) for Gentoo, packman for ArkLinux, rpm for Redhat… There are some which are distro independent.

Klik, its another innovative web-based click and install software manager. From its webpage, “Klik strives to be the easiest way to download and run software, without installation”. I love the way you install Klik, with at most 2 lines (in user mode without the dollar signs):


$ sudo apt-get install binutils libstdc++5 rpm gnome-about # for (k)Ubuntu
$ wget klik.atekon.de/client/install -O -|sh

Autopackage - Easy Linux Software Installations for both users and developers. “Autopackage doesn’t need to be downloaded or installed. When you install your first package, Autopackage will install itself automatically.” Check out their package listings

Zero Install system is a caching network filesystem, to make software installation completely automatic. This decentralised installation systems has been made to work with the Rox Desktop

Lastly, if you were to experiment building from sources, you would like to work with the command, esp. tar, cvs, svn, git. CVS (Concurrent Versioning System), SVN (Subversion), GIT(distributed revision control file system project) are also repositories system at a different level.

CheckInstall is a software which helps you keep track of installations done using make install, and creates distro based uninstallations like dpkg on debian.

Welcome to the addictive world of Linux software.

LilyPondTool updates

I’ve distracted long enough to be lost from the lilypond and lilytool world.

Was surfing round the lilypond mailing list web archives I found several updates interesting enough to share.

Bert, the creator of LilyPondTool, created a new webbie for LilypondTool at http://lilypondtool.organum.hu/

Bert now has his own blog over at http://briffid.blogspot.com/

LilyPond 2.10.19 and 2.11.19 are available for download. From what I can see, the installation is much simple on linux than before with its installer script, and I see ample windows builds (Wait till I buy vista before windows again). As usual new features keep coming in.

LilyPondTool 2.10.4 released Seems it has many new features including

LilyPondTool 2.10 demo is released demonstrating some of the most exciting features -instant errorchecking, instant help, instant point-and-click). See more cool demos

There’s this new webpage called A-Play was first seen here then mentioned as a shell for lilypond and discussed more over here Now, I don’t really get the entire idea of how to use it, but I already had the idea of how it should be used before I ever seen of this.

(This paragraph contain random thoughts)
In no way to suggest bad for lilytool in anyway, but I feel the web platform would be the way really for lilypond to reach out to the masses. I mean, what can be harder than opening a web browser compared to installing >10mb of stuff. Normal users would most likely seen a web browser 10x more than file editor, which cuts down lots more learning curve for interface alone. Graphical interface could be easily implemented in html too. Expert users can use a textarea with autosave feature enabled, providing a portability around the world. Syntax highlighting, indentation can be done with a iframe. Shortcuts can be added to keyevents. Snippets can be drag and drop or provided via menu or toolbars. Combined with good server side support to store, render and process, and server/browser communication using AJAX to provide seamless integration between user and machine, it seems only good can come out from this. Well of course this is another of my wild imaginations, although I think its not fairly difficult to implement, not many people who can implement will do it, but perhaps an employee or someone in his 20% time might do it for fun.

Lastly I glad that even LilyPond’s “boss” Hans-Wen has openly supported LilyTool as a “official recommended tool”. Kudos to Bert! Well, as this point of time I can’t wait to open my development tools like Eclipse and start coding goodies for LilyPondTool, but not yet. Got to install a running copy of jEdit with its plugin first. Then settle lots of other stuff I needa do, followed by keep a cool head to not to rush, keep the ideas and program well.

Slow and steady wins the race.

Self-professed Programmerholic

Early this year, disturbed by some ideas made me open notepad and started to whip up my first “web application” of the year.

A simple countdown DHTML page - a combination of html, javascript, css and dom - was created. The purpose was simple, to create a count down in different units (ie. years, months, weeks, days, hours, mins, seconds, ms) to my ORD date. A windows xp wallpaper is added as the background, then use Active Desktop to cover the entire desktop background, with the time remaining running continuously like magic. (css was used to create a bar chart to show percentage of time remaining in my whole ns, and the working hours left when run.. well i thought this could be improved to be come a booklet or wordpress plugin too)

This addiction to programming led me to coin the description “programmerholic” on my msn nick. This may give the impression of my love for programming, but it meant time, brain cells, effort were much used to compensate of my technical limitations. The byproducts are frustrations, messy coding but yet hopefully some working code, practicality and satisfactions.

Here’s another example how I’m program impulsively in a spurn of moment. My 2nd program of 2007 - another javascript “software” to solve a puzzle using brute force to find a solution to the many different combinations.

One weekend, I saw a link to a difficult Russian puzzle over at digg.com, a tessellation puzzle where 5 pieces were needed to be arranged into a confined area. The popular game called Tetris was invented by a russian, which makes me feel that they are very good with shapes.

Later that day, my friend searched “russian puzzle” and we eneded trying to solve another puzzle called 8 Queens - to place eight queens on a chessboard so that no queen attacks another over at http://sakharov.net/puzzle/.

This is a interesting puzzle, something which may not seem difcult, as you try to place the last few chese pieces on the board, you’ve find that its not so simple. Simple mathematics shows that there were going to be many combinations, but I knew the human mind was good enough to process and filter them quickly to get the answer. However, knowing that writting a script or program would spoil some fun, I did otherwise with the following reason

- We were having headaches that we didn’t really have concentration and patience to solve the puzzle
- Lazy to solve it the “normal human way”
- The computer could come up results faster and better than we do
- Computers are good at crunching numbers, which was what I was going to make it do

Therefore, I type the following into a html file (you can try it too), load it in the browser, and within seconds gave me 92 solutions (considered the board can be rotated 4 times, 23 solutions. with mirror images, perhaps less than 23 unique solutions with at least 1 solution non mirrorable pattern). Note: for the numbers displayed, each digit refer to the position of the queen- i thought using number could make a good data structure too.

return “have fun”; /* end of my post now for now.. */

solvequeens.htm
————————
<script>
function valid(situation, level, position)

{
 
 for (var x=0;x<level;x++)
 {
  digit = Math.floor( situation / Math.pow(10,x)) % 10
  // check column

  if (position==digit) return false;

  // check diagonal
  left = position - x - 1

  right = position + x + 1
  if ((left>0) && (left==digit)) return false;
  if ((right<10) && (right==digit)) return false;

 }

  return true;

}

function solveQueen (situation, level)

{

 //alert( "Solving " + situation + " " +level)
 if (level==8) {
    sn ++;
    document.write
 ("Solution " +sn + " found! "+ situation +"<br/>")

    //alert ("Solution found! "+ situation)

    return true
 }

for (var x=1;x<=8;x++)
{
 if (valid(situation, level, x)) {

    //alert(situation+ " "+ x1)
    //solveQueen ((situation + x *
Math.pow(10,level)), level+1) // reverse number "data structure"

    solveQueen (situation * 10 + x , level+1)
 }
 

}
 // end solvequeen
}

sn = 0
alert("start")
solveQueen (0,0)

alert("end")
</script>

$103.40 Shopping Spree

at Queensway IKEA plus $16.20 taxi back home, with the help of my father and cousin to carry the stuff up to our home.

Ikea Stuff

Includes,
Tall Shelf $29 FLARKE N BOOKCS
Super Pinkish $35 SNILLE CHAIR
4 90cents Bokis Book-Ends
Zip-able Strikt Cd box with Lid
Simple Lyclig box with lid
Simple Fixa Tool Box - 3 Sharp Trojka nn Scissors
Black with Zig-zag OMSORG SHOEHORN
5 White FLYT MAGAZ Holders
5 Brown Coloured Lingo Magazine File Holder

A little shopping therapy feels good.