Storing donor addresses in a relational database

I am building a donor database for a non-profit organization and one issue I'm mulling over is how to store some of the donor data. There are some families for whom we capture the names of both spouses, hence each spouse gets its own record in the DB, and naturally they share the same address. Because it is likely to happen that multiple people from a family will exist in the database, and they will share the same address (husband, wife, kids), I am considering storing the addresses in a separate table and having Address_ID be a foreign key on the Roster table. This would reduce the amount of duplicate data, and when it came to address changes, it would be far easier to handle for multiple donors that are part of a family.               Table: Roster     Columns:     Roster_ID (PK)     PrimaryRoster_ID (FK, references Roster_ID of the head of the household)     Address_ID (FK)     FirstName     LastName     Phone          Table: Address     Columns:     Address_ID     Street     Apt     City     State     ZipCode      I haven't build the GUI yet for entering the data - I'm still building the DB and populating it via scripts, but the idea is that when a new donor is created, he/she is assigned the Primary, and then any other donor who is part of the same family will have the primary donor's Roster_ID populated in the PrimaryRoster_ID column so that a link can be made between family members. People in the same family don't have to have the same address (if they don't, a separate Address record would be made for that donor), but if there are 4 people in a family, all with separate DB records and the user who enters the data assigns the same address record to all of them, only one record will exist in the Address table, with 4 records in the Roster table having that Address record as an FK to associate each individual to that address. Can anyone think of a better way of handling this, or would this design be sufficient? The size of the database right now is around 150 records in the Roster table, with maybe a max of 1000 records down the road. Edit: Changed table design slightly - I realized that Address_ID should really just be an FK in Roster instead of having a Roster_Address table.


User Story vs Requirement

User Story captures what the user wants to do with the system at a high level. I understand that the user story would further drive a number low level requirements. Is user story same as high level requirement for the system?


Do we need a weekly project status meeting in Agile?

I am working in a small company with around 15 people (dev and qa). We are trying to practice Agile in our company. We are doing daily stand-up meetings. We are also doing a weekly project status meeting with our CTO. There we report our CTO regarding last week task and overall project status. My question is whether doing this weekly status meeting with our CTO supported in Agile or not?


Datastructure for Peg Board Game

What datastructure would work for the triangular peg board game? It's a 5x5x5 triangle with 15 holes.


What are frameworks, stacks, and middleware?

Hey I'm a student programmer currently working in Java. I often see several terms thrown around alot and it would be very helpful for someone to explain the differences. I was prompted by my research that I did when reading this question. Anyway here are the terms (and wiki links), I've read their wiki's but am still uncertain. Software Stack Software Framework/Application framework - is there a difference? what are they? Middleware


Storing credit card information: Looking for a creative solution

I recently found the need to do recurrent billing. I am extremely averse to storing people's credit card information and I refuse to take risks in that area. I am stuck between a rock and a hard place, however. Using a gateway in my local area and currency is prohibitively expensive. Basically, as things stand, we can't do business through a gateway. Yet we need recurrent billing and the need to store credit card information has arisen. I thought of storing the credit card numbers (encrypted), partially or wholly, then saving the CCV number locally on an unwired machine. To bill customers, I would generate temp billing tables, and fire off a form manually for each customer that needs to be billed. I would manually populate the CCV and pipe a form to my payment processor (they will not store the data, unfortunately-- only process the payment). It's a manual PITA, and defeats the point of automation, but it's my best bet outside of storing the data outright. Can you give me any advice on my scheme?


Filtering common starting/ending characters from array/list of strings

Ok so for example I have an array of strings with each string as below:               364VMS1029      364VMSH920      364VMSH192      364VMSU839      364VMN2382      364VMR223     364VMR2X3      364VMN829      364VMN8757      364VMN831      How can I dynamically get the program to recognise the common characters among all strings in the array, which in this case is `364VM` and filter them out? If there's no common character, then don't do anything.


Any suggested approaches to track bugs/defects?

What is the best way to track defect sources in tfs? We have various teams for a project like the vulnerability team, the customer, pre-sales, etc. We give a build and these teams independently test it. They do not have access to our tfs system. So they usually send in their defects via email. It will usually be send in an excel format. Our testing team takes these up and logs them into tfs. Sometimes they modify the original defect description (in excel) and add the expected/actual results. Sometimes they miss to cite the source. I am talking about managing the various sources as such. Is there a way we can add these sources into tfs, and actually link this particular source with the defects, with individual comments associated with them (saying where in the source we can find the actual material for the defect). Edit: I don't know if there is a way to manage various sources. Consider this: the vulnerability assessment team has come out with defects/suggestions. They captured it into an excel and passed that on to the testing team (in my case). The testing team takes the responsibility of elaborating the defect and logging it in tfs. Now say that the excel has come with 20 defect items. This is my source. (It answers the question _where did this defect come from_ ). So ultimately when I am looking at a bug I know from where it came from - I'll ultimately be looking at the email sent from the VA team which has the excel or the excel file itself sent by the VA team. It may be one of the 20 items in that excel. How should the tester link to this source just once? On the contrary, it does not make sense for the tester to attach the same excel 20 times (i.e. attach the same excel for the 20 defects while logging it into tfs) right? I hope you get my point.


When to add new project to solution?

I'm tidying up my company's Version Control Guidelines. One of my tasks is to determine how solutions should be organized in a very broad sense. I have somewhat come to my own conclusion that one broad requirement to document is that, for the most part, CSProj/VBProj projects should live on their own all at the same level in a branch. However, there are a measureable number of projects that aren't independent, and are tightly coupled to another. For instance, a Unit Testing project has no business by itself since it only exists in support of one other project. So it can (and should) be directly added to a solution with the project it supports. Same with an individual UI who's sole existence is to test one project. Or an implementation test project... and probably similar examples. So my goal is to mandate, in a way, that projects should not be added directly to a solution except in such examples. **Disclaimer** I'm not saying that one application cannot have a solution with multiple projects having been "Add Existing Project" to the solution. But in those cases, each of those projects should be addable/removable because they exist all at the same level of a namespace or folder organization. This would be easiest if there was some documentation I could find with a history of better wording. But any searches I do just end up with How-To tutorials to add projects to a solution. There are no Best Practies that get into this.


Encapsulate multiple properties into a single class to use as a custom DependencyProperty

My application is a WPF project implemented in C# .NET (4.5) using an MVVM architecture with no code-behind in the View. In order to eliminate the coupling between the View and the ViewModel I'm implementing some of the WPF- specific behaviours as custom DependencyProperties that can be bound to 'simple' properties exposed by the ViewModel. The View assembly now has several of these DependencyProperties that are bound by the top-level 'Windows' in the View. I can't see any obvious reason to collect them together into a single 'Controller' class, other than that when I do so the code suddenly looks prettier, but doing so introduces unnecessary coupling between these properties simply because they may be bound by a top- level View because not all ViewModel objects require all of the behaviours. Should I sacrifice some reduction in coupling by requiring that the top-level ViewModel objects expose a cohesive 'Controller' property for the View to bind to with a single, custom DependencyProperty? Would it be better to implement multiple, single-purpose custom DependencyProperties for each of the behaviours? Is there a completely different appropach I could use, such as providing some kind of 'behaviour container'? Single Controller approach:               using System;     using System.Threading;     using System.Windows;          using FrameworkMVVM.BindingControllers;   // For TopLevelViewController          namespace FrameworkMVVM.ViewBehaviours     {         public static class WindowBindableProperties         {             // One property that encapsulates the behaviours in a controller class             #region WindowControllerProperty                  private static DependencyProperty _windowControllerProperty =             DependencyProperty.RegisterAttached             (                 "WindowController",                 typeof(TopLevelViewController),                 typeof(WindowBindableProperties),                 new PropertyMetadata(null, WindowControllerPropertyChanged)             );                  public static DependencyProperty WindowControllerProperty             { get { return _windowControllerProperty; } }                  private static void WindowControllerPropertyChanged(                 DependencyObject d,                 DependencyPropertyChangedEventArgs e)             {                 // Hook the events, EventHandlers, SynchronizationContext,                  // DialogResult, etc. here.             }                  #endregion         }     }      Multiple Properties approach:               using System;     using System.Threading;     using System.Windows;          namespace FrameworkMVVM.ViewBehaviours     {         public static class WindowBindableProperties         {             // Multiple properties, one for each behaviour.                  #region CloseViewEventProperty                  private static DependencyProperty _closeViewEventProperty =             DependencyProperty.RegisterAttached             (                 "CloseViewEvent",                 typeof(EventHandler),                 typeof(WindowBindableProperties),                 new PropertyMetadata(null, CloseViewEventPropertyChanged)             );                  // The rest of the CloseViewEvent implementation goes here.                  #endregion                  #region DialogResultProperty                  private static DependencyProperty _dialogResultProperty =             DependencyProperty.RegisterAttached             (                 "DialogResultProperty",                 typeof(Boolean?),                 typeof(WindowBindableProperties),                 new PropertyMetadata(null, DialogResultPropertyChanged)             );                  // The rest of the DialogResultProperty implementation goes here.                  #endregion                  #region ViewContextProperty                  private static DependencyProperty _viewContextProperty =             DependencyProperty.RegisterAttached             (                 "ViewContextProperty",                 typeof(SynchronizationContext),                 typeof(WindowBindableProperties),                 new PropertyMetadata(null, ViewContextPropertyChanged)             );                  // The rest of the ViewContextProperty implementation goes here.                  #endregion                  // Etc., etc., etc..         }     }


