Wednesday, April 27, 2011

Top Electric Cars Launching in India

Top Electric Cars Launching in India
Electric car is an alternate fuel automobile that uses electricity instead of petrol or diesel. These automobiles have electric motors and controllers used for propulsion. These vehicles do not use the traditional or the common methods of propulsion like ICE (internal combustion engine). These cars are energy efficient and are capable of reducing city pollution because of the zero tail pipe emission.
 On-board battery packs are the main power supply to the car. The functioning of the cars greatly depends on the quality of the battery used in the car. The poor battery may result into long hours of recharging and poor speed with poor acceleration. These cars are not practically suitable for long journey but can be a good transportation vehicle for everyday use and can be recharged overnight.
Hyundai i10 Electric The new electric version of i10 is termed as zero-emission urban commuter consisting a 16kWh battery and a 49kWh electrical motor. The batteries incorporate Li-Poly batteries that are capable to produce equaling power as compared to NiMH batteries. The advantage of Li-Poly batteries over the NiMH batteries is that, Li-poly weighs much lesser than that of NiMH. Recharging the batteries from 220V outlet will take up to 5 hours whereas recharging from a 413V outlet will take only 15 minutes to complete 85% of the charge. You can drive up to 160 km with the top speed of 130 kmph.
Image credit: http://www.amitbhawani.com/auto/wp-content/uploads/2010/02/Hyundai-I10-Electric-Review.jpg
General Motors - Chevrolet Electric Spark / Chevrolet E-Spark Chevrolet Beat is the latest launch of General Motors. General displayed 11 concept vehicles at Auto Expo. Out of the three themes, 'Chevrolet Hot Hatch’ was the one which had everyone’s attention and all eyes on it. The category highlighted three hatchback cars Chevrolet Spark, Beat and Aveo U-VA. The Electric Spark will run on an all-electric drive train while the Volt will save an estimated 1,892 liters of petrol every year if driven for 64kms every day.
Image credit: http://images.google.com/url?source=imgres&ct=img&q=http://www.instablogsimages.com/images/2010/01/07/chevrolet-e-spark_Vzsis_5638.jpg&usg=AFQjCNF7rR5HsRo3VAT-XdP-JeJZeMKKGw
General Motors - Chevrolet Volt Chevrolet Volt is an electric car that is capable of creating its own electricity. Once it is charged completely, it is ready to run on electric charge for up to a range of 40 miles i.e. 64.374 km. After that, Volt keeps going, even if you can't plug it in. Volt uses a range-extending gas generator that produces enough energy to power it for hundreds of miles on a single tank of gas.
Image credit: http://images.google.com/url?source=imgres&ct=img&q=http://energyethos.files.wordpress.com/2008/12/800px-chevrolet-volt-dc.jpg&usg=AFQjCNHyUftrm5w4ojqRAdK8gZEN_FZQAw
Toyota Prius The second hybrid car launched at Auto Expo that will be available in Indian market is Toyota Prius. The Prius was launched in 2009 in the international market. The design is more aerodynamic if compared to the previous version of it. The coefficient of drag reduced to 0.25 Cd, The 1.8-liter petrol engine generates about 100PS and with the added power of the electric motor, combined power is 136PS. The Prius engine, with an electric water pump, is the first production engine that requires no accessory belts improving fuel economy.
Image credit: http://upload.wikimedia.org/wikipedia/commons/thumb/e/ed/Toyota_Prius_III_20090710_front.JPG/800px-Toyota_Prius_III_20090710_front.JPG
Reva NXR and NXG The REVA Electric Car company is the leader in the electric car producer and is ready to launch two new and improved electric car version namely REVA NXR and REVA NXG. Unlike the previous electric car REVA, which was two seater , small and compact car, the NXR is a three door, four seater and much spacious model. It can accelerate to a maximum speed of 105 km/h with a range of 160 kilometers on a single charge of its lithium-ion battery pack. The new models are coming up with improved charging that might result in 15-minute faster recharge as compared to the older version. However, it might take up to 8 hours to completely recharge the battery packs from a regular household outlet.

Monday, April 25, 2011

Programming Language Market Share (Java vs php vs ruby) (POPULARITY OF PROGRAMMING LAGUAGES)


source: www.zacker.org
Popular programming language ACCORDING TO MARKET SHARE......(%):
1. JAVA
2. PHP
3.PERL
4. C#
5. PYTHON
6. RUBY

PHP vs Java vs Ruby


This week, a lot of focus is on the other open frameworks that have risen during the same era, and their comparative value in a post open source Java world. One such take is from well-known Sun insider, Tim Bray, who spoke at last week's International PHP Conference in Germany.

