5

Me Ya Sa HTML ba ‘Programming Language’ Ba Ne?

html a programming lnguage

Sau tari sababbin ma’abota tsare-tsaren na’ura suna ɗaukar yaren na’ura Hyper-text Markup Language (HTML) a matsayin programming language, amma sam wannan yaren na’ura ba ya rukunin “programming language”.

Wani zai yi mamaki, shin menene bambancin kalmomin ‘programming language’ da ‘yaren na’ura’; shin programming language ba shi ba ne yaren na’ura? Amsar ita ce, e; su na kamanceceniya amma ba ma’anarsu ɗaya ba.

Wato sau tari ana fassara programming language da yaren na’ura, duk da ba daidai ba ne, kuma an fiye yin hakan ne ga waɗanda ba su san harkar na’ura da sha’anoninta ba, saboda za su fi sauƙin ganewa. Amma kalmar “tsare-tsaren na’ura” za ta fi dacewa da fassarar programming language a harshen Hausa. Shi kuma yaren na’ura ana kiransa computer language ko machine code.

Ko Za Ka Karanta?

Yadda abun yake shi ne:

A yadda na’ura mai ƙwaƙwalwa take ba ta fahimtar komai sai dai lambobin 1 ko 0 kawai. Duk wani abunda mutum zai shigar cikin na’ura ba za ta fahimci me ya rubuta ba, har sai an rubuta mata da yarenta shi ne ta hanyar shigar mata da lambobi. Kamar yadda kowace halitta take rayuwa a ƙaunu ta kasance da tsarinta, da yaren da take fahimta, da abincinta da sauransu, haka nan ita ma na’ura mai ƙwaƙwalwa ba ta fahimtar duk wani yare da za mu mata kamar Hausa ko Turanci da sauransu. Don haka sai ta kasance yaren da take fahimta kawai shi ne 1’s da 0’s, ke nan duk wani bayani da za a shigar da shi cikin ta dole sai ya kasance a gundarin tsarin 1’s ko 0’s.

Wannan yaren na na’ura, wato fahimtarta ga 1’s ko 0’s shi ake kira machine language ko machine code, haka nan waɗannan lambobin na 1 ko 0 da na’ura take fahimta, da sarrafa su zuwa bayani mai ma’ana domin shigar wa na’ura shi ake kira binary system –wato daga kalmar ‘bi’ kamar yadda suka kasance biyu (1 ko 0). Yanzu mun gane cewa duk wani bayani da za a shigar wa na’ura dole sai ya kasance a wannan tsarin na lambobi, misali idan za a rubuta a = 1, b = 0; ke nan sunan ABBA zai kasance a haka 1001. Haka nan idan za a ci gaba c = 01, d = 011, e =11 da sauransu, yaya lamarin rubuta littafi zai kasance? Shin anya lamarin zai kasance mai ma’ana kuma mai yiwuwa kuwa?

Don ganin irin wannan wahalar gane yaren na’ura ya sa aka ƙirƙiro programming language, wanda aikinsa shi ne zama ɗan-tafinta tsakanin mutane da na’ura; wato shi zai rinƙa karɓan yaren mutane kamar Hausa ko Turanci, sannan ya fassara shi zuwa ga na’ura domin ta fahimta sa’annan ta aiwatar da abunda aka saka ta.

Tun samuwar na’ura mai ƙwaƙwalwa har zuwa yau matsayin da programming language yake kenan, don haka sai ya kasance wani ɗan-tafinta ne tsakaninmu da na’ura, wato yana tsaka-tsakiya saboda ba za mu iya gudanar da al’amuranmu da yarenta ba, haka ita ma ba za ta gane yarenmu ba. Ke nan haka abun yake:

Natural language -> Programming Language -> Computer Language
Computer Language -> Programming Language -> Natural Language

A inda natural language shi ne yarukanmu kamar Hausa, Turanci, Larabci da sauransu. Shi kuma programming language shi ne tsare-tsaren na’urar. Duk lokacin da muke son aika wa na’ura wani abu sai mun bi ta hannun programming language, haka nan ita ma.   

Ko Za Ka Karanta?

Programming language kuma ya kasance wani gundarin-tsari ne na haɗe-haɗen haruffa, ko lambobi, ko  alamu da ke ba wa mutum damar isar da saƙonsa ga na’ura. Waɗannan programming languages din an tsara su ne ta yadda za su iya fassara abunda muka rubuta (wanda ya kasance tsararre) zuwa ga na’ura. Duk wani abu da mutum zai rubuta sai ya kasance a matsayin programming to sai ya kasance daman a tsare yake, misali a tsare-tsaren na’ura PHP ana rubuta wannan don bayyana kwanan wata:

<?php
date (d-M-Y);
?>

Ko kuma a tsaren-tsaren na’ura JavaScript:

<script>
var d = new Date();
document.getElementById("demo").innerHTML = d;
</script>

Haka nan a tsare-tsaren na’ura Python:

import datetime
x = datetime.datetime.now()
print(x)

Da sauransu. Duk waɗannan tsare-tsaren na’ura za a iya amfani da su don bayyana lokaci, kwanan wata, aika saƙo, da sauransu, amma ban da HTML. Dalili na farko da ya sa aka kore HTML a cikin rukunin tsare-tsaren na’ura shi ne don ba shi da duk waɗannan tsarukan da sauran tsare-tsaren na’ura ke da. HTML ba zai iya:

  • Yin maimaici ba –loops
  • Yanke shawara ba –decision-making
  • Yin  jere ba –array
  • Yi amfani da rumbun bayanai ba –database access
  • Bayyana kwanan wata ko lokaci ba –date and time

…da sauransu. Duk waɗannan abubuwa HTML ba zai iya yinsu ba, amma sauran tsare-tsaren na’ura irin PHP da Python za su iya.

Ko Za Ka Karanta?

Don haka don wannan dalilin ya sa HTML kasancewa a rukunin tsare-tsaren na’ura Markup Language, wato yaren gini kamar yadda CSS da danginsa irinsu Bootstrap suka kasance Stylish Languages –amma dukkansu sai ake kiransu yarukan kayatarwa, saboda ana amfani da su ne wajen kayata shafi da salo iri-iri, da ado da sauransu.  

Mohiddeen Ahmad

I am Muhammad Auwal Ahmad, an inquisitive student, tech aficionado, science enthusiast and a writer. I am the founder and CEO of Flowdiary.

5 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *