Showing posts with label hello. Show all posts
Showing posts with label hello. Show all posts

Monday, February 17, 2025

Learn C Programming Language, A Practical Guide

Although C programming language is no longer as dominant as it once was, it still has its strong application in systems programming, embedded systems, operating systems, and performance-critical applications. The Python programming language has taken over the lead in education due to its simplicity, but C remains irreplaceable in areas where direct control over hardware is needed. Known for its efficiency and flexibility, C is the foundation of many modern programming languages, including C++, Java, and Python. Whether you are a beginner who wants to start with programming or an experienced programmer who wants to deepen your understanding of low-level computing, learning the C language is an excellent choice. This C tutorial and practical guide will help you understand the basics of C programming, covering everything from setting up a development environment to writing and compiling C programs.

The C programming language is a general-purpose procedural language. It is not at all difficult as it is said, because it is only a set of correctly written instructions that the computer will execute. It was created in Bell Laboratories in New Jersey. Its creator, Dennis Ritchie, originally designed and implemented it for the UNIX operating system on a DEC PDP-11 computer, with the aim of replacing assembly language in solving systems programming. Despite the fact that it is generally rarely used today, its extension and successor is the C++ programming language, because unlike the C programming language, it supports object-oriented programming. However, before you step into the C++ programming language, we think you should first learn the C programming language. It is fully accepted by the C++ programming language, so it will also be much easier for you to learn and program in C++ afterwards.

The C programming language is often taught through Linux, especially at universities and technical school

The C programming language is often taught through Linux, especially at universities and technical school

Today, the C programming language is often taught through the Linux operating system more than through Windows or other operating systems, especially in universities and technical schools. The reasons for this are:
  • Natural environment for C – The Linux kernel is written in C, which makes it ideal for learning systems programming.
  • GCC and open-source tools – The GCC compiler and tools like gdb, make, and valgrind are standard in the Linux environment.
  • Terminal-based approach – Linux encourages working through the command line, which allows for a better understanding of compiling, linking, and running programs.
  • Learning programming while working with system resources – Students often learn how to manage memory, processes, and files in a Linux environment.
However, in a corporate environment, Windows is still used for C programming, especially in combination with the Microsoft Visual Studio environment.

How to Set Up a Development Environment for C Programming?

Sunday, September 29, 2024

First Steps in the World of PHP Programming, Create Interactive Web Pages

Before you dive into the world of PHP programming, it's crucial to get a grasp of the basics. Understanding what PHP programming language is, its history, and its capabilities will set a strong foundation. Additionally, setting up your development environment is key to a smooth learning experience. We strongly recommend using VSCode - Visual Studio Code as your IDE - Integrated Development Environment. Based on our extensive experience with over 15 programming languages, we've found that PHP can be particularly tricky, but a good IDE can significantly reduce errors. VSCode, in our opinion, is the best tool for the job. So, make sure you've read the previous post and completed the necessary installations before moving forward. We'll be using VSCode throughout this tutorial, and we believe you'll find it to be an invaluable asset in your PHP journey.

A boy is learning PHP to build his own interactive web pages

A boy is learning PHP to build his own interactive web pages

If you're planning to use Visual Studio Code for PHP development, you'll need to install a few extensions. While VSCode comes with some built-in extensions, especially for HTML, learning PHP without understanding HTML is like trying to build a house without bricks. They go together. If you need a refresher on HTML, check out this tutorial, here. In this PHP tutorial, we'll also be using Bootstrap. Don't worry if you're new to it; we can learn as we go. To get started, fire up XAMPP and start the Apache server. You don't need MySQL for now. Open Visual Studio Code and click on the Extensions icon on the left sidebar. Install the following extensions:

  • PHP
  • PHP Intelephense
  • PHP Mess Detector
  • phpfmt – PHP Formatter
  • PHP Debug
  • PHP Getters & Setters
  • Auto Close Tag
  • Live Server
While you can install a PHP Server, it's not essential for our purposes. When choosing extensions, opt for the latest versions to avoid compatibility issues. You can certainly add more extensions, but be cautious as conflicts can arise. For instance, we once added some HTML extensions that caused unexpected problems. Uninstalling them resolved the issue. Once you've installed the listed extensions, restart Visual Studio Code. If you encounter any errors, identify the problematic extension and 
uninstall it. If everything works as expected, you're ready to start coding!

Dive Into PHP Coding: It's Easier Than You Think!

Sunday, March 31, 2024

Step by Step, How to Start with C# 12 Programming?

If you’ve already read the introduction in the previous lesson, take a look here. You’ve become quite familiar with what the C# programming language is, its origins, the changes it has undergone, and you probably have a rough understanding of what the .NET Framework is. If you’ve prepared for learning, made important decisions about which operating system to use, and selected an IDE - Integrated Development Environment to start with, congratulations!