Bray, who is Director of Web Technologies at Sun Microsystems, co-creator of theXML 1.0 and XML Namespace standards, co-founder of Open-Text, and contributor to the Atom Publishing standard (whew!) spoke in a presentation entitled “How to combine PHP technology with Java based on Enterprise Systems” .
In the slide below, Bray outlines the basic advantages of each of these three platforms (or rather the two languages and one framework if you are scoring at home). In perhaps in a nod to his new employer, Sun, Bray totally omits any mention of .NET or smaller products like Adobe's Flex/ColdFusion platform.
His idea, if you are able to take it on the surface only, is to rate your priorities of: 1) Scalability, 2) Dev Speed, 3) Dev Tools, and 4) Maintainability. In this highly generalized approach, you could theoretically pick your web application building language/framework based on only these priorities.
Tim weighs-in heavy on the maintainability side, and we'd tend to agree with him. To quote:
“Good apps, once built, tend to be in production for an astonishingly long time. Which means that they have to be maintained for an astonishingly long time. Which means that maintainability is important. There are a lot of things that go into maintainability, but I suggest that the biggies are object-orientation, MVCarchitecture, code readability, and code size.”
On the maintainability side Tim places Ruby on Rails out front. Quoting him again, Tim describes why RoR is in the lead here.
“Mostly because there's less code. The fact that Ruby forces MVC on you helps too, also the fact that the templating and [Object Relational Mapping (ORM)] and testing and application code are all so tightly integrated helps. Bear in mind that we still don't know how well Rails is going to work outside of the CRUD-centered greenfield app space where it shines.”
Tim's metrics don't really exist on a quantitative level nor are they based on any published statistics — just a very informed intellect and a privileged position. Obviously, additional parameters such as total cost of ownership and native security (PHP, we are looking at you) should also play a big role the decision making process.
As you can probably guess, in response to this presentation, the proponents of Java,PHP and Ruby are lighting the Internet aflame in defense of their platform of choice and at the same time nay-saying their fellow players. While very entertaining and sometimes educational to follow, not much is going to be gained from this bickering.
Bray concludes the presentation with the Rodney King-esque statement “One way or another we all have to integrate.”
The reality is that there are a great number of ways to hone-in on the language or framework choice for a web application. Many factors have to be considered and weighed against each other. The beauty of what we have today is that there ARE a great many choices out there, much more-so than even a few years ago.
The fact that open source options are being stacked up against the likes of Java and .NET, and have a similar levels of support is a blessing. Today, with the open-sourcing of Java, we have a new entry onto the field. Rather than exclude one or another, this arrival is going to make the open source web world, warmer, more sophisticated, and for better or worse, a little sunnier.

Ruby for the Java world


Ever since the invention of the computer, software development has been trending towards higher-level languages. From assembly language, to C, to C++, to Java, each step up has met with the same criticisms from the old guard: it's slow; it's buggy; developers don't want to lose control. But gradually, as hardware has sped up, and new research and development has improved compilers, interpreters, and virtual machines, developers have inevitably migrated to the higher level, enhancing their productivity by freeing themselves from lower-level concerns
Java now holds the lead in many areas of software development, but dynamic languages threaten to bypass it in this inexorable climb. Languages such as Python, Perl, Rexx, Groovy, TCL, and Ruby have been doing yeoman service in specialized domains such as file processing, test automation, software builds, glue code, and Web GUIs for years—hence, their historic name "scripting languages." But in the last few years, they have been making headway in the heavy-duty jobs once reserved mostly for C++, Java, and other compiled languages.
In the last year, the Ruby on Rails (RoR) Web framework has given Ruby a big boost. RoR builds definitions for all tiers of a typical Web application—GUI, business logic, and persistence—from simple Ruby code, thereby minimizing redundancy, boilerplate code, source-code generation, and configuration. RoR's ease of use showcases the Ruby language; and Ruby, a full-fledged software language, has much more to offer than RoR.
As a long-time Java developer, I am likely to stick with Java for some time to come. But I keep my eye on other languages that can play a role in my Java-based systems, and Ruby has recently emerged as a particularly good candidate. With the help of the JRuby interpreter, Ruby works well with Java, configuring, integrating, and reusing Java software (more on that below). And simply learning Ruby has improved my Java code. Ruby lets me easily accomplish techniques such as functional programming and metaprogramming, which in Java I can only do with difficulty. Learning these techniques in Ruby has helped me better appreciate when and how to use them in Java development.
With this article, I hope to share with you some of my excitement about what Ruby can do for my Java-based systems. I compare the strengths and weaknesses of both Java and Ruby, and present the pros and cons of the JRuby interpreter. I also show where to best draw the dividing line between Java and Ruby to benefit from each. I illustrate these points with code samples and present a messaging example that shows how to integrate Java systems with Ruby, putting to good use the flexibility, expressiveness, and power of a dynamic metaprogrammable language.

Ruby vs. Java

This article explains Ruby from the Java developer's viewpoint, focusing on a comparison between the two languages. Like Java, Ruby is a full-featured object-oriented language. But there are many significant differences. Ruby is dynamically typed and runs in a source-code interpreter, and it conveniently supports metaprogramming as well as the procedural and functional paradigms. I won't go into details of Ruby syntax, since that subject has been covered extensively elsewhere.

Dynamic typing

Java has static typing. You declare the type of each variable, and then, during compilation, you get an error message if you use a variable of the wrong type. Ruby, on the other hand, has dynamic typing: You don't declare types for variables or functions, and no type-check occurs until runtime, when you get an error if you call a method that doesn't exist. Even then, Ruby doesn't care about an object's class, just whether it has a method of the name used in the method call. For this reason, the dynamic approach has earned the name duck typing: "If it walks like a duck and quacks like a duck, it's a duck."
Listing 1. Duck typing
class ADuck
def quack()
puts "quack A";
end
en d
class BDuck
def quack()
puts "quack B";
end
en d
# quack_it doesn't care about the type of the argument duck, as long
# as it has a method called quack. Classes A and B have no
ck end
# inheritance relationship. def quack_it(duck) duck.qu
a
a = ADuck.new
b = BDuck.new
ack_it(b)
quack_it(a) q
u


