So … how to setup Ubuntu to act more like Windows — in case of resolving windows
hostnames?

SCENARIO
In a network of Windows and Ubuntu machines, there is a Windows computer named raceboss … and your’s is ubuntu.

You want to be able to…

  • type ping raceboss and get a response
  • browse a site hosted on raceboss, by typing http://raceboss/somelocalsite/default.aspx for instance

This is possible by editing /etc/hosts, but there is however an easier way like Windows does.

SOLUTION

Step-1: Open terminal and type
sudo gedit /etc/nsswitch.conf

find the line that starts with ‘hosts’, similar to following

hosts: files dns

change to this, as in append ‘wins’ at the end

hosts: files dns wins

Step-2: install winbind

sudo apt-get install winbind

That’s all folks.

[ Source: http://ubuntuforums.org/showthread.php?t=88206 ]

To make an ISO from CD/DVD
1. Place the media in your drive but do not mount it. If it automounts, unmount it.
2. Use appropriate command:

dd if=/dev/dvd of=dvd.iso # for dvd
dd if=/dev/cdrom of=cd.iso # for cdrom
dd if=/dev/scd0 of=cd.iso # if cdrom is scsi


To make an ISO from files on Hard Drive

1. Create a directory which holds the files you want (you can use the tmp directory or any other directory you wish).
2. Use following command:

mkisofs -r -J -o /tmp/cd.iso /tmp/directory/

Here,
- Option ‘-r’ sets the permissions of all files to be public readable on the CD
- Option ‘-J’ (MS Joliet extensions) generates a more Windows-friendly CD-ROM

This results in a file called cd.iso in folder /tmp which contains all the files and directories in /tmp/directory/.

[ Sources:
1. http://ubuntuforums.org/showthread.php?t=6509
2. http://www.tldp.org ]

Coding Horror: The Greatest Invention in Computer Science

What do you think the single greatest invention in computer science is? Besides the computer itself, I mean.

Seriously, before reading any further, pause here for a moment and consider the question.

I’ve talked before about how young so-called modern computer programming languages really are, and it bears repeating for context.

C is roughly as old as I am; FORTRAN is as old as my parents. But what about the new kids on the block? The TIOBE software TCPI metrics page provides some data on language popularity going back to the year 2001. Consider the tender age of many of the newest, hippest programming languages:

* Perl (1987)
* Python (1991)
* Erlang (1991)
* Ruby (1993)
* Java (1995)
* JavaScript (1995)
* PHP (1995)

Ruby is barely a teenager. JavaScript and PHP haven’t even hit their teens yet.

For all our talk about fancy new programming language features, I sometimes think we forget the one fundamental building block underlying all of them: the humble routine. Take it from Steve McConnell, who urges us to Use Routines, Routinely:

Aside from the invention of the computer, the routine is arguably the single greatest invention in computer science. It makes programs easier to read and understand. It makes them smaller (imagine how much larger your code would be if you had to repeat the code for every call to a routine instead of invoking the routine). And it makes them faster (imagine how hard it would be to make performance improvements in similar code used in a dozen places rather than making all the performance improvements in one routine). In large part, routines are what make modern programming possible.

If you’re not old enough to remember life before routines, I thought James Shore had a great example of the stark difference in his excellent article Quality With a Name:

Before structured programming:

1000 NS% = (80 - LEN(T$)) / 2
1010 S$ = “”
1020 IF NS% = 0 GOTO 1060
1030 S$ = S$ + ” “
1040 NS% = NS% - 1
1050 GOTO 1020
1060 PRINT S$ + T$
1070 RETURN

After structured programming:

public void PrintCenteredString(string text) {
int center = (80 - text.Length) / 2;
string spaces = “”;
for (int i = 0; i < center; i++) {
spaces += ” “;
}
Print(spaces + text);
}

The humble routine is the backbone of all programming in any modern language. I’m sure you’re the very model of a modern programmer, so I won’t bore you with a long explanation of why routines are a good idea. The original 1998 IEEE McConnell article covers the rationales behind routines quite well. There’s also a greatly expanded version of that material in Chapter 7 of Code Complete 2.

Routines are so fundamental to today’s programming that they are essentially invisible. That’s the problem with routines: they only take a minute to learn, but a lifetime to master. If bad unstructured programming was possible, so is bad structured programming. You can write FORTRAN in any language. Wrestling with the ineffable essence of a routine is, almost to a first approximation, what programming now is:

* How long should this routine be? How long is too long? How short is too short? When is code “too simple” to be in a routine?
* What parameters should be passed to this routine? What data structures or data types? In what order? How will they be used? Which will be modified as a result of the routine?
* What’s a good name for this routine? Naming is hard. Really hard.
* How is this routine related to other nearby routines? Do they happen at the same time, or in the same order? Do they share common data? Do they really belong together?
* How will I know if the code in this routine succeeded? Should it return a success or error code? How will exceptions, problems, and error conditions be handled?
* Should this routine even exist at all?

Good programmers — regardless of whatever language they happen to be working in — understand the importance of crafting each routine with the utmost care. The routines in your code should be treated like tiny, highly polished diamonds, each one more exquisitely polished and finely cut than the last.

I’ll grant you this isn’t a particularly deep insight. It’s not even original advice. But if you believe, as I do, in constantly practicing the fundamentals, you’ll never stop mastering the art of writing the perfect routine.

It is, after all, the single greatest invention in computer science.

Posted by Jeff Atwood

Pretty straight forward and simple…

> Download and Install Picasa for Linux from http://picasa.google.com/linux/thanks-deb.html
> Open the Terminal and type this:
picasa picasa://importbutton/?url=http://www.webkinesis.com/fbpicasa/facebook.pbf

Boom shakalaka!

[ Sources:
1. http://picasa.google.com/linux/thanks-deb.html
2. http://groups.google.com/group/Google-Labs-Picasa-for-Linux/browse_thread/thread/664df969cb9c90bb/7585b32be59ea522 ]

These tips will help you clean up your Ubuntu installation…

Tip #1 - Getting rid of Residual Config packages

Residual Config packages are usually dependency packages that are left behind after you uninstall a package from your machine. In Synaptic Package Manger, there is a built-in feature that gets rid of
old Residual Config packages.

> Go to System > Administration > Synaptic Package Manager.
> On the bottom left hand corner of the window, click the Status button.
> In the list above the Sections, Status, Origin, Custom Filters, and Search Results buttons you should see the following text:

All
Installed (auto removable)
Installed (local or obsolete)
Installed (upgradable)
Not installed
Not installed (Residual config)

> Click on the Not installed (Residual config) text.
(If the Residual config dialogue does not appear, that means you do not have any Residual Config packages on your machine and you can skip down to Tip #2)

Do you see the packages that popped up in the window on the right? Those are the Residual Config packages.

> Click on the box to the left of the package name and select Mark for Complete Removal.
> After you have done that for all of the Residual Config packages, click on Apply at the top of the Synaptic Package Manger window to execute. Kapish!

Tip #2 - Getting rid of partial packages

Another built-in feature which deletes the not-so-fully-downloaded packages that you acquire
when a package that is being downloaded is suddenly canceled.


In the Terminal, type the following command:

sudo apt-get autoclean

The package names that appeared in the Terminal are the partial packages that have just been deleted.

Tip #3 - Getting rid of unnecessary locale data

localepurge is just a simple script to recover disk space wasted for unneeded locale files and localized man pages. It will automatically be invoked upon completion of any apt installation run. You can download the localepurge package found in Synaptic Package Manager.

> Download and install the localepurge package using Synaptic Package Manager.
> Once it is done, a new window should pop up that has a bunch of abbreviations on it. for example:

en
fr
po
sp
ka
etc…

You want to select the abbreviation of the language that you speak, or use with Ubuntu, ignoring the capitalized ones. For example, I speak english and bengali, so I would select the en and bn abbreviations. So on and so forth… Then click next. All done!

Tip #4 - Getting rid of “orphaned” packages

This tool finds “orphaned” packages on your system. It determines which packages have no other packages depending on their installation, and shows you a list of these packages. It is most useful when finding libraries, but it can be used on packages in all sections…

You need to download the deborphan or gtkorphan (graphical version) package found in Synaptic Package Manager.

> Download and install gtkorphan package using Synaptic Package Manager.
> Once it is done, go to System > Administration > Remove orphaned packages.
> When the tool pops up, just select the packages you want to remove under Orphaned packages, click Ok and follow the steps. Done!

[ Source: http://www.ubuntu-unleashed.com/2007/09/clean-up-ubuntu-junk-files.html ]

Steps:

  1. Install SSH Client and Server (for remote access)
    sudo apt-get install ssh
  2. Install Database Server
    sudo apt-get install mysql-server-5.0
  3. Install Apache HTTP Server
    sudo apt-get install apache2
  4. Install PHP5 and Apache PHP5 module
    sudo apt-get install php5 libapache2-mod-php5
  5. Restart Apache
    sudo /etc/init.d/apache2 restart
  6. Install phpMyAdmin (optional)
    sudo apt-get install phpmyadmin

[ Source: http://www.strdoc.net/ubuntu-apache-php-mysql-server-804-hardyheron ]

I got Nokia 3500 w/ GP Internet package, which I use now and then to get online. In windows, there is the Nokia PC Suite, so getting connected is no hassle. In case of Ubuntu, there is no such tool. Fortunately, they have this command line tool called wvdial. You just have to configure it once.

Configuring your phone modem

> Connect your phone w/ USB cable; the Nokia 3500 comes w/ mini-usb support.

> Enter following command to find out on which port your phone is connected
$ lsusb

You’ll see something similar to this:
Bus 003 Device 002: ID 03f0:171d Hewlett-Packard
Bus 003 Device 001: ID 0000:0000
Bus 001 Device 002: ID 0421:0061 Nokia Mobile Phones
Bus 001 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 002 Device 002: ID 09da:000a A4 Tech Co., Ltd
Bus 002 Device 001: ID 0000:0000
Bus 005 Device 002: ID 0c45:62c0 Microdia
Bus 005 Device 001: ID 0000:0000

…where Nokia Mobile Phones is the part you should focus on.
Here, the IDs are interpreted as <vendor>=0×421 and <product>=0×061
Notice that 0421 is rewritten as 0×421, and 0061 as 0×061. You might see different IDs in your case, just change accordingly.

> Now enter following commands one by one:
$ sudo /sbin/modprobe usbserial vendor=0×421 product=0×0061
$ wvdialconf create

> Open wvdial.cobf to edit
$ sudo gedit /etc/wvdial.conf

You should see something like this:
[Dialer Defaults]
Modem = (your modem name)
Baud = (your max speed)
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem
Phone = (dial number)
Username =
Password =
Stupid Mode = 1

Change the above as follows, I have marked the modifications as bold. My changes are based on, GP Internet connection.
[Dialer Defaults]
Modem = /dev/ttyACM0
Baud = 460800
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem
Phone = *99#
Username = username
Password = password
Stupid Mode = 1


Run the dialer to connect to Internet

> Enter following command to start the dialer
$ sudo wvdial
You’ll see bunch of messages; which details connection status.

> Start browsing :)
[ forgot the source :p ]

A buddy of mine was telling me yesterday that he posts his Ubuntu troubleshooting stuffs in his blog. I thought it was pretty neat, as I am using a HP DV2000, a lot of problems I come across w/ solutions might come handy to guys out there trying to switch to Ubuntu. So, here I am …. opening up a new section for Ubuntu.

First of all, my gratitude to Mark Shuttleworth and his team, for such a fantastic and awesome OS. Vista was pre-installed with my HP notebook. It was a real disappointment, Vista I mean. So, switched to XP; but every few months the machine got realy slow and there were also the viruses, of course. So, I thought let me give it a try with Ubuntu. I had experience using Linux distros before, but this was my first time using Linux in an HP. Anyways, had to go through a bumpy ride in the beginning cause of lack of drivers. Now, its just super. Can’t complain. Love Ubuntu.

Guess, getting a bit emotional here. Back to the point, as I was saying, I would be posting my Ubuntu troubleshooting stuffs from now on. Let me start with the last problem I had faced. After upgrading from 7.10 Gutsy Gibbon to 8.04 Hardy Heron; everything was fine except for the sound :( The sound got cranky and harsh. It was terrible, and I can’t live without music man.

So, I came across this solution in Ubuntu forum. The problem is with the Intel HDA cards. The following steps should resolve the annoying issue, it worked in my case :)

Problem: Cranky sound on HP DV2000 (Hardy Heron)

Solution:

Step-1: Find the chipset model of your sound card

> Enter following command to find out which chipset your card has:
$ aplay -l

In my case it was:
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: CONEXANT Analog [CONEXANT Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: Conexant Digital [Conexant Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
…where the CONEXANT part is what you want to find out (yours might say something different).
Here, <model> = CONEXANT

Step-2: Modify the alsa-base file

> Go to /etc/modprobe.d
> Open the file alsa-base w/ gedit as root
> Add following line to the bottom of the file:
options snd-hda-intel model=<model>
where, <model> is the chipset model of your sound card you identified in Step-1

Step-3: Restart

> Enter following command to restart alsa-utils
sudo /etc/init.d/alsa-utils restart

If restarting alsa-utils doesn’t work, which was the case for me; just reboot your machine. And wala! The sound should be rocking now ;)

[ Source: http://ubuntuforums.org/showpost.php?p=4869649 ]

60 Year Time Line

  • 1940s: First computer users wrote machine code by hand.
  • 1950s: Early tools, such as macro assemblers and interpreters were created and widely used to improve productivity and quality. First-generation optimizing compilers.
  • 1960s: Second generation tools like optimizing compilers and inspections were being used to improve productivity and quality. The concept of software engineering was widely discussed. First really big (1000 programmer) projects. Commercial mainframes and custom software for big business. The influential 1968 NATO Conference on Software Engineering was held.
  • 1970s: Collaborative software tools, such as Unix, code repositories, make, and so on. Minicomputers and the rise of small business software.
  • 1980s: Personal computers and personal workstations became common. Commensurate rise of consumer software. Smalltalk: the first commercial OOPS language/platform that is UI based, Memory Managed, VM Image based, scripted/incremental.
  • 1990s: Object-oriented programming and agile processes like Extreme programming gained mainstream acceptance. Computer memory capacity sky-rocketed and prices dropped drastically. These new technologies allowed software to grow more complex. The WWW and hand-held computers made software even more widely available.
  • 2000s: Managed code and interpreted platforms such as Java, .NET, Ruby, Python and PHP made writing software easier than ever before. Offshore outsourcing changed the nature and focus of software engineering careers.

Current Trends

Software engineering is a young discipline, and is still developing.
The directions in which software engineering is developing include:

Aspects
Aspects help software engineers deal with -ilities by providing tools to add or remove boilerplate code from many areas in the source code. Aspects describe how all objects or functions should behave in particular circumstances. For example, aspects can add debugging, logging, or locking
control into all objects of particular types. Researchers are currently
working to understand how to use aspects to design general-purpose
code. Related concepts include generative programming and templates.
Agile
Agile software development guides software development projects that evolve rapidly with changing expectations and competitive markets. Proponents of this method believe that heavy, document-driven processes (like TickIT, CMM and ISO 9000) are fading in importance. Some people believe that companies and agencies export many of the jobs that can be guided by heavy-weight processes. Related concepts include Extreme Programming and Lean software development.
Experimental
Experimental software engineering is a branch of software engineering interested in devising experiments
on software, in collecting data from the experiments, and in devising
laws and theories from this data. Proponents of this method advocate
that the nature of software is such that we can advance the knowledge
on software through experiments only.
Model-driven
Model Driven Software Development uses (both textual and graphical) models as primary development artifacts. By means of model transformation and code generation a part or complete applications are generated.
Software Product Lines
Software Product Lines is a systematic way to produce families
of software systems, instead of creating a succession of completely
individual products. This method emphasizes extensive, systematic,
formal code reuse, to try to industrialize the software development process.

[ Source: http://en.wikipedia.org/wiki/Software_engineering ]

comes in handy…

Yahoo Currency Converter