instruction stringlengths 34 19.9k |
|---|
Is there an alternative to bits as the smallest unit of data? Something that won't be only 0 or 1, but actually hold many possible states in between? Wouldn't it be more natural to store floats like that?
|
Until recently I always avoided the use of open-source code in my applications, because of the legal headache it gives me. I rather spent a fair amount of money and not worry about attribution (since most commercial components don't require that), than paying nothing, but spending a lot of time reading legal texts, nev... |
I'm writing an interface between two configuration models that use different structures. While I know that there is no "magic" way to do the translation from a structure type to another, I wandered if there might be some best practices or an efficient/effective way to setup such a system. I think it's similar to how pr... |
I need to manage attachments on my Spring web application and I thought to use an open source repository.
My app it's a job approval system using J2EE / SPRING 3 Framework and Postgress DB to allow user to tracks the job,right through every step of the approval process.
It is a fully managed, collaborative system that... |
I'm wondering if it's possible to write and release a library based on the ASIO SDK under the LGPLv3.
More specifically, the ASIO license says something I'm not sure how to interpret (2.2) :
The Licensee has no permission to [...]. This includes re-working this specification, or reverse-engineering any products based ... |
I currently have a Java class called "node" which has a number of fields. Which fields in the class are used depends on a field called "type". There are close to 10 (this can grow) different types of "nodes". I was wondering if it is good to have a single class to handle all types or have different class for each type.... |
I'm looking for "Best Practices" concerning roles and responsibilities, specifically who is responsible for merges from development branches to trunk (or main). Basically I'm looking for ammunition to help my cause.
Let me describe what I'm facing. I am the lead developer (owner) of a particular application. Our compan... |
So I have a relatively simple system. A mobile client creates records in a sqlite database that I would like to have synced to a remote SQL server (that is shared with other mobile clients). So when I create a new record in the phone's sqlite table, I then push that change to my remote service through a RESTful API. Th... |
I have recently found the concept of literate programming. And I found it rather intriguing. Yet I have not been encountered with claims that it is a bad way to structure a program. It seems not covered many places. Not even here could I find any questions regarding this.
My question is not about its flaws or ways of h... |
Is this:
public MyClass
{
public const string SomeString = "SomeValue";
}
worse than this:
public MyClass
{
public static string SomeString { get{ return "SomeValue";}}
}
Both can be referenced the same way:
if (someString == MyClass.SomeString)
...
The second however, has the protection of being a prop... |
What are the current best practice/methods to code a VB.NET DAL in SQL Server?
I have been trying to search but can't seem to find the right words to look for.
|
I recently saw a question on SO about solving the scramble/boggle game, where the letters are in a 4x4 grid and you have to find as many words as possible. I looked at some of the solutions, tried it myself, and would now like to move onto solving a scrabble game.
The boggle solving code is rather simple; store the bo... |
I am trying to gather statistics on character or word sequences used in the English language for use in a software project.
Where can I can get a large amount (several GB would be nice) of English plain-text covering a diverse set of topics?
|
How to determine the story point value in Agile methodology and determine the team velocity? In web search able to get the definition but not the actually process explanation.
|
I'm currently in the process of modifying a C++ code that was written for UNIX system so that it works by compiling from Visual Studio. I had to change some built-in functions' names and I had to change the way dynamic arrays are defined.
My question is, can I say that I'm 'porting' this code from UNIX to Windows/Visua... |
I am new to working with Windows Services. Although I have learnt to create Windows Services in VS2010 I would like to know some practical ways in which windows services could be used?
I tried Googling with the current context in mind only to find more tutorials on how to create Windows Services.
EDIT on Bounty Offe... |
I'm playing around a bit with image processing and decided to read up on how color quantization worked and after a bit of reading I found the Modified Median Cut Quantization algorithm.
I've been reading the code of the C implementation in Leptonica library and came across something I thought was a bit odd.
Now I want ... |
Following the formal user story style:
As <user>, I want <goal> so that <benefit>.
Our team has found difficulties in expressing things where there is a desire by the system's owners to do something which negatively affects the user.
As an arbitrary example, let's say owner wants to have the system charge customers e... |
I´m pretty sure it´s not the gang of four. I have a feeling this is a newer pattern. Where was it first published/mentioned?
|
Following the formal user story style:
As <user>, I want <goal> so that <benefit>.
How can stories be written when there isn't an obvious user-interaction taking place, as in the case of automated processes like nightly invoicing?
|
Coming from a C# and Java background, I'm used to my lists being homogeneous, and that makes sense to me. When I started picking up Lisp, I noticed that the lists can be heterogeneous. When I started screwing around with the dynamic keyword in C#, I noticed that, as of C# 4.0, there can be heterogeneous lists as well:
... |
I have a "pipeline" sort of process that is essentially just linking together a bunch of existing tools to automate a workflow. For one of the steps, there is an existing command-line tool that already does the meat of what that step needs to do.
The external CLI tool is java-based, and so is my pipeline, so it would b... |
I can understand schedule pressure. You want to please your users, as they are the lifeblood of the company. However, it is also true that certain changes will make everything easier down the road. Unfortunately, management in my organization has an instinctive resistance to such changes and this resistance is so stro... |
I want to close issues in Github via my commit messages, but I'm not sure which commit should contain the magic "Closes #XXX" string when multiple commits are responsible for closing the issue. Specifically, I'm wondering if the last commit on my feature branch (always merged with --no-ff) should close the issue, or if... |
Are you guys familiar with those pesky PHP notice errors? You know, the ones that will appear when you do something like this:
if($some_variable == 45)
But if $some_variable wasn't created already, PHP will be like "Hey! Idiot! This variable wasn't defined yet!" and output a Notice Error onto the screen. However, you ... |
Just watched this fascinating and terrifying video. I'm curious what programming language / paradigm is used to control these beasties?
|
Although this could be a programming language agnostic question, I'm interested in answers targeting the .NET ecosystem.
This is the scenario: suppose we need to develop a simple console application for the public administration. The application is about vehicle tax. They (only) have the following business rules:
1.a) ... |
If you give people peer to peer software (such as a web sockets application if the peer to peer part gets implemented, but could be anything) the first step for some kinds of applications is to find a specific person and try to connect with them. If neither of you has a URI (and knows what it is) you need a third part... |
Possible Duplicate:
When is a BIG Rewrite the answer?
I'm on a small team that's been handed a poorly-written, half-finished 2D Java game. Our objective is to do as much as we can to make it better in about 11 weeks. I'm pretty sure the code is not maintainable and I need to decide if I should pitch the idea of a re... |
I am designing a component based system using JSF2 on top of Spring's IoC Container.
It is to employ a service layer between a controller and the domain/business layer (I anticipate the controller is nothing more than the JSF Servlet binding in the web.xml file).
The rationale for the service layer (which conforms to a... |
I am looking at buying Rubymine as I am doing a small amount of ruby, but a large amount of html5/javascript.
I was going to get Webstorm as I do have a lot of pure html5/js based frameworks/apps that I am working on, however I then read that WebStorm/PhpStorm/Rubymine etc are all based on their IDEA framework, and ma... |
Does anyone have any links to studies that show how noise affects the productivity of programmers? Specifically I would like to see how/if productivity rises when noise levels decrease.
As pointed in comments, the nature of the programming workflow is such that you go in and out of focus all the time -- so it's likely ... |
Being a PHP web application developer for several years now, I've had my share of MVCs and frameworks. At first I thought they were the best thing since sliced bread; everything seemed to be very easy to implement.
Now however, it seems that the more complex the application gets, the more hassle the framework introduc... |
I am implementing a website using MVC3, Entity Framework 4.1 and Repositoty pattern, Unit of work principle. But I am facing a big problem while implementing this.
I have developed a static ObjectContext class. This class is used across all the repositories so unit of work pattern is followed. I have e.g. ICustomer, IP... |
I know that Jenkins is focused on continous building/testing, monitoring of batch jobs about the project. We have a legacy project which such condition :
1)Has a development team.
2)It has SVN for source code management
3)Some cronjobs for some operations.
4)Compile&Build don't take too much time, there is no very comp... |
In an answer on how to make time estimates it is said to write down all your assumptions you made when estimating a project. Seems like a good plan.
Problem is, by assuming I already made an ass out of myself without realizing it. Assumptions are those evil things that like to stay hidden, things I took for granted.
So... |
I've implemented a generic factory as described here
I need to register elements to the factory hard-code like this:
Factory.Register(1, typeof(MyClass));
this factory will have to be correlated with a simple domain data type table [id,Display], in this case id 1 is related to MyClass.
I was thinking to add a column t... |
It has been less than a year since I joined my current company. Their majority of sales have come from a single product that has been alive since the last 10 years. However, there is minimal (if at all) documentation.
Not only do the developers in the company struggle with the lack of documentation but also there is a... |
I'm not 100% sure this is approriate here, but I figure the area of study is particular to programmers, since it's open source software. If it's better posted somewhere else then please say so and I will post it there.
Can anybody point me in the right direction of any studies on businesses and consumers adopting open... |
Where I currently work the general approach is -
avoid documentation as much as possible
Only document if a different team will need it
just for clarification, I don't mean code-documentation - this we do, I mean all the documentation surrounding the design process - if it's UML or DB Schemas, class diagrams and word ... |
Can you have Java compiled straight into machine code?
I want to do this so I have control over what platforms it's used on, and don't know C,C++ etc.
|
Is there room for a practical modern application in Java of the Blackboard Pattern detailed in "The Pragmatic Programmer"? Is there any particular library that attempts to assist in the implementation of this concept? What is the general consensus on this pattern in the present software community (especially Java)?
Tho... |
When setting a value to a variable inside of a class most of the time we are presented with two options:
private string myValue;
public string MyValue
{
get { return myValue; }
set { myValue = value; }
}
Is there a convention that determines how we should assign values to variables inside of our classes? For exa... |
What is your methodology when you need to determine the cost of UI design if you know the cost (work hours) of programming in some project?
Let's say, programming of logic in some project cost X dollars. Is there some general percentage (like 30% of programming costs) which can help determine the cost of design?
The ar... |
I've never seen this question answered definitively:
If you are maintaining a COM DLL that can be used by a .NET program, is it best to:
Import the COM DLL into each project, which generates an Interop assembly for each project? or
Generate the Primary Interop Assembly with TLBIMP every time the COM DLL is compiled? o... |
For my master thesis at Software Engineering, I want to investigate in the new development technique BDD (Behaviour-Driven Development). In my opinion this technique could really improve on customer satisfaction, code coverage and bugs because of the force of executable specifications and the customer-understandable la... |
My current project, succinctly, involves the creation of "constrainably-random events". I'm basically generating a schedule of inspections. Some of them are based on strict schedule constraints; you perform an inspection once a week on Friday at 10:00AM. Other inspections are "random"; there are basic configurable requ... |
Which is the best book and what are the best tools for C programming in Windows 7?
Would using C in any way hinder me when it comes to using the Windows API as opposed to using C++ or C#? I would like to use C, because it seems to me that object-oriented programming is bad for performance and the abstraction seems only... |
I have several classes that all inherit from a generic base class. The base class contains a collection of several objects of type T.
Each child class needs to be able to calculate interpolated values from the collection of objects, but since the child classes use different types, the calculation varies a tiny bit from... |
I have a client with an existing straight up HTML/JavaScript site. No back end of any kind. He wants to add email functionality to it and I was thinking of using Node to do this for two reasons:
It seems like an extremely lightweight way to do it
He's talking about adding further functionality in the future.
What are... |
I'm starting a project with a big client that has several websites across the world, and they want to integrate them into a single Sitecore codebase/structure.
All good in principle, but there are certain navigation controls that we have to use but, due to organizational complexities, we don't have the other sites sou... |
The question came up in a discussion at StackOverflow.
Is there a clean distinction between the two concepts cast and convert (concerning the type of an object), or are these two words describing exactly the same? How about languages other than C++, Python and Java? EDIT: What if the types in question are primitive typ... |
I've recently built the start of a core system which is likely going turn into a monster product. I'm building the system with node.js, and decided after I got a small base built, that It'd be a great idea to start using some sort of automated test suite to test the application.
I decided to use jasmine, as it seems p... |
In quite some codebase you can see comments stating things like:
// Workaround for defect 'xxx', (See bug 1434594 on Sun's bugparade)
So I've got a few questions, but they're all related.
Is it OK to put link to SO questions in a program's comments:
// We're now mapping from the "sorted-on column" to original indice... |
How can I check automatically what is seen and what not? Or at least, how can I organize some partly automatic tests?
IDE: Eclipse (could use also IntelliJ Idea if necessary)
Testing tool: Junit (again, could use something else if advised, but better if it is free)
Application OS: Android
Developer's OS: Linux (could ... |
How to separate View and Presenter in Android, while the reactions on the user actions (Presenter part of MVP) are set into the same activities that shows GUI elements (View part of MVP).
"In model view presenter just as Martin Fowler or Michael Feathers [2] say, the logic of the UI is separated into a class called p... |
I'm about to embark on a project that makes extensive use of a properly RESTful approach. That is, it uses HATEOAS and serves up resources in a manner that allows for general exploration by a client.
I would like to ensure that I provide a description of my endpoints in a manner that would allow client applications to ... |
The answer is probably obvious but not to me at this moment, so I was wondering if somebody who is better with sorting algorithms can help lead me in the right direction. This is not homework, I am legitimately trying to work within an existing design for something work related.
Essentially I start with an unordered l... |
First, some background, we are in the process of moving all of our project teams over to using git and are in the process of laying down the guidelines for how the repositories should be organized so that certain branches can also be monitored for continuous integration and automatic deployment to the testing servers. ... |
I am studying the Entity-Component-System architecture philosophy. As I have read about it, a typical entity system has:
1) Entities - which are merely ID tags which have a number of components
2) Components - which contain data on various aspects of an enity that the component is responsible for
3) Systems - which upd... |
I write a lot of scientific software, and I originally got into programming with F77. I moved to C++ for my primary programming about 10 years ago now, but I do catch myself using F77 habits. One thing I cannot seem to get used to is library usage. To be clear, I understand why one would want to use one, but for most o... |
I'm fairly new to SVN and I would be interested in hearing about how other people would organize projects in SVN.
We have projects that have different types of source files: C#, SQL, and Matlab. In addition to these types of files, we have Excel and Word file reports that we do not intend to put into SVN.
So let's... |
Right now I'm working migrating an app I made entirely using code behind to MVVM and had a question on where I'm supposed to be creating controls dynamically.
Basically I have a web service that returns {#} of items. For each item a button will be created and the item will be assigned to its data context.
Now so far I ... |
I need to start the design and development of a new framework to interact with an open source ECM. This inludes a customized data model to help web site developers interacting with this ECM, so they don't need to care about the details of nodes manipulation and other low level details. That's just a bunch of classes an... |
When I get a design from a designer, I get it as a PSD (Photoshop) file. I always expect proper layer and folder names, basically a clean and managed PSD. From this desigbn I develop HTML, CSS and JavaScript and deliver it to the back-end developers. To make it easy for them to understand, I
write semantic code,
keep ... |
I'm new to programming, and I'm working in C. I know that this is structured programming but if I use blocks, say for local variables:
{
int i;
for(i=0; i<25; i++){
printf("testing...\n");
}
}
Doesnt this make it kind of object oriented-like? Is this still structured?
|
I want to fork a piece of code licensed under the Academic Free License. For the project, it would be preferable to re-license it under the ISC License or the 2-Clause BSD license, which are equivalent.
I understand that the AFL grants me things such as limitation of liability, but licensing consistency is much more i... |
I work in a small (7 developer) development team and we all work on our own projects. Some of the barriers to team work are the languages and platforms we work on (.NET vs mainframe RPG programming) but other barriers are just that we're all so busy we haven't taken the time to take a step back and organize teams. Me... |
Note: My question is focused in my specific problem (which involves Liferay) but I hope it can be useful for anyone who needs to maintain various versions of a same project on git.
I work on a company which writes a lot of plugins for Liferay Portal. These plugins (portlets, themes etc.) are usually reusable and, of co... |
The problem I continually face is how to deal with computed values driven by domain logic while still working efficiently against the data store.
Example:
I'm returning a list of Products from my repository via a service. This list is limited by pagination info from request DTO sent by the client. In addition, the DTO ... |
One thing I like to do with my code is make sure that it's refactored into manageable pieces. However, when it comes to building the software, I find that whatever build automation software I end up using (lately it's been GNU Make or SCons) ends up becoming a complete mess. The input files look like long scripts that ... |
What effect does including another open-source utility in your source repository have upon your code if they use different licenses?
I tend to use more permissive licenses such as the Apache and MIT.
To allow others to use a project with as little setup as possible I want to include utilities used by the build scripts... |
I have a state machine pattern implementation that's pretty straightforward, but I've got a design problem I don't know an elegant solution to.
Here's some partly pseudo code to illustrate.
class MainRoomState:State
public override void HandleJoinSuccess(string gameName, List<LobbyPlayer> players)
{
C... |
I'm confused in differentiating the OSI Model and TCP/IP suite. As per my knowledge. OSI is a structure on top of which Networks are built and TCP/IP is the suite of protocols that operate on these 7 layers of OSI. Correct me if I'm wrong. Also, is TCP/IP a replacement to OSI and is used IN PLACE of OSI? or both these ... |
After using Django's excellent admin interface, I was pondering creating a similar system which wasn't as tied to an ORM.
Now, while considering this, I thought that overcoming webapps limitations (basic widgets, sessions, text/HTTP-based forms, distinct client-side/server-side languages in most cases with a limited co... |
I wonder if there is any reason - or if it is just an accident of history - that there are no !> and !< operators in most programming languages?
a >= b (a greater OR equals b) could be written as !(a < b) (a NOT lesser b), that equals a !< b.
This question struck me when I was in the middle of coding my own expression ... |
I have written a piece of software using the Microsoft Solver Foundation.
Now the work is done I want to release the code under the Terms of the GPLv3, if that is possible.
The problem is, the GPLv3 states in section 1:
The "System Libraries" of an executable work include anything, other
than the work as a whole, t... |
As far as I understand, there are basically 3 options for doing server-side scripting these days:
Using scripting languages that can be directly interpreted/executed by the web server (e.g., PHP and ASP), where the scripts are interpreted/executed on the fly (i.e., as HTTP requests come), the output is embed into HTML... |
I was just watching the "Going Native 2012" streams and I noticed the discussion about std::shared_ptr. I was a bit surprised to hear Bjarne's somewhat negative view on std::shared_ptr and his comment that it should be used as a "last resort" when an object's life-time is uncertain (which I believe, according to him, s... |
Our front-end developers have requested that the RESTful Java web services to support delta queries. The use case for this is to handle periodic ajax refresh of the screen to bring in new data (deltas). I can see a few advantages of this:
Makes front-end logic simple (i.e. no complicated deduping logic)
Reduce network... |
I was looking at the customer list of a few ERP vendors like SAP. The companies in the list are mostly non IT companies. So, I'm wondering as to how IT companies approach the business process management problem.
For example, any IT company with a few thousand employees across different locations will need software for ... |
Possible Duplicate:
At what point do immutable classes become a burden?
This is something I never understood. When learning C++, for instance, I had lots of headaches with const issues, as it added lots of complexity to programming. Why is immutability important? And is it always necessary?
|
I am developing a mobile web application that may be browsed in an iPhone. I would like to test this application, but I lack a mobile web device.
How can I test this mobile application on a Windows 7 PC?
|
I've been using Codeigniter a lot recently, but one thing that gets on my nerves is handling errors and displaying them to the user. I've never been good at handling errors without it getting messy. My main concern is when returning errors to the user.
Is it good practice to use exceptions and throw/catch exceptions ra... |
I was recently reading the Wikipedia article for Resource-Oriented Architectures (ROA) and stumbled across an article that made the assertion that, although REST is a technology that is very-well suited for web applications and web services, that it is nevertheless a standalone technology that can be used in non-web ap... |
For 3 tables that are in 3NF, a many-to-many relationship, is there a standard name or term to describe the 3rd table, the one that associates the other tables? Basically, I'm looking for a semantic way to name the 3rd table.
Example
You have two tables: users and widgets. A user can have multiple widgets and a widget ... |
If in a web app, let's say an app that has a table with stored street address (Strings), the admin of the app will be adding data often to grow his archive.
The table (MySQL) has a primary key with AUTO_INC.
The web app allows the users to add addresses themselves. Once a user enters an address say X, ALL of the users... |
For a beginner web developer who is still doing web development the conventional way (PHP/J2EE/Struts on server side, HTML/CSS/Javascript on client side), I was bowled over by the recent blog post on Trello technology stack.
I can't help feeling overwhelmed by the list of new technologies and frameworks mentioned in t... |
Most programming languages appear to be designed to not allow one to declare an identifier that starts with a number. I was just curious to know the reason. I have already searched the web, but couldn't find a satisfactory explanation.
|
I have to develop an application for a gas agency where a database will store consumer numbers, names, addresses, and date delivered for a town with nearly 20,000 people. I only know PHP, MySQL, CSS, jQuery, and other web based technologies. Is it possible to deliver a package to the client using these technologies tha... |
I've asked this question a few days ago about how much documentation should be made and now I realize I may have been asking only half of the question.
My goal is to promote some sort of documentation in order to increase continuous knowledge inside the team.
My team is working mainly on server-side services which exte... |
I am in the middle of design an application to issue and store invoices for an organization. The problem is the organization is not stable at all. There are many types of invoices and they may increase and change.
First, I tried to use tables in my DAL, one table to store invoices, one for invoice fields, and one for i... |
In object-oriented programming, there is of course no exact rule on the maximum length of a method , but I still found these two quotes somewhat contradicting each other, so I would like to hear what you think.
In Clean Code: A Handbook of Agile Software Craftsmanship, Robert Martin says:
The first rule of functions i... |
I'm currently trying to design a little application using Domain Driven Design but I'm afraid I don't really get the concept yet. Let me try to explain this as clearly as possible.
public interface IMyDomainRepository
{
void Add(IAnInterfaceFromAThirdParty element);
}
The interface above is defined in my domain mo... |
I've been asked this question as part of an assignment.
The question is a bit vague, and after searching the Internet, I cannot seem to find any particular set of steps related to this question. The best I could find are the following:
Design test cases
Prepare test data
Run program with test data
Compare results to t... |
Intuitively it seems like this might be the case. Is there real research or authoritative anecdotal data (yes, please) supporting (or contradicting) this theory?
|
So I've done some research on this but I couldn't quite come to a conclusion, so I figured I'd ask you guys to see if I could get some other opinions.
All of my database access is currently done through stored procedures. I am going to make no direct calls using custom queries. Because of this, my DAL is going to be pr... |
Like every author needs to read a lot of classical literature to develop his own style, and like every chess player read and analyze former champions games before, I think also every programmer needs to read a lot of high quality code.
When it comes to Java source code, what are your recommendations as "reading". Whi... |
My module is enabled by default (i.e. when you add the module). There's also a configuration you can optionally use, which supports an enabled="true|false" setting. This way the module can be disabled after it's been added, without the need to remove the module.
But I realized the module doesn't play nicely with anothe... |
I was reading some blog posts this morning, and stumbled across this one:
If the only class that ever implements the Customer interface is
CustomerImpl, you don't really have polymorphism and substitutability
because there is nothing in practice to substitute at runtime. It's
fake generality.
That makes sense t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.