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 ...
9
votes
4answers
97 views
I keep everything in an external .js file. But not all functions are used on every page. Does this affect speed?
My app's JavaScript/jQuery is contained in an external scripts.js file. It generally looks like this:
$('document').on('ready', function() {
giraffe();
elephant();
zebra();
});
function ...
0
votes
6answers
568 views
Substitute for Visual FoxPro
Well I really don't know if I should post this question here but... Well I would like to know if there's a substitute for Visual FoxPro. The last version is the 9.0 With the language FoxPro 3.0 so, I ...
0
votes
1answer
69 views
Texture Randomly Generated and Sized Rects
I'm making a game (libgdx & box2d) with randomly generated planets having skyscrapers on them - see image below.
The Skyscrapers are random in their position, width and height. I'm now looking ...
0
votes
1answer
204 views
MVC Razor Display Data in Groups
I keep falling back to procedural programming when displaying data in groups and I am sure that there must be a better way. Your thoughts?
//Example: Sales by Region
@{
string _Region = "";
...
1
vote
5answers
114 views
How to convert a function from PHP Procedural to PHP MVC?
I have this function on my View Page, which truncates some data to present it on my table.
function truncate($mytext) {
//Number of characters to show
$chars = 100;
$mytext = ...
2
votes
1answer
79 views
PHP: proper function call from $_REQUEST
I've been reading a project (not based on any PHP framework) and I met the following (procedural) code on nearly every PHP file that responds to user requests (either $_GET or $_POST).
if ...
1
vote
1answer
95 views
Regarding approach to solving sliding tiles puzzle
I have started reading "Think Like A Programmer" by V Anton Spraul. Here is the question.
The train technique mentioned in the book works fine for the example sighted in it.
I was attempting to ...
0
votes
1answer
185 views
How to build a Control Flow Graph (CFG) from a JSON object (AST)
I want to build a control flow graph (CFG) from an AST given in JSON format. So this AST is automatically created in TouchDevelop against each script. And TouchDevelop is not Object Oriented ...
4
votes
3answers
99 views
Converting procedural PHP into object-oriented PHP
I currently have a fairly large application written entirely with procedural PHP. I am looking to further my PHP experience and recode a majority of my application using object-oriented techniques.
...
2
votes
2answers
55 views
algorithm for block generation from nodes and relationships
I have list of nodes and lines between them, it looks like this:
What I need is to generate blocks, in this case it would be like this:
block1:1,2,14,11
block2:2,13,12,14
block3:2,3,4,5,6,12,13
...
8
votes
9answers
687 views
Is my code too procedural?
Someone recently took a look of my code and commented that it was too procedural. To be clear, it was not much of the code they saw - just a section which clearly outlines the logical steps taken in ...
21
votes
17answers
17k views
What's the difference between a procedural program and an object oriented program?
I'm fairly new to programming but I've been reading some interesting discussions on StackOverflow about various programming approaches. I'm still not 100% clear on what the difference is between ...
-2
votes
4answers
50 views
I'm doing a tut, but I cant understand this syntax [closed]
I normally write oop code, thats probrably why I never saw this way of coding. I dont understand the syntax in the multidemensional array below, why is [$obj->id]['label'] not just ...
4
votes
2answers
361 views
Why is object oriented PHP with mysqli better than the procedural approach? [closed]
I have been using the procedural approach with mysql* until recently. Now I want to shift to mysqli and object oriented approach. Many online resources and books state that OOP is better than ...
2
votes
2answers
224 views
How to use append-map in Racket (Scheme)
I don't fully understand what the append-map command does in racket, nor do I understand how to use it and I'm having a pretty hard time finding some decently understandable documentation online for ...