Organising data access for dependency injection

In our company we have a relatively long history of database backed applications, but have only just begun experimenting with dependency injection. I am looking for advice about how to convert our existing data access pattern into one more suited for dependency injection. ### Some specific questions: Do you create one access object per table (Given that a table represents an entity collection)? One interface per table? All of these would need the low level Data Access object to be injected, right?   What about if there are dozens of tables, wouldn't that make the composition root into a nightmare? Would you instead have a single interface that defines things like `GetCustomer()`, `GetOrder()`, etc? If I took the example of EntityFramework, then I would have one `Container` that exposes an object for each table, but that container doesn't conform to any interface itself, so doesn't seem like it's compatible with DI. ### What we do now, in case it helps: The way we normally manage data access is through a generic data layer which exposes CRUD/Transaction capabilities and has provider specific subclasses which handle the creation of `IDbConnection`, `IDbCommand`, etc. Actual table access uses `Table` classes that perform the CRUD operations associated with a particular table and accept/return domain objects that the rest of the system deals with. These table classes expose only static methods, and utilise a static `DataAccess` singleton instantiated from a config file.


What are your experiences selling on the Android Market? 1 year on

Follow up to this question So a lot has changed in the smartphone market in the last year (Specifically Androids market share, OS updates and marketplace updates). Given these changes I think it is appropriate to ask this question again. I would love to quit my job and write Android apps fulltime. :-) Is this yet feasible for the average lone developer? What have volumes been like? (Happy to turn this into a community wiki before all the Grinch's start moaning but looks like I don't have the option)


How much storage space do developers really need on work systems?

> Not Counting the OS And the requirements to run the Development software. > The storage space required. Strictly speaking from work perspective(company setup and not freelancers).A individual developer ( not considering a build system) unless into areas of video,audio processing( huge raw files) 3d/graphics development. How much storage space would be required.   * Even if we account for the software trials to download or reading material.is it Right or Safe to assume 20GB would most suffice and any thing more would be a waste and or would be improperly utilized?.   * What is the typical hard disk space allotted per developer in an office setup.This may differ per role or specific requirement and on what type of work the company is into. but on an average for a developer/programmer how much space is normally allotted. Edit: **To Clarify Intent** These are questions i had faced by business/management people.I only wish to understand more in this regard to give an answer(or better answer)the next time i come across them. I am neither making assumptions or intend to give offense to any one in this regard.It would be helpful if some links to data online were provided in this regard. Edit 2:   * The issue as i understand was restricting the storage space to only the saving of work files to discourage extraneous usage...    * Not about scrimping/cost saving on hardware.


Changes in licence in forked project what are my rights?

Hi I'm intrested in using the apparently now defunct app-mdi libray in a flex application for a paying customer. http://sourceforge.net/projects/appmdi/ It appears that the app-mdi project has been forked from flex-mdi and indeed the code has so much in common it would appear almost identical to the origional code. Now in the original source flex-mdi the following licence appears in the source code > /* Copyright (c) 2007 FlexMDI Contributors. See:   >  http://code.google.com/p/flexmdi/wiki/ProjectContributors Permission is > hereby granted, free of charge, to any person obtaining a copy of this > software and associated documentation files (the "Software"), to deal in the > Software without restriction, including without limitation the rights to > use, copy, modify, merge, publish, distribute, sublicense, and/or sell > copies of the Software, and to permit persons to whom the Software is > furnished to do so, subject to the following conditions: The above copyright > notice and this permission notice shall be included in all copies or > substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", > WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED > TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND > NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE > LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF > CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE > SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ However in the app-mdi library on the same file the following licence appears. > Copyright (c) 2010, TRUEAGILE All rights reserved. > > Redistribution and use in source and binary forms, with or without > modification, are permitted provided that the following conditions are met: > >   * Redistributions of source code must retain the above copyright notice, > this list of conditions and the following disclaimer. >   * Redistributions in binary form must reproduce the above copyright > notice, this list of conditions and the following disclaimer in the > documentation and/or other materials provided with the distribution. >   * Neither the name of the TRUEAGILE nor the names of its contributors may > be used to endorse or promote products derived from this software without > specific prior written permission. > > > THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" > AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE > LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF > SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS > INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN > CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) > ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE > POSSIBILITY OF SUCH DAMAGE. */ Now I've no problem with the licence except for the line. > Redistributions in binary form must reproduce the above copyright notice, > this list of conditions and the following disclaimer in the documentation > and/or other materials provided with the distribution. The copyright notice in its entireity makes no sense in binary material. Specifically talking about redistobutions in the binary form. Finally the question is what exactly has to be shown on web clients who access softare that utilises this library? Also is changing the licence in this manner actually allowed?


Anybody using VB with ASP.net MVC?

When a .net project use newer technologies like ASP.net MVC or Silverlight, is VB.NET being used? Or it is used just in the legacy projects? What is the situation now?


Am I violating LSP if the condition can be checked?

This base class for some shapes I have in my game looks like this. Some of the shapes can be resized, some of them can not.                  private Shape shape;              public virtual void SetSizeOfShape(int x, int y)         {             if (CanResize()){                 shape.Width = x;                 shape.Height = y;             }             else {                 throw new Exception("You cannot resize this shape");             }              }         public virtual bool CanResize()         {             return true;         }      In a sub class of a shape that I don't ever want to resize I am overriding the `CanResize()` method so a piece of client code can check before calling the `SetSizeOfShape()` method.                   public override bool CanResize()         {             return false;         }      Here's how it might look in my client code:                   public void DoSomething(Shape s)         {             if(s.CanResize()){                 s.SetSizeOfShape(50, 70);             }         }      Is this violating LSP?


Is there a difference between fibers, coroutines and green threads and if that is so what is it?

Today I was reading several articles on the Internet about fibers, coroutines and green threads, and it seems like these concepts have very much in common, but there are slight differences, especially when we talk about fibers and coroutines. Is there a concise, correct summary of what makes them different from each other?


Implementing Settings/Preferences in JavaScript

I am making a simple web app mostly in JavaScript. I was wondering as to how do I deploy settings/preferences? Do I just store user preferences somewhere and make use of if...else... statements all over the code? I think that there must be a better alternative. I am know JS, jQuery & PHP and willing to learn anything new if at all required. I have already made the app, only the settings are remaining. I know what options to give users and how to program them in js. What's the most optimal way? How is it done in professional web apps and software made by companies (I am independent Student Developer - this is my first "BIG" project)? **EDIT:** For all the modifications that the settings are supposed to make (in this particular app), the whole js code base would litterally be filled with many branches of if...else...statements and I think that would make the code a lot harder to read and maintain. In my app, the whole database table to be fetched from the database and the number and types of HTML DOM manipulation to be done, new elements to be added to HTML dom and whether some are visible or not would change. How do I deal with all that?


Should I split out synchronization from my class and what's it called?

When thinking about testability and modular code, I recently thought about whether I should split out the synchronization part of a class from the actual behavior part. By example: The app "needs" this:               class Mogrifier { // Mogrifier accesses are thread safe     private:       unsigned int m_state;       mutex m_sync;     public:       Mogrifier()       : m_state(0)       { }            unsigned int Mutate() {         lock_guard<mutex> lock(m_sync);         const unsigned int old = m_state;         m_state += 42;         return old;        }            :::     };      Seems simple enough, except that locking and the actual stuff the class does aren't really related. So I though about whether it's a good idea to split this up:               class Mogrifier { // Mogrifier is *not* synchronized     private:       unsigned int m_state;     public:       Mogrifier()       : m_state(0)       { }            unsigned int Mutate() {         const unsigned int old = m_state;         m_state += 42;         return old;        }            :::     };          class SyncedMogrifer {     private:       mutex m_sync;       Mogrifier m_;     public:       unsigned int Mutate() {         lock_guard<mutex> lock(m_sync);         return m_.Mutate();       }     };        * Would you do this?    * Will it help with unit testing?   * I'm awful with Pattern names ... what is it called?   * Is there a simple way to "generate" such a wrapper in C++ for an arbitrary calls?


using a wiki for requirements

I'm looking into ways of improving requirements management. Currently, we have a Word document published on a Web site. Unfortunately, we cannot (to my knowledge) look at changes from one revision to the next. I would greatly prefer to be able to do so, much like with a wiki or VCS (or both, like the wiki's on bitbucket!). Also, each document describes changes devs are expected to meet by a given deadline. There is no collection of accumulated app features documented anywhere, so it's sometimes hard to distinguish between a bug and a (poorly- designed) feature when trying to make quick fixes to legacy apps. So I had an idea I wanted to get feedback on. What about:   1. Using a wiki so that we can track who changed what when (mostly to even see _if_ any edits were made since the last time one looked).   2. Having one, say, wiki page per product rather than one per deadline, keeping up with all features of the product rather than the changes that should be implemented. This way, I can look at a particular revision of the page to see what the app should do at a given point in time, and I can look at _changes to the page since the last release_ for the requirements to be implemented by the next deadline. Waddayathink?


Specific reasons to create own array class over using std::array?

