What are some possible accreditations I could get over 4 months toward being a software developer?

We have a family business and I need to be in India, Delhi for 4 months as a part of a business trip. I won't be doing much all day. I already have a degree in economics, but I also love software. Over the years I have taken different courses. I even took a degree in software engineering, completed the first 2 years but then I left for family reasons. It did not affect me as I already had a degree and also the family business. Now I am thinking what are some of the things I can do in the 4 months that I will be there. Programming lessons is one of them, in some of the languages that I am not familiar with, but what else? Are there any certifications I can get?


When writing a library, how much should the end user do?

First off, this question goes beyond my example (don't want this to be too localized or migrated to Stack Overflow) but I've come across this when thinking about something I wanted to try in C so I thought I'd use that as an example. So my idea is to create a generic linked list in C and started it last night and it is coming along pretty well for being new in C. The issue I ran into is type casting and it leads me to this question: how much work should a library designer expect the end user to do when using the library? If you take my example, right now, I don't perform any casts and return an Object (which is a typedef of void*). Is it reasonable to make sure that the end user keeps track of their types or should the library designer make sure that the list is type safe (I think I have a general idea on how to implement that for at least the built in data types)? Is it reasonable, when designing a library to expect a certain amount of work on the end users part to use the library or should it be dumbed down as much as possible? Are there factors that would affect this decision, such as language?


What are the features required for Object Orientation?

I am just wondering, what exactly are the features a language or a library must provide in order for it to be defined as 'Object Oriented'. Is Object Orientation something that can, more or less, be achieved in **any** general- purpose programming language with decent features? Or is it something that can only be achieved in languages that specifically advertise that they support Object Oriented Programming? For example, look at the following C code:               SDL_Surface* screen = SDL_SetVideoMode( 640, 480, 16, SDL_HWSURFACE);     SDL_FreeSurface( screen );      or the code discussed here. Now the above code does not use inheritance , runtime-polymorphism ( ? ) , virtual functions etc. But it seems pretty much OOP to me. Is Object-Orientation simply writing code which is based on creatable and destructable data structures such as objects, classes, structs etc. which does not require on any special pattern or features provided by the Programming Language or a library ?


What is an efficient way to retrieve product counts at multiple levels of a hierarchy?

I'm working on an e-business website to sell books and also want to display the number of available books in the category list. The category list contains the genre and the format (pocket, ebook, audiobook etc). In each element in genre and format I would like to display the number of available products from the stock list. Of course, when you go deeper into the hierarchy, you retrieve more specific information of available books at that level. For instance there are 2000 available books in the "medicine" genre and if I select the "pocket" format then there are 200 available books left. In other words, you have combined "pocket" and "medicine" and you know now that there are 200 available pocket books in total in the "medicine" genre. My question is: How do you create that functionality without making lots of effort to ask the database about the amount of available products in each element? Do you need to buy a special application or plugin? Please remember that there are millions of books in the database. ![enter image description here](http://i.stack.imgur.com/MJ4eh.png)


How to determine number of resources to be allocated in a software project?

Last day I have been interviewed and the interviewer asked me as given the outline of a project, how can we determine the number of resources to be needed for the same? I don't know to do so. Is there any standard way of doing so? or is it based on the experience? Or how? I am pretty new in this activity and my knowledge is zero at present .... so any clear explanation with some example(simple) will help me(and people like me) to understand this.


Cloud differential backup

I am responsible for the design and development of a cloud backup application. Currently we are using xDelta to do differential backup so that only the changed parts of the files gets uploaded. This cuts cost for both us the company and the user. One issue we are having with this approach is that in order to do a differential backup the modified file needs to be compared to the original file. To solve this we opted for a quick solution and that is to cache the original files on the users' computer for a quick reference. Now this solution works brilliantly for desktop/home users where the file sizes are relatively small. The problem arise when say a server administrator tries to backup an sql database for example that is 100GB in size. Though currently we cache the file on disk, this is definitely not appreciated by server administrators since we are filling their drives with cached files. I am wondering if there is any other approach to do differential backups without the need of having the original files on disk permanently.


Top bad practices in MySQL

There was another post allowing people to post their top bad practices in PHP, I had a gripe about MySQL practices and thought it'd be an interesting topic to hear the top bad practices in MySQL. Up vote the ones you agree with


What are the standard directory layouts for source code?

I'm in the process of proposing a new standard directory layout that will be used across all the projects in our organization. Projects can have compiled source code, setup scripts, build scripts, third-party libraries, database scripts, resources, web services, web sites, etc. This is partly inspired by discovering Maven's standard layout. Are there any other standard layouts that are generally accepted in the industry?


What (free) on-line conferences or video sites about tech stuff do you know?

Instead of TV, I prefer to watch (free) on-line conferences or videos. As a software developer, my favorites are:   * InfoQ   * MSDN Channel 9   * Google TechTalks   * LinkedIn TechTalks   * TED   * Business Of Software blog (I like entrepreneurship too) Maybe I'm losing other valuable sources (about software and startups) of these kind of content. So, can you suggest other specialized sites like these?


Does it make sense to use a personal Amazon Cloud Drive to host an SVN repository?

I have 5GB of free storage on Amazon's Cloud Drive service that I'm not using, so I'm wondering: is it possible to create an SVN repository and be able to commit/update through TortoiseSVN? I have an account at Assembla.com and use it for all my personal/school projects and love it, but Assembla has a 2GB limit.


Hibernate set up for beginner

I am learning Hibernate (OR Mapping). I am using Maven for project management. However, I am currently reading a Hibernate book by O'Reilly, and they use ANT for their example. So my question is are there any difference between setting up hibernate with ANT and Maven? Thanks in advance!


typedefs and #defines

We all have definitely used `typedef`s and `#define`s one time or the other. Today while working with them, I started pondering on a thing. Consider the below 2 situations to use `int` data type with another name:               typedef int MYINTEGER      and               #define MYINTEGER int      Like above situation, we can, in many situations, very well accomplish a thing using #define, and also do the same using typedef, although the ways in which we do the same may be quite different. #define can also perform MACRO actions which a typedef cannot. Although the basic reason for using them is the different, how different is their working? When should one be preferred over the other when both can be used? Also, is one guaranteed to be faster than the other in which situations? (e.g. #define is preprocessor directive, so everything is done way earlier than at compiling or runtime).


How should repetitive calendar tasks be stored in the database?

This is for a small personal project for micro-management. Basically, I store tasks in a SQLite3 database that looks like this:                   id INTEGER PRIMARY KEY AUTOINCREMENT         label TEXT         deadline INTEGER      So each task has a due date (deadline) that is stored as a Unix Time Stamp. So far so good, I can do entries such as "tomorrow: visit grandma" and a new row gets created with "visit grandma" as the label and _tomorrow_ transformed as Unix time for deadline. Now I would like to enter new type of tasks: routines - tasks repeated on a time pattern, like "everyday: clean kitchen". How can such tasks be stored or modeled? For the moment, I am thinking that, in the case of a task that needs to be done everyday, to generate new rows in my table that would have the same label, and the deadline field incremented by one day. In this case, I need to fix a limit in the future. For example, if I create a routine for every day, it creates a new row for everyday of the remaining year. Is there a simpler way to do this? Am I missing some obvious database design principles?


What techniques should I keep in mind in order to design efficient algorithms in PHP?

I am trying to solve programming challenges on www.interviewstreet.com using PHP. Are there certain techniques I should keep in mind that will optimize the efficiency of the algorithm? For example, I read that using PHP's language constructs versus function calls are faster. Is this true? Any other tips?


Delegates and events

What is the difference between               public delegate void SecondChangedHandler(Object clock, TimeInfoEventArgs ti);     public event SecondChangedHandler OnSecondChanged;      and               public event EventHandler<TimeInfoEventArgs> OnSecondChanged;      When should you use which and is there any best practice?


Calculating 3d rotation around random axis

This is actually a solved problem, but I want to understand why my original method didn't work (hoping someone with more knowledge can explain). (Keep in mind, I've not very experienced in 3d programming, having only played with the very basic for a little bit...nor do I have a lot of mathematical experience in this area). I wanted to animate a point rotating around another point at a random axis, say a 45 degrees along the y axis (think of an electron around a nucleus). I know how to rotate using the transform matrix along the X, Y and Z axis, but not an arbitrary (45 degree) axis. Eventually after some research I found a suggestion: Rotate the point by -45 degrees around the Z so that it is aligned. Then rotate by some increment along the Y axis, then rotate it back +45 degrees for every frame tick. While this certainly worked, I felt that it seemed to be more work then needed (too many method calls, math, etc) and would probably be pretty slow at runtime with many points to deal with. I thought maybe it was possible to combine all the rotation matrixes involve into 1 rotation matrix and use that as a single operation. Something like:                [ cos(-45)    -sin(-45)         0]      [ sin(-45)     cos(-45)         0]      rotate by -45 along Z       [    0            0             1]      multiply by                [ cos(2)          0       -sin(2)]      [    0            1            0 ]      rotate by 2 degrees (my increment) along Y      [ sin(2)          0        cos(2)]      then multiply that result by (in that order)                [ cos(45)      -sin(45)         0]      [ sin(45)       cos(45)         0]      rotate by 45 along Z       [    0            0             1]      I get 1 mess of a matrix of numbers (since I was working with unknowns and 2 angles), but I felt like it should work. It did not and I found a solution on wiki using a different matirx, but that is something else. I'm not sure if maybe I made an error in multiplying, but my question is: this is actually a viable way to solve the problem, to take all the separate transformations, combine them via multiplying, then use that or not?


