instruction stringlengths 34 19.9k |
|---|
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 ideal length of build time?
Integration tests take most of that time, if the 30 min is too long what can be done here?
What... |
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 the user to confirm the location of the node and mongod binaries (after autodetecting first). I figured I could skip thi... |
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 to know, whether the programming language influences the solutions, I can come up with.
For example:
I program something i... |
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 browser agent so I can display custom messages.
For example:
If browser is Twitter's in-app browser then display a custom m... |
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 was easy to understand as the examples were in Java and that is the only language that I have worked on. How should I p... |
“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 recommended.” - Kent Beck
But I see that there is not even a tag called "Jester" in stackoverflow. So what is the modern replac... |
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 it without hanging the preprocessor or even the OS:
Set maximum include depth.
Disallow including a file recursively (... |
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 presentation layer development. Of course we also had a small quality assurance group which handled all testing responsibilities.... |
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 that most list operations in functional languages do not result in a copy of the list and just rearrange pointers. This i... |
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 (...) */
/* The following line is supposed to be equivalent to:
* $ gcc main.c -o main */
results = gcc_compile_and_link("m... |
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 feel observer pattern is very similar to two other patterns too.
What are key differences between those patterns?
|
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 business (a small hairdressing shop). No member of my family has neither programming nor system administration skills. I ... |
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 but no one is able to tell what it is.
What is an Activation object?
|
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 containers located along a 1-D number line at distinct positions from -500,000 to 500,000, except x=0. A person is tasked with... |
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 LOOP program M, s.t M(n,m)=P_n(m) (input is n,m. output is P_n(m), where P_n is the numeration of the loop programs).
|
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 problem or on the best pattern to use.
I constantly go back and refactor my code and make minor and major changes when what... |
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 in Google. I'm unaware of any "major players" that utilize the projects, but I'm pretty encouraged by what I see.
Now, I... |
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 cut out. My function should find opportunies for the possible ways to fill the gaps given a set maximum characters (and a ... |
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 return values, for example:
//GET User details
$user_id = $_POST['user_id'];
$user_details = $this->get_user($user_id... |
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 passed to each method ?
By example, when a method take only a number between 0 and 100 in parameter, should I check that the ... |
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 {
...
}
How is it possible that there is an equivalent loop program to every other loop program which uses only Inc, Zero a... |
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 from terminological point of view.
|
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 some help.
Ok, so we do not have first class functions in Java, so I define them as objects, with one method 'apply()' l... |
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 algorithms such as longest common subsequence and string. It must be able to handle occurrences of Y that overlap.
It seems tha... |
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 what's already there. This adds to more entropy, because design choices for implementing new features are typically made... |
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 data. This head moves and reading/writing data is faster if the head moves are limited.
Still from my understanding, SSD dr... |
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 development, so I studied C (read the C primer plus book, pretty good book). Recently I finished "Programming in Objective C" and l... |
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 come with the developer tools. No limitations here for how and what you can turn out with them.
Linux - GCC and I am sure... |
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 accomplish is an "Auto bidding" function, but for this to happen it will have to send a cURL POST request every 3 seconds... |
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 projects. You have been studying patterns, best practices, effective coding guidelines, unit testing, multi-threading, et... |
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 (first-person shooters, modern fighting games since Street Fighter IV, etc)?
I have previously studied this article as an example: ... |
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 trying to run through them but build versions of the classes in the tutorials that do Dependency Injection instead of insta... |
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 open-source Bouncy Castle library.
I'd rather not couple my library to another through the API, so my initial thought was to crea... |
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 calculation in parallel or not. Since it is not always helpful to do parallel calculations, specially for very small jobs (co... |
I wrote the following code:
if (boutique == null) {
boutique = new Boutique();
boutique.setSite(site);
boutique.setUrlLogo(CmsProperties.URL_FLUX_BOUTIQUE+fluxBoutique.getLogo());
boutique.setUrlBoutique(CmsProperties.URL_FLUX_BOUTIQUE+fluxBoutique.getUrl());
boutique.setNom(fluxBoutique.getNom())... |
Either a client or a server can initiate request in SIP. How is it possible? How will the server know about the client?
|
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 depending on customer requirements. This could be for any number of reasons. Common sense tells you that as things are now, you s... |
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 these components to other components. Two answers seem possible dependency injection or using the factory pattern. However b... |
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 request would be sent to the database, via servlet, to fetch the first 20 records from the discussion threads table as X... |
I'm a strong proponent of writing if statements like this:
variable == constant
Because to me it just makes sense, it is more readable than the inverted:
constant == variable
Which seems to be used a lot by C-programmers. And I see the use, namely that the interpreter or compiler will throw an error and let you know ... |
At my company, we have many different "services" that work in parallel and send messages to each other using a common messaging system. All message objects are derived from a common generic object we defined for messaging. When any service receives a message, the first thing it must do is downcast the object to the der... |
(Note: The examples are simplified)
I've seperated my solution into 3 projects
WebSite
Business Logic
Data Access Logic
The Website has access to BL and DAL
The BL has access to nothing
The DAL has access to the BL
On the website I can do something like
BL.User user = DAL.GetUser(1)
I also have this type of logic in... |
Using .rvmrc seems to be considered a best practice for apps.
But should an open source gem contain .rvmrc in their source code on Github? I think it's not good to require everyone who wants to contribute to use the exact same version of Ruby or gemset as you.
|
I am doing a final project in a C++ class writing a very simple usenet-like client/server. I figure that since it's usenet-like I'll have a NewsGroup class and an Article class, I'm now working on my Article class. I can't really decide on a good design, though (this class is not about design patterns and I haven't tak... |
I have several DAO classes that implement an interface. In the other hand, I have Service classes that use those DAO implementations.
So far all the DAO interfaces are public and I was thinking if would it be better to make them package private and to put the service classes in the same package so they are the only on... |
I'm looking for a pure JS library that allows to draw the mouse trail, but I cannot find anything pure but using canvas. Is there is a reason for that it could not be achieved? I'm on the wrong thoughts?
|
I have an AdWords script that regularly transfers sensitive data to my server using a POST HTTP request. For security I have a predefined 32 character randomized string that is verified by my server before it accepts the data. Is this secure?
I don't know too much about the HTTP protocol, but I know that the data is be... |
I am trying to put a time limit on the user input, so if they take longer than 2 seconds to put type in an input then the program will terminate. I was wondering if there is a simple way to do this in C language?
|
I've been trying to hack up an annotated Spring MVC web app but it's proving pretty hard to call a URL of my web app which fires a request to a remote API (UK Police data) and recieves a reply which I can then return as JSON. I've been trying to use Spring's RestTemplate.
The odd JavaScript example that I've glanced at... |
From what I can see, there are two pervasive forms of resource-management: deterministic destruction and explicit. Examples of the former would be C++ destructors and smart pointers or Perl's DESTROY sub, whilst an example of the latter would be Ruby's blocks-to-manage-resources paradigm or .NET's IDispose interface.
N... |
I heard that the context analysis diagram has different levels. I couldn't find this in .Net, but I have seen that a DFD has different levels.
Do context diagrams have any levels (level0, level1, level2)? If yes, please suggest some examples.
|
For example I would like to validate that name is letters only and is between 4 and 14 letters length. I have the following code in model:
validates: name, :format => { :with => /^[a-zA-Z]+$/,
:message => 'Name should be letters only. },
:length => { :minimum => 4, :maximu... |
I wrote an application that helps you to save energy. Actually it is very simple. I check the current location of the phone and I make some changes to the configuration like "sound off, dark display, wifi off...", depending on the location of the user. Sony just released a new phone including one of my apps features (a... |
In java.util.PriorityQueue we have the methods add(E e) and offer(E e). Both methods are documented as:
Inserts the specified element into this priority queue.
What are the differences between these two methods?
|
I have a very complex Java application which renders spreadsheet tables and summary documents in a window.
These outputs are non standard in the sense that for instance the spreadsheet table isn't really a spreadsheet indeed not every row is an instance of an entity and every column an attribute. Some rows might for in... |
I've heard the statement that Python would be too slow to be of any use in browsers.
I reckon Javascript is only superior in this aspect because of companies like Google who need it fast (and made it fast) because they need it to survive, but I could be wrong.
Are there any differences in how Python and Javascript are ... |
I would like to ask for your help. I searched a lot on Internet, but I found mismatched informations.
My questions:
I tried to buy the "ISO/IEC 14882:2003(E) Programming Languages - C++" standard on the ansi.org, but i have not found it. However, I found this standard on nssn.org:
www.nssn.org/search/DetailResults.as... |
In a condition statement (IF) everyone uses (position < size), but why?
Only convention or there is a good reason for that?
Found in the wild:
if (pos < array.length) {
// do some with array[pos];
}
Rarely found:
if (array.length > pos) {
// do some with array[pos];
}
|
Does readLine() Java function used with BufferedReader cause one disk I/O per call?
If yes, is there any way to read specific number of lines, say n, from a text file causing only one disk I/O?
Here's the code:
String file;
BufferedReader br = new BufferedReader (new FileReader (file));
int n = 10;
for (int i = 0; i < ... |
I know this is a place where people ask advice for designing code.
I am at a bit strange side on my coding quest, on one side people send me design stuff.
Special graphics and ideas on how they should be shown in a program workflow.
(i think the marketing designers are a bit to powerfull in this project
They tend to t... |
Being interested in C++ performance programming there is one aspect I really have no clue about- and that is the implications of using floating point calculations vs doubles vs normal integer mathematics?
What performance issues with these types of calculations should I consider? What other issues need to be considere... |
I have an MVC3 project that uses SQL Server.
I use data from the SQL database all the time and I often find that I'm reusing/duplicating some SQL queries. I thought I'd solve this problem by creating a few static "helper" classes that just contain a bunch of static methods for retrieving common things.
GetAllUsers(data... |
At the moment I am teaching myself iOS programming, and one concept I find really hard to wrap my head around is delegation. What is it? Why and how is it used? What is the advantage? The technical writing from the book I'm reading makes it hard to understand.
|
I want to know in which situation Go chan makes code much simpler than using list or queue or array that is usually available in all languages.
As it was stated by Rob Pike in one of his speeches about Go lexer, Go channels help to organize data flow between structures that are not homomorphic.
I am interested in a sim... |
This has been bothering me for a while. Security, performance tests etc. are all done typically using the black box approach. But these are nonfunctional,while black box is called functional testing.
Is it because it judges the function and it is just a naming or there is an inconsistency?
References:
Software Engineer... |
I was recently creating a small technical documentation for an application. The document is to be used by newly hired programmers to get acquainted with the application. It is much friendlier than the Javadocs we have, and includes information that usually isn't being documented.
When describing a function, I first bri... |
I have a local repository with a toy project that has turned out to be more serious than I had thought. So from a single development branch where I have carelessly committed, I have started to use branches kind of like in the famous http://nvie.com/posts/a-successful-git-branching-model/
I would now like to have a "cen... |
Logging was always a nightmare for me! Now I have to implement it again for a proxy system.
In this proxy application, some systems ask proxy system to call some other services.
What I have to log is
Request Time
Requester IP
Request Parameters as XML
Requested Service Name
Requested Service Method
Response Time
Respo... |
Why do requirements interviews never pan out as they are planned - and how do I prepare for that? I'm looking for the following kind of help regarding how to prepare for these interviews and what I can pay attention to in order to make the most of them.
My information project, centered around management reporting withi... |
I have a list in Python 2.7 of about 10000 point co-ordinates, like
[(168, 245), (59, 52), (61, 250), ... (205, 69), (185, 75)]
Is there a faster way to search for all the points in a bounding box, instead of just iterating over the entire list each time and checking if the co-ord is inside the 4 sides??
I'm using thi... |
I am desiging a file format and I want to do it right. Since it is a binary format, the very first byte (or bytes) of the file should not form valid textual characters (just like in the PNG file header1). This allows tools that do not recognize the format to still see that its not a text file by looking at the first fe... |
Here is the situation I have inherited:
We have approximately 10 websites (Asp.net web forms) that each have their own database.
Each of these databases houses some site specific data, and each has some form of a user table that will map to what is called a User Service.
The User Service is just another website that h... |
Our website has a login form that shows up in the header on every page on the website. This is what my boss wants however we need to get PCI compliant and it says any sensitive form (login/password) requires SSL. So does that mean the entire website has to be running under SSL while a user is not logged in?
Another que... |
What classes must I put in a class diagram? Only classes used in Business Layer and associations between them? Or also other classes in the Data Access Layer, Service Layer, etc.?
|
The PHP engine interprets the PHP code and is perfectly capable of working with sockets, forming HTTP packets, etc. Why then do we need a separate Apache server, when the http serving duties could be embedded into the php application along with the page creation code?
|
Well I don't want to make it open-source! That's the problem. But I do want to use it on my current job. Company did not agree to sign any alternative license with me and told me to rewrite everything from scratch so they will own it. :(
So how can I do it in a safe way so later on the company don't come back to me and... |
Instead of a database I just serialize my data to JSON, saving and loading it to disk when necessary. All the data management is made on the program itself, which is faster AND easier than using SQL queries. For that reason I have never understood why databases are necessary at all.
Why should one use a database instea... |
I am new, so forgive me if my question is mistaken or anything, just give me an alert and I'll be glad to fix it.
Me and my team is about to develop a system where the database is located in a private server, and the applications is distributed between clients on distant location.
It is actually a simple CRUD applicati... |
My school programming club is setting up a tutoring program. We have 12 tutors who specialize in a range of different languages, and each is available for a different set of hours each day of the week. I want to set up a web interface where students can select the language they need help in, and then be shown a list of... |
Suppose we have estimated 5 user stories to complete in a sprint and completed all of them with testing, buffer time and for expected bugs.
Still we have 2-3 days left for one of the developer. Can we pull a future user story in current sprint knowing that only development or part of development can be completed in cur... |
My development team is migrating from SVN to Mercurial. Having researched DVCS best practices, it has been suggested that we develop against feature branches of the repo mainline, test them separately, then cherry-pick the features we want in each release, before merging those selected branches into the mainline and ev... |
I'm wondering how to set up the organization with Scrum Masters. I would prefer to see real examples of where the scrum masters are located in the organization's hierarchy and how report-to / chain-of-command issues are handled.
we are service company. We have one agile project done for agile customer where team manage... |
I would like to make windows desktop application using HTML5, JavaScript and CSS. I am trying
tidesdk
XULRunner
appjs
I read the documentations of these technologies. But I didn't see how to export the application as a .exe package. I want to write an application in HTML and JavaScript and export to an exe file. How... |
I am in the middle of designing a next generation database access class for one of the programs I am building. We use PostgreSQL exclusively.
Our current approach is procedural (largely inspired believe it or not by RESTful web services, but paying attention to discoverability as well). The database defines (rather ... |
I need to send automated emails to customers whose language I am not sure about.
90 % are french and would probably not be able to read mails in english.
The other 10 % would probably be able to read in english and clearly not in french.
I don't know what their language is.
I investigated the multipart/alternative that... |
I am trying to program Discrete Wavelet Transform in Matlab. I do understand that their are various libraries available, but my project requires that I must implement it from scratch.
I am taking a vector of length N. I then provide this vector as input to my my Low Pass and High Pass Filters. My first question is, wha... |
I do a lot of c# development work. Recently, our company decided it was important for webservices to be able to run on Unix machines, and decided that we should write new services in Java as a result. We've got licenses to IntelliJ, so I'll probably start with that as an IDE.
I've found it pretty easy to find resourc... |
I'm studying the differences between NoSQL and SQL, and what makes the first more scalable. I think I got the point, so I'll try to explain:
Suppose an app has a list of billions of users, each with a quantity of money, and it wants to display the sum of the money of them all. In SQL, it'd have to SELECT SUM(money) FRO... |
I'm writing a simple little program to transmit MIDI over a network. I know that the program will encounter transmission problems and / or other exception situations that I won't be able to predict.
For the exception handling, I see two approaches. Should I write the program so that it:
fails with a bang when somethi... |
I have a php/mysql applications which I designed, and the client doesn't want it to be online (installed on a webserver) or available on the internet, he wants his employees to use it on a local system.
I don't want them to go through the process of starting up wamp to access the program, is there a simple way to make ... |
I've been working for a couple of years on a small project, almost by myself, with the eventual help of some colleagues. The project is getting out of my hands, because the size of the code is growing (around 20K lines now) and the initial expectations I had for it have outgrown my own ability and time. So now I want t... |
This question got rather a freezing reception at SO, so I decided to delete it there and try here instead. If you think it does not fit here either, please at least leave a comment on suggestion how to find an example I'm after...
Can you give an example, where using C99 VLAs offers a real advantage over something like... |
I have two applications, called A and B. The current version of these applciations are 7.x (some customers run 7.1, others run 7.2, ...). Both applications use a same common framework (let's call this C), like this:
+---+ +---+
| A | | B |
+---------+
| C |
+---------+
Because of some important new customers, ... |
Some programmers avoid regexes in some situations (see this popular @nickf comment), perhaps using a parsing framework such as Lex/Yacc. Others prefer to stay within PHP, perhaps using regular expressions, as it avoids the need for another framework.
When must we use a "real" parser generator instead of coding a parser... |
I'm going to be writing an application that is pure HTML5 and JS and MVC.net back-end.
We have .resx files that are getting compiled to .js files for resources in the html5 application. The application has to work in English and in Chinese which I understand to mean that we need to use UTF-16 everywhere.
Does anyone... |
I am currently implementing an expression evaluator (single line expressions, like formulas) based on the following:
the entered expression is tokenized to separate literal booleans, integers, decimals, strings, functions, identifiers (variables)
I implemented the Shunting-yard algorithm (lightly modified to handle fu... |
I can remember a very Very long time ago (pre Y2K) , reading an article by some "expert" that theorized that software communicating over the internet, especially video games could get mixed up with Military communications meaning that a user could inadvertently mobilize a B52 nuclear bomber with a click of his mouse on... |
I want to call a DLL in my programming language of 'choice'. The documentation surrounding this clearly states that it must be a 32-bit DLL written in C, C++ or Delphi. But I wanted to call a DLL written in C#. It goes on to mention that the default calling mode is cdecl.
So my question is: why would this be the case? ... |
Can anyone offer any tips or experience on developing a test plan for an Agile sprint? Most of the time our team simply creates a "Test Feature X" task and goes about writing ad-hoc test cases. There typically isn't much strategic forethought put into how features will be tested and how we'll communicate the expectatio... |
I was playing around with Go, and found this particular interesting code for the abs function in the math package:
http://golang.org/src/pkg/math/abs.go
14 func abs(x float64) float64 {
15 switch {
16 case x < 0:
17 return -x
18 case x == 0:
19 return 0 // return correctly abs(-0)
20 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.