Wednesday, January 23, 2008

LAN between UBUNTU and XP

Here is an excellent video tutorial I found on youtube that demonstrates how to set up LAN between Ubuntu and XP. I used this myself and works perfectly, and this also works for any other Linux, the steps are the same.

One point to note is that my lan was set up in roaming mode and it couldn't detect the windows shared folders/drives. I didn't notice it at first and finally when I changed it to static ip, I could easily access my shares.

Daryna KDE CE Beta 044 is out now and ready for download.

Daryna KDE is nearly as minty as the main edition now. The packages are (safely) upto date and the kernel is the Gutsy Gibbon kernel 2.6.22-14.

Mint applications:
mintwifi (new)
mintUpdate (new)
mintAssistant (new)
mintUpload (new, done via konqueror—> right click file-->Actions-->Upload file )

minted versions of:

See the main Release notes for info and pictures on the mint applicaions.

Known issues in Daryna KDE

When shutting down or restarting the live CD it will freeze about 25% of the time at the last step. I had this problem with Gutsy too and have not found a fix for it. This happens more in virtual machines than on real ones.

After adding a new user log in as them and check their kmix settings because they will have no sound. Check the output and PCM levels. Install with an old home partition

This is what is recommended.

Boot off the live DVD.
Start the install.
At the partitioning screen choose manual.
Format the old / partition, now called /media/sda?.
Set the old / partition to be the new /.
Continue to the end and start the install.
After the install has finished reboot the system.
Open a terminal window to setup your old /home partition.
Check your partitions
df -h
Check your old /home partition for home directories.
ls /media/sda?
Un-mount your old /home partition.
sudo umount /media/sda?
Update your /etc/fstab file to mount your old /home at boot.
sudo vi /etc/fstab (or use another editior)
change the /home partiton from /media/sda? to /home
save and exit
Reboot to have your old /home back again.
Rember if you want to reset an applications config or KDE's, delete the application's hidden config file/directory in you home directory. eg rm -rf /home/boo/.kde
your sound will no longer work. To fix open up kmix, check your output is not muted or the level is set to low and check the PCM level (I had to nearly max mine out).

Linux Mint Daryna KDE CE Upgrade Notes.

Just don't. It will cause you more problems than it is worth and it will not be anywhere near as beautiful and clean as a fresh install.


My experience with Ubuntu Gutsy

I have been using Ubuntu all the way since October, 07 with a little testing of the other distros every now and then. I must say , I am really pleased with the way things are shaping out. I didn't care much about the desktop environment or the so called window manager, and hence, I stuck around with the default Ubuntu 7.10 package.

I use some KDE applications though, like K3B and Amarok, and I have also replaced firefox with my favourite Opera, might as well try out epiphany someday later.Yes, I love the effects and use both compiz and the emerald manager with the effect that most of my friends are amazed at the sheer looks of it.

Programming and the occasional text edition is usually accomplished with vim, and when I need a GUI I use geany for coding and abiword for text processing. Open Office runs too slow, thereby,  I tend to ignore it whenever I can. Bluefish is good enough for me, for the occasional HTML works.

For watching movies and other videos, I use VLC, mplayer doesn't work for me with all that monstrous subtitle don't size that I couldn't decrease. Have kept it though for the odd ones that needs some adjustment with the subtitle's timers. (VLC really needs to improve here). I also quite like Rythmbox, except that its too simplistic for my music needs. Amarok does bring in some extra KDE libs that I could do without otherwise, but I love it beyond all arguments, so it is there as well. K3B works great, just haven't figured out how to burn files greater than 4GB yet !! I use another useful application,. gcstar, it catalogues movies and books, and I being a movie buff, always find it useful.

All in all I really like my set up of the Gutsy and I doubt that I will take the risk of upgrading to Heron, even though its going to be a LTS.

Thursday, January 17, 2008

Open Source alternatives

