07 September, 2009

If programming languages were cars...

The list


* Ada

Ada is a tank. A butt-ugly tank that never breaks down. People laugh uncontrollably if you tell them you drive Ada, but really, do you want to be driving a sports car in a war zone? [from Amit Dubey]

* Assembly Language
is a bare engine; you have to build the car yourself and manually supply it with gas while it's running, but if you're careful it can go like a bat out of hell.

[From "Subterfug" off digg.com:]

Assembly Language: you are the car.

* Basic

Basic is a simple car useful for short drives to the local shops. Once popular with learner drivers, it has recently been stripped down to a shell and rebuilt by a major manufacturer, The new version has been refurbished for longer journeys, leaving only cosmetic similarities to the original model. [from Przemyslaw Wrzos]

* C

C is a racing car that goes incredibly fast but breaks down every fifty miles.

* Cobol

Cobol is reputed to be a car, but no self-respecting driver will ever admit having driven one.

* C#

C# is a competing model of family station wagons. Once you use this, you're never allowed to use the competitors' products again.

* C++

C++ is a souped-up version of the C racing car with dozens of extra features that only breaks down every 250 miles, but when it does, nobody can figure out what went wrong.

* Eiffel

Eiffel is a car that includes a built-in driving instructor with a French accent. He will help you quickly identify and learn from your mistakes, but don't you dare argue with him or he'll insult you and throw you out of the car. [From Daniel Prager with some embellishments]

* Erlang

Erlang is a fleet of cars that all cooperate to get you where you want to go. It takes practice to be able to drive with one foot in each of several cars, but once you learn how you can drive over terrain that would be very hard to navigate any other way. In addition, because you're using so many cars, it doesn't matter if a few of them break down.

* Forth

Forth is a car you build yourself from a kit. Your car doesn't have to look or behave like anyone else's car. However, a Forth car will only go backwards.

