# Tagged Questions

The tag has no usage guidance.

30 views

### Time complexity Computation

What will be the result of the time complexity of this piece of code i.e. int sum(int A[], int n) { int sum = 0, i; for(i = 0; i < n; i++) { sum = sum + A[i]; } ...
140 views

### Data from devices with unreliable clocks

Are there any viable approaches to dealing with data coming from devices with unreliable clocks? We have a database system running on a central server. The latest addition to the system is a bunch of ...
71 views

### Designing Storage for Different Time Systems

I've been considering doing some kind of application that allows users to track events in mythical settings. However, not all mythical settings allow for normal times. What if one user wants star ...
64 views

### What is an element of a schedule called? [closed]

I have a question about software modeling terminology, when modeling time. Say you have a repeating schedule MWF 4-5 p.m. What do you call Monday 4-5 p.m.? What's the term for that? using System; ...
64 views

### Prove complexity for a generic algorithm

I'm new to theory of complexity and am trying to prove a fact. So, let's consider an algorithm T that receive at input an integer n. That algorithm has a time complexity for n = 1 : θ(1) and for n > ...
24 views

### Realtime layered time data storage and calculations

I am having a hard time trying to figure out the best way to report on and calculate layered time data. The problem: A person can sign in multiple times, during this sign in there are multiple ...
165 views

### Does Time Complexity analysis factor for cache performance of an algorithm?

If I have an algorithm A. and it has fewer instructions than algorithm B. but performs worse on a CPU due to poor memory coalescing (and hence, poor CPU cache performance), does that factor into the ...
154 views

### Temporary Variables or Not: Choose CPU Time or RAM? [duplicate]

In a case where multiple variables are set equal to an operation using the result of an other operation, is it best to create a temporary variable for the result of the second operation (this would ...
174 views

### What is time complexity of update in binary heap?

For a binary heap we have O(log(n)) for insert, O(log(n)) for delete min and heap construction can be done in O(n). In the context of using a binary heap in Djikstra, my exam paper involved an "...
1k views

### Should a REST API be able to convert datetime to appropriate clients timezone?

Whilst implementing our API, the issue of datetime and timezones came up. All dates are normalized to UTC in the database. Currently, in the non-API application, all datetimes are converted based on ...
261 views

### Ever-running timed tasks

I need to design a piece of software which is invoking some actions regularly. By regularly I mean that there is x things that need to be done at 12.00, y things at 12.30 etc,etc. The times and ...
305 views

### Tracking hours with clock in/out

I am working on a web interface that would allow the user to keep track of the amount of time people spend at their establishment. The problem: I don't know what the best way to keep track of this ...
115 views

### What is an accepted method of timestamping in a distributed system?

In a normal application, a simple call to time.Now() in most languages will suffice for getting a timestamp, but what about in a web application spread over multiple servers? As I understand it time....
5k views

### When passing dates/datetimes as url parameters in an API, which format is better - unix timestamp or date string (ISO 8601) [closed]

Interesting question came up at work in regards to the better format of passing a date/datetime as a url parameter in an API: Is it better to pass as a unix timestamp, or as a plaintext date string (...
385 views

### Why do browsers clamp timeouts and intervals?

I've been working on some abstractions of setTimeout and setInterval in order to process large sets of data without blocking the event loop in the browser. Upon this, I have discovered that browsers "...
207 views

### How was the system clock first used in early computers?

This question is about the clock that keeps current time, not about the signal that sequences the circuitry (the wall clock, not the metronome). First computers were pure calculators, just very large,...
429 views

### how to deal with different formats of 'time/date format'?

Different systems accepts different formats of formating time. E.g. java, jquery: yyyy-MM-dd HH:mm some jquery plugins: yy-mm-dd HH:MM momentjs: YYYY-MM-DD HH:mm ISO-8601: YYYY-MM-DD hh:mm etc On ...
371 views

### How much time should you allow for clock skew?

We are writing a B2B application that uses OAuth 2.0. Before a token expires we want to refresh it since it faster to refresh a token, than request a new one. However, we want to build in some ...
214 views

### Where does Rails get its datetime for creating records?

I have a rails app with a data model called 'jobs' and I'm faced with a critical design choice crossroads. I don't know enough about Rails and its inner workings to be able to say for sure what I ...
112 views

### What does this duration reported by ffmpeg mean? [closed]

When I run ffmpeg on an mp4 file, it says the duration is: 00:03:57.54 What is the unit that 54 represents ? I am interpreting it as 0.0054 seconds (54 milliseconds).
97 views

### Running time question

I have an array A of n integers, sorted from min to max, and two numbers a<=b, which are known to be in A. I would like to write a pseudo-code for a procedure whose running time is c1+c2log(n) and ...
198 views

### When to store Date/DateTime?

I'm working on a social network website and I'm not quite sure when I should store the date/datetime. The service includes some of the following events: Register/Login Follow "Like" (images & ...
138 views

### Bucketing model by time

I have a model which has timestamped entities. Now I want to do bucketing - "buckets" of entities which can be reasoned about a single entity. Also I want to be able to access related entities from a ...
132 views

### Representation of time expanded graph

I want to build a time expanded graph with time discretization Dt that starts at t = 0 and ends at t = T where between the node (n1, t) and the node (n2, t') is an arc if and only if (n1, n2) were ...
135 views

### Date & time - apply current, or 'then' DST?

I'm designing a function that given a UTC timestamp will convert it to the local time. The question I have, should the current times DST settings be applied to the conversion, or the timestamps DST ...
124 views

### Sending exactly one notification n seconds after the event

I have a system that checks the status of a number of systems, such as, is http up, does the system respond to ping, that sort of thing. I check all of these systems every 5 minutes. If something is ...
4k views

### What is the best practice for saving TimeZones in the database?

We want to start collecting timezones for each of our addresses in the database. What is the best practice to store the timezones? How would you go about acquiring timezones for the existing address ...
1k views

### Noda Time vs Joda Time?

In the Noda Time User's Guide, the rationale section states: the public API has been largely rewritten, both to provide an API which is more idiomatic for .NET, and also to rectify some of the ...
883 views

### (Dis)advantages of datetime vs. long in globally used applications [closed]

I am currently designing a web/mobile application the bulk of whose users will be distributed across the different U.S. time zones with a potential of scaling up to other countries and time zones as ...
2k views

### Is a day really 24 hours long? [closed]

I asked this question on Stack Overflow and it was closed as off-topic. I'll ask it here hoping it will do better. This might sound silly, but bear with me. I've been working a lot with intervals and ...
243 views

### How to handle timezone for dates?

With a YYYY-MM-DD HH:MM:SS date I always store the UTC time. When I pull to display I translate timezones with built-in PHP functions and classes. I believe that is one correct way to do it and it ...
652 views

### Is the addition of a duration to a date-time defined in ISO 8601?

I've writing a date-time library, and need to implement the addition of a duration to a date-time. If I add a 1 month duration: P1M to the 31st March 2012: 2012-03-31, does the standard define what ...
944 views

### How to make a legacy system time-zone sensitive?

I need to implement time zones in a very large and old Delphi system, where there's a central SQL Server database and possibly hundreds of client installations around the world in different time zones....
3k views

### How is time calculation performed by a computer?

I need to add a certain feature to a module in a given project regarding time calculation. For this specific case I'm using Java and reading through the documentation of the Date class I found out the ...
3k views

### Is there a constant for “end of time”?

For some systems, the time value 9999-12-31 is used as the "end of time" as the end of the time that the computer can calculate. But what if it changes? Wouldn't it be better to define this time as a ...
197 views

### Which timezone is used for permalinks of posts [closed]

I wanted to add timezone support to my blog app but got stuck with a design problem. Every post has a published_on field which stores the publication date in a timezone aware format (UTC converted to ...
3k views

### How should I deal with Time Zones in a .NET WCF application?

Our company runs a SaaS application where users log in from across the world (although mostly in the US). We store all our time relevant information as UTC, but we need to display times using local ...
1k views

### Unit testing time-bound code

I'm currently working on an application that does a lot of time-bound operations. That is, based on long now = System.currentTimeMillis();, and combined with an scheduler, it will calculate periods of ...
8k views

### How to visualize timer functionality in sequence diagram?

I am developing software for communication with external device through serial port. To better understand the new functionality I am trying to display it in sequence diagram. Flow of events is as ...
531 views

### Grouping numbers to minimize group-means

I need to find a way or an algorithm that groups members of a given data set (of positive integers) so that the difference between group means is minimized (not maximized, as usual). There are two ...
858 views

### timers with threads on queue

So I've been asking the wrong questions for the last three days and after searching a lot I think I have an idea of what I need, my question is how to use timers with two threads writing and reading ...
3k views

### Algorithm for finding overlapping times

Part of our ERP system is a sub-system for running background jobs. We track a variety of meta-data about our jobs in a table including timestamps for submitted, started, and end times. I'm creating ...
661 views

### Is web application startup time really that important?

Had a conversation with someone about adding some initialization code on application startup and he complained about that causing an increasing in the startup time. He couldn't really state a reason (...
654 views

### Quality vs Time

I have heard of developers who work with code which is a complete mess because originally the code was quickly developed and the quality was not there in the first place. Its always good to get ...
5k views

### how much time do you spend on Unit testing?

In a company I used to work for, executives insisted that the code coverage with unit tests must be 99% or more. This resulted in writing more tests than code. It took us literally 3 days to write ...
418 views

### How do build time and unit test time compare?

Does this depend heavily on the type of project (e.g. scientific software vs banking system vs game)? If so, in which areas is the difference the highest and lowest? In your experience, is it safe to ...
5k views

### Is this a valid smartphone CPU vs. desktop CPU speed comparison (Android G1 vs. old Pentium 4 desktop)?

I am trying to estimate speed differences when creating code on my desktop PC that will be ported to Android phones. I don't need to be exact, but a good estimation will help stop me from creating ...
219 views

### Articles and Works by Developers [closed]

When I'm coming to home after the work, there left about 2-3 hours to work on my own projects. Some good programmers/developers also write books/articles/etc. I'm getting angry of to little time and ...