Open Source software comes with a freedom that is unmatched by rest of the licenses. While most of the open source software is predominantly for Linux/Unix systems, some also have installers for Windows.

Lets take a look at some open source alternatives for the existing applications that are commonly used.

ApplicationsOpen Source alternatives
MS OfficeOpen Office / Star Office
Corel DrawInkscape
Windows Media PlayerVLC Player / Mplayer
WinampAudacious / Amarok
3D MaxBlender
DreamweaverBluefish / Screem
Internet ExplorerOpera / Mozilla Firefox
Windows Media CenterElisa / Myth TV
Outlook ExpressEvolution / Thunderbird
Adobe Acrobat ReaderEvince
Winzip / WinrarArk / Tar / Gzip

and the list could just go on and on ...

So lets take a stand and use only the open source applications, unless offcourse there isn't one, which is a rarity !

Good programming practices

We all have our own style of coding, a style that suits us and makes the code easier to refer to at a later time. However, considering the situation that someone else might need to understand it, and to ease the process of maintenance, say a year from now, its often a good practice to follow certain norms while coding.

Proper variable names

Say you are using a variable to hold the average marks of students. Now a variable named 'a' will do fine. But the problem is over the entire span of program, it might not make any sense at all. Instead it could be named as 'average', which would give some idea about the data contained in it, or you might as well name it as 'averageMarks'.

Proper indentation

Indentation has a lot to do with how easil;y one can grasp the code you have written. A poorly indented code is hard to maintain. Just have a look and tell which one is easier to comprehend?

Initialising variables, arrays, etc

Some languages force all variables to be initialised before their first use and some languages don't force. However, it is generally a good idea to initialise the variables, arrays, lists and such, before using them in the program. Unless the developer wants to work with garbage values !

Commenting where necessary

Comments are usefull in understanding the logic of the code and the flow of the program in general. With balanced use of comments in the code, the author makes his program easier to understand and maintain. Obscure use of logical operators and pointers are a few examples where comments are really helpful.

Debugging routines

Debugging routines must be embedded in the code itself so that during testing or later in the maintenance phase work can continue smoothly. Although developers can argue that its the work of the debugger but some lines displaying intermidiate values of variables can save hours of work.

Checking array bounds

Most of us have heard of vulnerabilities in software applications and in many of those cases the culprit is some buffer overflow problem. So as a rule of thumb, its a good practice to check the bounds of arrays, lists and such data structures where there may be a chance of an overflow or an underflow occuring in the code.

Garbage collection

Yes, main memory might be getting cheaper by the day, but gives no excuse for hijacking precious system resources. Garbage collection routines must be coded properly and ensured that all dereferenced objects and out-of-scope dynamic variables and freed. No one wants a simple piece of software to hang on to their memory foot prints forever, isn't it?

Following coding standards

The general coding standards of the programming language being used must be stricly adhered to. That includes defining prototypes of functions in languages that recommends it, and providing explicit return types and proper type casting. Non standard codes are the last thing any developer would like to work on.

Keeping lines under 80 characters

Remember that a single line of code is easier to see, understand and debug. Since almost all of the monitors nowadays are 80 columns wide, its better if your statements are bounded within it.

Explicit casting of variables

Lastly, and most importantly, never rely on implicit type casts. You might get away with some but not all. Specially, where acuracy is of prime importance. Floating numbers are hard to comprehend in general as their arithmetic is mostly machine dependent, so its better to use explicit type casts at all times

Tuesday, January 15, 2008

Perl, Python or the good old C ?

The C language is definitely a good one and is capable of doing almost everything. However, in modern times when processing power is increasing everyday in leaps and bounds, perhaps its time to reconsider its effectiveness.

Although it still holds its forte when it comes to development of system softwares and those where performance time is of greater importance than development time, more casual programming tasks and general programming routines like say a 10-digit calculator or even a spell checker, might be done with equal effectiveness using a modern language like Perl or Python, where development time is much less owing to the use of a large number of easily available library files.

