Skip to main content

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
4 votes
5 answers
308 views

Anemic Models vs. Rich Models: When to Use?

I'm working on an application and have encountered two different approaches for organizing business logic. There's a general consensus that application rules should be handled in higher layers, so I ...
Azuos's user avatar
  • 49
2 votes
2 answers
126 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 ...
Robin Kreuzer 2's user avatar
-1 votes
2 answers
175 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....
Robin Kreuzer's user avatar
0 votes
3 answers
481 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-...
Robin Kreuzer's user avatar
2 votes
2 answers
196 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, ...
Robin Kreuzer's user avatar
2 votes
2 answers
164 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 ...
Alex's user avatar
  • 147
0 votes
1 answer
152 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
404 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 ...
ximiki's user avatar
  • 355
1 vote
2 answers
457 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 ...
m.iurato's user avatar
4 votes
3 answers
794 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 ...
Ken's user avatar
  • 277
-3 votes
3 answers
1k 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,...
nvim_'s user avatar
  • 11
3 votes
2 answers
655 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 ...
Dragonsheep's user avatar
-2 votes
2 answers
410 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 ...
rks's user avatar
  • 105
-7 votes
1 answer
420 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 ...
Tom 's user avatar
  • 1
1 vote
3 answers
3k 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
925 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 ...
Seeking_Truth's user avatar
4 votes
1 answer
210 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 ...
Gusdor's user avatar
  • 748
0 votes
1 answer
259 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 ...
eepp's user avatar
  • 117
1 vote
4 answers
528 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 ...
Matthias's user avatar
  • 121
1 vote
1 answer
185 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 ...
Vito De Tullio's user avatar
10 votes
2 answers
485 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&...
walpen's user avatar
  • 3,241
6 votes
1 answer
739 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 ...
oldhomemovie's user avatar
13 votes
4 answers
8k 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 ...
Lombard's user avatar
  • 241
11 votes
8 answers
6k 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 ...
JParrilla's user avatar
  • 681
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); $...
Lorenz Meyer's 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?
John DeHope's user avatar
8 votes
2 answers
18k 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 ...
Overly Excessive's user avatar
0 votes
1 answer
550 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. ...
alexca's 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 ...
Aviv Cohn's user avatar
  • 21.5k
33 votes
4 answers
14k 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 ...
Aviv Cohn's user avatar
  • 21.5k
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 ...
Abdulaziz's user avatar
  • 131
25 votes
7 answers
7k 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 ...
Vorac's user avatar
  • 7,149
2 votes
4 answers
308 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 ...
Chad Harrison's user avatar
9 votes
6 answers
9k 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 ...
futlib's user avatar
  • 2,185
4 votes
3 answers
2k 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, ...
Tom Tom's 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, ...
john smith's user avatar
98 votes
16 answers
33k 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
3k 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, ...
U-No-Poo's user avatar
  • 153
13 votes
5 answers
8k 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 ...
canadiancreed's user avatar
4 votes
1 answer
935 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 ...
Meezaan-ud-Din's user avatar
6 votes
6 answers
3k 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 ...
Winston Ewert's user avatar
6 votes
2 answers
8k 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 ...
Raphael's user avatar
  • 1,997
82 votes
12 answers
53k 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 ...
niko's user avatar
  • 2,119
115 votes
4 answers
77k 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 ...
Daniel Scocco's user avatar
115 votes
13 answers
65k 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 ...
Dark Templar's user avatar
  • 6,313