title: "Kill switch" in customer hosted environments, to protect payment?

text: I have a difficult client. Every bill is argued and debated over, and each email is parsed with a lawyers eye (because he's a lawyer), looking for a way to avoid paying for something. No amount of generosity on my part is ever reciprocated. The client currently has 60% of his bills unpaid (these are invoices he signed off on), and it is a substantial amount of money. How it got to this stage, admittedly is a product of my own naïveté. Since the client hosts his own code, I can't shut off the hosting and demand payment. **Is it legal to install a remote "Kill Switch" to shut down the customers code unless bills are paid?**


title: What is the best objective way to measure language popularity trends? (What's better than TIOBE?)

text: The best way to get data on computer language popularity that I know is the TIOBE index. But _everyone knows_ that TIOBE is hopelessly flawed. (If someone provides a link to support this, I'll add it here.) So is there any data on programming language popularity that is generally considered meaningful? The only other option I know is to look at the trends at indeed.com, which is inherently flawed, being based on job postings. It isn't like I would make a future language decision solely based on an index, but it might provide a useful balance to the skewed perspective one obtains by talking to ones friends and colleagues. To illustrate that bias, I'll point out that based on the experience of those I personally know, the only languages used professionally today (in order of popularity) are Java, C#, Groovy, JavaScript, Ruby, Objective C, and Perl. (Though it is evident that C, C++ and PHP were used in the past.) So my question is, everyone bashes TIOBE, but is there anything else? If so, can anyone explain how we know the alternative has better methodology? Thanks.


title: Wrapping simple statement in a function in java?

text: I was working on neo4j graph database in java. To get the reference node of this db:                   GraphDatabaseService graphDb=new EmbeddedGraphDatabase(DB_PATH);              Node Root=graphDb.getReferenceNode()      I always forget to prefix graphDb when calling getReferenceNode(). So what I did :                  public Node getRootNode(){        return graphDb.getReferenceNode(); }      Now after doing this , I thought this to be overkill as I am replacing a simple statement with a function call which surely has overhead but using getRootNode seems more intuitive to me. So my question is am I right in thinking that doing the above mentioned thing is inefficient? Or does it not affect performance that much?


title: Should an Http API always return a body?

text: Is there some sort of standard regarding http api responses? After reading this discourse thread I started to wonder. We are developing our public http json api at my work, and we do not return anything when it's not strictly needed (for example a PUT to /resource/{id} only returns 200 when ok or the corresponding 4XX or 5XX code, but no json body) Should we return a generic `{"success":true}` like they discuss on that link above, or is it ok to return a "void" body and handle everything with http response codes?


title: What language should be used to teach object-oriented design and development in university?

text: My understanding is that C++ is usually offered as the 1st OOP language, and as the 2nd programming language (after C) in my country (Bangladesh). I've taught it several times, and the problem I've run into is that students often tend to think C++ as an extension of C, i.e. C with `cin` and `cout`! This has lead me to think about teaching Java as the first OOP language in the upcoming semester. What is your opinion? I would like some suggestions from professional programmers as well as academics.


title: Real world use of C# Delegates

text: I think that I conceptually understand C# delegates, however, I am struggling to find a real world example where they would be useful. Can you provide some answers detailing how C# delegates were used in real applications and what problems they enabled you to get around.


title: Tricky logic puzzles - Are they really useful in assessing programming skills?

text: In the last interview I attended, I was asked to solve a puzzle where I was expected to measure exactly blah liters of water given two buckets with capacities - blah and blah liters respectively. I was unable to solve the puzzle in given time (~5 minutes). The interviewer was a bit disappointed and said a programmer has got to have "these" skills. I didn't get what skills he was talking about. I have always felt strange about these kind of puzzles that are normally asked at programming job interviews. I do not understand what, if at all, is the connection between such puzzles and programming. Exactly what skills do interviewers intend to assess with such puzzles?


title: Coding for good or charity

text: I'm looking for an open source projects, code-a-thons, or organizations which create software used for charity purposes or to help out charities. There must be a demand, but it is hard to locate them due to the wide variety of terms used to describe what they do. My preference is for sites with some degree of a positive reputation or some proof of effectiveness, such as through the number of charities helped. I understand that many of these may be localized, but my hope is to build a list of possible organizations to consider contributing time towards. I think this is on-topic because of "freelancing or business concerns" and it's only a moderately subjective question. GiveCamp is a good example (thanks, ElYusubov!) but We Are Microsoft is not so good since it's stale from 2010.


title: What's the least intrusive method for creating a backup of a couchdb database?

text: We're looking to create regular backups of a couchdb database, to ship offsite. What's the least intrusive way to obtain these - ideally without interrupting or significantly slowing down performance on the existing database server?


title: What is the difference between the BSD and the BCL licenses?

text: What differences are there, if any, between BSD and BCL licences?


title: what's best language to mate with Adobe Flex-based GUI for math crunching?

text: I'm not a software expert but need to outsource a web-based scientific GUI application, and I'm considering Adobe Flex. My math routines are currently in Javascript and C/C+. Having no experience with Flex, was hoping someone could help me understand what options are available for performing (preferably fast and efficient) CLIENT-side calculations. That is, can Flex interact with Javascript and/or C easily? If not, is actionscript or other language preferred? Downsides/tradeoffs? Need functions like LOG10, LN, SQRT, and would be nice to also have the error function (ERF) and complementary error function (ERFC), although I may be able to derive these last two from more basic functions if necessary. Thanks!


title: God Files versus Ravioli Code

text: Recently I asked a question about whether or not I should refactor my code. the responses I received were most definitely in the camp of going through with the refactoring due to the presence of a God File. However, now I'm pushing towards what I fear is Ravioli code. I will have around 6-7 ".c" modules (which I find perfectly manageable), but I'm pushing in to having probably around 10~ ".h" headers. I also still have about 8000 lines of code I need to parse through and refactor into their own parts and I'm not even sure how many more headers I'm going to need. I will probably be condensing and combining a few headers, but my question is: What is worse from a software maintainability point of view, having potentially too many modules (making it difficult to find and change definitions) or averting previous problem by potentially having fewer files but have them be bloated with excessive functions? Is my problem inevitable due to the 12k+ lines of code? Or am I simply blowing the size of the system out of proportion?


title: PHP: brackets or no brackets with if/for/while/...?

text: Both these syntaxes are correct and equivalent: With brackets:               foreach ($listOfThings as $thing) {       echo $thing;     }      Without brackets:               foreach ($listOfThings as $thing):       echo $thing;     endforeach;      Two questions come up in mind:   * Is there any real difference between them or are they totally identical (performence, for example)?   * Is it better always to use the same one or to use both, depending of some context (for example: to recognize easely the code concerning the framework). I suspect all that to be a matter of taste and company standards, but I'm not sure of that.


title: Creating a web application to concatenate strings to unify naming conventions

text: I've been tasked with creating a small web application, where users have a series of forms (I can't currently think of a better way of doing this) which will contain, either a)text input fields or b)drop down lists. The form will look as follows: `form1` `input box input box drop down box` `form2` `input box input box drop down box input box` `form3` `input box dropdown box input box drop down box` Now for each form, I would need to concatenate the resulting string stored within each box (drop down or input). Seems fairly simple and I already have a working prototype. Problem is for each form there can be multiple rows. What would be the easiest way to approach this? My skills are limited to HTML, CSS, JavaScript and some (light) JQuery. The working prototype I currently have the user fills out all the fields and then presses a "generate" button which generates all the conctenated strings. Is this approach that you would take?


title: What are the various branches of the C++ language out there?

text: Last time I tried to use C++ several years ago I remember having to include different libraries between different IDEs even though I was using the same operating system, which left me somewhat confused about the C++ language. Are there different standardizations of the C++ language? And if so, what branches of the language exist out there? Is the syntax and/or library names for each standardization different between operating systems? Also, What is primary standardization used nowadays?


title: Is XML required for this?

text: I am writing a desktop application in Java, which has all of the Airband radio frequencies for the UK in it. I would like to make this frequency database downloadable so people can print it. Would it be best to create the database in XML or use PDF for the download to print? Or perhaps there is another, better option?


title: Holding a presentation about what you've done

text: I have to give a presentation next week to my supervisor and my teacher about the activities I have performed during my internship. I've never been good at presentations and become nervous really quick. When I get nervous I start to talk really fast and skip valuable information I should've told. I feel like I need to master giving presentations if I want to become a serious software engineer later on. Do software engineers give presentations on a regular basis? How can I prepare myself for a presenation? Would I get less nervous if I gave more presentations? Any hints & or tips are greatly appreciated.


title: What features are vital for good bug tracking software?

text: What features are vital for good bug tracking software and why are they important? What in particular is necessary for you to consider these features done right?


title: How long do programmers generally stay in industry?

text: One thing that I've heard a lot over the years is that those working in the IT world generally don't make life time careers out of it, but tend to "burn out" and start a new career doing something else unrelated (e.g. going from software development to being an accountant). Have you found this to be generally true in your experience and if so, what is the general impression on how long people work as developers before starting a new career?


title: Scrum vs. Agile vs. CMMI

