The programming-logic tag has no wiki summary.
2
votes
1answer
138 views
Handling subscriptions, balances and pricing plan changes
Preamble
My aim is to create reusable code for multiple projects (and also publish it on github) to manage subscriptions. I know about stripe and recurring billing providers, but that's not what this ...
0
votes
1answer
155 views
Good Data Structure book to improve programming logic for children [closed]
My cousin (Age 10) who studies in Standard 5. He wants to learn programming and programming logic.
Which book or resources should I refer? Is there any Good Data Structure book to improve ...
-2
votes
2answers
204 views
Is it reasonable to use Javascript MVC Frameworks for closed source paid web applications?
I am wondering if it is reasonable to write closed source, paid web apps in Javascript (JS MVC Frameworks like AngularJS, Backbone, Knockout, ...)? I'm concerned because in this type of frameworks you ...
2
votes
2answers
190 views
How to unit test code which is intended to have different results on different platforms
I noticed some duplicate code in a codebase I am working on that appended a filename to a directory path, so I decided to refactor it into its own method. The application I am working on is not well ...
1
vote
1answer
1k views
Flow Chart - While Loops process
I'm having difficulties understanding whether or not this is the right process to use for a flow chart which illustrates the processes involved in an algorithm.
For this, assume the following:
A 1D ...
3
votes
1answer
167 views
Best Traversing Strategy / Logic Help Needed
Background: Here is the scenario, imagine I have a little Robot. I give this robot a Map, and I want him to traverse the map, after doing so, I want the Robot to tell me the shortest possible path on ...
5
votes
1answer
197 views
Is the separation of program logic and presentation layer going too far?
In a Drupal programming guide, I noticed this sentence:
The theme hook receives the total number of votes and the number of votes for just that item, but the template wants to display a ...
-2
votes
3answers
301 views
Should I use AND or should I use OR [closed]
An order can be in the "status" of Completed, Corrected or some other status.
I saw some code that is checking it like this, the purpose is to disable some stuff when the status is in Completed or ...
4
votes
3answers
505 views
Is saying “if ( $a != null && $a == 5)” the same as “if ($a == 5)”
First off, sorry if this is answered somewhere else. I did a brief search, but wasn't sure how to ask in search terms.
I'm looking at some code and came across lot's of statements like this:
if ( ...
9
votes
2answers
801 views
Non-mathematical Project Euler (or similar)? [closed]
I checked the post (Where can I find programming puzzles and challenges?) where there's a lot of programming challenges and such, but after checking several of them, they all seem to be about ...
9
votes
7answers
931 views
Programming knowledge vs. programming logic
Is there any difference between the two topics? I have seen companies asking for Good Programming knowledge some Good Programming logic.
I have seen this in Job profiles for a developer – for e.g. ...
-1
votes
4answers
729 views
How to improve my loop logic in programming?
I know how to do simple loops but I don't know what's going on when many loops are working together.
For example:
for (i=0; i <= 9; i++){
document.write(linebreak);
for (m=0; m <= 9; ...
-5
votes
8answers
493 views
Why aren't postfix and primary expressions symmetrical?
Every primary expression is a postfix expression but a postfix expression is not primary expression.
But in mathematics, equality seems to be symmetrical. That is:
If A is B, then B is A
Why ...
0
votes
5answers
233 views
ternary or something similar for choosing function?
I posted this question on stackoverflow and it got a poor reception. In reality, the problems I'm facing are minor and any workaround can be considered impractical. However, I believe it might be of ...
4
votes
9answers
580 views
How do you decide between putting the code in the database or putting the code in the application? [duplicate]
Possible Duplicate:
Should the programming language or should the database handle more work
For the sake of argument:
Let's assume the application we are building is an amortization ...
17
votes
15answers
3k views
Arguments for or against using Try/Catch as logical operators
I just discovered some lovely code in our companies app that uses Try-Catch blocks as logical operators.
Meaning, "do some code, if that throws this error, do this code, but if that throws this error ...
8
votes
5answers
4k views
When is it appropriate to use a bitwise operator in a conditional expression?
First, some background:
I am an IT teacher-in-training and I'm trying to introduce the boolean operators of java to my 10th grade class. My teacher-mentor looked over a worksheet I prepared and ...
22
votes
9answers
4k views
What do you do to improve your logical programming skills? [duplicate]
Do you think that only the programming pratice will help you to improve your logical programming skill or do you train your brain with puzzle games, trying imagine how universe works, playing ...