Questions tagged [procedural]

Procedural programming is a design methodology in which large programs are broken down into procedures or subroutines.

Filter by
Sorted by
Tagged with
2 votes
2 answers
118 views

Procedural configuration code to object oriented code

Lets say we have an Webserver-Framework and a Database-Framework, and now i want to configure that Webserver and the Database, then it could look like the following class Start { public static ...
user avatar
-1 votes
2 answers
158 views

Robins magic Chess game: Where to put/split the behaviour to full fill Law of Demeter [closed]

So now i have a really concrete example; its highly related to that question here: Tell one, but ask the others? the important statements there are: In the comment section https://softwareengineering....
user avatar
0 votes
3 answers
421 views

Tell one, but ask the others?

Consider we have three classes which want to collaborate, then, where is the behaviour? I guess it can only be in one of the three classes or in a fourth one acting than as a procuedural connector-...
user avatar
2 votes
2 answers
100 views

Action objects VS handle/service-methods

a short question: class ItemActionObject { private final Object moreParameters; private final Object otherDependencies; private final Item item; public ItemActionObject(Item item, ...
user avatar
2 votes
2 answers
156 views

How does a function's purpose differ between a OOP and Procedural style?

A while ago, I saw a Stack Overflow answer (I can't seem to find it now) that says functions and methods have different goals. A method is to change something within the instance, while a function is ...
user avatar
0 votes
1 answer
133 views

Why is the UNIX / FP style of smaller function composition not common?

TL;DR Why is the UNIX / functional style of composing and injecting smaller functions so much rarer than the Beck/Fowler/Bob refactor-to-objects style when it comes to writing maintainable, "...
user avatar
4 votes
0 answers
143 views

Global variables and common block management in Fortran

Background The high level overview of my situation is described here. I am breaking it apart into smaller, specific questions, such as this one, regarding extensive use of global variables in a ...
user avatar
  • 325
1 vote
2 answers
342 views

OOP: centralized vs decentralized approach

Suppose you have a client-server architecture structured with a Client class that asynchronously implements the Send() and Receive() functions. You also have a base Message class and several other ...
user avatar
4 votes
3 answers
488 views

How to adhere to the Open Closed principle in a procedural language like C

In Robert Martin's seminal 1996 article "The Open-Closed Principle" he presents an example in C which does not follow the principle (the DrawAllShapes() method is not closed for modification): enum ...
user avatar
  • 277
-3 votes
3 answers
651 views

Detailed difference between Procedural Programming and Object Oriented Programming [closed]

I'm a newbie. Please give me a detailed (very detailed one) about these two types of programming that even I, a beginner, could understand. Their core differences, relevant things that I must remember,...
user avatar
3 votes
2 answers
511 views

Object Oriented vs. Procedural Processes in Embeded System

I'm currently developing a controller for an industrial application which takes data inputs from various sensors and interfaces (ethernet, serial, etc.), does some minimal processing, and adjusts ...
user avatar
-2 votes
2 answers
368 views

Why we are moving towards Mixed Programming Paradigm [closed]

C had Procedural Paradigm, then C++ came with OOPS and success of JAVA make it best suitable Programming Paradigm. Now, Look at recent trends, Kotlin, Swift these languages are not like JAVA these ...
user avatar
  • 105
-8 votes
1 answer
379 views

Importance of storage in c++ [closed]

I want to know that whether storage is an issue with respect to current hardware and software market when we talk about the large size of C++ programs?? Because in certain conditions we have to choose ...
user avatar
  • 1
1 vote
2 answers
2k views

Why is white box testing discouraged in OOP?

It seems the general consensus for unit testing classes is to test your object through its public interface only. So if you wanted to test the removeElement method on a LinkedList class you'd need to ...
user avatar
3 votes
5 answers
802 views

What programming paradigm do you think would work best for the AI aspect of a chess engine?

I wish to write a chess AI which simulates the way I think over the board, using C++. My focus is on writing the algorithms for choosing moves (decision making), not defining the board and pieces. To ...
user avatar
4 votes
1 answer
188 views

Chaining functions in procedural languages [duplicate]

My department is about to make some new hires. They are likely to be a) junior or b) more experienced that myself. This year I have helped some C engineers transition to C# and observed some ...
user avatar
  • 718
0 votes
1 answer
247 views

OOP: how to keep some state for a brief moment?

My job and my personal interests often have me writing parsing code, that is, code that converts from an input string written in a given formal language to a tree of model objects. I come from a C ...
user avatar
  • 117
1 vote
4 answers
472 views

How to convince "old" co-workers of the merits of OO for certain applications [closed]

I am working as SAP developer, where in many cases you have traditional requirements to applications (reports): Read in some data from the database or a file Do some magic with that data, e.g. do ...
user avatar
  • 121
1 vote
1 answer
178 views

Is it sensible to write a wrapper to use an OO library in this procedural project?

I am writing a program using a procedural style. At most I have some modules where the logic is present (one to retrieve data from, one to display the info, one with the saving logic, etc.), but my ...
user avatar
10 votes
2 answers
467 views

Programming to Data Oriented Interfaces

There is a portion of our codebase written in the following style: // IScheduledTask.cs public interface IScheduledTask { string TaskName { get; set; } int TaskPriority { get; set; } List&...
user avatar
  • 3,113
6 votes
1 answer
662 views

Testing procedural code

TL;DR. Writing procedural code within a DB transaction. How can I improve design of the code so it's better testable? In my application I have a service object that perform multiple things within the ...
user avatar
  • 171
12 votes
4 answers
6k views

Cleanest way to write logically procedural software in an OO language

I'm an electrical engineer and I don't know what the hell I'm doing. Please save the future maintainers of my code. Recently I've been working on a number of smaller programs (in C#) whose ...
user avatar
  • 231
9 votes
8 answers
5k views

Structuring Procedural vs OO code

I have spent the vast majority of my programming career using Java and very OO based C++. I am really interested in learning to think more procedurally, so I have been starting to do some practice ...
user avatar
  • 631
3 votes
1 answer
8k views

Convert procedural code to object oriented

I have a PHP application (a web service). It consists of files grouped in directories by theme like :      /customer         /search.php with this example content : Auth::authenticate($options); $...
user avatar
2 votes
3 answers
1k views

What procedural languages support algebraic data types? [closed]

One of the things I like about the new Apple language Swift is that it combines procedural programming with algebraic data types. What other languages do this?
user avatar
8 votes
2 answers
17k views

Is recursive code slower than non-recursive code?

Now I'm only a novice programmer, but what my friends that are studying programming tell me is that recursive code is a good thing, it leads to less code duplication and it looks more elegant. Now ...
user avatar
0 votes
1 answer
462 views

Testing in procedural programming code

I have designed and implemented, for my final year in college, an autonomous robot with Arduino board microcontroller. The robot wanders around an area, avoids obstacles and tries to detect intruders. ...
user avatar
  • 3
4 votes
2 answers
3k views

Are object oriented programming languages procedural? [duplicate]

Procedural programming means coding the application is a series of tasks. Do A, then do B, then Do C. And often wrap these tasks in procedures or functions that can be easily called and run several ...
user avatar
  • 20.7k
33 votes
4 answers
11k views

What exactly is procedural programming? How exactly is it different from OOP? Is it the same as functional programming?

I am programming in Java in a very object-oriented (OO) style. OOP comes very intuitively to me, but I have very little knowledge about other kinds of programming. What exactly is procedural ...
user avatar
  • 20.7k
3 votes
3 answers
10k views

An ideal way to decode JSON documents in C?

Assuming I have an API to consume that uses JSON as a data transmission method, what is an ideal way to decode the JSON returned by each API resource? For example, in Java I'd create a class for each ...
user avatar
  • 131
25 votes
7 answers
6k views

What were the Design Patterns of the procedural programming era? [closed]

Similar: How was programming done 20 years ago? OOP is quite fashionable nowadays, having its roots in Simula 67 in the 1960s, and later made popular by Smalltalk and C++. We have DRY, SOLID, many ...
user avatar
  • 6,745
2 votes
4 answers
303 views

Is using subprocedures to logically separate my code a bad idea for structured programming? [duplicate]

Most of my programming experience is in OOP where I have fully embraced the concepts thereof including encapsulation. Now I'm back to structured programming where I have a tendency to logicaly ...
user avatar
8 votes
6 answers
7k views

Naming functions that retrieve a value

I have this personal rule to start all function/method names with a verb. My verb of choice for functions or methods that get a value based on some data structure or object is get. I'm wondering if ...
user avatar
  • 2,077
4 votes
3 answers
1k views

Writing Clean, Elegant Procedural Code (BASIC): Is There Such a Thing?

I learned to code in OO languages. I've always been interested in design patterns, clean code, etc., etc. - you know the type. Now at work I'm using a BASIC dialect. Given modern programming values, ...
user avatar
  • 419
5 votes
4 answers
2k views

mvc pattern on procedural php

First off, I do not have anything against OO programming (I'd be mad if i believed so). But I was thinking on some sort of procedural MVC pattern with PHP; let me explain better. As we all know, ...
user avatar
99 votes
16 answers
32k views

Why aren't user-defined operators more common? [closed]

One feature I miss in from functional languages is the idea that operators are just functions, so adding a custom operator is often as simple as adding a function. Many procedural languages allow ...
5 votes
5 answers
2k views

What is the difference between _Procedural Generation_ and _Random Generation_?

Today, I got into an argument about the term "procedural generation". My point was that its different from "classic" random generation in that procedural generation is based on a more mathematical, ...
user avatar
  • 153
13 votes
5 answers
7k views

Is unit testing procedural code effective?

On a current project, the powers that be want to have unit testing incorporated into our development cycle to avoid the constant amount of bugs that seem to seep into our code. The problem is that the ...
user avatar
4 votes
1 answer
914 views

Rewriting a Procedural PHP App - Should we use a framework?

We have an app that's currently only got about 120 users. The userbase will probably grow by 50% over the next 12 months - but we're going to have to separate storage etc. because we're looking at ...
user avatar
6 votes
6 answers
2k views

Can you learn OO programming without procedural?

I've seen a number of question asking whether someone should learn procedural or OO first. But is this even possible? Can you learn OO programming without first having an understanding of procedural ...
user avatar
6 votes
2 answers
7k views

Non-OOP languages advantages and good uses

I'm a C# developer, but I also know Java, JavaScript, XSLT, a little of C and Perl, and some other that I may have forgotten. Still, the paradigm I'm most familiar with is OOP. I have always thought ...
user avatar
  • 1,907
82 votes
12 answers
52k views

What's the benefit of object-oriented programming over procedural programming?

I'm trying to understand the difference between procedural languages like C and object-oriented languages like C++. I've never used C++, but I've been discussing with my friends on how to ...
user avatar
  • 2,119
107 votes
4 answers
64k views

What's The Difference Between Imperative, Procedural and Structured Programming?

By researching around (books, Wikipedia, similar questions on SE, etc) I came to understand that Imperative programming is one of the major programming paradigms, where you describe a series of ...
user avatar
106 votes
12 answers
56k views

Why is C not considered an 'object-oriented' language?

It seems that C has its own quasi-objects such as 'structs' that can be considered as objects (in the high-level way that we would normally think). And also, C files themselves are basically separate ...
user avatar
  • 6,125