instruction stringlengths 34 19.9k |
|---|
Recently I have been working with a large set of talented programmers that lead to a discussion on when should we start building our own components (web js/css) vs downloading and modifying existing components that don't quite fit the needs of a project. Does anyone know or could suggest best practices for this type of... |
My lecturer mentioned today that it was possible to "label" loops in Java so that you could refer to them when dealing with nested loops. So I looked up the feature as I didn't know about it and many places where this feature was explained it was followed by a warning, discouraging nested loops.
I don't really understa... |
Recently I've been involved in an agile project (using scrum) where management came up with the idea that the team would nominate a developer 'MVP' as well as a QA 'MVP' at the end of each sprint, voted on by the team. The MVP then gets a small monetary reward and free lunch as well as a trophy to display on his desk.... |
I was wondering whether the community utilizes automation tests to the extent of UI? Is there some common best practices for testing UI?
Also - the product I'm working on is flex-based. I would love to get ideas how to test it.
Mainly I want to test:
Data appears on the screen as expected
Field validations (for exampl... |
For one of my apps, I want to make the source code “open source” so that others might adapt the code to their personal needs or even contribute improvements, but I don’t want anybody else to publish “my app”. Furthermore, I still want to be able to sell the app at some time in the future.
Is there a usual license for t... |
I have a picture that I elaborate with my program to obtain a list of coordinates.
There is a matrix represented in the image.
In an ideal test I would get only the sixteen central points of each square of the matrix.
But in actual tests I have some noise points.
I want to use an algorithm to extrapolate from the list ... |
What's the difference between a stream and a queue? They both have the concept of an ordered set of elements, but tend to have different implementations and a different vocabulary of 'insert'/'extract' (streams) vs. 'enqueue'/'dequeue' (queue). Are these interchangable? Do they suggest different concepts or patterns... |
In Rich Hickey's thought-provoking goto conference keynote "The Value of Values" at 29 minutes he's talking about the overhead of a language like Java and makes a statement like, "All those interfaces kill your reuse." What does he mean? Is that true?
In my search for answers, I have run across:
The Principle of Lea... |
I'm currently studying a course based on Software Design and I had a discussion in class with my professor and some classmates about a problem represented by the next scenario:
Scenario
Imagine we have a graphic application which lets us plan the interior design of our future house using a perspective from top. We are... |
In the last few weeks, I have been working on a Data Mapping Library, which has involved lots of research, experimentation, crying, blaming the whiteboard for not being big enough, and more research. But now I have a full idea of what I'm trying to do.
I have decided that before working on any data source adapters, I n... |
Thanks for looking!
Background
I have been tasked with writing a program to normalize and ingest data from various sources to a common database.
For the sake of simplicity, let's say that the program is for a public library system, and that they are wanting to maintain a database of all books currently lent out of thei... |
I want to compile custom functions during run time based on user written scripts. I'll give a hypothetical example that should demonstrate exactly what I need to do. This is the best way for me to describe the problem. I'd like a little input/ideas in how I can solve this. At the bottom I give you my ideas.
I have 2 cl... |
The CSS3 media query feature has led to many interesting possibilities in terms of developing websites which adjust to many different screen sizes and devices.
However, in practice, I'm starting to get the sense that the CSS3 media query feature, and the whole "Responsive Web Design" movement, may not live up to its pr... |
We have a web app where users can take online exams.
Exam admin will create a questionnaire. A questionnaire can have many Questions. Each question is a multiple choice question (MCQ).
Let's say an admin creates a questionnaire with 10 questions. Users attempt those questions. Now, unlike real exams users can attempt... |
I am not asking for someone to program this for me, I still would like to do all the programming, however I need some additional mathematical programming background for this kind of stuff because I haven't really dabbled into 3D spaces much and I am thinking lots of potential if-thens and switches could be simplified w... |
There is an application that involves billing enterprise customers for the services their customers utilize. The database schema does not properly reflect the business model. For instance, on a given account, services may become activated and deactivated. There is only a column to represent when the service was deactiv... |
In today's lecture about Modelling techniques with respect to MDD using UML the lecturer stated that it's absolutely necessary to give a (possibly) textual description about the semantics of each diagram you produce.
In my opinion it's not necessary to describe semantics of diagram elements which are already standardiz... |
Is it a good practice to implement useless exception handling, just in case another part of the code is not coded correctly?
Basic example
A simple one, so I don't loose everybody :).
Let's say I'm writing an app that will display a person's information (name, address, etc.), the data being extracted from a database. L... |
Binary Search, as we all know requires the elements to be sorted. But we have to take care of unsorted elements too, in the worst case. If the input size is very large, is it a good idea to sort the elements everytime? Can we not just check the elements that they are not sorted or not and proceed to sorting and proceed... |
At the risk of being downvoted, I really need the community's input - I am helping put together a post-secondary quality curriculum (vocational school, not university) around open-source languages, specifically JavaScript and maybe some Ruby or PHP. There are some great trade books out there, but things get a little mo... |
Was research on how (for convetion) define a Many Many where table where both fields are primary key and found this post.
So decide to install the Iesi.Collections in my library domain.
But there came a doubt. In the "Iesi.Collections" outperforms "System.Collections" Iesi.Collections?
Why should I use?
It is better in... |
I've taken a software development role in an engineering company(all software developed is for internal use only). The company has about 60 individual programs from past developers. The problem is that all past developers are gone and no one knows why about half of the software was built, who uses it, or even what som... |
I'm currently writing an API and its documentation. For example I have something like this:
public interface Event {
}
public interface Process {
}
public interface EventProcessor {
/**
* Starts to process the sepcified event asynchronously. The returned
* {@link Process} can be used to track progress o... |
I am a little confused at how best to visually model a space-based architecture (SBA) for presenting the system/software architecture design to a client.
The goal of this modelling is to show:
The major components of the system (e.g.: databases, server exposed API, client, server workers, client exposed API)
Interact... |
I've read a lot o blogs arguing about private methods and testing. Some people say you should not test private methods, they say you should make them public or put those methods in a new class.
But then, what about encapsulation? let's say:
I have this method which is simple enough for not being part of a new class, a... |
In languages that don't allow underscores in integer literals, is it a good idea to create a constant for 1 billion? e.g. in C++:
size_t ONE_BILLION = 1000000000;
Certainly, we shouldn't create constants for small numbers like 100. But with 9 zeros, it's arguably easy to leave off a zero or add an extra one in code ... |
In any given class definition, I've seen the method definitions ordered in various ways: alphabetical, chronological based on most common usage, alphabetical grouped by visibility, alphabetical with getters and setters grouped together, etc. When I start writing a new class, I tend to just type everything in, then reor... |
In the current company that I work for there is a very large Utilities library. It was written a few years back (long before I joined) and has grown ergonomically over time to now do everything:
Sending Emails
Exporting Files in different formats, i.e. CSV, tab delimited
Receiving data from 3rd party providers, i.e. B... |
I'm creating a data transfer object and can't decide whether it would be better to just give public access to the instance variables or if there would be a purpose to using getters and setters to access the data?
According to the Data transfer object Wikipedia Article:
A DTO does not have any behavior except for sto... |
A certain failure of OOP is shown with a class Square inheriting from Rectangle, where logically Square is a specialization of Rectangle and should therefore inherit from it, but everything falls apart when you attempt to change a Square's length or width.
Is there a specific term for describing what is going wrong wit... |
I a little while ago I joined a new development team and recently we had our first major release. We've used Git since the beginning of the project and by now are somewhat comfortable with it. However, now that the product is in the field, we are discovering new issues/processes that need to be established. Up to this ... |
In Scala 2.10 a new string interpolator feature has been added (see here).
For example
val name = "James"
println(s"Hello, $name") // Hello, James
What is not clear to me is whether this feature is an ad-hoc addition or whether it is syntactic sugar for some other, more general construct.
The only thing I can think of... |
This might seem like an odd question, but I'm worried that I'm putting too many things as constants/finals at the top of my java class. I've started to put every value that is in my program into a constant (At least the ones that influence it's overall effect). The reason I'm doing it is because then it's easy to find ... |
I have an algorithms library called NDex. I am in the process of upgrading it to a new version. Part of this upgrade involves providing two versions of many algorithms: an in-place version and a version that copies the results to a destination list.
I will be providing two sort variations: quick sort and merge sort. Th... |
This seems to happen every time I create any sort of GUI. I have trouble figuring out how child classes should communicate to their siblings.
It's a general problem, but it's probably easier to use a concrete example (hopefully that's still okay for this forum? I know it's different from StackOverflow): I have a window... |
I'm using git for an iOS project, and so far have the following branch model:
feature_brach(usually multiple) -> development -> testing -> master
Feature-branches are short-lived, just used to add a feature or bug, then merged back in to development and deleted. Development is fairly stable, but not ready for product... |
Should classes, that modify the state of the parent class, but not itself, be unit tested separately? And by separately, I mean putting the test in the corresponding unit test class, that tests that specific class.
I'm developing a library based on chained methods, that return a new instance of a new type in most cases... |
I was asked whether I've ever "deployed to a physical machine" and I'm seeing this terminology when googling, but not getting a definition. What does it mean? What other way could someone deploy an application if not to a physical machine?
|
I've learned PHP, Java, and C. Now I'm curious as to why there are so many types of numerical data types like bit, int, float, double, and long. Why not make only one type for numericals?
Is there any benefit to this? Maybe if we use integers to hold such small numbers we can save memory?
|
A profesional developer Zed Shaw says this:
Which programming language you learn and use doesn't matter. Do not
get sucked into the religion surrounding programming languages as that
will only blind you to their true purpose of being your tool for doing
interesting things.
So, being neutral to languages is a si... |
What information would you expect to see in the github README?
Should everything go in the README? i.e.
Introduction
Installation
Versions
User Guide
Implementation
Testing
Related Resources
Or should you just put certain things in the README (Introduction, Installation, Versions) and the other information is best pl... |
I had a look at the code for the implementation of this paper Graph-Based segmentation by Pedro F. Felzenszwalb
But I didn't understand how in the below code that y * width + x is used to build a graph from an image.
// build graph
edge *edges = new edge[width*height*4];
int num = 0;
for (y = 0; y < height; y++) {
... |
Let's say we have n jobs numbered from 1 upto n and k workers numbered from 1 upto k.
All the jobs are equally difficult, but some workers are more efficient than others, so we are given the time it takes for each worker to perform his job. In fact no two workers are able to finish their jobs in the same time.
At first... |
Firstly, apologizes for any bad terminology, lack of research, or poor delivery of my question.
I should note that originally I had one big question, but I figured the first half is sort of independent, so I've posted it individually, link. My understanding of "commercial purposes" is so far based on the OP of that que... |
I am developing a large application where the previous developer used Martin Fowlers Transaction Script pattern.
The requirements are becoming more complex and it is becoming a bit of a maintenance nightmare. Therefore I have started to use Fowlers Domain Model and Table Data Gateway in an attempt to separate concerns ... |
I'm wondering what the arguments for/against Falsy values are. On what principles would you decide to add or exclude them from a language? Are there any problems you could see them causing off-hand?
For users of languages that support Falsy values:
Where specifically have you used them to your advantage?
Where have yo... |
I've taken on some side work for this non-profit and last week was my first week on the job. They have two SQL Server Databases each with many tables in them that represent over 20 different applications such as
Course signup - Trainers can signup to teach different available classes
Course Approval form - trainers c... |
Standard LAMP stack: CentOS, Apache, PHP, MySQL plus Java (via Google Web Tools), eclipse, mercurial
Currently we have a manual integration step where a feature branch is pushed to a staging server where QA tests the feature by poking at it with the GUI. We use a shared dev database. We're running into the problem wher... |
Our team has adopted some agile practices to help us develop and deliver our software to our client. We adopt practices as needed (as problems/challenges were identified) rather than jumping wholesale into the agile camp. The big ones for us are maintaining a product and sprint backlog and developing and delivering new... |
I have a java project that involves building some pretty complex objects. There are quite a lot (dozens) of different ones and some of them have a HUGE number of parameters. They also need to be immutable.
So I was thinking the builder pattern would work, but it ends up require a lot of boilerplate. Another potential s... |
I have a program that is offered to the public on the web as a GPL program. This is a hobby type project that i stated 3.5 years ago and i have had one collaborator for most of that duration who has contributed some code me and my collaborator both like to see the program develop as it's both our hobbies.
A person ha... |
I am developing a web application, this application will need to generate receipt number for every confirmed transaction.
What is a good receipt number? I think a receipt number should not be just a running number generated by database, but it should have some meaning beyond just a unique running number.
Here is what I... |
I saw a job posting asking for "incorporated software developers" and asking them to state their "incorporated rate" when applying. What's the difference between an incorporated developer and a contractor/freelancer? Google isn't helping.
My best guess is that an incorporated developer is just a freelancer/contractor w... |
Halfway through the RabbitMQ tutorial, I noticed that the tutorial stops referring to producers "sending" messages and starts using the verb "emit" instead — and pretty consistently, too; after the second tutorial, the verb "send" is no longer used to describe a producer transmitting messages.
Example:
Second Tutorial
... |
I have this idea for the "best app in the world". I know what it's going to do, the need it's going to fill, a high to mid-level idea of the code, and who i'm going to target. Now i'm ready to begin: I grab my pen, paper, thinking-cap, can-do-attitude, set the clock to GO-TIME--This app is gonna be awesome!......2 hour... |
I'm just starting out as a web designer. I'm trying to build up a portfolio for my own website.
I'm concerned about designing a site and handing it over to the client. Once I do this I could lose access to the site. They can change the login information and they may not need to me manage it. If the client changes anyt... |
First of all, I know there is no perfect answer to my question. It is a bit personnal, but I'm sure many programmers face the same dilemma when they get from regular desktop applications to client/server web applications: what is the "best" language/framework to use? There are a lot of great solutions out there, all ha... |
In many programs and web apps (stack exchange included) the program is able to backtrack what edits where made to the piece. My issue is similar: I want to be able to store a "timeline" of edits, where the user can go back and see what they typed at a specific time/when the typed certain words. What's the standard way ... |
So the JavaScriptSerializer was deprecated in favor of the DataContractJsonSerializer.
var client = new WebClient();
var json = await client.DownloadStringTaskAsync(url); // http://example.com/api/people/1
// Deprecated, but clean looking and generally fits in nicely with
// other code in my app domain that makes us... |
Is there an equivalent to Build-Operate-Transfer or Build-Lease-Transfer in software development? Does it even make any sense to operate such a project in software? Do you know of any projects in your experience that have been launched as such?
Another way to put it is: for a large software system project, why wouldn't... |
I want to look at how my code base has grown over time. GitHub has a nice +/- display along the list of checkins which gives a sense of this. Is there something similar I can use with my Google Code hosted repo or offline?
|
Let’s examine a hypothetical scenario:
Company X writes a proprietary program (A) that dynamically links with a proprietary library (B). Company Y wants to use a replacement library (C) licensed under the GPL, and so writes a wrapper library (D) that dynamically links to both A and C and translates the API calls used b... |
A friend of mine while working on a PHP application asked me to write one part of the application in Java. The part that involved transactions. He said it will be better to write this portion in Java. He talked about how secure it will be!
Though I was too busy to help him then, I want to know the essence of this idea... |
I've a Java webapp with these frameworks and I want to know if my implementation meets with MVC pattern:
Controller Layer (V)
I'm using JSF
@ManagedBean
public class Controller{
@ManagedProperty("#{business}")
private Business business;
public void insert(){
business.insert();
}
}
Business Lay... |
Instead of programming the way we do, why don't we make specifications of common tasks such as "sorting", and then let the environment compile it to make best use of it's hardware? This way, we could ship computer with new specialized hardware such as sorting networks, and it would automatically work with existing code... |
I am looking for an example where an algorithm is apparently changing its complexity class due to compiler and/or processor optimization strategies.
|
I am writing a Java program using the MVC design pattern.
I have classes Item and Supplier. In the database they are connected through a item_supplier table.
I'm writing a method which will give me all suppliers for a specific item (using itemID):
public ArrayList<Supplier> getItemSuppliers(int itemID)
I have a DB laye... |
So, I got a table UserProfiles in my database, that, similar to C#'s Settings file, holds a property with the appropriate datatype and the specified setting in the profile.
Now each time I add a new setting, I need to update the database, the model and end up rewriting the queries.
I've then thought about changing the ... |
What are the reasons to choose a homogeneous vs. a heterogeneous AST representation for implementing a complex domain-specific programming language?
Just to be very clear about what I'm asking, here is some extra background:
By homogeneous, I mean a tree constructed of nodes which are a single generic type. For example... |
One of the main SOA service design principles is Service Composability principle
(https://en.wikipedia.org/wiki/Service_composability_principle).
The idea is that by composing new services using existing ones as building blocks, one
can rapidly develop new services. Kind of analogously to how you call exising methods... |
We are currently developing a concept for our tests standards. Up until now, we don't have standards. All we do is to tell the developer to write tests. Now we have the following basic idea:
We will use the coverage metric described in Developer Testing blog article Selecting Developer Testing Metrics to visualize the ... |
As our client request, we are proceeding to change the base of our system. We already have the following structure:
A class has many students. (simple typical one - to - many)
Now we must change it to:
A class has many groups. Each group has many students. (Intermediate
Object "Group" is inserted).
That seems to ... |
Background: I'm writing in-house software - it has absolutely no contact with the world outside the company - but I'm using various libraries, which themselves do have some license structure. So for example GPL requires that software that re-uses the a GPL-licensed piece of code, to also be under GPL-license. Does that... |
I am developing a rss reader where users search and follow blogs. But, how will I collect and store the feeds of thousands of blogs?
Manual process of adding individual feeds is painful. Is there an easier way to add or import site feeds?
|
Let's say we have a multiset (set with possible duplicates) of integers. We would like to find the size of the largest subset of the multiset such that all numbers in the subset are congruent to each other modulo some m > 1.
For example:
1 4 7 7 8 10
for m = 2 the subsets are: (1, 7, 7) and (4, 8, 10), both having size... |
We're currently considering whether it makes sense (or if the benefits are worth the added code) to introduce a Message based pattern (such as Request Response) into a Domain Driven Design / Service Oriented Architecture under an MVC app (with DI and potentially used by MVC, WCF, Windows Services, etc.).
Basically (in ... |
I'm currently reading Benjamin C. Pierce's “Types and Programming Languages”. Before really getting into type theory it explains lambda calculus and evaluation strategies.
I am a bit confused by the explanation of call by name vs call by value in this context.
The two strategies are explained in the following manner:
c... |
I want to learn C but I tend to learn best when I have a project to work on. I've never done iPhone development, so I'm hoping to kill two birds with one stone. Will learning objective c also teach me to program c reasonably well, or are they too dissimilar?
EDIT: I'm mostly wondering if objective-c/iphone-development ... |
I currently have a PIL Image object which I store as an array of bits (1's and 0's). However I now would like to be able to rotate that image 45 degrees. One way to do it is take the original PIL image, apply a transform matrix on it, then convert that to an array of bits. Problem with this approach is that it's compu... |
I'm using a REST API through PHP and I'm a bit confused on the CURL_POSTFIELDS behavior, which implies that I must send a querystring or array, but what I'm seeking to do is just to send a string of JSON text.
In the API I'm using there is no such thing as a field: https://developer.atlassian.com/display/JIRADEV/JIRA+R... |
I'm a junior in college majoring in Computer Science. Apart from writing lots of code, I want to start reading source code written by others to improve my coding skills and learn better/different ways of doing stuff. I was thinking I should start reading some of the key parts of the code in C++ compilers. I think this ... |
My background in mathematics is very poor (i.e. last relevant math class taken was high school Trigonometry two years ago - another story for another time). I'm reading 'Javascript: The Definitive Guide' and it's a term that is being repetitively used and I've sort of just ran with it. But I've come to a chapter (Chapt... |
This link really provided some insights into the idea that binary search implications into the optimization problems by giving the main theorem. I am not really confident that I get the idea of the main theorem suggested there. Are there any easy explanations, for the ideas, expressed in that tutorial?
|
Generally for a javascript application, compatibility is mentioned in terms of browser types and browser versions it supports.
Frameworks/Libraries like ExtJs also mention about the browser versions they are compatible with.
Does this mean that if my javascript application can run on Google Chrome 10+ version, then a... |
What constructs in OOP languages (specifically Java) allow you to enforce design decisions and intent?
I think some examples would be the 'final' keyword, access modifiers, template methods, perhaps interfaces - but clearly I am having trouble coming up with an exhaustive list.
Some constructs, like inheritance, feel l... |
The famous Strassen's matrix multiplication algorithm is a real treat for us, as it reduces the time complexity from the traditional O(n3) to O(n2.8).
But of all the resources I have gone through, even Cormen and Steven Skienna's book, they clearly do not state of how Strassen thought about it.
What is the rationale o... |
I plan to make use of this interface in a plug-in architecture.
/// <summary>
/// Generic interface allowing you to react to an event.
/// You can block the event or just use it for notification.
/// </summary>
/// <typeparam name="T"></typeparam>
public interface IEventObserver<in T> where T : class
{
/// <summar... |
I have recently been reading an article about creating a blog using ASP.NET and MVC, and in the article the user splits the Data Access Layer into a separate Class Library, and creates an interface for this to allow the DAL to be mocked for testing.
This works great for small projects, but I am struggling to see how th... |
I'm designing and implementing a multiprocessing postscript interpreter ("lightweight" processes simulated by a single OS-thread), and I need to generate a unique identifier for each process in the system, as well as maintain ids for any dead processes which still have live references. (Reference: Adobe PLRM, 2ed, Ch. ... |
I am trying to create Export Module for our application, this seems to me a bit complex so I am posting it here
to get some guide lines.
In our database we have a list of Products, which can be exported as XML, RTF or PDF
The user can select one or many products from the list to export. After Selecting the product(s)
... |
What is an example of "Business Logic" that should reside in the DomainModel i.e. inside an Entity instead of inside a (Domain) Service, as well as some example logic that should be in a service.
Here are what I would consider to be pretty clear cases(?):
Basic Validation would be done by the ViewModel definition attri... |
I have a program (technically an addon to a program) whose code I want to be freely available for educational purposes or to create derivatives for personal use. However, I do NOT want to allow unregulated redistribution of either modified or unmodified code, whether for free or for profit.
However, I do want to allow ... |
I'm writing a program for some quiz software. I have a question class containing the ArrayLists for the question, answer, options, marks and negative marks. Something like this:
class question
{
private ArrayList<Integer> index_list;
private ArrayList<String> question_list;
private ArrayList<String>... |
I'm writing a specification for a project, and am struggling with separating functional specification from technical specification (see http://www.joelonsoftware.com/articles/fog0000000035.html).
For example, I'm trying to specify the behaviour when a user requests a list of Foo objects they have visibility on. In the... |
What do you think would be the most effective solution to maintain an object status through a life cycle? The goal to be able to be continue from any state any time. During the life cycle likely to have human interactions over a variety of interface.
For example, an order which needs to be approved by a few people. Or ... |
I am new to Clojure, I am new to Macros and I have no prior background in Lisp.
I went on to create my own switch case like form and ended up with this:
(defmacro switch-case [v cases default] (if (cases v) (cases v) default ))
and then tried making a function and ended up with this:
(defn fn-switch-case [v cases def... |
This may seem an odd question, but I want to create an executable which runs under Windows written in C++. The program needs to be able to update a jar file even if Java is not installed on the target machine. I have seen the src.zip in the Java JDK folder and the jar folder but this is Java code. I assume jar.exe i... |
I work on a project that uses a SQL database as a back end, and a desktop app as a front end. We do releases on a regular basis, and as part of a release, our client needs to update their SQL server.
Our business requires that we are upgradable from version 1.x to 1.y, and the way we've been doing it so far is by follo... |
The following questions gave me food for thought:
Efficient way to shuffle objects
I'd like to write an "ultimate shuffle" algorithm to sort my mp3 collection
When you sort a list - you always have a base-line(numbers, alphabet, ...) which tell you how to order the list.
Question: When you shuffle a set - how would ... |
I heard it said that REST is "document-centric". Unclear what this meant, I began poking around and found the term document-oriented being used of databases, particularly NoSQL databases, and in contrast to a barebones key-value store. Thus it seems that documented-orientation of databases has to do with their internal... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.