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
3
votes
2 answers

PHP Avoiding globals in procedural programming

I normally use procedural programming with PHP and looking at other questions here asking how to avoid globals the answers were often to use OOP instead. Is it not possible to avoid globals with procedural programming? For example I can write the…
Hasen
  • 11,710
  • 23
  • 77
  • 135
3
votes
1 answer

converting a python script into object oriented program

Hello I am a semi self-taught student, looking to increase my skills, made couples of script on Python using different APIs. I would like to at some point use this script as a module in a bigger project of mine. I have as idea to turn this script in…
Bobthenoob
  • 39
  • 1
  • 2
3
votes
1 answer

Generating a city/town on a grid (Simply my approach)

Problem I am trying to make a city generator for a game that creates blocks that have a type (residential, industrial, commercial). All of my streets will be at 90 degrees and there for I want it to be blocky (instead of zig zagging). Approaches My…
Joe Jankowiak
  • 1,059
  • 12
  • 37
3
votes
2 answers

What is difference between procedural cohesion and sequential cohesion in Software Design Architecture?

Procedural cohesion says Parts of a module are grouped because they always follow a certain sequence of execution and Sequential cohesion says Parts of a module are grouped because the output from one part is the input to another part like an…
Usama
  • 231
  • 1
  • 4
  • 8
3
votes
1 answer

Randomly place objects USING ALPHA MAP

I want to randomly place objects USING ALPHA MAP (only black color, not grayscale). The black areas on the map are using to determine where we CAN place an object. Why do I want to do this? For example, we have some terrain with a river. We want to…
3
votes
1 answer

How do I convert this procedural SQL code for generating a menu hierarchy to a SET based approach?

I have a SQL Server 2008 R2 database table containing hierarchy information in the following format: MarketID Time menuPath SID MarketName 107397507 2012-11-18…
Dan
  • 95
  • 1
  • 5
3
votes
1 answer

Simple procedural 3D Cave Generation?

I've been working on a 3D procedural world for a while now and am wanting to start adding cave systems. I'm wanting to find a fairly simple method of creating 3D cave systems in a procedural manner. I'm currently generating my world using Perlin…
Mythics
  • 773
  • 1
  • 10
  • 19
2
votes
7 answers

Can Procedural Programming use Objects?

I have seen a number of different topics on StackOverFlow discussing the differences between Procedural and Object-Oriented Programming. The question is: If the program uses an object can it still be considered procedural?
Allen
2
votes
1 answer

2D sprite problem when setting up an instant messaging UI

I'm new to Unity and to game development in general. I would like to make a text-based game. I'm looking to reproduce the behavior of an instant messenger like messenger or whatapp. I made the choice to use the Unity UI system for the pre-made…
2
votes
1 answer

Sorting 3D Grid Points into 3D Grid Cells

I'm kind of at a roadblock while trying to assign 3D grid points as vertices to Cells. The Cells should just contain 8 points as corner vertices. I have created the grid without any issues, but cant seem to figure out how to sort the points to their…
BigTing
  • 53
  • 7
2
votes
1 answer

Unity - procedurally change curvature of a quad?

Alright, I currently have a flat quad and would like to add a script that procedurally increases/decreases the curvature of the quad. By curved quad I mean: This would be a lower curvature value: and this would be a higher curvature value: I've…
blue
  • 7,175
  • 16
  • 81
  • 179
2
votes
1 answer

Sound generation or sound file concatenation in PHP

Is it possible to generate sound using PHP - or is there support for sound file concatenation?
ina
  • 19,167
  • 39
  • 122
  • 201
2
votes
1 answer

Convert C++ OO hierarchy to C procedural

I have been using C for a while yet sometimes when I think of how to solve a problem, I can't seem to think of any other way but in a OO way, as I was taught in school. And as I have been using C, I mostly have been using OO patterns but in C,…
aganm
  • 1,245
  • 1
  • 11
  • 30
2
votes
1 answer

How does UV mapping work with surfacetool in Godot?

I'm coding a terrain generator in Godot. I generate the Mesh using SurfaceTool and triangle strips. The geometry works fine — but the UV mapping doesn't, as each triangle repeats the texture instead of the full mesh covering the texture…
2
votes
1 answer

Using WP_Session_Tokens class in a procedural WordPress Plugin

I'm writing a plugin for WordPress, in procedural PHP. Anyway, in the plugin, I want to update a users WordPress Session Token, which is stored in the usermeta table. Digging around, I've found a class which has some methods which I think will…
lukeseager
  • 2,365
  • 11
  • 37
  • 57
1 2
3
12 13