Showing posts with label Coding. Show all posts
Showing posts with label Coding. Show all posts

Tuesday, April 28, 2020

The Chinese 🇨🇳 invented the first binary code ' 0 1 '


The Chinese 🇨🇳 invented the first 

binary code ' 0 1 '



In 1789 Gottfried Leibniz published a paper announcing his invention of the binary code. Twenty-four year later, after a Jesuit in Beijing sent him illustrations of the Chinese trigram and hexagrams, Leibniz published a second paper crediting the Chinese with inventing the first binary code.
The explanation for Leibniz’s remarkable claim had to await the advent of the digital revolution in the 20th century. In the 1920s, the so-called father of the information age, Claude Shannon, realized the binary code was ideal for the design of electronic circuits, the precursors to electronic chips. He used the binary number 1 to mean positive (on, an electric current) and the binary number 0 to mean negative (off, no electrical current).
Moreover, Shannon realized we can assign “arbitrary” values to the binary code. A string of binary numbers can represent data, sound, still and moving images, or any symbol. If we agree on the given attributes, he reasoned, it becomes a standard. One of the first such standards was the ASCII code for computer keyboards. The binary number for the capital letter A is 01000001.
The Chinese binary code also uses “arbitrary” attributes. The whole and broken lines, equivalent to 1 and 0, denote positive and negative, as well as a wide range of other generic concepts that can be classified as either positive or negative: day-night, male-female, growth-decay, etc. The trigram and hexagram, combinations of whole and broken lines, are “gradations” of these two generic values in discrete, binary steps.
The ancient Chinese conceived the binary code after realizing that nature itself is a binary phenomenon, a constant interaction between mutually dependent opposites — growth-decay, advancing-retreating, ruler-ruled, action-inaction, etc. All aspects of Chinese civilization, from Confucianism to martial arts and health to aesthetics, were based on harmonizing binary opposites.
In the 1940s, Leibniz’s claim came full circle. The scientist Norbert Wiener developed cybernetics, the basis for the automatic pilot and many other computerized systems. Cybernetics is derived from the Greek word meaning “steersman.”
The cybernetic logic in autopilots “steers” an aircraft to its programmed destination. It does so by navigating between various binary parameters — left-right, high-low, fast-slow — to fly the shortest route from A to B. If side-winds take the aircraft off course, the autopilot takes corrective action to restore the “golden mean” between the binary boundaries set by the navigator.
Finding the golden mean between binary opposites is also at the heart of the I Ching, the ancient “manual” to the Chinese binary system. China’s rulers routinely consulted the I Ching to set the course for the ship of state. And people consult the I Ching before making key decisions by weighing a sequence of binary choices.
No doubt the binary world view of the Chinese will reveal itself in the next (very) big thing in the computer sciences, artificial intelligence. And like the AI community elsewhere, the Chinese will face one of the biggest challenges confronting AI today — harmonizing analog and binary. The binary roots of Chinese culture have been obscured by recent modernization, but they are not lost. Having grown for 3,000 years, they permeate the subconscious of all people raised in a Confucian environment.
Source : here 

Tuesday, October 15, 2019

How to become a better programmer and developer? 6 steps and tips to become




Evolution is a must for everyone, to develop yourself and your skills and everything you do is to be taken into account every time you decide to practice something or take on a new hobby, in any case you are required to develop, we do not want to offer our customers and the people we deal with products from 2004, while today we are in 2017 we see and deal with a lot of new developments, when your knowledge is old and already far behind , then evolution is not an option, but an obligation to accomplish in your daily tasks.





So, in this "developmental" topic, we will give you our dear reader 8 practical steps and tips, we advise you to work hard, because it will save you both the trouble and hardship you spend in the world of programming to finally discover the validity of these tips, as they say, work smart, Not hard, be smart and work with the following tips:



- Learn the Techniques - Not the tools :


Programming languages, custom programs and so on are just the tools that evolve every day, that learning Java today is good, but who knows, maybe tomorrow there will be nothing called Java, and the time you spent on learning Java will be gone like that and you will have to spend double the time in learning the new programming language, you do not learn programming tools, but learn its techniques.

