instruction stringlengths 34 19.9k |
|---|
I'm doing a little pro bono work for an organization in Central America. I'm ok at Spanish and my contacts are perfectly fluent but are not techincal people. Even if they don't care what I call some fields in a database I still want to make as clean a schema as possible, and I'd like to know what some typical abbreviat... |
I have written a program which records protocol messages between an application and a hardware device which matches each application request with each hardware response. This is so that I can later remove the hardware, connect a 'replay' application to the main application and wait for an application request and reply... |
I am creating a pair of apps, one to run preferably on tablets, but also laptops and PCs, and the other for WP8.
These apps are complementary - having one is of no use without the other.
I know there is a Windows Store, and a Windows Phone store, so one would be released on one, and one on the other.
My question is: a... |
I have been programming for couple of years and am generally good when it comes to fixing problems and creating small-to-medium scripts, however, I'm generally not good at designing large scale programs in object oriented way. Few questions
Recently, a colleague who has same number of years of experience as me and I w... |
Possible Duplicate:
Do I need to use an interface when only one class will ever implement it?
I am taking over a project where every single real class is implementing an Interface. The vast majority of these interfaces are implemented by a single class that share a similar name and the exact same methods (ex: MyCar... |
I have a course in which the proffesor has asked us to create a DSL for a our final project. He presented us in the first courses xText with Eclipse. This being a new course, I am still a bit fuzzy on what Domain Specific Languages means.
This is my current understanding: a domain specific language is a language th... |
Is there a good term that is similar but different than "deprecate" to mean that a method or API is in the code base but should not be used because its implementation is not complete or will likely change? (Yeah, I know, those methods shouldn't be public, yada yada yada. I didn't create my situation, I'm just trying to... |
First of all: I've got no academic background. I'm working primarily with Java and Spring and I'm also fond of web programming and relational databases. I hope I'm using the right terms and I hope that this vague question makes some sense.
Today the following question came to my mind: How much is modern programming sti... |
I'm a big StackOverflow fan, but I think this question belongs here, correct me if I'm wrong.
So basically I'm trying to localize my plugin in as many languages as possible. I posted a section on the docs to reach people that wants to help translating but I only got one contributor that attached a German translation. S... |
This is a follow up question on my past questions :
Concurrency pattern of logger in multithreaded application
As suggested by others, I am putting this question separately.
As the learning from the last question. In a multi-threaded environment, the logger should be made thread safe and probably asynchronous (where ... |
Doing unit testing for the first time at a large scale, I find myself writing a lot of repetitive unit tests for my business logic. Sure, to create complete test suites I need to test all possibilities but readability feels compromised doing what I do - as shown in the psuedocode below.
How would a well written, readab... |
When coding, I naturally often come up with classes or a set of classes with a high reusability. I'm looking for an easy, straight-forward way to work on them separately.
I'd like to be able to easily integrate them into any project; it also should be possible to switch to a different version with as few commands as po... |
I'm working on a web project (PHP, jQuery) which currently using Google Maps powering up the map functionality of the application, however we need to make it multi-platform like you can go to the dashboard and choose one from 5-10 map providers (which Goolge Maps is just one of them) to underlying your map functionalit... |
When I'm using C# to write some code and I define an interface using Visual Studio 2010, it always includes a number of "using" statements (as shown in the example)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TestEngine.TestNameSpace
{
interface ITest1
{
... |
About 3 months ago our lead web developer and designer(same person) left the company, greener pastures was the reason for leaving. Good for them I say. My problem is that his department was completely undocumented. Things have been tough since the lead left, there is a lot of knowledge both theoretical knowledge we us... |
Possible Duplicate:
How do you dive into large code bases?
I just joined a new company and started to study one of the their bigger system. For me to be productive, I need to understand the entire system without too much help. Other programers are really busy and dont' have time to hold my hands.
I used to use brain... |
Our data model has almost 200 classes that can be separated out into about a dozen functional areas. It would have been nice to use domains, but the separation isn't that clean and we can't change it.
We're redesigning our DAL to use Entity Framework and most of the recommendations that I've seen suggest using a Repos... |
I'm attempting to write a process that matches obscure strings to a single 'master string' for further processing. I have a lot of data that looks something like this:
Basketball
Basket Ball
Football
BasketBallR
BBall
BBall - r
FootB
...and so on. These need to be mapped to a master record like so:
Basketball = ... |
When it comes to OO database access you see two common approaches - the first is to provide a class (say "Customer") with methods such as Retrieve(), Update(), Delete(), etc. The other is to keep the Customer class fairly lightweight (essentially just properties) and perform the database access elsewhere, e.g. using a ... |
We are initiating a Spring + Primefaces project and the first problem we have encountered concerns storing the XHTML pages into the WEB-INF folder.
When we use a faces form in a view located inside the WEB-INF folder, then the commandButton does not execute the managed bean method.
<h:form id="loginForm">
<p:comma... |
Say we have a list of Task entities, and a ProjectTask sub type. Tasks can be closed at any time, except ProjectTasks which cannot be closed once they have a status of Started. The UI should ensure the option to close a started ProjectTask is never available, but some safeguards are present in the domain:
public class ... |
I'm resizing an image based on a non-integral conversion factor (a bmp image, in fact). I understand how resizing works, just non with a decimal number. For instance, if the factor were 2, I would simply write the individual pixels twice to the output file. You can't really write 1.5 pixels if the factor were, say, ... |
I would like to port a large Win32 DLL to native linux in C++. I don't think I can use Wine for a DLL like mine, because users of the DLL would then also have to be in Wine, and then they would all whine... As a Windows C++ programmer, I don't (yet) have any familiarity with the GUI front-end services in linux, but i... |
I am a bit confused as to what I am/am not allowed to do with a LGPL Library that I intend on using in a small scale commercial C++ Application that I am developing. My current understanding, although I don't know if I am correct, is that I am permitted use the library without releasing the source to the rest of my app... |
In a few months, a friend will establish his startup software company, and I will be the software architect with one additional developer. Though we have no real day-to-day experience with agile methods, I have read much "overview" type of material on them, and I firmly believe they are a good - if not the only - way t... |
I hope you can confirm or disprove whether I understand this correctly. I know for certain that Java Applets can have hardware acceleration and I wonder if this is the only known way to have graphics hardware acceleration in web pages or is there another way?
|
As I have already asked here, I have to implement a Multi-Platform Map application. Now I have Mapstraction as an option which uses Javascript to implement the desired functionality. My question is, "Is there any reason/benefit to implement such a library (let say, Adapters) in Server-side (in my case, PHP)?"
As these ... |
What is the best method to use and share variables between functions in non object-oriented program languages?
Let's say that I use 10 parameters from DB, ID and 9 other values linked to it. I need to work with all 10 parameters in many functions. I can do it next ways:
1. call functions only with using ID and in ever... |
For example if I have code that contains parts of code rewritten from code found here or on Stack Overflow or other Creative-Commons licensed code, can my final code be licensed with an Apache License?
|
I understand Objective-C categories and how they become useful, but I always have a hard time explaining the concept to other programmers that are not familiar with Objective C.
Maybe I'm just bad at explaining things, but I was thinking at another way to explain it by comparing to similar features offered by other (m... |
Can code licensed under a clause like this:
Redistribution of this work, with or without modification, is permitted if
Bob Joe is attributed as the original author or licensor of
this work, but not in any way that suggests that Bob Joe endorses
you or your use of the work.
be used in a project using GPL, or does this ... |
Inspired by this answer:
Liskov Substitution Principle
requires
that
Preconditions cannot be strengthened in a subtype.
Postconditions cannot be weakened in a subtype.
Invariants of the supertype must be preserved in a subtype.
History constraint (the "history rule"). Objects are regarded as being modifiable only... |
We have a dispute regarding who owns which tasks when it comes to the CSS on our live site.
Our designer argues that he is not responsible to log-in to word press and modify the css or use ftp for any changes because that's not his job description while developer argues that since it is css, it belongs to designer and ... |
My team follows the Scrum development cycle. We have received feedback that our unit testing coverage is not very good.
A team member is suggesting the addition of an external testing team to assist the core team, but I feel this will backfire in a bad way.
I am thinking of suggesting pair programming approach. I have ... |
I am currently reviewing a code base and noticed that a majority of the calls (along with DB connections) are just buried inside the PHP scripts. I would have assumed that like other languages they would have developed some sort of data access layer (Like I would do in .Net or Java) for all of the communication to the ... |
I'm currently planning on implementing API for HgLab and the obvious role model for me here is GitHub.
My API obviously won't be an exact copy due to inherent differences between Mercurial and Git and due to different tasks GitHub and HgLab solve, but similarity will be quite clear.
How ethical of me will it be to copy... |
I was following this highly voted question on possible violation of Liskov Substitution principle. I know what the Liskov Substitution principle is, but what is still not clear in my mind is what might go wrong if I as a developer do not think about the principle while writing object-oriented code.
|
I often develop SQL database applications using Linq, and my methodology is to build model classes to represent each table, and each table that needs inserting or updating gets a Save() method (which either does an InsertOnSubmit() or SubmitChanges(), depending on the state of the object). Often, when I need to repres... |
Possible Duplicate:
How to manage a Closed Source High-Risk Project?
I'm working on an institution that has a really strong sense of "possession" - each line of software we write should be only ours. Ironically, I'm the only programmer (ATM), but we're planning in hiring others.
Since my bosses wouldn't count the ne... |
I'd like to make a simple-ish website that is essentially a small game. Key strokes are to be processed and sent to a server (already acquired and should support SQL and JSP, I believe) which then translate to a location and written to the DB.
SQL queries are to be used to retrieve these locations and written to other... |
I have a belief that markup should remain in mark-up and not in the code behind.
I've come to a situation where I think it is acceptable to build the HTML in the code behind. I'd like to have some consensus as to what the best practices are or should be.
When is it acceptable to build html in the code behind? What is... |
Why are some data types or functions made Obsolete in a newer version of an API and others are marked as Deprecated? Why not make them all Obsolete or why not make them all Deprecated?
|
I've seen this sort of pattern in code before:
//pseudo C# code
var exInfo = null; //Line A
try
{
var p = SomeProperty; //Line B
exInfo = new ExceptionMessage("The property was " + p); //Line C
}
catch(Exception ex)
{
exInfo.SomeOtherProperty = SomeOtherValue; //Line D
}
Usually the code is... |
I've been tasked with designing Data layer for a website at work, and I am very interested in architecture of code for the best flexibility, maintainability and readability.
I am generally acutely aware of the value in completely separating out my actual Models from the Data Access layer, so that the Models are complet... |
I've recently started experimenting with natural language processing (NLP) using Stanford's CoreNLP, and I'm wondering what are some of the standard ways to store NLP parsed data for something like a text mining application?
One way I thought might be interesting is to store the children as an adjacency list and make g... |
I need a key-value storage in a simplest form we can think of.
Keys should be some fixed-length strings, values should be some texts.
This key-value storage should have an HTTP-backed API.
That's basically it. As you can see, there is no big difference between such storage and some web application with some upload func... |
I have downloaded a currently inactive GPL project with a view to updating it and releasing the completed codebase as open source. I'm not really a fan of GPL though and would rather licence my project under BSD.
What are my options? Is it just a case of keeping any existing non-touched code under the GPL and any updat... |
I've seen some people love and some loathe Perforce. As users or administrators with experience with other version control systems (free cookie to the ones with DVCS experience [git, Mercurial]), what is the main reason/feature that makes you love Perforce over other version control systems?
Edit: No, I don't sell Perf... |
As I have done multiple times before, I've written bash scripts, and just general commands that go nowhere. They just blink the little command line cursor at me for infinity until I control+C the command. When I do cancel the command, what exactly is going on when I do this? Am I somehow stopping and killing the curr... |
Now, in c++ '...' became a first class operator.
In speech, how do you pronounce it?
So far I've heard:
dot dot dot
triple dot
ellipsis
related: Is it OK to replace ... with ellipsis in writing?
e.g. "The ellipsis operator expands the pack"
EDIT (clarification): We are all aware that '...' as a punctuation mark is in... |
In Mercurial I can do this with the bundled Purge Extension and executing the following command:
hg purge
Also good to get rid of ignored files:
hg purge --all
I'm curious about the most practical/used equivalent solution in git.
Edit: I want to just get rid of the untracked files, not reset everything (e.g. suppose... |
So I mainly use Mercurial for my projects and I decided to sit down and learn all Git's shenanigans to discover if I'm in the right side (at least for me).
I'm learning that git uses namespaces for branches and I would like to know (in your experience) what is the point of namespaces?. In Mercurial I could just set the... |
For example, if I'm using some MVC-like architecture, which folder structure should I use:
domain1/
controller
model
view
domain2/
controller
model
view
Or:
controllers/
domain1
domain2
models/
domain1
domain2
views/
domain1
domain2
I deliberately left out file extensio... |
I'm developing a numeric application (nonlinear optimizer), with a zillion knobs to tweak and rising.
It's not my first foray into this domain, but this time there are even more variables in the code and I'm on a tight schedule. Don't want to waste time fiddling.
Days or even months can potentially be wasted adjusting ... |
I am trying to run multiple sites using single code base and code base consist of the following module (i.e. classes)
User module
Q & A module
Faq module
and each class works on MVC pattern i.e. it consist of
Entity class
Helper class (i.e. static class)
View (i.e. pages and controls)
and let's say I have 2 sit... |
I think "why PHP over Java" has been already discussed in other questions, the question I have is:
What makes LAMP/WAMP stacks so cheap and abundant vs a Glassfish one? What are the prime factors behind this trend?
Also, Why has no java based light weight stack come up as a competitor?
|
We are storing config files as XML. With that being said, when reading the XML file, is it better to use LINQ to query the XML file or would using the XMLDocument and/or XMLNode classes better to use?
To me, it would seem that in this instance, LINQ is not necessary. But then I tried to think of any value of one over t... |
Doing R&D work, I often find myself writing programs that have some large degree of randomness in their behavior. For example, when I work in Genetic Programming, I often write programs that generate and execute arbitrary random source code.
A problem with testing such code is that bugs are often intermittent and can b... |
As I understand, the term "Backporting" is used to describe a fix which is applied in a future version which is also ported to a previous version. Wikipedia definition is as follows:
Backporting is the action of taking a certain software modification (patch) and applying it to an older version of the software than it ... |
Firstly, I am following the convention that a bounded context is synonymous to a department, or possibly one department has 1 to many bounded contexts.
We have a client consultancy department that has a Documentation Service. Documents are stored in the Document Store Service (which is where all documents in the compan... |
Recently, I've come to prefer mapping 1-1 relationships using Dictionaries instead of Switch statements. I find it to be a little faster to write and easier to mentally process. Unfortunately, when mapping to a new instance of an object, I don't want to define it like this:
var fooDict = new Dictionary<int, IBigObject>... |
I'm making a large scale MVC application using Orchard. And I'm going to be separating my logic into modules. I'm also trying to heavily decouple the application for maximum extensibility and testability.
I have a rudimentary understanding of IoC, Repository Pattern, Unit of Work pattern and Service Layer pattern.
I've... |
I have a site done in Rails, which uses javascript to load files and generate forms for the user to input certain information. Those files and parameters are then to be used in a fortran code on the server.
When the UI was on the server (using Qt), I would create a parameters file and execute the fortran code using th... |
I have recently been set a target to achieve readiness to successfully manage and deliver results through the usage of offshore teams on our mainline development project within 12 months.
Our mainline is a multi-thousand user highly available web application, and various related SAAS components delivered through the ab... |
My coworkers and I have been bending our minds to figuring out why anyone would go out of their way to program numbers in a base other than base 10.
I suggested that perhaps you could optimize longer equations by putting the variables in the correct base you are working with (for instance, if you have only sets of 5 of... |
I am working as software developer and struggling with this problem time and time again for almost thirteen years. There seems not to be any way out of the following problem.
And it happens with small projects as well.
For example, I plan to write an extension for Microsoft Visual Studio. I dowload learning materials, ... |
Supposse there's a company where web sites/apps are designed to resemble desktop apps.
They struggle to add:
Splash screens
Drop-down menus
Tab-pages
Pages that don't grow downward with content, context is inside scrollable area so page is of a fixed size, as if resembling the one-screen limitation of desktop apps.
M... |
I searched on the web how to access in an efficient manner to a central database at a remote location and I met suggestions to use web services instead direct access (i.e. JDBC etc ) to a database.I wonder the reason of that and any other suggestions.
|
Most functional programming languages (e.g. Common Lisp, Scheme / Racket, Clojure, Haskell, Scala, Ocaml, SML) support some common higher-order functions on lists, such as map, filter, takeWhile, dropWhile, foldl, foldr (see e.g. Common Lisp, Scheme / Racket, Clojure side-by-side reference sheet, the Haskell, Scala, OC... |
For example: http://commons.wikimedia.org/wiki/File:Epithalamus.png
Could I take an image file like that, splice it apart, and use it in an application that would be sold?
|
Let's say SDK is under specific license that is not compatible with some other licenses (like Flex SDK with GPLv2). Can I create an application by using for example Flex SDK, and license its distribution under GPLv2? Can my application be considered a derivative work? What is a relation between SDK license and applicat... |
My datasource sends information in 100 batches of 100 records with a delay of 1 to 3 seconds between batches.
I would like to start processing data as soon as it's received, but I'm not sure how to best approach this.
Some ideas I've been playing with include:
yield
Concurrent Dictionary
ConcurrentDictionary with IN... |
I'm sure you've seen it. The database has a bunch of tables called Forms, Controls,FormsControls, ControlSets, Actions and the program that queries these tables has a dynamically generated user interface. It will read all the forms, load a home page that has links to them all, or embed them in some tabbed or paged ho... |
Inevitably I'll stop using an antiquated css, script, or image file. Especially when a separate designer is tinkering with things and testing out a few versions of images. Before I build one myself, are there any tools out there that will drill through a website and list unlinked files? Specifically, I'm interested ... |
I know that most of you would advice to go with the strategy and methodology of the project.
However I just have a quick question, from Senior point of view, what would be better to see quick small commits from a developer, or large chunk of code pushed to the branch?
|
What is the difference of delegator and dispatcher?
I am not quite sure of either concept.
|
How should I design a system for an action game (think in Golden Axe) where events can happen remotely?
I'm using TCP for this because the client is in flash.
There's so many options, I can make a binary protocol (I don't like this idea, I found it to be too hard to mantain) but I was also thinking that passing jsons t... |
We use WPF and Expression Blend 4. I'm trying to improve our workflow by tutoring one of our designers to use it for styling and animation.
Slowly but surely I get the impression Blend in itself is to technical for the designer in question. I myself use it only occasionally (it's great for Visual States for instance) b... |
I see more and more articles about logging in JSON. You can also find one on NodeJS blog. Why does everyone like it so much? I can only see more operations getting involved:
A couple new objects being created.
Stringifying objects, which either involves calculating string length or multiple string allocations.
GCing a... |
Can anybody point me to some resources about "cutting algorithm"?
The problem:
have rods with length of L meters, e.g. 6 m
need cut smaller pieces of different lengths, e.g. need:
4 x 1.2m
8 x 0,9m
etc... (many other lengths and counts)
How to determine the optimal cutting, what will produce the minimum wasted mat... |
Retaining the names inside namespace will make compiler work less stressful!?
For example:
// test.cpp
#include</*iostream,vector,string,map*/>
class vec { /* ... */ };
Take 2 scenarios of main():
// scenario-1
using namespace std; // comment this line for scenario-2
int main ()
{
vec obj;
}
For scenario-1 where u... |
I have recently being reading a web site about clean code development (I do not put a link here because it is not in English).
One of the principles advertised by this site is the Open Closed Principle: each software component should be open for extension and closed for modification. E.g., when we have implemented and ... |
I've got a great idea for an open source project. What should I do before starting, to make sure that I'm not duplicating anyone's efforts?
Of course I've googled, but which keywords to use isn't obvious. Is there a site to discuss such ideas?
To address a common answer: My goal is not to be the author of a successful ... |
After reading both this thread and the linked paper, I don't understand how FRP (functional relational programming) is different from (FP) functional programming.
Does FRP augment or replace FP? Can FRP be implemented as a library in an FP language?
|
Possible Duplicate:
Is the 80 character limit still relevant in times of widescreen monitors?
I used to set a vertical line set at 80 characters in my text editor and then I added carriage returns if the lines got too long. I later increased the value to 135 characters. I started using word wrap and not giving mys... |
If I'm making a web application which integrates with a server-side backend, would it be considered best practice to use HTTP methods semantically? That is, for example, if I'm fetching data (e.g., to populate a menu, etc.), I would use GET, but to update data (e.g., save a record), I would use POST. (I realise there a... |
I'm only going on what I've read on SO, so forgive me, but all I read says that one major advantage of Git over Subversion is that Git gives all the source code to the developer locally, not having to do anything on the server.
With my limited using of SVN and TortoiseSVN, I had all the source code, or at least I thoug... |
In Scott Chacon's workflow (explained eg in this SO answer), with essentially two silos (development, and master), if, say I have a small bug to fix (e.g. can be fixed with a few characters) is the optimal way of doing that:
a) branch off of development a branch called e.g. fix_123. Push this branch to origin as I work... |
This seems like the sort of problem that must have been solved elegantly long ago, but I haven't the foggiest how to google it and find it.
Suppose you're maintaining a large legacy system, which has a large collection of data (tens of GB) of various formats, including XML and two different internal configuration forma... |
Is the ROR used only in startups or also in bigger companies as well?
What should be the reasons of their preference of Java over ROR?
|
I recently saw this question over at math.SE. It got me thinking. Could Pi be used as a crude random number generator? I mean the results are well known(how long has pi been computed to now?) but, Pi does seem to be quite random when taken 1 digit at a time.
Does this make any sense at all?
|
I believe that if you have your repositories use an ORM that it's already enough abstracted from the database.
However, where I am working now, someone believe that we should have a layer that abstract the ORM in case that we would like to change the ORM later.
Is it really necessary or it's simply a lot of over head t... |
Ruby by default does not include the method [] for NilClass
For example, to check if foo["bar"] exists when foo may be nil, I have to do:
foo = something_that_may_or_may_not_return_nil
if foo && foo["bar"]
# do something with foo["bar"] here
end
If I define this method:
class NilClass
def [](arg)
nil
end
end... |
I use Linux and other open source software in my home. As I'm not a professional coder, I usually report bugs to developers as my skills are not enough to solve problems on my own.
What kind of things you want me to check before I send a bug report? I mean, once I thought I found a bug in Gedit and I couldn't find simi... |
I have an Item class with the following attributes:
itemId,name,weight,volume,price,required_skills,required_items.
Since the last two attributes are going to be multivalued, I removed them and create new schemes like:
itemID,required_skill (itemID is foreign key, itemID and required_skill is primary key.)
Now, I'm co... |
Is it conceptually correct to sum a vector of booleans? From a mathematical point of view, I would argue it's not: True + True != 2. But it's quite practical to do so still! Example using the vectorised Python library numpy:
In [1]: X = rand(10)
In [2]: large = X>0.6
In [3]: large.dtype
Out[3]: dtype('bool')
In [4]:... |
I was asked to build a tool that can identify if a string match a pattern.
Example:
{1:20} stuff t(x) {a,b,c}
would match:
1 stuff tx a
20 stuff t c
It is a sort of regex but with a different syntax
Parentheses indicate an optional value
{1:20} is a interval; I will have to check if the token is a number and if it... |
I have created an annotation-based validation library called regula. There seems to be some amount of interest around the framework and the next thing I'd like to do is to support HTML5 validation. Originally I figured that I would check to see if the browser supported the HTML5 validation that has been specified and t... |
Looking at the code of Joomla I see that in the first line of the index, it defines the base path of installation with dirname(__FILE__).
Is this a possible risk for the site? If a non controlled error message show the internal path of the Joomla directory, because of, for example a failed include, can it be used to pe... |
Have you had any experience in which a non-IT person works with a programmer during the coding process?
It's like pair programming, but one person is a non-IT person that knows a lot about the business, maybe a process engineer with math background who knows how things are calculated and can understand non-idiomatic, p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.