text: I am pushing my project over to Visual Studio Online in order to have some source control. I am developing this project by myself. I have never used Scrum, Agile, nor CMMI before, and the detailed description I read at http://msdn.microsoft.com/library/vstudio/ms400752.aspx is assuming a lot of knowledge. (It makes no sense to someone who doesn't already know what they are talking about.) The best way for me to really learn Scrim or Agile or CMMI is by using them. But where to start? The above link does not help me there. As a solo developer who is just looking for source control, should I start off with Scrum, Agile, or CMMI? To take the opinion-basedness out of this question, I will make my official question: **What is the difference between Scrum, Agile, and CMMI in Layman's terms?** (But really, I just am trying to figure out where to start!)


title: Design MVC site such that UI developer can work without access to data tier?

text: I'm working on an ASP.NET MVC site (using Team Foundation Service for source control) that I've divided into a few separate projects under one solution:               Project.WebAPI (Main entrypoint, contains "Views","Scripts" folders     Project.Data (abstract interfaces for backend data access)     Project.Data.SqlServer (concrete implementations for data access)      For my UI designer to work, he shouldn't need access to much. Pretty much the only thing that he's working on is the "Views" and "Scripts" folders of the main project. But "Project.WebAPI" takes parameters that live in Project.Data, so there's a dependency there. The app is SPA-style, so I could easily store a fake JSON payload which would entirely remove the need for logging in and pulling real data. My ultimate goal would be to be able to share a subset of the source with the UI designer allowing him to check changes directly into the overall project rather than create a separate instance just for his work which I would have to manually merge in. Does anyone have any experience with this type of thing? Edit: for clarity: The purpose is to protect the intellectual property of the solution so that the front-end developers don't have access to the entire solution. I hope that helps...


title: How to break these long C++ lines in a neat way?

text: I'm on my first bigger C++ project and find that I have some really long lines. My goal is to break them to 79 columns, but I do not really know how to do this in a neat way. Are there some guidelines to break lines like these:               VectorHistogram::VectorHistogram(size_t bins, size_t cache) : bins(std::vector<double>(bins)), cache(std::min(cache, MAX_CACHE_ENTRIES)) {      or               VectorHistogram position_histogram {settings.position_hist_bins, settings.time_sites * settings.iterations};      or               MetropolisDriver::MetropolisDriver(Settings settings) : settings(settings), system(HarmonicOscillator {settings.time_step, settings.mass, settings.mu_squared}), trajectory(ListQuantity {settings.time_sites}), ma(MetropolisAlgorithm {trajectory, system, settings.position_seed, settings.accept_seed}) {


title: Is it worth registering software with the U.S. Copyright Office?

text: nolo.com says: "If you want to stop someone from using or otherwise infringing on your work, you must sue the infringer in federal court. However, in order to do so, you must first have registered the copyright with the U.S. Copyright Office." Is it true that the only way to take legal action against software copyright infringers in the U.S. is to first register with the U.S. Copyright Office? And is it true that that's the only way to recover statutory damages? Are there other benefits of registering software with the U.S. Copyright Office? What are the costs, besides the fee and the hassle of re-registering new versions of the software?


title: What's is the actual reason that JavaScript is not enough to draw?

text: I'm looking for a pure JS library that allows to draw the mouse trail, but I cannot find anything pure but using canvas. Is there is a reason for that it could not be achieved? I'm on the wrong thoughts?


title: How to turn a website into an offline usable directed graph for searching shortest ways between pages

text: I am an advanced-intermediate level student focused on the .NET and C#. I know all the basics as well as classes, methods, objects, inheritance, OOP principles and all that. Problem is we haven't covered data structures like trees and graphs yet. Basically what I need my program to be able to do is this: Part 1 Console application:   1. Go online to a specific website and following the net of links on it, starting with the main page, create a directed graph with weightless edges and store it locally, so that it can be used without internet connection.   2. Be able to recreate the graph from the locally saved data and then by given 2 links as parameters to find and print the shortest path between them. Part 2 Some sort of UI:   1. By given webpage address and depth - visually represent in the browser a tree structure with the given website as root and the level of depth of the possible pages accessible by following the links from it. I would really appreciate it if you can direct me in the choices I have to make to accomplish this task. Mainly I am puzzled by these:   1. How to represent a graph in C#.   2. How to save it locally (program must finish within 5 seconds, so I cannot go online and do everything from scratch).   3. What should I use for the UI part with the tree visualization. I don't seek for complete answers rather than good directives. I need to learn these fast and not to waste precious time wandering.


title: Is the ADO.net Entity Framework appropriate when all you do is insert records in bulk?

text: My department develops software to migrate databases for our customers from their old CRM software to ours. In this process we could be inserting up do millions of rows, processed one at a time as we need to do mapping and formatting to go from their old system (which could be anything from a Relational Database to a set of flat binary files) to our MS-SQL database. Currently we use a producer consumer model that reads in from their old system to our mapper, then use another producer/consumer model to go from that in to thread local DataTables which get batched out every 15,000 rows in a SQLBulkCopy operation to keep the number of objects held in ram down (larger tables can easy exhaust the 2 GB limit for a 32bit application if we try to hold the entire table in memory before inserting it.) The issue is this is kind of a kludge setup to be able to generate the new rows and insert them in to the database. Recently we have had the opportunity to re-write the database to fit our needs and I have been working away at my manager at the idea to using some form of ORM. I have been starting to look around at various ORM solutions, and I know we want to stay with a pure Microsoft stack (it was hard enough to get my manager to consider using an ORM, and I don't have a snowballs chance of convincing him of using a 3rd party library, since the main CRM app uses a 3rd party image processing library that is not very good and he has hated 3rd party libraries ever since). Comparing Linq-to-Sql and ADO.net Entity Framework I think the EF fits our needs better. However I am concerned about performance. Most CRUD apps are Read->Update at a slow rate (only displaying one record or a set of records with a common variable at one time). **However we will just be doing Create, Create, Create. Is an ORM like EF designed to do that?** My manager is obsessed with performance. When this process was done in VB6 (which is how it was done up to two years ago) it could take up to several hours to run a conversion. With our current kludge the longest ones take at most half an hour to process several Gigs of records (the slowest part is dealing with that 3rd party image library I mentioned earlier, ones that are pure text take at most 10 min). **Could I potentially see a slowdown in EF versus using SqlBulkCopy, and what can I do to mitigate the running cost if it does?** * * * Also I had a really hard time deciding if this should go here or SO, if you think it should be SO please let me know. * * * **UPDATE:** In response to Wyatt Barnett answer: if using an ORM is the totally wrong way to go, is there any other solution that will perform well other than generating generic DataTables on the fly based off of the schema of the destination database? The thing I liked most about EF was the fact that I had strongly typed data types, and that I could update both our database and our objects mapping the database with the tools built into Visual Studio in one location.


title: Are there languages that make it easier to understand secure coding principles?

text: I'm interested in expanding my knowledge of security issues: things like buffer overflows, format string vulnerabilities, etc. I'd like to be able to go through a language and understand its security implications and pitfalls to get a better understanding of secure coding practices in general. Are there certain languages that are more conducive to a learning experiment like this? Are there languages, due to abstractions or complexity, I should avoid? Where should I start?


title: Dynamic Post-build event in Visual Studio

text: I am building a video server application that has multiple projects in Visual Studio. One project, the video server project, needs to call a shell script to generate documentation. This works fine when you build the video server project, because the script is simply               cd "$(SolutionDir)"     start documentationgenerator      However, there is also an SDK project that, when built, also builds the video server project. However, when it does this, it does not know where the shell script is, since it tries to use the _SDK Project's Solution Directory_.   * SDK Project   * Video Server Project      * shell script So the question is: how do I make the SDK Project find the Video Server Project? I checked the MSBuild properties and there are no properties that seem to deal with 'nested' projects.


title: Cairo Rotate Text : Transformation Matrix

text: http://www.cairographics.org/manual/cairo-Transformations.html I have been using Cairo Vector Graphics Library for some work, and I can't quite understand some parts: What is the default value of the transformation matrix? When do I need the transformation matrix anyway? Suppose I don't want to rotate text, will I still need to set it, will it still be set?


title: Securing Back End API for Mobile Applications

text: I have an application that I am writing for both iOS and Android; this application will be served by a ReSTFUL API running on a cluster of servers on "the internets". I am curious how the rest of the world is going about securing their APIs so only specific applications running on iOS or Android can use these APIs. I could go the same route as other OAuth providers by providing a key/secret combination (2-legged OAuth), however, what do I do if I ever have to change these keys??? Do I create a new key/secret for every person that downloads the app??? The application is a social-based game that will allow the user to interact with other "participants" in the game based on location, achievements, etc. The API will provide the following functions: -Questions, Quests, etc -Profile Management -User Interaction -Possible Social Interaction Once the app gains traction I plan on opening up the API ala Facebook, Twitter, etc. Which is easy enough, I plan on implementing an OAuth Server and whatnot. However, I want to make sure, during this phase, that only people who are using the application can access and use the API.


title: What should I know or learn to get up to speed on being a software QA engineer?

text: I've been a software engineer in .NET for the past 3.5 years, and did my own integration and unit testing, but nothing too extensive. Now I'm being interviewed for an entry level QA job, and I wanted to know what concepts I should become familiar with.


title: When writing tests for a Wordpress plugin, should i run them inside wordpress or in a normal browser?

text: I have started using BDD for a wordpress plugin i'm working on and i'm rewriting the js codebase to do tests. I've encountered a few problems but i'm going steady now, i was wondering if i had the right approach, because i'm writing test that should pass in a normal browser environment and not inside wordpress.   I choose to do this because i want my plugin to be totally indipendent from the wordpress environment, i'm using requirejs in a way that i don't expose any globals and i'm loading my version of jQuery that doesn't override the one that ships with Wordpress. In this way my plugin would work the same on every wordpress version and my code would not break if they cheange the jQuery version or someone use my plugin on an old wordpress version. I wonder if this is the right approach or if i should always test inside the environment i'm working in. Since wordpress implies some globals i had to write some function purely for testing purpose, like               "get_ajax_url": function() {         if( typeof window.ajaxurl === "undefined" ) {             return "http://localhost/wordpress/wp-admin/admin-ajax.php";         } else {             return window.ajaxurl;         }     },       but apart from that i got everything working right. What do you think?


title: Refactoring expansive message architecture

text: I am currently working with a system that acts like a message bus. A message comes in to the service (WCF Windows Service hosted). The system then uses a service locator pattern to look up which dynamically loaded assembly will be assigned to the message. The assembly is found and then a method is executed which handles the message. The response is then sent back to the client. The problem is that the message base is growing enormous, as well as their associated plugins. And there is a lot of code duplication. Let me give a few examples: >   1. GetOrderMessage >   2. GetExpiredOrderMessage >   3. GetOrderMessageByCustomerId >   4. Get_something_related_to_order_Message etc, etc... > As you can see, the messages are very specific. The messages themselves are simple data contracts and they contain zero business logic. On top of this problem, there is a plug-in for some of these messages that just handles one message. Therefore, there is almost a plugin for every message type!! The system appears to support a one-to-many relationship for a message/plugin, but it appears that all the implementations are one-to-one. How could I refactor these to reduce code duplication and make the system smarter? I would like the code to be more easily digested to developers because there is a lot of duplication happening. (Due to some constraints, I cannot use an ORM for data access/entity creation) In response to Robert Harvey's comment below, I would like to clarify the following: In 99% of the use cases, the plug-in layer is just simply wrapping a data access call. Here's how it might look.               Request of GetOrderMessage ->         Order Plug-in ->              Order Data Access (ADO.NET, hand-rolled stored procedure of usp_GetOrder) ->                  value returned from Order Plug-in ->                      Response of GetOrderMessage returned to client


title: Most MVC-strict php framework

text: I have been trying to wrap my head around MVC pattern for about 6 months.I've read tons of articles, Q&A, and blog posts about MVC and HMVC patterns, but I just simply don't get it 100%. I tried learning MVC by exercising one of widely used PHP MVC framework, CodeIgniter. I've implemented few internal websites for my company with it. And STILL, I don't 100% get it. I believe one of the best ways to learn something is to follow strictly defined rules. **So my question is:** What is the most strict PHP framework in terms of how MVC pattern is implemented? One that defines how I use models, controllers, and views so that I can completely get what MVC is?


title: Can I apply for "Software Engineer" jobs without being an engineer?

text: I am from a country in which the use of the word "Engineer" or "Engineering" is strictly regulated by legislation. This means that you must hold a degree in Engineering AND passed an exam to join the Engineers' professional association to use the title. I am a bit confused about the term "Software Engineer" as used in the industry, globally. I read the wikipedia page on Software Engineer and the linked section of the page about the term usage, which offer an in-depth discussion. However my question is somehow more concrete. Knowing that I don't hold a degree in engineering (yet, I like to think I produce funcional, well designed software!), when I see an opening for a software engineer from an international company, would it be appropriate for me to apply? Should I somehow emphasise that I don't hold a degree in engineering?


title: How can I efficiently handle input data without a framework?

text: I am working on a very small project and my design would be using technologies such as JSP, servlets, and POJOs. I'm considering a workflow where a JSP page will receive input data, then submit it to a servlet. The servlet would then have a lot of helper POJOs in it that would do all the real work. One thing I've noticed with this approach very early on is that it grew into a huge number of if-then-else statements. Is there a better way to accomplish what I'm trying to do without having to resort to a framework?


title: Possible solutions for sharing working copy of project between multiple computers?

text: So there are 3 computers that I use to work on this project with, my home PC, work PC, and work Mac (for building to devices). The project has an SVN repository that two other programmers use so I can't commit broken code to it. The lead doesn't know how to use version control so the trunk contains art assets and everything else in addition to the project itself, making branching impractical (and I wouldn't want to use svn for branching anyway). I would use GIT if I could but it is not an option. My question is, how can I go to work, update my working copy, work on it a bit, send it to my mac for building, then go home and work on it some more later- keeping in mind that I may go 1-2 days without being able to commit working code to the repository?


title: Can I say that ASP.NET is compiled?

text: You know that C# is a compiled language. But when we develop web applications we use ASP.NET + C#, in this case can we say that ASP.NET is compiled? If ASP.NET is not compiled does it affect the performance of C# when ASP.NET and C# works beside each other to develop web applications?


title: How do I create a simple yet complex business layer?

text: I'm working with a fairly complex web application. It's split up into the following layers:   * Presentation - HTML   * Service layer - A REST and SOAP API communicating with the business layer   * Business layer - Contains the business logic.   * Data access - Provides access to the storage (SQL etc) The business layers contains classes encapsulating specific areas, such as customer registration, user management and more. The problem we are seeing is that the business layer is starting to get a bit messy. We have a single class handling customer management but as this area of the application grows more and more complex, the class grows and grows and become messy. For example, we may have the following classes   * class CustomerManager     * void CreateCustomer(...)     * void DeleteCustomer(...)   * class UserManager     * void CreateUser(..)     * void DeleteUser(...)      * void ActivateUser(...)     * void InactivateUser(...)     * void ResetPassword(...)  Creating a customer involves creating users as well. So CustomerManager calls misc methods in the UserManager class. As the application has evolved, creating a new customer means roughly 10 different things needs to be done except for registring the customer in the database, such as informing sales, audit logging, configuring default user accounts, creating a default configuration for the customer, notifying end-users of their auto-generated passwords and more. So CustomerManager.CreateCustomer grows to ~100 lines of fairly hairy code. I'm trying to think of a good way to handle this but am assuming that there's some common good way to do this which I'm simply not aware of. I've considered creating "Task"/"Command" classes implementing small sub- processes and then let the CustomerCreation.CreateCustomer simply execute a set of tasks. I would have more classes but they would each do less things. I've also considering implementing some kind of global application-level event/plug-in systems where CustomerManager.CreateCustomer just creates the customer in the database and then publishes an event that the customer is created. Plug-ins/something can then subscribe to these events and do stuff such as informing sales and logging the fact. Using this method, I wouldn't have to actually update CustomerManager.CreateCustomer when I want to do more stuff which is something which feels attractive to me. What obvious design pattern am I missing?


title: How to edit the HTML of an ASP.net site?

text: Assume that I'm a front-end developer (HTML, CSS) And some one who got their website built using ASP.NET came to me and asked for a new design and I don't know about ASP.NET. Then, how can I change the design of their website without affecting their code? Do I have to learn a little bit of server side languages to be able to change to the look of sites without affecting the original server code?


title: what will be the Output of the following code written in " C"?

text: #include<stdio.h>     void main()     {     char ***p="hello";     printf("%c",++*p++);     }      I haven't understand the concept of (*) indirection uses here **three times**.               When i compiled this program then the output was "j".     But actually hear the p is a pointer to pointer to pointer to Array of character.      Then why i getting the output as j.      I didn't understand what's the logic behind this.      please help me to understand the actual logic behind this. and the confusion increase more when I only use one indirection and get complied the program .then the output is i.means               void main()     {       char *p="hello";       printf("%c",++*p++);     }      **this gives output as i.** What is the difference between these two program?


title: What is the best way to have security auditing done?

text: I have an authentication system(ASP.Net library) that I want to make sure is secure. What companies/resources can I use to make sure of this? Also, what should I make sure to do before sending it off to be "broken"? A bit more background: Basically, I'm wanting to make a little bit of money by selling this system, but I don't have a whole lot to invest in it(USD $100-$200). I'm wanting to make sure I'm selling something secure, and that buyers know it's secure. I personally have looked over the code multiple times just staring trying to find a security flaw and cannot find one. This is of course not to say there isn't one. This is where I want to pay someone to come in and look at my code and how it all works and basically tell me if it's secure or not


title: What limitations does the JVM impose on tail-call optimization

text: Clojure does not perform tail call optimization on its own: when you have a tail recursive function and you want to have it optimized, you have to use the special form `recur`. Similarly, if you have two mutually recursive functions, you can optimize them only by using `trampoline`. The Scala compiler is able to perform TCO for a recursive function, but not for two mutually recursive functions. Whenever I have read about these limitations, they were always ascribed to some limitation intrinsic to the JVM model. I know pretty much nothing about compilers, but this puzzles me a bit. Let me take the example from `Programming Scala`. Here the function               def approximate(guess: Double): Double =       if (isGoodEnough(guess)) guess       else approximate(improve(guess))      is translated into               0: aload_0     1: astore_3     2: aload_0     3: dload_1     4: invokevirtual #24; //Method isGoodEnough:(D)Z     7: ifeq     10: dload_1     11: dreturn     12: aload_0     13: dload_1     14: invokevirtual #27; //Method improve:(D)D     17: dstore_1     18: goto 2      So, at the bytecode level, one just needs `goto`. In this case, in fact, the hard work is done by the compiler. > What facility of the underlying virtual machine would allow the compiler to > handle TCO more easily? As a side note, I would not expect actual machines to be much smarter than the JVM. Still, many languages that compile to native code, such as Haskell, do not seem to have issues with optimizing tail calls (well, Haskell can have sometimes due to laziness, but that is another issue).


title: What should a programmer know about IIS and various protocols (tcp, http, etc.) when developing web apps and services, etc.?

text: Often one of the biggest problem areas for me when developing software (win and web) is some of the more (seemingly) abstract areas like tcp/ip, deploying to IIS and the various configurations, etc. This especially pops up when I am deploying a web app to IIS. What should I know about this so that I can troubleshoot problems, and develop services and apps that leverage an actual understanding of these areas? Also, WHERE can I learn this??


title: In Agile development, who owns the software "features" and how to you manage the development?

text: Some development teams in my company are switching to Agile development practices and their developers' work seem to be diminishing to discuss and program minutia about trivial software features because of two week iteration cycles. And also because of "any developer can fix any bug" mentality. I have recently joined one of those team, transferring from another team in the same company... I feel strongly that developers should own their software features from start (design) to finish (implementation and unit testing). Agile seems to be going counter to this thinking. Is there any truth to my perception or am I just living a bad implementation of Agile? During our two week iterations, people somewhat arbitrarily get assigned new little features and bug fixes, depending on their workload during that cycle. Nobody seems to be owning responsibility of major features of the software. We spend stupid amount of times on trivial things, like adding a _single_ button to a dialog during a two week iteration, complete with a story, daily scrums, code review, etc. So in Agile projects, how does one manage larger features? Who own the responsibility: individual developers or the whole team? How does one extract him/herself from minutia and focus on longer term goals? Any feedback would be valuable.


title: Tool helping with estimations

text: I am looking for a tool supporting me with estimations. What I would like to do is to specify a higher level task and break it into several smaller tasks. When a task is small enough, I could assign the time it takes to finish it. The sum of these quantifiers should show up in the parent tasks. One could use Project for this, but IMHO this is some kind of overkill ... Also nice would be if you could do this like mindmapping so that a parant node sums up all of its childs estimations. Is something like this out there?


title: Which Open Source License is right for my project?

text: I'm developing a suite of software tools that I need help with which is why I want to release my software open-source. People should be able to use and modify my code as they please while contributing to my project. Ultimately, the tools that I develop will require a paid commercial license, but may be free to those for non-commercial purposes. This software suite will consist mostly of website plug-ins. Other tools I develop open source be used for consulting. What would you suggest as a license?


title: How do people maintain their test suite?

text: In particular, I'm curious about the following aspects:   1. How do you know that your test cases are wrong (or out-of-date) and needed to be repaired (or discarded)? I mean, even if a test case became invalid, it might still pass and remain silent, which could let you falsely believe that your software works okay. So how do you realize such problems of your test suite?   2. How do you know that your test suite is no longer sufficient and that new test cases should be added? I guess this has something to do with the requirement changes, but is there any systematic approach to check the adequacy of test suite?


title: Entity Framework as a type checking/verification system for database code

text: When I read pro and con lists of using Entity Framework (or any modern ORM really), I'm surprised that the following point doesn't arise (self quote): > Using strongly-typed domain entities allows for type checking at compile- > time which essentially performs a verification of all your database > operations. This is something that is not possible with ADO.NET (whether > using inline SQL or stored procedures). For me, this is one of the biggest advantages of using an ORM. An issue that I come across regularly when dealing with ADO.NET based applications are the run-time errors from SQL. Static checking completely eliminates this. Could anyone elaborate as to why this isn't hugely relevant to many developers? It appears that some don't even agree with the above statement. **Example of some pro & con resources:**   * Entity Framework VS LINQ to SQL VS ADO.NET with stored procedures? (stackoverflow)   * Five Reasons for using an ORM Tool   * Why use the Entity Framework? Yeah, why exactly?


title: What's a good way for a program to process an email mailbox?

text: Let's have a program that checks an email mailbox and then "processes" the messages contained there. (For this question it doesn't really matter what it actually does with the message). The program will run once per hour and can easily handle the volume of new messages and there is no penalty for processing a message twice. Let's say it will be using the IMAP protocol and can perform any of the standard functions that an email application can do. What mechanism would you recommend for processing the email?   * **Mark as read** \- the program marks a message as read after processing it.   * **Unmodified mailbox** \- the program doesn't modify the mailbox at all.   * **Something else** \- some other method I haven't thought of yet. Suggestions welcome.


title: Can we provide a login functionality in multiple language?

text: My username is krunal. And If i type my name in any language like Gujarati(કૃણાલ), Hindi(कृनल) or English(krunal) in username textbox than it should allowed me to login without any specific language selection. I just want to know the views of other people regarding this functionality. Is it a good to provide a login functionality like this ?


title: Pairwise testing, not possible to say which combinations is faulty?

text: Let's say I have 4 (A,B,C,D) parameters with 3 possible values, also 81 unique combinations. With e.g. orthogonal array, I will end up with 9 test cases, each combining 3 pairs. But that means that if one test case fails, I do not know which combination in the test case is faulty, right? Whether values of A,B or A,C or BC. Just wanted to be sure I understood it well. edit: Corrected (thanks GlenH7).


title: To refund or not to refund this client?

text: I'd really appreciate your advice on an ongoing project. I presented my client with a proposal and design samples which he approved, and he paid in full instead of the 50% upfront deposit as I'd given him a generous discount. He was then slow in furnishing me with some of the content, but once we did, he expected the website to be finished immediately which was not possible. Because he needed it done urgently, we agreed to try to get it done about 10 working days after the content was provided, but the developer who was helping me let me down. The next week, I completed the website myself and uploaded it to the server on a Friday afternoon. He then calls and texts me on following Sunday while I'm at church to say it's not online (there was probably a problem with his browser). The next morning, I received an email from him demanding a full refund within two days because he couldn't see the website (even though it was live, and I tested it on multiple browsers, a different computer and my phone), and he called me shouting at me because he couldn't access it. Finally when he was able to access it, he was unhappy with a certain detail regarding the slideshow which I began fixing and which was done the next day. He then referred me to another website and said he wanted it to look similar but not identical to it in terms of the layout. He also now wanted to add more features which were not in the original design. I got a designer to work on a new design which I sent to him for review, which if approved would be completed by 15 October, and he approved it last Thursday. He then called me yesterday to say that he wanted to change the design - he only approved it out of impatience. He now wants the website to be more similar to the other website he referred me to and he wants it done before the 15th! Then, he says to me that other people have done websites for him in three days - website's he's complained to me about for lacking dimension because they were just premium themes, whereas we'd designed and coded from scratch. I'm thinking of finishing the website but refunding him in full (or at least the refundable 50%) less domain registration and other non-refundable amounts, just to avoid further escalation of this matter and having him call me next week and say he wants to change it again. These are the applicable terms and conditions as laid out in the agreement: >   1. Total amount due for this project is Amount A. >   2. Client shall pay Consultant a deposit of Amount B (50% of total amount > due for project) in advance before any work commences on the Project. >   3. The balance is due within 7 working days of completion of project. >   4. Deposit is non-refundable. >   5. Should client opt to host elsewhere, applicable transferral fee of > Amount C will apply. >   6. Estimated project completion time frame is 14 to 30 days from the date > Client furnishes Consultant with Brief and all other required media and > data, provided that Client has made payment to secure the project. >   7. Consultant will make every effort to meet agreed upon due dates. The > Client should be aware that failure to submit required information or > materials, or last minute changes and excessive changes may cause subsequent > delays. Client delays could result in significant delays in delivery of > finished work. >   8. Major changes in client input or direction or brief will be charged at > normal rates. >   9. Any work the Client wishes Consultant to create, which is not specified > in the attached Proposal will be considered an additional service. >   10. Client agrees to pay Consultant for any additional expenses or > additional services not included in the attached quotation and proposal if > requested by the Client. >   11. Web design credit in the name of the Consultant, and link to > Consultant’s website shall be placed on the footer of the final Website. >   12. Either party may terminate this Agreement by giving 7 days written > notice to the other of such termination. >   13. In the event that Work is postponed or terminated at the request of > the Client, Consultant shall have the right to bill pro rata at full rates > for work completed through the date of that request, while reserving all > rights under this Agreement. >   14. If additional payment is due, this shall be payable within seven days > of the Client's written notification to stop work. In the event of > termination, the Client shall also pay any expenses incurred by Consultant > and the Consultant shall own all rights to the Work. > Advice please?


I am creating an internal application for the company I am contracted to. We wish to use a GPLv2 licensed library in this application. Some points   1. The application is to be used within the confines of the company and never be available for public use. It is for internal company use only.   2. **It will never be sold, ever!!**. So no money will be made directly from selling the code. It's not a product.   3. There are two forms of usage of the application      * Its native form which is console based exe (which uses the GPL library); and      * Usage via a web interface which calls the executable.   4. The source code will remain closed source (company use only), and be propriety  I have gone through numerous questions on SO about this (one closed as off- topic and another unmarked from Programmers ), but I have had a hard time in understanding whether my interpretation of the licence is correct. Based on my understanding thus far, I am permitted to use this library without any concern. I am not modifying the source code nor am I distributing the application or making the application publicly available. **The application will not be sold nor will it be distributed to anyone outside the company** (It will however be available at our company's offsite DR facility). I am very likely to use the released versions binaries and not re-compile from source. The following question from the GNU FAQ seems to support my thoughts. **Does the GPL require that source code of modified versions be posted to the public?** > The GPL does not require you to release your modified version, or any part > of it. You are free to make modifications and use them privately, without > ever releasing them. **_This applies to organizations (including companies), > too; an organization can make a modified version and use it internally > without ever releasing it outside the organization._** > > But if you release the modified version to the public in some way, the GPL > requires you to make the modified source code available to the program's > users, under the GPL. > > Thus, the GPL gives permission to release the modified program in certain > ways, and not in other ways; but the decision of whether to release it is up > to you. Can any GPLv2 licensed library be used in a company's internal intranet application?


title: What are the signs that a ten days debugging session will not resolve an issue?

text: Ten days ago, we fixed a bug on a large application and the hot fix has created a disappearing of some data from the user point of view ( _side effect_ ). Data are not deleted, but have been set to _hidden_ status. It could be possible to get the data back, but the thing seems to be hard: we've already spent 10 days to understand and reproduce the problem (mostly with SQL queries but sometimes it is necessary to _update_ the database to test the application logic). My questions are :   * is 10 days a normal amount of time for these kind of problems?   * should we keep on and retrieve the data or should we give up this work (so the customer-relationship person will tell these users _sorry for the loss, but your data have disappeared_ or maybe tell nothing at all)?   * what can be the signs that shows that **we should stop to search for how to solve this issue**? Edit about the context : we are a small team(3), users are not the customers, and lost data are not about the users money, bank or vital data. This is a question from a confused developer about _development methodologies_ and _business concerns_ , not about how we should deal with the customers.


title: Is working on a large project a good or a bad thing in the long run?

text: In a large project you only get to use the technology necessary for that project; smaller projects come and go, and you need to learn more technologies. On the other hand large projects are usually complex and thus hard; if you are used to hard projects then you should manage to perform well on smaller projects. So, in the long term is it better to work on small or on large projects?


title: Desktop GUI Client - Remote RDBMS communication

text: Sorry if I am asking a trivial question but I have been searching for a while without any luck. I need to design a system and I am looking for advice on the technology that should be used. The layout is very simple: it is a sales application with a centralized database and multiple clients. Each salesperson has GUI app installed on his/her laptop that should be able to connect to the database to retrieve data and upload data (i.e. register new orders). My question is the following: how should the communication between the client and the server be implemented? I doubt that connecting directly to the RDBMS is a good idea... Should I use web-services? XML-RPC? How to implement authentication and encode the data? Thanks for your advice!


title: Cerification Guidance

text: I am a fresher working in a MNC. I just want to do one .net Certification either in .net 3.5 or .net 4.0 which one'd be good for me to start certification. Please anybody suggest me with exam code and please tell me the good resourses for preparation.


title: Haskell: Best tools to validate textual input?

text: In Haskell, there are a few different options to "parsing text". I know of Alex & Happy, Parsec and Attoparsec. Probably some others. I'd like to put together a library where the user can input pieces of a URL (scheme e.g. HTTP, hostname, username, port, path, query, etc.) I'd like to validate the pieces according to the ABNF specified in RFC 3986. In other words, I'd like to put together a set of functions such as:               validateScheme    :: String -> Bool     validateUsername  :: String -> Bool     validatePassword  :: String -> Bool     validateAuthority :: String -> Bool     validatePath      :: String -> Bool     validateQuery     :: String -> Bool      What is the most appropriate tool to use to write these functions? Alex's regexps is very concise, but it's a tokenizer and doesn't straightforwardly allow you to parse using specific rules, so it's not quite what I'm looking for, but perhaps it can be wrangled into doing this easily. I've written Parsec code that does some of the above, but it looks very different from the original ABNF and unnecessarily long. So, there must be an easier and/or more appropriate way. Recommendations?


title: Is there such thing like a "refactoring/maintainability group" role in software companies?

text: So, I work in a company that does embedded software development, other groups focus in the core development of different products' software and my department (which is in another geographical location) which is located at the factory has to deal with software development as well, but across all products, so that we can also fix things quicker when the lines go down due to software problems with the product. In other words, we are generalists while other groups specialize on each product. Thing is, it is kind of hard to get involved in core development when you are distributed geographically (well, I know it really isn't that hard, but there might be unintended cultural/political barriers when it comes to the discipline of collaborating remotely). So I figured that, since we are currently just putting fires out and somewhat being idle/sub-utilized (even though we are a new department, or maybe that is the reason), I thought that a good role for us could be detecting areas of opportunity of refactoring and rearchitecting code and all other implementations that might have to do with stewarding maintainability and modularity. Other groups aren't focused on this because they don't have the time and they have aggressive deadlines, which damage the quality of the code (eternal story of software projects) The thing is that I want my group/department to be recognized by management and other groups with this role officially, and I'm having trouble to come up with a good definition/identity of our group for this matter. So my question is: is this role something that already exists?, or am I the first one to make something like this up? **Edit** : What I mean is a group driving refactoring initiatives, not doing all the refactoring work themselves. Much like an open source community to an open source product, now that I think of it.