Java also lets you achieve dynamic typing, using reflection, but this clumsy and verbose workaround produces confusing exceptions like NoSuchMethodError and InvocationTargetException; in practice, these exceptions tend to pop up in reflective Java code far more often than the equivalents in Ruby.
Even in nonreflective Java code, you often lose static type information. For example, execute() methods in the Command design pattern must return Object rather than a specific type in pre-Java 5 code, resulting in ClassCastExceptions. Likewise, when signatures change between compile-time and runtime, runtime Errors ensue. In practice, whether in Java or Ruby, such errors rarely cause severe field bugs. A strong unit test suite—which you need anyway!—generally catches them in time.
Ruby's dynamic typing means you don't repeat yourself: How often in Java have you had to suffer through verbose code along the lines of XMLPersistence xmlPersistence = (XMLPersistence)persistenceManager.getPersistence();? Ruby eliminates the need for the type declaration and casting (as well as parentheses and semicolon): a typical Ruby equivalent would be xmlPersistence = persistence_manager.persistence.
Ruby's dynamic typing does not mean weak typing—Ruby always requires you to pass objects of the correct type. Java, in fact, enforces types more weakly than Ruby. For example, Java evaluates "4" + 2 as "42", coercing the integer to a string, while Ruby throws a TypeError, telling you it "can't convert Fixnum into String." Likewise, Java, sacrificing correctness for speed, can silently overflow an integer operation, producing weirdness such as Integer.MAX_VALUE + 1, which equalsInteger.MIN_VALUE, while Ruby simply expands integers as needed.
Despite Ruby's advantages, Java's static typing does give it one ability that leaves it as the preferred choice for large-scale projects: Java tools understand code at development-time. IDEs can trace dependencies between classes, find usages of methods and classes, auto-complete identifiers, and help you refactor code. Though parallel Ruby tools exist with limited functionality, they lack type information and so cannot perform all these tasks.

Interpreted language

Ruby runs in an interpreter, so you can test code without a distracting wait from the compiler; you can even run Ruby interactively, executing each line as you type it. Besides the fast feedback, interpreted languages have a rarely noted advantage in dealing with field bugs. With compiled languages, to analyze the code causing a field bug, the field engineer must determine the deployed application's exact build version and then look up the code in the source-code configuration management system. In real life, often this is simply impossible. With interpreted languages, on the other hand, the source code is immediately available for analysis and even, when necessary, for emergency on-the-spot fixes.

Interpreted languages have an unfortunate reputation for slowness. Compare the history of Java, a "semi-compiled" language: In the early years, the JVM always interpreted the bytecode at runtime, which contributed to Java's reputation for slowness. Yet Java developers quickly learned that most applications spend most of their time waiting on the user or network I/O and the remaining bottlenecks are best optimized in higher-level algorithms, rather than in raw low-level tweaks. Over the years, Java rapidly gained speed; for example, just-in-time compilers with optimization based on dynamic analysis sometimes allow Java to outdo C++, which is limited to optimization based on static compile-time analysis.
Already, for most applications, Ruby is no slower than other languages. In the near future, Ruby will get a further boost as Ruby's native interpreter moves to a bytecode-based system and the JVM JRuby interpreter gains the ability to compile Ruby to Java bytecode. Eventually, any performance lag will gradually become negligible for most functionality.

Functional programming

Ruby supports multiple programming paradigms with equal ease. In addition to its pure object-oriented style (even integers and the like are objects), it also supports a procedural style suited to one-off scripts: you can write code outside any class or function, as well as functions outside any class. (Ruby silently adds these functions to the Object class, maintaining the object-orientation behind the scenes.)
Most interestingly, for Java programmers looking for new and useful perspectives, Ruby supports the functional paradigm. You can use most functional programming constructs in Java, with some support from libraries such as Jakarta Commons Collections, but the syntax is clumsier. (See "Functional Programming in the Java Language" by Abhijit Belapurkar and Jakarta Commons Collections in Resources.) Ruby, though not a purely functional language, treats functions and anonymous blocks of code as full citizens of the language, which can be passed around and manipulated like any ordinary objects.
In Java, you often iterate over a collection's Iterator, running the logic on each element. But the iteration is just an implementation detail: in general, you are just trying to apply the same logic to each element of a collection. In Ruby, you pass a code block to a method that does just that, iterating behind the scenes. For example, [1, 2, 3, 4, 5].each{|n| print n*n, " "} prints the string 1 4 9 16 25; an iterator takes each element of the list and passes it into the code block as the variable n.
Functional programming is useful in wrapping code blocks with instructions to be executed before and after the block. For example, in Java, you can use the Command design pattern to ensure the opening and closing of a file, database transaction, or other resource. This burdens the code with the useless overhead of an anonymous inner class and callback method; in addition, there is the distracting rule that variables passed into the anonymous Command class must be declaredfinal. And to ensure that logic always executes at the end of a code block, the whole thing must be wrapped withtry{...}finally{...}.
In Ruby, you can wrap any function or code block, with no need for anonymous classes or method definitions. In Listing 2, the file opens, then closes after the write() method. No code is needed beyond the transaction() method and the code block.
Listing 2. Wrap a code block
File.open("out.txt", "a") {|f|
f.write("Hello")
}


Metaprogrammable language

You generally define your Java classes as source code, but you can also manipulate class definitions at runtime. This requires advanced techniques such as bytecode enhancement during class-loading. Hibernate, for example, inserts data-access logic directly into the business objects' bytecode, saving the application programmer from coding the extra data-access layer. But class manipulation, called metaprogramming, is practical only for infrastructure programmers: application programmers cannot usefully introduce these tricky and fragile techniques.
Even at development time, Java limits the developers' ability to change classes. To add an isBlank() method that tells you if a String is all white space, you'd have to add a StringUtils class with the static method (as Apache Commons does); logically, the new method belongs in String.
In Ruby, on the other hand, you can simply extend the built-in String class with a blank? method. In fact, because in Ruby everything is an object, you could even augment the Fixnum class, the equivalent of Java's primitive int, as shown in Listing 3.
Listing 3. Add method to built-in classes String and Fixnum
class String
# Returns true if string is all white space.
# The question mark indicates a Boolean return value.
def blank?() !(self = /\S/) end
en d
class Fixnum
# Returns 0 or 1 which in Ruby are treated as false and true respectively.
def odd?() return self % 2 end
en d
puts " ".blank? # true
# The next line evaluates if-then similarly to Java's ternary operator ?:
puts (if 23.odd? then "23 odd" else "23 even" end)