What specific conditions or requirements should you create your own array over using `std::array`? Here is my background: I'm developing a small simple library that a small group of people will use and _hopefully_ build upon. The current structure allows for both `std::vector` and `std::array` using `iterators`, however, a lot of the people do not like and cannot seem to use `std::array` and find the notation confusing to work with the library. I have attempted to make my library work for better for `std::array` however, it dawned on me that maybe I should provide my own and adding in the functionality needed? For example: `library::array<int, 2> myArray; myArray.fill(1, 100);` and I thought it would be a good project in order for me to develop my skills, particularly in `templates` and other `sorting` algorithms.


Onsite Interview : QA Engineer with more Emphasis on Java Skills

I'm having a onsite interview for QA engineer with Startup. While phone interview the person said he would want to test my JAVA, JUnit and SQL skills on white board with more importance on Object-oriented skills, So what all can i questions can i expect ? **One more important issue : How do i overcome the fear of White board interview ?. I'm very bad at White board sessions, i get fully tensed. Please suggest me tips to overcome my jinx**


Can someone help me understand this GPL license

I can't understand the last line of this GPL license. > Copyright (C) 2011 Some Name > > This program is free software; you can redistribute it and/or modify it > under the terms of the GNU General Public License as published by the Free > Software Foundation; either version 2 of the License, or (at your option) > any later version. This program is distributed in the hope that it will be > useful, but WITHOUT ANY WARRANTY; without even the implied warranty of > MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General > Public License for more details. > > You should have received a copy of the GNU General Public License along with > this program; if not, write to the Free Software Foundation, Inc., 51 > Franklin St, Fifth Floor, Boston, MA 02110-1301 USA > > Linking SOMEAPP statically or dynamically with other modules is making a > combined work based on SOMEAPP. Thus, the terms and conditions of the GNU > General Public License cover the whole combination. > > **In addition, as a special exception, the copyright holders of SOMEAPP give > you permission to combine a portion of SOMEAPP with other binary code > ("Program") under any license the copyright holders of Program specified, > provided the combined work is produced by SOMEAPP.** I want to know can I use this code in a shareware application.


how to map controllers , models, and views as a todo list

Before starting on a current project I was wondering if there is a terminology for what I am planning on doing? Basically what I want to do is map out every object in layers such as all the controllers and what they'll be called, the methods that will exist under the controllers and their purpose; Including, the models that the methods will be interacting with and the views that will be displayed based on certain actions. This way I've created a detailed to-do list and can catch any duplicates and make them as one call. I've heard of something called doctrine but I'm not sure if it will be what im looking for since i dont know how to use it but have heard of it having to do with documentation.


Are there presently any standardized "grammar" rules for HTML & CSS?

Over the years I have assigned values to classes and html elements in all sorts of ways:   * myClass   * MyClass   * my_class   * my-class . . .and so on. As I am always trying to hone my craft and make my code more readable for others, I am going to discipline myself to stick to one convention moving forward. I am leaning towards all lower case and hyphenated, but that is a purely subjective choice. So I wanted the input of the SE community--is there a standard or recommended convention already in place? Thanks!


What's a propeller-head coder?

What's a propeller-head coder?


Leaving for the desert soon, need suggestions

I just got the news that I'm (finally) getting to spend the next few months in Afghanistan with my fellow AF maintainers, and I was hoping to get some suggestions of good offline content to learn from. I've got a few textbooks from ck12.org, downloaded the offline versions of the MSDN docs for VCS Express 2010, but I would love to have something more general to learn from, maybe that covers data structures and algorithms (specific to C# would be awesome. Oh, and if anyone knows of any good offline WPA tutorials that would be even better.


Using GPL licensed jQuery scripts on website with ads

I'm making a web application that will generate revenue from displaying ads. The system is meant for me to run and not sold/distributed to anyone else. My questions are:   * Can I use GPL licensed jQuery scripts on the website?   * Can I use GPL licensed scripts while generating ad revenue from the page?   * Do I need to provide my sites source to everyone if I use GPL licensed scripts?


Is it better to save output from command in memory and store later or save in a temporary file and then move to final location?

I hope this is not off topic. I have to save output from a command to file, but only if length of this output is positive. I've thought about two solutions:   * save output to a python variable, check length, if positive save to destination file;   * save output to a temporary file, check length, if positive rename to destination file. Is there any best practice for this little problem, or which one usually performs better between my proposed solutions? Typical configuration:   * file length is usually 1KB   * we are not using ssds, usually 7200rpm hard disk   * average RAM is usually 10-20 GB    * I don't know if filesystem is important, anyway ext3 I know this is a bit unclear, but I was hoping there was some best practice to apply in this case. Thanks


Should I blog about specifically about programming in English or in my native language?

I had a blog which was written in my native language, but now I'm wondering if I should switch to english because of a wider audience given that the technical field's default language is English. For sure, I want to share my knowledge, but at the meantime I'd like to get hired or be recognized from my peers. Reputation can be important and it can help in making my professional network larger. Do you have any feedback? Btw, my native language is french if that matters.


Feature branches, beta branches, and scrapped features

I've been thinking a lot about best practices regarding branching in distributed version control systems such as git an mercurial (the two dvcs's I have experience with and use on a daily basis). The way I've been doing it is slightly different in each of these, but generally follows these guidelines:   * master branch - concurrent with production code   * development branch - concurrent with "beta" code   * feature branches - for feature development Development is done in a feature branch (usually created off of the master branch, so we know we're working with a stable code base), and when dev is completed, reviewed, and developer-tested, it's pushed/merged into the development/beta branch, put out on a beta server, and tested. If all goes well, the feature is approved, and we can merge it into the master/stable branch, stage it, do final testing, and get it into production. If it doesn't go well, though, things break down. If, for instance, a feature is scrapped or just delayed indefinitely, we probably want to remove it from the dev/beta branch. However, since merges from master/stable (hotfixes, content changes, etc.), and other new features have probably been put into the dev branch, it becomes difficult to remove a single feature from that branch. I'm coming to the conclusion that this workflow is just broken, but it seems like it should work. So, specifically:   * Is it possible to remove a particular feature from this type of branch?   * Is this just a broken workflow? And more generally:   * Given long-term development of features, and a need to have a branch concurrent with live, what are the best practices involved in dvcs?


Design pattern to dynamically create patterns found in a list of links

Can anyone help me think of a way to dynamically generate the patterns section of a tool I am creating? I'm not sure how to store and generate these "patterns" dynamically. What the program does is take a big list of links (100,000), puts them in a database, groups them by domain and then curls a page from each domain looking for backlinks. Here is the database scheme, you can see that the Domains table is were most of the information is stored because we group the URLs together by the domain: http://sqlfiddle.com/#!2/9a4d7 So now we know that some domains are live (and have a backlink) and some are dead (no backlink). This is relatively easy but now for the fun part. I need to derive "patterns" from the live links. For example find a list of all live link domains that have more than 25 links from that domain. So if joesblog.blogspot has 33 pages that link to my domain that matches this pattern. Here is my list of patterns:   * Domains that include a homepage link   * Domains grouped by top level domain (.com, .org etc)   * Domains that returned a 405 header response   * URLs with matching directory structures   * Domains that contain the word _ _ _.   * URLs that contain the word _ _ _ in their path.   * Common anchor text.   * Common title tags.   * Common backlink targets (what page of your site does the link point to). The problem is that the patterns are changing CONSTANTLY. There being moved around, added, edited, removed and anything else you can think of. I really need a to build a content management system of sorts to handle these patterns. But how would I store something this intricate in a database? Has anyone ever delt with a similar problem and how did you solve it? If I could just store whole functions and MySQL statements in the database that would be great (but horrible wrong). (PHP, MySQL, JavaScript / JQuery) DISCLAIMER: This is an internal tool. Please don't ask me why I'm building this or claim that the requirements are wrong. This was designed by my manager and its my task to make it work because I am a developer at the company that needs this tool. Thank you!


Decrement operator difference between C++ and Java?

Please tell me why the same piece of code behaves differently in C++ and JAVA. **Ok first I implement a function to calculate the factorial of an Int RECURSIVELY** In JAVA:               int f(int x)         {                  if(x==1)return 1;             return(x*f(x-1));         }      System.out.println(f(5)); -----> outputs 120, ok that makes sense. JAVA METHOD 2:               int f(int x)         {                  if(x==1)return 1;             return(x*f(--x));         }      System.out.println(f(5)); -----> outputs 120, ok that makes sense too. But here is a twist in C++: C++ METHOD 1:               int f(int x)     {         if(x==1)return 1;         return (x*f(x-1));          }      cout << f(5) ; -----> outputs 120, ok now keep reading! C++ METHOD 2:               int f(int x)     {         if(x==1)return 1;         return (x*f(--x));          }      cout << f(5) ; -----> outputs 24. This is surprising. But Why?? I have tried tracing this multiple times and have failed. It makes sense in java because each recursive call gets its own piece of memory and pre decrement operator -- will decrease and yield the decreased value. Why does it work as expected in JAVA but not In C++?


Understand how the TLB (Translation Lookaside buffer) works and interacts with pagetable and addresses