title: What is it called when you're developing a web application where every url has its own php file

text: What is it called when you aren't using an MVC framework and each URL has it's own file associated with it. I want to say it's model 0 or class 0 but I haven't been able to find anything useful via Google. :-)


title: Who is responsible for fixing failed SQL code reviews?

text: As a DBA, most SQL is submitted to my team for review. We do not have a SQL developer, so the code is frequently very, very inefficient. Our current process is:   1. SQL is submitted for review right before it goes to beta   2. Issues are pointed out but frequently not resolved because the application has already been written around it, and is scheduled to be deployed to beta the same week   3. If the DBA team identifies an issue, the developer response is "show me how to fix it, then" It should be noted that the DBA team has no requirements around any code, no context and no idea what 1000s of lines of a stored procedure is supposed to be doing. Is this a typical scenario? Who is responsible for fixing the code? Does your DBA typically re-write the stored procdedure for you?


title: Can a class be inside another class?

text: Here's an excerpt from "The C++ Programming Language"               template<classT> class List { // optimal     public:     class Link { /* ... */ };     List (); // initially empty     void put(T *); // put before current element     T* get(); // get current element     / / ...     };      Can we make a class inside another class ? How about other languages? For PHP see this question


title: Randomly Accessing Data Packets in a Compressed File