JRuby: Ruby in a Java world

As a Java programmer, you won't want to use Ruby in production until you can get it to interact with existing Java applications and libraries, which hold within them a tremendous variety of essential functionality. JRuby, an open source Ruby interpreter for the JVM, simplifies Ruby-Java integration. You can call Java libraries from Ruby, script Java applications with an embedded interpreter, or even use Ruby libraries from Java. Exactly the same Ruby code runs in JRuby and the standard Ruby interpreter, except where Ruby code calls into native (C-coded) or Java libraries.
The JVM is often contrasted with .Net's multilanguage Common Language Runtime as supporting only a single language. But in fact, the JVM executes not only Java, but also Python, JavaScript, Groovy, Scheme, and many other languages, which means that where necessary, Ruby code can interact with these languages as well
As of mid-July 2006, JRuby remains in prerelease mode (version 0.9). But it's catching up rapidly: a team of volunteers has released five versions since January 2005. JRuby's maturity is continually evaluated with a test suite that calibrates it against the standard interpreter, and it now passes more than 90 percent of the tests plus provides basic support for Ruby on Rails.
To try JRuby, be sure that Java SE 5 is installed and that JAVA_HOME is set. (Java Runtime Environment 1.4 was supported in JRuby 0.8.3 and below; it will be supported from the next patch release after 0.9.) Download the compressed file from the project's page and uncompress it. Set the JRUBY_HOME environment variable to the JRuby base directory. You can experiment interactively with jirb in the bin directory. For most purposes, you'll use the jruby interpreter—create a file and pass its name as a parameter to the jruby batch/shell script in directory bin.
In addition to running ordinary Ruby code, you can also use JRuby to construct Java objects, call Java methods, and inherit from Java classes. A Ruby class can even implement Java interfaces—necessary for statically calling Ruby methods from Java.
To initialize the libraries used for accessing Java from Ruby, start with require "java". Then specify the Java classes to use with the include_class method, for example, include_class "javax.jms.Session". You can include an entire Java package into a Ruby module with include_package. Like Java's wildcard package-import statement, it's advisable to avoid the namespace pollution of include_package; in JRuby, there is the additional penalty of a performance hit as the interpreter searches all packages for the desired class. Stick to include_class where possible.
The names of many Java standard classes overlap with the names of Ruby classes. To resolve collisions, pass a code block into the include_class function, returning a new name for the Java class, and JRuby will use this as an alias (see Listing 4).
Listing 4. Include a Java class with clashing name
require "java"
# The next line exposes Java's String as JString
include_class("java.lang.String") { |pkg, name| "J" + name }
s = JString.new("f")


Alternatively, you can create a Ruby module that includes the Java class definitions, but in a separate namespace. For example:
Listing 5. Java module importing multiple Java classes
require "java"
module JavaLang
include_package "java.lang"
end
s = JavaLang::String.new("a")


What's JRuby good for?

Dynamic languages like Ruby are most commonly used for specialized areas such as gluing other systems together; JRuby takes on this role in the Java world. For example, JRuby can pull data from one system, transform it and insert it into another. When the requirements change, modifying a JRuby script is as easy as changing a configuration file, thereby avoiding the complex compile-and-deploy cycle of Java integration code.
In addition to calling Java from Ruby, you can call Ruby from Java, making your application scriptable. With JRuby's minimal syntactic overhead, you can create an easy-to-use domain-specific language for users to work with For example, a gaming engine's scripting system can present Ruby classes describing characters, vehicles, and other game entities.
Moreover, with Ruby's dynamism, users can change definitions of scriptable classes. The Ruby objects allow direct method access to state and behavior. With Java, on the other hand, you typically pass around a Map with user-configurable keys, lacking the full functionality of objects.
A Ruby script is like a souped-up configuration file. Configuration for Java applications typically comes in an XML or properties file, but these are limited only to parameters decided on at development time. With a Ruby script fed to your scripting system either from a text file or from an embedded editor, the user can freely customize behavior wherever you choose to place a scripting hook. In this way, Ruby combines configuration with behavior, providing the functionality of Java plug-in APIs, but without a Java IDE or a compiler, and sparing the additional steps of building and deploying jar files.
For example, a user-provided script can hook into an application's management events to filter for certain suspicious conditions, then send a notification to a system administrator and log into a special security-issues database, or a start-up script can purge old files and reinitialize custom datastores. Likewise, many rich clients allow users to change the position of menus and toolbars—with a JRuby hook, a user's new menu items trigger any behavior the user wants.
For convenience in scripting Java applications, the Bean Scripting Framework (BSF) provides a standard interface between the JVM and multiple dynamic languages, including Ruby, Python, BeanShell, Groovy, and JavaScript; Java Specification Request (JSR) 223, the successor of BSF, will be a standard part of Java 6. The Java code can send variables into the JRuby namespace; JRuby can manipulate these Java objects directly or return a value back to Java. With the BSF and JSR 223, the syntax for interoperation between Java and any scripting language is the same. Listing 6 shows a basic example of BSF use with Ruby, and the full code is in the online samples under the directory bsf_example. Note that BSF does not include JRuby support out of the package; but simple instructions for adding it are available in the JRuby documentation.

