instruction stringlengths 34 19.9k |
|---|
I write open source .NET class libraries as a hobby and thought about signing them. I can get Visual Studio to generate me a password protected public/private key pair and save it as a .pfx file, but I don't think I should do this for each and every project. One key pair should be enough, right?
Obviously I'm not going... |
I do not consider myself a DDD expert but, as a solution architect, do try to apply best practices whenever possible. I know there is a lot of discussion around the pro's and con's of the no (public) setter "style" in DDD and I can see both sides of the argument. My problem is that I work on a team with a wide divers... |
What is a good strategy to label software requirements in an SRS?
Typically outline numbering is employed on headers - but these will renumber if a new heading is inserted in the document. To me it seems like a good idea to aim for a more stable designation for each software requirement. This should make it easier to r... |
From WCF standpoint, just wondering whether I can leverage anything after upgrade from Silverlight 4 to Silverlight 5? I did some research regarding new features of SL5 and cannot find anything about changes to System.ServiceModel and System.ServiceModel.Web namespaces, is it rigth that nothing were added or am I missi... |
I have a question regarding Machine Learning in general. Consider the following scenario:
Given a piece of text, we want a program to know whether the text is 'abusive' or not.
To do this we can give the program 1000 text samples and manually mark which ones are positive and which ones are negative. The program studies... |
I cannot find any naming standards/conventions in MSDN for naming ASP.NET controls.
One of the following standards tends to be used by programmers:
lblAddress
AddressLabel
Address
According to MSDN's Name of Type Members, should we be treating ASP.NET controls as fields, hence using Pascal Case (e.g. AddressLabel)?
|
This is a question about logistics, not a technical question.
My company has outsourced some embedded software work. Specifically, we have payed a contractor to develop an embedded system for us since we do not have adequate in-house knowledge to do it ourselves (we only have desktop application developers).
So, the c... |
Over the course of some months I've created a little framework for game development that I currently include in all of my projects.
The framework depends on SFML, LUA, JSONcpp, and other libraries. It deals with audio, graphics, networking, threading; it has some useful file system utilities and LUA wrapping capabilit... |
I'm building an API and want to count hits for each user. It's a HTTP API implemented in Python. I could keep the count in a database (using PostGreSQL) but it'll be a very busy API, so I don't want the overhead in the DB. I'm looking at Redis or just writing plain text logs. But is there a better approach?
It's a map ... |
I work in Java so basically I use OOP paradigm during coding.
I am about to start working in Perl and I was wondering what is the paradigm that Perl developers follow.
In wiki it mentions that it supports many paradigms but I am not sure I understand this since it is a scripting language.
So my question is:
Are the obj... |
It's difficult to understand the meaning of the question from the topic's name.
Here is what I mean.
I'm watching Uncle Bob's Clean Code Episodes. In many episodes where he is talking about SOLID principles he mentions the problem of rebuild and redeployment caused by code changing. He says that bad architecture causes... |
My company's team lead\architect argues that a large-scale project is easier to understand if "entities connected by logic" are placed in one .cs file.
I quote:
"The whole structure of the logic and the interface and the class can be seen in one place, this is an argument which can't be refute. To see the same thing b... |
Let's say I have an animal class...with fields of name, height and weight.
I want to create a bird class which is an animal, but it has also, say, wing size.
How can I do that?
My general idea is creating the animal class, and the bird class which inherits animal, and has additional field ...but then different kinds of... |
I'm working on web application design that includes Knockout.js and have an overall MVVM question: Does it make sense for the ViewModel to automatically inject a default HTML template (pulled from separate file)?
More detail: suppose I have a site like this...
header...
widget 1
widget 2
widget 3
footer
..... |
I plan to import works from a Java GPL2 project into a GPL3 one.
How must I "head" all my project derivating sources files : must I put the GPL2 license of the original project (saying that "This file is part of PROJECT_NAME ...") above my project one ?
How should be the LICENSING file of the whole projet : must I put... |
I'm working on an application that uses Inversion of Control to achieve loose coupling between the Data Access and Business Layers.
Having an ILoanApplicationRepository and a LoanApplicationRepository, where should I store the XML Comments that document the class members? on the interface or on the concrete class? shou... |
I'm a bit confused about the OwnCloud licensing model. OwnCloud is an AGPL licensed product (at least the open source version is). Does that mean that the only license I can use for an OwnCloud app I write using the API would be AGPL as well?
The way I understand it, the AGPL license is so restrictive that no app can b... |
I'm inching my way up the TDD ladder and I've got to a point where I'd like to get advice on the "next move". I realize there might not be a single answer here, so any logical suggestion would be great.
The thing I think I'm stuck on is knowing weather I should force duplication or proceed with primary functionality im... |
I am creating an application with a friend, which we are planning on writing the back end partially in PHP and partially in Javascript with Node.js. Javascripts front-end involvement with PHP makes this a tough question to Google.
We are also using ejs templates, MySql database and it will be run on a Fedora server if ... |
I've been a full stack .net developer for several years now using C#/MVC4/SQL Server and have never taken on a freelance project. This is because up until now I have worked only as a full-time consultant by hour or on start-ups for equity. Also, I have only worked on very large complex projects that needed to be built ... |
I'm working on a project where I'm developing an interface that learns how you typically use a space, and tries to create the most appropriate control strategy for heating/lighting. I've done some research into the area of machine learning techniques, but I was wondering if there were any recommendations on which learn... |
I am currently a professional programmer. I want to expand my skillset, but I also want to make the career jump to being a dev lead as part of a team. I know there's got to be a lot to learn (and this won't be an instant thing) but I think I'm smart enough to do it and I'm up to the challenge.
I'm sure that many of the... |
In planning poker/scrum poker, when an estimate is made, should the estimate be made based on the assumption that only a single developer is assigned to that task, or a group of developers? If the latter, how large is that group? The reason this is relevant is that the time estimates would probably be different if a si... |
I'm planning on releasing a program I made, but I'm not sure exactly how to ensure people don't just steal it. The price point is $1, but I'm not selling it through an "app store" or anything so I have to handle the legal stuff myself as well as building a website. How do I make it illegal (is it by default?) for peopl... |
I am interested in modifying the SQLite source code and making it available as an experimental public fork (GitHub, Google Code, etc.)
However, the SQLite source code is currently in the public domain. If I fork, am I allowed to relicense using GNU GPL 3+? I would like my changes to the original source to be licensed... |
According to this GNU Project page, regarding Microsoft Public License (Ms-PL):
This is a free software license; it has a copyleft that is not strong, but incompatible with the GNU GPL.
They do not explain why it is incompatible. I cannot find any satisfactory answers nor explanations via Google.
|
The Falcon programming language advertises itself as supporting tabular programming:
Falcon provides six integrated programming paradigms: procedural, object oriented, prototype oriented, functional, tabular and message oriented. And you don't have to master all of them; you just need to pick the ingredients you pref... |
Let's say I want to develop an image editing program similar to Photoshop. Is it likely that certain interface patterns and approaches are patented and I can get sued if I use them in my program as well?
Do I need to take active care to avoid doing things the same way as competing software? How will I manage to make fe... |
I am Database Administrator, but now I need to know something about android applications.
I need to run an existing .Net application in Android Operating System, while surfing on the internet I came to know that, I can use MonoDroid to build and run my application on Androids Operating System.
I am new to this Android ... |
I am designing a web application and I am wondering how to design the architecture to manage sending automated emails.
Currently I have this feature build into my web app and the emails are sent based on user input / interactions (like creating a new user). The problem is that connecting directly to a mail server takes... |
I've developed a Socket Application on top of TCP in .NET C#, which allows many clients to send files from one another via a VPS I'm using. Most file transfers will occur between people in the same region, say, even in the same neighborhood.
So, If 300 clients are connected, some of them will be connected from say Euro... |
I'm currently developing a web that is all made from images (an HTML version of a Flash web).
The client provided me with a big PSD which I had to export each layer as a PNG to keep transparencies. There are some layers that are heavy in detail, and of course, in size, like 5MB each (mainly the background, it's like 6 ... |
what are best practices, to model and query spatial responsibilities of company local branches?
My company has many local branches which are all in general responsible for 1 city. This is the easiest case. However, there are some exceptional cases. Here's a list of all possible cases:
branch a is responsible for city ... |
I had legacy code that was originally build for some quite old version of compiler. We are talking about native code, not managed. Now it is ported to almost newest version of the compiler. Every compile error was fixed and now the product is properly compiling and running.
But:
although it compiles and even runs... h... |
I'm doing some investigation into the role of maintenance in software development and the use of metrics within the development cycle.
What I am asking is for a point in the right direction or possibly a direct example in which there has been software failures due to the oversight of maintenance costs.
More specifical... |
I'm scraping text from various webshops (no images/videos or other data). I'm no expert on user tracking, so I'd like to know if there's a way for me to write my crawler so it won't interfere with the webshop owners tracking. Perhaps this is already the case since the crawler isn't storing any cookies, requesting image... |
I'm working in a creation of a new system that should be able to change the presentation layer without trouble, also be able to comport web-services, shop areas, internal control of data, creation of reports, multiple web portals, etc.
Following this post about the "benefits of multiple Projects and One Solution" on St... |
We ran into an unfortunate situation at work recently and I've been wondering what we can do to avoid similar problems in the future.
We make embedded systems. The FPGA code is in one SVN repository while the firmware & software code is in a different repository. Building the firmware requires the built FPGA images, so... |
Elsewhere, an argument has arisen over the terminology of a named function in CoffeeScript. In particular someone referred to something like this:
foo = ->
console.log("bar")
as a named function. But its been objected that everything in CoffeeScript is anonymous functions and there are no named functions. This is... |
Every time when user hears one music on system, the system stores this music to recent list, but I am afraid to pass over than decimal(19,0) limit in future. If I do Reseed I will get some problems insert invalid duplicate pirmary keys, but if I reallocate all id's it is possible.
Is there a better way for that? With p... |
I'm having a hard time coming up with a good naming convention for methods in derived classes that serve the same purpose as the methods in the base class. For example, if both the base class, and the derived class, need to initialize:
public class Foo()
{
public void Initialize()
{
// base class initia... |
I'm having trouble deciding how to design this service API.
public class GetCurrentValuesRequest
{
public int ReferenceID { get; set; }
public int[] FilterIDs { get; set; }
}
public class GetDefaultValuesRequest
{
public int[] FilterIDs { get; set; }
}
public class GetValuesAsOfDateRequest
{
public in... |
What is the best practice for checking multiple conditions, in no particular order?
The example in question needs to check four distinct conditions, in any order, and fail showing the correct error message.
The examples below use a C-like syntax.
Option 1: Check all at once
This method isn't preferred because the reaso... |
Is there any design pattern or practice recommended for business layer when dealing with multiple API version.
For example, I have something like this.
http://site.com/blogs/v1/?count=10
which calls business object method GetAllBlogs(int count) to get information
http://site.com/blogs/v2/?blog_count=20
which calls b... |
We have accumulated a large codebase of somewhat-well-document projects, many of which aren't actively being used, but that we want to be able to start using again quickly if necessary.
What is the best way to automatically make sure that these projects stay in working condition as the dependencies backing different pr... |
I'm implementing a .NET class which implements IDisposable. After being disposed, the object's state is invalid and so nobody should be accessing it, of course.
There are some situations where two essentially independent systems have access to the same instance of this class. One essentially "owns" the object but the... |
I'm implementing a system in C, implemented partially as a library. The library does most of the memory management itself, with the application layer just having to call *_destroy functions on the top-level objects.
While checking for memory leaks, I noticed that the number of calls to malloc seemed quite high, relativ... |
What endpoints should I provide, if any, to permit connectivity / availability testing for my web services / Web API?
TL;DR
I am developing both the server and client in an enterprise environment. The client will interface with the server via an RESTful Web API. I would like to provide an indication to the user that t... |
say I have an EntityManager that can read(PK) a dataset from the DB and return it.
I have an application that will process multiple records, iterate over them and for each, use the EntityManager to read each record.
Therefore it would be nice to inform that EntityManager about the coming workload so it is able to prelo... |
For one of the projects at uni we were given the task to create a custom, niche search engine. My colleges and I split the tasks amongst each other so that we can tackle the overall project more easily. My part is to create the indexer. I already read the wikipedia page on search engine indexers and some other related ... |
Serialization is used for persistence in Java. It may be okay to persist a few objects using serialization. But, for a large number of objects, ORM, Database etc might be better. It seems that serialization is useful only for small jobs. May be I am wrong. So please tell me
what are the advantages of serialization over... |
I haven't used Generics in C# for a long while. Every time I think I need to use them I either go in the wrong direction and give up or find that I don't really need them. I feel that I'm missing out or ignoring a technique which could be useful and powerful.
I'm aware of how generics are meant to be used (or at least ... |
Background
A discussion that has come up at work recently is how we handle audit logging and the recording of events. We are integrating with a 3rd party app so triggers are a no no from the off so we are handling it in code. We've written a number of prototype components for handling it but nothing feels right as ye... |
Should code quality metric evaluation tools like Sonar be integrated with IDE for running local analysis or should they be a part of the build process (like integrated with maven) for continuous inspection or should it be a combination of both? How can we leverage the power of such tools to the maximum extent possible?... |
I was reading this question:
I was trying to standardize and modularize some functions (Email
Management Module, CMS Module & etc) by implementing a 3-tier
architecture concept where each module would have its own independent
module database. So that in the future all we'd need to do is just
code a presentatio... |
I hear a lot about "Singletons are always bad" around the place. I don't hate on them to that degree but I try not to use them if I have a better alternative.
In this case I have a system that handles a lot of requests, each of which comes in on its own thread. Every request that comes in needs to be allocated its own ... |
If I split one class into two classes should both classes have history in source control tracing back to the original class that contained both; or should the new class be added as a new file without any history tracing back?
When splitting a large class into two similar sized parts this seems like the natural approach... |
I just read through this question, but I am still confused.
How can I know if my app is using undocumented API calls before submitting to it to the app store? Are there any tools I can use?
|
I've just taken on a new job at a college as (the sole) Web application developer.
The college has a number of disparate but all pretty badly coded legacy systems. Mostly built in PHP they deal with things like attendance, exam results, marking etc.
My first job is to build a system that incorporates a lot of this data... |
Our application requires an activity log of actions that a user has done. For example:
3/19/2013
-------------
9:37 AM Chuck Norris scrapped 3 robots.
9:15 AM Chuck Norris fought 3 robots.
Currently this is done with a gigantic query that compiles all of a user's activity on a given day. The query is so slow that tha... |
I am designing a new programming language.
I am designing a syntax to implement queries. Currently this is how it works.
The database is accessible through entity object.
on this sample I have "entity.manufacturers" and "entity.products" table
To get manufacturer with an ID of 1:
var @manufacturer = entity.manufact... |
I know that methods in a class should have high cohesion which roughly translates to having all the methods use all the instance variables directly or indirectly. I know that LCOM4 (Lack of cohesion)metric is useful for having a quantitative figure of how much cohesive the methods in a class are. A class with a LCOM4 v... |
Suppose we're unit testing a class with xUnit-like framework - so a test class is created for class-under-test. Now, how much should be tested by individual test methods?
Should there be one-to-one mapping between methods-under-test and test methods:
class TestMath {
testSqrt() {
assertEquals(Math.sqrt(4),... |
I'm very confused. I can't even begin to understand how MVC would be implemented outside of web development. This might seem like too general a question, but how would one apply MVC. I have the following general questions:
Are M, V, and C all meant to be one class each, or many. If many, how would
that work.
Most cl... |
These are Robert C. Martin's rules for TDD:
You are not allowed to write any production code unless it is to
make a failing unit test pass.
You are not allowed to write any more
of a unit test than is sufficient to fail; and compilation failures
are failures.
You are not allowed to write any more production code
tha... |
The project I am working on is version controlled by SVN, and the unspoken rule at work is to commit only when a new stable feature is added (in order to have a "clean" revision history with no revert) so I work sometimes for a few days without commiting.
However I am kind of a commiting maniac (several commits per day... |
I hope I picked the right group for this question...
I have this little framework I want to implement and I would like to have an opinion on it. In particular I am more concerned about the succinctness and style of the solution.
My class sketch looks like this:
public interface Builder<T> {
T build();
}
public in... |
How do you find the first common element in two arrays?
My attempt:
I looped through each at the same time and add the current value to a separate set for each of the lists. Also, check if the current element is already in the other list's set.
I have no idea if this works though and if so, why? I know it finds a commo... |
Often working with various jars and exploring the features specially in corner cases, I often realize and think that how is that they thought that it might be a useful scenario somewhere in future that it might be used and an API is made handy. So, how do they come to the conclusion what shall be provided and what not?... |
I've always had this struggle to get folks to update their issues, both at my company and at work. I've had a few cases when people actually do it from the goodness of their heart, but ~70% of the time I have to be chasing people down.
Being the one that generally does some or other form of management (I am firstmost a... |
I would like to add scripting support to an applications and with plenty scripting languages available I am a bit overwhelmed.
At first I thought about Python but I guess Python is a little too big for my taste and the application (although I like it very much, it gets a lot of things right in my opinion while the synt... |
I have written an application in Python using Tkinter and want to distribute under the WTFPL license. But I don't understand where to add the copying.txt file that needs to be added in the folder that is distributed.
Please clarify.
|
I am fairly new to web application development. I have defined my problem domain through talking to various stakeholders and putting a process map together - basically a flow chart showing the different steps and processes that the web application must be able to recreate.
The problem I am having is that I'm struggling... |
Java has
int and Integer
boolean and Boolean
This seems a bit inconsistent, why not either
bool vs Boolean to use an established shorter name for primitive type?
or
integer vs Integer to keep type names consistent?
I think C++ had decided to use bool quite a bit earlier than Java decided to use boolean, and maybe... |
I want to create a configuration file (text file preferred) that can be modified by user. A windows service will read from that file and behave accordingly. Can you recommend a file format for this kind of process?
What I have in my is a config file like the game config files, but could not imagine how to read from it... |
When working with CSS media queries, I am unsure of whether I should program in a mobile-first style, or a desktop-first style.
For example, let's say I'm given a design that consists of a set of blocks that are side-by-side. On desktop, I'll stick to spec, but on mobile, given the reduced screen area, two blocks stack... |
There is an endless data stream of XML messages (and "heartbeats"), that I receive via a telnet connection and through a site-to-site VPN IPsec tunnel.
I'm still pondering. What is the best/most elegant solution to process the XML messages without losing any data, without redundance and with a (nearly) constant proces... |
I have to read and write binary "chunks" of approximately 1Mb each. The data can come in the form of a stream or a in-memory byte[].
Normally I would use a Struct with a fixed layout, but there are a few properties of this binary data that are making this harder:
Byte 4 describes the "version" of the chunk
Byte 5 sta... |
As far as I know, most relational databases do not offer any driver-level API for queries, except a query function which takes an SQL string as an argument.
I'm thinking how easier it would be if one could do:
var result = mysql.select('article', {id: 3})
For joined tables, it would be slightly more complex, but still... |
I never did generic programming before, being more of a python guy, and generally using OOP. As I moved into generic programming, I faced some issues. I read the FAQ, but I am not satisfied. What I want to ask are the following questions (I am mostly interested in the first, but answering the others will be extremely w... |
I have a C++ API, I want to send commands through http to run any c++ method from this API. I'm using libmicrohttpd.
What steps should I follow to do such a work?
|
------------- 1 * -------------- * 1 --------
| Container |--------| Assignment |-----------| User |
------------- -------------- --------
^ ^
| |
---------- -------------
| | | ... |
I'm working on an app that involves real-time manipulation of vector paths at 60fps, and I'm very surprised by how little information there is on the subject. At first, I tried to implement my idea using CoreGraphics, but it didn't perform adequately for my purposes. I then discovered that there was a Khronos standard ... |
We are building a web interface to a tiered membership system, which will interface with a third-party CRM web service for the creation and management of accounts. The web service, unfortunately, is not yet built; however, we need to begin work.
I have created an interface, IMembershipService, in which I am beginning t... |
Given that C# has the unsafe keyword, are there situations in which it would still be beneficial to interoperate with C libraries?
I could see the need for very fast number crunching, graphical manipulation or matrix operations, using pre-existing C libraries. But is there a use case for writing greenfield DLL's in, s... |
I'm a bit confused so the question is a bit confusing. TL;dr: how to mix STL and OOP?
From the comment to Best overview to modern C++ paradigms? and http://www.boost.org/community/generic_programming.html there isn't much about objects-oriented programming. (boost guidelines mention object generators).
When planing a p... |
I am designing an application that has some scripting capabilities: the host application may call the scripts to perform some operations when some events occur. To keep it easy and newbie-friendly, there is a single thread for everything: this means that if the script calls something blocking, the entire application ha... |
When working on a backlog, you define epics and break them down into user stories. Epics are estimated and kept on the backlog as epics until they become important enough to be planned into one of the next sprints.
But once an epic is split into sprintable units, what do you do with the original epic? Do you keep it wi... |
I have a form (lets say a registration form) and onsubmit, it calls a function to validate as follows:
$.ajax({
url : "/ajax/validate.php",
type : "POST",
data : $(".form").serialize(),
success : function(data) {
data = $.parseJSON(data);
$.each(data, function(i, ... |
I just came from an interview in which they asked me several questions about programming and problem solving. Regarding the programming questions, I asked them to let me Google so I can see the code (I quoted that logic is the thing to learn, not the language). At the end of the interview they told me that my skills ve... |
What about confirming the functionality in positive tests, proving it is working - should I say it is a waste of time? What kind of concept is behind this quote?
Unsuccessful tests, i.e. tests that do not find errors are a waste of
time.
Web Engineering: The Discipline of Systematic Development of Web Applications ... |
Some software projects have a Contributor Licence Agreement. The agreement could, for instance, assign copyright of 3rd-party contributions to the original project creator. Could submitting a Pull Request on github ever constitute accepting such an agreement?
|
Uncle Bob says in Clean Code book that Unchecked Exceptions should be used. Now JDK has some checked exceptions: IOException, IllegalAccessException etc. which cannot be avoided.
In my application logic suppose I have an exception:
public class MyDomainException extends RunntimeException {
public MyDomainException(... |
I thought long and hard on weather to put this question in programmers or stack overflow. Please let me know if this is not the right place and I will post it to SO.
My friend and I am developing a display board that would need some configuration every now and then. e.g. setting contrast / backlight etc. Now this setti... |
I'm researching ways to create a OO-model/repository-layer using PHP's PDO. My idea was to create model classes that represent a domain object and a repository class for each model that has the responsibility of:
Saving to the database by taking a model as argument and mapping the objects properties to the VALUES of t... |
I have written a server/client program in which I am using 2 threads :
One to recieve data continously and
Other to send data as the user writes it on screen
Problem:
I have created the threads but durung execution ,the control gets stuck in
the recieving thread having the infinite loop to recieve data and never goe... |
I know what unit testing is in general and what JUnit is in particular. But here I see that there is a project called JUnitEE which seems to me to be a wrapper over JUnit. So I would like to better understand the pain point of using vanilla JUnit and how JUnitEE is able to solve those problems.
|
I'm curious, is there a standard approach to dealing with long lists in the Python community, and in particular, is there any antipathy toward doing blank lines followed by comments to break up a particularly long list, e.g. of tuples, or in a dict, etc.?
For example, I'm developing a GUI application in wxPython, and a... |
I am currently working with a system that acts like a message bus. A message comes in to the service (WCF Windows Service hosted). The system then uses a service locator pattern to look up which dynamically loaded assembly will be assigned to the message. The assembly is found and then a method is executed which han... |
I recently discovered (or rather realised how to use) Python's multiple inheritance, and am afraid I'm now using it in cases where it's not a good fit. I want to have some starting data source (NewsCacheDB,TwitterStream) that gets transformed in various ways (Vectorize,SelectKBest,SelectPercentile).
I found myself writ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.