Questions tagged [procedural-programming]

Procedural programming is a term used to denote the way in which a computer programmer writes a program. This method of developing software, which also is called an application, revolves around keeping code as concise as possible. It also focuses on a very specific end result to be achieved. When it is mandatory that a program complete certain steps to achieve specific results, the code is said to have been written according to procedural programming.

Procedural programming is not always the preferred method of coding applications. Software that is highly complex can require literally thousands of lines of code, making it somewhat more difficult for a team of people to work with it. Some programmers hold the opinion that extremely large applications can become difficult to maintain even by one developer.

Some people wrongly believe that it is impossible to write very large or complex software in a procedural programming language. Certain programs might be more easily written using Object Oriented Programming (OOP), but this does not mean that they cannot be developed procedurally. The Linux kernel, which is the core of an open-source operating system, is written using procedural programming. Other major applications such as the Apache server, the Drupal content management system and Samba, are all written in this manner. These applications are large and are considered to be complex by the overwhelming majority of programmers.

Among the procedural programming languages in existence are C, Fortran and Python. Many important applications and utilities have been coded in such languages. For example, Anaconda, the installer for Fedora Linux, is written in Python, as are various software managements tools.

Imperative programming is another term used to signify this type of development.

252 questions
2
votes
5 answers

How do I handle combinations of behaviours?

I am considering the problem of validating real numbers of various formats, because this is very similar to a problem I am facing in design. Real numbers may come in different combinations of formats, for example: 1. with/without sign at the…
Andy
  • 2,770
  • 9
  • 35
  • 42
1
vote
7 answers

Do high-level programming languages tend to be object-oriented while low-level languages are procedurally oriented?

I'm just getting a bit confused about all the language types out there. What's the difference - if there is one - between the high level / low level languages distinction compared to the object-oriented / procedural distinction? A lot of the…
Kirt
  • 257
  • 5
  • 15
1
vote
3 answers

Handling errors when refactoring procedural code

I was handed some C code that basically consists of a big main() function. I am now trying to unfold the method into smaller functions, to make clearer the code's intent. I am having some trouble, though: void main(int argc, char *argv[]) { …
devoured elysium
  • 101,373
  • 131
  • 340
  • 557
1
vote
0 answers

SELECT query using FIND_IN_SET() to match values in the separated commas

I am trying to do dynamic nav menus for the pages, when admin creates a page, he selects multiple selection for the menus that this page should appears for, I am achieving this through two steps, 1st step adding the selected menus in the database…
wowoffer
  • 13
  • 9
1
vote
0 answers

Design pattern for DataEngineer-ETL-pandas

I used to be a Web Backend Developper (using Symfony and Spring-boot). Now, I'm interested in Data Engineering with Python ... and I see that we use Procedural way more that OOP paradigm. That is not a big deal but for example, when we do ETL with…
1
vote
1 answer

Upload image from android phone to the Asp.net server

I searched many links but not able to find the solutions. As i dont have much idea about coding Asp.net . Can any one help me about the procedure with example to upload a image from the imageview to the Asp.net server. thanks in advance
radha
  • 175
  • 5
  • 13
1
vote
3 answers

Should I design my software according to a paradigm or according to the tools the language supplies?

I will explain the question by example: In zend framework, when you want to add a functionality to the view class, you can use what is called a Helper class. A helper class is a class that has one method (Same as name of class) that becomes…
Itay Moav -Malimovka
  • 52,579
  • 61
  • 190
  • 278
1
vote
2 answers

Python - I'm declaring two arguments, but 1 is missing?

I'm trying to develop a text editor that replaces user-defined shortcuts with words. I've been able to solve the replace function and tweak it to my design, but I'm having trouble taking the syntax of the console (see code below) and feeding the…
1
vote
0 answers

C# My maze generator can't seem to handle blocks with three open sides

I'm trying to make a maze generator in C#. None of the cells are ever set to CLOSED_TOP, CLOSED_BOTTOM, CLOSED_LEFT, CLOSED_RIGHT, or OPEN even when they do go down that new path. I'm implementing a DFS algorithm for generating the maze: Pick any…
1
vote
3 answers

Is it possible to implement all 4 principles of Object Oriented Programming using only procedures and global variables?

This is a question that has haunted me for a long time now. Is it possible to implement OOP principles like Polymorphism and Inheritance in a non-OO language like C using only procedures and global variables? Do we need special treatment from lower…
Mehran
  • 1,977
  • 1
  • 18
  • 33
1
vote
1 answer

Procedural world generation can't handle big maps

so, I'm making a terraria-like game in unity 2019 on windws 10 using c# which has procedurally generated tilemaps and i have this script attached to a grid: using UnityEngine; using AccidentalNoise; using System.Collections.Generic; using…
1
vote
1 answer

Implement a basic stratergy pattern in c

I am trying to implement a basic strategy pattern for understanding. I am new to programming. what am i doing wrong in the following code. Can some one give a basic c implementation of strategy pattern.Thanks in adavance #include #include…
madhu madi
  • 85
  • 8
1
vote
1 answer

Mastermind game using alphabets and validation in python

I am relatively new to coding and would like to create a mastermind game using letters instead of colors/numbers. The secret code in my MasterMind is a sequence of 4 letters. Each letter in a secret code is unique, and is from ‘A’ to ‘H’. Some…
1
vote
0 answers

How to add tag and category in a php CMS and then display them in posts?

I'm beginner at php. i'm building a simple CMS with php from scratch. i could build the CRUD part successfully but now i'm going to add tag and category to my posts. i tried my own ways but none of the worked!! As you know tags and categories are…
1
vote
1 answer

Why is my list reverse function working on its own, but not inside of another function?

I am trying to call a reverse function I wrote (that works when called alone) inside another function, but it outputs incorrect results. I'm writing a program to take the derivative, with respect to x, of a bivariate polynomial. I have a main…
user11325594