To Ruby From Java


Java is mature. It’s tested. And it’s fast (contrary to what the anti-Java crowd may still claim). It’s also quite verbose. Going from Java to Ruby, expect your code size to shrink down considerably. You can also expect it to take less time to knock together quick prototypes.

Similarities

As with Java, in Ruby,...
  • Memory is managed for you via a garbage collector.
  • Objects are strongly typed.
  • There are public, private, and protected methods.
  • There are embedded doc tools (Ruby’s is called RDoc). The docs generated by rdoc look very similar to those generated by javadoc.

Differences

Unlike Java, in Ruby,...
  • You don’t need to compile your code. You just run it directly.
  • There are several different popular third-party GUI toolkits. Ruby users can try WxRubyFXRubyRuby-GNOME2, or the bundled-in Ruby Tk for example.
  • You use the end keyword after defining things like classes, instead of having to put braces around blocks of code.
  • You have require instead of import.
  • All member variables are private. From the outside, you access everything via methods.
  • Parentheses in method calls are usually optional and often omitted.
  • Everything is an object, including numbers like 2 and 3.14159.
  • There’s no static type checking.
  • Variable names are just labels. They don’t have a type associated with them.
  • There are no type declarations. You just assign to new variable names as-needed and they just “spring up” (i.e. a = [1,2,3]rather than int[] a = {1,2,3};).
  • There’s no casting. Just call the methods. Your unit tests should tell you before you even run the code if you’re going to see an exception.
  • It’s foo = Foo.new( "hi") instead of Foo foo = new Foo( "hi" ).
  • The constructor is always named “initialize” instead of the name of the class.
  • You have “mixin’s” instead of interfaces.
  • YAML tends to be favored over XML.
  • It’s nil instead of null.
  • == and equals() are handled differently in Ruby. Use == when you want to test equivalence in Ruby (equals() is Java). Use equal?()when you want to know if two objects are the same (== in Java).

Tuesday, April 19, 2011

Installing a Guest Operating System on a Virtual Machine

Virtualization has been widely accepted as a technique to conserve resources. Virtualization is the process of running a guest operating system on a virtual machine, which is created in a virtualizer running on the host operating system. Large companies do not have to install 100 different host computers for its employees as they may create 100 different virtual machines running different guest operating systems on a single host computer.
VMware is one of the main vendors of Linux virtualization solutions. VMware Player may be used to run 32-bit and 64-bit Linux operating systems including openSUSE, RHEL 5, and Ubuntu. VMware also offers Virtual Appliances, which are prebuilt software solutions comprising of virtual machine/s. Virtual Appliances are available for Ubuntu, Red Hat and openSUSE, though an appliance for the latest versions may not be available. For the latest version of openSuse, 11.2, it is recommended to install the openSUSE directly onto the VMware Player. In this article we shall install Oracle database XE in openSuse 11.2 as a guest operating system running in a virtual machine (VM) on a Windows host operating system.
Using Oracle database XE with openSuse 11.2 in VMPlayer requires the following:
  1. Install VMPlayer
  2. Create a virtual machine and install openSUSE 11.2 on the VM
  3. Install Oracle database in openSUSE 11.2
  4. Add user to dba group
  5. Create initialization initXE.ora file
  6. Grant write access to intiXE.ora
  7. Start database instance in NOMOUNT
  8. Modify DB_NAME parameter
  9. Restart database instance in NOMOUNT
  10. Create database
  11. Create database table
  12. Create data dictionary views
Installing VMware Player
Create three folders - openSuse, vmplayer and VMs - for installing openSuse ISO, VMPlayer, and an openSuse virtual machine. First, we need to download the latest version of VMPlayer to the vmplayer folder. The VMPlayer is just an .exe file. Double-click on the .exe file and the VMware Player Setup Wizard gets started.
Click on Next in the Welcome window. Specify the Destination Folder (C:\vmplayer for example) to install the VMware Player. Click on Next. In the Ready to Perform the Requested Operations window click on Continue. The VMware installation gets started. When the installation is completed, the Setup Wizard prompts for restarting the system to complete the installation. Click on Restart Now. After the system has been restarted, the VMware Player installation is completed.
Creating a Virtual Machine
Next, download the openSUSE 11.2 Live KDE ISO (openSUSE-11.2-KDE4-LiveCD-i686.iso) to the openSuse folder. Open the VMware Player. Click on Create a New Virtual Machine to create an openSUSE 11.2 virtual machine as shown in Figure 1.
The New Virtual Machine Wizard gets started. Select the Installer disc image file (iso) radio button and select the openSUSE 11.2 KDE ISO file as shown in Figure 2. Click on Next.
Select a guest operating system as Linux and a version as OpenSUSE as in Figure 3. Click on Next.
Specify a name for the virtual machine and specify the Location of the VM as the VMs directory. Click on Next. Specify the disk size as 40.0 GB and select Split virtual disk into 2GB files as in Figure 4. Click on Next.
Select the memory allocated to the VM. By default one processor is configured. Configure the Network Adapter as Bridged with Replicate physical network connection state as in Figure 5.
Click on Finish to create the openSUSE 11.2 VM and start the installation.
Installing openSUSE 11.2 in the Virtual Machine
After the virtual machine gets created, select Installation in the OpenSUSE Installer boot screen as in Figure 6.
In the Welcome window the license agreement is displayed. Click on Next. Select Time Zone and click on Next. In the Suggested Partitioning window Partition Based is selected by default. Click on Edit Partition Setup. In the Expert Partitioner the Available Storage on Linux gets listed for the different partitions of the VMware type /dev/sda hard disk as in Figure 7. Click on Accept.
Click on Next as in Figure 8.
In the User Settings, create a new user with the Create New User wizard. Click Next. In Installation Settings, review the installation summary and click Install. In the Confirm Installation window click Install. The installation gets started.
After the installation is completed, the system needs to reboot as shown in Figure 9.
The initial booting of openSUSE 11.2 gets completed. Next, the automatic configuration of openSUSE 11.2 gets performed. The openSUSE 11.2 VM gets created and installed as shown in Figure 10.
Installing Oracle Database XE in openSUSE 11.2
Next, we install the Oracle database XE in the openSUSE 11.2 VM. To start the openSUSE 11.2 VM click on Play virtual machine. Select VM > Install VMWare Tools to install VMware Tools. In the openSUSE login window specify the Username and Password.
The VMPlayer Desktop is displayed, as shown in Figure 11.
 Download the Oracle database XE for Linux. Start the Dolphin file manager. Select the Download folder. Right-click on the oracle-xe rpm and select Open with Install Software. Specify a password for the root user and click on OK. The Software Manager will start. Oracle Database 10g XE will be installed.