text: In my line of work I deal with very large files, hundreds of Gigabytes in size. The nature of the data in these files is such that compression would greatly reduce their size. The problem is, the records/data packets within the file must be individually accessible. Is there a way to apply some home-grown techniques to these records to individually compress them and, once compressed, place them in a data stream such that the byte offset locations of each compressed packet is still known? Would this kind of fragmentation of the packet data substantially affect the efficiency of the compression/decompression cycle? Are zip algorithms suitable for this, or are there better methods of compression that are designed specifically for this?


title: A combined if/switch statement syntax with exception handling for a C#-inspired language

text: It is sometimes necessary to try/catch exceptions inside the "if" condition, but not the body that follows. In C#, this is really rather cumbersome, requiring locals and code that isn't entirely obvious, at a glance, as to its operation. It is also sometimes necessary to write "switch" statements, which, unlike "if", have more than two possible outcomes, although in C# this requires the use of a fairly unpopular syntax. Here's an idea for combining these. ## Merging `switch` with `try/catch` First, we change the fundamental syntax of "switch" to be close to that fairly popular replacement, but without the extra curlies:               switch (condition)         case 1 { }         case 2 { }         default { }      Next, we make it possible to catch exceptions in the condition. Under the hood, this inserts an appropriate try/catch block only when at least one `catch` is present:               switch (condition)         catch FileNotFoundException e { } // use "e"         catch ArgumentException { }         catch { }         case 1 { }         case 2 { }         default { }      Now we make it easier to chain several such statements akin to if/else chaining, by moving "default" one level up, and renaming it to "else":               switch (condition1)         catch FileNotFoundException { }         case 1 { }         case 2 { }     else switch (condition2)         case "abc" { }         case "def" { }     else         { }      And so we have a `switch` merged with `try/catch`! ## Combining with 'if' Both `switch` and `if` now have `else` clauses, so why not allow you to mix them as you please:               if (bool-condition1)         { }     else if (bool-condition2)         { }     else switch (string-expr)         catch FileNotFoundException { }         case "thing" { }     else         { }      (thanks ach_l!) ## Further improvements Switching on a list or range of values has been proposed and can be easily incorporated:               switch (int-expression)         case 1 { }         case 2, 5 { }         case 10..50 { }     else switch (string-expression)         case "abc" { }         case "def" { }     else if (boolean-condition3)         { }     else         { }      In this case it could be really convenient to be able to reference the value in the condition clause. This can be easily incorporated by allowing one to declare a single variable in this clause the same way C#'s `using` allows:               switch (var z = int-expression)         case 2, 5 { return z == 2 ? "two" : "five"; }         case 10..50 { return (z * 10).ToString(); }      ## Benefits Among other benefits, one can now express a common error-handling scenario concisely, and yet not WTFy:               switch (bool-condition)         catch FileNotFoundException e { }         case true { }         case false { }      * * * Would this solve any real-life coding difficulties you have encountered? Are there any tweaks you would apply to this?


