Showing posts with label Compiler. Show all posts
Showing posts with label Compiler. Show all posts

Friday, May 17, 2019

Compiler & Interpreter

Compiler & Interpreter

Compilers and interpreters are used to convert the code of high level language into machine language. The high level program is known as source program and the corresponding machine level program is known as object program. Although both compilers and interpreters perform the same task but there is a difference in their working


Compiler

          A compiler searches all the errors of a program and lists them. If the program is error free then it converts the code of program into machine code and then the program can be executed by separate commands.

Interpreter

         An interpreter checks the errors of a program statement by statement. After checking one statement, it converts that statement into machine code and then executes that  statement. The process continues until the last statement of program occurs.


Static & Dynamic Linking

C Program’s Life Cycle !!

C Program’s Life Cycle !!



What are C libraries?

Pre-compiled functions that come with the C compiler.
The functions are grouped in different packages called libraries.
To use functions included in a library, include the header file specified for that library in your program.
Exemples:
#include <math.h>
#include <conio.h>
#include <stdio.h>



Why C Programming Language? Features !!

Why C !!:


¨ C is a widely used portable high level programming language
¨ High level, but also let’s your program closer to the metal.
¨ Used for embedded programming
¨ Many language have a c pedigree
¨ it can manipulate bits of computer memory. 
¨ can run on different platforms with very little modification. 

Features of C Language:


There are many features of c language are given below:
1)   Simple
2)   Machine Independent or Portable
3)   Mid-level programming language
4)   structured programming language
5)   Rich Library
6)   Memory Management
7)   Fast Speed
8)   Pointers
9)   Recursion
10) Extensible

Friday, March 1, 2019

Why Flutter? I new Cross-Platform Framework made by Google !


Why Flutter?



Recently in the news as a revolutionary new mobile platform, Flutter has built up a lot of hype inside the mobile app developer community and outside it as well. What is the hype about? After the First official release, how much promise is the platform showing? Should mobile developers switch to Flutter? Let’s take a look.

So .. What is Flutter?

First off, let’s take a look at the official description of the platform from flutter.io:
"Flutter is Google’s mobile app SDK for crafting high-quality native interfaces on iOS and Android in record time. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source."

Here are the important parts from that statement:

  1. “high-quality native interfaces” : Flutter contains elements from both Android and iOS, but unlike React Native, all elements, or “widgets”, are usable on both platforms. An app can now look exactly the same on both platforms instead of adopting platform specific looks.
  2.  “iOS and Android in record time” : The same codebase is usable for both Android and iOS apps reducing the need for separate development for Android and iOS. “But couldn’t we do the same in React Native?” Yes, but because RN pulls interface elements from the device, a lot of elements were platform specfic, rendering a single codebase to be larger than it needs it be.



What if I only want an Android app?

Flutter isn’t only focused on bridging the Android-iOS gap, it’s focused more on being a better way of building a mobile app. Native android development has some inherent issues, a lot of which developers don’t have many workarounds for. Here are a few key points for Android developement in Flutter:

No large repetitive Gradle build times.

Although gradle is a useful tool, the gradle build times for apps are rather large and is a hindrance for fast development cycles. This is not to say Flutter apps do not need a Gradle build at all, but they don’t need it multiple times. A flutter build invokes a Gradle build the first time it runs but does not need it again for a full restart of the app. Android Studio has reduced Gradle build times over time and features like Instant Run certainly are helpful but Flutter load times beat native times by leaps and bounds. Flutter’s hot reload is immensely helpful in smaller changes.

A single language for layout and backend.

Because Android has separate layout and Java/Kotlin files, we need to get references for views and then alter them in the backend files. Flutter uses a single language(Dart) for design as well as backend and uses a reactive framework, so we don’t need references to widgets(Flutter equivalent of views) at all.

Dart: making the obvious things easy.

Java has been showing it’s age for a while now and even after Java 8, it leaves a lot to be desired. Dart on the other hand borrows a lot of the most popular features of other languages without losing the familiarity of Java or similar languages. Dart was developed with common developer tasks in mind, making common things effortless

What about Fuchsia?