Learn the foundations of its foundation, pioneers and employers pay programmers who know a lot of programming languages, and you are required to learn as much as possible, but do not learn the programming language, but learn the basics.

However the language of programming changes, the foundation remains the foundation, focus on the structures of the language , learn it , apply it in a range of programming languages, learn more and more about lots and lots so you know everything about everything.


- Remind yourself that you still have a lot to learn :

Every time you learn something new, and think that by learning that technology or that programming language, the world will stop under your feet waiting for you to show them your skills in that programming language or the like , or think that that skill will last forever and that those who did not learn it are regretful, then you need a reality check.

when you reach that point and start thinking this way, always remind yourself: "Stop, I did not learn anything, I still have a mountain of things to learn and the world is ever changing ever developing so is the knowledge the technology, so I have got to keep learning and learning got to keep being thirsty for information ".

the first step you take towards learning, is to realize your complete ignorance of something, Invest in learning, science is not annihilated, it has existed from time immemorial, do not stop learning, and always remind yourself that you have to keep learning It doesn't matter what you learn, whether it will benefit you in your career or study, whether it's a new or old programming language, a language that is used or not, but add it to the list of things you've learned, and always remember, to learn techniques, not tools.


- Running code is not the end - it is only the beginning :


Yes, and finally ... run the code, wonderful, maybe now the program and my code is completed, and I made a masterpiece now worth to present to everyone and share it on  Github or Codepen and ask others about my masterpiece, you have the right to boast as you want no one will blame you, but you did not make anything, your masterpiece is only the end of the beginning, you made something good?

 Nice, start developing it now, add new features, make it something matchless, distinguish it from others, add your creativity to it, and when you finish doing it and find that you are finally done and that all the codes work fine and in good harmony, remember again You are still at the beginning.

Roll up your sleeves again, and take advantage of the techniques you have learned to develop your masterpiece little by little, do not stop if the code runs, stop when the customer tells you that you made something unprecedented, only then can you stop working on that project, and start again in another new project


 ... life of programmers …



- Read codes - read a lot a lot of codes : 

  "Talk is cheap, Show me your code"   - Linus Torvald (Founder of Linux)
Let me guess a little, maybe you master the C # programming language, well let me tell you how I learned it, mostly I went to YouTube, then I wrote "a full course to learn the programming language C #" it then showed you a lot of videos concerning C# you choose one of them, and then start watching videos until you are able to create a good and powerful desktop program in this language.

However, have you ever tried to read projects programmed with C #? Projects that are abundant on Github and other sites as well, maybe when you read this paragraph now and see that you have never read a software project created by other people, you will then go to download an open source project and open it to find that the project was written in C # language really, but did not understand and Not one code, you didn’t understand what that one code specific role in the project was. Then you say to yourself damn it, did I really master the C #?


You see the problem, if you do not read the code of others, it will difficult for you to develop yourself in your personal field.

Because other people list a set of techniques and code that you may not find anyone to offer you in their courses and formations, it is only the result of the moment, when you program something and remember that you have to add a service in your code, a service you did not read in The software course, you are moving towards sites that provide you with software solutions included in your project, projects and ready codes include many such codes, so reading them will improve your competence as a developer and programmer.


 - Talk to developers and programmers (Network) :

It would be much better to talk to them than on the web world, but because of the lack of these programmers, even talking to them in the web world is not a bad idea.

Talking to a group of programmers and developers will let you acquire a whole bunch of useful things. Firstly getting to know their opinions and their programming techniques, getting to know the software market and what's new in the world of programming, you may not get all of these things from sitting in front of your computer and browsing different sites, but the best thing in conversing with developers, is to get personal experiences, get quotes for people who may have been walking the same path today but found a dead end.

 In this case, you don’t have to follow the same path, but it is enough to benefit from their experiences to go on a different path, and best of all to also share with them your questions and inquiries to find a satisfactory answer.