So I am trying to understand this TLB (Translation Lookaside Buffer). But I am having a hard time grasping it. in context of having two streams of addresses, tlb and pagetable. I don't understand the association of the TLB to the streamed addresses/tags and page tables.               a.  4669, 2227, 13916, 34587, 48870, 12608, 49225     b.  12948, 49419, 46814, 13975, 40004, 12707                    TLB     Valid   Tag Physical Page Number     1   11  12     1   7   4     1   3   6     0   4   9                    Page Table     Valid   Physical Page or in Disk     1   5     0   Disk     0   Disk     1   6     1   9     1   11     0   Disk     1   4     0   Disk     0   Disk     1   3     1   12      How does the TLB work with the pagetable and addresses? The homework question given is: Given the address stream in the table, and the initial TLB and page table states shown above, show the final state of the system also list for each reference if it is a hit in the TLB, a hit in the page table or a page fault. But I think first i just need to know how does the TLB work with these other elements and how to determine things. How do I even start to answer this question?


Should we use an outside CMS?

I work at a web design/development shop. Everything we do is centered around the Joomla! CMS. I'm a bit worried-if anything goes wrong with Joomla (major security flaw revealed, Joomla folds and ceases development) we're sunk. I'm meeting with the CEO to plan the next few steps for our company. Should I recommend that we create our own in-house CMS or am I just being paranoid about a single point of failure?


What does a typical programming journal entry consist of?

I read that a lot of people seem to favor the journal, or diary, form to keep notes on their work related activities. I've had a more structured approach myself, which involves outlines and categorization.   While this has its advantages for information retrieval, I find it can become an hindrance when it comes to entries of a broad, subjective or reflective nature. I've been thinking about using a more diary-like format for this purpose, but since I've never held one before, I wonder about what sort of information it would contain. Can anyone give an example of their typical journal/diary entry's content ?   What do you keep notes of, and how do you structure it ?


Why appending to a list in Scala should have O(n) time complexity?

I am learning Scala at the moment and I just read that the execution time of the append operation for a list (:+) grows linearly with the size of the list. Appending to a list seems like a pretty common operation. Why should the idiomatic way to do this be prepending the components and then reversing the list? It can't also be a design failure as implementation could be changed at any point. From my point of view, both prepending and appending should be O(1). Is there any legitimate reason for this?


Matching users based on a series of questions

I'm trying to figure out a way to match users based on specific personality traits. Each trait will have its own category. I figure in my user table I'll add a column for each category:               id    name    cat1    cat2    cat3     1     Sean    ?       ?       ?     2     Other   ?       ?       ?      Let's say I ask each user 3 questions in each category. For each question, you can answer one of the following: `No, Maybe, Yes` How would I calculate one number based off the answers in those 3 questions that would hold a value I can compare other users to? I was thinking having some sort of weight. Like:               No    -> 0     Maybe -> 1     Yes   -> 2      Then doing some sort of meaningful calculation. I want to end up with something like this so I can query the users and find who matches close:               id    name    cat1    cat2    cat3     1     Sean    4       5       1     2     Other   1       2       5      In the situation above, the users don't really match. I'd want to match with someone with a +1 or -1 of my score in each category. I'm not a math guy so I'm just looking for some ideas to get me started.


Working with Git on multiple machines

This may sound a bit strange, but I'm wondering about a good way to work in Git from multiple machines networked together in some way. It looks to me like I have two options, and I can see benefits on both sides:   * Use git itself for sharing, each machine has its own repo and you have to fetch between them.      * You can work on either machine even if the other is offline. This by itself is pretty big I think.   * Use one repo that is shared over the network between machines.      * No need to do git pulls every time you switch machines, since your code is always up to date.     * Never worry that you forgot to push code from your other non-hosting machine, which is now out of reach, since you were working off a fileshare on this machine. My intuition says that everyone generally goes with the first option. But the downside I see is that you might not always be able to access code from your other machines, and I certainly don't want to push all my WIP branches to github at the end of every day. I also don't want to have to leave my computers on all the time so I can fetch from them directly. Lastly a minor point is that all the git commands to keep multiple branches up to date can get tedious. Is there a third handle on this situation? Maybe some third party tools are available that help make this process easier? If you deal with this situation regularly, what do you suggest?


Developing an analytics's system processing large amounts of data - where to start

Imagine you're writing some sort of Web Analytics system - you're recording raw page hits along with some extra things like tagging cookies etc and then producing stats such as   * Which pages got most traffic over a time period   * Which referers sent most traffic   * Goals completed (goal being a view of a particular page)   * And more advanced things like which referers sent the most number of vistors who later hit a goal. The naieve way of approaching this would be to throw it in a relational database and run queries over it - but that won't scale. You could pre-calculate everything (have a queue of incoming 'hits' and use to update report tables) - but what if you later change a goal - how could you efficiently re-calculate just the data that would be effected. Obviously this has been done before ;) so any tips on where to start, methods & examples, architecture, technologies etc.


Rendering design. How can I effectively deal with forward, deferred and transparent rendering?

I have many objects in my game world that all derive from one base class. Each object will have different materials and will therefore be required to be drawn using various rendering techniques. I currently use the following order for rendering my objects.   * Deferred   * Forward   * Transparent (order independent) Each object has a rendering flag that denotes which one of the above methods should be used. The list of base objects in the scene are then iterated through and added to separate lists of deferred, forward or transparent objects based on their rendering flag value. The individual lists are then iterated through and drawn using the order above. Each list is cleared at the end of the frame. This methods works fairly well but it requires different draw methods for each material type. For example each object will require the following methods in order to be compatible with the possible flag settings.               object.DrawDeferred()     object.DrawForward()     object.DrawTransparent()      It is also hard to see where methods outside of materials, such as rendering shadow maps, would fit using this "flag & method" design.               object.DrawShadow()      I was hoping that someone may have some suggestions for improving this rendering process, possibly making it more generic and less verbose?


What can Haskell's type system do that Java's can't and vice versa?

I was talking to a friend about the differences between the type systems of Haskell and Java. He asked me what Haskell's could do that Java's couldn't, and I realized that I didn't know. After thinking for a while, I came up with a very short list of minor differences. Not being heavy into type theory, I'm left wondering whether they're formally equivalent. To try and keep this from becoming a subjective question, I'm asking: what are the major, non-syntactical differences between their type systems? I realize some things are easier/harder in one than in the other, and I'm not interested in talking about those. And to make it more specific, let's ignore Haskell type extensions since there's so many out there that do all kinds of crazy/cool stuff.


Best github repository layout for snippets in multiple programming languages

I have to create a github-presence for an open-source organization. The aim is to distribute _code snippets_ and _reference implementations_ in **different** programming languages. These contributions are going to be (ideally) created by people outside of the organization and should be collected. I know that good practice is to create **one repository per project**. To this end, each implementation (in a specific programming language) should be considered a standalone project and should get its own repository. The point is that this approach makes hard for external people to contribute, because github pull-requests can only be made against existing repositories. By creating a **single repository** with a subdirectory per programming language code contribution becomes easier, but I'm afraid that some IDEs may complain about the directory layout. I'd like to know whether someone already solved this very specific problem in a satisfactory way.


Need Advice on PHP Search Functionality

I'm coding a Linux/PHP site for an organization. The site has two views, activated by a login $_SESSION variable indicating whether one is logged in as a member or not. I need to provide search functionality for both the public and for members. The members area is private. Note that Google Custom Search can't be used here in that case. Does anyone have any recommendations on F/OSS scripts (or perhaps cheap scripts I can purchase) that would provide this functionality with two separate indices, one public and one private, and which would provide paginated results and a keyword search form? Otherwise, I guess I'll have to code one myself. I'm trying to save time, and therefore keep more money in my pocket. P.S. Note I can't ask this on StackOverflow because they want programmer questions there. This isn't a "how do I code this?" question, but "what F/OSS scripts or cheap sitescripts would solve this problem?" type of question. Note also that this won't help me either. I mean, look at the answers of that question.


simple 'defrag' logic that minimizes changes?