title: What is an effective git process for managing our central code library?

text: Quick background: we're a small web agency (3-6 developers at any one time) developing small to medium sized Symfony 1.4 sites. We've used git for a year now, but have previously used Subversion. For the past 6 months we've put a lot of development time into a central Symfony plugin that powers our custom CMS. This plugin includes a number of features, helpers, base classes etc. that we use to build custom functionality. This plugin is stored in git, but branches wildly as the plugin is used in various products and is pulled from/pushed to constantly. The repository is usually used as a submodule within a major project. The problems we're starting to see now are a large number of Merge conflicts and backwards incompatible changes brought into the repository by developers adding custom functionality in the context of their own project. I've read Vincent Driessen's excellent git branching model and successfully used it for projects in the past, but it doesn't seem to quite apply well to our particular situation; we have a number of projects concurrently using the same core plugin while developing new features for it. What we need is a strategy that provides the following:   * A methodology for developing major features within the code repository.   * A way of migrating those features into other projects.   * A way of versioning the core repository, and of tracking which version each major project uses.   * A plan for migrating bug fixes back to older versions.   * A cleaner history that's easier to see where changes have come from. Any suggestions or discussion would be greatly appreciated.


title: Is there any use for layout managers beyond Java?

text: I am a beginning programmer and I was recently working on some primitive GUI apps in Java. That's where I encountered different layout managers. I browsed the web and it says that for advanced GUI creation there are NetBeans and Qt and a lot of other stuff. My question is: Do I really need to learn all ins and outs of layout managers and try to program without advanced layout engines to understand how they work or should I start learning NetBeans right away and skipping the whole manual layout complications? Is there any use for manual layouting beyond Java in other languages? In other words, will my road be less bumpy in the future if I go learn it in detail, or should I just forget about doing manual layouts?


