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.

193 questions
110
votes
5 answers

simple explanation PHP OOP vs Procedural?

I would like to learn PHP and want to get an Idea about OOP and Procedural. I read some other blogs and tutorials about OOP vs Procedural but I still can't understand the approach. OOP vs Procedural Which I should learn? What is the difference in…
Pennf0lio
  • 3,760
  • 8
  • 44
  • 68
89
votes
19 answers

Procedural music generation techniques

I've been putting a lot of thought into procedural generation of content for a while and I've never seen much experimentation with procedural music. We have fantastic techniques for generating models, animations, textures, but music is still either…
Serafina Brocious
  • 29,643
  • 11
  • 85
  • 111
26
votes
1 answer

PHP Testing, for Procedural Code

Is there any way of testing procedural code? I have been looking at PHPUnit which seems like a great way of creating automated tests. However, it seems to be geared towards object oriented code, are there any alternatives for procedural code? Or…
Daniel West
  • 1,758
  • 2
  • 20
  • 34
22
votes
2 answers

Multi-Paradigm Languages

In a language such as (since I'm working in it now) PHP, which supports procedural and object-oriented paradigms. Is there a good rule of thumb for determining which paradigm best suits a new project? If not, how can you make the decision?
Thomas Owens
  • 107,741
  • 94
  • 299
  • 427
22
votes
7 answers

Speed Comparisons - Procedural vs. OO in interpreted languages

In interpreted programming languages, such as PHP and JavaScript, what are the repercussions of going with an Object Oriented approach over a Procedural approach? Specifically what I am looking for is a checklist of things to consider when creating…
cmcculloh
  • 43,791
  • 36
  • 94
  • 126
19
votes
2 answers

Fastest Perlin-Like 3D noise algorithm?

It's been well over 20 years since Ken Perlin first invented his noise. Has anybody managed to make a faster kind of 3D noise generator with properties close to Perlin's (procedural, natural-looking grouping, reduced banding, regular feature size,…
Nick Udell
  • 2,306
  • 5
  • 41
  • 81
19
votes
9 answers

Is OOP worth using in PHP?

There are many debates on whether Object Oriented Programming is good or not. But, using OOP in Php is slower. Would it be a good trade to use procedural programming and faster speed and OOP with slower speed (since classes have to be initiated…
ambiguousmouse
  • 1,835
  • 2
  • 21
  • 27
10
votes
2 answers

How do I procedurally generate images using rust-image?

I'd like to learn Rust and thought it would be fun to procedurally generate images. I've no idea where to start though... piston/rust-image? But even with that where should I begin?
Rik
  • 423
  • 3
  • 12
10
votes
3 answers

Is it acceptable to use a mix of object oriented style with procedural style in coding PHP?

So before I always used to use procedural style to code php, such as: mysqli_connect or mysqli_prepare And now I accidentally began to mix it all up and I would do something like: mysqli_connect(); which is procedural style, and then the next…
edwardtyl
  • 264
  • 4
  • 12
9
votes
1 answer

On-the-fly Terrain Generation Based on An Existing Terrain

This question is very similar to that posed here. My problem is that I have a map, something like this: This map is made using 2D Perlin noise, and then running through the created heightmap assigning types and color values to each element in the…
Maltor
  • 333
  • 4
  • 15
8
votes
4 answers

Loosen "Local procedure/function assigned to procedure variable" restriction gracefully

Consider the following test-case: { CompilerVersion = 21 } procedure Global(); procedure Local(); begin end; type TProcedure = procedure (); var Proc: TProcedure; begin Proc := Local; { E2094 Local procedure/function 'Local' assigned…
Free Consulting
  • 4,141
  • 1
  • 25
  • 48
8
votes
4 answers

What content have you made/seen made using procedural techniques

I was looking at some study i have to do in the future to do with procedural generation techniques and i was wondering what type of content you have: Developed Helped Develop Seen implemented Tried to develop and what methods/techniques/procedures…
Craig
  • 1,109
  • 1
  • 13
  • 26
7
votes
4 answers

Choosing which classes to use in a php OOP design

I run an arcade site and over the past few years it's had many features added, it's got to the point where procedural programming just looks way too complicated and adding new features or making simple design modifications can be very…
Dan
  • 10,835
  • 12
  • 45
  • 105
7
votes
2 answers

Procedural Avatar Generation

I'd like to implement a system that generates unique NxN blocks when given a MD5 hash as an input, currently I'm splitting the MD5 into sub-strings and just using them as Hex colour-codes, does anyone have any good ideas on systems I could use to…
Baxter
  • 2,325
  • 1
  • 20
  • 27
6
votes
2 answers

php procedural with namespace vs oop

The biggest advantage of the OOP vs procedural programming in PHP to my understanding is the sort of separation of the function names (sort of namespace). So now when we have namespace since version 5.3, what do you think - For most cases (small to…
1
2 3
12 13