Now this effective reduction of time in the coding phase might be a trade-off for proper resource utilisation, but whereas C demands strict coding principles, requiring more time with less resource, these may require more reourse but that problem is negligible because of the rapid increase in processing power, coupled with the availability of cheaper and bigger main memory.

Hence, its important to know them all so that one may choose the best there is for a particular task. Otherwise it would be like coding in assembly when there is no need for it! Besides, programming logic remains the same, no matter what language is used, the only difference, in my opinion, lies in the flexibility a language allows to a developer, and the availability of good and usefull library functions.

Wednesday, January 9, 2008

The various desktop environments and window managers.

One of my friend, a recent linux user asked me while installing openSuse, which one of KDE and GNOME to install and what are their advantages? I didn't know how to answer it in simple terms as the question itself is so complex.I can't really expect a newbie to understand the concept behind having several desktop environments and window managers. As if the choice of a distro was not enough to start with, but then these are the true charms of Linux for me. :)

Each of these DE and WM is made by people who tried to be different and were inspired by the open source philosophy. For me, KDE is quite professional looking and has generally better quality apps, although it is most certainly not suitable for older machines. GNOME, on the other hand, has a nice blend of ease-of-use and not-resource-hungry. XFCE, different from both of these, offers a solution for the ones who want to squeeze out that extra bit of performance from their machines without having to compromise a great deal on the ease-of-use. The *boxes are a different issue altogether.

FLuxbox eats up even less resource than XFCE and its quite natural since it adopts a minimalistic approach to window managing. No fancy panels or icons. One can have them if needed (fbpanel and idesk). Its also compatible with most Blackbox things, since its a derivative of it. Openbox, FVWM, and the rest of the box category are for the real minimalists who insists on having a set up just the way they want. No real issue of applications in these *boxes though, since these are just window managers which can be used either with a DE or without it.

Compiz and Beryl are composite managers, since they need a window manager or desktop environment. Its great if one seeks eyecandy, although most certainly its more of a bloat for me than functionality, but we all love tranparencies and things like that. Don't we?

So, if you are still asking which one to use, I can only say that try out all and eventually you will like one better than the rest. Just for information though, I use GNOME with compiz (transparencies are real cool) in Ubuntu most of the time, while I also made myself a Gentoo installation with fluxbox.

Linux for the average desktop

Almost every now and then there crops up a thread in the forums discussing whether Linux is ready yet for the average home user. This is usually followed up with heavy discussions on how it still loses out on professional applications like Photoshop, 3D Max, MS Office or even iTunes.

Frankly Gimp does a good job but its still not comparable to Photoshop, or is it? Then again, huge acceptance of the iPod ensures that iTunes is a must have application for most music lovers and the apple store allowing seamless downloading of your favourite songs directly makes it even more usefull.

However, the average home user does get all the basic applications like word processor (open office), image editor (gimp), multi-format media player (vlc / mplayer) and an excellent text editor (vi /emacs), music apps (amarok / audacious) and lots more, all along with the distro. So its really not a question of getting things done. Maybe someone prefers photoshop to gimp, but spending $650 doesn’t seem all that prudent for a home user with a $500 computer. MS Office costs another $500 and to use all these one would need another $200 for windows XP Home, Vista will cost even more !!! So Linux does really seem to be a good, valid option.

Now provided money doesn’t matter at all (it generally does though), one would still need an anti-virus solution along with a spyware removal application and all the headaches of updating virus definitions. System stabilty is yet another problem.

With Linux and a good power supply you may never need to turn of your system unless offcourse for cleaning the rig. Gone are the days when Linux used to be a command line only OS. Now with distributions like Ubuntu and Suse one can actually have a pretty good looking desktop.

Not to forget the obvious point that there exists a Linux distribution for almost every system of every decade, be it a moster Core2Duo or an aging Pentium Pro!! The customizability that it offers is unmatched and why spend money on a new system when a few minor modifications (an extra RAM chip) or none can get you the work done?