Can I use a project code which has New BSD license but uses a GPL license library?

I want to use the ICSOpenVpn project source code in my commercial application. If we see the ICSOpenVpn project, it states that its license is New BSD but the libopenvpn.so library it uses is under GNU GPLv2 license. As per FAQ for version 2 of GNU GPL "If a library is released under the GPL (not the LGPL), does that mean that any program which uses it has to be under the GPL?" The answer says: "Yes, because the program as it is actually run includes the library." Also, how could ICSOpenVpn change the license to New BSD?


Open source licensing of derived works

I derived an open-sourced work, Service-Nucleus, based on Netflix's Karyon (Apache License) and Google's AngularJS (MIT License). I want to make sure proper licensing and copyrights are in place, and I am not sure how to honor those projects and move forward legitimately at the same time. I've researched this to some length and it's a soupy mess out there. Any advice would be greatly appreciated. I currently provide the Apache License from NetFlix at the root.


Overwhelmed at Internship

My best friend just started his internship a month ago. The problem is he is discouraged. He was a good A+ student at school, and he is feeling that he doesn't know anything at all. The issues he is working on, although they are on languages he feels comfortable in, seem so alien to him, he said. He's getting really discouraged, like he does not know the code base at all. I keep trying to tell him that it will just take time and that he is expected to have lots of questions. What should I tell him?


Run a function when a function in a list is executed?

**Goal** : I'm currently doing an MVC project and I have this method to update the ViewBag (based on previous actions of the user). I would like to call this function whenever a certain list of MVC Actions are called (most of them). **Questions** :   1. Would an observer pattern fit my problem? (I'm reading about them at the moment, starting to sound like it would).   2. If so, would it be overkill for something so simple or would it be in good practice?   3. Am I looking in the right direction or is their a better way to reach my goal? The user has an "ActiveEntity" in the session once they select one and I need to display the entity's name, date, etc. when most pages are loaded (as part of the header information). The catch is that I'm using other data for the model as I have a large hierarchy of data to display (parts/levels at a time) and the ViewBag is an acceptable location to store the data that acts similar to header-information(I think?). Is my approach correct? Might someone be able to point me in a good direction?


When using "Github Flow", what if my next feature depends on code from a pending Pull Request?

We are experimenting with "Github Flow", as defined here. In short, every change starts off as a well-named branch off of master. When it's done, you open a PR for that branch, it gets reviewed, and then gets merged into master. It's a very simple workflow. However, we have run into this a couple of times: I develop feature X, and open a PR for it. While I'm waiting for the PR for X to be reviewed, I want to start work on another feature Y, but I need the code from PR X. Should I just start a branch from the feature X branch, or if I've already started feature Y, just merge feature X into the feature Y branch? It seems so, but I wanted to check with other teams that are following this model to see how they handled multiple PRs and features that are dependent upon each other.


SVN - Is it OK to use any flavor of SVN amongst the team?

Is it OK if, within a team, developers use different flavors of SVN? Say one using Tortoise SVN and other using Versionsapp.com SVN?


Windows Azure vs GAE vs AWS - for process based application

I am writing an application that will crawl web pages and analyze data, and I'm wondering if I can host this as a cloud-based service. The main reason I'm looking at cloud hosting is that users may process thousands of pages at once, and I need to return data as quickly as possible. The user will have software installed on their computer that will communicate with this application. If, for example, each page takes 10 seconds to process, is it possible to set up auto scaling so that a user can process 1, 10 or 10,000 pages in the same amount of time (ie: 10 seconds) by simply adding and removing instances as needed? Note: Each process requires little RAM/CPU resources, so it will be possible to process multiple pages in a single instance but for this example, I'll simplified it to 1 instance per process. If so, which cloud-based service is best suited for this task?


Does not documenting code result in job security?

> **Possible Duplicate:**   >  Should you write good documentation and clean code to increase the "Bus > Factor"? I often ask young programmers why they are not documenting their code. Their responses, perhaps jokingly, frequently include "job security." I hear this from experienced professionals, too. And not just in programming; network engineers and system administrators widely subscribe to this belief. Can you really ensure job security by holding the details of your work in your head rather than on paper (or in files)? What's your experience?


Initialization of objects in a system using dependency injection

This is a follow up question to the following post: Injecting dependencies (DI) in c++ applications In a system that uses DI, someone, somewhere should be responsible to create the various objects and "wire" them. I find it difficult to figure out who should do this. I read about one option that it should be the "root class". However, in that case it seems that the root class might be responsible for creating a very large number of objects. I though of an option to use smaller builder classes that will be used the root class - is that a good way to do it? Note: I tagged 'C++' in this question because I am developing in C++. I am not sure if it makes any difference to the answer.


Pattern to safely establish a one to one bidirectional relationship

Let suppose we have 2 classes, `Pilot` and `Plane`, being in an optional one- to-one relationship. So a `Plane` might have a pilot when it's flying, but when it's standing in its hangar, it has none. Similar for the `Pilot`. It would be just logical to hold a pointer to the `Plane` in the `Pilot` and a pointer to the `Pilot` in the `Plane`, accessible via getters and setters. Constructing the setters so that a call on any of them establishes the bidirectional relationship is surprisingly hard. I was even more surprised that I couldn't find a suitable solution on the web as this construct seems to be common to me. Does anyone know of concepts that would encapsulate such a relationship inside a class? Or an idiom to stick with normal getters/setters and still establish the relationship with one setPilot/setPlane call?


Which past version of Netbeans IDE that has lightness almost equal or better than Eclipse Indigo?

Currently, I'm a long Eclipse user because my past and current companies always deal with eclipse. Recently I met some example java codes created using netbeans. I downloaded and tried Netbeans 7.x and 6.9.x, but they're more heavier and eating memory resources than Eclipse Indigo. So anyone know which past version of Netbeans IDE that has lightness almost equal to or better than Eclipse Indigo (3.7) but can support Java SDK v1.6?


Restrict access to backend

This might be one of those "not answerable" or "just opinions"-questions but I thought I'd give it a shot. I'm developing an app with health care information with a friend who's a doctor. The basics of app are done and the information in the database is shaping up so now I've come to the question of wether, and if so how, I should restrict access to that information to just my app. The question of if is one I can answer, but any opinions are welcome. The question of how is where I need your help. The app is written in Java on Android and the backend in Django, what ways do you see for restricting access to the backend so that other scripts/apps can't access it? One idea I had was for the phone to request an api key on first start and bind it to the IMIE number which I think is unique for each phone, then keep track of those tuples on the server. We(as in I) will likely port this to iOS at some stage, so it needs to be fairly cross-platform, I thought about binding to google accounts instead of IMIE number before.


Is Linq having a mind-numbing effect on .NET programmers?