Adding a User to the dba Group
Next, we test the newly installed database by starting the database. First, start the application launcher. In the application launcher search for Oracle and start the database with Start Database. An error will be generated, "Operation failed. dvohra11 is not a member of ‘dba' group. We need to add the user dvohra11 to the ‘dba' group. In the application launcher select the command line Terminal Konsole. The openSUSE terminal will start the Bash shell. Log in to the openSUSE 11.2 with root privileges with the su command. Add user dvohra11 to the ‘dba' group with the following command as shown in Figure 12.
usermod  -G dba dvohra11
Start the SQL Command line. Having added the user to the ‘dba' group, you will be able to connect as sys to an idle instance.
Creating an Initialization File initXE.ora
Before we create a database and a table, we need to create an initialization file from which the initialization parameters are read. For an ‘XE' SID we need an initXE.ora initialization file. We'll create the initXE.ora file by making a copy of the init.ora file in the directory /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/dbs. In the bash shell cd to the //dbs directory. Create the initXE.ora file with the following command as shown in Figure 13.
cp init.ora initXE.ora

Facebook Turns Light Green, Open Sources Its Data Center

Facebook has been quietly working on building an energy-efficient data center at the lowest possible cost for a year or two and Thursday it open sourced the infrastructure it created under what it calls the Open Compute Project, figuring that many eyes might improve on it.
"We are not the only ones who need the kind of hardware that we are building out," Facebook CEO Mark Zuckerberg said.
The company wasn't getting what it needed from the OEMs so it designed the thing from the ground up and wound up building its own stripped-down Intel and AMD servers, power supplies, server racks and battery backup systems.
Its approach meant it had total control over every part of the system from the software on up and that meant it could use a 480-volt electrical distribution system to reduce energy loss; remove anything in the servers that didn't contribute to efficiency; reuse hot aisle air in winter to heat its offices; and eliminate the need for a central uninterruptible power supply.
As a result it claims its soon-to-open data center in Prineville, Oregon, is 38% more efficient and 24% less expensive to build and run than other state-of-the-art data centers. It's also supposed to support more Facebook users and offer them real-time social experiences - such as the ability to read comments as they are written or see friends of friends appear dynamically as the user searches.
The facility is reportedly fetching a PUE of 1.07, which is below the EPA-defined state-of-the-art industry average of 1.5 and means 93% of the energy from the grid makes it into every so-called Open Compute server

After Ubuntu, Windows Looks Increasingly Bad, Increasingly Archaic, Increasingly Unfriendly

My recent switch to a single-boot Ubuntu setup on my Thinkpad T60 simply floors me on a regular basis. Most recently it's had to do with the experience of maintaining the software. Fresh from a very long Windows 2000 experience and a four-month Windows XP experience along with a long-time Linux sys admin role puts me in a great position to assess Ubuntu. Three prior attempts over the years at using Linux as my daily desktop OS had me primed for failure. Well, Ubuntu takes Linux where I've long hoped it would go - easy to use, reliable, dependable, great applications too but more on that later. It has some elegance to it - bet you never heard that about a Linux desktop before.
There are many night-and-day differences between Windows and Ubuntu and, for a guy that does 80% standard office tasks and the rest of the time I'm doing Linux admin tasks, it was nearly all in favor of Ubuntu after the first few weeks of the transition. Overall, my productivity and the scope of things I can do with Ubuntu far exceed what I could do with Windows and just as importantly Ubuntu (like any Linux would) lets me easily create my own productivity shortcuts of a variety of sorts.
One of the things that's become clear as I've gotten used to the appliance-like experience of Ubuntu is that the future of software in an open source-dominated world is going to be significantly different than the world dominated by Microsoft. So what distant point on the horizon has Ubuntu shone a light on for me? Simple. Software will increasingly compete on ease of use in the total software experience more than on features. The future will be more about being simple than about any other dimension.


Here are some recent use cases:
_ I needed to rebuild my T60 with a fresh OS. Which was easier? MS Windows with a factory install disk, separate disks for Office and for Virus protection and then a lot of hunt-and-peck downloading for various apps like Thunderbird, Firefox, SSH, and Calendar or....Ubuntu with one CD and an OS that includes an integrated, extensible, and slick software package manager where all the software is approved and tailored to the installation?

_ I needed to rebuild a T43. I tried to use the rebuild partition included on the HD but it was corrupt. So I tried to make factory-install disks but the corrupt partition prevented it. Next option? Call Lenovo and get disks sent for $51. That process took five days and eight CD-ROMs from start to finish. With Ubuntu, this process takes three hours max, not four days and there's no software keys or other things to track down. The labor involved is less than a fifth with Ubuntu and the delivered product is a lot more productive - for my use models anyway.