title: Should I make my project free software?

text: **The story** Over the last couple month I have been working on a pretty big project. It's an enterprise-level software, I designed to be used at a local gym, but I believe it can be used in other places, where things like keeping track of clients, attendances, purchases and payments are required. **The problem** Well recently, I started to think on how to mature this project from being home-made. Not just because I want my project to grow but also because I would like to have some gain from it. **The solutions?** And here I saw 2 paths:   * License the software under some restricted license and try to sell the software to other business around. This way I can get some money for college (I am a high school junior right now)   * License the software under some free license, publish it on GitHub or something, and try to engage other developers to participate in the project. This way I get experience of working in a team and a better chance that the project will keep growing. The latter would be a good + for my resume, when I'll trying to find a job. So far both ways seem pretty exciting and beneficial to me. The first one offers a good college career, while the second one offers some additional experience and the project's growth. **The questions** Can anyone point to some other +/- of these 2 options? What would the better option in my situation and why? Or are there other options?


title: Comparing multiple revisions of the same C File

text: I just wondered if anyone had any tricks or programs they used when comparing two of the same file but different versions? I appear to have foolishly made a modification at some point today (Went a few hours without running any tests) and it has stopped the whole project working - without throwing up any errors so it must be subtle whatever I have done. I just thought that there must be a program out there that might highlight differences etc. Otherwise, a step by step search might be in order!


title: When to use functions vs methods?

text: So I know that methods are more OOP than functions. I was wondering if someone could show me an example of a function and a method and explain the differences between methods and functions to me? I have taken 3 quarters of Java programming and functions have never been mentioned, I want to know the differences, strengths and weaknesses.


title: Letting go of a project

text: I've been the sole developer of a niche product for my company for nearly 6 years. I've grown quite attached to the project and I enjoy working on it. However, it was the decision of management to take the project out of my hands and move it under the wings of another team. Unfortunately, I'm having a hard time letting go of the project. I'm sad to see it leave my hands since I've put so much time into it and enjoyed working on it, but it also allows me to work on new things. I've even caught myself being a bit hostile to the other team, which is poor on my part. How can I convince myself to just let it go?


title: Is it legal/ethical to collect and release some types of anonymous usage data without consent?

text: The type of data I'm hoping to collect is a little specific, and unfortunately I'm under NDA and the data is a core part of the business plan so I'm not at liberty to post it online. I've come up with a similar example, so please bare with me and pay no attention to the flaws of this hypothetical service. Say I make an online "school finder" service, where the user enters their address and the service finds and scrapes the tuition cost of all schools within say a 100km distance from that address. The service would display the list of schools sorted by price, and the user would select the school they are going to attend based on that information. They would also specify any other contributing factors, such as the aesthetics of the campus and the reputation of the school (things like this would be selected from a drop-down menu or something, a small set of non-personally-identifiable options). The school finder would passively collect this data (as opposed to actively seeking out every school everywhere and scraping the qualities of it from their public web page) and use it to both provide better search results, and also display a map centered on the user's region, representing that data somehow. It would point out, based on past usage, the most desired schools based on a number of factors (say, cheapest and most desired would be green, most desired for other reasons would be yellow, and seldom selected schools would be red). Most of the data is just passively collected and is otherwise publicly available, but some of it (the reason the school was picked) is somewhat personal, as well as the user's home address being personal information. The only publicly visible data would be the "rating" of each school, based on a selected region. The only saved data would be the rating and cost of each school, as well as the postal code (or city, whatever) associated with that rating. The service has no user accounts, so it's not feasible to ask every user to agree to a privacy policy for every request. Is it legal/ethical to collect and release this set of information without explicit consent?


title: I am trying to figure out how difficult or expensive it would be to add this feature

text: I am trying to figure out how difficult/time consuming it would be to add the following feature: We have a database with our subscribers and we want to send updates to paying subscribers. The catch is that we want these updates to be date dependent. Let me clarify. Joe signed up in June last year. He has been receiving monthly newsletters since June. Now Fred signed up in April, cancelled in May and resubscribed in August. We want to send an update to Joe regarding his June newsletter. Fred was no longer a subscriber in June and we **don't** want him to receive the same update for various reasons. Is this a feature that you would expect to cost 100's, 1000's, 10,000's dollars to implement? **Edit: I should've been more clear, I was looking for a magnitude not an exact cost. It's evident, I know very little about programming which is why I came here. If someone asked me what it would cost abandon a well, I could easily give them an order of magnitude. I appreciate all of the responses; this is an incredible resource.


title: Paper on Linux memory access techniques sought

text: Over on stackoverflow someone posted a link to a paper written by a Linux kernel engineer about how to use computers and RAM. He started off by explaining how RAM works (right down to the flip-flops) and then went on to discuss performance problems associated with operations on matrices (column vs row accesses), offered solutions and then dealt with some stuff MMX instructions can do. Sorry it's a bit vague but I can't find it anywhere. I _think_ the guy had a Scandinavian name, possibly Anders


title: Markup languages syntax

