Which Programming Language I should Learn?

This blog is in continuation of my last blog . I have discussed this blog at  YouTube video in detail. Please SUBSCRIBE to YouTube channel Embedkari  for further discussion on Embedded Systems.

Key TakeAway : Understanding of  front-end,back-end languages. Identification of language as per the area of interest. Intel processor evolution to understand the development in programming language strategy.

Let’s take a quick tour of Intel Processors as  use case. If you look at first Intel microprocessor 4004, You will realize that only BASIC as a HLL option with such limited RAM.

Intel -4004 : Max clock  740 kHz, 4-bit data words. As per WiKi 

  • Able to directly address 5120 bits (equivalent to 640 bytes) of RAM, stored as 1280 4-bit “characters”

Now we have Intel Core i9 with 4.30Ghz core speed and 24.75 MBytes L3 cache. So the device itself has L1,L2,L3 caches apart from provision of DDR4 RAM memory. Even microprocessors are in the Ghz core and MBytes cache range.

This technical revolution has resulted the possibility of executing multiple OS in one device. However cpu architecture will still follow three basic operations Read,Write and Branch. You will still find assembly(Hardware Specific) in the time critical routines and C in the OS implementation.

Which language is used in Arduino IDE ?

Is Arduino UNO(Atmel328) bootloader code is fully C++ ?
  • No, Please refer to optiboot.c file discussed in earlier blog.
  • int main(void) __attribute__ ((naked)) __attribute__ ((section (“.init9”)));
  • Here is the quote from Keil Compiler :
  • This attribute tells the compiler that the function is an embedded assembly function. The compiler does not generate prologue and epilogue sequences for functions with __attribute__((naked)).

HLL(High Level Languages) comes with the implementation overhead such as stack ,interpreter etc. But there are other factors like development time, maintenance, reuse etc which drive the language popularity.  Another major factor is target application.

What are popular languages ?

  • Assembly: Low Level, Hardware Platform dependent
    • e.g.: Assembly for ARM,Power,Intel,AVR,RISCV
  • C: High Level, Hardware Platform Independent
  • C++: HLL, OOP, Hardware Platform Independent
  • Java : HLL, OOP,Software Platform independent, Run under Java Virtual Machine(JVM) . The virtual m/c is software platform dependent and part of JRE(Java Runtime Environment).
  • Python : HLL,OOP, dynamically typedSoftware Platform independent,Run under Python Virtual Machine. The virtual m/c is software platform dependent.
  • In the above list the execution speed ASM>C>C++>Java>Python

Both Java and Python byte codes are loaded into corresponding run time environment and executed by virtual machine. Java is statically typed and Python is dynamically typed. Software platform(OS like MAC,Windows,Android etc) independence make them popular.

What is the market report ?

Here is the TIOBE survey of Oct 2018 :

Language_2018

The popularity of languages given here based on their implementation in web server, Mobile Computing, Data Science,Machine learning etc. This includes complete software industry products.

One should filter out the languages based on academic background, interest and time & price budget. Whether you prefer a career in Frontend(Presentation Layer) or Backend (Data Access Layer).

Here is an example of full stack web developer to understand this better.  A Full stack web  developer has ability to work on overall application including  front-end(HTML, Java, JavaScript),  backend (Ruby, Python,Java),database administration,System level software, Networking,Security ,Project management and client co-ordination.

Java is also used in Android App development. Python is used in Web Development, Data science, Machine Learning

Can I try a simple Java code for better understanding ?
  • You should JDK(Java Development Kit) installed.
  • Run cmd promt in Windows as Administrator and try

E:\Backup\2018\Language\Java>java -version

java version “1.8.0_171”

Java(TM) SE Runtime Environment (build 1.8.0_171-b11)

Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)

  • Now try javac.  If it is not getting recognized , Set path as per your JDK installation
    • C:\WINDOWS\system32>set PATH=%PATH%;C:\Program Files\Java\jdk1.8.0_171\bin
  • Make a simple test.java file in notepad
  • public class test
    • public static void main(String[] args)
    • {                             System.out.println(“Test OK”); 
  • }
  • javac test.java  // It generates test.class .javac is compiler
  • java test         // No file extension . java is interpreter/loader
  • Copy the generated test.class to linux system and run
  • You can’t open test.class with readelf or objdump. So we can inspect it using HexEditor just for curiosity
  • javaclass

Some languages sustain for long time due to legacy software also.

Language_lifetime

Here are few other interesting topics @Embedkari

How to Learn C  practically ? 

How to do web scraping with Python ? 

How to choose sensor, processing device and network for IoT ?

How Computer Vision is  impacting Processor Road MAP ? 

How device driver is related to Operating System ?

How to Learn Linux Device driver coding ? 

How I can practice AVR, ARM, Linux and other Embedded Questions for Interview ? 

How can I start learning RISC-V without purchasing development board ?

How RISC architecture differs in simple and advanced embedded processors ? 

How to use Home Router to understand Embedded Linux Commands ?

Thanks for reading till end. Please provide your feedback regarding this article. Also subscribe  Embedkari for other interesting topics. .

Embedkari has introduced its first low cost technical training .

I am trying to improve usability of my  site.If you find something missing, Any feedback in comment box will help to  take corrective action.  Please subscribe to YouTube channel Embedkari  for additional embedded related stuff.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.