_ I needed to resubscribe to Symantec on a Windows machine. Again this is a 30-60 minute timeout from production AND a $49 charge AND a hassle with product keys and sending data about my machine and purchases around to companies that I'd choose not have it if I had a choice. But I didn't since Windows XP needs Symantec's products badly even though these scanning and cleaning products degrade machine performance badly - even with a gig of RAM.

_ And I now hear that Windows Vista renames the partition it's installed on what used to be the C: partition. I need to check out this story but the very idea of automatic partition renaming is insane to even contemplate.

So my machine sings with Ubuntu. Having no virus scanning alone unleashes a responsiveness that makes the power of the T60's Intel dual-core shine. And what am I noticing most about all of this?
Well, first off Ubuntu is good as a productivity platform. Without that, the rest wouldn't matter a bit. But since Ubuntu is not only good on features but reliability then at least some of us would crawl over broken glass to get it installed.
But, in fact, there's no broken glass in the picture. It's the opposite. Ubuntu's installation is so easy, and maintaining it once it's installed is so simple that Ubuntu nearly falls into your machine like a ying to the hardware's yang. Once there, Ubuntu happily makes a home in your head with hardly a blip. I think Ubuntu actually dropped my blood pressure. Not something you typically find when switching ALL your software for something that's about as alien to Windows as it possibly can be.
Once that major hurdle is cleared, then the other big issues come into focus. Ease of install, easy updates, easy software maintenance, easy data backups. After experiencing Ubuntu, the world of Windows looks increasingly bad, increasingly archaic, increasingly like a neighborhood that makes life hard. Why should I put up with what Windows makes me go through if I don't have to?
I've used rsync for backups for years. I back up my mail, my Thunderbird data, and "my document" directory (i.e., /home/xxxx/). One of these backup commands looks like this and sits in a single shell script and runs from cron once a day (I've already sent the ssh key to the backup target server so no need to manually login to the backup server for this command to run):

rsync -avgz /home/xxxx/.mozilla-thunderbird/ root@mycomcastipnumber:/hdb/ibmt60-ubuntu-mozilla-tbird/ >>
/home/xxxx/backup-.txt 



HP Starts Pushing Desktop Linux

HP has supposedly been selling MandrakeSoft Linux on the desktop for a while but it's been so quiet about it that for all intents and purposes it's been a stealth operation.
But now that the desktop Linux hype meter is registering new highs, HP has decided to raise the decibel level.
It says it's got two new Linux desktops for the North American SMB market. One is the first of a new basic 2000 series, the HP Compaq Business Desktop dx2000. The company figures the street price of a Celeron model will be $389 to start. The Hyper-Threaded Pentium 4 unita will be pricier.
The other box is a mainstream widget designated the dc5000, another series that will come with HP Lifecycle manageability tools and is priced at $599 for a Celeron chip and $679 for a P4 box.
According to HP's custom, the boxes will be sold with Mandrake Linux, a boon for the French company that just filed its plan to emerge from the Parisian version of Chapter 11 last week. The same PCs can be had with Windows XP, by the way.
An HP Compaq 7000 series, due this summer, will offer customers advanced security, serviceability and manageability features, including HP Lifecycle Solutions to deploy and maintain PCs in corporate networks.
The microtower dx2000 features four DIMM slots to support single- or dual-channel memory configurations and offers quick and easy utilization of external peripherals with eight USB 2.0 ports. 

The box can be had at clock rates up to 3GHz, with a maximum 80GB drive, up to one gigabyte of double data rate (DDR) SDRAM and a choice of optical drives.
Though it uses the same processors as the 2000, the dc5000 is intended for more advanced computing, and comes in two designs - a small form factor and a microtower. It can support a 160GB drive and up to 4GB of DDR SDRAM. Both form factors are designed with tool-less access to internal components and drives.
HP seems to think XP will dominate the 5000 platform.
Meanwhile, Mandrake's Chapter 11 exit plan, which the courts have yet to accept, calls for it to repay 4.1 million euros in liabilities over the next nine years and no interest. It says it's committed to repaying 3.3 million euros of the total amount, but that 800,000 euros is conditional on "certain events" that it doesn't describe.
The company says it means the liabilities will be pay off out of revenues and that it won't need to raise additional capital. At last word it had subscriptions from existing investors to pay 2.10 euros apiece for an additional 358,000 shares, giving Mandrake a stronger capital base.
Although the exit plan hasn't been rubberstamped by a court, Mandrake shares are trading again on Marche Libre after a 14-month absence.
The company is working on a new desktop kit based on the 2.6 Linux kernel that will offer a choice of KDE 3.2, Gnome 2.4 or the house-brand MandrakeGalaxy 2 desktop environments as well as OpenOffice 1.1

Tying Google Search into Nuxeo Enterprise CMS

Open source enterprise content management (ECM) vendor Nuxeo (news, site) announced the Nuxeo GSA Connector that enables Google Search Appliance to index and search Nuxeo ECM content. Organizations using Nuxeo and Google’s search appliance can now have the ECM content in same search results as other content indexed by search appliance and actually get closer to living up to the “enterprise search” moniker.

Enterprise Search and ECM

Google Search Appliance (GSA) provides Google search capabilities to enterprise content. GSA connects to many content sources, like the popular SharePoint 2010, out-of-the-box, but alas, Nuxeo was not among that list. However, no longer does content stored in Nuxeo’s open source ECM have to be AWOL from search results with the release of the new Nuxeo GSA Connector.
The Nuxeo GSA Connector requires Nuxeo DM 5.4.0.1 or Nuxeo DM 5.4.1 and includes:
  • Google Enterprise Connector Manager: Allows GSA to search and serve documents from the Nuxeo repository.
  • Nuxeo Google Search Appliance connector type: Allows user to configure the connection and define the content to index.
