6
votes
3answers
2k views

What are best practices for caching paginated results whose ordering/properties can change?

What is the best practice for caching paginated search results whose ordering/properties can be changed? Say, in my application, someone wants to see the last 20 discussion threads (out of 10,000). A ...
46
votes
5answers
12k views

Should I use Dependency Injection or static factories?

When designing a system I am often faced with the problem of having a bunch of modules (logging, database acces, etc) being used by the other modules. The question is, how do I go about providing ...
4
votes
5answers
269 views

What sort of questions drive the decision as to whether similar code is separate or common?

I have come across the following problem many times in various guises in my programming career. As a simple example, consider the following: Let's say there is a method (B) that could differ ...
0
votes
1answer
85 views

How can a server initiate request in SIP protocol?

Either a client or a server can initiate request in SIP. How is it possible? How will the server know about the client?
66
votes
13answers
9k views

Can commented-out code be valuable documentation?

I wrote the following code: if (boutique == null) { boutique = new Boutique(); boutique.setSite(site); boutique.setUrlLogo(CmsProperties.URL_FLUX_BOUTIQUE+fluxBoutique.getLogo()); ...
2
votes
3answers
198 views

Is there a way to calculate whether to spawn a new thread or use current thread

I am building an interpret DSL in which parallelism is part of the language - the user simply states that a calculation can be done in parallel and the interpreter may decide whether to make the ...
1
vote
3answers
721 views

Is wrapping byte[] for stronger typing good practice?

I'm working on a Java-based library which makes use of PKCS #10 requests. There are PKCS #10 libraries available for Java (Sun and IBM libraries that come with the respective JDKs), and the ...
7
votes
5answers
466 views

When to use DI and when to create yourself in Java

I've a decent amount of OOP with various languages but am pretty new to Java. I'm reading through a lot of tutorials where large numbers of objects are created within the code of a class, and I'm ...
2
votes
1answer
813 views

Game Netplay Rollback System

Can one explain the specifics and details of a netplay framework for a game that optimizes connection through a "prediction / rollback" mechanic, as seen in games where speed is a priority ...
16
votes
6answers
5k views

What can a technically proficient senior software developer study to keep improving [closed]

Say you have been programming for over 10 years. You know many languages, with few of those at very detailed level. You have been designing architecture for solutions, worked on and delivered larger ...
1
vote
1answer
532 views

Handling recurring cURL POST request

I've basically came here for some advise based on my criteria, The application I'm trying to build is built completely from an API. It's like a "marketplace bidding" application, what I'm trying to ...
14
votes
7answers
4k views

When to pay for C++ compilers [closed]

Recently I have began to wonder when developers should pay for compilers. Compilers come for free with most platforms or there is a free version easily obtainable. Example: OS X - GCC and Clang/LLVM ...
1
vote
1answer
357 views

Is object-oriented conceptual thinking something you build with experience? [closed]

I know that the answer is pretty clear because you get better on everything with time and experience. But I'll tell you where I'm coming from: A couple of months ago I decided to learn iOS ...
1
vote
1answer
415 views

Will SSD make the distinction between column oriented DB and row oriented DB obsolete? [closed]

I had a discussion with a friend about row vs column oriented RDBMS. From my understanding, these things are closely linked with the fact that there's a concrete drive head reading and writing the ...
3
votes
5answers
352 views

Entropy in large scale software systems [duplicate]

I work on a fairly large software system and over the years it has accumulated a lot of entropy. There is plenty of scope for refactoring but there is always pressures to build the next features upon ...
7
votes
3answers
642 views

Longest subsequence without string

Does there exist a dynamic programming algorithm to find the longest subsequence in a string X that does not contain Y as substring? Just that this problem seems so similar to other DP string ...
7
votes
2answers
668 views

implement cons function in Java - type safety question

I am working on a small functional library written in Java, which mimics the a functional style of programming. I am stuck with a undesirable type cast in one of my method definitions and would love ...
0
votes
2answers
149 views

Is a “build” assembly? [closed]

In an old book I have, they say that "build" is either a process of converting source code into executable or the actual result - assembly. Is that correct? Is a build actually the assembly, I mean ...
0
votes
1answer
192 views

LOOP program only need inc and zero

I have 4 different commands in LOOP programming language: y=Zero() y=Val(x)=copy x and put it in register y y=Inc(x)=x+1 y=Dec(x)=x-1 Finally I also have loop n times { ... ...
2
votes
2answers
2k views

What is the best practice for method parameter validation in a library? [closed]

I develop a game library in javascript, containing many classes. I hesitate on the behavior that I should follow concerning method parameter validation: Should I check the validity of parameters ...
1
vote
2answers
214 views

How to show data to the user using PHP?

I'm always trying to find new methods on development. So I looked into some websites and analyzed their ways of presentation. Returning part of the page using AJAX Normally I will use an array to ...
1
vote
2answers
201 views

Finding the possible combinations of x switches out of y being true

I am working on an algorithm to find possible fills for gaps in text. My function will receive as input: (example) [false,"o",false,"b",false,"r"] representing the string "foobar" with some values ...
13
votes
5answers
690 views

How to know if an Open Source project is mature enough to use in a product?

There are some open source projects that I'd like to incorporate into a product at work. We don't have the bandwidth nor the subject matter expertise to do it ourselves. I found these by searching ...
4
votes
5answers
617 views

Obsessed with finding most elegant solution [duplicate]

I find that at times I get obsessed with finding the most elegant solution to a problem or task. I'll spend hours trawling the internet/texts for ideas and discussion on the right way to solve a ...
2
votes
1answer
179 views

LOOP-computable functions

I was just reading a chapter about LOOP-computable functions and I have the following question: Is it possible to numerate every LOOP program with an algorithm? Formally: Is it possible to have a ...
18
votes
6answers
814 views

Visiting points on a number line while minimizing a cost not related to distance

I need some help on this ACM ICPC problem. My current idea is to model this as a shortest path problem, which is described under the problem statement. Problem There are N = 1000 nuclear waste ...
8
votes
2answers
3k views

What is an Activation object in JavaScript?

In a given execution context, the Variable object is the Activation object of that execution context. From my research online, I am able to find the previous sentence rephrased in different ways ...
26
votes
6answers
1k views

Maintain a web application once the only developer is gone

I have a terminal disease and there is a very high chance that I will no longer be in this world by the end of the year. I have developed a web application that it is extensively used in my family’s ...
8
votes
3answers
2k views

What is difference between publisher-subscriber and reactor patterns?

Publish-subscribe and Reactor patterns looking very similar to me. How they are different? In both patterns a message is getting passed to subscribers indirectly (listeners in reactor pattern). I ...
7
votes
3answers
335 views

Is there a way to use gcc as a library?

Anyone knows a solution that works something like this: #include <stdio.h> #include <gcc.h> /* This .h is what I'm looking for. */ int main (void) { /* variables declaration (...) */ ...
4
votes
3answers
898 views

How Immutable Sets are Manipulated

When working with an immutable set or map, like the ones found in many functional programming languages, operations that would otherwise modify the container generate a new container instead. I know ...
5
votes
1answer
605 views

Shared QA responsibilities on an Agile team

For many years our IT development group subscribed to the waterfall software development methodology with segregated pods of programmers specializing in database development, logic layer and ...
2
votes
2answers
236 views

Are there any practical uses of allowing recursive inclusion of a file?

I am currently implementing NASM-like preprocessor for my assembler, and I am wondering what is the correct way of handling recursively included files. From what I see, there are two ways to deal with ...
15
votes
1answer
2k views

Is there a modern replacement for a mutation testing tool like Jester for Java?

“Why just think your tests are good when you can know for sure? Sometimes Jester tells me my tests are airtight, but sometimes the changes it finds come as a bolt out of the blue. Highly ...
3
votes
2answers
234 views

Do I need to learn python first to understand the part 2 of the book Test Driven development?

It seems like Python is used as a coding language for part 2 of Kent Beck's book Test Driven Development. I have read the first part of that book and started appreciating the value of TDD . First part ...
1
vote
2answers
2k views

Twitter in app browser + user agent string

Recently (I believe some weeks ago) with the latest update of the Twitter app for iOS, all links found inside tweets are opened in Twitter's build-in browser. My question is how to find Twitter's ...
6
votes
2answers
435 views

Connection between programming language and solutions

This is a rather philosphical / theoretical question. I am interested in the question, how language (in this case programming languages) and thoughts (= solutions of problems) are connected. I want ...
3
votes
1answer
1k views

Should I / can I bundle node.js and mongod together with my application?

I'm working on a web application that runs on node.js and uses MongoDB. It's important to mention that I plan to release the application as commercial software. The way I wrote the installer, it asks ...
1
vote
3answers
203 views

Continuous Integration Feedback Cycle

How long should the Continuous Integration process take (i.e. compiling classes and running unit tests + integration test)? On my current project it takes about 30 minutes, is that OK? What's the ...
3
votes
2answers
1k views

How can I get git to clone untracked files

I'm new to git. I'm using a development platform called automation studio. This development tool creates all sorts of files and directories which it needs to maintain runtime and IO information for ...
2
votes
4answers
1k views

How to handle User Story at end of sprint if users want changes?

We just adopted Scrum and completed our first sprint (yeah!) At the Sprint Review, we demoed a User Story for feature X. This feature X worked exactly how described in the User Story from initial ...
4
votes
1answer
247 views

What recent studies point to the possible improvement a programmer can make as a result of personal character traits? [closed]

In Chapter 33, Personal Character of Code Complete (Second ed.) McConnell cites some studies such as those listed below in support of the assertion that 10-1 improvement is possible from efforts in ...
2
votes
1answer
316 views

How to compute amoritized cost for a dynamic array?

I am trying to understand how to do the amortized cost for a dynamic table. Suppose we are using the accounting method. Let A of size m be an array of n elements. When n = m, then we create a new ...
1
vote
4answers
267 views

Choosing DOCTYPE for an online eBook

I'm about to begin working on a project which involves creating an eBook-like website which will contain lots of large documents with text and images. The site should have a rather minimalistic ...
10
votes
6answers
6k views

Testing a REST client against a REST Server. How to do fixtures?

When writing unit tests, it's common to use fixtures: little testable data, so we can say: 1. Get all clients should include Willy Wonka. 2. Delete client 3, and now get clients should not include ...
0
votes
5answers
1k views

Read K&R before learning low latency C++? [closed]

I have never really done a large amount of C programming but am in the middle of teaching myself low latency C++. Would it do more harm than good to read the K&R C programming book? I am a bit ...
2
votes
7answers
1k views

better way to define an exception thrown by a method in Java?

I know how to define exceptions and all, but I'm not sure if the way I'm doing it is the most intuitive and readable by another users. I have a very simple method I've written that I want to throw an ...
4
votes
2answers
146 views

Is it a good idea to create multiple heads with Mercurial? [closed]

I just made a commit that I want to reverse, but I want to keep the bad commit in history. So, I hg update to the previous (good) commit. Then I keep working. This leaves me with a new head: the ...
5
votes
2answers
421 views

Can I start with a passing unit test?

Uncle Bob's rules for TDD are specified here. You are not allowed to write any production code unless it is to make a failing unit test pass. You are not allowed to write any more of a unit test ...
14
votes
4answers
2k views

Is garbage collection needed for implementing safe closures?

I recently attended an online course on programming languages in which, among other concepts, closures were presented. I write down two examples inspired by this course to give some context before ...

15 30 50 per page