edit: so clearly I didn't explain this well, so let me try again with examples. I have a 'pipe' of a given size with signals routed through it at given offsets. The pipe can get fragmented with signals in different offsets making it impossible to fit a new signal. I want an algorithm that will tell me how to arrange the signals to defragment the pipe; but with a minimal number of signals actually being moved! So for the example.. Say I have a pipe of size 16. It has the following signals with the sizes and offsets described.               offset 0: A (size of 4; fills slots 0-3)     offset 5: C (size of 2, fills slot 5-6)     offset 8: B (size of 4, fills 8-11)     offset 14: D (size 2, fills 14-15)          Pipe: AAAA_CC_BBBB__DD      In this case I have 1 slot open at offsets 4 & 7, and two at offset 12-13. Now lets say I want to add a size 4 signal to this pipe. There is no continuous space for it now, but I know I have enough space for it if I defragment. The 'obvious' solution is to group all the signals together at the 'top' like this:               offset 0:  A (size 4, fills 0-3)     offset 4:  B (size 4, fills 4-7)     offset 8:  C (size 2, fills 8-9)     offset 10: D (size 2, fills 10-11)          Pipe: AAAABBBBCCDD____      this leaves slots 12-15 free for my new signal. However, to do this I repositioned 3 signals(B-D). For each signal I moved I have to send commands down to hardware and wait for a non-trivial amount of time. If I was smarter I could realize there is another approch. I could reposition like this:               offset 0:  A(size 4, fills 0-3)     offset 8:  B(size 4, fills 8-11)     offset 12: C(size 2, fills 12-13)     offset 14: D(size 2, fills 14-15).          Pipe: AAAA____BBBBCCDD      I can now fit my new signal in offsets 4-7; AND I only had to reposition one signal(B). Thus saving on hardware calls. I'm wondering if there is a good algorithm to detect sitations like this; where I can 'fit' a signal onto a pipe with the minimum number of signals moved. The aproch thta comes to mind is an N! algorithm; which basically amounst to "generate every possible distribution, calculate how many moves it resulted in". I'm loking for a faster approch. The approch does _not_ have to be 100% perfect, I'm looking primarily to minimize the average case, so long as the worst case isn't made too horrendous. I know that I will never have more then 255 signals on a given pipe; so I may be able to 'get away' with N! as bad as that sounds. I also know each signal's size is a power of 2, as is the pipe size. also, are there any briliant algorithms for placing of signals that minimize fragmentation? * * * Question answered; see below. I wanted to expain on the answer slightly to better explain how defragmentation would occure for anyone reading; buddy does explan it I wanted to point out a simpler approch to conceptualize and explain the defraging part in more detail since that was the original question. I'm explaining my approch, which is a slightly different/simpler approch but effectively keeps the 'buddy' concept. I'm not precomputing blocks or labeling them, this is too much effort to implement and maintain. For me the CPU cost of calculating where a signal will go is pretty trivial compared to actual placing/deletion of signals; so I can afford to lose a tiny, linear, amount of CPU by not pre-computing to simplfy my logic. So the process is: for insertion: All signals are kept in signal boundaries equal to the signal size, so a signal will start on offset where offest % signalsize=0. For actuall offset we walk through and figure out intervals that keep this boundry. So if my signal is size 4 on a 16 size pipe I'll look at intervals 0-4, 5-7, 8-11, 12-15. For each interval check if all space in that interval is free. In the simple case we have a interval with no signals in it and we just put the signal at that interval. Important, we look at the intervals in order and place our signal in _the first free_ interval, this ensure we break the smallest possible 'block' (using buddy terms) when we add our signal. This should be equivlent to the buddy approch described by im3l96; except without precomputation of blocks. if no interval is completely free we have to defrag. For this we find the the signal with the most unused slots. If multuple intervals have the same number of slots unused select the first interval. We then find the largest signal in this interval and recursively call same insert algorithm for the smaller signal (except mark the interval we selcted to insert our first signal as unavailable somehow). This moves the signal to somewhere else that it will fit. We then find the next smallest signal in our selected interval and do the same until we moved all signals. Worst case of 2^n-1 signals moved; where N is the number of potential signal sizes <=our signal (assuming signals are multuple of 2 then N=log2(signalSize)). Here is an example. * stands for a slot marked as unavailable when we recursively call this method (ie the interval that the calling method wanted to place it's signal in, and thus doesn't want the recursive call to try to place a signal into) Here is an exaple, simplest case I could come up with that still demonstrates full complexity. Note: the following structure would be hard to create, but _could_ result from the buddy approch if someone tried very very hard.               FFFFFFFF__AA_B__EEEE_HGGCC_DII_J      Someone passes in a signal Z of size 8 we select offset 8: defragInsert(z, size 8)               effective structure: FFFFFFFF__AA_B__EEEE_HGGCC_DII_J          placing signal in interval: __AA_B__      defragInput(A, size 2)               effective structure: FFFFFFFF********EEEE_HGGCC_DII_J     place signal in interval (offset 20)  _H      defragInput(H, size1)               effective structure: FFFFFFFF********EEEE**GGCC_DII_J     place signal between C & D      return defragInput(H, size1)               effective structure: FFFFFFFF********EEEE__GGCCHDII_J     place H at offset 20 now that it's open      return defragInput(A, size 2) effective structure: FFFFFFFF_ ___ _B__EEEEAAGGCCHDII_J move B now... defragInput(B, size1) effective structure: FFFFFFFF* ****** *EEEEAAGGCCHDII_J place B between I & J return defragInput(B, size1) effective structure: FFFFFFFF_ **__** _EEEEAAGGCCHDIIBJ add B return defragInsert(z, size 8)               fianl structure: FFFFFFFFzzzzzzzzEEEEAAGGCCHDIIBJ


Is there a simple, flat, XML-based query-able data storage solution?

I have been in long pursuit of an XML-based query-able data store, and despite continued searches and evaluations, I have yet to find a solution that meets the my needs, which include:   1. Data is wholly contained within XML nodes, in flat text files.   2. There is a "native" - or at least unobtrusive - method with which to perform Create/Read/Update/Delete (CRUD) operations onto the "schema". I would consider access via http, XHR, javascript, PHP, BASH, or PERL to be unobtrusive, dependent on the complexity of the set of dependencies.   3. Server-side file-system reads and writes.   4. A client-side interface element, accessible in any browser without a plug-in. Some extra, preferred (but optional) requirements include:   1. Respond to simple SQL, or similarly syntax queries.   2. Serve the data on a bare bones https server, with no "extra stuff", either via XMLHTTPRequest, HTTP proper, or JSON. A few thoughts: What I'm looking for may be possible via some Java server implementations, but for the sake of this question, please do not suggest that - unless it meets ALL the requirements. Java, especially on the client-side is not really an option, nor is it appealing from a development viewpoint.* I know walking the filesystem is a stretch, and I've heard it's possible with XPATH or XSLT, but as far as I know, that's not ready for primetime, nor even yet a recommendation. However the ability to recursively traverse the filesystem is needed for such a system to be of useful facility. At this point, I have basically implemented what I described via, of all things, CGI and Bash, but there has to be an easier way. Thoughts?


Duplication in parallel inheritance hierarchies

Using an OO language with static typing (like Java), what are good ways to represent the following model invariant without large amounts of duplication. I have two (actually multiple) flavours of the same structure. Each flavour requires its own (unique to that flavour data) on each of the objects within that structure as well as some shared data. But within each instance of the aggregation only objects of one (the same) flavour are allowed. FooContainer can contain FooSources and FooDestinations and associations between the "Foo" objects BarContainer can contain BarSources and BarDestinations and associations between the "Bar" objects               interface Container()     {        List<? extends Source> sources();        List<? extends Destination> destinations();        List<? extends Associations> associations();     }          interface FooContainer() extends Container     {        List<? extends FooSource> sources();        List<? extends FooDestination> destinations();        List<? extends FooAssociations> associations();     }          interface BarContainer() extends Container     {        List<? extends BarSource> sources();        List<? extends BarDestination> destinations();        List<? extends BarAssociations> associations();     }          interface Source     {        String getSourceDetail1();     }          interface FooSource extends Source     {        String getSourceDetail2();     }          interface BarSource extends Source     {        String getSourceDetail3();     }          interface Destination     {        String getDestinationDetail1();     }          interface FooDestination extends Destination     {        String getDestinationDetail2();     }          interface BarDestination extends Destination     {        String getDestinationDetail3();     }          interface Association     {        Source getSource();        Destination getDestination();     }          interface FooAssociation extends Association     {        FooSource getSource();        FooDestination getDestination();        String getFooAssociationDetail();     }          interface BarAssociation extends Association     {        BarSource getSource();        BarDestination getDestination();        String getBarAssociationDetail();     }


Resources for writing a parser combinator library

I often use parser combinator libraries, but I've never written one. What are good resources for getting started? In case it matters, I'm using Julia, a functional (but not lazy) language.


With a small development team, how do you organize second-level support?

Say, you have a team of 5 developers and your inhouse customers demand a reasonable support availability of say 5 days a week, 9am-6pm. I can imagine the following scenarios:   * **the customers approach the same guy** , every time. Downside: single point of failure, if the guy is unavailable.   * **each developer is assigned one week of support duty**. Downside: how to you distribute the work evenly in times of planned (vacation) and unplanned (sickness) unavailability?   * **each developer is assigned one day of support duty**. Downside: similar to above, but not as bad.   * a **randomly picked developer handles the support request**. Downside: maybe not fair, see above. What is your experience?


Why rails use yaml to config database instead of plain ruby code?

Most of configuration files in ruby such as Gemfile, gemspec, are just ruby code itself. Why database configuration file in rails is the exception?


Why the recent shift to removing/omitting semicolons from Javascript?

It seems to be fashionable recently to omit semicolons from Javascript. There was a blog post a few years ago emphasising that in Javascript, semicolons are optional and the gist of the post seemed to be that you shouldn't bother with them because they're unnecessary. The post, widely cited, doesn't give any compelling reasons _not_ to use them, just that leaving them out has few side- effects. Even GitHub has jumped on the no-semicolon bandwagon, requiring their omission in any internally-developed code, and a recent commit to the zepto.js project by its maintainer has removed all semicolons from the codebase. His chief justifications were:   * it's a matter of preference for his team;   * less typing Are there other good reasons to leave them out? Frankly I can see no reason to omit them, and certainly no reason to go back over code to erase them. It also goes against (years of) recommended practice, which I don't really buy the "cargo cult" argument for. So, why all the recent semicolon-hate? Is there a shortage looming? Or is this just the latest Javascript fad?


Why did Microsoft dropped the RESX model for RESW in Windows Store applications?

Why did Microsoft choose to change the resources management system from .NET's RESX files? RESX had useful code generation, providing developers auto-completion for resources names and outputting IMHO very readable code. The new RESW format is as far as I know, the same bare XML files, but without any code generation, forcing developers to write more code, and depriving them of compile time error detection.


Learning path for web developer .NET or Java