Using Nuxeo’s GSA Connector is transparent to end-users. Once an administrator has installed the connector, Nuxeo ECM documents appear in the search results of their local Google website. When users select the document, the document is served from Nuxeo.
gsaAdminScreen.png
Nuxeo GSA administration
 
Nuxeo has integrated security with the connector. The connector applies the access rights from Nuxeo ECM to the search results. The first time search results include Nuxeo documents, the platform displays a login window. Users must log in to see Nuxeo results and can only see documents they can access in Nuxeo ECM. The credentials are saved for future searches.
Organizations invested in open source should also take note that the source code for the connector is open and available under the LGPL license. Complete documentation for the connector is available on the Nuxeo site.

Getting the Connector

The new open source Nuxeo GSA Connector is available in the Nuxeo Marketplace. Nuxeo Connect subscribers can download and install it directly in Nuxeo DM via the in-product Update Center. Non-Connect subscribers can sign up for a trial. Users that decide to try out the connector should be aware that the package does not support hot reloading. They should follow the Nuxeo GSA Connector documentation for installation instructions.
As enterprise content grows in size and becomes more diverse, organizations continue to struggle to provide a unified view of all information assets. Nuxeo’s move to provide a connector to GSA gets some of these organizations just a little closer to that goal.

Tuesday, April 12, 2011

The Future of Cheap Androids Begins Now

 
The arrival of low-priced smartphones is an event many have been waiting on for some time. Sure there are often buy one, get one deals or one-day specials where you can find a smartphone for as little as a penny, but in most cases, such deals are tied to expensive plan commitments that last for two years. For a real paradigm shift, we’ll need to see unsubsidized handsets priced at or under $100 that can be used on a month-to-month basis. We’re inching closer to that shift.
Take the LG Optimus V, for example. Virgin Mobile just began selling this Android smartphone for $149. Since Virgin Mobile is a pre-paid operator, there’s no contract involved. That means the company is selling the handset at full-price; there’s no subsidy, no contract cancellation fee and no commitment. You pay $149 and the phone is yours. Monthly plans that include unlimited mobile broadband access with Virgin Mobile — which uses Sprint’s network — start at $25 with a limited amount of minutes.
Think about that for a second. With a $149 initial investment and then an ongoing cost of less than $1 per day, someone can have a basic, but useful, smartphone in the U.S., with the flexibility of upgrading to a better phone or different carrier at any point in time. Granted, the Optimus V doesn’t compare to the high-end specifications of the latest and greatest Androids, Apple’s iPhone, or other currently popular devices, but I’m not sure that matters.
I reviewed the LG Optimus T handset back in November, and it’s essentially the same phone as the Optimus V; LG is rebadging the basic design for different carriers. For a long-time mobile device user that values high performance, the Optimus may not be as fast or as feature-packed as what I’m used to. But that doesn’t mean it won’t provide value to those currently on feature phones or other low-end smartphones. In my review, I noted:
This handset does just about everything that my more expensive phone can do. You can install mobile apps from the Android Market (yay Angry Birds!), share pics on Facebook (taken with a decent, but not high-end camera), browse the web over 3G or Wi-Fi, manage email on the go, check-in on Foursquare, use Google’s Navigation and use Google Voice services. The phone uses the latest version of Android, which helps boost performance. Plus, the 1500 mAh battery paired with a slower processor makes for an all-day device.
All of the essential functions are there: 3G, Wi-Fi, Bluetooth, a touchscreen display, GPS, a 3.2-megapixel camera and more. Plus, the handset can run a myriad of software found in the Android Market. Would I like to see the device have more guts than the 600 MHz processor provides? Sure I would, but each improved feature boosts the costs and puts the device out of reach for more consumers on a tight budget, and besides, I’m not in the target audience for this device.

 
The Optimus handset line, especially when paired with a low-cost pre-paid plan, represents the coming wave of cheaper smartphones: a slowly rising tide that will bring additional challenges to companies such as Nokia that sell more feature phones than any company in the world today. Indeed, outside the U.S., where Nokia is a popular brand, such cheap smartphones may even greater risk to Nokia. Why? Because here in the U.S. our handsets are generally tied or locked to a carrier and we have two different network technologies. But in Europe and elsewhere, it’s not uncommon to buy a phone, then purchase a SIM card from whichever carrier is currently offering the cheapest voice and data rates. A cheap, no-contract handset can run on any number of networks in that case, making the device an even more appealing alternative to a feature phone.
Adding additional pressure is the likelihood of these Android handsets getting cheaper in the future. Brian Modoff from Deutsche Bank Equity Research yesterday issued this note:
By 2013, we expect 1 GHz smartphones to be available for $100. The combination of a $0 license for Android and the steady march of Moore’s Law could translate into $100 smartphones by late 2012 or early 2013. At that point, we think even the average emerging markets’ consumer shift their purchase sharply away from feature phones to smartphones, posing a serious challenge to companies such as Nokia without a clear strategy for low-end operating systems.
I agree with Modoff in principle, but I suspect the timeline he presents for a $100 smartphone is too conservative. By the end of this year, I expect to see no-contract Android devices costing $99 or less, paired with reasonably priced pre-paid plans. There may be a question of exactly when that will happen, but there’s no question that it will happen. And when it does, it will open up the floodgates for upgrades to those on feature phones and kick smartphone adoption into an even higher gear.