Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.

Questions tagged [structured-programming]

A programming paradigm aimed on improving the clarity, quality, and development time of a computer program by making extensive use of subroutines, block structures and for and while loops.

Filter by
Sorted by
Tagged with
0 votes
1 answer
222 views

I write embedded software and I often find myself structuring my code such that there is one large parent class that contains just about everything. For example, consider you want to model a hardware ...
CHollman82's user avatar
-1 votes
1 answer
246 views

So, recently I have been doing a lot of programming in Python. I have noticed that my programs can be somewhat hard to read. I usually have one main class which does everything, sort of like this: ...
In Hoc Signo's user avatar
17 votes
6 answers
9k views

This is the most popular way (it seems to me) of checking if a value is in an array: for (int x : array) { if (x == value) return true; } return false; However, in a book I’ve read ...
Danila Piatov's user avatar
3 votes
1 answer
195 views

So I came across an old blog post from Robert Martin (Uncle Bob) that talks about how the Structured Programming discipline convinced programmers to take the GOTO statement out of their code, even ...
BarrettNashville's user avatar
23 votes
6 answers
6k views

I'm going through an introductory programming book and it lists a simple example in pseudocode: Start input myNumber set myAnswer = myNumber * 2 output myAnswer Stop Why can't we omit creating ...
user1475207's user avatar
2 votes
3 answers
566 views

Occasionally - but recurringly - I face the following loop pattern problem: CodeSnippet1 DO WHILE LoopCondition //LoopCondition depends on some pre-calculation from CodeSnippet1 CodeSnippet2 ...
fjf2002's user avatar
  • 123
1 vote
2 answers
237 views

What I want to represent Let's assume I have several schemas of the following kind: It is a tree on which positions of squirrels are represented by a blue dot. The number of bifurcations differ from ...
Remi.b's user avatar
  • 113
6 votes
2 answers
731 views

I couldn't find any links or books claiming that Lisp is the first programming language to adopt structured programming (actually, most of them don't even mention Lisp at all), but if conditionals ...
alice's user avatar
  • 187
2 votes
5 answers
3k views

As the title suggests my question is whether or not unit-tests should be entirely self-contained or can one rely on the results yielded by previous tests? What I mean, in case that it isn't entirely ...
user avatar
25 votes
7 answers
7k views

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,189
3 votes
1 answer
411 views

It seems there is a lot of discussion on the web about the differences between these two paradigms, and how OOP is somewhat better than structured programming. But aren't they complementary? From my ...
Thomas C. G. de Vilhena's user avatar
8 votes
3 answers
3k views

I discovered some time ago that the GOTO control keyword was introduced in PHP 5.3.0. http://php.net/manual/en/control-structures.goto.php Why did it happen? What are the language design goals ...
Tulains Córdova's user avatar
5 votes
2 answers
945 views

Despite having started learning programming with Pascal and C, after the jump to OO (C++, Java) I lost sense of the structured programming paradigm. I have started learning Lua and I have researched ...
MLProgrammer-CiM's user avatar
0 votes
3 answers
208 views

I'm new to programming, and I'm working in C. I know that this is structured programming but if I use blocks, say for local variables: { int i; for(i=0; i<25; i++){ printf("testing...\n"); ...
tapiwa 'tp''s user avatar
116 votes
4 answers
80k views

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