What makes C++ so good?


Answer by Harsh Kothari:

1: Stronger Type Checking – the use of classes, inheritance & automatic type conversions mostly eliminates the need for the abominable void* of C.

2: Type safe linkage – you can’t accidentally call a routine from another
module with the wrong type and/or number of arguments – even if your header files get out of date.

3: A complex data type is provided. It includes all the standard arithmetic operations, implemented as operators, not function calls.

4: User-defined operators and function overloading are supported. When you design a data type you can specify which operators & functions are provided.

5: You can use class libraries to provide robust new data types which can be made exceptionally easy to use.

For example, the Rogue Wave ‘math.h++’ class library implements general multi-dimensional arrays which can be manipulated with high-level operations
and an intuitive syntax:

DComplexArray a(10,10); // Construct a 10×10 complex array
cin >> a; // read it in from standard input
DComplexArray b = inverse(a); // Calculate the inverse
cout << b; // write out the inverse
cout << variance(b.diagonal()); // write out the variance of the diagonal
elements of b

6: You can define automatic type conversions to convert between data types.
For example, the Rogue Wave library provides a conversion from a double array
to a complex array.

DoubleVec a(10, 0.0, 1.0); // Construct a double vector in initialised to
{0,1,2,3,4…
DComplexVec z = a; // Construct a complex vector initialised to
{(0,0),(1,0),(2,0),…
cout << a; // write them out
cout << z;
cout << cos(z)*exp(DComplex(0,1)*a);

7: Provides inline functions which combine the efficiency of using macros
with the safety of using functions – simply prepend the word ‘inline’ in
front of the function – if the compiler can inline it, it will.

inline Double
SumOfPositiveElements
(const DoubleVec&amp; v)
{
Double theSum = 0;
for (int i = 0; i < v.length(); i++) {
if (v[i] > 0) {
theSum += v[i];
}
}
return theSum;
}

8: C++ Compiles most ANSI C code directly and can call compiled C code
directly, so you don’t even have to learn anything new at all!

9: You don’t have to put all of your declarations at the top of each block
in C++.
This means
that you can organise your code into logically related ‘paragraphs’ complete
with their necessary declarations. This makes code much more maintainable –
you can easily move sections of code around, taking the necessary
declarations along at the same time. If you use the const modifier you can
also ensure that variables whose value should not change after it is first
calculated do not do so.

Double x,y; // Declare two variables
cin >> x >> y; // read in their values
const Double sqrtX = sqrt(x); // Calculate the square roots
const Double sqrtY = sqrt(y);
cout << sqrt(sqrtX+sqrtY);
sqrtX = 42; // Will give an error…

10: Classes provide extensible types, promoting code reuse. This can
result in major savings in the amount of code written. I saw a recent
article which stated that the new Taligent operating system, which is written
in C++, consists of 250,000 lines of code, whereas WindowsNT, written in C,
was said to consist of 4,000,000 lines of code.

View Answer on Quora

Various Electronics Development Boards


A Development Board is an amalgamation of hardware and software. It is nothing but a printed circuit board containing a microcontroller or microprocessor with other peripherals as hardware and support packages in the form of toolchains , operating system to make up the software part.

Here I introduce you various Development Boards. So decide your needs, choose appropriate system and start making some good stuff and become Electronic Geek. Most important thing for final year engineering student, if you are planning to do project on embedded system, micro controllers , microprocessors this things are very helpful to you. It is also useful when some other project is needed microprocessor or micro controller. If you have any suggestion or query comment below the post. 

1. Arduino

File:Arduino316.jpg

Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It’s intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.

The hardware consists of a simple open hardware design for the Arduino board with an Atmel AVR processor and on-board input/output support. The software consists of a standard programming language compiler and the boot loader that runs on the board.  The microcontroller on the board is programmed using the Arduino programming language (based on Wiring) and the Arduino development environment (based on Processing). Arduino projects can be stand-alone or they can communicate with software running on a computer (e.g. Flash, Processing, MaxMSP).

The boards can be built by hand or purchased pre assembled; the software can be downloaded for free. The hardware reference designs (CAD files) are available under an open-source license, you are free to adapt them to your needs. The Arduino project received an honorary mention in the Digital Communities category at the 2006 Prix Ars Electronica. 

2. Teensy

The Teensy is a complete USB-based microcontoller development system, in a very small footprint! All programming is done via the USB port. No special programmer is needed, only a standard “Mini-B” USB cable and a PC or Macintosh with a USB port. This is the latest version, 2.0.

  • USB can be any type of device
  • AVR processor, 16 MHz
  • Single pushbutton programming
  • Easy to use Teensy Loader application
  • Free software development tools
  • Works with Mac OS X, Linux & Windows
  • Tiny size, perfect for many projects
  • Available with pins for solder less breadboard

3. MSP430 Launchpad

TI’s Launchpad board is definitely a bargain. For your money, you get a set of 16-bit MSP430 processors, a mini-USB debugger and programming interface, and a set of Windows IDEs to choose from  and cost just $ 4.30.

The LaunchPad is an easy-to-use, affordable, and scalable introduction to the world of microcontrollers and the MSP430 family.

  • Easy-to-use – LaunchPad includes all of the hardware and software needed to get started. Open source projects and code examples help users get up and running quickly.
  • Affordable – For $4.30, the LaunchPad includes a development board, 2 programmable MSP430 microcontrollers, mini-USB cable, PCB connectors for expandability, external crystal for increased clock accuracy, and free & downloadable software integrated development environments (IDEs) – everything you need to get started today.
  • Scalable – The LaunchPad is a simple introduction to the MSP430 microcontroller family. As application requirements change, programs developed on the LaunchPad can be migrated to higher end MSP430 devices.

4. STM32

The STMicroelectronics STM32 Value line Discovery Kit is a quick and inexpensive way to discover STM32 32-bit microcontrollers (MCUs). The STMicroelectronics STM32 Value Line Discovery Kit is based on the STM32 Value line and includes a quick-start evaluation board with ST-LINK debugger / programmer that is delivered with IDE from Keil, IAR, and Atollic. The debugger can debug Discovery kit applications or other target board applications. This low-cost STMicroelectronics evaluation kit will satisfy hobbyists, first-time developers, and students.  This is even capable of running an RTOS if you’re trying to do a lot of things at once. Cost of this board is just $ 12.

The unparalleled and large range of STM32 devices, based on an industry-standard core and accompanied by a vast choice of tools and software, makes this family of products the ideal choice, both for small projects and for entire platform decisions.

5. Raspberry Pi

Raspberry Pi model B

The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.

The Raspberry Pi is a single-board computer developed in the UK by the Raspberry Pi Foundation with the intention of stimulating the teaching of basic computer science in schools. The design is based on a Broadcom BCM2835 system on a chip (SoC), which includes an ARM1176JZF-S 700 MHzprocessor, VideoCore IV GPU, and 256 megabytes of RAM. The design does not include a built-in hard disk or solid-state drive, instead relying on an SD card for booting and long-term storage. The Foundation’s goal is to offer two versions, priced at US$ 25 and US$ 35 (plus local taxes). The Foundation started accepting orders for the higher priced model on 29 February 2012.

6. BeagleBoard

The BeagleBoard is a low-power open source hardware single-board computer produced by Texas Instruments in association with Digi-Key. The BeagleBoard was also designed with open source software development in mind, and as a way of demonstrating the Texas Instrument’s OMAP3530 system-on-a-chip. The board was developed by a small team of engineers as an educational board that could be used in colleges around the world to teach open source hardware and open source software capabilities. It is also sold to the public under the Creative Commons share-alike license.

The OMAP3530 includes an ARM Cortex-A8 CPU, a TMS320C64x+ DSP for accelerated video and audio decoding, and an Imagination Technologies PowerVR SGX530 GPU to provide accelerated 2D and 3D rendering that supports OpenGL ES 2.0.

A single SD/MMC card slot supporting SDIO, a USB On-The-Go port, an RS-232 serial connection, a JTAG connection, and two stereo 3.5 mm jacks for audio in/out are provided. Android, Ubuntu, Symbion capability, 256 Mb Flash Memory and 256 Mb RAM.

7. PandaBoard

The PandaBoard is a low-power, low-cost single-board computer development platform based on the Texas Instruments OMAP4430 system on a chip (SoC). The board has been available to the public at the subsidized price of US $174 since 27 October 2010. It is a community supported development platform.

The PandaBoard ES is a newer version based on the OMAP4460 SoC, with the CPU and GPU running at higher clock rates. The board has been available to the public at the subsidized price of US $182 since 16 November 2011. Like its predecessor, it is a community supported development platform.

The OMAP4430 SoC on the PandaBoard features a dual-core 1 GHz ARM Cortex-A9 MPCore CPU, a 304 MHz PowerVR SGX540 GPU, a C64x DSP, and 1 GB of DDR2 SDRAM. The PandaBoard ES uses a newer SoC, with a dual-core 1.2 GHz CPU and 384 MHz GPU. Primary persistent storage is via an SD Card slot allowing SDHC cards up to 32 GB to be used. Linux kernel , Android, Ubuntu compatibility, integrated SGX540 graphics processor and provides 1080p HDMI output are features of this PandaBoard.

Conclusion

This are amazing things to work on. It also saves time. No need for tedious soldering work and also come with guarantee warrantee features. Very easy to implement and very easy to make some cool stuff and projects. So start using it and don’t forget to do comment. 

Popular Programming Languages


All popular programming languages, for each one the description and why to choose it. New emerging programming languages are also included in the list. 

Complete list

Description

Why use it?

C#
(C Sharp)
Concurrent to java, runs on .NET or compatible platforms (Portable NET, Mono). 
More
 – Code
Easier than C++. May share resources with other languages under a common runtime.
C C offers great freedom, and lot of debugging challenge thanks to pointers and memory management. 
More
 – Code
Suffering slow programming to make fast programs. For system programming.
C++ C++ is C plus objects, an extended library, templates. 
More
 – Code
System programming as C but allow larger project, or applications.
D language C++ like language, more dynamic. Compatible with C.
D Language – Code
For teaching or scripting.
Pascal Old language (1970), improved with objects, imposes a strictly structured programming. 
More
 – Code
Teaching, or client/server apps with Delphi and Kylix.
Basic
ASP
This very old language (1964) was improved by Microsoft, with a complete programming environment. Other portages exist. 
More
 – Code
Standard language for scripting Microsoft’s applications (Word etc…), and for dynamic web pages (Asp) on Windows servers.
PHP Designed to be embedded inside HTML to build dynamic Web pages or update them from databases.
More
 – Code
Producing HTML pages from data.
The version 5 targets Web services.
Java Was designed to be portable and to replace C++.
More – Code
Cross-platform applications. For web services and mobile phone apps under Android.
JavaScript,
ECMAScript
JavaScript has been invented to build dynamic client-side html pages, ECMAScript is the standardized version. 
More
 – Code
For interactivity in web pages and applications.
Used with HTML 5 for Web or local apps on Metro or Node.js or Qt.
Scriptol A simple, object-oriented, universal language with an intuitive and powerful syntax. You can build executables, or embed code into html pages.
XML may be used as data structure. 
More
 – Code
Easy and universal for scripting, prototyping, making binary applications, dynamic web pages and XML processing.
For web services by using PHP 5 as back-end.
Python A modern interpreted language with powerful built-in features and a unique indentation feature to shorten coding.
The Jython version compiles in Java bytecode. 
More
 – Code
Programming at light speed. Powerful and easy to learn.
Extending Zope for web services.
Java scripting with Jython.
Only for open source applications (not compiled).
Boo This is a new version of Python with some new features. It runs on .Net and Mono and thus, no compatibility problem.
Boo – Code
Similar to Python.
ASP Scripting language, server-side, for dynamic web pages by Microsoft, same syntax as Basic. 
ASP
 – Code
Producing HTML pages from data, but under Windows servers only.
Assembler This is near the machine language and the fastest. You should never use it, as older programmers did. Making graphic subroutines, drivers or industrial processing.
Eiffel, Sather Object-oriented, with “programming per contract” and other secure features. Sather is an open source implementation.
More – Code
Programming secured applications. Used by hospitals.
Perl A scripting interpreted language. Readabillity and ease of use are not the goal. 
Perl 
– Code
Mainly used by networks administrators and for small CGI scripts.
Rebol Interpreted language for network scripting. The language itself may be augmented. 
Rebol
 – Code
Processing information on distributed computer systems, with small programs.
Ruby Designed with simplicity in mind. It is interpreted, and has a proprietary but extensible library. 
More
 – Code
Writing scripts more easily. Using Ruby on Rails for Web applications.
Tcl A scripting language, easy to learn and available on any platform.
More – Code
Scripting of portable programs with GUI, and web programming by CGI.
NetRexx By IBM, has a simplified syntax. 
More
 – Code
Extends Java with scripts.
Lua Add-on or standalone language with extensible semantic.
Lua – Code
Extending the C language.
Cobol Business language still used on big computers.
Cobol – Code
Maintaining old programs on mainframes.
Fortran One of the first languages, always used for mathematical tasks.
Fortran – Code
Has huge library for scientific calculations.
Lisp Lisp is a very old language designed for artificial intelligence, processes lists only.
Lisp – Code
Artificial intelligence and scripting.
Scheme Scheme is a modernized version of Lisp.
Scheme – Code
Artificial intelligence and scripting.
Prolog For logic programming, based on Horn’s clauses.
Prolog – Code
Heavy artificial intelligence processing.
Haskell Functional programming. Slow and memory consuming. 
Haskell
 – Code
To try programming in another way
SQL Language of data management. 
MySQL
For databases queries.
Forth Another oldy. Invented by an astronomer, is stack based
Forth – Code
For instrumental commands and legacy libraries re-using.
Smalltalk One of the first object oriented language, programs can’t run outside the IDE.
Smalltalk – Code
Absolutely object-oriented processing.
Modula,
Oberon
Successors to Pascal.
Oberon – Code
For nostalgics of the Algol and Pascal time.
Caml, Ocalm Functional languages, Ocalm is object-oriented.
Caml – Code
Used by universities. May help to build a compiler.
Scala Procedural, functional and object-oriented programming language.
Scala – Code
Provides a more compact syntax than Java on the virtual machine
XML Not really a programming language, but may be used for similar tasks.
XML
XML serves to describe precisely data and may include actions on data.
XSL allows to transform documents.