Questions tagged [order]
The order tag has no usage guidance.
20
questions
1
vote
2
answers
262
views
Ordering keyword arguments in a function call
In some languages such as Python, the order of keyword arguments in function calls does not matter. But is there a best practice for it?
For instance, suppose that a function's signature is def foo(...
21
votes
4
answers
5k
views
What does function composition being associative even mean?
When we have a math problem such as 3 + 5 + 2, we say that it is associative. We can choose which step to pick first: 3 + (5 + 2); we know that brackets affect the order in which the operations are ...
0
votes
1
answer
65
views
Remember initial order of list while editing it
The table
Let's say we are running a webapplication for the Superhero Association. In there, there is a table of 1 000 000 super villains which need to be watched. Everytime a super hero gathers new ...
0
votes
2
answers
4k
views
Maintaining order of events with multiple consumers in a typical pub sub scenario
I am using Kafka. I am developing a simple e-commerce solution. I have a non-scalable catalog admin portal where products, categories, attributes, variants of products, channels, etc are updated. For ...
-2
votes
1
answer
79
views
What should be the correct architecture in an e-commerce module
I'm new in development & just developing an e-commerce platform. I'm just confuse about the flow of payment. Suppose I have a checkout page where after logged in user has to press the payment ...
5
votes
4
answers
620
views
Should you unit test order of operations? If so, how?
Imagine a psedo-code class like this which does name comparisons:
public class NameComparer
{
public bool DoNamesMatch(Name name1, Name name2)
{
if(WholeNameMatch(name1, name2))
...
1
vote
1
answer
64
views
How to manage stock before to the shipping?
I have a problem with the handling of an order once it has been confirmed and has already been shipped to customers.
Suppose our initial order is as follows, and we don't know which customers will ...
4
votes
8
answers
5k
views
Do you create an order before or after payment on an Ecommerce site?
I have a shopping cart with a checkout page. On the checkout page is a payment button which takes them to a stripe payment form.
I've read some books on building eCommerce shopping carts in which ...
-2
votes
1
answer
62
views
Name for object to re-order events received in arbitrary order?
I have a program which generates events. They are ordered with a Lamport clock and sent over the network. They may arrive in a different order. On the receiving end I have an object which re-orders ...
1
vote
2
answers
2k
views
Binary Search O(log(n)) or O(n)
I see where most readings online derive that the Big-Oh notation of a Binary Search is O(log(n)), but doesn't this assume a balanced tree? What if the tree is completely unbalanced (i.e. similar to a ...
4
votes
1
answer
2k
views
Maintain ordered collection by updating as few `order` fields as possible
I'm working on integrating a reorderable lists UI widget with a Meteor.js (MongoDB, in effect) collection:
{
order: ???, // what type to use here?
property1: ...,
...
propertyN: ...
}
Each ...
1
vote
4
answers
5k
views
Order by different Enum property each row
So I have a list of DefaultSearchModal items that have an enum called TypeSearch in every list item. I would like to order the list to have a different enum property each row.
So if you have an ...
3
votes
4
answers
2k
views
Optimistic & Pessimistic Programming - Ensuring multiple tasks are called only once for specific record
Let's say you have 10 database records which you need to process in the following way:
Start
Pull 2 records from the database with the 'Processed' flag set to 'false'
Call the external web service ...
2
votes
1
answer
108
views
Which layer should order the columns shown to the user when using MVC?
Say you want to render a table with five columns, but you want the order of the columns to be different depending on some specific parameter. This would be very easy to accomplish if the model sets ...
1
vote
4
answers
2k
views
Checking for minimum number of command-line arguments, but allowing help switch
I just ran into an odd scenario. I’m sure that I must have run into the same situation in the past and yet somehow not noticed it until now.
I am writing a program that requires at least two command-...
10
votes
2
answers
2k
views
What is the justification for Python's power operator associating to the right?
I am writing code to parse mathematical expression strings, and noticed that the order in which chained power operators are evaluated in Python differs from the order in Excel.
From http://docs....
1
vote
3
answers
1k
views
Implicitly or explicitly sorted elements?
So, I've got the following problem:
I have a number of ordered elements, ordered in the following way:
Type 1: Must be the first element. (only one possible, always present)
Type 2: Must be the ...
9
votes
3
answers
8k
views
Ordered enumeration: IEnumerable or Array (in C#)?
Typical context: I make an extension method for a collection which considers that the elements are ordered. The function starts at the beginning, at index 0, and the order has significance. Examples: ...
1
vote
3
answers
514
views
Is an assocative array ordered?
An associative array has many common similar names, hash, keymap, map, table, index.
It's a map of keys and values but I cannot find a reputable definition of the phrase which tells me whether a map ...
65
votes
14
answers
39k
views
What is best practice on ordering parameters in a function?
Sometimes (rarely), it seems that creating a function that takes a decent amount of parameters is the best route. However, when I do, I feel like I'm often choosing the ordering of the parameters at ...