A lot of us started seeing this phenomenon with jQuery about a year ago when people started asking how to do absolutely insane things like retrieve the query string with jQuery. The difference between the _library_ (jQuery) and the _language_ (JavaScript) is apparently lost on many programmers, and results in a lot of inappropriate, convoluted code being written where it is not necessary. Maybe it's just my imagination, but I swear I'm starting to see an uptick in the number of questions where people are asking to do similarly insane things with Linq, like find ranges in a sorted array. I can't get over how thoroughly inappropriate the Linq extensions are for solving that problem, but more importantly the fact that the author just _assumed that the ideal solution would involve Linq_ without actually _thinking_ about it (as far as I can tell). It seems that we are repeating history, breeding a new generation of .NET programmers who can't tell the difference between the language (C#/VB.NET) and the library (Linq). What is responsible for this phenomenon? Is it just hype? Magpie tendencies? Has Linq picked up a reputation as a form of magic, where instead of actually writing code you just have to utter the right incantation? I'm hardly satisfied with those explanations but I can't really think of anything else. More importantly, is it really a problem, and if so, what's the best way to help enlighten these people?


Can I remove a company's logo from a software licensed under Mozilla Public License Version 1.1?

I have tried looking for an answer to this question, but I couldn't find anything related. To put it in a nutshell, I want to fork the existing Komodo Edit project, which is licensed under MPL Version 1.1, and create a new derived project/software. I would like to remove certain features from the current project, including ActiveState's logo, but I do not understand the technical jargon on the license. Also, I plan to keep the derived project completely free and open-source. I'd be really grateful, if someone could explain it to me. Here is the link to the license : https://github.com/Komodo/KomodoEdit/blob/trunk/LICENSE.txt


Handling Indirection and keeping layers of method calls, objects, and even xml files straight

How do you keep everything straight as you trace deeply into a piece of software through multiple method calls, object constructors, object factories, and even spring wiring. I find that 4 or 5 method calls are easy to keep in my head, but once you are going to 8 or 9 calls deep it gets hard to keep track of everything. Are there strategies for keeping everything straight? In particular, I might be looking for how to do task x, but then as I trace down (or up) I lose track of that goal, or I find multiple layers need changes, but then I lose track of which changes as I trace all the way down. Or I have tentative plans that I find out are not valid but then during the tracing I forget that the plan is invalid and try to consider the same plan all over again killing time.... Is there software that might be able to help out? grep and even eclipse can help me to do the actual tracing from a call to the definition but I'm more worried about keeping track of everything including the de-facto plan for what has to change (which might vary as you go down/up and realize the prior plan was poor). In the past I have dealt with a few big methods that you trace and pretty much can figure out what is going on within a few calls. But now there are dozens of really tiny methods, many just a single call to another method/constructor and it is hard to keep track of them all.


What should I learn after Python?

I am 12 years old and have mastered the basics of Python with Learn Python The Hard Way by Zed Shaw (I think) and it has done me well. What should I do next? Do you have any recommended books or good website tutorials? What do you need to know before learning C?


Benefits of using object document mapping (ODM)

I am creating a web app on Flask and was planning to use mongodb. Most of the examples using this stack that I've come across have used an ODM of some kind and was wanting to figure out whether or not I should as well. I have worked with ORM for a Java web app before and found its utility to be limited and apart from preferring just using JDBC and writing the sql myself, we came across a few instances where our own hand written queries increased performance noticeably. I realize that the NoSQL db is a different beast, so I was just wondering if there are many parallels between ORM and ODM and the issues I observed with ORM. Might there be performance hits in some instances using an ODM with mongodb? Is the only benefit ease of use/natural translation between code and db objects? I have no quarms about Essentially, I am wanting to know if I am missing out on too much by just using plain old `pymongo` in the flask application rather than an ODM? PS. If it is important, I expect my application to be high volume but balanced read/right in nature.


MIT and copyright

I am contributing to a library that is licensed under the MIT license. In the license and in each class file it has a comment at the top saying: > Copyright (c) 2011 Joe Bloggs <joe.bloggs@example.com> I assume that he owns the copyright to the file, and can change the license of that file as he sees fit. If I contribute to the library with a new class entirely write by me, can I claim copyright of that file. And put: > Copyright (c) 2011 Petah Piper <petah.piper@example.com> at the top?


Splitting and hiding headers in a static library

I am writing a static library for C/C++ (personal project). As my headers became rather large, I thought that splitting my headers would be a good idea. Right now a header looks like this:   * **MainClass.hpp** :     * namespace impl: implementation details enclosed in a namespace `impl`     * forward declarations of classes declared below (when needed)          * `MainClass` declaration     * `MainClass` free functions declarations     * `MainClass` specialization declaration     * `MainClass` specialization free function declarations     * `AuxiliaryClass1` declaration     * `AuxiliaryClass1` free functions declarations     * …     * `AuxiliaryClassN` declaration     * `AuxiliaryClassN` free functions declarations          * `MainClass` definition     * `MainClass` free functions definitions     * `MainClass` specialization definition     * `MainClass` specialization free function definition     * `AuxiliaryClass1` definition     * `AuxiliaryClass1` free functions definitions     * …     * `AuxiliaryClassN` definition     * `AuxiliaryClassN` free functions definitions Where:   * `AuxiliaryClassK` is a class logically or structurally related to `MainClass` (e.g. an iterator for `MainClass`, a nested class within `MainClass`, a derived class of `MainClass` etc.)   * `ClassX` free functions as recommended in How Non-Member Functions Improve Encapsulation and Monoliths "Unstrung"   * definitions are in header because they are templates. This is becoming very crowded and difficult for me to navigate so I thought that splitting across multiple headers would help. However I do not know how to do it right. Here is how I think the structure could look like:   * **MainClass.hpp** :     * forward declarations (when needed)     * small classes/structs definitions & declarations     * `#include` the other headers   * **_Class.hpp** :     * `_Class` declaration     * `_Class` free functions declarations   * **_Class.inl** :      * `_Class` definition     * `_Class` free functions definitions With a `_Class` for each: `MainClass`, `MainClass` specialization, `AuxiliaryClassK`. My questions are:   * Is it reasonable to want to split a header (all are functionalities of `MainClass`) (I have headers over 1000 lines long and I foresee even longer ones) or should I leave it as it is?   * Is the above split scheme ok? Should I further split a class and the free functions related to that class? Are there other solutions to make the code more maintainable?   * How to hide the other headers (not in a sense of obfuscating / making the code unavailable, but avoid exposing the headers the users see (e.g. in a GUI with autocomplete)? They should include and be aware only of `MainClass.hpp`. Seeing other headers without being clear that they are behind–the–scenes headers will produce unnecessary confusion. One idea is to add a prefix like an `_` (underscore) or to put them in a `impl` folder. (Again, this is not about hiding classes (I do that with a namespace), but to hide the split behind a header they should use).


Java Singleton fields implementation

I have singleton in Java and I have realized, that I could make its fields static and it would work same way as regular instance fields. Would there be a performance / optimization difference? If so, what would turned out better? Is there a preferred way to implement singleton fields? (again, I am talking fields, not methods)


Resources for understanding a programming language and its specifications and grammar deeply

I'm a computer engineer and all the courses we have had about programming and computer languages were an introduction to C/Java and OOP. Now I feel like reading Java language specification to learn a deep understanding on Java language but I understand that there are something like grammar description in the specifications which I have no idea about. What should I study to be able to understand a programming language deeply(Especially specification elements such as grammar)? Have I missed some computer science courses? or I should understand all intuitively? I was pondering about reading some books about compilers but I thought it'd be better asking it from the experts!


How to name arrays or list when the nouns are both singular and plural?

Generally variables are named in the singular `Car car;` and arrays and list with the pluras: `List<Car> cars;` or `Car[] cars;` But what about nouns like `fish` or `media`* that are already plural? *already lost the battle to have the class called `Medium`.


Scrum: How much can the Product Owner shake up the Product Backlog?

For the last 3 sprints or so, I've observed our Product Owner suddenly shoving new stories -- stories not previously in the Product Backlog -- at the top of the Product Backlog. Because of this, the existing items in the backlog never get worked on. New stories continuously take over the helm and make into our Sprint Backlog. My question is - how much can the Product Owner really shake up the Product Backlog? Is it really fair game to ignore what's already in the backlog and keep on shoving new stories at the top? I've tried to argue that this is hogwash, but I often hear counter-arguments such as "adapting to frequently changing business needs," "we're moving so fast - we're super agile" and I don't know what to say to those arguments, although I feel it is not how Scrum was meant to be. EDIT: I understand that the product owner owns the product backlog. What I am observing at my team though, is that the PO constantly puts new items at the top of the backlog, ignoring the existing backlog items completely. For instance, say we're building a car and PO creates 10 stories to make it happen. We decide to take on 3 stories in our sprint backlog - thus 7 stories still remain in the product backlog. Everything is good so far. At the next sprint planning, however, the PO now claims that we need to build a baseball bat and creates 5 stories around that - which are then placed at the top of our backlog (i.e. highest priority); nevermind those car stories we already had in the backlog.


Which style to use for repetitive code (in java)

I have a project written in Java that required some repetitive code. Basically the gist of it is that I'm taking one object and copying it into two different objects -- Which I would just use clone() for but it involves moving some exterior mappings. My question is, in a language like Java, if you are doing a long series of similar actions on two objects, which of the following ways (or perhaps another way) is more desirable: Either grouping by the ACTION being performed...                   UnitStack usStart = new UnitStack(type, (int)Math.ceil(str / 2d), owner);         UnitStack usStop  = new UnitStack(type, str / 2, owner);              Map<String, Cloneable> logStart = usStart.getActionLog();         Map<String, Cloneable> logStop  = usStop.getActionLog();              logStart.putAll(usOrig.getActionLog());         logStop .putAll(usOrig.getActionLog());              MoveFlags mfStop = (MoveFlags) logStop.get("move");         mfStop = ((mfStop == null) ? new MoveFlags(usStop) : mfStop.clone());         mfStop.addMoves(b.distanceBetween(begin, end, owner));         logStop.put("move", mfStop);              hcStart.setUnit(usStart);         hcStop .setUnit(usStop);      Or should I group by the object being worked on?                   UnitStack usStart = new UnitStack(type, (int)Math.ceil(str / 2d), owner);         Map<String, Cloneable> logStart = usStart.getActionLog();         logStart.putAll(usOrig.getActionLog());         hcStart.setUnit(usStart);              UnitStack usStop  = new UnitStack(type, str / 2, owner);         Map<String, Cloneable> logStop  = usStop.getActionLog();         logStop.putAll(usOrig.getActionLog());         hcStop.setUnit(usStop);              // Reflect that the move took place...         MoveFlags mfStop = (MoveFlags) logStop.get("move");         mfStop = ((mfStop == null) ? new MoveFlags(usStop) : mfStop.clone());         mfStop.addMoves(b.distanceBetween(begin, end, owner));         logStop.put("move", mfStop);      Obviously I could contrive some way to write a loop, or maybe extract it into a method but in a case like this, I don't really feel like those would be good solutions. (I have removed many things from both of these -- comments mostly, as well as context, since neither are relevant to the question)


Lexical Analysis without regular expressions

I've been looking at a few lexers in various higher level langauges (Python, PHP, Javascript among others) and they all seem to use regular expressions in one form or another. While I'm sure regex's are probably the best way to do this, I was wondering if there was any way to achieve basic lexing without regular expressions, maybe some sort of direct string parsing or something. So yeah, is it possible to implement some sort of basic lexing in a higher level language* without using regular expressions in any form? *Higher level languages being things like Perl/PHP/Python/Javascript etc. I'm sure there is a way to do it in C


What is meant by Scope of a variable?

I think of the scope of a variable as - "The scope of a particular variable is the range within a program's source code in which that variable is recognized by the compiler". That statement is from "Scope and Lifetime of Variables in C++", which I read many months ago. Recently I came across this in _LeMoyne-Owen College_ courses: ![http://sankofa.loc.edu/CHU/WEB/Courses/Cosi350/Ch4/scope.13.gif](http://i.stack.imgur.com/Krcsi.gif) What exactly is the difference between the scope of variables in C# and (C99, C++, Java) when > However a variable still must be declared before it can be used


Why can't an AVL tree be recreated using pre-order traversal?

Given a binary search tree, I understand why I can use breadth-first and pre- order traversal to list the entries of the tree in such a way as to reconstruct the tree in the order in which its traversed. However if we now consider an AVL tree and we want to traverse the tree in such a way as to recreate the same AVL tree (similar as to what we did with the plain binary tree) then why does breadth first traversal always work and why does pre-order not work with this case given that it works for standard binary trees?


Why shouldn't an object reference have access to a static member in C#

Context of my question:   1. I am reading C#.   2. Trying to understand Static keyword.   3. I understand that when Static is applied to a member of a class, it can only be modified by the class and not the class object references. I will take an example here.               public class BluePrint     {        public static string BluePrintCreatorName;     }      If I need to know the BluePrintCreator's Name, I can call               BluePrint.BluePrintCreatorName;      But if a house that is created from the blueprint wants to know the BluePrintCreator's Name, it does not have access.               BluePrint NewHouse = new BluePrint();     NewHouse.BluePrintCreatorName; //This is not accessible      Compiler error says:               Member 'AccessModifier.BluePrint.BluePrintCreatorName' cannot be accessed with an instance reference; qualify it with a type name instead         I understand this is the way it works. But I want to know the basic concept to why Static keyword was required at all? What will go wrong if a class object reference would have access to the static member?


Which NoSQL repository is most suitable for a Twitter-type architecture?

In an upcoming project I need to create a Twitter like web application where the basic idea is to read / write short messages and status updates (similar to tweets) and group these messages (just like hashtags) Also users can have followers and can see their status updates. I'm estimating between 10 - 50 million message writes in a span of 1 - 2 months, and for reads it could be anything in the millions. Reads will surely be higher than writes. **I already decided that some kind of NoSQL is probably the best approach to storing this data, but I don't know which one would be the best fit for my needs.** **I looked at Hadoop / Cassandra / HBase but it seems a little bit of overkill. I'm also considering MongoDB.** The whole web app will be setup on Nginx, PHP with a RESTful architecture (front-end only on mobile phones)


Dealing with the customer / developer culture mismatch on an agile project

One of the tenets of agile is ... _Customer collaboration over contract negotiation_ ... another one is ... _Individuals and interactions over processes and tools_ But the way I see it, at least when it comes to interaction with the customer, there is a fundamental problem: _How the customer thinks is different to how a software engineer thinks_ That may be a bit of a generalisation, yes. Arguably, there _are_ business domains where this is not necessarily true---these are few and far between though. In many domains though, the typical customer is:   1. Interested in daily operational concerns--short-range tactics ... not necessarily strategy;   2. Understandably, only concerned with the immediate solution;   3. Practical thinkers, not abstract thinkers;   4. Much more interested in "getting the job done" than considering how the solution will support future concerns. On the other hand, _in the ideal_ , software engineers who practice agile are:   1. People who think alot about quality;   2. Individuals who appreciate how a little bit of upfront work can save a ton in effort down the line;   3. Experienced, analytical thinkers. So there seems to be a culture discrepancy that tends to inhibit "customer collaboration". What's the best way to address this?


Eclipse teaching: on new projects, which mode: debug or release?

I'm asked to teach to my students Eclipse. The lectures are already done, and I see that the teacher asks the students to **always** start a new project in "Release" mode. ![enter image description here](http://i.stack.imgur.com/p8mqk.jpg) Is that normal? If "yes", or if "no", why?


two approaches to database modeling - which one to use when

recently I have noticed a new approach to data modeling vs what I have used so far. This seems to be a way to address modeling of an entity that has a very large set of fields and quite often many of them are empty. First approach - the one I used previously:   * Main table for the main set of fields (a,b=1,c=2)   * Additional table with a subset of fields (a,e='foo',f='bar',...) - linked to Main one by a 1-1 relation   * Yet another Additional table with a subset of fields (a,j=3,k='baz',...) - linked to Main one by a 1-1 relation   * And one more with the rest of the fields (a,n=12.4, o='foobarbar', ...) - linked to main one by a 1-1 relation The one I have seen recently is:   * Main table with almost no data except for an ID (a)   * Table that lists all the fields possible (b,'this is parameter b')    * a table that links the Main one with all the fields it has (a,b,1) and (a,c,2) and (a,e,'foo') and so on.  I understand you can query same results from both models, but I do not understand what is the rationale for the second one - are there clear cases where one of those should be used vs other? Thanks for your advice. PS. The second one is being used on Oracle 11 - my last real life experiences with SQL were in the times of Postgres 7.x might be things changed meanwhile :)


From TFS to Git

I'm a .NET developer and I've used TFS (team foundation server) as my source control software many times. Good features of TFS are:   1. Good integration with Visual Studio (so I do almost everything visually; no console commands)   2. Easy check-out, check-in process   3. Easy merging and conflict resolution   4. Easy automated builds   5. Branching Now, I want to use Git as the backbone, repository, and source control of my open source projects. My projects are in C#, JavaScript, or PHP language with MySQL, or SQL Server databases as the storage mechanism. I just used github.com's help for this purpose and I created a profile there, and downloaded a GUI for Git. Up to this part was so easy. But I'm almost stuck at going along any further. I just want to do some simple (really simple) operations, including:   1. Creating a project on Git and mapping it to a folder on my laptop   2. Checking out/checking in files and folders   3. Resolving conflicts That's all I need to do now. But it seems that the GUI is not that user friendly. I expect the GUI to have a `Connect To...` or something like that, and then I expect a list of projects to be shown, and when I choose one, I expect to see the list of files and folders of that project, just like exploring your TFS project in Visual Studio. Then I want to be able to right click a file and select `check-in...` or `check-out` and stuff like that. Do I expect much? What should I do to easily use Git just like TFS? What am I missing here?


MVC seems to create dependencies that just "don't feel right"

I might be misunderstanding MVC, so forgive me if that is the case. This is my program structure (Java/Swing): I have a JTable (View) that is pointed to by a custom linked list (Model). When the user tries to add something to the JTable, the action listener (Controller) updates the linked list (Model) which updates the JTable (View). Here's my issue: The linked list should be able to function independently of the JTable, but it doesn't. Let's say I decided to get rid of the user interface and just use the linked list for internal stuff within the program (The linked list has other properties and functions outside the scope of MVC). That should be able to work, because the linked list's FUNCTION is independent of the JTable's function, yet I would have to edit a lot of code to do so (or have a bunch of code that no longer does anything) because of MVC. So am I misunderstanding MVC completely, just a little bit, or are the dependencies a price I have to pay? NOTE: This is a simplified view of my project. In real life, there are other objects in the model and more than just a JTable in my interface. Also, the linked list has other thigns that get updates other than the number of objects.


is there a formal algebra method to analyze programs?

Is there a formal/academic connection between an imperative program and algebra, and if so where would I learn about it? The example I'm thinking of is:               if(C1) { A1(); A2(); }     if(C2) { A1(); A2(); }      Represented as a sum of terms:               (C1)(A1) + (C1)(A2) + (C2)(A1) + (C2)(A2) = (C1+C2)(A1+A2)       The idea being that manipulation could lead to programatic refactoring - "factoring" being the common concept in this example.


How easy it is to update Entity Model from database when enough code has already been written?

I am new to Entity Framework. I know there is an option to update model from the database, but I want to know how easy and successful is this task. I may need to update my model in a few weeks but till that time many lines of code has already been pushed inside. Is it difficult to track changes and make code work?


Is it possible to check that MS word file is hand written or auto generated by using some converter?

I got one project with some requirements. Basically my client provide data entry work. In that he converts image files(scan copy of articles, forms etc) to document file (MS word) by typing manually. For maintaining quality of that work he set some roles on documents text formatting like specific font, font size, paper size etc., and he compare image files with specific document for proofreading which is very time consuming task, and his some **smart employ** use some image to word converter for that conversion rather then typing manually. He pays a lot in the Data entry and he don't want automated converted files using some conversion software. So basically he want two functionality in his project that,   1. to automate standard format proofreading process and    2. to automatically reject image to word converted files. this is the all scenario and now **my question** is that   1. Is it possible to find out which file is manually type by employ and which is converted by using some conversion software?   2. Is it possible that we can check file for specific standard format?


Why was dependency injection pattern not included in the Gang of four?

Why was the dependency injection pattern not incluided in the gang of four? Did GOF pre-date widespread automated testing? Is dependency injection now considered a core pattern?


Why "programmer" is defined as designers and "developer" as creator?

While I was looking to the definition of some common terms in _en.wiktionary.org_ , I was surprised to what I found. It define the **programmer** as > One who designs software. - _wiktionary.org_ and **developer** as > A software developer; a person or company who creates or modifies computer > software. - _wiktionary.org_ I have a bachelors degree in IT and has a professional work in an IT department for almost a year, and I do always thought that their definitions are opposite. Is this the real definition of a programmer and a developer or is it just because it is shortly-defined _(but still, it seems to me like it should be the opposite)_?


C# class architecture for REST services

I am integrating with a set of REST services exposed by our partner. The unit of integration is at the project level meaning that for each project created on our partners side of the fence they will expose a unique set of REST services. To be more clear, assume there are two projects - project1 and project2. The REST services available to access the project data would then be:   /project1/search/getstuff?etc...   /project1/analysis/getstuff?etc...   /project1/cluster/getstuff?etc... /project2/search/getstuff?etc...   /project2/analysis/getstuff?etc...   /project2/cluster/getstuff?etc... My task is to wrap these services in a C# class to be used by our app developer. I want to make it simple for the app developer and am thinking of providing something like the following class.               class ProjectClient       {         SearchClient _searchclient;         AnalysisClient _analysisclient;         ClusterClient _clusterclient;              string Project {get; set;}         ProjectClient(string _project)         {           Project = _project;         }       }      SearchClient, AnalysisClient and ClusterClient are my classes to support the respective services shown above. The problem with this approach is that ProjectClient will need to provide public methods for each of the API's exposed by SearchClient, etc...               public void SearchGetStuff()     {       _searchclient.getStuff();     }      Any suggestions how I can architect this better?


Binary Search seems superior, why did the committee of C++ still have Find in the algorithm library?

I wish to search for an integer in a vector of integer. I have two candidates for the job:   1. Binary Search   2. Find It seems that **Binary Search** is the best candidate for the job as although I have to sort the vector, the total running time will be `O(NLog2N)` assuming quicksort take `O(NLog2N)` and searching takes `O(Log2N)`. The running time for **Find** will be `O(N)`. It seems such clear cut that **Binary Search** is superior to **Find** , why did the committee of C++ still have Find in the algorithm library? I am sure the C++ committee had their reasons for including **Find** , what benefits of **Find** am I missing or how is **Find** superior to **Binary Search**? EDITED : Changed running time of quicksort to NLog2N


How do I hire testers by giving them a buggy app for testing their efficiency?

My boss wants to recruit testers based on their testing efficiency (number of bugs identified). So, he's shortlisted 5 people and I need to give them an app full of bugs and see how they fare in reporting obvious bugs, and hidden bugs. I know.... it kind of sounds weird. I guess, this is just like the coding world, where you hire a programmer by assessing his/her programming ability (which is a little easier). Once hired, these testers would be testing a java swing app, so their familiarity of testing frameworks/tools is not really required. So, my question here is - How do I go about finding buggy apps (web/non-web), preferably java ones, that I can have the shortlisted testers have a go at? How would you go about this task if your boss asks you to do so? I am kind of clueless at this point - I googled a bit, thought about finding new apps on sourceforge with lots of bugs, but both approaches didn't work for me.


How are Java ByteBuffer's limit and position variable's updated?

There are two scenarios: writing and reading   **Writing** :   Whenever I write something to the ByteBuffer by calling its `put(byte[])` method the `position` variable is incremented as: `current position + size of byte[]` and `limit` stays at the max.   If, however, I put the data in a view buffer then I will have to, manually, calculate and update the `position`   Before I call the `write(ByteBuffer)` method of the channel to write something, I will have to `flip()` the Bytebuffer so that   `position` points to zero and `limit` points to the last byte that was written to the ByteBuffer.   **Reading** :   Whenever I call the `read(ByteBuffer)` method of a channel to read something, the `position` variable stays at 0 and the `limit` variable of the ByteBuffer points to the last byte that was read. So, if the ByteBuffer is smaller than the file being read, the `limit` variable is pushed to max   This means that the ByteBuffer is already flipped and I can proceed to extracting the values from the ByteBuffer.   **Please, correct me where I am wrong** :)


Is it possible to outsource design properly?

I work in a company going through a downsizing process. It is assumed that a lot of "let go" developers jobs will eventually be outsourced. Some of those programmers had some design to do. Is it possible to outsource both design and creation/coding properly? I feel that by outsourcing design, we lose any in-house capability of really "owning" the code. It will be very difficult to maintain. Also we'll have a hard time ensuring a proper development. How can I address those issues?


What am I missing about PHP?

It's like this mythical thing that a dominating portion of developers say is just the best option for back-end development, a part of development about which I know virtually nothing beyond the absolute basics. So I've looked up PHP tutorials a bunch of times, trying to figure out why it's so powerful and common, but it's annoying as hell-- all the tutorials treat you like a new programmer. You know, this is how you make an If Else statement, here's a for loop, etc. The "Advanced Topics" show you how to make POST and GET statements and whatnot. But there must be more to it! I don't get it! That's practically no different from JavaScript. What am I missing about this language? What else can it do? Where's the power and versatility? I've heard it called a function soup; where are all the functions? Please chide me. I'm clearly missing something.


handling a GET error properly

I have a website that takes two primary get strings:               ?type=GAME&id=SomeGameID     ?type=SCENARIO&id=SomeScenarioID      for reasons unknown, I have recently begun receiving requests for erroneous get strings from both Yandex and Baidu. They are always in the form of:               ?type=GAME&id=SomeScenarioID      None of my users are triggering these errors, so I am (sort of) confident that this is not due to an HTML template error somewhere on my part. There is also no HTTP_REFER showing up in the $_SERVER array, so I'm guessing these are direct requests from bad dbase data on their part. I see two options for dealing with these bad requests, and would like to know which is recommended... or if there are other, better options I have not thought of:   1. simply 404 the request, since it is incorrect   2. redirect the request to `?type=SCENARIO&id=SomeScenarioID` because the scenario IDs are always valid, the breakage is due to asking for the wrong type.


Why does XCode convert PNGs to CgBI format?

According to the research done here http://imageoptim.com/tweetbot.html, Xcode's conversion of PNGs to the proprietary Apple CgBI format does not create a noticeable performance improvement. Their claim is that the conversion only reduces PNG loading speed by 1 nanosecond. If this is true, why does apple bother with the CgBI format at all? Has anyone else benchmarked loading CgBI images vs regular PNG images on iOS devices to see if they perform differently?


Senior Engineers: Go Back to Coding?

This is a question regarding engineers with 20+ years experience, but it is a question for everybody, as it has to do with career development. I'm in a surprisingly long job hunt, and the problem seems to be that employers will not accept me as a coder. Yes, I have done lots of things, had my own company, sold it too early, etc. But the world always needs productive workers, and my skills are current and sharp. The market I am in has fewer openings for senior people, and I don't mind taking a step or two back if I can find a place to contribute. What are your thoughts about career management that prepares the 40, 50 year-old for a sudden career disruption?


Dependencies between services in pipeline

I am working on creating a new data processing system, where there are multiple steps each fulfilled by different services. For example, there is a scheduling service that kicks of something, an analysis service that does the processing, and a notification service that summarizes and emails out results. Data flows through in that order My main question which design would be better, should the analysis service have to know about the notification service? Or should the notification service have to know about the analysis? My initial thought is that by using a service bus, the notification service can simply be subscribed to any analysis results that get broadcast. That way if the notification service is replaced or changed there wouldn't need to be any change to the analysis service. This also means a client that wants to start an analysis and get a notification would have to call the notification service first to tell it how to handle the result it will eventually get before kicking off the actual analysis. The opposing idea is that the analysis service should simply call directly into the notification service, so the analysis service needs to know what to do to create a call into notification. This means the client would have to bundle up notification specific instructions that get passed into the analysis service for it to later look at to know what to pass to the notification call. It seems like the service bus approach of the notification service getting and processing analysis results would be better because we could also add other services in the future that then do something with a result without having to change the analysis service to call it explicitly. Can anyone provide some insight on which approach would work better to be both easier to develop, maintain, support?


Is JavaScript interpreted by design?

I am cautious of asking this question because it might appear overly fastidious. I just opened up JavaScript: The Definitive Guide, and it states of the first page of chapter 1 > "JavaScript is a high-level, dynamic, untyped interpreted programming > language” So am I to take it that the interpreted part is a requirement in the language specification, or is it misleading to say that the language is an interpreted programming language when respecting the difference between a language and its many implementations? There are no static compilers for JavaScript apparently - Is there a native machine code compiler for JavaScript? so maybe it's just a reflection of this.


What are the restrictions on derived works of EPL licensed software?

I am contemplating paying a software consulting firm to provide my company with some enhancements to a piece of software that is licensed under the Eclipse Public License (EPL). I'm wondering what rights we will have to what they produce, and whether they can tie us to paying them royalties forever.   * What rights we will have to modify and redistribute what they provide us?   * Can they insist on a royalty payment when we distribute it to 3rd parties? Before I start negotiating, I need to understand what we're getting - and ideally get this sort of thing explicitly agreed in the contract. I know I should consult a lawyer.


What's the difference between "Add to home screen" safari HTML5 webapp vs HTML5 webapp wrapped in UIWebView?

Someone asked me this. The answer he gave was HTML5 in `UIWebView` can cache the app data so it can run offline. I thought the same thing can be achieved using safari add to home screen, no?


Using GPL code with MPL code

I've done a spot of Googling, and all I can find is information on using code under the MPL in a larger GPL licensed project. What I really want to know is: can I included GPL(v3) licensed code(/binaries) in a larger MPL(2.0) licensed project? My understanding so far is that I can't, and that any project which uses GPL software must also be released under the GPL. Is this correct? If this is correct, can I write software and release it under the MPL, even if it depends on a GPL library, as long as I don't distribute the GPL licensed parts with my MPL licensed parts? And, if I then want to distribute both parts as a "larger work", how would the overarching GPL affect my MPL code?


Writing Large Portions Of Code Then Debugging?

Lately I have been writing a game engine, and I have been writing a lot of "foundation stuff" (standard interfaces, modules, a message system ect.), but I have noticed a pattern, a lot of the stuff is interdependent and I can not debug until everything is done, hence I do not debug for about 3 to 5 hours at a time. I am wondering if this is an acceptable practice for this part of the project, and if not, if anyone can give me some advice? \-----Update-----: I downloaded some code metrics tools, and my programs cyclomatic complexity is 1.52 which as I understand it is good, and should correlate to high cohesion, if I am wrong please correct me/


Contract Billing - How would you handle 'learning time'?

So you take a contract where you have solid experience with 75% of the technology necessary. How do you handle your time to learn the other 25%? Work it into the billing time? Expose the 25% in the contract as 'research'? Do the learning on my own time (not billed)? Not take the contract (too large of an unknown for me _and_ the customer)? On the extreme end of this, I keep hearing a story about Mark Cuban (Dallas billionaire who started broadcast.com and sold it to Yahoo!) when he was at Indiana University. Someone asked him if he could build a business app for them and he immediately said "Yes"... he had no idea how. So he bought a book, stayed up nights, studied and coded... He finished it (I'm sure it was ugly), it worked and he kept going. I'm not suggesting doing contracts this way (the stress!), but there's a middle ground. What is it, and how would you (or would you?) bill for the unknown?


Implementing Syncing between localStorage and SQL database?

I have made a simple web app, which runs completely offline - all data is saved in HTML5's localStorage. Now, I want the data to get synced with the server, so that the user is able to use the app on multiple devices at a time. What I have done so far is:   1. For each operation the user performs, a log entry is added.   2. When the user is online, all logs are transferred from localStorage to PHP through AJAX.   3. Corresponding changes are made in the SQL Database.   4. All logs are deleted from the localStorage. So, all the localStorage data is getting "backed up" on the server properly. Anyhow, changes made from one device is not being reflected to the other device and vice-versa, to do this, we would have to get some data from SQL to the localStorage. Now, my question is as to what will be the appropriate and best way to do this? After the four steps above, do I   1. Clear all localStorage data and save the SQL data into localStorage.   2. Keep a log of changes made in the database, and do them on the localStorage.   3. Any other approach. Also, what about timestamps? What if there are conflicts?


How can I be prepared to join a company?

There's more to it than that, but this title was the best way I could think of to sum it up. I'm a senior in a good computer science program, and I'm graduating early. About to start interviews and all whatnot. I'm not a super-experienced programmer, not one of those people who started in middle school. I'm decent at this, but I'm not among the best, not nearly. I have to do an awful lot of googling. So today I'm meeting some fellow for lunch at a campus cafe to discuss some front-end details when this tall, good-looking guy begs pardon, says he's new to campus, says he's wondering if we know where he can go to sign up for recruiting developers. Quickly evolves into long conversation: he's the CEO of a seems-to-be-doing-well start-up. Hiring passionate interns and full-times. Sounds great! I take one look at his site on my own computer later, immediately spot a major bug. No idea how to fix it, but I see it. I go over to the page code, and good god. It's the standard amount of code you would expect from a full-scale web application, a couple dozen pages of HTML and scripts. I don't even know where to start reading it. I've built sites from scratch, but obviously never on that scale, nor have I ever worked on one of that scale. I have no idea which bit might generate the bug. But that sets me thinking: How could someone like me possibly settle into an environment like that? A start-up is a very high-pressure working environment. I don't know if I can work at that pace under those constraints-- I would hate to let people down. And with only 10 employees, it's not like anyone has much time to help you get your bearings. Somewhere in there is a question. Can you see it? I'm asking for general advice here. Maybe even anecdotal advice. Is joining a start-up right out of college a scary process? Am I overestimating what it would take to figure out the mass of code behind this site? What's the likelihood a decent but only moderately-experienced coder could earn his pay at such a place? For instance, I know nothing of server-side/back-end programming. Never touched it. That scares me.


Pythonic use of the isinstance function?

Whenever I find myself wanting to use the isinstance() function I usually know that I'm doing something wrong and end up changing my ways. However, in this case I think I have a valid use for it. I will use shapes to illustrate my point although I am not actually working with shapes. I am parsing XML configuration files that look like the following:               <square>       <width>7</width>     </square>     <rectangle>       <width>5</width>       <height>7</height>     </rectangle>     <circle>       <radius>4</radius>     </circle>      For each element I create an instance of the Shape class and build up a list of Shape objects in a class called the ShapeContainer. Different parts of the rest of my application need to refer to the ShapeContainer to get certain shapes. Depending on what the code is doing it might need just rectangles, or it might operate on all quadrangles, or it might operate on all shapes. I have created the following function in the ShapeContainer class (the actual function uses a list comprehension but I have expanded it here for readability):               def locate(self, shapeClass):       result = []       for shape in self.__shapes:         if isinstance(shape,shapeClass):           result.append(shape)       return result      Is this a valid use of the isinstance function? Is there another way I can do this which might be more pythonic?


Adding a Short-Term Developer to a Rework of an Old Project

## Background I work in the Language Resource Center on my campus. It's a relatively small lab, and our job is to help students, not code software. Being a Computer Science student, I took the initiative to start coding useful utilities to make our jobs as lab assistants easier. Recently, Google declared a shut-down of our data storage mechanism, so I decided that it was time to completely rework the entire system that I've built (alone) over the past year. I have more experience now, and I want to do it correctly with the ( _better_ ) tools that are now available to us. There is another CS student that works with me in this lab, who will continue working with me for **one more semester** (e.g. a 4-month period). I never asked him to contribute to the **original** project because I started it last summer when he wasn't scheduled to work. The goal of this project is to build an integrated 'manager' application for our staff and my boss; the utility is a web service built using HTML/CSS/JavaScript. My coworker doesn't have any experience with JavaScript, HTML nor CSS. This developer also has no experience with the code base that I built previously (purely JavaScript), which would need to be re-worked (albeit slightly) to work with the new system. Again, this is **not a required duty in our positions**. I enjoy coding things to automate menial tasks, and to make our jobs easier. _It was never a requirement._ ## Deadlines There is a hard deadline of mid-August, when faculty will start submitting requests to us again. The old system has to be rebuilt (some parts retrofitted) before then. ## Why ask? My boss suggested that this coworker of mine contribute to the new project to speed up development. I worry that my coworker (and boss, for that matter) might take it as a slight if he doesn't help develop this system. On the other hand, there was a 9-month period where he could have contributed to the previous project, and a 4-month period that he could have taken over management of said project (I was in France) - he has never shown interest in actively contributing to the previous project, and I have no problem with that. I'm concerned because I feel that helping him learn HTML, CSS and JS, as well as Google's API and toolset will _really_ slow things down. We essentially have two months to re-construct the old system, and I feel that the time it would take to get him acquainted with the tools and languages used in this project, I could have built it myself. ## Is there a protocol? I've come up with the following as my options in this situation:   1. Just start working on the new project alone, assuming that my coworker does not want and/or never wanted to contribute.   2. Ask my coworker if he wants me to help him learn HTML/CSS/JS and start showing him the previous code base as well as the current project's plan.   3. Ask my coworker if he has any interest in helping with the new project (he doesn't _need_ to have an interest, but would he take that as _You **must** work on this!_?) ## The question Is it worth the time/effort, given the deadline, to have my coworker work on this project with me? Or would I detriment progress by having him co-develop?


MVVM - child windows and data contexts

Should a child window have it's own data context (View-Model) or use the data context of the parent? More broadly, should each View have its own View-Model? Are there are any rules to guide making that decision? What if the various View-Models will be accessing the same Model? I haven't been able to find any consistent guidance on my question. The MS definition of MVVM appears to be silent on child windows. For one example, I have created a warning message notification View. It really didn't need a data context since it was passed the message to display. But if I needed to fancy it up a bit, I would have tapped the parent's data context. I have run into another scenario that needs a child window and is more complicated than the notification box. The parent's View-Model is already getting cluttered, so I had planned on generating a dedicated VM for the child window. But I can't find any guidance on whether this is a good idea or what the potential consequences may be. FWIW, I happen to be working in Silverlight, but I don't know that this question is strictly a Silverlight issue.


Design Patterns for creating tasks

I am developing software where each action in my entities need create tasks that will be execute in my infrastructure. When I create a task it is only records in the database. Afterwards, a windows service will execute it. Actually, I use a Service and my Entities are Anemic, then when I change the state of my entity I also create my tasks to infrastructure.                   public void CreateMachine(string name){           var machine = new Machine(){                               Name = name,                               Status = Status.Releasing;     };           var tasks = new List<Task>(){                        new Task("CreateMachine", machine.Name),                       //infrastructure task                        new Task("ChangeMachineSize", machine.Name, machine.Foo),      //infrastructure task                        new Task("ActivateMachine", machine.Bar),                      //infrastructure task                          new Task("SetMachineEntityStatusToReleased", machine.Name)     //business task (go to my database)           _db.Task.Add(tasks);           _db.Msachine.Update(machine);           _db.SaveChanges();          }        }      But I want use rich domain, because my services are getting too complex.                   Public Class Machine{                  public Machine(string name)             {                 Name = name;                Status = Status.Releasing;               //Can I Create Tasks for create machine here?             }                  public void Stop(){               Status = Status.Releasing               //Can I create Tasks for stop machine here?             }                       [Required]             [StringLength(50)]             public string Name { get; set; }                  public Status Status { get; protected set; }        }      Is there a design pattern or best practice for this design? I am violating the Single Responsibility Principle if I add the task creation inside my entity?


Intentionally incorrect use of language features, specifically "ref" in C#, as a hint to colleagues

I recently came across a piece of code something like this (roughly C#):               public bool ValidateStuff(ref ArrayList listOfErrors, Stuff thingsToValidate)     {         if (!thingsToValidate.isValid() )         {             errors.add("New error!");         }     }          ArrayList errors = [];     bool valid = ValidateStuff(ref errors, stuffToValidate);      The key thing is the "ref" keyword - there is no need to use that keyword given the functionality here, and when I asked why it was there I was told that it had only been added as a kind of warning that the _errors_ parameter is manipulated by the method, it's not purely used as input. This immediately seemed wrong to me ( _ref_ has a purpose, and here it is not being used according to its purpose), but the idea of forcing (since you **have** to use _ref_ when calling the method) a reminder of slightly counter- intuitive usage seemed reasonable, and I couldn't immediately think of a better way, apart from liberal use of comments. What do you think? Extra credit: how could this method be better? Perhaps by simply returning a new List of errors which is added to the main List in the calling code? By providing two methods, one for the test and one for the errors? Or is it fine as it is?


IllegalStateException vs. IllegalArgumentException

In have written a function which expects the caller to pass in a configuration file like XML. Then I parse this given file and extract something which i then return. In this function (at least) two "bad" things can happen:   1. The given file does not exist or is not accessible in any way   2. While parsing/validating the file some unexpected content is found The first thing is clearly an `IllegalArgumentException`. I am however not sure what kind of exception the second case would be. Is that also an `IllegalArgumentException` because i expect (by documentation-contract) that the input is in a valid form? Or is it rather an `IllegalStateException` as the given parameter is formal correct but only after parsing I can't do any further steps as it would result in unwanted behaviour? Or is it even something else?


Is it faster to query using linq-to-entities or a data adapter?

I'm creating an MVC application in VS2012 and I reverse-engineered the models from existing Oracle tables. The tables are part of a MASSIVE database. Besides the main tables that I need to insert, update and delete from I also (on a whim) selected a few tables and views that my application only needs to read from. Now I am doubting my decision and considering deleting the less- important models. It is definitely neater to query using linq-to-entities instead of creating an oracle connection, creating an adapter, filling a dataset and reading what I need, but which is faster?


Preparation for Ph.D

I am going to start Ph.D (software security research) very soon. How can I prepare for that. Please recommend any tools or softwares that I need to familiarize with before stating the Ph.D. Any advices other than softwares?


Guidelines for using BOOST

I am planning to use boost libraries, as it is quiet rich, and will save lots of time. But my question is, what are the guidelines i have to follow, so that   1. I can replace some part of boost with standard C++ as and when they are supported, considering so many new features are coming in C++11.   2. Also, how to encapsulate them in a way so that i have to change least when i change platform/compiler/boost version.   3. Also is there a category which suggest, which portion of the library to use and avoid, considering stability and standard.


Notification service for software version updates

There are a lot of (open source) projects that I'm interested in - dozens at least. I'd like to get a notification whenever a new version is released. Is there a service that does this?


How do I licence my OS project, which uses other (differently-licenced) projects?

I've got a library up on GitHub, with some of the binaries also distributed on NuGet: https://github.com/relentless/Http.fs I'd ignored licencing up until now, but somebody's asking about it so I though I should put something on. I want to keep it permissive, and having done a little research MIT seems like a good one to use. However, my library references/uses three other libraries, all with different licences, so I'm not quite sure what I need to do. It includes the binaries of:   * FsUnit, which has it's own licence (similar to the BSD 3-clause): https://github.com/fsharp/FsUnit/blob/master/license.txt   * NancyFx, which uses MIT: https://github.com/NancyFx/Nancy/blob/master/license.txt And a source file from:   * FSharpX, which uses Apache 2.0: https://github.com/fsprojects/fsharpx/blob/master/LICENSE.md The MIT of Nancy doesn't seem to be a problem. The Apache of fsharpx and the FsUnit one both say I need to include the licence text in my project. So my questions are:   1. What do I do with the other licences, just copy the files into the root of my source? I assume I can rename them and add a comment specifying which part of my project this licence refers to.   2. Assuming I go for MIT, could I reasonably describe my project as having an MIT licence? Or is the reality that it's a mixed MIT/Apache 2.0/Random licence?


Architecture for dashboard

I'd like to know if my Architecture idea, is the best approach following some pattern. I'll create a Dashboard for my company, and I never will delete or update data in my database, just read the data from database. Nowadays we just work with our SQL Server database, but I want a solution that will provide a easy way to implement a new feature, like a new database compatibility. **THE APPLICATION** This is a dashboard for all my clients, where I'll get the data from my database server making a filter for his company, and then plot some charts and show informations about her rentability, financial information, etc. Will be web-based and must work in any screen size (smarthphones, TV's, desktop, etc). I want to use NHibernate as ORM **IDEA** My idea was in the user interface, use MVC 4 Web Application and all request from the User Interface to my Business Layer will be through REST. My Business Layer it's a MVC Web API, to desacouple the User Interface from my Business Layer. The Business Layer will access Repository (Repository Pattern), with CRUD operation (in my case it's just 'SELECTS' because I just need show the data, never update, never insert). It's a DDD approach, working with NHibernate. Sometimes I think it's to much for a dashboard, where we can't insert nor update data. I'd like to know what are common architectural pattern for this problem. I said some pattern's here, but maybe someone with more experience then me could see a better approach to this kind of application.


Pattern matching in Clojure vs Scala

What are the key differences between pattern matching in these two languages? I am not referring to syntax, but capability, implementation details, range of use cases and necessity. Scala applications (eg. Lift and Play) speak proudly about the languages pattern matching prowess. Clojure, on the other hand has a library, core.match, and built in destructuring, which also seems powerful. *note: The reason I was inspired to ask this question is because of a blog post I saw in which a programmer, as an experiment, built a lisp interpreter using both Scala and Clojure. He said that the Clojure matches broke after a certain length, but could not explain why, but I am really curious to know. You can find this post here: http://www.janvsmachine.net/2013/09/writing-simple-lisp-interpreter-in-clojure.html


How to decouple simple factory and default implementation?

I have a simple factory ~~class~~ (`FileResources`) with static factory methods providing a default implementation (`DefaultFileResource`).               public final class FileResources {         private FileResources() {}         public static FileResource get(Path path) {             return new DefaultFileResource(path);         }     }      The problem with this class is that it is tightly coupled with the default implementation (`DefaultFileResource`). Given a new requirement that classes part of the API (`FileResources`) cannot directly depend on classes not part of the API (`DefaultFileResource`) I figured that the only solution is inversion of control, either dependency injection or a ~~service provider~~ service locator. Is it possible to decouple FileResources from the default implementation (`DefaultFileResource`)? As far as I know this is only doable by injecting the dependency into FileResources through a constructor, field or setter method.   The main problem is that the constructor of FileResources is private, furthermore it only has static factory methods. The alternative is the factory method pattern. There would be an abstract factory (an API class), and there would be concrete factories (non-API classes) that could be even injected to decouple the API and non-API classes. Either way a dependency container is necessary to handle the wiring. What do you think? Am I overthinking this?


Heuristic Approach for Flexible DIFF Implementation

I have created a DIFF implementation to compare document revisions at work. It is based on _An O(ND) Difference Algorithm and Its Variations_. One thing that has become important is to take the list of changes and interpret them into human readable text. While the current algorithm is very efficient, it is so much so that it is difficult to expand upon. ## Short Question I was thinking about trying to use A* and a heuristic that adds penalties for "turns". The idea being to _smooth out_ unnecessary "add, delete, add, delete, add, delete" so that it is easier to parse into something a human can read. Basically, turn my _shortest path_ problem into a _simplest path_ problem. And of course not create output that is always "Delete _everything_ , Add _everything_ " Does this sound reasonable? Is there any precedence for using a heuristic in a DIFF implementation? What is the heuristic? ## The Problem: If a long sentence is deleted and another long sentence removed, but they do share at least one word, say "with". Leaving the common word alone (by not both adding and deleting it) will create the shortest path. However, this really just obfuscates the context of the change to a human trying to read a print out of the changes. Example with current DIFF:   * **Old text:** Clean: Powerwash and blow dry with shop air.   * **New text:** Clean: Wipe with acetone and a lint free cloth.   * **Change Note List:**       * Change "Powerwash and blow dry" to "Wipe with acetone"     * Change "shop air" to "acetone and a lint free cloth" _Note: "Change" is used instead of_ "delete 'shop air', add 'acetone'" As you can see, the second note loses ALL context and without still looking at the full old and new text sets of text you cannot understand what it means. ## Note about Punctuation: I have delimited punctuation as separate "words" so that I would get   * Add "(" instead of   * Change "Repair" to "(Repair" because this was obnoxious. However, that means that if there is even a comma in both texts (as opposed to the word "with" in the previous example) the same thing happens. ## Possible Solution: I think I could use a different path finding algorithm instead that can give me the flexibility to add weight to different change "paths" that might make more sense to a person. Maybe, I could even make traveling to nodes containing punctuation have little weight (not sure how this would effect other things). Then I could get the previous example to list the following:   * **Change Note List:**       * Change "Powerwash and blow dry with shop air" to "Wipe with acetone and a lint free cloth" _See! Much clearer!_ I know I would take a performance hit, and I might have to do a fairly major overhaul of my program, but it's more important to have the final result I want. ## Bottom Line: Again, is there any precedence for using a heuristic in a DIFF implementation, and what is it? Other thoughts? A reasonable time investment? Other ideas? Other algorithms? Thanks in advance! **EDIT:** I tried to clarify/solidify my question and generalize my question to adding a heuristic to my algorithm, rather than using A*. Basically the same thing in this instance, but I still think more accurate now. This post was insightful.


How do you make a service stateless?

When doing Domain Driven Design it is advised that services should be stateless. There are several kinds of services when doing DDD:   * Application services.   * Domain services.   * Infrastructure services.   * Factories, Repositories, Specifications,...etc. How exactly do I make a service stateless? Does that mean I shouldn't have any instance variables in a class? Is there any guidelines on making a service/class stateless? I could really use a code sample that illustrate the difference between a stateful and stateless service. Example: (Is this class stateful or not?)               Class DataToCsvFileGenerator{              private String filePath;         private ResultSet data;              public String createCsv(ResultSet data){            this.data=data;                 this.createLocalFile();            this.loadDataIntoFile();                 return this.filePath;         }              private void createLocalFile(){                 this.filePath=//... logic to create file             }              private void loadDataIntoFile(){                 //function uses this.filePath to load data             }     }      Notice that any successive calls to `createCsv()` won't be affected by any prior invocation.


How to pick a great working team?

I've just finished my master and I'm starting to dig into the laboral world, i.e. learning how programming teams and technology companies work in the real world. I'm starting to design the idea of my own service or product based on free software, and I will require a well coupled, enthusiast and fluid team to build and the idea. My problem is that I'm not sure which would be the best skills to ask for a programming team of 4-5 members. I have many friends and acquaintances, with whom I've worked during my studies. Must of those ones I have in mind are very capable and smart people, with a good logic and programming base, although some of them have some characteristics that I believe that could influtiate negatively in the group: lack of communication, fear to debate ideas, hard to give when debating, lack of structured programming (testing, good commenting, previous design and analysis). Some of them have this negative characteristics, but must of them have a lot of enthusiasm, nice working skills (from an individual point of view), and ability to see the whole picture. The question is: how to pick the best team for a large scale project, with a lot of programming? Which of these negative skills do you think are just too influential? Which can be softened with good leadership? Wich good skills are to be expected? And any other opinion about social and programming skills of a programming team.


What are the best practices for exception handling in n-tier applications? The application is a fat client based on MVVM pattern with .NET framework.


Is LinqPad site quote "Tired of querying in antiquated SQL?" accurate?

I was struck by the heading > Tired of querying in antiquated SQL? on http://www.linqpad.net/. I am a N-Tier application developer and learnt my trade in a company that worked with a lot of data, so became fluent with SQL, but mostly for DALs. My finacée is a SQL developer so I've had an exposure of the SS/SSAS/SSRS/SSIS suite too. Other than the LinqPad team writing antiquated SQL themselves, or only using PROCs for application DALs rather then data heavy tasks, I can't think why the the LinqPad team think SQL is antiquated?


How does a website become hackable?

I know websites are hacked because of loose ends but how are they hacked via a form? Is it because the website owners didn't validate the form and the way they structured?


Is browser fingerprinting a viable technique for identifying anonymous users?

Is browser fingerprinting a sufficient method for uniquely identifying anonymous users? What if you incorporate biometric data like mouse gestures or typing patterns? The other day I ran into the Panopticlick experiment EFF is running on browser fingerprints. Of course I immediately thought of the privacy repercussions and how it could be used for evil. But on the other hand, this could be used for great good and, at the very least, it's a tempting problem to work on. While researching the topic I found a few companies using browser fingerprinting to attack fraud. And after sending out a few emails I can confirm at least one major dating site is using browser fingerprinting as but one mechanism to detect fake accounts. (Note: They have found it's not unique enough to act as an identity when scaling up to millions of users. But, my programmer brain doesn't want to believe them). Here is one company using browser fingerprints for fraud detection and prevention:   http://www.bluecava.com/ Here is a pretty comprehensive list of stuff you can use as unique identifiers in a browser:   http://browserspy.dk/


What's the point of initializing a variable with the same value twice?

I was reading Ben Cherry's "JavaScript Module Pattern: In-Depth", and he had some example code that I didn't quite understand. Under the _Cross-File Private State_ heading, there is some example code that has the following:               var _private = my._private = my._private || {}      This doesn't seem to be different from writing something like this:               var _private = my._private || {}      What's happening here and how are these two declarations different?


is a new change request on a user story a different user story

We have completed a user story for a sprint. Near the end of the sprint there was a new functional addition requested for the same user story. Here the user story will remain the same. ie As a i want to <> so that <> will remain the same. Only difference is that there is a new value add that is to be done. So should this be taken as a new user story for the next sprint or should this be taken as a backlog? We have met the done definition we had for the user story and this new feature is a new requirement which wont have any change in the user story definition. I am adding an example to make it more clear take a feature say create profile, in that user can update his name,address, phone no, photo etc and its done. now if the customer wants to have facebook link or add country code to phone number, is that change request a new user story


Planning a 3d file viewer using qt. Please suggest a 3d engine

I am planning a 3d file viewer with option to view 3d files (both geometry and mesh viewer). I would also like to put an option to convert between geometry and mesh. I am well versed with c++/qt. But novice in the field of 3d programming. What would be the ideal 3d engine, any open source projects already existing, matching my details? And why it would be a good example of what I plan to do?


What if you don't have code samples to give a prospective employer?

What do you do when you don't have any good code samples available when asked by a prospective employer? I like to consider myself a fairly capable developer but I can't share any of the software I've been writing for my company the last few years. Unfortunately, I haven't been able to find the time to put much work in my personal projects either. Basically, I don't think I can find any code samples that are a good representative of my skills that I can share. Any ideas? Thanks in advance.


Would the concept of source code layers be of any use?

I'm talking about something like layers in photoshop, except they apply directly to the source code. For example, in pseudo-code... inventing what some project might look like - say a computational fluid dynamics program: [base layer]               cfdTime runTime(0);          fieldVariable U;     fieldVariable p;     U.initialize();     p.initialize();          while (runTime.run())     {         U.solve();         p.solve()         runTime++;     }      [turbulence layer]               turbulenceModel turbulence;     scalar nu(readScalar(turbulence.dictionary("nu"));          while (runTime.run())     {         turbulence.update();     }      [base layer + turbulence layer]               cfdTime runTime(0);          fieldVariable U;     fieldVariable p;     U.initialize();     p.initialize();          turbulenceModel turbulence;     scalar nu(readScalar(turbulence.dictionary("nu"));          while (runTime.run())     {         U.solve();         p.solve()         turbulence.update();         runTime++;     }      You get the idea. Obviously a lot of things would need to be worked out. I'm all over object-oriented programming (OOP). This idea strikes me as an awkward alternative to OOP... and I don't think it's worth much... but I thought I'd toss it to the community... there just might be something useful in it that I'm not quite seeing. It may be useful from a GUI-only perspective - creating layers in the GUI for complex functional programming... while the underlying code is always the same. Or it may be useful for code optimisation, perhaps an alternative to #ifdef that developers won't run screaming from. Or, it may be an entire alternative to OOP. Your thoughts?


What type of interview questions should you ask for "legacy" programmers?

We have recently been receiving lots of applicants for our open developer positions from people who I like to refer to as "legacy" programmers. I don't like the term "old" because it seems a little prejudiced (especially to HR!) and it doesn't accurately reflect what I mean. We are a company that does primarily .NET development using TDD in an Agile environment, we use Git as a source control system, we make heavy use of OSS tools and projects and we contribute to them as well, we have a strong bias towards adhering to strong Object-Oriented principles, SOLID, etc, etc, etc... Now, the normal list of questions that we ask doesn't really seem to apply to applicants that are fresh out of school, nor does it seem to apply to these "legacy" programmers. Here is how I (loosely) define a "legacy" programmer.   * Spent a significant amount of their career working almost exclusively with Assembly/Machine Languages.   * Primary accomplishments include work done with TANDEM systems.   * Has extensive experience with technologies like FoxPro and ColdFusion It's not that we somehow think that what we do is "better" than what they do, on the contrary, we respect these types of applicants and we are scared that we may be missing a good candidate. It is just very difficult to get a good read on someone who is essentially speaking a different language than you. To someone like this, it seems a little strange to ask a question like: > What is the difference between an abstract class and an interface? Because, I would think that they would almost never know the answer or even what I'm talking about. However, I don't want to eliminate someone who could be a very good candidate in their own right and could be able to eventually learn the stuff that we do. But, I also don't want to just ask a bunch of behavioral questions, because I want to know about their technical background as well. Am I being too naive? Should "legacy" programmers like this already know about things like TDD, source control strategies, and best practices for object- oriented programming? If not, what questions should we ask to get a good representation about whether or not they are still able to learn them and be able to keep up in our fast-paced environment? **EDIT** : I'm not concerned with whether or not applicants that meet these criteria are in general capable or incapable, as I have already stated that I believe that they can be 100% capable. I am more interested in figuring out how to evaluate their talents, as I am having a hard time figuring out how to determine if they are an A+ "legacy" programmer or if they are a D- "legacy" programmer. I've worked with both.


Document overall business architecture

I’m looking to document my business’ overall system architecture. I want to capture what system/s everything starts in, what systems it flows into and why, and where everything ends up. As part of this I also want to identify the processes that allow the data to flow from one system to another including why and how. Being unfamiliar with documenting on this level, I really don’t know where to start. I want it to be easy to read but detailed as well. To give a little bit more information, I’m not really concerned with what happens to the data inside each system, just the inputs and outputs. How can I document this?


Where is this from (originally)?: "80% of the lifetime cost of a piece of software goes to maintenance"

In the Sun Java coding conventions document (here: http://www.oracle.com/technetwork/java/codeconv-138413.html), it states: "80% of the lifetime cost of a piece of software goes to maintenance" Does anyone know where this statistic is sourced from? I don't doubt the assertion, but I can make up statistics without attribution as well and I'd like to know where this came from before I start using it as a basis for other statements.