text: If computers are able to parse data organised in curly braces, why are we using `<foo></foo>` syntax in certain languages? Only because of legacy etc or are there further reasons behind this? I think I speak for many people if I say that that looks just redundant and it's awkward to work with. In adition it doesn't "enforce" indentation like brace-based languages do. **Update** \- I made the mistake of treating curly braces and key-value pairs (which I didn't mention until now) as the same concept. Taking into account this, I'd like to ask my question again: Is tag syntax really more convenient than a JSON-like language?


title: Sql Server: Compact and LocalDB Denali

text: Does anyone knows the differences between these ones?   1. http://www.microsoft.com/sqlserver/en/us/editions/express.aspx (Look for CTP3 LocalDB in the page)   2. http://www.microsoft.com/sqlserver/en/us/editions/compact.aspx I wonder why microsoft started Denali project (now in CTP).


title: Meaning of phrase: "Not your father's Visual Basic"

text: I have ran into the above phrase many times (especially during classic VB days) and I have been wondering what it really mean and where it originated from. Any ideas?


title: JIRA: Issue classification, clarification needed

text: In JIRA, when creating a new issue, i am presented with a number of choices, some of which look like they don't belong. For example: "New Feature". This should be a part of a story right? How can one chose when to use "New Feature" and when to use a "Story"? "New Feature" looks like a type to me or a "Story" to me. Or, take for instance "Improvement". We can start a whole project with it's own "Epic" for the sole purpose to improve a bunch of things. Should such work be filed under an "Epic" or under something else? Please clarify


title: How to create the architecture/design of an application in Agile?

text: If I am about to develop an Enterprise application, but as far as I understand from agile process, I break features into small chunks and develop them iteratively. I used to create the database and the core of the application first, then I extend these iteratively. The question is: Do I have to keep what I used to do previously (develop the core first) or I have to distribute core development over stories' development? In the later, I am not sure the code will be flexible enough for future extensions! Any idea?


title: Can scrum master allocate tasks?

text: We are following scrum in our project. I see most of the times the scrum master allocates the tasks for us. However, I read from many scrum books that scrum works the other way around (the 'pull' approach) and team members pick up tasks or features. Is scrum master assigning tasks the correct approach or does it go against the agile ideology?


title: How to get out of the support rut and start repaying the technical debt!

text: I have a "friend". Yes good start I know but honestly this isn't me! Basically he's been working on a successful project for about 4 years now, the difficulty is the technical debt has caught up and he's finding it almost impossible to stop supporting the product (tweaking this and that) and actually move on with _real_ development. I've made various suggestions, log all of your time, create tickets, don't answer emails etc etc. The problem with this is that it seems to only serve as a reminder that he's not getting anything "useful" done. The technical debt has largely occurred because in the first instance it was a big benefit to the product, to take requests and phone calls from users and just quickly implement them. What I would like to know is does anybody have any suggestions for how he might get out of this rut, a large part of which would be changing the perceptions of the users so that they don't think they can just ring and expect something to be done then and there. It's all very well saying plan better, though I understand it's very difficult to plan actual development given the requirement for support and the relative pressures from users (see above).


title: Effective programming of data layer management/access

text: **Short Version** : What is the term/concept which describes the efficient design of programming the data layer for efficient data access and what are some sources/books/articles/website which discuss this concept? **Long Version** : So I had a recent conversation with the senior developer at my small company about how and why we access data the way we do. He told me that it was the single most important aspect of the program and explained how it is the largest bottleneck in efficiency if done incorrectly. He also said he had never learned about it from the courses he took and he never read about it in any books, despite the fact that he thinks it's the first thing he chooses to teach others. I should explain that this is my first year at a job programming, that I have a degree in Electrical Engineering, but not in CS, so I wouldn't know if it was covered in school. Also, the language I work in is Java, but this question was meant to ask about any language's access to data in a general sense. So what am I talking about? I'll explain through an example. We work with a lot of data, so the data layer is a bit complicated. It uses a combination of singleton pattern and factory design pattern to achieve different access. For example, an Object, let's say Customer would be most often instantiated as follows:               Customer customer = Customer.getDefaultInstance(CustomerAccessType.LIST)       OR               Customer customer = Customer.getDefaultInstance(CustomerAccessType.ONE_RECORD)      OR               Customer customer = Customer.getDefaultInstance(CustomerAccessType.LIST_BY_ACCOUNT)      As you may have already guessed, each access type accesses the database in a different manner. The LIST access type most of the time has very few columns, so even though it's grabbing many rows of data, in some cases up to tens of thousands of records (maybe not with customers, but maybe something like orders from a website you can imagine that becoming very large), it might only contain the primary keys on the table and some other very specific information. But when you edit specific data you access using type "ONE_RECORD" and with only a single row you have all the columns of the table (and most probably joins to a lot of other tables). This is more apparent than ever when you're looking at a screen that is painting information in front of tellers and the information is changing constantly. The information shown may be from a table that has as previously mentioned, tens of thousands of records currently being worked on. A LIST type object will grab only the primary keys from the table, then only the records that require painting are accessed, one row at a time, and the information is painted to the screen. So I have two questions as a result of all this:   1. What is the term/concept which describes the efficient design of programming the data layer for efficient data access? Most large programs that have to deal with a lot of data access must have to deal with these same issues. Surely others have coined a term for it?   2. What are some good resources to learn more about what else is out there on this subject? Again, surely others have dealt with these same issues/bottlenecks we are dealing with. Surely other brilliant minds have tackled the problem and written extensively on it, no?   3. What are other ways that perhaps your personal experience has shown you in dealing with this problem, even if you've never read it anywhere else? Your help and knowledge is much appreciated, -Asaf


title: How do I stay compliant with GPL when forking on Github?

text: I've recently forked a project on Github and made some modifications to it, pushed them back to the forked repository and asked the original developer to pull the changes. (I gather this is the preferred way of contributing on Github.) The project is licensed under GPLv3. I am the author and the copyright holder of the changes I've made to the code. I am also allowed to publish the modified code (i.e. the combination of the original code and my changes -- which I've done by pushing the changes into my fork) as long as I comply with the license the original author set up. Now, I came across the following requirement in GPL. > The work must carry prominent notices stating that you modified it, and > giving a relevant date. It seems that some work beyond actual coding is required before I'm legally allowed to push my changes to Github. What does this work entail? How do I comply with the above requirement? (Do I add additional copyright notices to the modified source files? Do I create Contributors file and add myself to it? Or is the fact that the commits indicate my ownership sufficient?) Are there any additional pitfalls when forking a project protected by GPL?


title: How to get hardware specific ID

text: We have an application that we need to ensure that our APPLICATION DATA should not be used (or opened) in different computers with same users. For that we thought about getting harddisk GUID as a part of data encryption private key. In this case raid disks, virtual PCs would fail and wouldn't be able to open the data. We need some advice about how to get a proper id to strict user-per computer but not user-harddisk. Note: Both Mac and Windows supported Edit: it was about application data, but not the application itself. Sorry for wrong asking


title: Choosing right technology for messaging system

text: I'm working on a messaging system for two years now, the system was written by a long ago gone team and involves emails and document processing. The basic process is:   1. Receive an email, parse it, save attachments to samba share. Notify message processor. We have a robust Java application doing this very well.   2. Process the message, this involves getting user data from LDAP, calling file processing web-services on different platforms. The system has a sort of re-delivery service that polls database for failed or timed out messages in different states and resends them. The file processing parts are EJB web-services that basically run command line utilities. The problem lies in our orchestration solution which is based on OpenESB (almost dead now), it has a bunch of BPELs calling each other and calling remote EJBs (EJB3.0 on glassfish v2). The biggest problem is that too much logic is done in BPELs (say, all database updates are done in BPELs, there's no persistance layer), they look like the most horrifying spaghetti I've ever seen. Not to mention they make NetBeans which we're using to edit them run really slow, to the point that some files are only editable in a simple text editor as XML. Moreover the system has a number of nasty bugs that would require major refactoring to fix and I'm dreaded to even think about it. These messages are handled manually by our support stuff so there's almost no client-impact but I would like to have a real transactional system anyway. Now, for the question itself. I'm willing to spend a lot of my own free time trying to reach two goals: build a replacement for ESB and BPELs, learn new and preferably trendy technologies. I would like to keep the code in file processing EJBs since they run just fine, although I'm thinking of getting rid of SOAP as their remote interface. So I'm asking for any insight of which technology(-ies) would let me create a robust messaging solution that would:   1. Have a friendly persistence layer, there won't be anything really complex in dbs, just message meta-data.   2. Take care of balancing and polling calls to file processing web-services.   3. Wouldn't require dealing with tons of XML in different places in order to add a new interface method.   4. Would be scalable - run on a number of machines.   5. Would allow realtime monitoring, like viewing message queues, current load, statuses etc.   6. Hopefully will let me learn something new, meaning not J2EE stack. Basically I'm open to anything except BPEL and OpenESB.


title: Can I develop OpenGL ES iPhone simple physics app with Xcode 3 in C++ without a GUI?

text: Can I develop OpenGL ES iPhone simple physics app with Xcode 3 in C++ without a GUI and Objective-C? So I don't need Cocoa and I don't need Objective-C?


title: How to selectively update properties of an object on the server

text: I have a `GWT` website that displays some data onto the client in a tabular form. Some of the fields are editable, when any change is made the save button becomes active. There are multiple properties that may have changed, how would I go about updating them on the server? Additionally I'd like to provide an undo button so that the changes are reverted. What I'm thinking of right now is to use the setters and check if the current value is the same as the changed value if there is a change then a request to a process in the background will be fired. But I'm not sure this is the best approach and maybe setters with extra logic aren't the best practice. I think this is a problem that many web applications have to deal with and maybe there is a pattern that makes all of this more elegant. It would be nice if someone could explain how they would solve this.


title: Do immutable objects and DDD go together?

text: Consider a system that uses DDD (as well: any system that uses an ORM). The point of any system realistically, in nearly every use case, will be to manipulate those domain objects. Otherwise there's no real effect or purpose. Modifying an immutable object will cause it to generate a new record after the object is persisted which creates massive bloat in the datasource (unless you delete previous records after modifications). I can see the benefit of using immutable objects, but in this sense, I can't ever see a useful case for using immutable objects. Is this wrong?


title: A way to include SQlite into an application where the drivers aren't already installed on the system?

text: I'm an open source web application for use in my university. Currently professors usually have a website, but do to the fact that they're teaching multiple classes in a given term, they don't care to spend time and make an extensible, functional website. The purpose of this project is to create an OSS website that can be dropped in place and enabled by simply running an init.php file. I'm curious though as how to handle information storage for such a task. A full server database is a bit outside of the scope I'm looking for, but something like SQlite would fit very well. The problem I'm running into is that not all departments have SQlite installed on their servers, and getting them all to do so won't happen. Can anyone think of a way to include SQlite into an application where the drivers aren't already installed on the system, or a more common alternative that would provide a similar level of power/flexibility?


title: Should I put the datatype of a class attribute in its name?

text: Most of my system's class attributes are just text, but in this case it makes more sense to place this particular class's attributes into one single hash (from a "keep the source code pretty" aspect). Basically, a list of attributes is returned, and instead of writing a bunch of static attributes for each one, I just loop over them and collect them into a hash. Is it a good idea to name this particular attribute `@contents_hash`, as opposed to `@contents`? I assume that users may figure out pretty quickly that `@contents.split ' '` will return a `NoMethodError: undefined method 'split' for Hash`, but on first glance of the code, is it useful to know right away that this is a hash? Do you think it will make the implementation redundant to say `@contents_hash.keys`?


title: Giving presentation on git

text: I'm going to be giving a presentation to a group of neuroscientists on the use of git to manage their matlab/r/xppaut/etc files. Some of these folks have an extensive software engineering background, some don't know what CVS is. The main goals of the talk are as follows:   * Inform how git can increase collaboration and save everyone time (5-10 min)   * Introduce git as a concept in graph theory, a familiar topic to the crowd (5-10 min)   * Introduce the practicals of git: (rest of time)      * Download & install     * Set up new project (`add`, `difftool`, `commit`, `checkout` & `branch`, `merge`, remotes (maybe), generate & commit patches, `stash`, rollback to previous head, ...?)     * If have time, show them github, specifically how to use it to fork and submit pull requests (I hope to have them set up github accounts to share scripts in the future) I hope to have everyone bring their laptops to follow along on the tutorial. This talk is supposed to be about an hour long, max is about 1.5 hours. My question to you guys is two-fold:   1. In general, what do you think about the proposed outline?   2. Is anyone familiar with slides that I can use for this sort of talk? I want to model the intro part around Joel Spolsky's mercurial tutorial, tone-wise, but I can work with other material if necessary.


title: How to best organize multiple WebProjects that use similar business logic

text: We have the following setup > **Current Solution** : > >   * Business Logic (Class Library) > >   * Data Layer (Class Library containing EF,Web Services wrappers etc) > >   * WebProject1 > > BUT we now want to write another Web Project (Web Project2) which would be almost identical to WebProject1 except for the fact that it would alter properties and input variables to functions/voids inside the Business Logic class to provide a different set of data for another completely different user. (Needs rewording). Think of Facebook as WebProject1 and Myspace as WebProject2. Same concept, same business layer almost but different products altogether. > **Future Soltion** > >   * Business Logic (Class Library) > >   * Data Layer (Class Library containing EF,Web Services wrappers etc) > >   * WebProject1 > >   * WebProject2 (similar to WebProject1 but different authentication, > different UI, different pages etc) > >   * WebProject3 (possible) > > Without completely destroying the Business Logic (as the class would now have to allow for 2 paths per set of input variables) how can we structure this to aviod doubling up on any code? **Edit:** Explain the business logic WebProject1 provides data based on a database filter called "ByCompany" WebProject2 will provide the data based on a filter called "BySite Both projects will be consumed by different audiences which will not know that the other website exists. Eg possible future logic could include something like this:               BusinessLogic.EmployeeList employeeList = new BusinessLogic.EmployeeList();          employeeList.LoadBySite("ConstructionSiteC");          employeeList.LoadByCompany("JohnDoesTractors");      The dilemma is: Should we maintain two Business Logic class libraries? Should we add preffixes to the class names to denote their corresponding WebProject parent? Should we create base classes and inherit if there are overrides we need to make? Should we create more interface based business logic? Should we just have two separate solutions that draw from the same DAL? The projects will likely get quite large (over business logic 300 classes) and we want to minimize double ups as much as possible. What is the your method or suggestion? Thankyou!


title: how do you deal with a vague software proposal?

text: We all get them. What do you do when you are supposed to write a functional spec from a woolly proposal? You can write a ton of questions about the proposal but answers are not always forthcoming. Sometimes for political reasons you cannot make someone firm them up. How do you deal with a vague software proposal, when experience and intuition only go so far?


title: Phonetic programming language?

text: Many of us coders, programmers and developers struggle with repetitive stress injuries, carpal tunnel, etc. I've been curious about introducing voice control into my workflow in order to save myself some stress. This has led me to my current question: Would it be possible or practical to implement a programming language (or superset of an existing language) which was primarily phonetic, and hence well suited to programming by voice?


title: create function of object prototype

text: I am reading "Javascript : The good Parts" to improve my Javascript bases and knowledge. I was reading stuff about `prototype` and I encountered in this function :               var stooge = { ... }      if(typeof Object.create !== 'function'){        Object.create = function(o) {        var F = function () {};        F.prototype = o;        return new F();        };     }     var another_stooge = Object.create(stooge);      I didn't really get the meaning and the benefit of creating this function.


title: Can modifications to open source project be considered trade secret?

text: While working for an employer if one modifies, rewrites, contributes or alters open source software in what cases can it ever be considered a trade secret? A trade secret, FWIW, is defined by wikipedia as: > A trade secret is a formula, practice, process, design, instrument, pattern, > or compilation of information which is not generally known or reasonably > ascertainable, by which a business can obtain an economic advantage over > competitors or customers. In some jurisdictions, such secrets are referred > to as "confidential information", but should not be referred to as > "classified information", due to the nature of the word in the USA.


title: What are the steps to learn AJAX based web application development?

text: I am a complete starter in web development, as I know only basics of HTML and CSS, although I have a history of desktop development. What is the usual roadmap to get started in web apps, based on AJAX? We decided to use Dojo toolkit as our javascript library. Is the following a feasible map? 1-Learn basic javascript(already on it) 2-Learn what DOM is 3-Start with Dojo documentation and examples 4-Get into AJAX with Dojo Addendum: My goal is not to become a professional web developer who builds public web pages, it is not my specialty. I am trying to build an interface to an embedded product my company develops. We chose dojo mostly because it provides widgets for easy interface development. I am just trying to find out the easiest way to get this done. I got several satisfactory answers and have difficulty choosing the best.


title: Is Haskell/Clojure actually unsuited for dynamic systems such as particle simulation?

text: I've been told in previous questions that functional programming languages are unsuited for dynamic systems such as a physics engine, mainly because it's costly to mutate objects. How realistic is this statement, and why?


title: Why are regular expressions so morbidly attractive?

text: Exhibit 1, Exhibit 2, I guess you won't find it hard to recall other examples. Thing is: if there is more than one way to solve a problem, the PHP programmer (I usually browse the PHP tag on StackOverflow) will ask for help on the solution involving regular expressions. _Even when_ it will be less economic, _even when_ the php manual suggests (link) to use `str_replace` instead of any `preg_*` or `ereg_*` function when no fancy substitution rules are required. Does somebody have a clue about why this happens? Don't get me wrong, some of my best friends are regular expressions and I don't despise Perl. What I don't get is why there is no looking for alternatives whatsoever, even when the overkill is obvious (regex to switch strings) or the code complexity rises exponentially (regex for getting data from html _in PHP_ )


title: Own Exception or Delegation design pattern to exit a program?

text: I am writing an application in Java which use MVC pattern design. I have 4 major classes: Main, Controller, Model, View. Main initialize the other three and run launchMenu() in a infinite loop, a method included in Controller. This launchMenu from Controller runs a launchMenu method of another class: MenuHandler, which set up the Actions (using my own Command design pattern) and assign them to each option from my enum UserOperationsMenu.   I have several doubts on how to handle UserOperationsMenu.EXIT. My question is about what would be better and more logic:   1. Using an exception I catch up in the body of Main's loop and throw it in my ExitAction class assigned to UserOperationsMenu.EXIT?    2. Creating an object Delegate in Controller which I pass to MenuHandler and ExitAction so that I can command from ExitAction to exit the program? I've thought about using a boolean variable in my while in Main, and returning false when I want to finish the program. But I don't like the idea, though. **NOTE** : I don't want to use System.exit(0) directly because first I have to do several tasks outside my ExitAction.


title: How do you handle "support" on your products (inhouse)

text: Do you have any kind of update process? Let's assume you are an "in-house" development shop for php inside your company. You are creating an bunch of applications for other units. Do you have something like "Support ends in 2 years" ? What happens if you develop an app for php 5.3, and this app can't run with php "6", or another framework you use will no longer be maintained? Would love to hear some ideas :-)