I am interested to know how many real world web application servers are hosted by windows? I am going to learn C# and ASP.NET and want to convert my self from an embedded developer to a web app developer. My friends told me that there are ways more Linux based servers than windows servers. He also mentioned the Java skills stack is much more useful than .NET in the world of web application. My experience of Java and C# are rougly the same. I am an experienced C++ developer though. Can anyone give me some suggestion about it? Many thanks


Programming Test

> **Possible Duplicate:**   >  Good interview programming projects We are looking to hire some more Java developers onto our team, and plan to test their coding abilities with a test. We currently use a web-based Java test that automatically compiles and runs the code, but it is very flaky and we're having problems with our candidates losing their work on this site. Not only is this frustrating for everyone, it makes us look like we don't know what we're doing. Is there a popular testing suite out there? What do you use? I'm **not** interested in dogmatic arguments on whether or not I should be testing my candidates in this way, I'm looking for a tool that will help me do it.


Design for using your own API

So I'm planning to use APIs for my host app. But the APIs are built such that it requires a sessionkey for every request. So my question is, how would I dogfood my API? Cause, apparently I'm thinking in the line of creating a "special" key for my host app (cause it makes no sense to request for a key for my own use), but, anyone inspecting the headers of the request could find this key and literally use it and bypass requesting their own keys. Maybe there's a best practice for dogfooding our own API without a special key or someway to differentiate whether the request is coming from the host app or the public. I couldn't use IP to differentiate too, cause the public could be using the same server to call the APIs. That's just the way it is, and is a one of the constraints to keep in mind.


C++ Commitee Members?

I have been searching the web for information regarding what people (and their backgrounds) are in the C++ commitee. However, to my surprise I have not found any such information. Where can I find information about the C++ commitee members?


How to manage large scale project in node.js keeping everything Asynchronous?