Also, if you’ve successfully installed .NET version 8 (since older versions won’t allow you to code in C# 12), and executed the “Hello, World!” program with a single line of code, then welcome to our second lesson in the C# tutorial. We’ll guide you step by step, in a practical manner, through C# 12 programming.

A student is learning C# 12 programming for the first time at home

A student is learning C# 12 programming for the first time at home

C# 12 programming is a robust and powerful skill that enables the creation of everything from simple applications to complex software systems. If you’re genuinely interested and ready to dive into the world of software development, C# 12 is the right path for you. The best way to learn programming is through practice. Experiment with different concepts and techniques, tinker with code, and solve problems. Cultivate good habits and regularly visit our blog.

In this step-by-step tutorial, we’ll explore the fundamentals of C# 12 programming and provide you with everything you need to start coding your first programs effortlessly. Whether it’s a basic calculator app or a sophisticated software system, practicing project development will enhance your skills and provide valuable experience. Remember that programming is an ongoing process of learning and refinement. Stay abreast of trends, explore new technologies, and learn from your mistakes. Always remain open to new knowledge and be adaptable to change.

My First C# Program: A Journey into Coding

Tuesday, September 26, 2023

Korak po korak, kako kreirati u Django-u jednostavnu tabelu i koristiti Django administraciju?

Ukoliko ste pročitali, prostudirali, instalirali i pripremili sve neophodno za početak učenja Django radnog okvira, pogledajte prethodni post ovde; onda ste spremni za prva, početna i osnovna podešavanja projekta django_tutorial. U prošlom postu našeg tutorijala smo pored kreiranja projekta, takođe kreirali aplikaciju main i super korisnika. Proverili smo da se naš projekat pokreće na lokalnom serveru, portu 8000 uspešno i da se možemo ulogovati na Django administraciju. Da bi nastavili dalje sve iz prethodnog posta mora biti odrađeno uspešno. Ukoliko to nije slučajno vratite se na prošli post ovog Django tutorijala ovde i sve korak po korak ponovo odradite. Ako ste sve uradili kako treba, pokrenite Visual Studio Code ili IDE – Integrisano razvojno okruženje, koje vi koristite; i u njemu otvorite projekat django_tutorial. Proverite da li je meni opcija File -> Auto Save čekirano da se vaš svaki progres automatski sačuva i da ne morate konstanto pritiskati Save dugme. Zatim otvorite panel terminal na View -> Terminal i pokrenite aktivaciju vašeg projekta na sledeći način:

manuel@manuel-virtual-machine:~/django_tutorial$ source env/bin/activate

(env) manuel@manuel-virtual-machine:~/django_tutorial$

Proverite da li vaš projekat ima grešaka, tako što ćete pokrenuti razvojni server:

(env) manuel@manuel-virtual-machine:~/django_tutorial$ cd django_tutorial/

(env) manuel@manuel-virtual-machine:~/django_tutorial:~/django_tutorial$

(env) manuel@manuel-virtual-machine:~/django_tutorial:~/django_tutorial$ python3.11 manage.py runserver

Ukoliko ste dobili rezultat kao na sledećoj slici, onda je sve u redu i možemo nastaviti tačno tamo gde smo stali u prethodnom postu.


( Uspešno pokrećanje Django razvojnog servera )

I pored toga što ste kreirali aplikaciju main u projektu django_tutorijal, to nije dovoljno; nego se kreirana aplikacija mora definisati u fajlu projekta koji se zove settings.py . To je bitan korak koji omogućuje Django radnom okviru da razume i pravilno konfiguriše vašu aplikaciju unutar projekta. Zato, prvo definišite aplikaciju, tako što ćete dodati sledeći kôd u fajl settings.py

# Application definition

INSTALLED_APPS = [

    'django.contrib.admin',

    'django.contrib.auth',

    'django.contrib.contenttypes',

    'django.contrib.sessions',

    'django.contrib.messages',

    'django.contrib.staticfiles',

    'main',

]

Sledeća podešavanja bez kojih aplikacija ne može funkcija su URL-ovi. Ali šta je URL? URLDjango-u predstavlja Uniform Resource Locator - uniformni resursni lokator, odnosno adresu na kojoj se može pristupiti određenom delu vaše veb aplikacije. URL-ovi se koriste za mapiranje zahteva od korisnika na odgovarajuće views - poglede u vašoj aplikaciji. Bez obzira koliko je mala ili velika vaša aplikacija u projektu, ona će da koristi URL-ove koje joj definišete. S obzirom da jedan projekat može imati mnogo URL-ovaDjango preferira da svaka aplikacija ima svoj fajl u kojoj se definišu URL-ovi. Tako da se u glavnom projektu umesto URL-ova, pozivaju fajlovi koji imaju definisane URL-ove na nivou aplikacije. Zato sledeći korak je podešavanje URL-ova kako bi naša  aplikacija bila funkcionalna.

Podešavanja URL-ova u Django projektu i aplikaciji