An algorithm for finding subset matching criteria?

I recently came up with a problem which I would like to share some thoughts about with someone on this forum. This relates to finding a subset. In reality it is more complicated, but I tried to present it here using some simpler concepts. To make things easier, I created this conceptual DB model: ![Recipe model](http://i.stack.imgur.com/M9mvd.jpg) Let's assume this is a DB for storing recipes. Recipe can have many instructions steps and many ingredients. Ingredients are stored in a cupboard and we know how much of each ingredient we have. Now, when we create a recipe, we have to define how much of each ingredient we need. When we want to use a recipe, we would just check if required amount is less than available amount for each product and then decide if we can cook a dinner - if amount required for at least one ingredient is less than available amount - recipe cannot be cooked. Simple sql query to get the result. This is straightforward, but I'm wondering, how should I work when the problem is stated the other way round, i.e. how to find recipies which can be cooked only from ingredients that are available? I hope my explanation is clear, but if you need any more clarification, please ask.


Applications of Reverse Engineer, and very general process overveiw

As a student programmer, I only have very limited knowledge of the workings of much of the consumer software. I would love to one day be able to reverse engineer software to learn what makes it tick and implement it in different ways. My real question what is the general process that reverse engineering requires. I am aware that this is very broad. I was just wondering the tools such as decompilers that people use.


What skills does it take to develop an Android app?

What knowledge does it take to develop an Android app? How easy is it to publish one in the app market? I was thinking of trying one once I have a more firm grasp on Java. What skills should I focus on to meet that goal? Is it a long-shot to think I could develop an app like a photo editor (which I already can in Java) in the near future with intermediate Java experience, or are apps more for small teams or commercial software firms? This question serves as a personal to-do list on what to learn. I would like to develop an Android app in the near future from which I could make money.


Which algorithm is faster?

I'm creating a small game, where the computer generate pseudo random number in give range, and the user have to guess it. I also made the option to play computer vs computer. I mean the computer generate random number and the computer should guess it. The easiest way I found was to create for loop and increase a variable by 1 until it guesses it. But I decided to try to create my own algorithm about this.   Basically the variable that holds the guess number is equal to range / 2, and then the program enters into the while loop where if the random number > the number which is generated by logic(the one which is = to range /2) then 2 it to two and add 1 to it. If the number is < the program * by 2 and add one to it until it guess the number. Here is code in C++:               void aiVsAI(int range){ // range argument is used to be given to the randome generator func         int random_number = generate_random_number(range); // assigning the random number to variable         int guess = range / 2; // the computer guess number         int tries = 0; // how many tries the computer needed to guess the number         while(guess != random_number){ // while the guess isn't equel to the random number             if(guess > random_number){ // if the guess is > than the random number                 guess = guess / 2 + 1; // dev it to 2 and add one to it             }             else if(guess < random_number){ // if the number is < than the number then                 guess = guess * 2 + 1; // * it with 2 and add one             }             tries++; // increase the number of tires         }         std::cout << tries;     }      the generate_random_number is function that will generate pseudo-random number. _My question is which algorithm is faster this one or just using for loop and increasing variable with one until it guess the number?_ * * * Here is the full code if anyone need it for something:               #include <iostream>     #include <string>     #include <cstdlib>     #include <time.h>               //function that will generate random number     int generate_random_number(int range){  // the range argument is used to represent the maximum value of the number         if(range < 10){ // the range couln't be < 10 but can be ==             std::cout << "range can't be less than 10";             exit(1);         }         std::srand(time(NULL)); // making sure that the random number will be different every time         return rand() % range; // returning the random generated number in the specific range     }          //Game computer vs computer     void aiVsAI(int range){ // range argument is used to be given to the randome generator func         int random_number = generate_random_number(range); // assigning the random number to variable         int guess = range / 2; // the computer guess number         int tries = 0; // how many tries the computer needed to guess the number         while(guess != random_number){ // while the guess isn't equel to the random number             if(guess > random_number){ // if the guess is > than the random number                 guess = guess / 2 + 1; // dev it to 2 and add one to it             }             else if(guess < random_number){ // if the number is < than the number then                 guess = guess * 2 + 1; // * it with 2 and add one             }             tries++; // increase the number of tires         }         std::cout << tries;     }               // Game human vs human     void humanVsAI(int range){ // range argument is given to the generate random function         int random_number = generate_random_number(range); // assigning the random number to variable         int input = 0; // this var represents the user input         int tries = 0; // the number of tries user had make to guess the number         while(input != random_number){             std::cout << "Enter number: "; // alerting the user to enter a number             std::cin >> input; // getting the number             if(input < random_number) // checking if the input > than the random num                 std::cout << "You didn't guess it,you are too low..., try again!\n"; // alerting the user             else{ // else it will be > than the number                 std::cout << "You didn't guess it,you are too high..., try again!\n"; // alerting the user             }             tries++; // increasing tries by one for each try//         }         std::cout << "\n\nYou guess it! You need " << tries << " to do this.\n\n";     }               //game Human vs Human     void humanVsHuman(int range){         int number_to_guess; // the number which must be guessed         int user_guess; // user input         int guess;         std::cout << "Enter number int range 1- "<< range<<": \n"; // alerting the user to enter number         std::cin >> number_to_guess; // entering number         for(int i = 0; i < 100;i++){ //Clearing the screen             std::cout << "\n";         }         while(user_guess != number_to_guess){             guess++;             std::cout << "Please enter numer:\n"; // alerting the user             std::cin >> user_guess; // Getting the user input             if(user_guess < number_to_guess)                 std::cout << "You didn't guess it,you are too low..., try again!\n";             else if(user_guess > number_to_guess)                 std::cout << "You didn't guess it,you are too high..., try again!\n";         }         std::cout << "You guess the number\n";     }     int main(){         std::string game_type;         char play_game;         int range = 0;         while(1){             std::cout << "Please enter range(type 100 to leave it as default)\n";             std::cin >> range;             std::cout <<"What you want to play AI vs human, human vs human or AI vs AI ?\n";             std::cin.ignore(); // for get line             std::getline(std::cin, game_type); // getting the user input             std::cin.clear(); // clearing             if(game_type == "AI vs AI" || game_type == "ai vs ai"){ // if the user chose AI vs AI                 std::cout<<"You choosed AI vs AI\n";                 aiVsAI(range); // calling the AI function             }             else if(game_type == "human vs ai"                     || game_type  == "ai vs human"                     || game_type == "human vs AI"                     || game_type == "Human vs AI"                     || game_type == "Human vs ai"                     ){ // if the user chossed AI vs human                 std::cout << "You choosed human vs AI\n";                 humanVsAI(range); // calling the human vs human function             }             else if(game_type == "human vs human"                     ||game_type == "Human vs Human"                     ||game_type == "Human vs human"                     ||game_type == "human vs Human"){ // if the user choosed human vs human                 std::cout <<"You choose human vs human\n";                 humanVsHuman(range); // calling the human vs human function             }             else{ // In case of any error                 std::cerr << "An error occured!";             }             std::cout << "Do you want to play another game?\n"; // do you want another game????             std::cin >> play_game;             if(play_game == 'y' || play_game == 'Y')                std::cout <<" starting another game\n";             else                 break;  // enough playing for now.         }         return 0;          }


Gaining experience working with a team

I've always been a solo programmer and I would like to gain experience working with a team. Where are some places I can go to gain experience with a team assuming that I am willing to work for free in an open source project simply for gaining experience. (SIDENOTE) I think this question can be enhanced as I don't think in it's present form it is clear and concise. Basically I'm asking for resources on how to find a team to develop for to learn how to work with others. Please edit this question as you see fit. I apologize, at the moment I don't have enough points to make this into a wiki


Native mobile app development - how do I structure my user stories?

I'm about to start on a project which will involve developing prototype native mobile apps (iOS and Android initially) as well as a web-based admin interface and an API for these apps to communicate with. We've got a list of stories already drafted up, however a lot of them are in the format:               As a mobile user I want to be able to view a login screen so that I can sign into the app      If this were targeted for a single platform, I wouldn't see a problem. However, since we're targeting multiple platforms, I'm not sure whether these should now be duplicated eg "As an Android user" or similar. This seems like duplication, but it's work that will need to be completed separately for each platform. This is the first mobile project we've gone native on - previously it was Phonegap and we lumped all stories in under "As a mobile user". Since essentially this was a web-based app wrapped in native code, this didn't present too much of an issue, but I'm conscious that wholly-native apps are a different ballgame!


How does the license work for the LGPL open source framework?

Without knowing anything I wrote a big application, almost 1 year coding. It does Video/Audio such as softphone for commercial use (we sell it). I used a framework which was licensed under the LGPL, lesser Gnu Public License. Now before I release it to production, since I used the `H.264` video codec and a 'LGPL' framework, what should I know and what should I do? Or I do not need to do anything? This is my employer releasing and selling the application, I just did my job making the application and getting it to run without crashing. Do I need to apply for a license to court? Or do I apply for license to the framework programmers? How do I make myself valid before I let it go to my company management. **Follow up:** H.264 Encoder has GPL license H.264 Decoder has LGPL license Where do i buy encoder license? http://www.x264licensing.com/features Where do i buy decoder license? http://www.mpegla.com/main/programs/AVC/Pages/AgreementExpress.aspx How much does it cost me license? http://www.zdnet.com/blog/bott/h264-patents- how-much-do-they-really-cost/2122


What are the advantages of GLSL's compilation model?

GLSL is fundamentally different from other shader solutions because the server (GPU driver) is responsible for shader compilation. Cg and HLSL are (afaik) generally compiled _a priori_ and sent to the GPU in that way. This causes some real-world practical issues:   * many drivers provide buggy compilers   * compilers differ in terms of strictness (one GPU can accept a program while another won't)   * also we can't know how the assembler code will be optimised What are the upsides of GLSL's current approach? Is it worth it?


Is there any danger in writing raw bytes to a file?

I'm working through a problem in Programming Pearls -- specifically, the implementation of a program which sorts a file containing, at most, 10,000,000 integers (Column 1, Problem 3). Since the book doesn't specify how the data should be stored in the file, I'm considering storing the integers as raw bytes (there are some other constraints that make raw bytes a good option). I've never worked at this low of a level before, so I want to know if there's anything dangerous I should watch out for. Do I need to worry about accidentally using some sort of end-of-file sequence when I'm writing raw bytes to a file, for example? Edit: I realize now how broad my question was. I really meant problems of the more catastrophic kind, like accidentally overwriting other files on the disk. Sorry I wasn't clearer originally.


How should my local git workflow work?

At home, I have a server that is running some software (on a LAMP stack, but only accessible internally). I have another machine and a laptop that I both use for developing said software. What is the best workflow for me? Should I have a repository on my local server, create a live branch, staging branch and development branch, then checkout the development branch from my laptop/development PC to work on, commit that back when I'm done, then merge the development branch with the staging branch for testing, before further merging to the live branch? Would I simply checkout the production branch to my /www/var/ on my server? Or am I thinking/going about this all wrong? Thanks.


VB.net - Unable to delete/over ride files in Net App environment

I have been working on a change release application for some time now. The workflow is as follows:   1. Archive the staging file   2. Archive the current prod file   3. move staging to prod      * Delete prod file     * Copy staging file to prod dir     * Delete orig staging file When I execute my code against a Windows Server using UNC (i.e.: \Server1\d$\Production) it works perfectly. My issue is that most our changes happen against a Net App file system. When I execute against this, I have gotten many different errors based on how my code is structured. Currently, I get 'The process cannot access the file '\Netapp\share\files\FILE_NAME.ext' because it is being used by another process.' Here is my current code:               Private Sub ReleaseToProd_Click(sender As Object, e As EventArgs) Handles ReleaseToProd.Click     Dim fs As System.IO.StreamWriter = My.Computer.FileSystem.OpenTextFileWriter(LogPath, True)     Dim i = 1          fs.WriteLine("--- " & Now)          TextBox1.Text += "Releasing to Production:" & vbNewLine     For Each item In ListBox1.SelectedItems              If My.Computer.FileSystem.FileExists(Path.Combine(ProdDir, item)) Then             'Delete existing production file             Try                 File.Delete(Path.Combine(ProdDir, item))                 fs.WriteLine("Deleting " & Path.Combine(ProdDir, item))                 'Copy staging to production                 Try                     File.Copy(Path.Combine(StageDir, item), Path.Combine(ProdDir, item))                     fs.WriteLine("Copying " & Path.Combine(StageDir, item) & "\nTO: " & Path.Combine(ProdDir, item))                     Try                         File.Delete(Path.Combine(StageDir, item))                         fs.WriteLine("Deleting " & Path.Combine(StageDir, item))                     Catch ex As Exception                         MsgBox(item & ": issue deleting from staging!!" & vbNewLine)                         TextBox1.Text += item & ": issue deleting from staging!!"                         fs.WriteLine("--- Error Releasing - Step 3 ---" & vbNewLine)                         fs.WriteLine("Stack Trace:" & vbCrLf & ex.StackTrace & vbNewLine)                         fs.WriteLine("Stack Trace:" & vbCrLf & ex.Message & vbNewLine)                     End Try                 Catch ex As Exception                     MsgBox(item & ": issue copying file to production!!" & vbNewLine)                     TextBox1.Text += item & ": issue copying file to production!!"                     fs.WriteLine("--- Error Releasing - Step 2 ---" & vbNewLine)                     fs.WriteLine("Stack Trace:" & vbCrLf & ex.StackTrace & vbNewLine)                     fs.WriteLine("Stack Trace:" & vbCrLf & ex.Message & vbNewLine)                 End Try             Catch ex As Exception                 MsgBox(item & ": issue deleting production file!!" & vbNewLine)                 TextBox1.Text += item & ": issue deleting production file!!"                 fs.WriteLine("--- Error Releasing - Step 1 ---" & vbNewLine)                 fs.WriteLine("Stack Trace:" & vbCrLf & ex.StackTrace & vbNewLine)                 fs.WriteLine("Stack Trace:" & vbCrLf & ex.Message & vbNewLine)             Finally                 TextBox1.Text += item + " released" & vbNewLine             End Try              Else             TextBox1.Text += item + " released" & vbNewLine             fs.WriteLine("Releasing Stage:" & vbNewLine & StageDir & "\" & item & vbNewLine & "To:" & vbNewLine & ProdDir & "\" & item & vbNewLine & "With Overwrite" & vbNewLine)             My.Computer.FileSystem.MoveFile(StageDir & "\" & item, ProdDir & "\" & item, True)         End If         i = i + 1     Next          ListBox1.Items.Clear()     fs.Close()     End Sub      I know all my variables/constants are as they should be. I have full control over the destination directories, and I have launched the application as administrator Here are the stack traces received: > \--- Error Releasing - Step 1 --- > > Stack Trace: at System.IO.__Error.WinIOError(Int32 errorCode, String > maybeFullPath) at System.IO.File.Delete(String path) at > ChangeManagementApp.Form1.ReleaseToProd_Click(Object sender, EventArgs e) > > Stack Trace: The process cannot access the file > '\Netapp\share\files\FILE_NAME.ext' because it is being used by another > process. It obviously looks like a lock, but I am being assured that our application, that reads these files, does not hold locks... additionally, I can manually overwrite it with no issues at all. Any ideas on how I might be able to fix this issue? * * * The failing code is here:                   If My.Computer.FileSystem.FileExists(Path.Combine(ProdDir, item)) Then             'Delete existing production file             Try                 File.Delete(Path.Combine(ProdDir, item))                 fs.WriteLine("Deleting " & Path.Combine(ProdDir, item))                 'Copy staging to production                 Try


Can I use my username in a legal license?

I have an open source project, but I don't want to use my real name in the license file. Legally, can I just use my project hosting username instead? I know programmers Are Not Lawyers™, but I'm looking for advice from people who may have dealt with simlar problems.


Best practice: dynamically handle variable data, multiple file uploads and encoding with jQuery, AJAX, PHP and MySQL

I'm currently writing an e-learing web-application. I'm sorry if this is information overkill but I think it's better to describe it in detail so you get the idea. I have made thought on every point and would just like to know if my approach is ok or totally off the mark for this is the first time I handle that much data "on the fly". The e-learning courses contain files of different types, e.g. Word files, PDFs, Flash (yes, sadly no way around it), videos etc. and have 1 or more sets of tests, each containing questions where images can be attached (one each question) and answers of course (single- or multiple-choice), which also can hold images (one each) in addition or instead of pure text. Upon completion a PDF (certificate) is created and stored on the server for the user to download at any time. Planned workflow:   1. Course creation is handled similar to a checkout in online shops, meaning you click on "New course" and a window pops up and at the top you see a flowchart showing where in the creation process you are right now. The whole process should be dynamic so information is only stored in the final "checkout". Each part of the process is on a separate "page" but you can go back and edit things. It'll be visualized like this (I will add text descriptions to the points of course): ![Workflow](http://i.stack.imgur.com/eFTwX.png)   2. First page contains only basic information, e.g. Name, version, short description and a list of topics being taught in this course.   3. 2nd page is where the fun starts: Upload multiple files with description. These file uploads should not disable the use of the form. Videos shall be uploaded and encoded in background.   4. 3rd page: Test-sets are created, this means categories (Test-sets) with subcategories (questions) and sub-subcategories (answers) also with multiple file uploads (images).   5. 4th page: final overview and confirm. How I want to handle things: **Data pre-storage** I would like to use temporary tables for this case to store the file paths and basic data. As the creation process can be cancelled at any time all files belonging to entries for this current creation process shall be deleted. This means creation starts --> Process is created in temporary table `creation- processes`. After the first page is filled the data is stored in a temporary table with fk to process id, same goes for any file uploaded. **Video encoding** As soon as a video file is uploaded I will run a background php-script which sets a database-entry in the temporary table for the video file and starts encoding via ffmpeg (3 files for each video file: mp4, ogg, webm). Uploaded files can have 4 states: "Uploading", "Processing", "Finished" and "Error". **Permanent storing** Upon completion the Data from the temporary tables is transferred into permanent tables and then deleted. Files still being processes (as video encoding can take some time) will also have their state transferred in the permanent table. The background-encoding-script checks for the filename (which is unique: timestamp+md5-hash of filename) in the temporary table first and then in the permanent table. If no entry exists in both it deletes the files it created. **Garbage collection** In addition to just using temporary tables I will have a permanent table "tmp_files" containing path information of ALL files being uploaded. The entries and the files listed in this table are deleted upon cancellation of the process, also after completion the entries are deleted (but not the files) for they are now stored in the regular table (course-files). So for things going wrong I can run a cron job every hour that compares the entries of "tmp_files" with the files in the regular table and the temporary table and if it holds an entry which is not present in one of the other tables this means there is a zombie file which must be deleted (together with the entry of course). Well that's it so far. I don't know if questions regarding planning of software are welcome here but I really would like to know if this is a good way to approach this process or not and if I'm missing something essential.


To what extent can choosing a particular job limit future opportunities?

I'm at the beginning of my career and I'm currently looking for jobs. I know that the farther you get away from college graduation, the more employers look at your experience as opposed to your actual degree. I'm wondering with the ultimate goal of being in software engineering/computer science, would taking a job in the IT field limit my options of getting into software engineering? Likewise would taking a job in software quality assurance limit me from pursuing a development position later, even though both are in software engineering?


how to convince other we should move to hadoop?

Everything I've read about Hadoop seems like exactly the technology we need to make our enterprise more scalable. We have terabytes of raw data that is in non-relational form (text files of some kind). We're quickly approaching the upper limits of what our centralized file server can handle and everyone is aware of this. Most people on the tech team, especially the more junior members of the tech team are all in favor of moving from the central file system to HDFS. The problem is, there is one key (most senior, etc.) member of the team who is resisting this change and every time Hadoop comes up, he tells us that we could simply add another file server and be in the clear. So, my question (and yes, it's really subjective, but I need more help with this than any of my other questions) is what steps can we take to get upper management to move forward with Hadoop despite the hesitation of one member of the team?


How indepth should a programmer develop his understanding of the Unified Process and UML?

I know a lot of places use UML and the unified process as their development model... but then there's a lot that don't. Would it be important to have more than a basic and functional understanding of these subjects or would it be better to focus on developing programming skills in other areas (i.e. language development, IDEs, etc)?


How to associate a new/modified changeset with an existing review in VisualStudio 2012

I'm trying out the new Code Review tool in Visual Studio 2012. Which seems okay for the most part, but I've hit a wall in regards to when changes are required. How should this be handled in a code review in VS2012 land?   1. Joe submits a code review   2. Fred reviews and requests some changes   3. Joe makes the requested changes   4. ????? How does Joe associate a new changeset with the review so Fred can see it?   Abandon the existing review (thus losing all the original comments), and create a new one? Or is there a way to attach the new changes to the existing review?


Design Code Outside of an IDE?

Does anyone design code outside of an IDE? I think that code design is great and all but the only place I find myself actually design code (besides in my head) is in the IDE itself. I generally think about it a little before hand but when I go to type it out, it is always in the IDE; no UML or anything like that. Now I think having UML of your code is really good because you are able to see a lot more of the code on one screen however the issue I have is that once I type it in UML, I then have to type the actual code and that is just a big duplicate for me. For those who work with C# and design code outside of Visual Studio (or at least outside Visual Studio's text editor), what tools do you use? Do those tools allow you to convert your design to actual skeleton code? It is also possible to convert code to the design (when you update the code and need an updated UML diagram or whatnot)?


How to improve the programmers work environment

I manage a team of six programmers, working on diverse systems. We work in an open plan office, with members sitting in cubicles. A lot of people on these forums are big on private offices, but that is not an option for me. But I was wondering if there were ideas for other ways to improve and energize the working environment and experience. One suggestion is more plants. Any suggestions would be greatly appreciated.


Which database to prefer while developing a WPF medical inventory system?

I have a project to develop an inventory system for a medical shop. Till date, I confronted simple requirements which were fulfilled with XML as the backend db. My interaction knowledge with XML is pretty-good and I can make almost anything with XML using LINQ-TO-XML. Since, this is an inventory system, I am bit confused as to which database should I use. Can i stick with XML or proceed with SQL Server 2008. In case I use SQL Server, will I need to install the SQL Server on Client Machine as well. This is important information because SQL Server is a commercial product, hence i need to include this in my project estimation cost.


Why are different components of the "web platform" not modularized?

The web platform is hip these days. But the web platform consists of many parts that are conceptually separable, developed at different times and paces, and (most important to me) could be useful on their own. Basically the web platform is "a browser", but the browser lumps together several things:   * HTML/CSS renderer   * DOM   * scripting on the renderer and DOM (JavaScript)   * sandboxing (including cross-site scripting restrictions, limited access to local files, etc.)   * the browser itself, which is a GUI app with its own look and feel My question is, am I really the only one who thinks it would be useful to have each of these as separate components that are usable on their own, mixable and matchable with different versions of each other and with other programming tools? The renderer/DOM are the ones I'd really like to see abstracted, because HTML/CSS is a very nice way to describe interfaces, but it's annoying that it can only be used to describe interfaces on a web page. Most notably, the link between the rendering engine, JavaScript, and the browser GUI seems almost impenetrable. This makes it really annoying to use HTML/CSS for interface design, because your interface is always going to be running inside a browser that you don't control, and you have to use JavaScript. Compare that to other interface toolkits (like Tk, Qt, Wx), which often have bindings to multiple programming languages and can be leveraged in standalone apps that you have total control over. (This means, for instance, that browser-wide user preferences for things like fonts can interfere with your presentation, and it means any menus, keyboard shortcuts, or other UI doodadssyou create have to compete with those of the enclosing browser.) In similar fashion, it's very tough to write something that has an HTML/CSS interface, but stores data on your local computer, because browsers think it's an insecure web app, even if what you want it to be is just a "regular app". I know there are _historical_ reasons why people did all this together, but I find it baffling that at no point have people thought it would be worthwhile to make a separate, pluggable rendering engine that could be used with multiple programming languages, or a "browserapp maker" that would run a single web app in its own window, or anything like that. Or, do such things already exist? I'm aware of things like the web widgets in GUI toolkits, and XULRunner, but as far as I can see these still seem to be embedding a browser-like amalgam of several components. (In particular, there does not appear to be a stable, mature rendering engine with DOM-access bindings for languages other than JavaScript.) This makes them more heavyweight and less integrable into an application than it would be if you could just grab an HTML rendering library the same way you grab Qt or a PNG library or anything else.


Product owners with more than one product?

Is it normal and still proper (in agile/SCRUM-based software development) for a product owner to be in charge of more than one product?


Optimal communication pattern to update subscribers

What is the optimal way to update the subscriber's local model on changes C on a central model M? ( M + C -> M_c) The update can be done by the following methods:   1. Publish the updated model M_c to all subscribers. Drawback: if the model is big in contrast to the change it results in much more data to be communicated.    2. Publish change C to all subscribes. The subscribers will then update their local model in the same way as the server does. Drawback: The client needs to know the business logic to update the model in the same way as the server. It must be assured that the subscribed model stays equal to the central model.   3. Calculate the delta (or patch) of the change (M_c - M = D_c) and transfer the delta. Drawback: This requires that calculating and applying the delta (M + D_c = M_c) is an cheap/easy operation. If a client newly subscribes it must be initialized. This involves sending the current model M. So method 1 is always required. Think of playing chess as a concrete example: Subscribers send moves and want to see the latest chess board state. The server checks validity of the move and applies it to the chess board. The server can then send the updated chessboard (method 1) or just send the move (method 2) or send the delta (method 3): remove piece on field D4, put tower on field D8.


Why is Clean Code suggesting avoiding protected variables?

Clean Code suggests avoiding protected variables in the "Vertical Distance" section of the "Formatting" chapter: > Concepts that are closely related should be kept vertically close to each > other. Clearly this rule doesn't work for concepts that belong in separate > files. But then closely related concepts should not be separated into > different files unless you have a very good reason. Indeed, this is **one of > the reasons that protected variables should be avoided**. What is the reasoning?


What are the licencing requirements for publishing and distributing an ASP.net application

I started developing websites using PHP. I have read many times that PHP is free and open source which is an advantage over ASP.net. However, due to my current job requirements, I had to switch to ASP.net which is pretty good. Now after developing few applications, I am wondering how can I publish them for free. As PHP is free and opensource, it was never an issue for me. What's bothering me is this. Suppose I developed a web application using Visual Studio Express (or Professional version or any other version)   * Do I need any special permission/license from Microsoft to host my application on Internet   * If I create a desktop application and want to distribute it for free on internet, is any license required.   * If no, then what are microsoft licenses all about and how is PHP free and ASP is not free Thanks!


Logging to database: Log first or action first?

Long story short, I'm working on a web-based frontend that interacts with a database, and one of the functions is that every action on a particular table gets logged to keep a full history of all changes to that table. An earlier attempt at using triggers in postgreSQL to handle the logging automatically ran afoul of a couple of other requirements of software that will use said database as a backend, so I'm back to manually creating the log entries and saving them. My question is, what's best practice? Creating and storing the log first, then making the change, or making the change first, then storing the log? I realize that it's essentially a moot point because I'm wrapping the entire process into a transaction anyway, but I'm suddenly wondering if there are arguments in favor of either methods.


What is the value of workflow tools?

I'm new to Workflow developement, and I don't think I'm really getting the "big picture". Or perhaps to put it differently, these tools don't currently "click" in my head. So it seems that companies like to create business drawings to describe processes, and at some point someone decided that they could use a state machine like program to actually control processes from a line and boxes like diagram. Ten years later, these tools are huge, extremely complicated (my company is currently playing around with WebSphere, and I've attended some of the training, its a monster, even the so called "minimalist" versions of these workflow tools like Activiti are huge and complicated although not nearly as complicated as the beast that is WebSphere afaict). What is the great benefit in doing it this way? I can kind of understand the simple lines and boxes diagrams being useful, but these things, as far as I can tell, are visual programming languages at this point, complete with conditionals and loops. Programmers here appear to be doing a significant amount of work in the lines and boxes layer, which to me just looks like a really crappy, really basic visual programming language. If you're going to go that far, why not just use some sort of scripting language? Have people thrown the baby out with the bathwater on this? Has the lines and boxes thing been taken to an absurd level, or am I just not understanding the value in all this? I'd really like to see arguments in defense of this by people that have worked with this technology and understand why its useful. I don't see the value in it, but I recognize that I'm new to this as well and may not quite get it yet.


What's the best practice for naming uploaded images?

Suppose I have a form in my web application where users can upload a profile picture. I've got few requirements about file size, dimensions etc, but when the user uploads the image, how should I name them on my system? I suppose it would need to be consistent and also unique. Maybe a GUID?               a5c627bedc3c44b7ae7c06a44fb3fcf8.jpg      A timestamp?               129899740140465735.jpg      A hash? Ex: md5               b1a9acaf295cf14ffbc5b6538294562c.jpg      Is there a standard or recommended way to do this? Maybe an ASP.NET framework I should use?


Multiprocess RPC Architecture Design

I am currently working on a project that has client applications communicating with a server process. The client applications could be local to the same machine as the server process, on the same network, or over the internet. I had written a single-threaded asynchronous RPC module for the server process using Boost ASIO while Google Protobuf was used for RPC message serialization. The architecture was a pretty simple client-server model where a client would pack a request into protobuf message and send it to the server which would send back a response. The server process is written in C++ and the client applications were in varying languages. The main use case for this was to present a GUI to allow users to monitor, and interact with, the server process. In the future, the server process is going to be separated into functionally separate processes instead of one monolithic process. This presents an issue wherein I now have multiple processes for the client applications to connect to. I don't think this would be a problem in the case of the local or lan client applications but, over the internet, this could become unwieldy if the number of processes grow. Furthermore, I may want to enable IPC between server processes by sending each other RPC messages. I'm not sure what distributed application architecture would best fit this system going forwards. I don't want to reinvent the wheel if it's not necessary so I've taken cursory glances at D-bus and ZeroMQ, but seeing as I don't really have my architecture settled I thought I'd ask you fellow programmers. Would it be wise to have a single server process handling communication between client applications and server processes or is there a better architecture style I should be considering? If I want to enable IPC between server processes should I have them directly send messages to each other or should I use the single server process mentioned previously? Should I be looking at something like a publish/subscribe model?


Severity and relation to occurence - priority?

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 correct or what am I missing? Usually it is the priority which is the result of such a calculation (severe bug that occurs rarely is still severe but does not have to be fixed immediately). Also from this description, what is the difference between the effect on the end user and business impact?


Coding: conciseness/efficiency vs readability

I am fairly new to c# and trying to learn best practices. I've been faced with many situations over the last week in which I need to make a choice between longer+simpler code, or shorter code that combines several actions into a single statement. What are some standards you veteran coders use when trying to write clear, concise code? Here is an example of code I'm writing with two options. Which is preferable? A)                   if (ncPointType.StartsWith("A"))//analog points         {             string[] precisionString = Regex.Split(unitsParam.Last(), ", ");             precision = int.Parse(precisionString[1]);         }         else         {             precision = null;         }      B)                   if (ncPointType.StartsWith("A"))//analog points             precision = int.Parse(Regex.Split(unitsParam.Last(), ", ")[1]);         else             precision = null;      C)                   precision = ncPointType.StartsWith("A") == true ?                  int.Parse(Regex.Split(unitsParam.Last(), ", ")[1]) :                  null;


How to link classes in different packages (on different pages)?

Extending the answer to this question, I have broken down a large system into a few classes per package. Each package is now shown in a different page for readability, but now how do I show the relationship of two classes in separate packages (separate printed pages)? **An example for clarification:** ![E has an association with A but are in separate packages](http://i.stack.imgur.com/b6Hs4.jpg) E has an association with A but are in separate packages (which means they are on different pages)


When following SRP, how should I deal with validating and saving entities?

I've been reading Clean Code and various online articles about SOLID lately, and the more I read about it, the more I feel like I don't know anything. Let's say I'm building a web application using ASP.NET MVC 3. Let's say I have a `UsersController` with a `Create` action like this:               public class UsersController : Controller     {         public ActionResult Create(CreateUserViewModel viewModel)         {              }     }      In that action method I want to save a user to the database if the data that was entered is valid. Now, according to the Single Responsibility Principle an object should have a single responsibility, and that responsibility should be entirely encapsulated by the class. All its services should be narrowly aligned with that responsibility. Since validation and saving to the database are two separate responsibilities, I guess I should create to separate class to handle them like this:               public class UsersController : Controller     {         private ICreateUserValidator validator;         private IUserService service;              public UsersController(ICreateUserValidator validator, IUserService service)         {             this.validator = validator;             this.service= service;         }              public ActionResult Create(CreateUserViewModel viewModel)         {             ValidationResult result = validator.IsValid(viewModel);                  if (result.IsValid)             {                 service.CreateUser(viewModel);                 return RedirectToAction("Index");             }             else             {                 foreach (var errorMessage in result.ErrorMessages)                 {                     ModelState.AddModelError(String.Empty, errorMessage);                 }                 return View(viewModel);             }         }     }      That makes _some_ sense to me, but I'm not at all sure that this is the right way to handle things like this. It is for example entirely possible to pass an invalid instance of `CreateUserViewModel` to the `IUserService` class. I know I could use the built in DataAnnotations, but what when they aren't enough? Image that my `ICreateUserValidator` checks the database to see if there already is another user with the same name... Another option is to let the `IUserService` take care of the validation like this:               public class UserService : IUserService     {         private ICreateUserValidator validator;              public UserService(ICreateUserValidator validator)         {             this.validator = validator;         }              public ValidationResult CreateUser(CreateUserViewModel viewModel)         {             var result = validator.IsValid(viewModel);                  if (result.IsValid)             {                 // Save the user             }                  return result;         }     }      But I feel I'm violating the Single Responsibility Principle here. How should I deal with something like this?


Advanced learning topics for junior developers

I'm a junior developer at a company that has asked me to establish academic goals for the near future. I didn't realize how hard of a question this was until I could only come up with one answer, off the top of my head: Learn more Design Patterns What subjects have you learned, after you finished school, that have helped you significantly?


Are random number generators security holes?

If I retrieve a random number from a database (e.g. RAND() in SQL Server) or using a programming language and send this in some form back to a client machine, is there an economic chance I will be sending an indicator of what's in my server's memory that might form a security problem (like revealing my schema, etc)?


When am I ready to start using Jquery for Javascript?

I was told not to use Jquery as a beginner because it would hamper my learning of Javascript. Now I've read a couple books on Javascript, read loads of sites, and made a Javascript web app. Am I ready for Jquery? If not, then how will I know when I'm ready?


Progressive Enhancement vs. Single Page Apps

I just got back from a conference in Boston called An Event Apart. A really popular theme amongst the speakers was the idea of progressive enhancement \- a site's content should go in the HTML, and JavaScript should only be used to enhance behavior. The arguments that the speakers gave for progressive enhancement were very compelling. Not only is it a solid pattern for supporting older browsers, and devices on a network with low bandwidth, but HTML fails much more gracefully than JavaScript (i.e. markup that is not supported is just ignored, while if a browser throws an exception while executing your script - you are hosed). Jeremy Keith gave a particularly insightful talk about this. But what about single page web apps like Backbone and Angular? The whole design behind these frameworks seems to push the developer toward moving content out of the HTML, and into something like a JSON API. I can not seem to gel these two design patterns: progressive enhancement vs. single page web apps. Are there instances when one is better than the other? Or are they not even antagonistic technologies, and I am missing something here with my mental model?


Origin of wParam and lParam

Given a standard windows procedure function: `LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);` Where do the names wParam and lParam come from and what the history behind them?


How does FDS (flat datacenter storage) make optimizations around locality unnecessary?

I was reading the following computer systems paper: https://www.usenix.org/system/files/conference/osdi12/osdi12-final-75.pdf And I was trying to understand why it claims that it does not need data locality for it be perform well. Basically, in the abstract it says: "...FDS multiplexes an application's large scale I/O across the available throughput and latency budget of every disk in a closer. FDS therefore makes many optimizations around data locality unnecessary." What I was not sure was, why does multiplexing an applications I/O across the servers in the datacenter, make it unnecessary to have to optimize in terms of data locality?


How to recover from finite-state-machine breakdown?

My question may seems very scientific but I think it's a common problem and seasoned developers and programmers hopefully will have some advice to avoid the problem I mention in title. Btw., what I describe bellow is a real problem I am trying to proactively solve in my iOS project, I want to avoid it at all cost. By finite state machine I mean this > I have a UI with a few buttons, several session states relevant to that UI and what this UI represents, I have some data which values are partly displayed in the UI, I receive and handle some external triggers (represented by callbacks from sensors). I made state diagrams to better map the relevant scenarios that are desirable and alowable in that UI and application. As I slowly implement the code, the app starts to behave more and more like it should. However, I am not very confident that it is robust enough. My doubts come from watching my own thinking and implementation process as it goes. I was confident that I had everything covered, but it was enough to make a few brute tests in the UI and I quickly realized that there are still gaps in the behavior ..I patched them. However, as each component depends and behaves based on input from some other component, a certain input from user or some external source trigers a chain of events, state changes..etc. I have several components and each behave like this Trigger received on input -> trigger and its sender analyzed -> output something (a message, a state change) based on analysis The problem is, this is not completely selfcontained, and my components (a database item, a session state, some button's state)...COULD be changed, influenced, deleted, or otherwise modified, outside the scope of the event- chain or desirable scenario. (phone crashes, battery is empty phone turn of suddenly) This will introduce a nonvalid situation into the system, from which the system potentially COULD NOT BE ABLE to recover. I see this (althought people do not realize this is the problem) in many of my competitors apps that are on apple store, customers write things like this> "I added three documents, and after going there and there, i cannot open them, even if a see them." or "I recorded videos everyday, but after recording a too log video, I cannot turn of captions on them.., and the button for captions doesn't work".. These are just shortened examples, customers often describe it in more detail..from the descriptions and behavior described in them, I assume that the particular app has a FSM breakdown. So the ultimate question is how can I avoid this, and how to protect the system from blocking itself? EDIT> I am talking in the context of one viewcontroller's view on the phone, I mean one part of the application. I Understand the MVC pattern, I have separate modules for distinct functionality..everything I describe is relevant to one canvas on the UI.


Adhering to a protocol and being a subclass at the same time?

In objective C, I have a situation where I would like to have an abstract protocol (interface) with 5 methods and 4 properties, but at the same time, I'd like to have a common implementation of 3 of those 5 methods. So my question is, is it ok to 1) have just an interface declaration with all the method and property declarations, 2) have a base class that adheres to that protocol (implements that interface) but also provides a common implementation of some of those classes, and only has empty stub method implementations for the rest of the methods, and then finally, 3) have a bunch of subclasses (from that base class), that will conform to that protocol - but - also inherit common method implementations -and - implement on their own those stub methods?


What is the best PHP ORM library?

I want to build a PHP web application, but always faces the problem that I need to connect to database and deal with related objects. So I tried codeigniter and it uses a special way to connect to database named Active Record and I've known that its an ORM technique and there are lot of ORM libraries out there. What is the best, the easiest and the fastest of them?


Backbone vs Angular/Ember for a 1-3 person development shop?

We are a really small (1-3) Ruby shop building a Rails application and need to pick one of the 3 (we've narrowed down to) JS Frameworks. Assume plenty of development experience overall but very little front end JS Framework experience (little with Backbone but absolutely nothing with the other two). If productivity and speed of development (and the need to do lesser rewrites down the road - where the road could be 6-12 months long) along with community support are key metrics, what would be a reasonable recommendation amongst these 3? And by Backbone, I am assuming the need for Marionette or Chaplin (most likely the former). I have to say that I like the fact that Backbone starts off in a rather minimalistic fashion allowing one to add the necessary modules progressively as opposed to starting off with them all (akin to Sinatra vs Rails) but having said that, I've chosen Rails (equally familiar with Sinatra at this point) simply to not worry about adding the dependencies one by one. So, I am a little unclear about the right choice and simply fear losing couple of months of development effort in the event Backbone loses traction in the community and/or it becomes difficult to find the necessary add ons or something like that. (Forgive the rambling - guess this is what happens after 2-3 sleepless nights of JS Framework comparisons).


Because of over incumbent patents, is it possible to safely develop any software without the risk of legal action?

Take this System and method for restricting user access rights on the internet based on rating information stored in a relational database There are hundreds of thousands of them out there. So basically you can't program anything really without breaching one of thousands of software patents. If your program succeeds you will be sued by someone! Does this happen all the time and people get silenced? Do trendy startups get hit by things like this? Surely all major web properties would have been hit by the example above by AT&T?


What can be done when you are the only person to care about consistency?

After reading this question I may have a partial answer to the issue at hand, but I'd like to explore the issue further. I seem to be the only person on my team (a team of 6 people working on an Enterprise software solution) who cares about consistency. At times I am vocal about it, but there are members of my team that are just as vocal against it. I can file tickets, as the question I linked recommends. Which sounds great. But, I think the issue I am having has to do with the mentality or attitude of myself and my co-workers. What concrete steps can be taken if your team-mates don't care about consistency? Do I clobber them with statistics from studies that have been done linking consistency of code with the speed at which code can be read? Do I flood our already overly full backlog with consistency issues that can then either be solved or put on record as being "not important enough"? Should I just shut-up, sit down, write code, and quit worrying about it? How best to handle this situation?


Would you re-design completely under .Net?

A very extensive application began as an Access-based system (for database storage). Forms were written in VB5 and/or VB6. As .Net became a fixture in the development community, certain modules have been rewritten. This seems very awkward and potentially costly just to maintain because of the cross- technologies and extra work to keep the two technologies happy with each other. Of course, the application uses a mix of ~~ODBC~~ OleDb and MySql. ~~Would you think spending the time and resources to completely re-develop the application under .Net would be more cost effective?~~ In an effort to develop a more stable application, wouldn't it make sense to use .Net? Or continue chasing Access bugs, adding new features in .Net (which may or may not create new bugs between .Net and Access), and rewriting old Access modules into .Net modules under time constraints that prevent proper design and development? **Update** The application uses OleDb and MySql - I corrected my previous statement. Also, to lend further support to rewriting: I have since found out that when the _"porting"_ to .Net began, the VBA/VB6 code that existed was basically translated to the .Net equivalent. From my understanding, nothing was done to improve performance, or take advantage of new libraries or technologies. In my opinion, this creates a very fragile and unstable application. With every new update, this becomes more and more visible. As a help desk technician, I have noticed an increase in problems reported. The customers using the software have noticed an increase in problems and are commenting on it.


Should every member of a team use the same IDE?

Do you think it makes sense to enforce that every member of a team must use the same IDE? For instance all engineers that are already on the team use IDE X. Two new engineers come and want to use IDE Y instead because that's what they have been using for several years now. Do you have any experience with "mixed IDE" teams? If so what is it?


Approximately how much is solid and broad knowledge of data structures and algorithms worth in the employment market?

I'm wondering how much I can boost my salary if I was to gain a strong and broad understanding of data structures and algorithms. I know the real basis but there are so many data-structures out there so I'm wondering what would be the financial benefit of cover these in depth?


Algorithmic problem: Picking Cards

The problem below appeared on the last Code Sprint 2 programming competition (it's over already). The base cases are clear, but developing an algorithm that solves all possible cases has been a challenge so far. > There are N cards on the table and each has a number between 0 and N on it. > Let us denote the number on the Nth Ni. You want to pick up all the cards, > but you can only pick a specific Nth card if you already picked Ni cards > before. (As an example, if a card has a value of 3 on it, you can’t pick > that card up unless you’ve already picked up 3 cards previously) In how many > ways can all the cards be picked up? > > Input are the cards with their respective numbers, and the output should be > the total number of ways possible to pick them up.               Sample Input:     0 0 0      Sample Output:     6          Sample Input:     0 0 0 0      Sample Output:     24          Sample Input:     0 0 1     Sample Output     4          Sample Input:     0 3 3     Sample Output:     0


How do I treat application aspects with regard to features and user stories?

When drawing up a backlog, I have several requirements that apply to a great many user stories, i.e. aspects of the application like error handling and feedback. How do I include these (without using an #include directive in each user story )? Should I treat error presentation as a feature, then have user stories for this feature like "system catches exception, and shows info to user"?


Is Java easy decompilation a factor worth considering

We are considering the programming language for a desktop application with extended GUI use (tables, windows) and heavy database use. We considered Java for use however the fact that it can be decompiled back very easily into source code is holding us back. There are of course many obfuscators available however they are just that: obfuscators. The only obfuscation worth doing we got was stripping function and variables names into meaningless letters and numbers so that at least stealing code and renaming it back into something meaningful is too much work and we are 100% sure it is not reversible back in any automated way. However as it concerns to protecting internals (like password hashes or sensible variables content) we found obfuscators really lacking. Is there any way to make Java applications as hard to decode as .exe counterparts? And is it a factor to consider when deciding whether to develop in Java a desktop application?


Should an API platform enforce only receiving JSON requests?

I am building an API platform. I have already ensured that the platform always returns JSON responses. My question is **Should my API platform enforce the rule that all requests must be JSON? What are the benefits of making all requests to be JSON?** I understand the benefits of making all responses to be JSON as this means consistency for the client apps using the API. I fail to see the benefits of making all requests to be JSON as well. I am asking this because GitHub API v3 appears to be enforcing this rule. My API platform will involve uploading of files in the requests. As far as I know, JSON requests does not work well with file uploads. Or do I do a hybrid? Enforce that anything NOT to do with file upload should send their requests as JSON? And allow an exception for file upload?


Relation of CPU Hz's and network speed in clusters

In cluster the Amdahl's law, Gustafson's law exists. I though that there might be some law which states the relation between CPU Hz's and network speed: maximum network speed after which no additional Mbps would increase the calculations. Does such limits exists and what it depends on?


Minimum Software for Learning C#, ASP.NET, Winforms

What is the minimum software list that one should be looking at for learning C#, ASP.NET, WinForms. I do have a system which has Windows 2003 installed in it. I am looking at something like WAMP for C#.NET development. Do we have a listing? Something along the following lines   1. Visual Studio 2010 Express Edition   2. IIS   3. My SQL (anything specific to C#.NET or should it definitely be SQL Server 2005/2008 Express Edition)   4. LINQPad   5. Anything else?


Scheduling between child and parent process

When child processes are created using the fork system call what is there scheduling priorities..are they same? if so will always a child process run first and then parent...or is there a manipulation to this pattern. I have a implementation which apparently is running the parent process first. Is this expected?


What are things to be taken care of before putting your app in android market?

I have developed a small android app. I am planning to release it in Google Android market. What are the things I should be aware of before doing this?


What programming issues require a delay in processing a mail unsubscribe request?

Whenever I unsubscribe from a mailing list, I see that they say something like 'The change will take effect in 10 days/30 days/etc'. I would assume unsubscribing is just removing my email from some database. What is the idea behind making me wait so many days? Edit: Since this question is close here as off-topic, I have opened it here in Superuser. Closed in Superuser too. So rephrasing the question here.


Would this data requirement suit a Document -Oriented database?

I have a requirement to allow users to fill in journal/diary entries per day. I want to provide a handful of known journal templates with x columns to fill in. An example might be a thought diary; a user has to record a thought in one column, describe the situation, rate how they felt etc. The other requirement is that a user should be able to create their own diary templates. They might have a need for a 10 column diary entry per day and might need to rate some aspect out of 50 instead of 10. In an RDBMS, I can see this getting quite complicated. I could have individual tables for my known templates as the fields will be fixed. But for custom diary templates I imagine I would would need a table storing custom_field_types (the diary columns), a table storing entries referencing their field types (custom_entries) and then a third custom_diary table which would store rows matching custom_entries to diaries. Leaving performance / scaling aside, would it be any simpler or make more sense to use a document oriented database like MongoDB to store this data? This is for a web application which might later need an API for mobile devices.


Is there any advantage to learning C first?

I've got a little bit of history with programming, having gotten my start with Visual Basic. I let it slide as a hobby from a little after VB6 up until just a year or so ago when I got on the iPhone bandwagon, when I decided to take up Objective-C programming. I now have what I feel to be an intermediate level of knowledge on the language, but I can't help but feel that there's a substantial gap in where my knowledge is, given that there seems to be a substantial bit of the language I don't feel I understand. Would I benefit from reviewing the underlying C structure, or would I be better served from continuing to practice solely in Objective-C whilst reviewing the documentation for various features? **Edit:** Though I've accepted the first answer given, more insight is always appreciated from those with supplementary or opposing views.


Refactoring techniques for asp.net webforms application

I'm working on a large application written in asp.net web forms. It was developed under asp.net 1.0, and still uses DataGrid, though portions have been updated. Most of the code resides in either the codebehind, or in controller classes that can't be instantiated outside of a running IIS. (The controller framework we use provides lifetime management tied to session state.) Data access is through a custom DAL, meaning that most of that code also requires a live database with proper data inside it. I want to decouple the code from the database and the web server, so that I can run it under a test harness. Are there any good strategies for moving from this sort of code to a more testable structure?


Dealing with units in arithmetic operations (multiplication and division)

I need to design a function to perform the basic arithmetic operations that are `addition (+)`, `subtraction (-)`, `multiplication (x)`, and `division (/)` between 2 numbers. That function takes 3 arguments:   -`number1`: composed of a `value` and a `unit`.   -`number2`: compoased of a `value` and a `unit`.   -`operation_type`: one of the 4 aforementioned operations.  and should return:   -`number3`: composed of a `value` and a `unit`.  Returning `number3`'s `value` is easy as all I need to do is use conditional statements to perform the corresponding operation (e.g. `if (operation_type == 'addition') { number3.value = number1.value + number2.value; }` ). However I'm having difficulties figuring out how I should represent and deal with the `unit` ( _for`multiplication` and `subtraction` operations, as for `addition` and `subtraction` it remains the same_) in a way that I can chain up multiple operations and properly update the resulting `unit` every time. Here is an example:               operations type: multiplications     number1.unit: Kw     number2.unit: h / user / year     number3.unit: Kwh / user / year  _                                       |     number1.unit: Kwh / user / year  <-     number2.unit: user     number3.unit: Kwh / year  _                                |     number1.unit: Kwh / year  <-     number2.unit: year     number3.unit: Kwh     ...      My only constraint is that the `unit` must initially be represented as a `string` because it is stored in the database, then we can parse parse it into an `object/array` as needed. Some of the problems I'm facing:   **Q1: how to ensure consistent order in the resulting unit (e.g.`h x Kw` and `Kw x h` should both give `Kwh`)?**   **Q2: how to deal with complex units (e.g.`foo / Kw x h / bar`)?** And because hope dies last:   **Q3: Are there any known algorithms / design patterns for dealing with this?**


Is it conceivable to have millions of lists of data in memory in Python?

I have over the last 30 days been developing a Python application that utilizes a MySQL database of information (specifically about Norwegian addresses) to perform address validation and correction. The database contains approximately 2.1 million rows (43 columns) of data and occupies 640MB of disk space. I'm thinking about speed optimizations, and I've got to assume that when validating 10,000+ addresses, each validation running up to 20 queries to the database, networking is a speed bottleneck. I haven't done any measuring or timing yet, and I'm sure there are simpler ways of speed optimizing the application at the moment, but I just want to get the experts' opinions on how realistic it is to load this amount of data into a row-of-rows structure in Python. Also, would it even be any faster? Surely MySQL is optimized for looking up records among vast amounts of data, so how much help would it even be to remove the networking step? Can you imagine any other viable methods of removing the networking step? The location of the MySQL server will vary, as the application might well be run from a laptop at home or at the office, where the server would be local.


Why aren't Object Oriented databases used as much as Relational Databases?

I have come across many relational database management systems (RDBMS). But recently I used hibernate which made me start wondering why Object Oriented databases aren't more popular. If object oriented languages like Java or C# are so popular, then why aren't object-oriented database management systems (OODBMS) more popular too?


How can I unit-test my REST web service?

I am new to unit testing, I've one REST web method that just calls DB and populates a DTO. Pseudo code is               public object GetCustomer(int id)     {       CustomerDTO objCust = //get from DB       return objCust;     }      My doubt is how to write tests for these methods and type of tests (Integration/Unit) to be included. And for unit tests, does it need to hit the DB. If it were and I pass a customer id and do few assertions, the data might change eventually resulting in failures. I think I am missing something here understanding these concepts.


How to become an Eclipse contributor?

I dont think I get enough programming at work so I'm thinking of doing some contributions to Eclipse. Seems that might be the only way to get some of my bugs fixed :) But how do I get started? What are the requirements in regards to software used? What is the typical process? Any special do/don'ts one needs to know?


What are your thoughts on online editors?

Currently, I'm an Emacs user, (I'm used to the commands, and I work in a bunch of different languages day-to-day, one of which is Common Lisp, so it's the natural choice), but a recent-ish talk by Steve Yegge has gotten me thinking that an online editor/IDE (if done well) might provide a lot of benefits. Both in terms of tracking large code-bases, and in terms of supporting editing at the same highly-interactive level for many languages. The Bespin roadmap makes it sound like they're going in the same direction and there are also web-based implementations of both Emacs and vi (none of which I have any experience with). My question is twofold. First, are any of these editors ready for prime-time? Meaning, are they at least on-par with desktop based editors? If not, do they reliably bring any of they benefits that a server-based implementation could support (things like fully combined VCS/editor/server-side preview/storage, real IDE-level support for many disparate languages, support for team coding/remote pair programming, etc.)? I'm more interested in experience than speculation here. Second, where do you see the concept going? Are editors eventually evolving into services, are they staying on the desktop, or will we get to a hybrid system that supports local editing but provide certain, cluster-friendly pieces through a network connection? Feel free to speculate on this part.


Keeping a connection string secure when working with others

Say you've started an open source project and are posting it on a public repository. (like I have, using Codeplex.) One of the key files just makes the connection to the database, contains the login/password, and is just included from any other source file that needs a database connection. What's the best way to share the project without giving out your password? So far I've specifically removed it before committing any changes, but I'm thinking there has to be a better way.


Why does Java not permit the use of headers as in C++

I have a question that I did not find an answer for except the following answer that does not meet my requirements: > "Because James Gosling didn't want to" I know that Java can have interfaces (only pure virtual functions, no attributes), but it is not the exact same thing as class definitions.


What Does "The Program Must Process Each Character Before Reading the Next One" Mean?

From the book _Think Like a Programmer_ (emphasis mine) > The Luhn formula is a widely used system for validating identification > numbers. Using the original number, double the value of every other digit. > Then add the values of the individual digits together (if a doubled value > now has two digits, add the digits individually). The identification number > is valid if the sum is divisible by 10. Write a program that takes an > identification number of arbitrary length and determines whether the number > is valid under the Luhn formula. **The program must process each character > before reading the next one.** In a broader sense, what does it mean to process each character before reading the next one? What does this look like syntactically? What does the opposite mean and what does _it_ look like syntactically? **Update:** For some background, here's my attempt at the problem (in JavaScript):               Array.prototype.sum = function() {         var sum = 0,             itemCount = this.length,             i;              for(i = 0; i <= itemCount - 1; i++) {             sum += this[i];         }              return sum;     }          function validateNumberWithLuhnForumla(number) {         var numbersArray = number.toString().split(''),             numberCount = numbersArray.length,             i = 0,             isValid = false,             doubledDigit,             checksum,             numbersToSum = [];                   for(i = 0; i <= numberCount - 1; i++) {             if(i % 2 > 0 && i > 0) {                 doubledDigit = numbersArray[i] * 2;                 if(doubledDigit > 9) {                     numbersToSum.push(1, (doubledDigit - 10));                 } else {                     numbersToSum.push(doubledDigit);                 }             }         }              checkSum = numbersToSum.sum();              if(checkSum % 10 === 0) {             isValid = true;         }              return isValid;     }


Syncing objects from code with the view in WPF

I've been reading some into it, but I am time pressed, so I would require a simple solution now and I promise to read up on it later. I come from a winforms c# background, and have lately been working with WPF. As the user interface I'm implementing is not that input intensive, I've gotten by with using INotifyPropertyChanged so far. Until I ran into this: I have a 3D interface from a third party library (MogreInWpf). Upon clicking an object in the 3D interface, I need to display some of the object's properties (position, size etc). Here's how my code-behind looks. I have a class, let's call it objectOfInterest, that saves all these properties, the 3D data and includes some methods that manipulate the object. In one of these methods, I generate a Grid containing textboxes to simulate name-value pairs of properties. Like "X position:" "134". As these properties are only user- changed, I've managed to bind the textbox on text changed event to respond to most changes, IE when the size is changed from 134 to 1345. Once this grid is generated, it is set to display in the main window using a ContentPresenter and setting its content to the objectOfInterest.grid. Works like a charm. Now, I have to implement a property that changes how the properties grid look like depending on a combobox included in this grid. For example, if the object is a cube, I want width/height/length to show, while I only want a radius property to show if it's a sphere. I'm kind of stuck here, as regenerating the grid upon combobox selectedValueChanged doesn't notify the view, and the generating occurs in the objectOfInterest class instead of the main window class, meaning I can't rebind the grid once it's regenerated (I cannot call contentPresenter.Content = objectOfInterest.grid again, as the main window has no idea the instances grid has changed). So, without completely understanding the MVVM methods and rewriting most of the application to fit the model, how can this be accomplished?


processing Postfix log with python

I need to process all log messages from Postfix (`/var/log/mail/mail.log`), and print a summary/statistics (how many emails were sent/received and from/to which email addresses) The situation is made more complicated by the fact, that Postfix has multi- line log entries (in contrast, `Apache` for example, has single line entries and the task would have been much easier). A sample Postfix log might look something like this:               2013-12-03 14:40:45  postfix:  6F1AA10B: client=unknown[64.12.143.81]     2013-12-03 14:40:45  postfix:  6F1AA10B: message-id=<529DDF56.6050403@aol.com>     2013-12-03 14:40:45  postfix:  6F1AA10B: from=<martin.vegter@aol.com>, size=1571, nrcpt=1 (queue active)     2013-12-03 14:40:45  postfix:  6F1AA10B: to=<martin@example.com>, relay=local, delay=0.13, delays=0.13     2013-12-03 14:40:45  postfix:  6F1AA10B: removed          2013-12-03 14:52:07  postfix:  9DD9610B: client=unknown[209.85.219.65]     2013-12-03 14:52:07  postfix:  9DD9610B: message-id=<CANE3EAQUsGwj6ZBAU-awymzsG=76XZnHih@mail.gmail.com>     2013-12-03 14:52:07  postfix:  9DD9610B: from=<martin.vegter@gmail.com>, size=2388, nrcpt=1 (queue active)     2013-12-03 14:52:07  postfix:  9DD9610B: to=<martin@example.com>, orig_to=<martin@example.com>, relay=local     2013-12-03 14:52:07  postfix:  9DD9610B: removed      Every email message that was processed by Postfix has a unique message ID (in my example `6F1AA10B`). What would be the best approach to process the logs in Python? What data structure would you recommend to use for storing the entries?


What is the difference between a Software Test Engineer and Software Test Analyst?

Do they differ in role and responsibilities. Or the terms are dependant on geographical area.


Difference between MPL 2.0 and LGPL 2.1 (+static linking exception)?

Is there a difference between MPL 2.0 and LGPL 2.1 ( **+static linking exception** )? If yes, what is it? As long as i understand the only difference between them is you can't use trademarks of contributors under MPL[1].


Force users to update to the latest version of my app on the Google Play Store

Is there a way to have a "critical update" for my app on the Google Play Store that would require the user to update the app to keep using it? For instance, let say I push an update that brings a few bugfixes. Nothing mandatory, the user updates it if he wants to: that's a non-critical update. Now, say I correct a very serious security issue on my app and want all the users to update to this version to keep using the app: this is a critical update. Basically, if there is a critical update and the user has not updated yet, he cannot use the app until he does so. Is this possible using the Play Store? Thanks for your feedback!


Am I too young to be worrying about college right now?

I'm 19 and have been a hobbyist programmer since I was a freshman in high school (2002). I recently graduated in May of '08. Right out of high school I had my first job programming contract work for a company (got noticed off of my personal website). Originally the CEO and I had discussed working for about a year from home before going out there, as recently graduated, no previous jobs, no money, and them wanting me to move across the United States, after 6 weeks of work and two projects I made my decision to stay with my family because my father might lose his job, and with my sister and mother trying to finish college I want to be here to help out in case things get real rough. - Contract work stopped there, which was fine with me, I expected it. During my time working for them I learned at a rapid rate, and I was very eager and happy to work well over 12 hours a day to get whatever they threw at me done. I worked directly under a senior developer, whose a friend of mine and they seemed to like my work and that I was doing a good job. Working for them as a whole was very good, professional, and very comfortable. I've always thought that school is a joke and doesn't really prove anything (my high school grades show it, minus all the technology classes I aced) - But I always feel that I don't truly know enough to secure a good programming job. Visual Basic .NET, C#, WinForms, sockets, are some of my skills.., but I am very modest about what I know, because there is just so much I need to learn. Question is.. how valuable can college "really" be? How can I really polish my skills up and fill in the holes of knowledge I may be missing? How can I really find out what I need to focus on, and where to go next? I find myself overwhelmed a lot of the time because I try to run a software development website, many projects, as well as helping other programmers who know much less than me, and of course personal life, its all very frustrating. I have many directions to go, but I'm paralyzed in which way to pick.. I've read many topics on this already here, and on the net, but I'm young still and it feels like a lot of it doesn't apply to me.


Best way to manage minutes of meeting

What is the best way of managing minutes of meeting on daily bases ? Do we have to manage the documents in a repository like VSS or it can be maintained in a excel sheet itself. Kindly share your experience for the same and guide. Thanks in advance


Is securing the credit card data is considered a requirement from the customer

I'm taking an Introduction to Agile Software Development course, The instructor was discussing an example about online store and asked us to write the **User Stories** and the **Conditions of satisfactions** and one story was _As a user I can commit for marketing card that was selected previously in order to buy my goods_ , the conditions of satisfactions in this case contained some conditions in addition to **The system must secure the Credit Card data across the internet connection using https**   * I disagreed with that and said this is a thing that must be done, not just in case the user asked me to protect it, and it is a fatal threat like or more important than SQl Injections and this is a non-functional requirement at the technical level and if the user mention it or didn't this must be taken in our development, some project managers in the course showed their disagreement and said this is a time wast on features that the user didn't ask for!, the instructor didn't give my comment any attention and didn't reply to me. I really think I'm true and not convinced, but all of those trained people disagreed with me[I'm new in the software engineering field but used always to work as a developer], so I'm asking you about this.


Are there any large scale enterprise frameworks for PHP

I'm curious if there are any commonly used large enterprise frameworks for PHP that would be your whole or most of your environment if you were working in PHP. Something comparable to ASP.NET's WebForms or MVC in that when you're working in either one, most of your code and system is based off of working integratively within that framework. Edit: Specifically I'm looking for a framework that fit's the bill of basically being what you would use for 99% of your work in writing your website, this means:   * data retrieval, some kind of ORM in the framework   * data representation, some kind of data aware automatically configured UI controls that make reading and writing to a DB easy   * data caching   * data serialization   * data communication, an easy way to generate and host web services of various sorts


I have an IT background and was pretty confident until an opportunity came up at work to go into programming(C#). I have never programmed before this, and the software I am programming for is a program I have never used before (a 3D modeling software). It has been 6 months since then and I feel like giving up. I didn't get much training... about 3 weeks of training spread out over the last 6 months. I think I would be good at programming but this experience is making me rethink my decision. I'm not sure if it's just me, or if this frustration is normal. How can I figure out if programming is right for me?


How do I make a .sh file that counts each time you compile?

I wanted to compile my program and I wanted to know how many times I have compiled it. How do I make a .sh file to do that? (I'm using mac, is it .sh file?)


Best practices to avoid fake profiles?

When offering to create a profile (for example, login+pwd) for a web service, what are the best practices one should implement to avoid mass spamming/creation of fake profiles? I am thinking about email confirmation, captchas, etc... any other ideas that work in practice?