I have a large module which have to process more than 10k request/ response per second. Every request has a json and need to process it and verify it on the database and generate the response on the basis of the db query. Here is an example                Function 1           function  ('/get' , fucntion (req1 , res1 , next ){            //to process the req data        processData(req1 , res1 );           });                Function 2               processData(req1 , res1 ){                var J = JSON.parse (req1.body)          //it has to read db three times           //process the json build the response and return                      condtionCheck(J , res1){                              var a = someVlaue(){                         //select a value from a collection set of nosql which have                          //more than 1000 document and                          //i have to itrate a for loop to check the condition .....etc                          //...........                                }                         ........                                dataRead(var a , res1){                  // is it possible to send response for the req1 object here                              res1.send({value b: abcd123})                         }                        }                }               Function 3 ..... and so on       The major problem is all the code i have written inside the process data is synchronous. Bacaue each code depends upon the previous call back and there are so many condition check are used in several times. So It is good to put such a large processing in synchronous way inside node ? If i write the code using async some times all scenario got in a deadlock condition How to avoid such behavior? Does async or function like step have affect on performance ? On such a series of function how can we reduce latency ?


Why should CS teachers stop teaching applets?

Why should CS teachers **stop** teaching Java applets? As a veteran of applets and forums, I think it is high time to make a call that teachers should stop teaching applets in general, & especially AWT based applets. Applets are an advanced and specialized type of app. that has little place in the real world around us (most things that are done by applets can instead be better achieved using Javascript and HTML 5).


How to program something with the expectation that it will work the first time?

I had a friend in college who programmed something that worked the first time, that was pretty amazing. But as for me, I just fire up the debugger as soon as I finally get whatever I'm working on to compile - saves me time (kidding of course, I sometimes hold out a little bit of hope or use a lot of premeditated debug strings). What's the best way to approach the Dijkstrain ideal for our programs? -or- Is this just some sort of pie-in-the-sky old fools quest for greatness applicable only to finite tasks that no one should hope for in our professional lives because programming is just too complex?


What HR policies prevent you from finding skillful programmers?

During our interview process we give the candidate a programming test as well as a programming design problem. Our HR department has told us to stop administering the programming test due to legal concerns. This would really hinder our ability to screen candidates. Are there other HR policies that prevent you from hiring capable programmers?


How does a stack VM manage with only one stack?

Lately I've been asking a lot of questions here about VMs. Here's another one: I understand that often stack based VMs use only one stack - the call stack - for everything. E.g. it is also used for evaluation of arithmetic expressions. What I don't understand is, how doesn't this complicate things a whole lot? I'll demonstrate what I mean with an example. Please consider the following psuedocode program:               func main:         funcA()          func funcA:         2 + 4 * 8      This would compile to the following bytecode:               main:     call funcA     end     funcA:     push 2     push 4     push 8     mult     add     end      (In this bytecode, the program starts at `main:`. `call` pushes the program counter onto the stack and jumps to the specified label. When an `end` is reached, the top of the stack - assumed to be a line number - is popped and we jump there.) So let's see what happens here: In `call funcA`, we push the program counter (i.e. next line number) onto the stack. Then we jump to `funcA`. In `funcA` some computation is made. After the computation, the number `34` is left at the top of the stack. When we reach `end`, we pop the top of the stack, assuming it's the line number we should return to But it isn't, the line number to return to is buried underneath. How should `end` know about this? To avoid all this mess, we can just have a separate data stack and call stack, and not mix the two. So my question is: why do some VMs (such as the JVM) use one stack for everything, and when the do: how do they handle situations such as the one described above?


Open Source-Only license

I want to know if a license exists that is similar to GPL but allows only source distribution (that is no binary distribution). Why do I want this? The idea is that I want fellow programmers to be able to have the benefits of open source software BUT also retain control over the consumer binary distribution. Specifically I want to prevent my software to be picked by organazations like the linux distributors. I want the users of my software to dowlnload binaries only from my site. Is this possible? Thanks


Silverlight support from Microsoft

I heard Silverlight will not be supported any more by Microsoft. It is true? If so, could anyone share with me Microsoft announcement? And if there are already application developed by Silverlight, what is the new technology to migration to? thanks in advance, Lin


Should you hard code your data across all unit tests?

Most unit testing tutorials/examples out there usually involve defining the data to be tested for each individual test. I guess this is part of the "everything should be tested in isolation" theory. However I've found that when dealing with multi tier applications with a lot of DI, the code required for setting up each test gets very long winded. Instead I've built a number of testbase classes which I can now inherit which has a lot of test scaffolding pre-built. As part of this, I'm also building fake datasets which represent the DB of a running application, albeit with usually only one or two rows in each "table". Is it an accepted practice to predefine, if not all, then the majority of the test data across all the unit tests? **Update** From the comments below it does feel like I'm doing more integration than unit testing. My current project is .net MVC, using Unit of Work over EF Code First, and Moq for testing. I've mocked the UoW, and the repositories, but I'm using the real business logic classes, and testing the controller actions. The tests will often check that the UoW has been committed, e.g:               [TestClass]     public class SetupControllerTests : SetupControllerTestBase {       [TestMethod]       public void UserInvite_ExistingUser_DoesntInsertNewUser() {         // Arrange         var model = new Mandy.App.Models.Setup.UserInvite() {           Email = userData.First().Email         };              // Act         setupController.UserInvite(model);              // Assert         mockUserSet.Verify(m => m.Add(It.IsAny<UserProfile>()), Times.Never);         mockUnitOfWork.Verify(m => m.Commit(), Times.Once);       }     }      `SetupControllerTestBase` is building the mock UoW, and instantiating the `userLogic`. A lot of the tests require having an existing user or product in the database, so I've pre-populated what the mock UoW returns, in this example `userData`, which is just an `IList<User>` with a single user record.


Does the pattern of passing in one object instead of many parameters to a constructor have a name?

If you have a constructor that takes a lot of parameters, like this:                 public OrgUnitsHalRepresentation(List<OrgUnitSummaryHalRepresentation> orgUnitSummaryHalRepresentationList,       int count, int providedCount, int total, int page, int filterLimit, boolean hasNextPage, boolean isDefaultCount)      You can use a separate class that takes nothing in the constructor and set these parameters using setters and pass in this into the constructor instead:               public OrgUnitsHalRepresentation(Pagination(Name of pattern) p)      Does this have a name so that I can use it in my class name?


Collocation in Code

Quite some time ago I remember reading an article from 'Joel on Software' that mentioned collocation of information in code was important. By collocation, I mean that relevant information about the code is present when the code is. I'm currently writing an article that has a small bit in it about collocation so I went searching for sources and found the quote in the article 'Making Wrong Code Look Wrong' > In order to make code really, really robust, when you code-review it, you > need to have coding conventions that allow collocation. In other words, the > more information about what code is doing is located right in front of your > eyes, the better a job you’ll do at finding the mistakes. When you have code > that says For me, collocation isn't just about the code itself, but the tool used to view the code. If it can help with the 'collocation factor' (term coined by me?) I believe it can help with the programmers productivity. Take for example the modern IDEs that show you the variables type by hovering over it. **Are their any other articles written about collocation in code and/or are their other terms that this is known by?**


Any empirical research comparing IT project failure rates to other domains?

IT projects are legendary for high failure rates, cost overruns, and schedule overruns. Hence the motivations for questions like this. Is there any actual empirical research that compares the failure rates of IT projects to those in other domains, in particular to engineering domains? For example, has anybody compared cost and schedule overruns in IT projects to construction projects of comparable scope? There should be publicly available data here from government projects, but I'm not aware of anybody who's gone and done comparisons.


Is it possible to use RubyGnome2's/QtRuby's HTML renderers to make UI for a Ruby script?

I'd like to make a graphical user interface for my script, instead of running it from the console. I'm aware there's a wealth of UI libraries for Ruby, but I'm quite familiar with HTML and CSS and I'd like to use them for building an interface. So the question is: Is it possible to use a HTML rendering library to make such an UI? From what I understand, it's relatively easy to put in a HTML rendered view of something, but is it possible to communicate back with the script? Like when I push that big red button, it actually tells the script to act on it? Obviously it's possible if the script run on the server side, but I'd like to run it as a desktop application.


Why would programmers ignore ISO standards?

One of the things I run into often is problems caused by programs which don't conform to ISO standardss. One example would be not using the ISO country tables but making up their own shorthands, which goes okay for the United States (US), or the Netherlands (NL) but goes spectacularly wrong for the United Kingdom (GB, not UK) or Spain (ES, not SP) and a lot of other countries. As another example, internal date notations. Why would anyone store a date as 01/02/2014 ever? It is completely unclear whether that is 1st February or January 2nd, whereas if you use the ISO standard you just store 2014-02-01* and it's unambiguously February 1st. My question: When and why should a programmer make up their own constructs when there is an ISO standard available? * Store 2014-02-01, and format the date accordingly when showing it to an end user.


Why use Pascal with Cocoa/Cocoa Touch?

I'm surprised to find that it might be possible to use Pascal with the Cocoa and Cocoa Touch frameworks. This is an interesting turn of events, as Pascal was the favored language for Mac development for a short while early in the history of Macintosh. It looks like someone has gone to a lot of trouble to make Pascal work with Objective-C frameworks like Cocoa and Cocoa Touch, but I'm not sure I see the point. Is this mainly a refuge for Pascal developers coming from other development environments like Delphi, or are there compelling reasons to use Pascal in place of Objective-C or other languages. I don't mean to ask which language is "better." I'm just wondering if there's a reason beyond language preference that one would choose to use Pascal for MacOS X or iOS development.


How would you create a mobile (android) offline wiki site?

My apologies in advance if this is not a good forum for this question; pointers to others happily accepted. On the off chance it matters, I'm not going to commercialize this idea or anything; if anything in here is interesting to you, use it as you see fit. My basic problem is this: My favorite place to do non-code writing (essays, fiction, etc) is on my Android phone when I'm traveling. Said traveling often causes the phone to lose all signal/web connection. I would like a system that auto-syncs with the phone in some fashion, can be written in a fairly wiki-ish style (i.e. links are supported but I don't have to actually type out also be edited easily at a regular computer when needed. I'd prefer the editing on the phone be as close to plain text as possible, because fine manipulation like that required to set something to bold or whatever is a pain; I'd rather just be able to type things out. Nice-to-have is the ability for other people to collaborate on documents. Very-nice-to-have is authentication so that some documents can be private, without having to get into the auth quagmire myself. There really doesn't seem to be any such thing out there. The two options I've thought of for implementing this:   1. Now that there exists a proper 2-way sync dropbox app ( https://play.google.com/store/apps/details?id=com.ttxapps.dropsync ), I could just use a plain-text editor on the phone and have a simple web app that presents the text via a wiki markup library of some kind out of the relevant dropbox folder. Advantages: Dead simple. Disadvantages: No easy auth or collaboration.   2. I could use Google Docs, and have a not-so-simple Web app that pulls documents from there, treats them as wiki text, maybe does some cashing, and presents them as a coherent-ish web site(s). Advantages: If I can get the auth to pass through properly, auth and collaboration are free. Disadvantages: Much more complex, and this is just a one-off personal project. I'm curious as to whether I've missed anything, any other easier ways to solve this problem. I'm actually a little surprised that no-one seems to have thought of backing a wiki on Google Docs; there's the Google app wiki stuff, but that pretty much requires a browser AFAICT, whereas there are several Google Doc apps on pretty much everything with offline sync options.


Given an idea for an application, how should I decide which web technologies to use?

Background: I'm an experienced Java developer, know basic Javascript, HTML, and CSS (and find it easy to figure out how to do something), and have a little experience in Python. I've seen Ruby before and edited a few lines of existing scripts. I'm curious not so much about any given technology, but mainly about what my thought process should be when deciding which technologies to use. Let's take a simple application - maybe an online address book where I can enter contact information, and create groups of contacts. How should I go about evaluating the options that are out there? The number of frameworks out there is daunting to say the least. This should be a learning experience for me, but also I want the knowledge that I gain to be relevant, and I'm afraid of using something that I'll never use again.


Is it justifiable for a prospective employer to ask you to make a decision without full information?

## The Story I am currently in the process of finding a new job. Several days ago I had two interviews with prospective employers, both of which expressed interest for a second meeting.   * Company A asked me to come over to talk today. There was no further interview, they simply made me an offer and explained terms.   * Company B has scheduled me for a hands-on evaluation tomorrow, after which I will know their final answer within a week. I am fully confident they will also make me an offer and moreover that it will be financially preferable to that of Company A. Since Company A offered first, I told them that I cannot evaluate their offer before Company B also let me know of their decision. This did not sit well with the person I was talking with (the COO). Here are his two main objections and the gist of my answers:   * _"We do not want to be anyone's second best option"_ I explained that in fact they were my first option, in that all other things being equal I would prefer to work for them. In addition, since the meeting was chronologically first there was really no way for me to be honest with them without letting them know; so this is not a matter of being my second option but rather of me being level at the negotiating table.   * _"We cannot wait for you to make up your mind"_ I explained that as they surely understand, making a decision without evaluating all alternatives would be me acting against my own best interest. In addition, the skill and modus operandi of evaluating before deciding is definitely something they will expect of me on the job (and something that factored into their decision to make an offer). Finally, there is a hard limit on how long they would have to wait for an answer (a week); I also volunteered to tell company B "I would appreciate it if you could inform me of your final decision as soon as possible, since I am also considering another offer". ## The Facts At this point I am fairly certain that Company A just want to intimidate and pressure me into making an uninformed decision. Evidence towards this conclusion include:   * Their playing hardball during the first interview, which was quite intense and slightly uncomfortable. Initially I justified this as a result of their sense of technical excellence, but after this second meeting I have reconsidered. After all, if the reason for their behavior was the bar being too high for me then making me an offer without any other intermediate step would not be logical.   * The first interview being conducted mostly in "senior personnel" mode (they only asked two questions having straight and definite technical answers, which took maybe a minute out of almost two hours total time), but their offer being for a lower-ranked position.   * Their ominous references to how bad the employment situation is right now in Greece where I live; things like "we always pay on time and in euros" (with the obvious suggestion that in case of Greece defaulting they will not be affected because they only do business with customers in the US). This I regard as pure FUD.   * Their insistence that I need to give them an answer by tomorrow at most. I am fairly certain (due to other information I have) that they are not considering any other employee for the same position; rather, for them it's a question of "do we pick this guy up or not?". Also, what kind of employer would agree to sign you up today but turn you down next week? And why would they ask me to behave in a manner that actually gives you away as someone they _wouldn't_ want to hire? It does not make sense. In fairness, I should also mention that these people _look like_ they have achieved a high Joel Test score in an environment where the median score is either zero or one (for using version control). They look like their conduct of everyday operations is dramatically better than most other IT shops around here. And they only work with US customers, which implies they achieve a level of professional standard shall we say, _uncommon_ here in Greece. ## The Moral? Is there any convincing justification of why they would require an answer within two days at most? Especially since I told them I 'm expecting another offer _and_ the _worst_ case scenario is an answer within a week? Or am I correct in reconsidering if I want to work for them at all? Thank you for your valuable input.


What is the proper jargon to refer to a variable wrapped inside a function closure?

In JavaScript, there is no such thing as a "private" variable. In order to achieve encapsulation and information hiding in JavaScript, I can wrap a variable inside a function closure, like so:               var counter = (function() {             var i = 0;         var fn = {};         fn.increment = function() { i++; };         fn.get = function() { return i; };         return fn;     {)();         counter.increment();     counter.increment();     alert(counter.get()); // alerts '2'      Since I don't call `i` a private variable in JavaScript, what do I call it?


Custom Request Templates

What kind of information do you require from the project management team before you can proceed on a project? Is there a certain format they utilize on Programming Requests which helps you to understand exactly how the development team can succeed with this project. Example: I always like it when project managers mock up forms. It helps significantly to know how they are visualizing the UI for many tasks. Any suggestions on how we can assist the Project Management team in issuing Programming Requests that are as clear as day will be greatly appreciated. Thanks.


Why does the .Net world seem to embrace magic strings instead of staticly typed alternatives?

So, I work in .Net. I make open source projects in .Net. One of my biggest problems with it isn't necessariyl with .Net, but with the community and frameworks around it. It seems everywhere that magical naming schemes and strings is treated as the best way to do everything. Bold statement, but look at it: ASP.Net MVC: Hello world route:                       routes.MapRoute(                 "Default",                                              // Route name                 "{controller}/{action}/{id}",                           // URL with parameters                 new { controller = "Home", action = "Index", id = "" }  // Parameter defaults             );      What this means is that ASP.Net MVC will somehow look up `HomeController` in your code. Somehow make a new instance of it, and then call the function `Index` apparently with an `id` parameter of some sort. And then there are other things like:               RenderView("Categories", categories);     ...or..     ViewData["Foobar"]="meh";      And then there are similar things with XAML as well. `DataContext` is treated as an object and you have to hope and pray that it resolves to the type you want. DependencyProperties must use magic strings and magic naming conventions. And things like this:                 MyData myDataObject = new MyData(DateTime.Now);             Binding myBinding = new Binding("MyDataProperty");       myBinding.Source = myDataObject;      Although it relies more on casting and various magical runtime supports. Anyway, I say all that to end up here: Why is this so well tolerated in the .Net world? Aren't we using statically typed languages to almost always know what the type of things are? Why is reflection and type/method/property/whatever names(as strings) prefered so much in comparison to generics and delegates or even code generation? Are there inherit reasons that I'm missing for why ASP.Net's routing syntax relies almost exclusively on reflection to actually resolve how to handle a route? I hate when I change the name of a method or property and suddenly things break, but there don't appear to be any references to that method or property and there are of course no compiler errors. Why was the apparent convenience of magic strings considered "worth it"? I know there are also commonly statically typed alternatives to some things, but they usually take a backseat and seem to never be in tutorials or other beginner material.


Proposal for a new position at work

I have an idea at work for a new Product Manager position at our office. I work with several developers, and it would be helpful to have someone working in a type of "Scrum Master" capacity, dividing out assignments and making sure they get complete. This position does not currently exist, however I feel that I have enough evidence to indicate that it be very helpful for our business. What is the best way to present this proposal to my boss? Is there a specific template that you know of for new position? It should be able to describe the qualification for the position, their responsibilities, and what metrics we would use to measure them. **UPDATE** With Anna's suggestion, I gave more details about this specific position. However, I would ideally like the most generic way to present a new position to my boss.


TODO indicates "task to be completed", FIXME to be fixed etc. Is there a code tag to indicate "need improvement" on code comments?


Proper Git setup between designers and developers?

Basically we now have 2 developers for an iOS project, 2 developers for an Android project and 1 designer doing designs for both projects. Right now, the way we exchange designs and images is through mail...so not very advanced or efficient. We're switching to Dropbox, but I feel like we could go a step further and somehow integrate the process into Git. For the iOS project, we are using Git, and I'm thinking that it might be a good idea to introduce the designer as well to Git. The problem is that, being a designer, it might be a bit difficult for him to understand source version control. As the 2 iOS devs, we'll probably be doing a lot of commits, branching, merging, but the designer will most likely only have to update images every now and then. We'd like to keep the setup as simple as possible (especially for the designer). We are using GitHub, so their OSX application might come in very handy for this. Does anyone else have experience or best practices about how to set up the branching/merging and integrating a designer into a technical Git project? Articles, blog posts etc. are welcomed as well.


Building a WordPress-like filter system

This question is purely hypothetical. I use WordPress a lot and know the filter structure from an implementation point of view. I'm now wondering what's the best way to implement such a structure (not the way WordPress uses, but the _best_ way). I will give a short overview of what the WordPress filter structure is. After that, I'll list my requirements and thoughts. At last, I'll ask some questions. ### WordPress' filter structure WordPress sends nearly every data through a _filter function_ before it outputs the data to the browser. The WordPress Codex gives information in the Plugin API and the Filter Reference. For a plugin developer, it's quite easy to add a filter: >   1. Create the PHP function that filters the data. >   2. Hook to the filter in WordPress, by calling `add_filter()` >   3. Put your PHP function in a plugin file, and activate it. > Let's look at these steps in some more detail:   1. A filter function is a PHP function that takes one parameter, the input, and returns the output. It should not `echo` or `print` anything.    2. The `add_filter` function (reference) looks like:               add_filter ( 'hook_name', 'your_filter', [priority], [accepted_args] );      `hook_name` is the _action hook_ at which the filter should be called.   `your_filter` is the name of your filter function.   `priority` gives the, well, the priority of the filter (default: 10), where lower numbers are more important.   `accepted_arguments` tells WordPress the filter function will take more parameters, but let's leave that out here, it's not one of my requirements.   3. I don't have to explain this step, I think. ### Requirements I'd like to know how to implement a filter structure like WordPress has and for the sake of an actual answerable question, I have made up a hypothetical case with some requirements. My case is a forum, in which I have several cases in which I'd want to use filters for the content, like:   * A linkify filter to make bare URLs into nice, working hyperlinks   * A smiley filter to replace ASCII smileys like ':D' into an image ![enter image description here](http://i.stack.imgur.com/IRi6N.gif) (sorry for the imgur abuse) I think the advantages of using filters for this would be:   * Code clarity   * Filters can be easily reused   * Making it easy to implement that a user can switch a filter on and off   * Easy implementation of additional filters in the future ### My thoughts I imagine WordPress keeps a multidimensional array like `$filters[$hook][$filter]`. Here is `$hook` the name of the hook when the filter has to be called and `$filter` an array of the filter settings, basically those that were passed to the `add_filter()` function. When an action hook point is reached, WordPress can iterate through the `$filters[$current_hook]` array and execute every filter. ### Questions   1. Is this the best way to include a filter system with the requirements I listed? If so, why? If not, why not; and what would be a better system and why?   2. As I said I want users to be able to switch filters on and off.  I thought of adding a `enabled_filters` column to the user table in the database, which would be a bitmask of the enabled filters. That would mean every filter would have a unique identifier, but more important that there aren't very much filters possible. So this wouldn't be the way to go. I also thought of adding a table `enabled_filters` with columns `userId`, `filterName` and `enabled`, to set the filters on and off with a new row. With using the filter name in every row, this would cost some data space on much users and filters, so a better but similar idea would be adding a table `filters` with `id` and `filterName`, and changing the `filterName` column of the `enabled_filters` table into a `filterId` column. This would also allow an additional field in the `filters` table, `allow_disable`, to disable the disabling of the filter. Is this second approach a good one, or are there better options? Key requirement is that I don't want to have to modify the base system when adding a filter.   3. WordPress wants programmers to not print anything in a filter function, but return a new string. That means you'll have a variable `$return` in your filter function, to which you append new data all the time with `$return .= '...';`. Using `echo` or `print()` could be easier for programmers, also to make it easier to port existing code (which uses print functions) to a filter function. The filter system could use the `ob_*` functions to capture the printed data instead of sending it to the browser. Would this be a good way to implement filters? Are there any disadvantages, like speed?    4. The last question is about when to use filters, and when not. It seems clear to me that the listed cases (linkify and smileys) are cases where filters are well-used. For things like signatures or avatars, to stick with the forum, it's different. I've tried to figure out why it feels different, and think it's because that would limit the use of a filter to one place.  For example, avatars and profile overview filters could only be used next to a post. One of the nice things of a filter is that you can add the same filter function to a different action hook, so that you can pass both the post and the signature content through the linkify filter. Am I right here? Is it true that one shouldn't use filters for avatars, profile overviews and signatures? What can be said about general rules when and when not to use a filter? If I were to write documentation on my system for third-party developers, what should I write down on this topic?


Do variable names affect the performance of websites?

Do variable names affect website performance? I know this will going to be very low number, but still can any one provide the reasons for not choosing a long variable name in aspect of performance?


What should a repository really do?

I've heard a lot of the repository pattern, but I quite didn't understand what a repository should really do. When I say "what a repository should really do" I'm mainly concerned about which methods it should provide. For instance, should a repository really provide CRUD methods, or should it provide some different kind of method? I mean, should the repositories contain business logic, or should they simply contain the logic to communicate with the data store and manage the entities to be saved or loaded? Also I've heard that repositories are units of persistence for aggregates. But how is that? I fail to understand how this works in practice. I thought that we should have just one interface `IRepository` which contains the CRUD methods, and then for any entity the implementation would simply contain the logic to save and retrieve such type from the data store.


Skills for RAD developer

I am about to embark on an exquisite journey. I have applied for an event, where in span of 48 straight hours, strangers meet, throw around some great ideas, decide on teams, and make a working prototype of IT project. All within 48 hours. I anticipate, that this will be very skill and ability intensive experience, and I want to be prepared. Since i will need to develop my part of the code quickly, I have a following question: **What would be the most needed skills for these 48 hours?** I do know, that things like proper documentation, version control and such are pretty important for a full fledged application/program/web development, but for this span of frantic coding? _Background: I am a web developer, so answers applicable to web development would be more appreciated than others._


10 years out of programming, wanting to return... How to best approach it?

I've searched, but found nothing directly applicable. I have 15 years or so development experience, in Unix, C, C++ mainly, (along with assorted script / minor languages) the last 5 years of this was contracting. My various testimonials and references over the years eventually convinced me I was pretty good at it too. Now, for the last 8 years I've been entirely non-technical and now know that to have been the wrong choice. The problem I face now apart from the skill set on the resume would put off some potential employers, is I've almost completely forgotten C++ and the little Java I had. I don't much fancy starting from scratch again! But that's how it feels when I sit and look at any non trivial C++ code. All that OO and class stuff and I'll pretty much give you a blank look. Surprisingly my C is still ok, well syntactically, though I imagine my design capabilities have taken quite a hit too. Anyone had experience of something similar? Am I realistically looking at years to get back to being half decent again? Apart from much practice and reading anything I can usefully do to get up to speed again faster? Ideally I don't want to face being stuck with the career change I **mistakenly** made 8 years ago. Help!


Diplomatically point out the obvious problem in a product

As we all know, every software has bugs in it. It is matter of time to discover it. Suppose if you just found your product has potential big issue and it was not developed by you. How would you deal with it? I usually speak up with some data & analysis even if it is not my part of code. I am wondering if it is too offensive because I often faced on some resistance(depending on the issue), which would eventually be gone.


Is it OK for a function to modify a parameter

We have a data layer that wraps Linq To SQL. In this datalayer we have this method (simplified)               int InsertReport(Report report)     {         db.Reports.InsertOnSubmit(report);         db.SubmitChanges();         return report.ID;      }      On submit changes, the report ID is updated with the value in the database which we then return. From the calling side it looks like this (simplified)               var report = new Report();     DataLayer.InsertReport(report);     // Do something with report.ID      Looking at the code, ID has been set inside the InsertReport function as a kind of side effect, and then we are ignoring the return value. My question is, should I rely on the side effect and do something like this instead.               void InsertReport(Report report)     {         db.Reports.InsertOnSubmit(report);         db.SubmitChanges();     }      or should we prevent it               int InsertReport(Report report)     {         var newReport = report.Clone();         db.Reports.InsertOnSubmit(newReport);         db.SubmitChanges();         return newReport.ID;      }      maybe even               Report InsertReport(Report report)     {         var newReport = report.Clone();         db.Reports.InsertOnSubmit(newReport);         db.SubmitChanges();         return newReport;      }      This question was raised when we created a unit test and found that its not really clear that the report parameters ID property gets updated and that to mock the side effect behavior felt wrong, a code smell if you will.


Would this development environment cover the bases for iOS and Windows 8/Windows Phone 8 apps?

I'm an experienced C# developer. I've created a couple Windows Phone apps and a Windows 8 app but have wanted to develop for iOS too. What I'm thinking is adding the following equipment and software to make this possible:   1. MacBook Air - necessary to compile/deploy to Apple's App Store and for some development tasks, as well as tools like PaintCode   2. iPad Mini - less expensive and able to do double duty testing for both iPhone and iPad screens (Ideally I'd have the budget for a phone too, but not in the cards)   3. Xamarin Studio Business Edition - pricier but integrates into Visual Studio, which is my primary dev environment and also home to Win8/WP8 app code Basically, I'm just looking for a reality check. Is this overkill? Not enough? I know I could save a few hundred getting a Mac Mini, but have other uses for a laptop. Can I get by with the Indie version of Xamarin or am I crippling productivity by constantly switching environments? (As soon as I get the hardware I'll start by testing the free version to help answer that question).


Storing Projects on Google Drive (Cloud)

I've started using Google Drive for my cloud needs and backing up pretty much everything. I've got the app installed so it auto-sync's all my content in most things. My question is this, I am currently coding for iOS (although this applies to any coding project) and am split on storing my project files on Google Drive while using sync. My theory is that if I did use it, I'd never have to worry about system crashes or lost code before backups, but if I do use it it will be sync'ing a-lot and I thought there might be problems with it detecting changes and trying to sync for example half way through compiling. Bandwidth isn't an issue as I have fast connection and unlimited monthly allowance. Has anyone ever used this, or similar cloud-based sync'ing (dropbox etc) for this and knows whether it works or not or whether there are any potential problems etc.


Why has C prevailed over Pascal?

My understanding is that in the 1980s, and perhaps in the 1990s too, Pascal and C were pretty much head-to-head as production languages. Is the ultimate demise of Pascal only due to Borland's neglect of Delphi? Or was there more, such as bad luck or perhaps something inherently wrong with Pascal (any hopes for its revival?). I hope it's not an open, unanswerable question. I'm interested in historical facts and observations one can back up, rather than likes and dislikes. I also failed to find a duplicate question, which actually surprised me somewhat.


What parts of my configuration and my code should I not post?

When people post code on forums they tend to change or blur out parts of their code. Probably because they want to protect certain parts that might be exploited if it ends up in the wrong hands, I guess?   But is it really necessary to do this? Here are a couple of things I see a lot:   * Renaming id's and class names in html and css   * Renaming variables and functions in code   * Bluring out parts of a folder structure    * Changing stored procedure names and it's parameters   * Posting of example code rather than real code Passwords and connection strings to the DB are obvious things you shouldn't post but how a bout the rest? Is it ok to give out a DB name? Is there anything in the web.config you shouldn't post? How about the .htaccess file on Apache or a folder structure on the system, etc... Basically what I'm asking is which parts are safe to post and which are not?


Do you have any teamguidelines regarding exceptions?

My team recently inherited a project from a team where the amount of developers dropped so low they had to offload some work. One of the projects we inherited was a project littered with nested code, and awful exception handling (Exceptions were in effect handled as goto statements and thus used as a part of the normal program flow.). All in all it was a hairy code ball someone had been coughing up for a few years. Now we've been having a few team guidelines in place for quite some time, but all of the regards to the structures of objects, coding styles and what not. But we havn't covered exception handling. So I'm wondering if you have any guidelines in your teams regarding exception handling, and if so how you enforce them?


Is it bad practice to output from within a function?

For example, should I be doing something like:               <?php     function output_message($message,$type='success') {       ?>       <p class="<?php echo $type; ?>"><?php echo $message; ?>
       <?php     }     output_message('There were some errors processing your request','error');     ?>      or               <?php     function output_message($message,$type='success') {       ob_start();       ?>       <p class="<?php echo $type; ?>"><?php echo $message; ?>
       <?php       return ob_get_clean();     }     echo output_message('There were some errors processing your request','error');     ?>      I understand they both achieve the same end result, but are there benefits doing one way over the other? Or does it not even matter?


Ruby and Enterprise. Any future?

After Heroku acquisition by SalesForce, is there any chance for Ruby being adopted in enterprise development?   If you know any good examples already, please point to them.


ODBC Lic Restrictions / Need way around limitation here are me thoughts? What do you suggest?

We are currently using an old legacy ERP system (Thoroughbred) that we have been bolting on functionality by means of web apps we design in house. I interact with the legacy system via ODBC and have to pay on a per connection base via Licenses. I would like to build in intermediate system that would take the sql requests and process them so that any of our apps could just connect to it to avoid the lic issue. What would be the best way to build this adapter. I was thinking a web service but to be honest I am not even sure technically what a web service is. I envision that it just takes in requests and "does stuff" with the data and then returns results back to the requester. Sorry about being vague but like I said, I don't have a lot of experience working with web services. Maybe a web service isn't the best way to handle it and I should come at the problem from another direction. My current strengths are Python and turbogears so if I can stay within my comfort zone it's a plus but is not a requirement. Thanks for any and all input!


Seeking Windows file compare which accepts directories and filters for source code only

There are some good free file compare programs out there and most of them will compare directories too. But what I am look for is one where I can specify a filter like *.cpp and have it ignore object files, makefiles, executables, etc without me having to manually remove those before compare. Any suggestions?


Recommended guidelines for Mercurial setups

I've just recently installed mercurial, and have been playing around it with. Overall, it seems like a great way to do version control. However, the distributed nature of its architecture makes it _so_ flexible, I'm not really sure what the ideal configuration/topology is. I'm well aware that asking something like "what is the ideal Mercurial topology" will never get a meaningful answer without more specific details ranging from business requirements, number of developers, security concerns, nature of the project, etc. However, are there any general guidelines or "best-practices" when it comes to setting up a Mercurial system? In particular, I'm interested in hearing if most companies/projects setup a centralized, "canonical" repository. Mercurial doesn't require that you do this, and you could essentially say _anything_ is the "canonical" repository. (Perhaps you could consider the lead developer's working repository the "canonical" one.) But is it generally a good idea to setup a dedicated "source control" server which simply hosts the canonical repository, so every developer can clone it and work locally? Or is this unnecessary?


Not copyrighting code and then reusing functions later

I'm coding something for my job to copy directories and then use regex to make all the filenames uniform. I'm an undergrad student programmer for my university and I'm not sure what a professional coder would consider reasonable in this case. My job is mostly to implement mathematical research. The current assignment is outside what I've been doing and seems like it would be really useful to have some of the functions available in case I (most likely) encounter a similar assignment at some point in my career in the future. It's going to be really useful because the current filenames are so screwed right now that the admin assistants can't really keep up (and even trying to do so might just cause more human error). I'm thinking that it may not overall be useful outside the current assignment because the regex will be so customised to the way the file are incorrectly named. I'm wondering if this is simple work for a pro coder, and therefore I'm making this program to be much more important in my head than it actually is, or if this is something that a coder would really want to copyright or otherwise retain the ability to use this whenever and wherever else they feel like. They've already told me that there is no question that I'll be given credit for the work, which I'm excited about. My only concern was whether I should be thinking about reusing this code later or if this task is so generic that a pro coder would laugh about keeping the rights to such code. This thread was interesting but seems different from my situation: How can I reuse generic code for consulting between companies? EDIT: Florida, USA


What is an "assertion framework"?

I was reading about the js-test-driver unit-testing framework, when I found out that the guys behind the framework intend it to be integrated with an assertion framework. What is an assertion framework? Is it a kind of unit- testing framework? If it is the case what is specific to such frameworks?