- Everyone should know how to program a computer - Because it teaches how to think :

Maybe Steve Jobs did good by saying these words, but they are not completely true in my eyes.

 yes you have the right to learn programming, you have the right to learn how to write your first code, but not only because it will teach you how to think, but because it will become your life style, it will become an area (a field) that you love to the core, areas that you will develop and improve and offer the best in it, become the king of kings in it, learn and do not stop, and master and do not leave.

 for these reasons you have to learn programming, thinking can be gained by many Of things, even before creating something called programming, man was thinking, if not so how the existence of computer or programming even come to life, so don't learn programming for one or two reasons, but rather for a variety of reasons.

Programming is a perfect world, a very logical world, and a wonderful world with distinction.

And if you want to be a skilled developer and programmer, then we advise you to follow these previous steps by heart and mind, and with time to discover more useful tips and steps why not, and to work with it in the future.

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

Monday, March 18, 2019

The Difference Between Block And In-line Element !!


The Difference Between Block And In-line Element !!

We have many markup to use like <br> add line (break line) or <p> separator a piece of text for other but there is difference between them not in the using  but in the function to use :
  so you might have noticed that we have two different ways in HTML of breaking our text into multiple lines
we have < br > empty element and <p> element which is an not empty element

so <p> create a little invisible box around the text .this box called a block and block are heavily involved in how the browser lays out text on the screen
the block has height and width and it also have margin above and below and that's what provide the space around the paragraph this <p> element we called a block and <br> we called in-line element like <em> <mark> <a>(the hypertext element )
it can seem bit abstract trying to imagine these invisible box that the browser constructs around the element.

How To Write HTML Code !!


What is the HTML !!!


It’s the language that provide the structure and the text of web pages, actually HTML based on the Hypertext Markup Language and the text that the user will actually read in their browser.
Hyper text is the text that can have link of references and the references to include other document and files like images video.
Markup code tell the browser how the text should look like ,how it managed.


How To Write HTML Code !!


  - Markup 
Markup is a symbol or tag  that you insert at certain place in a text file. This represents how the file should look when it is printed in your browser.
like  < br >    < em >
when we went to insert images we use  < img  src = " " >
or when add break line we can use  < br > the empty element or < p > the element by the way even <img src="">is empty element 

 Difference between empty element and element!!


the empty element don't need closing tag like <p>  </p> or  <div> </div>
 because it doesn't have any continent
so we have many empty element and element in HTML Language.

Learning More About Programming


Learning More About Programming

So before we know more thing about programming  we must learn a few concepts we used in programming :


  1. The first thing is syntax :its means grammar rules of languages like English, Arabic and all the other languages in the world, So even programming have a rules like how you put your code together.
  2. The second thing is too keep in mind something about the computer that scientists call the formalism means the computer take the code totally literally word by word the computer can not guess what you really mean and think of.
  3. The third idea is an aspect of syntax that will keep showing  up in every computer language you learn this is the concept of nesting  it has to do with how some bits of code can go inside other bits of code in an ordinary way.


So What Is The Web !!


 So What Is The Web !!

1- web


The web :is collection of HTML document and another resources that refer each other links the web is hypertext syntax what this means is that document ,web pages ,sites,web App, can contain references to other documents and the users can follow those references to find related information we call these references hyper link, all the web technology is built around this idea.

2- web pages


Can include resources such images ,video the web pages are usually stored same server or another server in fact to load a web pages your browser send a request for that page to a server.


3- web browser


It is App like Firefox edge, Chrome, Opera, Safari and many others that is designed for displaying web pages, in fact web browser and server interacting in specific way so when you go to any web browser your browser give a request to the server asking for particular  documents by name (index.html) the server send him the document or a message error when  he don't find the documents.
all these operation call protocol means how the browser can speak with the server and tell the web server to use particular set of rules this call (HTTPHTTPS :hypertexte transfer  protocol)

Monday, March 4, 2019

The Ultimate List of Online Learning



The Ultimate List of Online Learning Infographic

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!