Fuchsia is acapability-based operating system currently being developed by Google. It first became known to the public when the project appeared on GitHub in August 2016 without any official announcement. In contrast to prior Google-developed operating systems such as Chrome Os and Android, which are based on Linux kernels, Fuchsia is based on a new microkernel called "Zircon".






This OS is written in “ C , C++ , Dart , Go , Python , Rust , Shell , Swift “ and as you read the system is written in Dart , So according to rumors Flutter is preface to develop apps for Fuchsia also , in other words Flutter not just for developing Android & IOS Apps in the same time , it’s for Fuchsia also 




Key take-aways:

  1. Flutter speeds up development by quite a bit.
  2. Easy-to-learn development language for existing mobile developers.
  3. Fluid animations and beautiful UI.
  4. Allows Android + iOS apps from the same codebase.

Drawbacks?

No platform is perfect and sometimes the lack of a particular feature can be a dealbreaker. Here are ones I personally think should be considered before you think of switching:
  1. Lack of packages: There are not as many packages written for Dart meaning you might have to write code for something you would usually do with a simple library or package. This is not a minor issue and should be treated with caution.
  2. No layout editor: Unlike in XML, there is no drag-and-drop interface available which could be a deal-breaker to some. Flutter does provide Flutter Outline to visualise the component tree better but it’s not as useful as actually looking at a generated screen.
  3. Limited StackOverFlow support: Because Flutter is new, support isn’t as extensive as normal Android, but the Flutter team is quite active on StackOverFlow, so all hope isn’t lost.


Conclusion

I tried working with Flutter mostly for the shared codebase between platforms and the UI elements and animations, and I recommend every mobile developer to give it a spin. It’s a fresh new way to see mobile app development.

A helpful hints :

  1. If you’re new to mobile app development, I’d recommend you to try native app development before jumping onto Flutter because for a novice, it has a sharper learning curve.
  2. Do a feasibility check for a production-level app because the packages you need may not be available.

Happy Coding!

Thursday, January 3, 2019

What is C plus plus ( C++ ) Language ?

C++ Language



is a general-purpose object-oriented programming (OOP) language, developed by Bjarne Stroustrup, and is an extension of the C language. It is therefore possible to code C++ in a "C style" or "object-oriented style.“, c++ is considered to be an intermediate-level language, as it encapsulates both high- and low-level language features. Initially, the language was called "C with classes" as it had all the properties of the C language with an additional concept of "classes."
C++ is one of the most popular languages primarily utilized with system/application software, drivers, client-server applications and embedded firmware.



Who is Bjarne Stroustrup ?
Bjarne Stroustrup was born in Aarhus, Denmark, in 1950. He received a master's in mathematics from Aarhus University in 1975 and a PhD in computer science from Cambridge University in 1979.

Stroustrup then joined Bell Labs' Computer Science Research Center in Murray Hill, New Jersey, where he designed and implemented C++. This language, based on C and inspired by Simula, provides a set of general and flexible abstraction mechanisms that can be mapped directly and efficiently onto computer hardware. C++ revolutionized the software industry by enabling a variety of software development techniques-including object-oriented programming, generic programming, and general resource management-to be deployed at scale. For more than two decades, C++ has been among the most widely used programming languages, with applications in areas including general systems programming, communications, computer graphics, games, user-interfaces, embedded systems, financial systems, avionics, and scientific computation. The influence of C++ and the ideas it pioneered and popularized are clearly visible far beyond the C++ community.

Over the next decades, Stroustrup guided the further evolution of C++ through his involvement in its ISO standards effort, his books, and his many academic and popular papers.

Stroustrup is a managing director in the technology division of Morgan Stanley in New York City, a visiting professor at Columbia University, and a Distinguished Research Professor at Texas A&M University (where he taught for a decade). His research interests include design, programming techniques, distributed systems, performance, reliability, and maintainability.

His honors include: ACM's Grace Murray Hopper Award (1993), member of the US National Academy of Engineering (2004), Sigma Xi's William Procter Prize for Scientific Achievement (2005), and Aarhus University's Rigmor og Carl Holst-Knudsens Videnskapspris (2010). He is a Fellow of IEEE and ACM.