instruction stringlengths 34 19.9k |
|---|
I'm about to make a new Linux install, which will be primarily used for programming. I've seen benchmarks showing speed improvement of 64-bit version, however, I have hard time of telling how much these benchmarks translate to improvement in every day usage. And of course there are other aspects to consider.
Usage I ha... |
I would like to know why were annotations introduced in Spring and Hibernate? For earlier versions of both the frameworks book authors were saying that if we keep configuration in xml files then it will be easier to maintain (due to decoupling) and just by changing the xml file we can re-configure the application.
If w... |
I find that most of the design patterns are concerned with implementation of a model like mvc, or how to change the implementation with less cost. These are all happened in the implementation phase of a software. So why not call them implementation patterns?
|
I'd like to ask if someone of you knows the exact meaning of JEE.
That's because a collegue of mine was asked this question in a job interview, and was "unable to answer properly"... to speak with his interwiewer's words. And when he told me what he said to his interviewer I got really surprised, since it was more or ... |
At work I stumbled uppon a method. It made a query, and returned a String based on the result of the query, such as de ID of a customer. If the query didn't return a single customer, it'd return a null. Otherwise, it'd return a String with the ID's of them. It looked like this:
String error = getOwners();
if (error != ... |
(I was encouraged to ask this question here.)
In C, we say:
GCC compiles foo.c.
For interpreters (such as Lua), what is the equivalent verb?
The Lua interpreter ____________ foo.lua.
When I write instructions for users of my Lua script, I often say:
Run the interpreter on foo.lua.
I think this can be said more s... |
My company is building an App Engine application. The app encounters a bug (possibly due to an issue with App Engine itself, as per our research) on IE9, but it cannot be reliably reproduced and is experienced by a small percentage of users.
The workaround is to force IE9 to use IE8 mode. As a lazy front end developer ... |
Has this ever happened to you? You've got a suite of well designed, single-responsibility modules, covered by unit tests. In any higher-level function you code, you are (95% of the code) simply taking output from one module and passing it as input to the next. Then, you notice this higher-level function has turned i... |
Comparing software engineering with civil engineering, I was surprised
to observe a different way of thinking: any civil engineer knows that
if you want to build a small hut in the garden you can just get the
materials and go build it whereas if you want to build a 10-storey house
(or, e.g., something like this) you ne... |
I have some plain Views, they don't have any logic behind them (there is no action or controller behind them), their only propouse is to alert the user about something like "We have sent you an email to confirm your account", "You have no access to this resource", etc...
These views are really simple, and calling them ... |
Are there resources out there for a programmer with a large code base to have professional alalysis performed for the goal of finding the areas of most needed improvement?
Logic/Reason tells me there's a limit to what a code review question can absorb, and also that the amount of work involved is not something that sho... |
I have two huge tables on separate databases. One of them has the information of all the SMS that passed through the company's servers while the other one has the information of the actual billing of those SMS.
My job is to compare samples of both of these tables (for example, the records between 1 and 2 pm) to see if... |
The JavaBeans Specification describes a JavaBean as
A Java Bean is a reusable software component that can be manipulated visually
in a builder tool
Since the majority of the lines of code that are written seem to have nothing to do with being manipulated visually in a builder tool, why has the JavaBean specificat... |
First, I'm an entry level programmer; In fact, I'm finishing an A.S. degree with a final capstone project over the summer. In my new job, when there isn't some project for me to do (they're waiting to fill the team with more new hires), I've been given books to read and learn from while I wait - some textbooks, others... |
Rob Napier, the author of iOS 5 Programming Pushing the Limits, mentioned there are several models of selling apps on the App Store:
Write an app and sell it
Publish a free and a full version
Ad supported by third party or by iAd
In App purchase
Surprisingly, the author said that the most workable model is (1) in ter... |
Do people outside of the USA use two-part date abbreviations for the current year? For instance, representing the last day of May, you might see someone enter 5/31 into a date field.
Do international users do something similar? In a country that ordinarily uses dd/MM/yyyy would they use 31/5 or some such?
|
this is my first question on this particular stackexchange node, not sure if it's the most appropriate place for this question (if not, guidance to the appropriate node would be appreciated).
the abstract: I'm interested in modifying existing video codecs and distributing my modded codecs in such a way as to make them ... |
Is it possible to introduce scrum to a consulting environment? On any given week I might belong to 4 different teams, each with a different PM, BA and dev team (I am a designer). It doesn't seem feasible, time wise, to be able to be part of that many teams/projects as there would need to be daily stand-ups for each, sp... |
Let's say you're creating a website for a customer. This website has its own registration (either combined with OpenID or not). The customer asks you to be able to see the passwords the users are choosing, given that the users will probably be using the same password on every website.
In general, I say:
either that it... |
I have a .NET project at work that provides a couple of (Iron)Python scripts to the customers, to allow them to customize the output of the program. The application generates code for certain machines, and supports a couple of different formats.
Until recently, we only provided a script for one format. We're expanding... |
Background:
I'm currently part of a team of four: 1 manager, 1 senior developer and 2 developers. We do a range of bespoke in-house systems / projects (e.g. 6-8 weeks) for an organisation of around 3500 staff, as well as all the maintenance and support required from the systems that have been created before. There is n... |
UTF8?
UTF16?
Do strings in PHP also keep track of the encoding used?
Let's look at this script for example. Say I run:
$original = "शक्नोम्यत्तुम्";
What actually happens?
Obviously I think $original will not contain just 7 characters. Those glyphs must each be represented by several bytes there.
Then I do:
$converted... |
Hi I am a beginner web developer and am trying to build the interface of a simple e-commerce site as a personal project.The site has multiple pages with checkboxes. When someone checks an element, it retrieves the price of the element and stores it in a variable. But when I go to the next page and click on new checkbox... |
When I first started at my current job, my purpose was to rewrite a massive excel-VBA workbook-application to C# Winforms because it was thought that the new C# app will fix all existing problems and have all the new features for a perfect world.
If it were a direct port, in theory it would be easy as i just need to go... |
I have:
ten numbers: +1, +2, +4, +8, +16, +32, +64, +128, +256, +512.
flag == sum of some of this ten numbers.
How to determine that sum contains 2 or 32?
|
I have been programming for last 15 years with non-CS degree. Main reason I got into programming was that I liked to learn new things and apply them to my work. And I was able to find and fix programming errors and their causes faster than others. But I never find myself a a guru or an expert, maybe due to my non-CS ma... |
Recently, I read a lot of good articles about how to do good encapsulation. And when I say "good encapsulation", I am not talking about hiding private fields with public properties; I am talking about preventing users of your API from doing wrong things.
Here are two good articles about this subject:
http://blog.ploeh.... |
I'm learning OpenGL with C and that makes me include the windows.h file in my project. I'd like to look at some more specific windows functions and I wonder if you can cite some good sources for learning the basics of Win32 and Win64 programming in C (or C++).
I use MS Visual C++ and I prefer to stick with C even thoug... |
I suppose the class have several different interfaces. Some it shows to some class, some it shows to other classes.
Are there any good reason for that?
One thing I can think of is with one .h per class, interface would either be public or private.
What about if I want some interface to be available to some friends' cla... |
I write Linux embedded software which closely integrates with hardware.
My modules are such as :
-CMOS video input with kernel driver (v4l2)
-Hardware h264/mpeg4 encoders (texas instuments)
-Audio Capture/Playback (alsa)
-Network IO
I'd like to have automated testing for those functionalities, such as integration testi... |
For many programming quizzes we are given a bunch of input lines and we have to process each input , do some computation and output the result.
My question is what is the best way to optimize the runtime of the solution ?
Read all input, store it (in array or something) ,compute result for all of them, finally output ... |
I am starting to develop a WCF API, which should serve some specific clients.
We don't know which devices will be using the API so I thought that using a RESTful API will be the most flexible choice.
All devices using the API would be authenticated using an SSL certificate (client side certificate), and our API will ha... |
In my project I am creating an abstraction layer for some APIs. The purpose of the layer is to make multi-platform easier, and also to simplify the APIs to the feature set that I need while also providing some functionality, the implementation of which will be unique to each platform.
At the moment, I have implemented ... |
I am going to implement a repository, and I would like to use the UOW pattern since the consumer of the repository could do several operations, and I want to commit them at once.
After read several articles about the matter, I still don't get how to relate this two elements, depending on the article it is being done in... |
Years ago, I was surprised when I discovered that Intel sells Visual Studio compatible compilers. I tried it in particular for C/C++ as well as fantastic diagnostic tools. But the code was simply not that computationally intensive to notice the difference. The only impression was: did Intel really do it for me just now... |
Let's say you have a Master Database and a few External/Internal applications that use WebServices to interface data.
What would be your preferred architecture to interface data from and to those applications? Would you put some sort of Enterprise Service Bus in between? Like BizTalk? Or something cheaper?
We don't wa... |
According to blog post by RetroDreamer Android developers have to pay sales taxes for their App sales in countries with have sales taxes while Apple developers don't as Apple pays the taxes directly.
Is this an accurate description? Is so, how do the various people who publish Android apps handle it?
|
After almost 8 months being in ios programming, I am again confused about the right approach. Maybe it is not the language but some OOP principle I am confused about. I don't know..
I was trying C# a few years back. There were fields (private variables, private data in an object), there were getters and setters (method... |
The nature of my job is that I have to switch back and forth between projects every few weeks. I find that one of the biggest impediments to my productivity is the ramp-up time to getting all the relevant pieces of code "back in my head" again after not seeing it for a period. This happens to a smaller and larger exten... |
I have a general coding standard question. Is it bad practice to initialize and create an object in multiple methods depending on the outcome of a users choice. So for example if the user quits a poker game, create the poker hand with the cards the user has received, even if < 5, and if the user played till the end cre... |
Is there a language where collections can be used as objects without altering the behavior?
As an example, first, imagine those functions work:
function capitalize(str)
//suppose this *modifies* a string object capitalizing it
function greet(person):
print("Hello, " + person)
capitalize("pedro")
>> "Pedro"
g... |
There are some opensource projects, that have classes and classes without any significant explanation about what the class does and or why is that class needed. For example, classes in the CppEditor plugin for QtCreator. What are the best practices to read undocumented code? Don't read it, is not an option :)
|
Is it possible define methods from the same class in different "CPP" files?
I have header file "myClass.h" with:
class myClass
{
public:
// methods for counting
...
// methods for other
...
};
I would like to define "methods for counting" in one CPP and "methods for other" in other CPP. For clarity.
B... |
When validating a JavaScript form, would it be better to process each input field individually, or, where possible check collectively?
e.g.
validate()
{
noblanks()
fieldOne()
fieldTwo()
}
or
validate()
{
fieldOne()
fieldTwo()
|
I've been experimenting with random cache expiry times to avoid situations where an individual request forces multiple things to update at once. For example, a web page might include five different components. If each is set to time out in 30 minutes, the user will have a long wait time every 30 minutes. So instead, yo... |
I've been developing the client-side for my web-app in JavaScript.
The JavaScript can communicate with my server over REST (HTTP)[JSON, XML, CSV] or RPC (XML, JSON).
I'm writing writing this decoupled client in order to use the same code for both my main website and my PhoneGap mobile apps.
However recently I've been w... |
With Oracle vs Google trial, it seems that Java is not entirely Open and free (as free software) as I expected. Although there exists completely free/open JVM, it's hard to know what is a copyright infringement with Java, and what is not.
So I'd like to know if there is a completely Open and free language with open an... |
With the huge explosion of mobile devices and addition of HTML5/CSS3, there seems to be a shift towards "responsive" designs (i.e., adapting to smaller screen sizes) which seems to be achieved using CSS3's Media Queries.
My question is, given the current need of adapting to both desktop and mobile, is it common practic... |
We've been churning out wordpress sites for a while, and we'd like to keep a base repository that can be used when starting a new project, as well as updating existing sites with changes to the wordpress base.
Am I wrong in assuming this would be a good thing? We take care of updating the sites, so having a common base... |
Related: “sending 'const NSString *' to parameter of type 'NSString *' discards qualifiers” warning
Sometimes, I think it's useful though. I may need to pass an a table and want to make sure that the content of the table does not change.
However, in most Objective-C program samples, I never see const. My question is wh... |
For example, stackexchange.com, without asking the site owner or Google their information about developing the website, is this possible to know what language is used in the back end?
Seems, the website don't have .extension bar, for example .php that can indicated which is developed in PHP, but without the extension, ... |
As C# has progressed, many language features have been added. It has come to the point where it's becoming unreadable for me.
As an example, consider the following code snip from Caliburn.Micro code here:
container = CompositionHost.Initialize(
new AggregateCatalog(
... |
Sometime ago I read about SQL language drawbacks
(the basic language specification, not vendor specific),
and one of the drawbacks was that the language does not allow to create a set of tuples that don't come from a table.
For instance,
SELECT firstName, lastName from people;
this creates a set of tuples coming fro... |
GNU recommends making an AUTHORS file to list the authors and contributors of a program. But how many "levels" of authors and contributors should the file contain? E.g. if I write a program foo that actively use some library, should I include the authors of that library in the AUTHORS file? It seems that the answer is ... |
I rewrote some parts of Mercurial (which is licensed under GNU GPL v2) in C#. Naturally, I looked a lot into original Python code and some parts are direct translations from Python to C#.
Is is possible have "my code" licensed under different terms or to even make a part of a closed-source commercial application? If no... |
I've moved all our company Git repositories to GitHub and now I want to add employees to the projects. Since most employees already have personal GitHub accounts, I'm wondering whether I should ask them to create a work GitHub account. The reason that I'm thinking of doing this is to decrease the chances of unauthorize... |
I'm creating a parameter table in our database. This table will have 1 row with values that are environment specific (production, development, etc).
Is there any reason why I should define an index on this table?
Update
This table is a parameter table which will be used to drive our job queue system. The table will b... |
I'm developing a Java 6 EE application and I'm testing my jsp code with another one with a testing version of the function calls and code used in the original one but it seems loose and impractical. Is there a good way to accomplish this kind of testing?
|
While working for an employer if one modifies, rewrites, contributes or alters open source software in what cases can it ever be considered a trade secret?
A trade secret, FWIW, is defined by wikipedia as:
A trade secret is a formula, practice, process, design, instrument,
pattern, or compilation of information whi... |
I've always agreed with Mercurial's mantra 1, however, now that Mercurial comes bundled with the rebase extension and it is a popular practice in git, I'm wondering if it could really be regarded as a "bad practice", or at least bad enough to avoid using. In any case, I'm aware of rebasing being dangerous after pushing... |
I Recently had a discussion with a colleague of mine about the pros / cons of WCF. He mentioned about how much code is generated to support WCF, and also the overhead required. It was mentioned that a simple jQuery /Ajax post to a .aspx page (or a handler for that matter) that returns JSON would work more efficiently a... |
I have started to write card game applications.
Some model classes:
CardSuit, CardValue, Card
Deck, IDeckCreator, RegularDeckCreator, DoubleDeckCreator
Board
Hand
and some game classes:
Turn, TurnHandler
IPlayer, ComputerPlayer, HumanPlayer
IAttackStrategy, SimpleAttachStrategy, IDefenceStrategy, SimpleDefenceStrate... |
I am working on a website for which I hope to have an application for as well. Because of this, I am creating PHP API's which will go into my Database and serve specific data based on the method/function called.
I want to protect these API's from misuse however, and I plan on implementing Authentication Digest to do so... |
I have a computer that is recording 100 different data points into an OPC server.
I've written a simple OPC client that can read all of this data.
I have a front-end website on a different network that I would like to consume this data. I could easily set the OPC client to send the data to a SQL server and the website... |
This question is more a design oriented question than a code specific question. I am new to PHP and I am planning to use PDO as a data access layer. Say for instance I have a class called CITY. Now if I need to create an instance of this class, what is the best technique.
Should have a singleton DB access class which... |
Summary: Are there some well-established best-practice patterns that I can follow to keep my code readable in spite of using asynchronous code and callbacks?
I'm using a JavaScript library that does a lot of stuff asynchronously and heavily relies on callbacks. It seems that writing a simple "load A, load B, ..." met... |
I'm working on an Android Game based on Contract Bridge, as a part of my college Summer Internship project. The game will be multi-player such that 4 Android devices can play it, so there's no BOT or CPU player to be developed. At the time of getting project, I realized that most of the students had already worked on t... |
We're a group of 4 developers on a ajax/mysql/php web application. 2 of us end up focusing most of our efforts on testing the application, as it is time-consuming, instead of actually coding. When I say testing, I mean opening screens and testing links, making sure nothing is broken and the data is correct.
I understan... |
The official Java tutorial on generics explains type erasure and why it was added to the compiler:
When a generic type is instantiated, the compiler translates those types by a technique called type erasure — a process where the compiler removes all information related to type parameters and type arguments within a cl... |
I am tasked with setting up conditional profiling - a method of tagging chunks of XML with an attribute, which will then be used as a conditional value to extract subset of that XML.
Have a look at another definition/example: DITA profiling
The XML is documents that are equivalent to printed books - i.e. documents that... |
Behavior-Driven Development with its emblematic “Given-When-Then” scenarios syntax has lately been quite hyped for its possible uses as a boundary object for software functionality assessment.
I definitely agree that Gherkin, or whichever feature definition script you prefer, is a business-readable DSL, and already pro... |
I have never understood what system programming meant. The usual definition given is "...doing something close to the Os or extending Os features...".
Does using Windows API directly rather than some libraries to say do file i/o make it system programming? Was writing Android OS system programming? If I write somethin... |
In IP agreement IP is define as below
Intellectual Property (whether or not patentable and whether or not made during working
hours) is defined as but not limited to: all product specifications, developments, inventions, works of authorship, derivative works, technologies, programs, systems, software, mobile applica... |
It seems to me that many bigger C++ libraries end up creating their own string type. In the client code you either have to use the one from the library (QString, CString, fbstring etc., I'm sure anyone can name a few) or keep converting between the standard type and the one the library uses (which most of the time invo... |
If a project has no a license or has unknown authors, is it public domain?
|
I had a discussion with a testing manager about the role of unit and integration testing. She requested that developers report what they have unit and integration tested and how. My perspective is that unit and integration testing are part of the development process, not the testing process. Beyond semantics what I mea... |
I've come across this PHP tag <?= ?> recently and I am reluctant to use it, but it itches so hard that I wanted to have your take on it. I know it is bad practice to use short tags <? ?> and that we should use full tags <?php ?> instead, but what about this one : <?= ?>?
It would save some typing and it would be be... |
We are planning to add a "SMS verification account" option for our customers. (So we will only send SMS. We do not need a short code.)
We have found several companies who offer SMS gateways through REST APIs (we use PHP).
As we are totally new to the SMS world, we are wondering:
What are the key points to pay attention... |
I have been working on this project for more than a year now, and we are close to release, the project manager wants the product to be perfect and working in every single aspect.
I like that and I love working under the perfection idea, but it seems he is delaying the launch too much because of compatibility issues, he... |
I find it really hard to find resources about computer security. I asked questions on message boards about key loggers and viruses and I got negative assumption from people assuming the the worse. Also, I don't think that I can trust random message boards.
I know that it is a broad topic, but are there any good website... |
I don't fully understand reactive extensions, but my inital reading caused me think about the ETL code I have.
Right now its basically a workflow to to perform various operations in a certain sequence based on conditions it find as it progresses.
I can also imagine an event driven way such that only a small amount of i... |
We have a program written in C++ that is mostly procedural, but we do use some C++ containers from the standard library (vector, map, list, etc). We are constantly making changes to this code, so I wouldn't call it a stagnant piece of legacy code that we can just wrap up.
There are a lot of issues with this code maki... |
We performed a code review recently of mobile application Java code that was developed by an outside contractor and noticed that all of the domain objects / data transfer objects are written in this style:
public class Category {
public String name;
public int id;
public String description;
public int p... |
During an interview I was asked given the following: A real estate application that lists all houses that are currently on the market (i.e., for sale) within a given distance (say for example the user wants to find all houses within 20 miles), how would you design your application (both data structure and alogirithm) t... |
If immutable objects¹ are good, simple and offer benefits in concurrent programming why do programmers keep creating mutable objects²?
I have four years of experience in Java programming and as I see it, the first thing people do after creating a class is generate getters and setters in the IDE (thus making it mutable)... |
Recently I've learned that using a regex to parse the HTML of a website to get the data you need isn't the best course of action.
So my question is simple: What then, is the best / most efficient and a generally stable way to get this data?
I should note that:
There are no API's
There is no other source where I can ge... |
Could anyone give an overview of how list structures which are composed of a
head and a tail which references the rest of the list i.e linked list are represented in memory of the computer? Does the computer make use of cpu registers to hold the pointers the head and rest of the list?
|
I have this problem I think you may help me with.
P.S. I'm not sure how to call this, so if anyone finds a more appropriate title, please do edit.
Background
I'm making this application for searching bus transit lines.
Bus lines are a 3 digit number, and is unique and will never change.
The requirement is to be able t... |
Context
I've been using with a hierarchy of objects (an expression tree) a "pseudo" visitor pattern (pseudo, as in it does not use double dispatch) :
public interface MyInterface
{
void Accept(SomeClass operationClass);
}
public class MyImpl : MyInterface
{
public void Accept(SomeClass operationClass... |
What are "custom software companies"?
By "custom software companies" I mean companies that make their money primarily from building custom, one off, bits of software. Example are agencies or middle-ware companies, or contractors/consultants like Redify.
What's the opposite of "custom software companies"?
The opposite o... |
I work in a PHP development shop and several new developers have joined the team. One of the new members insists on declaring class properties at the bottom of the class declaration rather than the at the top, as one would normally expect.
In all my 5 years of working in web development, I have never seen this done. I... |
I'm evaluating some Agile-style methodologies for possible introduction to my team. With Scrum, is it allowable to have the same person perform multiple roles? We have a small team of four developers and a web designer; we don't really have a lead (I fulfill this role), QA testers or business analysts, and all of our... |
I've getting some information about this, but I still can find a proper answer, I was asked recently in my company for this : "run a fxcop analysis on that code and tell me the results".
Ok, I have VS2010 Ultimate which has code analysis, but before making any comment, I browse it on the internet cause I want to implem... |
Model-driven development seems to have a lot of buzz in certain software engineering circles, but I've never encountered an open source MDD projects "in the wild".
Are any open source projects using model-driven development? (I don't just mean that there's some UML documentation, but that the primary artifacts that th... |
I noticed that in the Vim automatically indents labels in a rather unintuitive way (IMHO).
int main(void) {
goto end;
end:
return 0
}
Are there any style guidelines for labels?
For the faint-hearted, the goto's I am using are for error handling in a controlled and structured manner.
|
I joined a dev team of six two month ago. People are nice, all is good. But more and more I observe an ad-hoc mindset. Stuff gets quick fixed, at the cost of future usability, there is little testing and two people happily admitted, that they like to carry the knowledge around in their head, rather than to write it dow... |
I was reading this question and thought that good points were made, but most of the solutions involved renaming one of the methods. I am refactoring some poorly written code and I've run into this situation:
public class Entity {
public Entity(String uniqueIdentifier, boolean isSerialNumber) {
if (isSerialNumber... |
Value types are types which do not have an identity. When one variable is modified, other instances are not.
Using Javascript syntax as an example, here is how a value type works.
var foo = { a: 42 };
var bar = foo;
bar.a = 0;
// foo.a is still 42
Reference types are types which do have an identity. When one variable ... |
Disclaimer: I didn't know exactly where to put this question. If you feel that this question is not suitable for Programmers @ StackExchange, feel free to migrate it.
Background: Broadening my last question, there is a request for tender for a software system that's open and I have decided to take it on. I am a softwar... |
I have a singleton that anchors together some different data structures. Part of what I expose through that singleton are some lists and other objects, which represent the necessary keys or columns in order to connect the linked data structures. I doubt that anyone would try to change these objects through a differen... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.