Wednesday, March 18, 2020

A Beginners Guide to Ruby Programming Language

A Beginners Guide to Ruby Programming Language Ruby is unique among object-oriented scripting languages. In a sense, its a purists language for those who love object-oriented languages. Everything, without exception, is automatically an object, whereas in other programming languages this isnt true. What is an object? Well, in a sense you can think of it in terms of building a car. If you have a blueprint for it, then an object is whats built from that blueprint. It contains all the attributes that the object holds (i.e. make, model, color) and the actions it can perform. But, even as a pure object-oriented language, Ruby doesnt sacrifice any usability or flexibility by leaving out features that arent expressly related to object-oriented programming. Designing Ruby Rubys architect Yukihiro Matsumoto (known simply as Matz on the web) designed the language to be simple enough for beginning programmers to use while also powerful enough for experienced programmers to have all the tools theyd need. It sounds contradictory, but this dichotomy is owed to Rubys pure object-oriented design and Matzs careful selection of features from other languages such as Perl, Smalltalk, and Lisp. There are libraries for building all types of applications with Ruby: XML parsers, GUI bindings, networking protocols, game libraries and more. Ruby programmers also have access to the powerful RubyGems program. Comparable to Perls CPAN, RubyGems makes it easy to import other programmers libraries into your own programs. What Is Ruby Not? Like any programming language, Ruby has its downsides. Its not a high-performance programming language. In that regard, Pythons virtual machine design has a huge advantage. Also, if youre not a fan of the object-oriented methodology then Ruby isnt for you. Though Ruby does have some features that fall outside the realm of object-oriented languages, its not possible to create a non-trivial Ruby program without using the object-oriented features. Ruby doesnt always perform as well as other similar scripting languages in raw computing tasks. That being said, future versions will address these problems and alternate implementations, such as JRuby, are available as a workaround for these issues. How Is Ruby Used? Ruby is used in typical scripting language applications such as text processing and glue or middleware programs. Its suitable for small, ad-hoc scripting tasks that, in the past, may have been solved with Perl. Writing small programs with Ruby is as easy as importing the modules you need and writing an almost BASIC-like sequence of events type of program. Like Perl, Ruby also has first-class regular expressions, which makes text processing scripts a snap to write. The flexible syntax also aides in small scripts. With some object-oriented languages, you can get bogged down with verbose and bulky code, but Ruby leaves you free to simply worry about your script. Ruby is also suitable for larger software systems. Its most successful application is in the Ruby on Rails web framework, software which has five major subsystems, numerous minor pieces and a plethora of support scripts, database backends, and libraries. To aid the creation of larger systems, Ruby offers several layers of compartmentalization, including the class and module. Its lack of superfluous features allows programmers to write and use large software systems without any surprises. What Skills Would Be Helpful for Learning Ruby? A solid understanding of object-oriented concepts. Ruby is an object-oriented language and the object-oriented features are used throughout. Without this critical skill, youll be struggling as a Ruby programmer.A bit of functional programming knowledge. This is a plus as Ruby uses the block or closure extensively. Not having this ability isnt insurmountable, though. Creating blocks is a feature that can be learned easily enough while learning Ruby.A bit of navigational know-how. The primary way of running a Ruby script is from the command-line. Knowing how to navigate directories, run scripts and redirect input and output are essential skills to Ruby programmers. Applications and Tools Needed for Ruby The Ruby interpreterA text editor such as Notepad, Scite, or Vim. Word processors such as Wordpad or Microsoft Word are not suitable.Command-line access. Though the details of this differ from platform to platform, Linux, Windows, and OSX all have this available without any extra downloads or software installation.

Monday, March 2, 2020

Mendelevium Facts - Element 101 or Md

