Questions tagged [procedural]

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.

187 questions
2
votes
2 answers

From procedural Function to OOP Class (one specific situation)

Still learning OOP, and trying to change my perspective from procedural way of life. I've found a lot of advantages when refactoring, but now I am stuck in a paradigm: I am refactoring a shopping cart. When it goes to checkout, in my old php scripts…
Nacho B
  • 1,573
  • 1
  • 12
  • 16
2
votes
2 answers

Procedural and non-procedural query language difference

Going through the relational algebra, I encountered the term "procedural query language". So what is the difference between a procedural query language and a non-procedural query language?
2
votes
2 answers

PHPUnit - Procedural code needing to be included multiple times

I am currently trying to build up a phpunit testsuite to test some ajax code which is written procedurally. I am unable to edit the original code, fooBar.php, because it might cause issues elsewhere. The issue occurs when I am trying to run a php…
John K
  • 41
  • 6
2
votes
2 answers

Designing WCF service interface. Procedural vs Object Oriented Design

we are building product that can be used by other systems. As we have SOA, we develop only a service (WCF). We had several controversial discussions about how to design an interface of that service. We are choosing between procedural and OO design…
Pavlo Neiman
  • 7,438
  • 3
  • 28
  • 28
2
votes
1 answer

Animate a procedural sea in Three.js

I'm working on my first project with Three.js and I'm hitting against a wall right now. I would like to know what would be the best way to make an animated (low-poly) sea inside Three.js , I've been trying since yesterday with displacementMaps but…
Igor Derval
  • 31
  • 1
  • 3
2
votes
0 answers

Lsystem 3d Trees, more realism

I try to implement procedural 3d trees in OpenGL using Lsystem. Up to now I can get these kind of results: It looks like a tree, but I would like to improve the result, and get more realistic tree. Somebody have any ideas to simply add thickness…
JimZer
  • 918
  • 2
  • 9
  • 19
2
votes
2 answers

Variable from different file in function without using global

Ay, I defined (in config.php): $mysql = mysqli_connect (..); for connecting to the mySQL database. now I want to use the variable in my functions (functions.php): function x () { $fetch = ($mysql, "SELECT ...")); } without using global: function x…
j0hn
  • 57
  • 7
2
votes
1 answer

PHP: Proceedural code - use namespace or array of closures to avoid polluting global namespace?

I am just starting to write a piece of open source software that is written procedurally as an alternative to OOP mvc skeletons/frameworks. So, while I could just write my own OOP MVC framework, the intended purpose is to do it all procedurally. …
Scott
  • 61
  • 1
  • 7
2
votes
7 answers

When do you give up set operations in SQL and go procedural?

I was once given this task to do in an RDBMS: Given tables customer, order, orderlines and product. Everything done with the usual fields and relationships, with a comment memo field on the orderline table. For one customer retrieve a list of all…
Guge
  • 4,569
  • 4
  • 35
  • 47
2
votes
1 answer

Doxygen for procedural programs

I have some large, mostly procedural codes that need to be well documented. This generally involves repeated use of a number of functions that must be executed in a certain order. Doxygen is a great product, but it seems very oriented towards…
Aurelius
  • 1,146
  • 2
  • 13
  • 25
2
votes
1 answer

Code Design - state machine or procedural code

I'm not sure how to proceed on a project when it comes to the code design. Think of a device which has to monitor a voltage value with an analog/digital converter and sometimes has to regulate it's pwm output if the measured values leave certain…
2
votes
1 answer

random city street generation using tiles

I am trying to build a randomized city made out of tiles and so far i can build an array, set the the city edge, place a random building such as a church or factory and can place tiles with random rotations within the set area. But what i need is…
Hybrid1969
  • 29
  • 5
2
votes
1 answer

How to design uml for php procedural language

I did a project on web application using procedural php(didn't used oop concepts). for the documentation purpose i am supposed to design UML models for my application. as we all know that,UML is object oriented, how can i achieve uml for procedural…
bharat
  • 330
  • 1
  • 3
  • 13
2
votes
2 answers

How to run one statement after another in a procedural manner in Javascript?

Lets say we have a simple scenario where I would like to repeatedly output "Hello" followed by "World" 1 second later. I have tried the following: setInterval( function() { console.log("Hello"); setTimeout( …
chutsu
  • 13,612
  • 19
  • 65
  • 86
2
votes
0 answers

Three.js Procedural Texture Disappears After Inital Rendering Frame

I'm working with three.js and attempting to create procedural texture which can be stored and then applied to objects later in a session. Ideally, I would like to create these textures only once each. I would like to be able to sample from existing…