instruction
stringlengths
34
19.9k
Actually, I'm helping a small software shop on their Scrum Implementation. Recently the Scrum Master reported me that he has a problem because the Team is working Over Time to achieve the Scope (Committed Backlog). So they have an Unreal Velocity. My formal question(s) is / are: Apart from speaking about on the Retros...
I'm doing my first group project in a class where most quarters 40% of the students have failed. I believe the reason for this is the poor quality of teaching in the class. For example, the instructor did not know that scriplets in JSP was bad practice. (I learned JSP this week and I know that.) He didn't know that Swi...
I have a matrix. I have a list of people who have to occupy n1,n2,n3 etc cells, different number of cells in different rows. I have to place the people in the cells. Occupying the same cell across rows is considered overlap. Overlap has to be minimized. I have people referring to this variously as an optimization p...
Our company has started development of own systems "in-house". We already got couple of developers, who will be responsible for writing code in Ruby/RoR. We are currently discussing infrastructure, and I would like to ask: should we develop everything on local machines, then put it to test server and later to productio...
I wrote a standalone singleton class (scaffold) tonight that serves as a facade to a few other classes, including a template class and a view class. Templates and views are both named and instances of each are stored in the scaffold object. Templates can contain views and views can contain other views. A template a...
We are building a business application (a laboratory management system to be more precise) mostly for internal company use only. To make it easier for users to find items which they work on we are implementing a list of most used items. We had a little debate on which method would be better to implement: display the mo...
A Java App Store sounds like a cool idea right? Well, I turned to Google and found some remnants of an app store that Oracle had been developing. It looks like it has since been discontinued, but I haven't been able to find much commentary on why it was abandoned. So why was it discontinued? Links to other references,...
I successfully installed Jenkins and then Sonar to go with continuous integration. The firsts reports are not that good in term of rules violations ,comments, code duplication ... I set Jenkins to get java classes, run tests with cobertura and then launch SONAR once every night during week days. I then asked the develo...
The STUN and TURN specifications allow for client authentication using usernames and passwords, and call this authentication via long-term credentials. In fact, TURN requires that clients authenticate by this means. However, I would assume that almost all deployments run their STUN or TURN servers separately from their...
In a EF 4.1 Code First tutorial the following code is given: public class Department { public int DepartmentId { get; set; } [Required] public string Name { get; set; } public virtual ICollection<Collaborator> Collaborators { get; set; } } Then it is explained that the fluent interface is more flexible...
I'm a web development intern working on a small PHP application (just a few pages with a little database access) which has fast become a couple of very non-DRY, non-OO, individual scripts. A framework seems like overkill (maybe not?) but I was wondering what some best practices for code / folder structure and general s...
Suppose my code uses (simply links to) a library licensed under the GPL. Can I release my code under CC0 (public domain dedication)? Is my code affected by the copyleft nature of the GPL?
Our company has a private GitHub repository for the project I'm working on. After a full summer of work, it looks like we'll be launching this week (wheee!). However, I want to include a "submit a bug" link in the program that leads to a form somewhere where the user can fill out a form that becomes an issue for us o...
I'm currently learning Python and I'm at the point in the book about using the Math library. I looked on the Python website and noticed the library was a bit scarce and am writing some more useful functions. For example, I went ahead and wrote a function to take coefficients and return the roots of the equation. Essent...
Most API libraries define one method for each endpoint. If there is an endpoint for getting user information, you might have a method like: getUserInfo(userId); That simple method is often a wrapper around another function that actually does the api call: apiCall('/user/info', {userId: userId}); Another option I see ...
I recently started working with Unity3D and primarily scripting with C#. As I normally program in Java, the differences aren't too great but I still referred to a crash course just to make sure I am on the right track. However, my biggest curiosity with C# is that it capitalises the first letter of its method names (e...
There is a wordpress theme I am modifying to create my own derived work. This original wordpress theme has the GPLv2 licence in it's root directory, so I assume that the entire theme is GPL code. There is a particular php file which has the following written in its first few lines: // This code is protected under Crea...
I sometimes end up having to write a method or property for a class library for which it is not exceptional to have no real answer, but a failure. Something cannot be determined, is not available, not found, not currently possible or there is no more data available. I think there are three possible solutions for such a...
If we need to represent classes in a class diagram for a big project that is not completely designed yet, and the classes have to be actual tables in a database, how would we predict and design the classes? Let's say we have a project that is going to have more than 15 tables, do all these tables need to be classes in ...
Currently I'm working on an basic application that has a 'tutorial mode'. Initially hints (bubbles with text) will be displayed above various ui elements, explaining how they work. Currently I have a main view which contains a hint object that can be updated (position, text, etc.) and I'm dispatching update events fro...
This is for a site that relies on shipping items via UPS or FedEx. I know there is software out there that does it (http://en.wikipedia.org/wiki/Coding_Accuracy_Support_System), but if you are trying to build your own solution for a simple website.
My company is in the midst of a transition from waterfall-style development to Agile/Scrum. Among other things, we're told that the expectation is for us to have new working, testable (by QA) features at the end of each day. Most of our devs lose around 2 hours a day to meetings and other enterprisey overhead. This m...
I've been reading a lot on OAuth2 trying to get my head around it, but I'm still confused about something. I understand that the client authorises with the OAuth provider (Google for example) and allows the Resource Server to have access to the user's profile data. Then the client can send the access token to the resou...
I am looking at the String class in Actionscript 3.0. It has a property called String.length . Internally it's a getter function (or method ?) that returns the length of string. Why can't it be String.getLength() ? Methods can take in 1, 2 or more values...so their significance can be understood. But what significan...
Could someone help me in implementing association in cpp. I am trying to implement a dice game where I have two classes a diegame and a dice.
I've read some basics about unit tests and TDD, but I find it hard to convince myself why TDD can have an advantage over only selected unittests. I've read common arguments for TDD, but don't see the improvment compared to simple unittests. Maybe you can help to clarify: TDD allows a loosely coupled, testable design -...
I was wondering your thoughts on the best way to implement a SQL ManyToMany relationship in Java using annotations - in this case eBeans - where there is extra data associated with the join. I have created a db diagram to help explain: Using @ManyToMany on the organisation and users classes would create the join table...
This post is based on the question https://stackoverflow.com/questions/49002/prefer-composition-over-inheritance/11758048#comment15634305_11758048. Some people said - check whether there is “is-a” relationship. If it is there use inheritance. What I think is there should be a second check for using inheritance. Use inh...
I'm looking for some pointers on class design for a global application. Let's say I have to make a class structure to manage products, and the products are sold in different countries. Some of the fields for the product will have the same value across all countries (eg. product code, ERP Description) I will call thes...
This is some sort of follow up to an older question of me. So I put the GPLv3 license into the project which contains my script and also added the copyright notice and copying permission statement to the top of my script. Now, apart from the script, the package also contains files which are helpful for using the script...
Assume that you have a hierarchy of organizational units: - Company -- Branches --- Departments ---- Teams Lets say I have some settings (for simplicity assume that they have the same properties) for each level of hierarchy: Max nr of documents Min something else Can do X Can do Y many other properties So, the sub-u...
I want to allow consumers of a web services layer (web services are written in Java) to create automated integration tests to validate that the version of the web services layer that the consumers will use will still work for the consumer (i.e. the web services are on a different release lifecycle than the consumers an...
Let me preface this by saying this is not my code nor my coworkers' code. Years ago when our company was smaller, we had some projects we needed done that we did not have the capacity for, so they were outsourced. Now, I have nothing against outsourcing or contractors in general, but the codebase they produced is a mas...
I wrote a C# class that is used to start a list of EXEs (not one of mine - third party EXEs I have to run) and keep them running (will check occasionally to make sure it is still running, and start them if not). I am able to test the basic logic of adding, removing, etc fine. How do I Unit Test that the actual work of...
I can't understand the last line of this GPL license. Copyright (C) 2011 Some Name This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later...
I have had a hard time learning logic programming thus far, and my request for outside resources on this site was met with some opprobrium, so perhaps this question better addresses both my needs and the requirements of this community: Is there a step-by-step approach to writing a problem in Prolog or related logic lan...
When using reusable business objects, what is considered best practice when building view models? We use an object we call Builder to build our view models. One builder for each logical unit of views (orders, users etc), where each unit can contain a number of different view models (orders contains summary, order lines...
Many things in LINQ can be accomplished without the library. But for some scenarios, LINQ is most appropriate. Examples are: SELECT - https://stackoverflow.com/questions/11883262/wrapping-list-items-inside-div-in-a-repeater SelectMany, Contains - https://stackoverflow.com/questions/11778979/better-code-pattern-for-c...
I have an object hierarchy with a number of leaf nodes that will contribute to summary values for the parent object (specifically: project cost and square footage). What's the most efficient way to tally up those values while the project is being designed? Additional details Parent ListOne NodeA NodeA.1...
I'd like to find a way to call Javascript functions from C. Are there any language bindings available for this purpose? I'm trying to make a library of Javascript functions accessible from C. (Something like a C -> Javascript foreign function interface would be suitable for this purpose, but I haven't been able to find...
I've been working on a kind of CRM for the sales guys in our office - not as a job role but as a spare time task type of thing - I don't claim to be a developer or anything like that, but I would definitely like to pursue a career as a web developer down the line, I just think I need a much stronger understanding of OO...
I am new to databases and trying to understand the basic concepts. I have learned how to delete data in a database. But one of my friends told me that you should never delete data in a database. Rather, when its no longer needed, it's better to simply mark it or flag it as 'not in use'. Is that true? If so, how would...
I recently converted an old application that was using XML files as the data store to use SQL instead. To avoid a lot of changes I basically created ActiveRecord style classes that inherited from the original business objects. For example SomeClassRecord :SomeClass //ID Property //Save method I then used this new clas...
I was reading a text. It said, "Information presentation must be compatible with the response time needs of systems. The response time should be short enough that the information does not lose its freshness and value but it should be long enough to reduce volume (and costs) and reveal important trends that signal t...
I was curious to know, if juggling between 2-3 projects at a time is a good or a common practice or not. When I say, 2-3 projects I mean: 1. 1 primary project, 2. 1 project with minor improvements/changes and 3. 1 project which comes at times for bug fixes So essentially, I find my self generally working on 2 project...
I've been thinking about how to architect an infrastructure for one of our business applications with the following requirement: Data written by some user can only be read by that user and his superior and a 3rd person yet to be defined I'm thinking in using some sort of asymmetric algorithm, such as RSA for data enc...
I'm asked to perform or sit in during many technical interviews. We ask logic questions and simple programming problems that the interviewee is expected to be able to solve on paper. (I would rather they have access to a keyboard, but that is a problem for another time.) Sometimes I sense that people do know how to app...
I have been looking into how to document software projects more formally, and I have learned about IEEE 830-1998: Recommended Practice for Software Requirements Specifications. However, as you can see from that link, it has been superseded. I know that 830-1998, and probably even 830-1993, are probably just fine for ...
I am trying to setup my application's structure in VS and I want to "try" and future proof it to a reasonable level. This application will be a WPF re-write of an old Winform app that had followed no conventions. No Layers, Tiers, Acronyms, etc... It is a fairly largish Enterprise Application. I planned to use Linq ...
My company is attempting to set up a pub/sub connection using RabbitMQ and sockjs, on Windows servers. I have two questions: My supervisor is calling this setup a comet solution, I was wondering if that is the right terminology? Is there a better solution stack for having a data server asynchronously ship data to a cl...
When cleaning out old data from a set of database tables, is it safer to have the logic in the application or in a database trigger? I am upgrading an application that I wrote a while back (and in a hurried fashion) and one of the things I want to clean up first is ensuring that data which is no longer being used is pr...
To begin with, this isn't a question about which language one should choose :) We're considering a language switch as our general direction is changing from content-driven web sites to data/action-driven web applications. What sort of factors should one think about in order to successfully evaluate the various language...
Suppose we have a model of a human muscular system containing the following muscles each within a specific muscle group: Arms Biceps Triceps Forearms Torso Front Abs Chest Shoulders Torso Back Trapezius Lats Rear Shoulders Lower Back Lower Body Quads Hams Hip & Butt Calves Now, given a list of selected muscle...
The internet is full of references on how to get prepared for an interview. Many websites are loaded with questions and answers. But I can't find any useful information about what exactly an interviewer should do to evaluate a candidate. What I mean is not just collecting good questions to be asked. I am asking about ...
A reoccurring theme on SE I've noticed in many questions is the ongoing argument that C++ is faster and/or more efficient than higher level languages like Java. The counter-argument is that modern JVM or CLR can be just as efficient thanks to JIT and so on for a growing number of tasks and that C++ is only ever more ef...
We're designing a data service that will store a large number of statistics about stocks, including historical data. The client will be a web application, which will need to pull various bits of data to show in different places on the site. Since the different places need to show different sets of statistics, it's not ...
We're using JIRA with Greenhopper, and currently our business analyst has tasks for their analysis which will eventually lead to new stories placed in the backlog, running alongside the stories for the current sprint, and it feels kind of messy - especially because they don't overlap the workflow for the development st...
I'm working on an application which requires user credentials and so on. So a database is required on the backend. What is the best practice to connect to a database without hardcoding your password into it? The program could be reverse engineered and one might get the password which is something we obviously don't wan...
As the question states. What is an 'advice'? More importantly, what does it even mean (semantics)? What's the etymology of 'advice' in the Spring context?
I have for a long time been working on an ODS as well as Data Warehouse. Both are integrating a wide variety of data sources from stove pipe applications. One of the uses of the ODS is to provide data to other stove pipe applications. Imagine one app maintains a database of personnel, and another app manages tracki...
If one would to write auto-suggest for an IDE/code editor (like IntelliSense), does one generally need to write a parser for any language that should be supported, or do compilers/runtimes provide these things? Neither the PHP or Python binaries seem to support just parsing files and generating some kind of raw output....
I think mine is "there's no such thing as a five minute job" - that programmers tend to be overly optimistic about development and that we should really think through a the implications before promising a quick solution to a problem and then diving in to code
I have a need to make a somewhat custom change request system (very high auditing requirements). Instead of completely reinventing the wheel I was wondering if there's an open-source change request system, considered decent that I could write a custom module for? I've done some searching but the ones I have found don't...
We have a web service that takes in input different types of messages. The function of the webservice is to merely write in a database the content of the messages. There is about one table (with foreign keys to others) for every kind of message. We have been asked to transform the webservice in a configurable product b...
Are there any serious studies on how well an experienced programmer who knows language X can understand code written by a competent programmer using language Y, for a good range of widely used languages as X and Y? Of course the real world isn't so simple as a programmers knows just one language. What we'd like to kno...
What exactly does the "Model" part mean? Is it the same as the domain model? I've read that it's a map, but I'm having a hard time understanding the concept.
I am asking this from a purely hypothetical standpoint. According to the Sprint Planning Meeting section in the Scrum Guide: "The number of items selected from the Product Backlog for the Sprint is solely up to the Development Team. Only the Development Team can assess what it can accomplish over the upcoming Sprint."...
I recently upgraded versions of pylint, a popular Python style-checker. It has gone ballistic throughout my code, pointing out places where I import modules in the same package, without specifying the full package path. The new error message is W0403. W0403: Relative import %r, should be %r Used when an import rela...
Let's say we want to analyze running time of algorithms. Sometimes we say that we want to find the running time of an algorithm when the input size is n and for the worst possible case it is denote it by O(n). Sometimes though I see books/papers saying that we need to find the expected time of an algorithm. Also someti...
I am about to undertake a project for university, and given the project scope I have decided to use XP/agile methodology. I have began with developing a use case diagram; gathering user stories for the first couple features. I am in the process of helping the customer develop the acceptance test and my question is: ca...
Some time ago I was to learn iOS development at my work. I didn't manage to learn it because I was moved to more important task with another technology already familiar to me. But the short time I spent on iOS, I felt that I could do better if I spent a few hours at the workplace during which I could discuss some matt...
I was reading this question over on stackoverflow: https://stackoverflow.com/questions/104516/calling-php-functions-within-heredoc-strings and the accepted answer says to do plain PHP templates like this: template.php: <html> <head> <title><?=$title?></title> </head> <body> <?=getContent()?>...
Is it acceptable to distribute unmodified BSD-licensed software (pyglet) with GPL-licensed software I created? The BSD allows for sale of modified software, I know, but does it allow re-licensing of unmodified? Seems to defeat the purpose of having a license at all.
I have a simple question, and I'm not even sure it has an answer but let's try. I'm coding in C++, and using dependancy injection to avoid global state. This works quite well, and I don't run in unexpected/undefined behaviours very often. However I realise that, as my project grows I'm writing a lot of code which I c...
Just wondering on the pros and cons on TDD/automated unit testing and looking for the community's view on whether it's acceptable for professional developers to write applications without supporting unit tests?
I am working with data feeds from affiliate sites. The basic idea is to provide an interface where the user can paste a link to an XML datafeed (these are huge btw, around 60 mb) that would then be streamed, parsed into small chunks, and mined for the required data which would then be stored in the database. The proble...
Everyone knows that, at least in C, you use the printf family of functions to print a formatted string. And these functions use a percent sign (%) to indicate the beginning of a format specifier. For example, %d means to print an int, and %u means to print an unsigned int. If you're unfamiliar with how the printf funct...
I program mostly in statically typed languages, like C++ and Java. A common strategy employed in languages like these to handle dealing with collections of objects which are related, but which need to employ specific behaviors, is to use polymorphism and inheritance hierarchies. But Polymorphism only works when the B...
I am a relatively new developer in a small business (a team of 3 developers and an equally small QA branch) working on a medium-sized system. The current iteration is still under 100k lines of code (server & client combined), but I could imagine that, in the long term, the total size could be 200 kLOC or more. We are...
We have a central Git repo from which developers fetch and push changes. They make changes on the default master branch. Our Continuous Integration (CI) tool builds artifacts off this default master branch and is the entity responsible for promoting something we want to be tested to a "UAT" branch (this is in reality d...
In the Gang of Four's "Memento" design pattern, the Memento class looks like a useless wrapper that doesn't actually provide any value to me. What is it for? Is there any reason you can't just pass around the String object (in the Wikipedia example)?
Design patterns are useful for object oriented languages. But how can a non-object-oriented language such as C make of use them?
Context: We have an ASP.NET MVC3 codebase, hosted on CodePlex, currently in the "setup period". This codebase uses several NuGet packages (without changes or additions to the source, just "using" the packages directly), amongst others: jQuery (MIT or GPL) Modernizr (MIT or BSD) log4net (Apache License, version 2.0) Ni...
I am writing a shell script with a few variables that should be configured by the user. There will be an installer for downloading and configuring the script, possibly by asking a series of question. The script in question is aimed at other developers. This can be implemented in a number of ways: Use placeholders in t...
We have a project where UI code will be developed by the same team but in a different language (Python/Django) from the services layer (REST/Java). The code for each layer exits in different code repositories and which can follow different release cycles. I'm trying to come up with a process that will prevent/reduce br...
The Mars Curiosity rover has landed successfully, and one of the promo videos "7 minutes of terror" brags about there being 500,000 lines of code. It's a complicated problem, no doubt. But that is a lot of code, surely there was a pretty big programming effort behind it. Does anyone know anything about this project? I ...
Sometimes I use plugins and 3rd party libraries, and one thing that drives me crazy is when these libraries are not versioned. So, if I download it, make some mods to it, I am the only person in the world who can benefit from it... well, until I version it myself. My question is simple: if a library I find online has ...
I am using MPMoviePlayerController in a project. The loadState of the MPMoviePlayerController object is observed using NSNotificationCenter. Why did Apple choose NSNotificationCenter in this situation instead of using delegation?
We have a legacy system to bring up-to-date because: It uses an unpopular (amoung our users) non-sql database (Btrieve) Provides only a text interface Is written in Turbo Pascal (but compiled in free pascal) which is hard to recruit/retain developers to maintain it To give you an idea of the scale, the code base is 1...
Possible Duplicate: What is the Mars Curiosity Rover's software built in? I only recently came across an article that stated there was well over 500,000 lines of code in Curiosity and I was very much intrigued; which language did NASA use and what computer and CPU architecture has Curiosity got on-board; would they ...
Developing database-backed software, often one finds it convenient to store stuff in the database which one might traditionally express in code, but which is useful to store in the database (so that it can be changed without requiring a reload of the application). For instance, one might have processes which send autom...
When it comes to non memory managed languages such as C, C++ or Fortran (my case), it becomes increasingly difficult to keep track of memory allocation/deallocation, especially when ownership must be shared. I implemented refcounting for my objects, but this makes it even more complicated as there's no place where an o...
We are practicing collective code ownership. To my understanding this means that any developer can change any line of code to add functionality, to refactor, fix bugs or improve designs. But what about a complete rewriting of code from a developer who is still in the team? Should I ask him first? What is the best pract...
Short summary as introduction: We are a small Java web development team, creating applications using various frameworks and libraries like JSF, Hibernate, Seam, all together deployed in JBoss AS. Initially, the app was put together and some features added to form a showcase to show to potential customers. Some polishi...
Some JVMs would compile Java byte code into native machine code. We know that there are lots of optimizations we could apply for that. Recently, I also learn that a branch operation may block the CPU and affect the performance significantly, if a CPU makes a wrong prediction. Does anyone know if any JVM would generate...
I have created a scenario in which I have two functions, A and B, both are tested, but despite the tests I still injected a rather stupid bug and some data is not getting into the database. Note that there is no ORM present. I've written my CRUD operations directly, and I'm paying the price therefor. In this scenario...
Situation: I've some scripts that simulate user-activity on desktop. Therefore I've defined a few cases (workflows) and implemented them in Python. I've also written some classes for interacting with the users' software (e.g. web browser etc.). Problem: I'm a total beginner in software design / architecture (coding isn...
In podcast 73, Joel Spolsky and Jeff Atwood discuss, among other subjects, "five things everyone should hate about their favorite programming language": If you’re happy with your current tool chain, then there’s no reason you need to switch. However, if you can’t list five things you hate about your favorite programmi...
I am building a tool to access some data on a site (Fitocracy) and I would like to turn it into an unofficial partial API, as no official API exists. If you are not logged in, you cannot get access to any data, so my tool uses Ruby's mechanize to log in (with my account) and scrape some data from a page. How should I h...
In extreme programming methodology, what artifacts/ can be used to document the implementation? I have used an activity diagram to document the design steps for each activity. I have read that for XP, the implementation chapter is the code itself. I am developing an android application which consists of the GUI and jav...