Mendelevium Facts - Element 101 or Md Mendelevium is a radioactive synthetic element with atomic number 101 and element symbol Md. It is expected to be a solid metal at room temperature, but since it is the first element that cant be produced in large quantities by neutron bombardment, macroscopic samples of Md have not been produced and observed. Here is a collection of facts about mendelevium: Mendelevium is a synthetic element that has not been detected in nature. It was produced in 1955 by bombarding the element einsteinium (atomic number 99) with alpha particles to produce mendelevium-256. It was produced by Albert Ghiorso, Glenn T. Seaborg, Gregory Robert Choppin, Bernard G. Harvey, and Stanley G. Thompson at the University of California at Berkeley in 1955. Element 101 was the first element to be produced one atom at a time.According to Glenn Seaborg, the naming of the element was somewhat controversial. He said, We thought it fitting that there be an element named for the Russian chemist Dmitri Mendeleev, who had developed the periodic table. In nearly all our experiments discovering transuranium elements, wed depended on his method of predicting chemical properties based on the elements position in the table. But in the middle of the Cold War, naming an element for a Russian was a somewhat bold gesture that did not sit well with some American critics. Mendelevium wa s the first of the second hundred chemical elements. Seaborg requested and received permission to name the new element for a Russian from the U.S. government. The proposed element symbol was Mv, but the IUPAC changed the symbol to Md at their assembly in Paris in 1957. Mendelevium is produced by bombarding bismuth targets with argon ions, plutonium or americium targets with carbon or nitrogen ions, or einsteinium with alpha particles. Starting with einsteinium, femtogram samples of element 101 may be produced.Mendelevium properties are largely based on predictions and on the activity of homologous elements on the periodic table because bulk preparation of the element isnt possible. The element forms trivalent (3) and divalent (2) ions. These oxidation states have been shown experimentally in solution. The 1 state has been reported, as well. The density, state of matter, crystal structure, and melting point have been estimated based on the behavior of nearby elements on the table. In chemical reactions, mendelevium behaves much like other radioactive transition metals and sometimes like an alkaline earth metal.At least 16 isotopes of mendelevium are known, which have mass numbers ranging from 245 to 260. All of them are radioactive and unstable. The longest-lived isotope is Md-258, which has a half-life of 51.5 days. Five nuclear isotopes of the element are known. The most important isotope for research, Md-256, decays via electron capture about 90% of the time and alpha decay otherwise. Because only small amounts of mendelevium can be produced and its isotopes have short half-lives, the only uses for element 101 are scientific research into the elements properties and for the synthesis of other heavy atomic nuclei.Mendelevium serves no biological function in organisms. Its toxic because of its radioactivity. Mendelevium Properties Element Name: mendeleviumElement Symbol: MdAtomic Number: 101Atomic Weight: (258)Discovery: Lawrence Berkeley National Laboratory - USA (1955)Element Group: actinide, f-blockElement Period: period 7Electron Configuration:  [Rn] 5f13  7s2  (2, 8, 18, 32, 31, 8, 2)Phase: predicted to be a solid at room temperatureDensity:  10.3  g/cm3  (predicted near room temperature)Melting Point:  1100  K  Ã¢â‚¬â€¹(827  Ã‚ °C, ​1521  Ã‚ °F)  (predicted)Oxidation States:  2,  3Electronegativity: 1.3 on the Pauling scaleIonization Energy:  1st:  635  kJ/mol (estimated)Crystal Structure: face-centered cubic (fcc) predicted Sources Ghiorso, A.; Harvey, B.; Choppin, G.; Thompson, S.; Seaborg, G. (1955). New Element Mendelevium, Atomic Number 101. Physical Review. 98 (5): 1518–1519.David R. Lide (ed),  CRC Handbook of Chemistry and Physics, 84th Edition. CRC Press. Boca Raton, Florida, 2003; Section 10, Atomic, Molecular, and Optical Physics; Ionization Potentials of Atoms and Atomic Ions.Hulet, E. K. (1980). Chapter 12. Chemistry of the Heaviest Actinides: Fermium, Mendelevium, Nobelium, and Lawrencium. In Edelstein, Norman M.  Lanthanide and Actinide Chemistry and Spectroscopy.