instruction stringlengths 34 19.9k |
|---|
I work for a large humanitarian organisation, on a project building software that could help save lives in emergencies by speeding up the distribution of food. Many NGOs desperately need our software and we are weeks behind schedule.
One thing that worries me in this project is what I think is an excessive focus on cod... |
In my recent adventures in Scala, I've found case classes to be a really nice alternative to enums when I need to include a bit of logic or several values with them. I often find myself writing structures that look like this, however:
object Foo{
case class Foo(name: String, value: Int, other: Double)
val BAR = Fo... |
It was recently let slip that the new EULA for Delphi XE3 will prohibit Client Server development with the Professional edition without the additional purchase of a Client Server license pack. This is not to say the Professional version will lack the features, but the license will specifically prohibit the developer fr... |
We follow many agile processes, including automated tests, continuous integration, sprint reviews, etc... We're currently having a debate about how often we should branch release builds.
We've been doing two-week sprints and trying to deploy to production at the end of each sprint. Some of us think we should be branchi... |
Possible Duplicate:
How would you know if you've written readable and easily maintainable code?
It is often said that readability is perhaps the most important quality-defining measure of a given piece of code for reasons concerning maintainability, ease of understanding and use.
What defines the word readable in co... |
Possible Duplicate:
How not to degenerate into only a programmer who stitches together APIs?
I have almost six years of experience in java. I have developed many projects which used frameworks like Struts, Spring, Hibernate, JQuery , DWR, Ajax etc.
I have used these technologies in almost all the projects I have wo... |
My company is currently at a rebranding process and the brand names have been used in the sources' package names but these names are only visible to developers who maintain this code so nobody from project management is really interested in changing them considering also that it would imply the recompiling of several o... |
I am extending the functionality of a custom unix shell which I wrote as part of my lab assignment. It currently supports all commands through execvp calls, in-built commands like pwd, cd, history, echo and export, and also redirection and pipes. Now I wanted to add support for running a command in background e.g. $ls ... |
I am a RoR developer and want to clarify some doubt about ruby variable assignment.
In ruby we have two ways for variable assignment.
str, arr, num = "Hi", [1, 2], 3
and
str = "Hi"
arr = [1, 2]
num = 3
I know that the first way will go slower than second way but, I want to know that as per ruby language, which way is... |
Several months ago I was approached by a small business, who had seen my work previously and asked me to create a website for them.
Since then, the website hasn't changed one bit and I haven't heard a word from them. This sucks for them as they paid for a website and haven't used it. It''s frustrating for me because I ... |
I am recently working on a project aiming at evaluating whether an android app crashes or not. The evaluation process is
1.Collect the logs(which record the execution process of an app).
2.Generate formulas to predict the result
(formulas is generated by GP)
3.Evaluate the logs by formulas
Now I can produ... |
My father is a doctor/physician. About 15 years ago he started writing an application to handle his patient's medical records in his clinic at home. The app has the ability to input patient's medical records (obviously), search patients by some criteria, manage medicine stocks, output receipt to printer, and some more ... |
I am extracting interfaces from some classes in .NET, and I am not completely sure about what level of detail of description to use for some of the interface members (properties, methods).
An example:
interface ISomeInterface
{
/// <summary>
/// Checks if the object is checked out.
/// </summary>
/// <... |
If any application is scanning the ports of other machines, to find out whether any particular service/application is running, will it be considered harmful? Is this treated as hacking?
How else can one find out on which port the desired application is running (without the user input)?
Let's say I only know the port r... |
I have to refactor a complex C# app (many dialogs, mixed logic and so on).
There is a part managing the communication with special hardware equipments (sending commands and receive data via asynchronous c# callbacks). The code is "spaghetti" with mixed UI/Logic/Communication/etc and my task is to split the layers in a... |
I am designing a new system that has one central web service and several site web services which are spread across the country and some overseas. It has some data that must be identical on all sites.
So my plan is to maintain that data in the central web service and then "sync" the data to sites. This includes inserts,... |
Rhodes claims to be able to build Native apps but I'm not sure or not if this means a native shell + embedded Web Browser like PhoneGap or does it create a true Native app like (I believe) Titanium does.
|
The term will be used as a method name. The method is called when a part of the user interface is hidden (or removed), and it is used to reset values to default and dispose objects that will not be used any more.
Possible names are: release, remove, dispose, clear etc.
Which do you think is the most appropriate?
|
Obviously, small usability fixes and bugfixes go directly into the stable product. What about small new features? Can you afford to just release them after internal testing, or do they have to be betatested by customers first?
Situation: This is a young commercial project, produced by a one-person company. It has an ex... |
In my current team there is a practice of putting Epics under User Stories and sometimes even User Stories or Epics under Tasks! When questioned, the usual reply is: "if it is not a good practice then the project management tool would not have allowed doing so!" (IBM Rational Team Concert, for one does not prevent such... |
In my current team, where we run multiple scrums, the Story points are usually based on the effort required to complete the User Story. For example if an User Story has 2 tasks, both needing 5 days each, they the Story is assigned 10 points. So 1 day of effort is considered to be one Story point.
Is this practice a goo... |
If I am asked in an interview to write down some code, should I completely stick with C++ or is it acceptable to "mix" the two to write easy code as it comes to my mind?
I'll explain it: if I'm asked to create a "stack" data type, a C++ class is perfectly suited, while if I need to parse some strings a strtok/sscanf is... |
I was thinking about the XML format and the following quote:
“XML is not a database. It was never meant to be a database. It is never going to be a database. Relational databases are proven technology with more than 20 years of implementation experience. They are solid, stable, useful products. They are not going away... |
So I'm really wanting to improve how I architect the software I code. I want to focus on maintainability and clean code. As you might guess, I've been reading a lot of resources on this topic and all it's doing is making it harder for me to settle on an architecture because I can never tell if my design is the one that... |
I'm writing an app that will have an Image entity, and I'm already having trouble deciding whose responsibility each task should be.
First I have the Image class. It has a path, width, and other attributes.
Then I created an ImageRepository class, for retrieving images with a single and tested method, eg: findAllImages... |
I am a student who recently joined a software development company as an intern. Back at the university, one of my professors used to say that we have to strive to achieve "Low coupling and high cohesion".
I understand the meaning of low coupling. It means to keep the code of separate components separately, so that a c... |
Usually there is an @author tag in API documentation (JavaDoc, PHPDoc etc). Is it acceptable to use this tag on every function you make in a commercial product?
|
This question may be considered subjective (I got a warning) and be closed, but I will risk it, as I need some good advice/experience on this.
I read the following at the 'About' page of Fog Creek Software, the company that Joel Spolsky founded and is CEO of:
Back in the year 2000, the founders of Fog Creek, Joel Spol... |
The situation: We are about to roll out what is essentially a logging service. As we are rather PHP heavy, the current implementation use it.
We will have about 200 computers (most on the same network) that will each send, via HTTP POST, around 5000 requests/day. With each request containing about 300 bytes of data.
Th... |
In Test Driven Development, how do I make code bound to an ORM testable?
I am using a Micro-ORM (PetaPoco) and I have several methods that interact with the database like:
AddCustomer
UpdateRecord
etc.
I want to know how to write a test for these methods. I searched YouTube for videos on writing a test for DAL, but I d... |
I know very little about Smalltalk but I noticed that there's a frequent mention of the "kernel". Dan Ingalls prime maintainer of several implementations of Smalltalk also worked on a Javascript environment called "Lively Kernel" and in Peter Siebel's book he kept mentionning the "kernel".
I cannot help but think that ... |
http://w3techs.com/technologies/details/cp-flash/all/all
People don't use Flash anymore? Why?
|
Theoretically, thread-safe code should fix race conditions. Race conditions, as I understand it, occur because two threads attempt to write to the same location at the same time.
However, what about a threading model in which a single thread is designed to write to a location, and several slave/worker threads simply re... |
I have a collection of classes that I commonly (but not always) use when developing WPF applications. The trouble I have is that if I want to use only a subset of the classes, I have three options:
Distribute the entire DLL. While this approach makes code maintenance easier, it does require distributing a large DLL ... |
We use a detailed step-by-step user-interface regression test for our commercial web application. It has a "backbone" test for the most used / most important parts of the system, with optional tests for specific areas of functionality. Using this plan has definitely helped us ensure high quality software.
But, having... |
In some code I'm reviewing, I'm seeing stuff that's the moral equivalent of the following:
public class Foo
{
private Bar bar;
public MethodA()
{
bar = new Bar();
bar.A();
bar = null;
}
public MethodB()
{
bar = new Bar();
bar.B();
bar = null;
... |
As the title says,
How important is Discrete Mathematics for a Computer Scientist?
Background: I'm pursuing a Master's degree with a focus on fundamentals such as Algorithms, Complexity and Computability Theory and Programming Languages to get a good foundation for working in the field of Parallel Computing.
Some mor... |
According to ISTQB (and few more sources + wiki ), a defect/bug is the actual cause of error in software, e.g. incorrect statement, logical or semantic error. The actual definion is: a flaw in the system or component that could lead to the failure.
But what about specification bugs? I cannot relate to it. Specification... |
I don't want to get too philosophical here (like did God create God?), but how did Apple create Xcode? Would it have been possible for them to use Xcode to create Xcode? Or would they have to use another code program (and what might that be?). In general, how does that work with code editors?
|
I know how constructor and setter injection works in spring.
Normally I use interfaces instead of classes to inject beans using setter and I consider it as interface injection, but in case of constructor we also use interfaces (I am confused). In following example I use JobProcessor interface instead of JobProcessorImp... |
With some googling, I could easily find some documents in compiler design in C, Java, and C# and even in Haskell, but not in Lisp except implementing Scheme/Lisp in Lisp.
Is Lisp not so popular in implementing other (not functional) programming languages?
Do you know of some good documentation about implementing a comp... |
Accidentally I've stumbled upon the following quote by Linus Torvalds:
"Bad programmers worry about the code. Good programmers worry about
data structures and their relationships."
I've thought about it for the last few days and I'm still confused (which is probably not a good sign), hence I wanted to discuss the f... |
I am working on a small product based company developing .Net applications. There is a small team with 5-6 developers. I am a person responsible for planning everything. But my primary role is Software developer.
Now our current project is very unstable because of poor organization. Today my boss called me and told to ... |
So, I work in a company that does embedded software development, other groups focus in the core development of different products' software and my department (which is in another geographical location) which is located at the factory has to deal with software development as well, but across all products, so that we can... |
When there are no arguments, we have these two options:
$obj = new MyClass;
vs.
$obj = new MyClass();
I always pick the former, just because.
Any thoughts?
|
I am currently designing an n-tier solution which is using Entity Framework 5 (.net 4) as its data access strategy, but am concerned about how to incorporate dependency injection to make it testable / flexible.
My current solution layout is as follows (my solution is called Alcatraz):
Alcatraz.WebUI: An asp.net webform... |
I'm a student of computer science trying to soak up as much information on the topic as I can during my free time. I keep returning to algorithms time and again in various formats (online course, book, web tutorial), but the concept fails to sustain my attention. I just don't understand: why are algorithms so special? ... |
While solving the problems on Techgig.com, I got struck with one of the problems. The problem is like this:
A company organizes two trips for their employees in a year. They want to know whether all the employees can be sent on the trip or not. The condition is that no employee can go on both the trips. Also to determ... |
I need to draw a sequence diagram and I am not sure exactly if it is correct to show interaction between user and user interface in this diagram. For example I want to make a panel visible or invisible based on choosing a check box by user. Is it correct to have it on a sequence diagram? and how can I draw it?
thanks
|
Having recently completed a BSC (computer science), I am working as software engineer. With one year of experience, what educational options are available to me? I want to move further in management.
Please provide suggestions. I am considering a MSC but I got negative reply from lots of people.
|
In a book I have, there is a following classification of defect:
Critical : A defect receives a “critical” severity level if one or more critical
system functionalities are impaired by a defect with is impaired and there
is no workaround.
High: A defect receives a “high” severity level if some fundamental system
funct... |
I'm wondering about the differences between inheritance and composition examined with concrete code relevant arguments.
In particular my example was:
Inheritance:
class Do:
def do(self):
self.doA()
self.doB()
def doA(self):
pass
def doB(self):
pass
class MyDo(Do):
def ... |
Right now I'm reading Code Complete by Steve McConnell and in chapter 9 he talks about the Pseudo Programming Process (PPP).
From what I've understood, the PPP is a way of programming in which the programmer first writes the pseudo code for the routine he's working on, then refines it up to the point where pretty much... |
I have the following class :
public class Project {
private int id;
private String name;
public Project(int id, String name, Date creationDate, int fps, List<String> frames) {
if(name == null ){
throw new NullPointerException("Name can't be null");
}
if(id == 0 ){
... |
I'm facing a challenge understanding how to program a web version of a card game that is completely stateless.
I create my object graph when the game begins and distribute cards to PlayerA and PlayerB so I lay them out on the screen. At this point I could assume that HTML and the querystring is what holds at least some... |
Pretty simple question with a complex answer.
Should a project start with the client or the server, and why?
Where should a single programmer start a client/server project?
What are the best practices and what are the reasons behind them? If you can't think of any, what reasons do you use to justify why you would choo... |
Possible Duplicate:
What is a “side effect?”
I don't understand the wikipedia article on Side Effects:
In computer science, a function or expression is said to have a side effect if, in addition to returning a value, it also 1.) Modifies some state or 2.) Has an observable interaction with calling functions or the ... |
I am currently working on a project, where I have to analyze the requirements of two given IT systems, that use cloud computing, for a Cloud API. In other words, I have to analyze what requirements these systems have for a Cloud API, such that they would be able to switch it, while being able to accomplish their curren... |
I've used various IoC containers (Castle.Windsor, Autofac, MEF, etc) for .Net in a number of projects. I have found they tend to be frequently abused and encourage a number of bad practices.
Are there any established practices for IoC container use, particularly when providing a platform/framework? My aim as a framewo... |
I've started using gitflow for a project, and I have an outstanding feature branch as well as a newly created hotfix. Per the gitflow workflow, the hotfix gets applied to both the master and develop branches, but nothing is said or done about extant feature branches.
Nevertheless, I'd like to incorporate the hotfix cha... |
I was trying to see the effect of time slicing, and how it can consume significant amount of time. Actually, I was trying to divide a certain task into a number of threads and see the effect.
I have a two core processor. So two threads can run in parallel. I was trying to see if I have a task w that is done by 2 thre... |
I'm curious about this because I recall before learning any functional languages, I thought them all horribly, awfully, terribly unreadable. Now that I know Haskell and f#, I find it takes a little longer to read less code, but that little code does far more than an equivalent amount would in an imperative language, so... |
I am new to test-driven development, but I'm loving it. There is, however, a main problem that prevents me from using it effectively.
I work for embedded medical applications, plain C, with safety issues.
Suppose you have module A that has a function A_function() that I want to test. This function call a function B_fun... |
I have been looking for some formal definitons but could not find any IEEE newer than 610, which is from 1990. Could you help me please?
|
Most of scripting languages (like Pythong, Perl, etc) generates the whole HTMLfile. However, PHP code can be embedded within html codes. PHP will process only code between <?php ?> tags and ignore other lines.
What other scripting languages are available with possibility to be embedded within HTML?
|
I'm looking for a good resource for learning about good API design for C++ libraries, looking at shared objects/dlls etc. There are many resources on writing nice APIs, nice classes, templates and so on at source level, but barely anything about putting things together in shared libs and executables. Books like Large-S... |
I've just started a programming job where I'm applying my 'How to code' knowledge to what I'm being taught of 'How to Program' (They are different!). As part of this, I've been taught how to capture requirements from clients before starting a new project. But...
How do I do this for a nebulous personal project?
I say n... |
Consider the following exam / interview question:
Implement the strcpy() function in C: void strcpy(char *destination, char *source);
The strcpy function copies the C string pointed by source into the array pointed by destination, including the terminating null character. Assume that the size of the array pointed by d... |
To continue the discussion in Why are pointers not recommended when coding with C++?
Suppose you have a class that encapsulates objects which need some initialisation to be valid - like a network socket.
// Blah manages some data and transmits it over a socket
class socket; // forward declaration, so nice weak linkage... |
I am building a small PHP mvc framework (yes, yet another one), mostly for learning purposes, and I am trying to do it the right way, so I'd like to use a DI container, but I am not asking which one to use but rather how to use one.
Without going into too much detail, the mvc is divided into modules which have control... |
I have numbers;
A == 0x20000000
B == 18
C == (B/10)
D == 0x20000004 == (A + C)
A and D are in hex, but I'm not sure what the assumed numeric bases of the others are (although I'd assume base 10 since they don't explicitly state a base.
It may or may not be relevant but I'm dealing with memory addresses, A and D are po... |
I have found a couple of related questions here on programmers.SE:
How/where would I best advertise my open source project, in order to maximize my odds of finding collaborators?
https://softwareengineering.stackexchange.com/questions/60830/where-to-find-open-source-volunteers
My question is slightly different because ... |
I found this cool comparison table for integration servers on Wikipedia, but I am a little uncertain how to rank the tools vs. my needs and interests. The chart itself seems to have a lot of boxes marked unknown, so if you are comfortable updating it on Wikipedia, that could be great too.
Are there a few top performin... |
In a talk about time management, a famous computer scientist said:
"One machine in your life is the right number."
He recommended a laptop with a docking station.
After trying this approach for about a month, I miss my more powerful desktop (i7 quad core hyperthread), but it is not in my technology road map (or bu... |
PDF or Portable Document Format is a popular file type that is often used for online documents. It's great for distributing downloadable written content, and is frequently used by governments and businesses alike. Because it's a format that's familiar to all, many applications allow the user to convert other document t... |
I want to choose a version control system for my company. So far I know I have Git, Subversion and Mercurial.
These days I see that Git is the most used, so I'm left wondering: would there be any specific reason to still use Subversion, or should I go directly to Git?
|
The more functional programming I do, the more I feel like it adds an extra layer of abstraction that seems like how an onion's layer is- all encompassing of the previous layers.
I don't know if this is true so going off the OOP principles I've worked with for years, can anyone explain how functional does or doesn't ac... |
Like the title says; is it a bad practice to quit a company after a few years, only to begin as a consultant for the same 'customer'?
I've been lucky enough to come in to a company in the oil business from the beginning, developing software for relatively new and unused technology. Long before I even got this job, I'v... |
I'm busy coding a reusable e-mail service for my company. The e-mail service will be doing quite a few things via injection through the strategy pattern (such as handling e-mail send rate throttling, switching between Smtp and AmazonSES or Google AppEngine for e-mail clients when daily quotas are exceeded, send statist... |
I am developing an internal system for a company with PHP using Zend framework. I need one of its functions to execute on a time specified by user.
My research on this matter found me several ways of doing this using CPanel Cron jobs and setting up scheduled tasks on the server. But in this scenario, I don't have a CPa... |
I've seen 2 different approaches with MVC on the web.
One, like in ExtJS, is to bind the callbacks to the view via the controller. Finding every element on the view and adding the functionallity.
The other, like in angular.js and in the lift framework, is to bind in the views and just write the functionallity in the c... |
Possible Duplicate:
Techniques to re-factor garbage and maintain sanity?
I've inherited 200K lines of spaghetti code — what now?
I'm currently working at a company with 2 other PHP developers aside from me, and 1 junior developer.
The senior developer who originally built the system we're all working on has resign... |
I have some experience in developing with Java, Javascript and PHP.
I am reading Microsoft Visual C# 2010 Step by Step which I feel it is a very good book on introducing you to the C# language.
I seem to be having problems in understanding the static keyword. From what I understand this far if a class is declared stati... |
So now I have come to the conclusion like many others that having some way of constantly testing your code is good practice since it enables fewer people to be involved (colleges and customers alike) by simply knowing what's wrong before someone else finds out the hard way.
I've heard and read some about Unit Testing a... |
We've all probably met someone like this, that developer who just knows that his language is the one true language and won't shut up about it. How do you deal like someone like this? I don't want to offend anyone (especially since the fanboy in my workplace is the senior developer). But I want to be able to use my own ... |
I wonder why java.util.ArrayList allows to add null. Is there any case where I would want to add null to an ArrayList?
I am asking this question because in a project we had a bug where some code was adding null to the ArrayList and it was hard to spot where the bug was. Obviously a NullPointerException was thrown but ... |
Please note: I don't want coding help here, I'm on Programmers for a reason. I want to improve my program planning/writing skills not (just) my understanding of Java.
I'm trying to figure out how to make a tree which has an arbitrary category system, based on the skills listed for this LARP game here. My previous attem... |
Sorry this is not a programming questions. My company is looking to do some work on ofbiz. I read the license of apache and I am not sure if its legal to change the logo to our company logo.
http://www.apache.org/foundation/license-faq.html#WhatDoesItMEAN
|
I have a few questions about localhost and port numbers as this is an area where I do not have a lot of knowledge, and because I recently had to work with setting up Visual Studio projects and IIS and there are things I'm not clear on.
I have the following questions on the things I find confusing. I thought it made mor... |
I am not yet accustomed with the way Git works (And wonder if someone besides Linus is ;)).
If you use Heroku to host you application, you need to have your code checked in a Git repo. If you work on an open-source project, you are more likely going to share this repo on Github or other Git hosts.
Some things should no... |
Assuming that:
Your team is using centralized version control.
You are working on a larger feature which will take several days to complete, and you won't be able to commit before that because it would break the build.
Your team members commit something every day that might change some of files you're working on.
Sin... |
I have been browsing through some webpages related to testing and found one dealing with the metrics of testing. It says:
The severity level of a defect indicates the potential business impact
for the end user (business impact = effect on the end user x frequency
of occurrence).
I do not think think this is corre... |
I'm new to Python and come from the write-everything-yourself world of PHP (at least this is how I always approached it).
I'm using Flask, WTForms, Jinja2, and I've just discovered Flask-Login which I want to use. My question is about the reliability of using thirdparty libraries for core functionality in a project tha... |
Just going over my school notes, my teacher identifies multi-tasking OS, and time-sharing OS as two different things.
I really don't see a difference between the two.
MULTI-TASKING: You load a number of programs in the memory and execute them. You execute another program if the time quantum allocated to the current pro... |
I am trying find the number of unique elements in a vector compared against multiple vectors using C++. The vectors are in sorted order and it can be of size 2,000,000.
Suppose I have,
v1: 5, 8, 13, 16, 20
v2: 2, 4, 6, 8
v3: 20
v4: 1, 2, 3, 4, 5, 6, 7
v5: 1, 3, 5, 7, 11, 13, 15
The number of unique elements in v1 is 1... |
How can a non-technical person learn to write specs for small projects?
A friend of mine is trying to outsource some development on a statistics project.
In particular, he does a lot of work in excel, and wants to outsource the creation of scripts to do what he now does by hand.
However, my friend is extremely non-tech... |
I was tasked to document our stored procedures.
Target audience: Technical
Purpose: To have a good documentation in preparation for
migration.
I'm assuming someone has already done it.
|
I'm looking into potentially releasing some infrastructure code (related to automated builds and deployments) as OSS and I'm curious about how the various OSS licenses effect it.
Specifically, LGPL prevents the code itself (part/whole) being modified into a commercial product (which is what I'm after), but allows it to... |
In an interview someone asked me : How do we manage 2 transactional/dao methods in a single transaction. Desired capabilities:
If anyone of them fails we need to rollback both methods.
Both of the methods can be called separately attached with a single transaction.
The management should be on DAO layer, not on service... |
I am going to design a MVC pattern. It could be either designed as a delegate pattern, or a Key-Value-Observing(KVO), to notify the controller about changing models. The project requires certain quality control procedures to conform to those verification documents.
My questions:
Does delegate pattern fit better for u... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.