[By "256byteram", on a comment on Digg.com (I couldn't resist):]

FORTH LOVE IF HONK THEN !

* Fortran

Fortran is a pretty primitive car; it'll go very quickly as long as you are only going along roads that are perfectly straight. It is believed that learning to drive a Fortran car makes it impossible to learn to drive any other model.

* Java

Java is a family station wagon. It's easy to drive, it's not too fast, and you can't hurt yourself.

* Haskell

Haskell is an incredibly elegantly-designed and beautiful car, which is rumored to be able to drive over extremely strange terrain. The one time you tried to drive it, it didn't actually drive along the road; instead, it made copies of itself and the road, with each successive copy of the road having the car a little further along. It's supposed to be possible to drive it in a more conventional way, but you don't know enough math to figure out how.
[Monadic version:]

Haskell is not really a car; it's an abstract machine in which you give a detailed description of what the process of driving would be like if you were to do it. You have to put the abstract machine inside another (concrete) machine in order to actually do any driving. You're not supposed to ask how the concrete machine works. There is also a way to take multiple abstract machines and make a single abstract machine, which you can then give to the concrete machine to make multiple trips one after another.

* Lisp

Lisp looks like a car, but with enough tweaking you can turn it into a pretty effective airplane or submarine.

[from Paul Tanimoto:]

Lisp: At first it doesn't seem to be a car at all, but now and then you spot a few people driving it around. After a point you decide to learn more about it and you realize it's actually a car that can make more cars. You tell your friends, but they all laugh and say these cars look way too weird. You still keep one in your garage, hoping one day they will take over the streets.

* Mathematica

Mathematica is a well-designed car that borrowed a lot from the Lisp car without giving it nearly the credit it deserved. It can solve equations to determine the most efficient way to get to the destination, but it costs a fortune

* Matlab

Matlab is a car designed for novice drivers going on short trips over terrain similar to the terrain the Mathematica car is usually driven over. It is very comfortable when driving over this terrain, but if you go off the trail even a little the car becomes so hard to drive that more snobby drivers refuse to even acknowledge that it's a car.

* Ocaml

Ocaml is a very sexy European car. It's not quite as fast as C, but it never breaks down, so you end up going further in less time. However, because it's French, none of the controls are in the usual places.

* Perl

Perl is supposed to be a pretty cool car, but the driver's manual is incomprehensible. Also, even if you can figure out how to drive a Perl car, you won't be able to drive anyone else's.

* PHP

PHP is the Oscar Mayer Wienermobile, it's bizarre and hard to handle but everybody still wants to drive it. [from "CosmicJustice" off of digg.com]

* Prolog is fully automatic: you tell it what your destination looks like, and it does all the driving for you. [Addendum from Paul Graham:] However, the effort required to specify most destinations is equivalent to the effort of driving there.

[I forget who suggested this one:]

Prolog is a car with a unique trial-and-error GPS system. It will go down the road looking for your destination, and if it gets to the end of the street without finding it, it will back up and try the next street over and continue until you get where you need to go.

* Python

Python is a great beginner's car; you can drive it without a license. Unless you want to drive really fast or on really treacherous terrain, you may never need another car.

* Ruby

Ruby is a car that was formed when the Perl, Python and Smalltalk cars were involved in a three-way collision. A Japanese mechanic found the pieces and put together a car which many drivers think is better than the sum of the parts. Other drivers, however, grumble that a lot of the controls of the Ruby car have been duplicated or triplicated, with some of the duplicate controls doing slightly different things in odd circumstances, making the car harder to drive than it ought to be. A redesign is rumored to be in the works.

* Smalltalk

Smalltalk is a small car originally designed for people who were just learning to drive, but it was designed so well that even experienced drivers enjoy riding in it. It doesn't drive very fast, but you can take apart any part of it and change it to make it more like what you wanted it to be. One oddity is that you don't actually drive it; you send it a message asking it to go somewhere and it either does or tells you that it didn't understand what you were asking.

* Visual Basic

Visual Basic is a car that drives you. [from "yivkX360" on digg.com, no doubt channeling Yakov Smirnov]

The D programming Language !

penguinblotter writes in a journal article: "Soon, Walter Bright is scheduled to release version 1.0 of the D Programming Language. D is a systems programming language. Its focus is on combining the power and high performance of C and C++ with the programmer productivity of modern languages like Ruby and Python. Special attention is given to the needs of quality assurance, documentation, management, portability and reliability. D has appeared on Slashdot a few times before, and Walter has continued to add more and more features. Most Slashdot community comments in these articles have been offered on feature X or spec Y without reading through the extensive D newsgroup archives. It has been here over the past seven years where extremely gifted and experienced programmers hashed out discussions and arrived at excellent implementations of all the ideas discussed."


For those with a C/C++ background, D offers:

* native code speed
* extremely fast compilation times
* garbage collection (although you can manage your own memory if you want)
* OOP - by reference only, easy initialization, always virtual
* cleaner template metaprogramming syntax, more powerful templates, as well
* built-in dynamic and associative arrays, array slicing
* versioning (no preprocessor madness)
* link-compatibility with C
* nested functions
* class delegates / function pointers
* module system

For those with a C#/Java background (a shorter list, but one with big wins):

* similar syntax
* No virtual machine or interpreter
* built-in unit testing and design-by-contract

These two comparison sheets can go into more depth on how D stacks up against other languages.

From D's creator:
For me, it's hard to pinpoint any particular feature or two. It's the combination of features that makes the cake, not the sugar, flour or baking powder. So,

1. My programs come together faster and have fewer bugs.
2. Once written, the programs are easier to modify.
3. I can do (1) and (2) without giving up performance.

Get your compilers and start hacking D!

* DMD (Digital Mars reference compiler, Windows & Linux, x86)
* GDC (GCC front-end)

Python Tutorial

its a good?
he he he
kuch bhi......

http://www.poromenos.org/tutorials/python

20 August, 2009

40 years of Linux

40 years of Unix

By Mark Ward
Technology Correspondent, BBC News

Network cables, BBC
Unix had computer networking built in from the start



Unix had computer networking built in from the start

The computer world is notorious for its obsession with what is new - largely thanks to the relentless engine of Moore's Law that endlessly presents programmers with more powerful machines.

Given such permanent change, anything that survives for more than one generation of processors deserves a nod.

Think then what the Unix operating system deserves because in August 2009, it celebrates its 40th anniversary. And it has been in use every year of those four decades and today is getting more attention than ever before.

Work on Unix began at Bell Labs after AT&T, (which owned the lab), MIT and GE pulled the plug on an ambitious project to create an operating system called Multics.

The idea was to make better use of the resources of mainframe computers and have them serve many people at the same time.

"With Multics they tried to have a much more versatile and flexible operating system, and it failed miserably," said Dr Peter Salus, author of the definitive history of Unix's early years.

Time well spent

The cancellation meant that two of the researchers assigned to the project, Ken Thompson and Dennis Ritchie, had a lot of time on their hands. Frustrated by the size and complexity of Multics but not its aims of making computers more flexible and interactive, they decided to try and finish the work - albeit on a much smaller scale.

The commitment was helped by the fact that in August 1969, Ken Thompson's wife took their new baby to see relatives on the West Coast. She was due to be gone for a month and Thompson decided to use his time constructively - by writing the core of what became Unix.

He allocated one week each to the four core components of operating system, shell, editor and assembler. It was during that time and after as the growing team got the operating system running on a DEC computer known as a PDP-7 that Unix came into being.

It got us away from the total control that businesses like IBM and DEC had over us
Peter Salus, author

Bill Thompson on "The enlightenment's operating system"

By the early 1970s, five people were working on Unix. Thompson and Ritchie had been joined by Brian Kernighan, Doug McIlroy and Joe Ossanna.

The name was reportedly coined by Brian Kernighan - a lover of puns who wanted Unics to stand in contrast to its forebear Multics.

The team got Unix running well on the PDP7 and soon it had a long list of commands it could carry out. The syntax of many of those commands, such as chdir and cat, are still in use 40 years on. Along with it came the C programming language.

But, said Dr Salus, it wasn't just the programming that was important about Unix - the philosophy behind it was vital too.

"Unix was created to solve a few problems," said Dr Salus, "the most important of which was to have something that was much more compact than the operating systems that were current at that time which ran on the dinosaurs of the computer age."

Net benefits

Back in the early 1970s, computers were still huge and typically overseen by men in white coats who jealously guarded access to the machines. The idea of users directly interacting with the machine was downright revolutionary.

"It got us away from the total control that businesses like IBM and DEC had over us," said Dr Salus.

Word about Unix spread and people liked what they heard.

"Once it had jumped out of the lab and out of AT&T it caught fire among the academic community," Dr Salus told the BBC. What helped this grassroots movement was AT&T's willingness to give the software away for free.
DEC PDP-1 computer
DEC's early computers were for many years restricted to laboratories

That it ran on cheap hardware and was easy to move to different machines helped too.

"The fact that its code was adaptable to other types of machinery, in large and small versions meant that it could become an operating system that did more than just run on your proprietary machine," said Dr Salus.

In May 1975 it got another boost by becoming the chosen operating system for the internet. The decision to back it is laid out in the then-nascent Internet Engineering Task Force's document RFC 681, which notes that Unix "presents several interesting capabilities" for those looking to use it on the net.



DEC's early computers were for many years restricted to laboratories

It didn't stop there. Unix was adapted for use on any and every computer from mainframes to desktops. While it is true that it did languish in the 1980s and 90s as corporations scrapped over whose version was definitive, the rise of the web has given it new life.

The wars are over and the Unix specification is looked after by the Open Group - an industry body set up to police what is done in the operating system's name.

Now Unix, in a variety of guises, is everywhere. Most of the net runs on Unix-based servers and the Unix philosophy heavily influenced the open source software movements and the creation of the Linux desktop OS. Windows runs the communication stack created for Unix. Apple's OS X is broadly based on Unix and it is possible to dig into that software and find text remarkably similar to that first written by Dennis Ritchie in 1971.

"The really nice part is the flexibility and adaptability," said Dr Salus, explaining why it is so widespread and how its ethic fits with a world at home with the web.

"Unix is the best screwdriver ever built," said Dr Salus.


take more info from:--
news@bbc

10 August, 2009

More Info About Swine Flu

http://www.cdc.gov/h1n1flu/qa.htm

02 August, 2009

Python Turtle For absolute Beginners....

PythonTurtle

A learning environment for Python suitable for beginners and children, inspired by Logo.



PythonTurtle aims to be the most low-threshold way for learning or teaching Python. The user is given command of an interactive Python shell, similar to IDLE, and is able to use Python functions to move a turtle that is displayed on the screen. An illustrated help screen demonstrates how to move the turtle and introduces the student to the basics of Python programming.

Are u know about SciPy...?

Scientific Tools for Python

SciPy (pronounced "Sigh Pie") is open-source software for mathematics, science, and engineering. It is also the name of a very popular conference on scientific programming with Python. The SciPy library depends on NumPy, which provides convenient and fast N-dimensional array manipulation. The SciPy library is built to work with NumPy arrays, and provides many user-friendly and efficient numerical routines such as routines for numerical integration and optimization. Together, they run on all popular operating systems, are quick to install, and are free of charge. NumPy and SciPy are easy to use, but powerful enough to be depended upon by some of the world's leading scientists and engineers. If you need to manipulate numbers on a computer and display or publish the results, give SciPy a try!


check the url:-
http://www.scipy.org/

Python and Scientific Computing...

Python and Scientific Computing



Cookbook/OptimizationDemo1
SciPy optimization on Ubuntu Linux

NumPy and SciPy are two of many open-source packages for scientific computing that use the Python programming language. This website, together with other subdomains of the scipy.org domain, serves as a portal for all scientific computing with Python, not just NumPy and SciPy. The index under Topical Software in the navigation bar lists these domains and other destinations for scientific software using Python.


Good places to start to learn more about SciPy:

* More about NumPy / SciPy
* Index of Python packages for scientific computing
* Projects using NumPy / SciPy
* scikits add-on toolkits for numpy/scipy
* Download NumPy / SciPy
* Install SciPy
* Documentation
* Cookbook

29 July, 2009

Best website to learn Python.....

http://www.xmarks.com/site/docs.python.org/

Python 3.1 final was released on June 27th, 2009.

Python 3.1


Python 3.1 is a continuation of the work started by Python 3.0, the new backwards-incompatible series of Python. Improvements in this release include:

* An ordered dictionary type
* Various optimizations to the int type
* New unittest features including test skipping and new assert methods.
* A much faster io module
* Tile support for Tkinter
* A pure Python reference implementation of the import statement
* New syntax for nested with statements

Django 1.1 released.....

download Django from...

http://www.djangoproject.com/download/

09 July, 2009

LEGBUNTU


05 July, 2009

I M Using Kubuntu







Now i m using Kubuntu Linux........

"Kubuntu", pronounced /kuːˈbuːntuː/ koo-BOON-too, means "towards humanity" in Bemba, and is derived from ubuntu "humanity"). The K at the beginning represents the K Desktop Environment, which Kubuntu runs. By coincidence, Kubuntu also means "free" (as in 'free of charge') in Kirundi.

Kubuntu is an official derivative of the Ubuntu distribution of the Linux operating system using the KDE graphical environment instead of GNOME. It is part of the Ubuntu project and uses the same underlying system. Kubuntu and Ubuntu can work alongside each other by installing the ubuntu-desktop and kubuntu-desktop packages. Every package in Kubuntu shares the same repositories as Ubuntu. It is released biannually, with new updates and patches in between.

nice na....

28 June, 2009

Angular momentum

Uselessss...........





he he he he he

25 June, 2009

Comparing Python to Other Languages

Python is often compared to other interpreted languages such as Java, JavaScript, Perl, Tcl, or Smalltalk. Comparisons to C++, Common Lisp and Scheme can also be enlightening. In this section I will briefly compare Python to each of these languages. These comparisons concentrate on language issues only. In practice, the choice of a programming language is often dictated by other real-world constraints such as cost, availability, training, and prior investment, or even emotional attachment. Since these aspects are highly variable, it seems a waste of time to consider them much for this comparison.

Java

Python programs are generally expected to run slower than Java programs, but they also take much less time to develop. Python programs are typically 3-5 times shorter than equivalent Java programs. This difference can be attributed to Python's built-in high-level data types and its dynamic typing. For example, a Python programmer wastes no time declaring the types of arguments or variables, and Python's powerful polymorphic list and dictionary types, for which rich syntactic support is built straight into the language, find a use in almost every Python program. Because of the run-time typing, Python's run time must work harder than Java's. For example, when evaluating the expression a+b, it must first inspect the objects a and b to find out their type, which is not known at compile time. It then invokes the appropriate addition operation, which may be an overloaded user-defined method. Java, on the other hand, can perform an efficient integer or floating point addition, but requires variable declarations for a and b, and does not allow overloading of the + operator for instances of user-defined classes.

For these reasons, Python is much better suited as a "glue" language, while Java is better characterized as a low-level implementation language. In fact, the two together make an excellent combination. Components can be developed in Java and combined to form applications in Python; Python can also be used to prototype components until their design can be "hardened" in a Java implementation. To support this type of development, a Python implementation written in Java is under development, which allows calling Python code from Java and vice versa. In this implementation, Python source code is translated to Java bytecode (with help from a run-time library to support Python's dynamic semantics).

Javascript

Python's "object-based" subset is roughly equivalent to JavaScript. Like JavaScript (and unlike Java), Python supports a programming style that uses simple functions and variables without engaging in class definitions. However, for JavaScript, that's all there is. Python, on the other hand, supports writing much larger programs and better code reuse through a true object-oriented programming style, where classes and inheritance play an important role.

Perl

Python and Perl come from a similar background (Unix scripting, which both have long outgrown), and sport many similar features, but have a different philosophy. Perl emphasizes support for common application-oriented tasks, e.g. by having built-in regular expressions, file scanning and report generating features. Python emphasizes support for common programming methodologies such as data structure design and object-oriented programming, and encourages programmers to write readable (and thus maintainable) code by providing an elegant but not overly cryptic notation. As a consequence, Python comes close to Perl but rarely beats it in its original application domain; however Python has an applicability well beyond Perl's niche.

Tcl

Like Python, Tcl is usable as an application extension language, as well as a stand-alone programming language. However, Tcl, which traditionally stores all data as strings, is weak on data structures, and executes typical code much slower than Python. Tcl also lacks features needed for writing large programs, such as modular namespaces. Thus, while a "typical" large application using Tcl usually contains Tcl extensions written in C or C++ that are specific to that application, an equivalent Python application can often be written in "pure Python". Of course, pure Python development is much quicker than having to write and debug a C or C++ component. It has been said that Tcl's one redeeming quality is the Tk toolkit. Python has adopted an interface to Tk as its standard GUI component library.

Tcl 8.0 addresses the speed issuse by providing a bytecode compiler with limited data type support, and adds namespaces. However, it is still a much more cumbersome programming language.

Smalltalk

Perhaps the biggest difference between Python and Smalltalk is Python's more "mainstream" syntax, which gives it a leg up on programmer training. Like Smalltalk, Python has dynamic typing and binding, and everything in Python is an object. However, Python distinguishes built-in object types from user-defined classes, and currently doesn't allow inheritance from built-in types. Smalltalk's standard library of collection data types is more refined, while Python's library has more facilities for dealing with Internet and WWW realities such as email, HTML and FTP.

Python has a different philosophy regarding the development environment and distribution of code. Where Smalltalk traditionally has a monolithic "system image" which comprises both the environment and the user's program, Python stores both standard modules and user modules in individual files which can easily be rearranged or distributed outside the system. One consequence is that there is more than one option for attaching a Graphical User Interface (GUI) to a Python program, since the GUI is not built into the system.

C++

Almost everything said for Java also applies for C++, just more so: where Python code is typically 3-5 times shorter than equivalent Java code, it is often 5-10 times shorter than equivalent C++ code! Anecdotal evidence suggests that one Python programmer can finish in two months what two C++ programmers can't complete in a year. Python shines as a glue language, used to combine components written in C++.

Common Lisp and Scheme

These languages are close to Python in their dynamic semantics, but so different in their approach to syntax that a comparison becomes almost a religious argument: is Lisp's lack of syntax an advantage or a disadvantage? It should be noted that Python has introspective capabilities similar to those of Lisp, and Python programs can construct and execute program fragments on the fly. Usually, real-world properties are decisive: Common Lisp is big (in every sense), and the Scheme world is fragmented between many incompatible versions, where Python has a single, free, compact implementation.


you see this essay on :-
www.python.org/doc/essays/comparisons.html

17 June, 2009

Use Your Linux System With A Broken Bootloader

Here are some simple steps that should allow you to make some very simple changes that could end up saving you a lot of time and possibly a reinstall of your Linux system.

1. Acquire a Linux liveCD of your choice. I prefer Elive, as it is bigger one and quick. There are in count of others such as KNOPPIX, ZenWalk, Ubuntu, Fedora Live, and DSL. Each of these would easily be up to the task.
2. Boot the live CD and get to a command line somehow. If you are in a GUI environment, this means starting a Terminal or Konsole session. If you are booted into a classic Linux login prompt, you're good to go.
3. Make sure you're the root user (you can do this by typing whoami). If you're not root, type su - and enter the root password when prompted.
4. Mount your linux root partition. These steps may vary depending on preference, but they should be fairly similar:
1. cd /mnt
2. mkdir myroot
3. mount /dev/hda5 /mnt/myroot
4. cd /mnt/myroot
5. Depending on the complexity of the tasks you wish to perform, you may need to mount your device list according to what your live CD detected:
1. mount /dev /mnt/myroot/dev
2. mount -t proc /proc /mnt/myroot/proc
6. Finally, switch into your installed system, specifying where your root partition is mounted and they shell you wish to use:
1. chroot /mnt/myroot /bin/bash

At this point you should be able to do several useful things, such as reinstall your bootloader into the MBR. You can also edit hosed configuration files this way.

If you need to add Windows into your boot configuration, and you use LILO, you could try adding something like this to your /etc/lilo.conf:

other = /dev/hda1
label = Windows
table = /dev/hda

(be sure to run lilo again to save the change)

When you are all done with your chroot environment, simply type exit or logout or what have you. Then be sure to unmount anything you may have mounted in order to use the system.

Firebug for !Firefox

Pretty much anyone who's been doing any Web development in the last few years probably prefers to use Firefox because of the incredibly powerful extensions it offers. Among the extensions I hear from pavan mishra who is Web developers complain about not having in other browsers are Web Developer and Firebug. Several people feel that they could get by with another browser (such as Google Chrome) if it only had Firebug.

Firebug actually offer their amazing product for other browsers!

I happened upon this utility while perusing Django Snippets the other day. A member by the username of jfw posted a middleware which injects the Firebug Lite utility into a response when you're not using Firefox and when your site is in debug mode. I've found it to be quite useful. I hope you all do too!!

Format Large Drives as FAT32 in Windows

Have any of you ever purchased a drive larger than 32GB that you wanted to be able to plug into a Mac, Windows, and Linux machine at anytime, being able to both read and write on all of them? Did you ever try to format such a drive in Windows, simply to find out that Windows only permits formatting large drives as NTFS, which is not always writable outside of Windows?

A bit of searching pointed to Ridgecrop Consultants.

They have provided a simple, fast, and efficient application which will format any size drive as FAT32 in Windows. You can download it here.

Once you download the file, extract the fat32format.exe file from the archive and put it someplace easy to remember, like C:\. Then open up a command prompt (Click Start > Run... and type cmd in the box). Navigate to the location where you extracted the program and type something like:

fat32format d:

Where d: is the Windows drive letter of the drive you want to format. A couple seconds later you should have a fully FAT32 formatted drive!

Source: http://www.ridgecrop.demon.co.uk/index.htm?fat32format.htm

16 June, 2009

Now u 'C' it...U...Don't..!!!

The C in C++ of course comes from C language which originated from BCPL's B class (or B language, an interpreted language, suprisingly) where BCPL stands for BasicCPL which was related to the CPL language joinly developed by universities in UK? where The C in CPL orginally refer to Cambridge and later Combined (just like what happened to GCC, where originally it refers to Gnu C Compiler and later Gnu Compiler Collection). In addition, the C in CPL also refers to Christopher Strachey, who is the main driving force behind CPL.
So, now we can 'C' that the letter C has a long history, now you C it, now you don't.......


ha ha ha ha ha....

14 June, 2009

sudo error...............

if u r going to install any package in linux,by using SUDO command
in some linux its not wotking....and there are many ways to install the package..

to solve this problem there are many ways....,BUT.....its depend upon the msg....whichone shows in terminal...
during package installation...

here is common error,
sart....

change dir....
from were u want to installl packages....than

e.g....

u want to install django

pylon@riyan:$ cd /home/pylon/Documents/pythonista/Django1.0.2-final
pylon@riyan /home/pylon/Documents/pythonista/Django1.0.2-final:$
pylon@riyan /home..../Djan....:/$sudo python setup.py install

if error is coming like this.....

"pylon is not in the sudoers file. This incident will be reported."

here pylon is user....

than write on the terminal
e.g.:-
pylon@riyan:$su

u get the root,something like this

e.g.

[root:ashish/root/home]:$


chane dir....
from were u want to installl packages....than

[root:ashish/root/home]:$cd /home/pylon/Documents/pythonista/Django1.0.2-final
[root:ashish/root/.../Django...]:$sudo python "installer_pacakage_file_name" install

screenshots of KDE(Elive) linux and GNOME(ubuntu).....

###############################################
###############################################















###############################################
###############################################


GNOME(UBUNTU)



















##############################################
##############################################

difference between KDE and GNOME....IN Linux system......

#################################################

Default Look:---


#################################################
When you look at the default setup of Gnome and KDE in Ubuntu, their differences are mainly cosmetic.

####################################################

KDE


###################################################
KDE by default (this can be changed) favors blue and black, has one toolbar at the bottom of the screen, and has one main menu.






#################################################

Gnome


#################################################
Gnome by default (this can also be changed) favors brown and orange, has two toolbars (one at the top, one at the bottom), and splits its menu into three submenus—Applications, Places, and System.





You should not select your desktop environment based on its default look. Gnome can just as easily favor blue, and KDE can be made to be orange. Both can be any color you want. Toolbars can be moved, added, deleted. The Gnome menus can be combined. New KDE menus can be added.
Both KDE and Gnome offer flexibility.




#################################################

Menu Navigation


#################################################

In KDE, there is a KMenu through which you access all programs. By default in Kubuntu (Ubuntu's implementation of KDE), there is a quick-navigation button that looks like a folder.




If you want to go to your Documents folder, you would go to the quick navigation button and then select Documents. Then you would click Open to open it.











In Gnome in Ubuntu's default layout (though you can change it to a one-button format if you'd like), you have separate buttons for applications, for folder navigation, and for system preferences.



To go to your Home Folder or Documents folder, you click on Places and then select the location you want to go to.









#################################################

Renaming Files


#################################################

In both

KDE and Gnome

, you rename a file (just as you would in Windows) with the F2 key. In older versions of KDE, the rename would focus on the entire filename, including the extension. In newer versions of KDE, the renaming process focuses on only the main filename and leaves out the extension. The renaming happens in a pop-up window, which you can confirm or cancel when you're done.






KDE also defaults to a single-click instead of double-click for opening files. So if you stick with the single-click, you'll have to hold down Control while selecting the file so that you just select the file and don't open it.







In

Gnome

, renaming a file also focuses on the main file name, but it does so inline and not with a pop-up window.
File Browser Preferences















KDE has a reputation for having confusing menus and options. I tend to think of it as just a different approach. In the file browser preferences, for example, you see three main options and then a lot of minor options in each submenu.

There are many examples.......not listed here.....

25 May, 2009

Java is not without drawbacks......???

5. Disadvantages of Java

Like any programming language, Java is not without drawbacks. Java is an interpreted language, so programs written in Java won't be speed demons. Still, for most programs that students write, speed is secondary. With ever-faster computers available at bargain prices, Java should be fast enough for all but the most time-intensive programs.

Other problems stem from Java's youth. For one thing, Java isn't available on all platforms. Although Java will likely spread to more as time goes on, it's unlikely to be implemented on older platforms. That will cause problems for institutions that lack funds for hardware and software upgrades. Still, that barrier should be only a temporary one.

Java is relatively immature. Although the language itself is unlikely to change dramatically, we can expect significant changes in the Java API and associated technology. (The latest version of the Java Development Kit, JDK 1.1, is currently in beta. It features a host of changes to the API.) Still, C++ has been in a state of almost continuous change since it was created--the official standard isn't expected for another year or two--but that hasn't stopped industry and academia from adopting it.

Java is also hampered by a shortage of genuine textbooks. This problem should also take care of itself within a short time.

The syntax of Java can be criticized. Making Java resemble C and C++ was a shrewd move on the part of Java's designers: the language looks familiar to most software developers, making it easy to switch to. On the other hand, Java has inherited some of the quirks and traps of C and C++. For example, the placement of semicolons can easily trip up the beginner. The ``dangling if'' problem is present in Java; most modern languages have eliminated it. C's /* ... */ comment style is supported, allowing students to accidentally ``comment out'' parts of their programs.

what about this............

also see this ...........


# No separation of specification from implementation. Java classes aren't divided into specification and implementation parts. Hosch feels that this is an important point for beginners and would like ``this distinction between specification and implementation to be supported by the syntactic structure of the language.'' Lacking such a separation, he would at least like to be able to write prototypes for methods, which Java doesn't allow except within an abstract class or interface.

# No preconditions and postconditions. Hosch's introductory course emphasizes preconditions and postconditions, for which he would like language support. Java, like most languages, has no such support. (Among major languages, only Eiffel does.)

# Visibility rules are ``baroque.'' Hosch decries the many types of visibility in Java. He also laments that Java's syntactic support for hierarchical packages doesn't carry any semantic significance.

# No support for genericity. Hosch notes Java's lack of support for writing generic data structures and methods. As a substitute, he would accept ``type by association,'' such as Eiffel's anchored types.

# No enumeration types. Java lacks enumeration types entirely, although they can be simulated by creating a series of named constants.

# No local constants. In Java, variables that belong to a class can be made constant by declaring them to be final. Variables that are local to a method cannot be declared final, however.

# Exceptions not caught within a method must be declared as thrown by that method. Hosch finds this requirement to be onerous: ``for introductory students, it's a sequence of ugly, unintelligible syntactic marks.''

14 May, 2009

Math for Programmers

1. Math is a lot easier to pick up after we know how to program. In fact, if we're a halfway decent programmer, we'll find it's almost a snap.

2. They teach math all wrong in school. Way, WAY wrong. If we teach ourself math the right way, we'll learn faster, remember it longer, and it'll be much more valuable to us as a programmer.

3. Knowing even a little of the right kinds of math can enable we do write some pretty interesting programs that would otherwise be too hard. In other words, math is something we can pick up a little at a time, whenever we have free time.

4. Nobody knows all of math, not even the best mathematicians. The field is constantly expanding, as people invent new formalisms to solve their own problems. And with any given math problem, just like in programming, there's more than one way to do it. We can pick the one we like best.

5. Math is... ummm, please don't tell anyone I said this; I'll never get invited to another party as long as I live. But math, well... I'd better whisper this, so listen up: (it's actually kinda fun.)

Java vs. Python Productivity

#################################################
JAVA:---------------

statically typed:>>>>>>>>>>>>>>>>>>

In Java, all variable names (along with their types) must be explicitly declared. Attempting to assign an object of the wrong type to a variable name triggers a type exception. That's what it means to say that Java is a statically typed language.

Java container objects (e.g. Vector and ArrayList) hold objects of the generic type Object, but cannot hold primitives such as int. To store an int in a Vector, you must first convert the int to an Integer. When you retrieve an object from a container, it doesn't remember its type, and must be explicitly cast to the desired type.

PYTHON:-----------

dynamically typed:>>>>>>>>>>>>>>>>>>>>>>

In Python, you never declare anything. An assignment statement binds a name to an object, and the object can be of any type. If a name is assigned to an object of one type, it may later be assigned to an object of a different type. That's what it means to say that Python is a dynamically typed language.

Python container objects (e.g. lists and dictionaries) can hold objects of any type, including numbers and lists. When you retrieve an object from a container, it remembers its type, so no casting is required.

#################################################
Example:>>>>>>>>>>>>>>>>>>

In the following example, we initialize an integer to zero, then convert it to a string, then check to see if it is empty. Note the data declaration (highlighted), which is necessary in Java but not in Python. Notice also how verbose Java is, even in an operation as basic as comparing two strings for equality.

JAVA:------------------

int myCounter = 0;
String myString = String.valueOf(myCounter);
if (myString.equals("0")) ...

// print the integers from 1 to 9
for (int i = 1; i < 10; i++) {
System.out.println(i);
}


PYTHON:----------------

myCounter = 0
myString = str(myCounter)
if myString == "0": ...

# print the integers from 1 to 9
for i in range(1,10):
print i

#################################################
EXAMPLE:>>>>>>>>>>>>


Your application has an Employee class. When an instance of Employee is created, the constructor may be passed one, two, or three arguments.

If you are programming in Java, this means that you write three constructors, with three different signatures. If you are programming in Python, you write only a single constructor, with default values for the optional arguments.

JAVA:------------

public class Employee
{
private String myEmployeeName;
private int myTaxDeductions = 1;
private String myMaritalStatus = "single";

//--------- constructor #1 -------------
public Employee(String EmployeName)
{
this(employeeName, 1);
}

//--------- constructor #2 -------------
public Employee(String EmployeName, int taxDeductions)
{
this(employeeName, taxDeductions, "single");
}

//--------- constructor #3 -------------
public Employee(String EmployeName,
int taxDeductions,
String maritalStatus)
{
this.employeeName = employeeName;
this.taxDeductions = taxDeductions;
this.maritalStatus = maritalStatus;
}
...


PYTHON:-------------

class Employee():

def __init__(self,
employeeName, taxDeductions=1, maritalStatus="single"):

self.employeeName = employeeName
self.taxDeductions = taxDeductions
self.maritalStatus = maritalStatus
...
#############
In Python, a class has only one constructor. The constructor method is simply another method of the class, but one that has a special name: __init__



#################################################

APPENDIX: About static vs. dynamic typing, and strong vs. weak typing, of programming languages.

JAVA:-----------

In a statically typed language, every variable name is bound both (1) to a type (at compile time, by means of a data declaration) and (2) to an object. The binding to an object is optional — if a name is not bound to an object, the name is said to be null. Once a variable name has been bound to a type (that is, declared) it can be bound (via an assignment statement) only to objects of that type; it cannot ever be bound to an object of a different type. An attempt to bind the name to an object of the wrong type will raise a type exception.



PYTHON:----------------

In a dynamically typed language, every variable name is (unless it is null) bound only to an object. Names are bound to objects at execution time by means of assignment statements, and it is possible to bind a name to objects of different types during the execution of the program.


#################################################
Email Me:-------- codes47@gmail.com

guess...????? About java and python

##########################################
JAVA:---------
statically typed:>>>>>>>>>>>>>>

The classic "Hello, world!" program illustrates the relative verbosity of Java.

In Java, all variable names (along with their types) must be explicitly declared. Attempting to assign an object of the wrong type to a variable name triggers a type exception. That's what it means to say that Java is a statically typed language.

Java container objects (e.g. Vector and ArrayList) hold objects of the generic type Object, but cannot hold primitives such as int. To store an int in a Vector, you must first convert the int to an Integer. When you retrieve an object from a container, it doesn't remember its type, and must be explicitly cast to the desired type.

PYTHON:--------

dynamically typed:>>>>>>>>>>>>>

In Python, you never declare anything. An assignment statement binds a name to an object, and the object can be of any type. If a name is assigned to an object of one type, it may later be assigned to an object of a different type. That's what it means to say that Python is a dynamically typed language.

Python container objects (e.g. lists and dictionaries) can hold objects of any type, including numbers and lists. When you retrieve an object from a container, it remembers its type, so no casting is required.

#########################################
JAVA:--------

verbose:>>>>>>>>>>>>>>
"abounding in words; using or containing more words than are necessary"

PYTHON:--------

concise (aka terse)>>>>>>>>>>>
"expressing much in a few words. Implies clean-cut brevity, attained by excision of the superfluous"
#########################################

JAVA:-----
public class HelloWorld
{
public static void main (String[] args)
{
System.out.println("Hello, world!");
}
}


Python:----

print "Hello, world!"

&

print("Hello, world!") # Python version 3
##########################################
EXAMPLE:>>>>>>>>>>>>>>>>>>>>

In the following example, we initialize an integer to zero, then convert it to a string, then check to see if it is empty. Note the data declaration (highlighted), which is necessary in Java but not in Python. Notice also how verbose Java is, even in an operation as basic as comparing two strings for equality.

JAVA:---------

int myCounter = 0;
String myString = String.valueOf(myCounter);
if (myString.equals("0")) ...

// print the integers from 1 to 9
for (int i = 1; i < 10; i++) {
System.out.println(i);
}

PYTHON:----------

myCounter = 0
myString = str(myCounter)
if myString == "0": ...

# print the integers from 1 to 9
for i in range(1,10):
print i
#########################################
BEST EXAMPLE:>>>>>>>>>>>>>>>

Your application has an Employee class. When an instance of Employee is created, the constructor may be passed one, two, or three arguments.

If you are programming in Java, this means that you write three constructors, with three different signatures. If you are programming in Python, you write only a single constructor, with default values for the optional arguments.

JAVA:>>>>>>>

How to Improve your Skills as a Programmer

Gather complete requirements.
Take the time to write down what the end product needs to achieve. Clarity of thought at this stage will save a lot of time down the line.
Write an implementation plan (or model).

For something small and self-contained, this might just be a basic flowchart or an equation.
For larger projects, it helps to break it into modules and consider what job each module must do, how data gets passed between modules, and within each module how it will function.

Although it is fun to dive straight into code, it is equally tedious to spend hours debugging. By taking the time to design the structure on paper, you will drastically reduce your debugging time (and you may also spot more efficient ways of doing things even before you write the first line of code).

Add Comments to your code.

Whenever you feel your code needs some explanation, drop some comments in. Each function should be preceded by 1-2 lines describing the arguments and what it returns. (Comments should tell you why more often than what. Remember to update the comments when you update your code!)

Use naming conventions for variables.

It will help you keep track of what type the variable is and also what it's purpose is. Although this means more typing than x = a + b * c, it will make your code easier to debug and maintain. One popular convention is Hungarian notation where the variable name is prefixed with its type. e.g. for integer variables, intRowCounter; strings: strUserName. It doesn't matter what your naming convention is, but be sure that it is consistent and that your variable names are descriptive. (See Warnings below)
Organize your code.

Use visual structure to indicate code struture. i.e. indent a code block that sits within a conditional (if,else,...) or a loop (for,while,...) Also try putting spaces between a variable name and an operator such as addition, subtraction, multiplication, division, and even the equal sign (myVariable = 2 + 2). As well as making the code more visually elegant, it makes it much easier to see the program flow at a glance. (See tips on indentation below)
Test.

Start by testing it with inputs that you would typically expect. Then try inputs that are possible but less common. This will flush out any hidden bugs. There is an art to testing and you will gradually build up your skills with practice.
Write your tests to always include the following:

Extremes: zero and max for positive values, empty string, null for every parameter.
Meaningless values, Jibberish. Even if you don't think someone with half a brain might input that, test your software against it.
Wrong values. Zero in a parameter that will be used in a division, negative when positive is expected or a square root will be calculated. Something that is not a number when the input type is a string, and it will be parsed for numeric value.

Practice. Practice. Practice.

Be prepared for change.

In a realistic working environment, requirements change. However, the clearer you are at the start about the requirements and the clearer your implementation plan, the less likely those changes will be down to misunderstanding or "Ah, I hadn't thought of that" scenarios.

You can take an active role in improving clarity of thinking by presenting your requirements document or your implementation plans before coding to ensure that what you are planning to create is actually what's been asked for.
Structure the project as a series of milestones with a demo for each block. Approach the programming one milestone at a time - the less you need to think about at any moment, the more likely you will think clearly.
Start simple and work towards complexity.

When programming something complex, it helps to get the simpler building blocks in place and working properly first.
For example, let's say you want to create an evolving shape on screen that follows the mouse and where the degree of shape change depends on mouse speed.

Start by displaying a square and get it to follow the mouse, i.e. solve movement tracking on its own.
Then make the size of the square relate to mouse speed, i.e. solve speed-to-evolution tracking on its own.
Finally create the actual shapes you want to work with and put the three components together.
This approach naturally lends itself to modular code writing, where each component is in its own self-contained block. This is very useful for code reuse (e.g. you want to just use the mouse tracking in a new project), and makes for easier debugging and maintenance.

19 April, 2009

HELLÖ

HELLOWWW.....

I m ASHISH....
and this is my first blog site..

HEY SEE THIS....its working...
 
© 2009 Hitting codes Stealthily. All Rights Reserved | Powered by Blogger
Design by psdvibe | Bloggerized By LawnyDesigns