instruction stringlengths 34 36.1k |
|---|
Software developers don't typically use date as version number, though YYYYMMDD format (or its variances) looks solid enough to use. Is there anything wrong with that scheme? Or does it apply to limited 'types' of software only (like in-house productions)?
|
I've got a few files which are used in several of my repos:
functions.sh, shell library to for example print a colored warning/error message or the documentation of a script file.
Makefile; a standardized one which installs the file $(CURDIR)/[dirname].sh to $(PREFIX)/[dirname] and references a test script.
LICENSE.
t... |
Which approach makes most sense to use, the destructive one or the non-destructive one? Does anyone have real-world experience with one, both or even a different approach?
Model
A permission scheme has a set of permissions linked to it. It can also have a parent from which it inherits permissions.
Destructive
Taking aw... |
In Compilers: Principles, Techniques, & Tools, Aho et al describe an approach for optimizing for parallelism (chapter 11 in the second edition). Is anyone aware of any existing compilers which follow that approach?
|
I'm working on an API whereby a specific call would replace a subtree of an XML document—rooted at some element—with another subtree.
The two options I'm considering for a response to this call are:
Return the DOM
Return the modified subtree
In the interests of developing a standardized, stable API, I'd like to get t... |
I am planning an application that includes a membership card functionality, where the user can place an order, either in the application or by phoning the vendor. Once the order is placed, especially in the case of a phone in order, what would be the best approach to having the vendor side communicate relevant details... |
I have a desktop application that sends a POST request to my website every 5 minutes. This post request can contain a variable amount of data about the PC sending the request, but typically it contains about 20-30 variables of information.
I'm storing all of this information in a MySQL table in a format like, RequestID... |
So today I had a talk with my teammate about unit testing. The whole thing started when he asked me "hey, where are the tests for that class, I see only one?". The whole class was a manager (or a service if you prefer to call it like that) and almost all the methods were simply delegating stuff to a DAO so it was simil... |
We just deployed a large software that affects the way the user work-day looks like in many aspects. It changes a lot of things in the way they interact between eachothers.
The developers of the team are taking rounds and spending one day at the customer's site to understand better what is a typical day for our user,... |
This is how my team has it's development environment set up:
Each team member has a local development environment on their own computer, where they check out the code from a shared repository.
Every developer work in their local development environment, once they finished writing the code they commit back.
The code is... |
When I'm coding in Python and I want to try something out, I open IDLE of Python on the command line and am able to quickly try something out. Is there a similar way I could do that for Java?
I have heard about Java "shells" (e.g. http://www.beanshell.org/). Has anyone tried them?
|
When I look up "stack machine" I often get stuff like the JVM that uses a stack for data, but it still uses an array to store its instructions.
I would like to find out more about machines whose programs are stacks. For example, executing the command at the top of the stack by default removes the element at the top of ... |
I completed the Machine Learning course (Stanford) and got very interested, also after some research, I decided that I'd like to learn nature-inspired algorithms.
I've found some resources like:
Clever Algorithms: Nature-Inspired Programming Recipes (Book)
Wyss institute (Website)
Programming Game AI by Example (Book... |
In Douglas Crockford's "JavaScript: The Good Parts", he walks through three types of inheritance: classical, prototypal, and functional. In the part on functional inheritance he writes:
"The functional pattern also gives us a way to deal with super methods."
He then goes on to implement a method named "superior" on a... |
I have a server component which runs over Zeroc-ICE. When I wanted to load test it, I thought that using parallel library to create multiple requests would do it. But it dint end up that way. Using Parallel(Parallel.For) library from C# apparently was easier but it doesn't seem to be exactly generating everything paral... |
I have written a lot of software in many different languages, and I've also "written" hardware for use with FPGAs using Verilog and VHDL.
I tend to enjoy writing hardware more than software, and I think one of the primary reasons is that it is possible to write hardware that is "done" and never needs to be modified: y... |
I have a web crawler, and I'm looking for hints that will help me automatically detect a website country of origin.
And by country of origin I generally mean the country the website is targeting. For example:
http://www.spiegel.de/ -> Germany
http://www.lemonde.fr/ -> France
http://publico.pt/ -> Portugal
http://www.e... |
It seems reasonable to me that if a serious bug is found in production by end-users, a failing unit test should be added to cover that bug, thus intentionally breaking the build until the bug is fixed. My rationale for this is that the build should have been failing all along, but wasn't due to inadequate automated tes... |
I have read many articles on the creation of dynamic types and classes at run time. For example, the TypeBuilder class in C# lets one create dynamic types. Python has this type function by which one can create dynamic classes. I have certainly good information on how I should create a class at run time, but I don't fin... |
I'm currently going to write something to automatically create invoices with cronjobs by using PHP and timestamps.
I have a, for me, well-considered idea of how to solve it, but I want to ask the community if someone may see errors in reasoning and possible problems with my solution.
I'm trying to describe my idea as d... |
What were the design decisions that argued in favour of void not being constructable and not being allowed as a generic type? After all it is just a special empty struct and would have avoided the total PITA of having distinct Func and Action delegates.
(C++ allows explicit void returns and allows void as a template pa... |
We're going to do some peer reviews for our iOS projects. We're kind of inexperienced at reviewing each other's codes. The iOS developers attending the reviews will be from other projects, since generally one person handles one client project in the company.
I know there are some questions on SO about the things you're... |
I'm in the process of choosing new unit testing tools for soon to be started project. There are plenty of them!
The basic requirements I have would be that it can run tests on at least Windows and Linux, it is C++/C++03 compatible, it can execute tests in parallel (e.g., to take advantage of multi-core processors), and... |
Possible Duplicate:
When do you rebuild an application or keep on fixing the existing one
I am currently working on a project that has been in development for the last few years used throughout the organization but the way the project has been coded the maintainability of it is completely shot.
Reading the code pres... |
I'm about to write a simple script to test a dataset for certain conditions. I was designing it as a set of functions each one describing the condition to be tested and pass them to the test engine:
# The tester engine:
all(f(dataset) for f in conditions)
I realized that my approach was similar to unit testing. So, to... |
I am trying to classify a set of images into grayscale or color groups. I have been using ImageMagic to do that, comparing the color image to a grayscale version of itself and then using the Peak Error to determine if it is a grayscale image, as shown here:
http://www.imagemagick.org/Usage/compare/#type_general
This is... |
According to the relevant Django documentation, a request context offers more than a normal context in that it merges request data into the context.
It is hence necessary for views that perform form submission in Django.
However, I am wondering why one cannot just always pass a request context for every view. After all... |
We all know that the process of creating a design and the whole architecture of the software is very important before writing the code. But how deep should be dive into the design stuff - should we start from the general architecture and go down til the names of the classes or should be just designate common parts and ... |
Many CMS systems which rely on third parties for much of their code often build "plugin" or "hooks" systems to make it easy for developers to modify the codebase's actions without editing the core files.
This usually means an Observer or Event design pattern.
However, when you look at systems like wordpress you see th... |
We've just moved to SVN from CVS. We have a small team and everyone checks in code on the trunk and we have never ever used branches for development.
We each have directories on a remote dev server with the codebase checked out. Each developer works on their own sandbox with an associated URL to pull up the app in a b... |
I am employed full time for company X and approached by company Y to do consulting services to write embedded C for them. While I know the basics of conflicts of interests and the big no-no's of sharing proprietary information, company knowledge and proprietary algorithms, I do have some questions regarding basic gener... |
I'm trying to think about how I would go about doing calculations on extremely large numbers (to infinitum - intergers no floats) if the language construct is incapable of handling numbers larger than a certain value.
I am sure I am not the first nor the last to ask this question but the search terms I am using aren't... |
What is the best way to query data from a MS SQL Server in C#?
I know that it is not good practice to have an SQL query in the code.
Is the best way to create a stored procedure and call it from C# with parameters?
using (var conn = new SqlConnection(connStr))
using (var command = new SqlCommand("StoredProc", conn) { C... |
There is a chapter in "Making Software: What really works and why we believe it" By Andy Oram and Greg Wilson about software defects, and what metrics can be used to predict them.
To summarize (from what I can remember), they explained that they used a C codebase that was open source and had a published defect trackin... |
Developing big applications requires huge effort. There may be teams for each phase of development and they must use different design patterns and go through the whole SDLC.
I have two years of experience as a software developer on small applications and I'm interested on what are the common approaches & practices for... |
In most other languages the condition comes before the statement to be executed when the condition is met. However, in CoffeeScript (and maybe some other languages) the syntax is:
number = -42 if opposite
Is there any online documentation of what the logic behind this design decision for this syntax was?
|
Let's take the following (JavaScript) code that returns a function that closes over variables x and y to illustrate:
function test() {
var x = Math.random();
var y = Math.random();
var f = function() {
console.log(x, y);
};
return f;
}
test()();
The code is nonsensical, I just want to close over x and... |
Starting with a new dev team on a new project and we have to define our Branching strategy for our source repository (e.g. Microsoft Team Foundation Server 2010). We've run into a sticky discussion over whether or not to...
A. Have one Release branch from which we do production builds and then Label when something is ... |
Ever since I've started lurking on stackoverflow, I keep coming across programming concepts such as abstract classes, virtual functions, contracts, interfaces, etc., from a questions about other languages such as C++, Java, and C#.
As far as I can tell, most of these things are related to object oriented programming ... |
I have a question concerning derivative works of GPL'ed software. Imagine the following situation: A company writes a software (A) using a library (B) which is released under the terms of the GPL. Now of course, software (A) has to be released under a compatible license to the GPL. But what about dual-licensing? If sof... |
Is there a programming language in which you can set your own syntax configurations and it would convert the code to a language you choose?
For instance, you would choose specific configurations like "Python's indexed blocks", [a,b,c] initializes arrays, ^ for exponentiation and others. A script would convert it to you... |
A few months ago I discovered a cool course called Rails for Zombies. This is a great site that allows us to write code and see the results. It takes us through the paces to get us up to speed with Rails. You have to pass each level (including code challenges) before being taken to the next level, and it gets you groun... |
I am part of a Java development team with a 6 week deadline. This necessitates writing a good deal of code very very quickly. However our development team has different styles of coding. Everything from name conventions to methods of abstraction differ among our team. Does anyone know of any documents that dictate "sta... |
I can't say I am a good programmer but I've been earning money for programming last decades. I've thought I was born for programming and people said I was very good at it - at some point.
But after 10 years of programming, I feel my programming efficiency is not as good as others. Of course, CS education is way better ... |
I am interviewing candidates for Java programmer positions.
My colleague insists in filling more than half of the interview with java coding puzzles.His view is that, if candidates are able to navigate through the loops, then they must be good.
One such example of coding puzzle is
i=0;
for( i=1 ; i< 10 ... |
What would be the most cross browser friendly (IE9, Chrome, FF, Safari, Opera) way to code an animated, interactive double-helix?
HTML 5/JavaScript is fine. Flash or Java is not.
I am unsure if canvas or svg or pure css should be considered as graphics aren't typically my thing. In fact, I really don't know where to ... |
First off, I am new to licenses and app stores.
There is an example app on a framework that has a Class file with much of the functionality I'll need for my own app. It's less than 1000 lines of code and distributed under the Apache License 2.0.
As far as I know I can use/modify the code and just acknowledge the devel... |
I am considering basing some new software on a LGPL web application. I want to utilize this new software for creating one website for my employer, and we do not intend to sell or distribute the software itself to anybody. Does publishing web pages from LGPL software constitute "distributing" in the license, so I would ... |
Recently I posted one of my the projects1 on GitHub and as I was exploring capabilities of the site, I noticed they have a rather decent issue tracking section.
I want to use that section as a) other people can report bugs if they'd like and b) other people can see which bugs I'm aware of. However, as others have noted... |
I have been working on my hobby project in C++ for more than 2 years. Whenever I write a module/function, I code it with lot of thinking. Now see the problem,
do {
--> write the code in module 'X' and test it
--> ... forget for sometime ...
--> revisit the same piece of code (due to some requirement)
--> feel t... |
There are several products for tracking the usage of your application. I know at least 10 offers. They tell you which features were used more often than others. Thus, you can identify features that may not make into new versions.
While with Google Analytics, or similar tools, this a standard tool for the web at the "pa... |
I'm trying to figure out an exercise but it doesn't really makes to much sense.. I'm not asking someone to provide the solution. just to try and analyse what needs to be done in order to solve this. I'm trying to understand which PSP 1.0 1.1 process I should use. PROBE? Or something else? I would greatly appreciate som... |
I hope this is the right place. This is a homework assignment for my Operating Systems course and I have to implement a working virtual memory system in C++ so programming is directly involved.
I've read some sources about Paging and Virtual Memory now (Tanenbaum, What Every Programmer Should Know About Memory, etc) a... |
Possible Duplicate:
Difference between Dependency Injection (DI) & Inversion of Control (IOC)
I'm new to Inversion of Control, Dependency Injection and everything related to these stuff, so excuse me if I'm not specific in my question: Is there any magical piece of code, a good explanation or a link, so I can finall... |
I am implementing a grammar in CUP, and it would often be helpful to see everything at a glance. This could also be useful in finding errors quickly.
Are there any programs out there that will visualize grammar in the CUP syntax? Or can you think of a very easy way of doing it (for instance, convert the grammar to anot... |
Possible Duplicate:
When to use abstract classes instead of interfaces and extension methods in C#?
What other reasons are there to write interfaces rather than abstract classes?
This question sounded a bit trivial to me as well, till I gave a it serious thought myself.
What is the point of a Java interface? Is it r... |
I have a website developed in ASP.NET MVC.
Now, I am looking forward to getting up a mobile interface for it. My knowledge in this regard isn't that great, so I will explain what is needed to be done. It's much like on the lines of StackOverflow or Programmers and following are the few points that need to be addressed... |
I work in a company that sells SaaS web applications for HR and financial issues. Our customers are key accounts to which we guarantee the privacy of their data, for obvious reasons.
We need to make usage statistics of our applications by its customers (which links are clicked the most? Which browsers are used the most... |
Language Choices of Large Corporations
Having spent almost 12 years working in the financial sector, at both large and small companies, my overriding impression, with the exception of Goldman Sachs, is that fragmentation (or, putting a more positive spin on things, diversity) is the name of the game.
Within a single c... |
We've a call stack in our project. The program is written for microcontroller, the language is C. The call stack is basically an array of integers. The variable that represents this call stack ends with the string _stack.
I was reviewing the implementation. The feature is reset recovery, not the call stack, but the cal... |
Over the course of my career, I've noticed that some developers don't use debugging tools, but do spot checking on erroneous code to figure out what the problem is.
While many times being able to quickly find errors in code without a debugger is a good skill to have, it seems it's less productive to spend a lot of tim... |
Possible Duplicate:
How do you normally layout a class's regions?
It often happens that I'm stuck in front of my code editor searching the best place to put a new function.
I've no norm nor rules to do that. My question is simple : does some exists, if not how would order your function to structure your files or cla... |
I'm trying to figure out what all is happening in the LinkedIN links URL. A link from LinkedIN community opens with a window shade (?) containing the LinkedIN site tools much like the alerts here at SE. The target link is embedded in a LinkedIN url as a GET variable.
This is a LinkedIN link in three parts (the middle ... |
The classical way to program is with try ... catch. When is it appropriate to use try without catch?
In Python the following appears legal and can make sense:
try:
#do work
finally:
#do something unconditional
However, the code didn't catch anything. Similarly one could think in Java it would be as follows:
try {... |
When programming Python I sometimes do a ** to make a conversion. I understand what it does but what data structures am I manipulating? A dict and what is the other? An array? Is there a name for the ** operator?
|
Suppose I have an XML config file like the following:
<myapp>
<settings/>
<output>
<mailto>mail service configuration parameters</mailto>
OR
<smsto>sms service configuration parameters</smsto>
<output>
While the settings node will have alway... |
Possible Duplicate:
Can we use Java for commercial use?
I am a college student learning how to program in Java. I really like Java's simiplicity and portability and I would like to one day develop a commercial application in Java. What I am trying to understand is Java's GNU license.
With the recent litigation betwe... |
I am about to build some WCF Services. Those services need to communicate to each others too, in some scenarios.
I've done some "Google-ing" about Service Registry but can't figure out how to implement service registry with WCF; is there any other alternate?
Is there any Microsoft technology available for Service Regi... |
In my quest to better my development skills I learn new design patterns. In sample projects or personal projects it's really easy to adapt new patterns into my code.
However at work I have a large code base that I am responsible for architecting and maintaining. This question is focused on writing consistent and maint... |
We are working on a moderately-sized C++ code base (10Mloc) which through our optimization efforts is becoming uniformly slow.
This code base is a set of libraries which we combine to put them to work. When the general framework of how these libraries communicate was developed there was some emphasis on performance and... |
I know that *args and **kwargs are ways to feed more arguments into a function in Python.
I am wondering where these terms stem from. Why have all the asterisks in the beginning? What does the kw in kwargs stand for?
|
I am implementing a UI application using the MVVM design-pattern.
The thing is, sometimes when you detect that something is wrong with data that was inputted by the user, you'd like to notify him somehow.
The solution I used so far was to have a "messaging framework" which allows me to basically show messages in a List... |
I am designing a new system and I want to know what inversion of control (IOC) is, and more importantly, when to use it.
Does it have to be implemented with interfaces or can be done with classes?
|
I've been seeing a lot of references of Dependency Injection (DI) & Inversion Of Control (IOC), but I don't really know if there is a difference between them or not.
I would like to start using one or both of them, but I'm a little confused as to how they are different.
|
Let's take the Facebook application as an example. Why did they develop an application when the users could just access to their page and do the same? For me that represents more maintenance and more cost because for each feature added to the web application that feature will have to be added to the smartphone applicat... |
I work in a large company and most coding projects are fairly structured with a project plan and review process.
However, for existing support there are occasional periods where a department will need lots of tiny changes made to an existing app or site such the accounting department at the end of a fiscal year.
The pr... |
I, a Java imperative programmer, would like to understand how to generate a simple version of Space Invaders based on Functional Programming design principles (in particular Referential Transparency). However, each time I try to think of a design, I get lost in the morass of extreme mutability, the same mutability whic... |
I recently ran across code where the developers used both fully qualified class names AND imported class names in their source code.
Example:
import packageA.Foo;
public class Example {
public packageB.Bar doSomething() {
final Foo foo = new Foo();
...
}
}
I was under the impression that the ... |
I am currently using RDLC reports. But when interviewing for .NET jobs, they frequently ask "Have you worked with Crystal Reports?".
Why do they like Crystal Reports when Visual Studio already has RDLC reports integrated?
|
I am creating a web app. I was testing it on a mobile browser and noticed that :active pseudo class doesn't really work. How should I simulate clicks for a mobile browser? I'm specifically interested for Android and iPhone.
I am using css sprites. I stumbled upon ontouchstart but don't know how to use that. Can anyone ... |
We are faced implementing a registration workflow with many branches. There are three main flows which in some conditions lead to one another. Each flow has at least four different steps; some steps interact with the server, and every step adds more information to the state. Also the requirement is to have it persisten... |
I'm in a situation where there's a big project that I need a lot of background know-how to accomplish. yet I'm not moving fast enough in the research/study phase - and seeing myself off-track frequently. What it amounts to is procrastination, except it's mixed with simply being overwhelmed and delaying the necessary ba... |
I want to learn more about event driven programming. Especially where and why I would consider using events. What resources/books should I consider reading to this end? (note: I'm indifferent to language. )
|
I have read the concepts and practiced some examples on OOAD and Design Patterns. But when I was asked to implement the singleton pattern in a little bit different manner, I was unable to do it and failed to reach my goal. I think I need some more in-depth understanding of the basics and some real experience with the c... |
I come from a PHP background and I have been considering looking at DART in more detail.
DART is an, open source, front-end/back-end, language for web development.
PHP has a special $ (dollar) character to indicate variables:
$variable
CONSTANT
'string'
"etc"
I find that dollar sign to be really useful for speeding u... |
When it comes to financial topics, I'm admittedly not well versed. I'm trying to lead my organization in our software development effort using a Scrum based development life-cycle. I am often discouraged when trying to coach executive leadership due to their belief that Scrum and Agile don't play well with their fina... |
Depending on the project I'm working on, I may be required to attend more meetings with both internal stakeholders or technical management in client companies.
During the course of these meetings, there will inevitably be a few questions crop up that either:
You do not have an answer to.
You have not thought about fo... |
Is there a checklist the developer must go over before passing their work to testers?
Also, what are the conditions/cases the developer must pay attention to ?
|
I find it frustrating how the speed of development that dynamic languages should offer gets significantly compromised by the lack of completions and other assets that IDEs would give you in their static counterparts.
It's not just about typing less - it's the productivity boost and plain fun you get by browsing APIs wi... |
There are now a a variety of programming methodologies: Scrum, Extreme Programming, Kanban to just name a few. Most of them combine several more basic techniques (for example frequent iterations). However, nearly all of them state that their combination of technics is the only way to write good software.
I don't think... |
I am starting to learn Java with the Java Trails tutorials offered by Oracle. I am in the section where it talks about passing arguments to methods The Java™ Tutorials: Passing Information to a Method or a Constructor.
It says that primitive types are passed by value, which makes sense to me. Right after that it says:
... |
I'm working on a webservice and I'm returning JSON. However, I'm returning a List<KeyValuePair<string, int>>, since that's all I'm really ever going to be dealing with (property => value)
Now sometimes I myself will be calling these functions to aggregate the results, so I end up with something like
List<KeyValuePair<s... |
I'm an IT student and have been working on team based projects for several years. I've read some papers about CMMI and Scrum; this is really interesting to me and I would like to know what kind of jobs involve improving processes inside an organization.
What kind of studies can lead someone towards these jobs? Manageme... |
I'm dealing with a situation here on a high volume multi-tenant web app with over 100k users from companies who do not appreciate performance issues. We have a need for "real-time" updates.. we're basically sending out a request to a 3rd party system, and we'd like to see the results real-time, there's about 5 statuses... |
First of all I would like to make it clear that this is not a language-X-versus-language-Y question to determine which is better.
I have been using Java for a long time and I intend to keep using it. Parallel to this, I am currently learning Scala with great interest: apart from minor things that take some getting used... |
There are many "flavors" of the .NET Framework:
Full ("normal")
Client profile subset
Silverlight in web browsers
"Silverlight" on Windows Phone
Compact framework
WinRT
When C# code is needed on a new platform, it would seem that Microsot prefer to take the full CLR and strip it down to a small subset, creating new a... |
I am trying to figure out how difficult/time consuming it would be to add the following feature:
We have a database with our subscribers and we want to send updates to paying subscribers. The catch is that we want these updates to be date dependent. Let me clarify.
Joe signed up in June last year. He has been receiving... |
It's common to use '-able' as a suffix for interfaces e.g.
Serializable
Printable
Enumerable
Drinkable
Shootable
Rotatable
I was thinking that 'Can-' might better because it may be more descriptive. Yes, it is more wordy and it adds noise to the interface name. In particular, passive verbs can be used.
E.g. 1 does Sho... |
I've been asked to do a small side-project to supply a simple application to one of our customers. Normally I would be working on back-end code where I have all of my testing needs figured out, and I've not yet had the dubious pleasure of writing tests for the GUI, so it's a little unclear to me how I should set up the... |
For data bound controls (Repeater, ListView, GridView, etc.), what's the preferred way of binding data?
I've seen it where people use Eval() directly on the aspx/ascx inside the data bound control to pull the data field, but to me, it just seems so...inelegant. It seems particularly inelegant when the data needs to be ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.