title: Opensource showcase for MVC in Java Swing

text: I've allready created small desktop CRUD applications using Java/Swing. In hindsight I'm not quite sure if the overall design of these applications is good. I've also done some reading on MVC and looked at different Swing- tutorials. My problem is, that I've got a very theroatical knowledge of MVC and on the other hand, most Swing-resources don't implement the MVC-pattern.      Now I would like to get my hands dirty and see how MVC is implemented in Swing in a real-world-application. Are there any opensource project you could recommend? It would be also interesting to have more than one project, to see different approaches.      Best fit would be a software, that uses a relational database in the backend, to see an overall design, that I can compare to my former applications.


title: How to save a young and dying project?

text: I am posting this anonymously because I don't want to get into potential trouble.   I have a big problem.   I recently joined a team that is less than a year old. I have been here since a month in to the project started. The company structure looks like this:   * Owner (non-technical)      * Project Manager (non-technical)        * Lead Developer (Technical, but bad at it) This project is a website using ASP.Net that the Lead Developer designed a horrible architecture for. You will have to take my word at it, but basically, the way we are required to build web pages is giving us 3+ minute load times on a single web page over VPN in Debug mode. It has spiraled to the point where other coworkers agree that they spend more of their day waiting for pages to load than actual development. Now the big problem is this. Project Manager does not know technology and admits it. He has specifically stated that he trusts the Lead Developer to make the correct choices on application architecture. No one on the team knows what the Owners opinion would be, but everyone is afraid to make waves in this economy (myself especially). What would you do?