Obtain reference to Parent object during instantiation

I have a situation where a custom class is a property of another class. What i need to be able to do, if it is possible at all, is obtain a reverse to the "parent" class (ie the the class that holds the current class as a property). ### For Instance:               Public Class Class1       ...       public readonly property Prop11 as Class2       public property Prop12 as String       ...     End Class          Public Class Class2       ...       private _par as Class1       private _var21 as string       ...       Public Sub New(...)         me._par = ????         ...       End Sub       public readonly property Prop21 as string         Get           return me._par.Prop12 & me._var21         End Get       End Property       ...     End Class      Ultimately, i am trying to access other properties within `Class1` from `Class2` as they do have substance for information from within `Class2`. There are several other classes within `Class1` that provide descriptive information to other classes contained within it as properties but the information is not extensible to all of the classes through Inheritance, as `Class1` is being used as a resource bin for the property classes and the application itself. ### Diagram, lazy design ;):               Application <- Class1.Prop12     Application <- Class1.Prop11.Prop21      ### Question:   1. Is it possible to get a recursion through this design setup?


SQL language drawbacks, The Third Manifesto

Sometime ago I read about SQL language drawbacks (the basic language specification, not vendor specific), and one of the drawbacks was that the language does not allow to create a set of tuples that don't come from a table.   For instance,               SELECT firstName, lastName from people;      this creates a set of tuples coming from the table `people`. Now, if I don't have this table `people`, and I want to return a constant, I'd need something like this to return a set of two tuples (this would not require to have a table):               SELECT VALUES('james', 'dean'), ('tom', 'cruisse');      Why I would need that?   Because of the same reasons that we can define constants (not only basic types, but objects and arrays also) in any advanced programming language. Workarounds,   Yes, I could create a temporal table, fill the data, and SELECT from that table. This is a hack, to overcome the drawbacks of the poor SQL language. I think that I read about this somewhere in "The Third Manifesto",   but I don't find the paragraph/example talking about this concrete drawback anymore. Do you know a reference about it?


In the BDD paradigm why should the "ubiquitous language" be merely semi-formal and not completely formal?

Here's the relevant quote: > A common risk with software development includes communication breakdowns > between Developers and Business Stakeholders. BDD uses the specification of > desired behavior as a ubiquitous language for the project team members. This > is the reason that BDD insists on a semi-formal language for behavioral > specification: some formality is a requirement for being a ubiquitous > language. In addition, having such a ubiquitous language creates a domain > model of specifications, so that specifications may be reasoned about > formally. I'm thinking an actual formal rigorous "language" that has a grammar and compiler could be useful for, say, auto-generating test stubs from specs or for guaranteeing that specs have certain properties (consistently named nouns and verbs, etc.). In the BDD paradigm, then, why should the "ubiquitous language" be merely semi-formal and not completely formal/rigorous?


Project estimation with increasing requirements

Making a project estimation with given a requirements set is one thing. But, what happens when the user suddenly starts changing them on the fly and starts adding new requirements to the already defined set? And even goes to an extent to be mad about why the project is not finished in the originally planned time frame. How should I deal with these situations? Proposing some methodologies and readings could be helpful.


Test-Driven Design is not Unit Testing

Ran across this statement by Martin Fowler circa 2002: > Unit testing in XP is often unlike classical unit testing, because in XP > you're usually not testing each unit in isolation. You're testing each class > and its immediate connections to its neighbors. Is this still correct, and if so, why?


how to do vector ops on a "vector <string> item" C++

I am trying to work on an array of strings (char **) where I am trying to use the C++ paradigm of "vector device_names". After parsing an input string for matching pos/neg entries, I want to sort the final lists, but attempts to sort the final list seem to be thinking I want to sort the characters in some item of the list. Code to illustrate this is:               struct ds_matches {         vector <string> positive_matches;         vector <string> negative_matches;         bool include_unspecified;     };     typedef struct ds_matches DS_Matches;          void ds_make_matches(DS_Matches &matches, const char * match_config) {         vector <string> tmp_intfs;         tmp_intfs.reserve(32);         int nmatches = split( tmp_intfs, match_config, " ", 32, 32);         matches.positive_matches.reserve(nmatches);         matches.negative_matches.reserve(nmatches);         for (auto st:tmp_intfs) {             if(st[0] == '-') {                 matches.negative_matches.push_back((string){st,1,st.size()-1});                 matches.include_unspecified = 1;             } else {                 matches.positive_matches.push_back(st);                 matches.include_unspecified = 0;             }         }         // sort intf lists for faster runtime lookup         // if runtime search is costly, might convert to a hash here         if (matches.negative_matches.size()>1)              sort(matches.negative_matches.begin(),                  matches.negative_matches.end(), matches.negative_matches);         if (matches.positive_matches.size()>1)              sort(matches.positive_matches.begin(),                  matches.positive_matches.end(), matches.positive_matches);     }      I've tried a few syntax permutations on the sort statement, but each permutation has come up with a different reason for why it is wrong -- many thinking I'm trying to sort characters. Line 280 in my code (mentioned in all the error messages below) is the continuation line of the 1st "sort".                   g++: COMPILE util.cc, linux/netmeter.cc     In file included from /usr/include/c++/4.8/algorithm:62:0,                                      from util.cc:16:     /usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >, std::__debug::vector<std::basic_string<char> > >; _Compare = std::__debug::vector<std::basic_string<char> >]’:     /usr/include/c++/4.8/bits/stl_algo.h:2250:70:   required from ‘void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >, std::__debug::vector<std::basic_string<char> > >; _Compare = std::__debug::vector<std::basic_string<char> >]’     /usr/include/c++/4.8/bits/stl_algo.h:5514:55:   required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >, std::__debug::vector<std::basic_string<char> > >; _Compare = std::__debug::vector<std::basic_string<char> >]’     util.cc:280:61:   required from here     /usr/include/c++/4.8/bits/stl_algo.h:2183:29: error: no match for call to ‘(std::__debug::vector<std::basic_string<char> >) (std::basic_string<char>&, std::basic_string<char>&)’             if (__comp(*__i, *__first))                                                              ^     /usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >, std::__debug::vector<std::basic_string<char> > >; _Compare = std::__debug::vector<std::basic_string<char> >]’:     /usr/include/c++/4.8/bits/stl_algo.h:5363:59:   required from ‘void std::partial_sort(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >, std::__debug::vector<std::basic_string<char> > >; _Compare = std::__debug::vector<std::basic_string<char> >]’     /usr/include/c++/4.8/bits/stl_algo.h:2355:68:   required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >, std::__debug::vector<std::basic_string<char> > >; _Size = long int; _Compare = std::__debug::vector<std::basic_string<char> >]’     /usr/include/c++/4.8/bits/stl_algo.h:5513:44:   required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >, std::__debug::vector<std::basic_string<char> > >; _Compare = std::__debug::vector<std::basic_string<char> >]’     util.cc:280:61:   required from here     /usr/include/c++/4.8/bits/stl_algo.h:1972:27: error: no match for call to ‘(std::__debug::vector<std::basic_string<char> >) (std::basic_string<char>&, std::basic_string<char>&)’         if (__comp(*__i, *__first))                                                          ^     /usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘void std::__move_median_first(_Iterator, _Iterator, _Iterator, _Compare) [with _Iterator = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >, std::__debug::vector<std::basic_string<char> > >; _Compare = std::__debug::vector<std::basic_string<char> >]’:     /usr/include/c++/4.8/bits/stl_algo.h:2318:68:   required from ‘_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >, std::__debug::vector<std::basic_string<char> > >; _Compare = std::__debug::vector<std::basic_string<char> >]’     /usr/include/c++/4.8/bits/stl_algo.h:2360:62:   required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >, std::__debug::vector<std::basic_string<char> > >; _Size = long int; _Compare = std::__debug::vector<std::basic_string<char> >]’     /usr/include/c++/4.8/bits/stl_algo.h:5513:44:   required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >, std::__debug::vector<std::basic_string<char> > >; _Compare = std::__debug::vector<std::basic_string<char> >]’     util.cc:280:61:   required from here     /usr/include/c++/4.8/bits/stl_algo.h:110:28: error: no match for call to ‘(std::__debug::vector<std::basic_string<char> >) (std::basic_string<char>&, std::basic_string<char>&)’                  if (__comp(*__a, *__b))                                                             ^     /usr/include/c++/4.8/bits/stl_algo.h:112:25: error: no match for call to ‘(std::__debug::vector<std::basic_string<char> >) (std::basic_string<char>&, std::basic_string<char>&)’             if (__comp(*__b, *__c))                                                      ^     /usr/include/c++/4.8/bits/stl_algo.h:114:30: error: no match for call to ‘(std::__debug::vector<std::basic_string<char> >) (std::basic_string<char>&, std::basic_string<char>&)’             else if (__comp(*__a, *__c))                                                                 ^     /usr/include/c++/4.8/bits/stl_algo.h:117:33: error: no match for call to ‘(std::__debug::vector<std::basic_string<char> >) (std::basic_string<char>&, std::basic_string<char>&)’                  else if (__comp(*__a, *__c))                                                                      ^     /usr/include/c++/4.8/bits/stl_algo.h:119:33: error: no match for call to ‘(std::__debug::vector<std::basic_string<char> >) (std::basic_string<char>&, std::basic_string<char>&)’                  else if (__comp(*__b, *__c))                                                                      ^     /usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&, _Compare) [with _RandomAccessIterator = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >, std::__debug::vector<std::basic_string<char> > >; _Tp = std::basic_string<char>; _Compare = std::__debug::vector<std::basic_string<char> >]’:     /usr/include/c++/4.8/bits/stl_algo.h:2319:78:   required from ‘_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >, std::__debug::vector<std::basic_string<char> > >; _Compare = std::__debug::vector<std::basic_string<char> >]’     /usr/include/c++/4.8/bits/stl_algo.h:2360:62:   required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >, std::__debug::vector<std::basic_string<char> > >; _Size = long int; _Compare = std::__debug::vector<std::basic_string<char> >]’     /usr/include/c++/4.8/bits/stl_algo.h:5513:44:   required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >, std::__debug::vector<std::basic_string<char> > >; _Compare = std::__debug::vector<std::basic_string<char> >]’     util.cc:280:61:   required from here     /usr/include/c++/4.8/bits/stl_algo.h:2287:35: error: no match for call to ‘(std::__debug::vector<std::basic_string<char> >) (std::basic_string<char>&, const std::basic_string<char>&)’             while (__comp(*__first, __pivot))                                                                          ^     /usr/include/c++/4.8/bits/stl_algo.h:2290:34: error: no match for call to ‘(std::__debug::vector<std::basic_string<char> >) (const std::basic_string<char>&, std::basic_string<char>&)’             while (__comp(__pivot, *__last))                                                                         ^     In file included from /usr/include/c++/4.8/bits/stl_algo.h:61:0,                                      from /usr/include/c++/4.8/algorithm:62,                                      from util.cc:16:     /usr/include/c++/4.8/bits/stl_heap.h: In instantiation of ‘void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >, std::__debug::vector<std::basic_string<char> > >; _Distance = long int; _Tp = std::basic_string<char>; _Compare = std::__debug::vector<std::basic_string<char> >]’:     /usr/include/c++/4.8/bits/stl_heap.h:448:15:   required from ‘void std::make_heap(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >, std::__debug::vector<std::basic_string<char> > >; _Compare = std::__debug::vector<std::basic_string<char> >]’     /usr/include/c++/4.8/bits/stl_algo.h:1970:47:   required from ‘void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >, std::__debug::vector<std::basic_string<char> > >; _Compare = std::__debug::vector<std::basic_string<char> >]’     /usr/include/c++/4.8/bits/stl_algo.h:5363:59:   required from ‘void std::partial_sort(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >, std::__debug::vector<std::basic_string<char> > >; _Compare = std::__debug::vector<std::basic_string<char> >]’     /usr/include/c++/4.8/bits/stl_algo.h:2355:68:   required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >, std::__debug::vector<std::basic_string<char> > >; _Size = long int; _Compare = std::__debug::vector<std::basic_string<char> >]’     /usr/include/c++/4.8/bits/stl_algo.h:5513:44:   required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >, std::__debug::vector<std::basic_string<char> > >; _Compare = std::__debug::vector<std::basic_string<char> >]’     util.cc:280:61:   required from here     /usr/include/c++/4.8/bits/stl_heap.h:313:40: error: no match for call to ‘(std::__debug::vector<std::basic_string<char> >) (std::basic_string<char>&, std::basic_string<char>&)’                     *(__first + (__secondChild - 1))))                                                                                ^     /usr/include/c++/4.8/bits/stl_heap.h: In instantiation of ‘_Distance std::__is_heap_until(_RandomAccessIterator, _Distance, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >; _Distance = long int; _Compare = std::__debug::vector<std::basic_string<char> >]’:     /usr/include/c++/4.8/bits/stl_heap.h:113:55:   required from ‘bool std::__is_heap(_RandomAccessIterator, _Compare, _Distance) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >; _Compare = std::__debug::vector<std::basic_string<char> >; _Distance = long int]’     /usr/include/c++/4.8/bits/stl_heap.h:124:76:   required from ‘bool std::__is_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >; _Compare = std::__debug::vector<std::basic_string<char> >]’     /usr/include/c++/4.8/bits/stl_heap.h:501:7:   required from ‘void std::sort_heap(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >, std::__debug::vector<std::basic_string<char> > >; _Compare = std::__debug::vector<std::basic_string<char> >]’     /usr/include/c++/4.8/bits/stl_algo.h:5364:47:   required from ‘void std::partial_sort(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >, std::__debug::vector<std::basic_string<char> > >; _Compare = std::__debug::vector<std::basic_string<char> >]’     /usr/include/c++/4.8/bits/stl_algo.h:2355:68:   required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >, std::__debug::vector<std::basic_string<char> > >; _Size = long int; _Compare = std::__debug::vector<std::basic_string<char> >]’     /usr/include/c++/4.8/bits/stl_algo.h:5513:44:   required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::__cxx1998::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > >, std::__debug::vector<std::basic_string<char> > >; _Compare = std::__debug::vector<std::basic_string<char> >]’     util.cc:280:61:   required from here     /usr/include/c++/4.8/bits/stl_heap.h:94:50: error: no match for call to ‘(std::__debug::vector<std::basic_string<char> >) (std::basic_string<char>&, std::basic_string<char>&)’             if (__comp(__first[__parent], __first[__child]))                                                                                ^      FWIW.. I'm beginning to think the comment should add "inability to figure out sort syntax" as another possible reason for going to a map-based algorithm... Amazing how 1 line can generate so many competing error messages... _arg!_ How do I differentiate between operations called on the vector, vs. a string in the vector. I had (naively) assumed that to invoke an operation on a string in the array, I would need to use some "specifier" like the 'auto' in the 'for' loop before, or brackets for a particular element. But, apparently not so... Clue sticks appreciated!


How does key-based caching work?

I recently read an article on the 37Signals blog and I'm left wondering how it is that they get the cache key. It's all well and good having a cache key that includes the object's timestamp (this means that when you update the object the cache will be invalidated); but how do you then use the cache key in a template without causing a DB hit for the very object that you are trying to fetch from the cache. Specifically, how does this affect One to Many relations where you are rendering a Post's Comments for example. Example in Django:               {% for comment in post.comments.all %}        {% cache comment.pk comment.modified %}          <p>{{ post.body }}</p>        {% endcache %}     {% endfor %}      Is caching in Rails different to just requests to memcached for example (I know that they convert your cache key to something different). Do they also cache the cache key?


How to update last accessed with Forms Authentication cookie

I've got an MVC 4 site where I'm using Forms Authentication. I'm setting a cookie when a user logs in. The majority of my site does NOT require a user to be logged in though. What I'd like to do, whenever a user FIRST accesses my site, I'd like to update my "LastLogon" that I have stored in my database table to the corresponding value (if Request.IsAuthenticated). But I don't want it to fire on EVERY page that the user accesses. So, where do I track when the user first accesses my site? Is that in the Global.asax? Is Application_Start method for all first requests to a site, or is that when the website first loads after an iisreset?


Lisp popularity on the rise. Anyone know why? Seen this first hand?

I recently found this article/table: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html It shows a big rise in Lisp's popularity. Does anyone know more about this? What applications is it gaining popularity in? Are there more Lisp jobs out there lately? Why isn't there a similar increase in Scheme? I am an enthusiast of Lisp and Scheme so I'm excited to see this. I've never used them professionally but I'd love to oppurtunity to. If anyone knows more about this I'd love to hear it.


How are some IEEE 754 floats printed succinctly?

Using this calculator, I can see how the decimal ".8" and the expression ".7 + .1" have different representations:               .8      = 1.1001100110011001100110011001100110011001100110011010 *2-1     .7 + .1 = 1.1001100110011001100110011001100110011001100110011001 *2-1                                                                   ^^        But what mechanism causes "0.8" to be printed for the top value? E.g. `alert(.8)` in JavaScript. Why does it not print something like "0.800000011920929"? Is this a feature of IEEE 754 or the programming language implementing it?


When to distinguish OS versions in canonical names for target platforms

I would like to organize my company's software releases by platform. I've looked at how Mozilla, Perforce, and Apache organize their releases, and it seems that I should partition by OS and processor architecture. I was thinking of something like this:   * Linux (x86-32)   * Linux (x86-64)   * Neutrino (x86-32)   * Windows (x86-32)   * Windows (x86-64) Is it common to distinguish between versions of Windows, Linux, or OS X? For example, should I be specifying the Linux kernel version?


Data Transformation Pipeline

I have create some kind of data pipeline to transform coordinate data into more useful information. Here is the shell of pipeline:               public class PositionPipeline     {         protected List<IPipelineComponent> components;              public PositionPipeline()         {             components = new List<IPipelineComponent>();         }              public PositionPipelineEntity Process(Position position)         {             foreach (var component in components)             {                 position = component.Execute(position);             }                  return position;         }              public PositionPipeline RegisterComponent(IPipelineComponent component)         {             components.Add(component);             return this;         }     }      Every `IPipelineComponent` accepts and returns the same type - a `PositionPipelineEntity`. Code:               public interface IPipelineComponent     {         PositionPipelineEntity Execute(PositionPipelineEntity position);     }      The `PositionPipelineEntity` needs to have many properties, many which are **unused in certain components** and **required in others**. Some properties will also have become redundant at the end of the pipeline. For example, these components could be executed:   1. `TransformCoordinatesComponent`: Parse the raw coordinate data into a Coordinate type.    2. `DetermineCountryComponent`: Determine and stores country code.   3. `DetermineOnRoadComponent`: Determine and store whether coordinate is on a road. Code:               pipeline         .RegisterComponent(new TransformCoordinatesComponent())         .RegisterComponent(new DetermineCountryComponent())         .RegisterComponent(new DetermineOnRoadComponent());          pipeline.Process(positionPipelineEntity);      The `PositionPipelineEntity` type:               public class PositionPipelineEntity     {         // Only relevant to the TransformCoordinatesComponent          public decimal RawCoordinateLatitude { get; set; }              // Only relevant to the TransformCoordinatesComponent          public decimal RawCoordinateLongitude { get; set; }              // Required by all components after TransformCoordinatesComponent          public Coordinate CoordinateLatitude { get; set; }              // Required by all components after TransformCoordinatesComponent          public Coordinate CoordinateLongitude { get; set; }              // Set in DetermineCountryComponent, not required anywhere.           // Requires CoordinateLatitude and CoordinateLongitude (TransformCoordinatesComponent)         public string CountryCode { get; set; }              // Set in DetermineOnRoadComponent, not required anywhere.           // Requires CoordinateLatitude and CoordinateLongitude (TransformCoordinatesComponent)         public bool OnRoad { get; set; }     }      **Problems:**   * I'm very concerned about the dependency that a component has on properties. The way to solve this would be to create specific types for each component. The problem then is that I cannot chain them together like this.    * The other problem is the order of components in the pipeline matters. There is some dependency. The current structure does not provide any static or runtime checking for such a thing. Any feedback would be appreciated.


Desktop GUI loading slow

I am developing desktop based GUI (single form) using wxPython and loads it using remote citrix access from client private network. Suppose, the GUI has certain group of select and text boxes which are loaded together when application starts. The value of select boxes come from database and on the basis of selection of select box value, corresponding text boxes (which are initially blank) are populated from database. Now the problem is, due to slow remote access, we have to wait for long time (approximately 5-7 minutes ) before all controls are loaded. Is there any suggestion, if we can reduce this time ? One way coming in first thought is to divide the GUI in multiple tabs and divide the controls among tabs. This way I need to load less controls when application starts for showing first tab. Other controls load, only after user click corresponding tab. Any other way or this one is the best approach?


Term for unit testing that separates test logic from test result data

So I'm not doing any unit testing. But I've had an idea to make it more appropriate for my field of use. Yet it's not clear if something like this exists, and if, how it would possibly be called. * * * Ordinary unit tests combine the test logic and the expected outcome. In essence the testing framework only checks for booleans (did this match, did the expected result result). To generalize, the test code itself references the audited functions, and also explicites the result values like so:               unit::assert(  test_me() == 17  )      What I'm looking for is a separation of concerns. The test itself should only contain the tested logic. The outcome and result data should be handled by the unit testing or assertion framework. As example:               unit::probe(   test_me()   )      Here the `probe` actually doubles as collector in the first run, and afterwards as verification method. The expected `17` is not mentioned in the test code, but stored or managed elsewhere. How is this scheme called? Or how would you call it? I hope I can find some actual implementations with the proper terminology. * * * Obviously such a pattern is unfit for TDD. It's strictly for regression testing. Also obviously, it cannot be used for all cases. Only the simpler test subjects can be analyzed that way, for anything else the ordinary unit test setup and assertion steps are required. And yes, this could be manually accomplished by crafting a ResultWhateverObject, but that would still require hardwiring that to the test logic.   Also keep in mind that I'm inquiring for use with scripting languages, and not about Java. I'm aware that the xUnit pattern originates there, and why it's hence as elaborate as it is. Btw, I've discovered one test execution framework which allows for shortening simple test notations to:               test_me();   // 17      While thus the result data is no longer coded in (it's a comment), that's still not a complete separation and of course would work only for scalar results.


Difference between software inspection and verification

I was reading about software inspection in Software Engineering by Ian Summerville and I came across the term Software inspection and I started reading about it on Wikipedia. I am unable to understand what is the difference between verification and software inspection?


Inexpensive generation of hierarchical unique IDs

My application is building a hierarchical structure like this:               root = {        'id': 'root',       'children': [ {         'name': 'root_foo',         'children': []       }, {         'id': 'root_foo2',         'children': [ {           'id': 'root_foo2_bar',           'children': []           } ]       } ]     }      in other words, it's a tree of nodes, where each node might have child elements and unique identifier I call "id". When a new child is added, I need to generate a unique identifier for it, however I have two problems:   * _identifiers are getting too long_   * _adding many children takes slower, as I need to find first available id_ My requirement is:   * _naming of a child X must be determined only from the state in their ancestors_   * _When I re-generate tree with same contents, the IDs must be same_ or in other words, when we have nodes A and B, creating child in A, must not affect the name given to children of B. I know that one way to optimize would be to introduce counter in each node and append it to the names which will solve my performance issue, but will not address the issue with the "long identifiers". **Could you suggest me the algorithm for quickly coming up with new IDs?**


What is the best approach for inline code comments?

We are doing some refactoring to a 20 years old legacy codebase, and I'm having a discussion with my colleague about the comments format in the code (plsql, java). There is no a default format for comments, but in most cases people do something like this in the comment:               // date (year, year-month, yyyy-mm-dd, dd/mm/yyyy), (author id, author name, author nickname) and comment      the proposed format for future and past comments that I want is:               // {yyyy-mm-dd}, unique_author_company_id, comment      My colleague says that we only need the comment, and must reformat all past and future comments to this format:               // comment      My arguments:   * I say for maintenance reasons, it's important to know when and who did a change (even this information is in the SCM).   * The code is living, and for that reason has a history.   * Because without the change dates it's impossible to know when a change was introduced without open the SCM tool and search in the long object history.   * because the author is very important, a change of authors is more credible than a change of authory   * Agility reasons, no need to open and navigate through the SCM tool   * people would be more afraid to change something that someone did 15 years ago, than something that was recently created or changed.   * etc. My colleague's arguments:   * The history is in the SCM   * Developers must not be aware of the history of the code directly in the code   * Packages gets 15k lines long and unstructured comments make these packages harder to understand What do you think is the best approach? Or do you have a better approach to solve this problem?


Rationale behind freeware projects

I've seen some freeware projects in the past where the author(s) invested a significant amount of their personal time and resources and never even considered charging for the software. A lot of these projects were donation based, and from what I've heard, donationware can never be a viable business model (even to simply support development costs) because most people choose not to donate if given an option. A lot of these projects eventually shut down because their authors could not sustain them further. Granted, some people simply like making the community happy (or something), but if you're struggling to keep your project alive, why not charge some small amount such as $10 simply to stay operational? If people find your software useful (and a lot of people found those projects VERY useful) they won't have a problem paying such a small amount. The question is: if you have a popular app that people like and download in great numbers, why not put a price tag on it? Why do it for free?


Do path-finding algorithms have practical use outside of game development?

I'm interested to know if heuristic-based path-finding algorithms such as A* have any real world practical use outside the realm of game development. Are there any other fields of software engineering that employ path-finding algorithms, perhaps in a completely different or unconventional way, or is it by the nature of those algorithms and their design that they ultimately see very limited use in other areas?


Is it a bad idea to get a Master's and Bachelor's Degree from the same university?

I'm getting close to graduation and am strongly considering continuing to a Master's Program. My long-term goal for the future is to stay in industry rather than pursuing a Ph.D/Academic career. While communicating these thoughts with some of my peers, I've been told that staying in the same University for both a Bachelor's and Master's degree is ill-advisable. The reasons seem to be based along the lines of lack of exposure to other opportunities, programs, and faculty. My question is, if I intend to pursue a career outside of the Ph.D/Academic spectrum, will staying at the same university for my master's really decrease my value in software related positions? If so (or if not), why?


iphone app- is it possible to invoke a local app after user visits a website or a web app

I have a scenario where a local app is used to take snaps using the iphone camera and the local app can send the photo to a web server... Now when the user visits a website or another web app using his iphone, then the website/webapp invokes the local app to do its work. Do security/other restrictions on iphone prevent such a scenario from being implemented? Can I create a local app with the above scenario in mind? Is there something I should be aware of, before I start creating such an app? And should the user visit a web app or a website, so that the local app is correctly invoked to do its job?


Do you use ReSharper full time, or only enable it when needed?

Based on a multitude of questions related to temporarily disabling ReSharper, and also on certain research data, I can see that a considerable share of ReSharper users have it disabled most of the time. They tend to enable it for a limited period of time (say, several hours), do whatever they need to do using its functionality, and disable it back until the next time they feel they need to use it. If you're using ReSharper (or other similar VS extensions, to that matter) in such occasional manner, can you clarify why you're doing this? Is your behavior based on performance, or other considerations? What kinds of tasks do you enable ReSharper for in this scenario?


Accuracy in calculating distance from Android Device using double integral?

Using `TYPE_LINEAR_ACCELERATION` suppose I found out that the device is moving at 4 m/s².               a(t)=s"(t)=+4     v(t)=∫4tdt     s(t)=2/3t³     s(3)=18m      How much accurate it would be?


How to use source control in Data analysis?

I am currently in a Data analaysis job and I am using mainly SPSS (Statistics) and a rather unknown scripting language to make nice tables. My problem is, that there are multiple script files for both programs with thousands of lines of code. Currently, they are copied each month to a new folder, modified as needed and executed. Predictabely, there are a lot of copy and paste errors and searching for the start of an error is a huge pain. I was thinking about source control, but I am not really familiar which one meetes the following criteria: 1\. checkin from the windows explorer or Notepad++ 2\. Committing to the same project from different folders. 3\. Has anybody good ideas or best practice suggestions? I am using a little bit SVN for several small C# programs - but is there a better tool for Source code management under theese circumstances?


Client–server models and Client-centric models

For distributed applications, emphasis mine: > Where classic software systems of the past century were mostly based on > **Client–server models** and **Client-centric application** development, > **both ultimately run on one single computer, be it the client computer or > the server.**   1. I understand what client-server models are, but I was wondering what client-centric model is?   2. How shall one understand that "both ultimately run on one single computer, be it the client computer or the server"? Does this apply to both client-server models and client-centric models?


Writing a TCP protocol or use HTTP for file transfer?

I want to write a server side application which allows several users to exchange files (not above 3MB) in the following way: user A connects to (server) S. User B connects to S. User C connects S. User A sends a file. Users B and C "see" that a file was/is being uploaded and start downloading it. My main concern is responsiveness. I want the file to arrive at B and C not long after A started uploading. I thought of doing it using HTTP: user A sends raw bytes to the server and the server saves the file locally. At this point users B and C see that a file was uploaded and start downloading it. My question: is HTTP the best way to go here? Or should I write an app that uses TCP sockets, and write my own protocol? If I go with sockets. How can I estimate the RAM requirements of the VPS so that I can allow N file-transfer connections simultaneously?


How can dev teams prevent slow performance in consumer apps?

When I previously asked what's responsible for slow software, a few answers I've received suggested it was a social and management problem: > This isn't a technical problem, it's a marketing and management problem.... > Utimately, the product mangers are responsible to write the specs for what > the user is supposed to get. Lots of things can go wrong: The product > manager fails to put button response in the spec ... The QA folks do a > mediocre job of testing against the spec ... if the product management and > QA staff are all asleep at the wheel, we programmers can't make up for that. > —Bob Murphy > > People work on good-size apps. As they work, performance problems creep in, > just like bugs. The difference is - bugs are "bad" - they cry out "find me, > and fix me". Performance problems just sit there and get worse. Programmers > often think "Well, my code wouldn't have a performance problem. Rather, > management needs to buy me a newer/bigger/faster machine." The fact is, if > developers periodically just hunt for performance problems (which is > actually very easy) they could simply clean them out. —Mike Dunlavey So, if this is a social problem, what social mechanisms can an organization put into place to avoid shipping slow software to its customers?


Automatic sorting of class/module members and its possible impact on productivity and code quality

Recently I saw some possibilities of some IDEs (via plugins) to sort members of their classes/modules based on some criteria, sou you could have everything sorted automaticaly no matter where you would put the elements in time of writing it to editor. Do you think that this kind of sorting in class/module may have positive impacts on productivity, readability, comprehensibility etc?


Writing use cases for a rather complex scenario

I'm trying to improve my use-case writing skills but I'm stuck on a certain scenario. The idea is that there are a bunch of entries in a task list (some kind of todo list). Now the user wishes to process the list (divide it amongst other lists). He can do this by answering a series of questions / completing extra data. Based on the choices of the user the system perform different actions on the task. I'm really confused on how to write this down in a use case. What I was thinking is something like (I'm only writing down the main success scenario):               Use Case: Process Inbox     Primary Actor: User              1. User indicates he/she wants to sort his/her inbox     2. System presents the next question and provides possible actions     3. User makes choice          _steps 2-3 get repeated until inbox is empty_      The problem with this is that it's not specific enough so something else I was thinking of is to make sub use-cases for all the different steps in the question process like:               Use Case: Handle Project     Level: Sub Use-case     Primary Actor: System              1. System requests additional information (description, due date) from user.     2. User completes data     3. System classifies the task as a Project      What I'm puzzled about here is:   * How to include this sub use-case in my main scenario in a proper way   * How to indicate that after this action, the user starts again from step 2 in the main use case. I was thinking of using extensions in which I include the different sub use- cases but it's getting pretty confusing. So to bundle this request into one question: Can someone clear up how you would usually tackle this kind of scenarios and/or provide me a basic possible solution for this example? Thanks in advance ;) If anyone is interested, the flowchart of questions I'm intending to use is from David Allen's book Getting Things Done: link to diagram


Why is C++ known as 'premature optimizaton'?

"Programming in C++ is premature optimization" Why ~~does everyone~~ do some people say this?


Why develop free, open source programs?

Why would someone use his own time to develop an open-source project for free and without compensation?


What is the economic rationale for focusing on free, open source projects?

> **Possible Duplicate:**   >  Why programming open source? I'm having trouble understanding why people dedicate their time to an open source project that's free as in beer instead of focusing on a closed source, paid project. Closed source projects seem to be more commercially viable, so why do programmers open source their code and make it free when there are commercial opportunities for it?


What made you contribute to that open source project?

I'm interested in real experience and personal answers not just those standard worn out "benefits of contributing to open source" that we all memorized by heart by now. I've met many people who contribute to open source project and almost never did this topic come up: why did they contribute to this open source project. So, if you've contributed to an open source project before in any way, can you please pause for a second and try to remember what really made you decide to contribute to that particular project. Was it a random decision, was it because you were bored, was it because the company you worked for was already using it and you contributed as part of your job, was it because the project was too big you wanted to get contracts, or the project was too small you wanted to build it, or because your prof or co-worker asked you to help with his open source project, or..... To substantiate your reasons, please mention the project name and rate your involvement (heavy, occasional, light, once).


Do I need to contact a lawyer to report a GPL violation in software distributed on Apple's App Store?

Some company is selling software through Apple's App Store which uses portions of code that I released publicly under the GPL. The company is violating the licensing terms in two ways, by (1) not preserving my copyright statement, and not releasing their code under the GPL license and (2) by distributing my GPL- licensed code through Apple's App Store. (The Free Software Foundation has made clear that the terms of the GPL and those of the App Store are incompatible.) I want to report this to Apple, and ask that they take appropriate action. I have tried mailing them to ask for more information about the reporting process, and have received the automated reply quoted below. The last point in the list of things one needs to provide, the “a statement by you, made under penalty of perjury,” sounds as if they mean some kind of specific legal document. I'm not sure. Does this mean I need to contact a lawyer just to file the report? I'd like to avoid going through that hassle if at all possible. (Besides an answer to this specific question, I'd welcome comments and experience reports from anyone who has already had to deal with a GPL violation on Apple's App Store.) > Thank you for contacting Apple's Copyright Agent. If you believe that your > work has been copied in a way that constitutes infringement on Apple’s Web > site, please provide the following information: > >   * an electronic or physical signature of the person authorized to act on > behalf of the owner of the copyright interest; >   * a description of the copyrighted work that you claim has been infringed; >   * a description of where the material that you claim is infringing is > located on the site; your address, telephone number, and email address; >   * a statement by you that you have a good faith belief that the disputed > use is not authorized by the copyright owner, its agent, or the law; >   * a statement by you, made under penalty of perjury, that the above > information in your Notice is accurate and that you are the copyright owner > or authorized to act on the copyright owner’s behalf. > > > For further information, please review Apple's Legal Information & > Notices/Claims of Copyright Infringement at: > http://www.apple.com/legal/trademark/claimsofcopyright.html > > To expedite the processing of your claim regarding any alleged intellectual > property issues related to iTunes (music/music videos, podcasts, TV, > Movies), please send a copy of your notice to iTunesStoreNotices@apple.com > For claims concerning a software application, please send a copy of your > notice to AppStoreNotices@apple.com. > > Due to the high volume of e-mails we receive, this may be the only reply you > receive from copyrightagent@apple.com. Please be assured, however, that > Apple's Copyright Agent and/or the iTunes Legal Team will promptly > investigate and take appropriate action concerning your report.


Distributed game development and security of source code

I think this question has already been asked many times, but I can't find any of them. I have a game project (I'm using Marmalade),and a few trusted developers, but I want to invite more. For adding some functionality, for writing scripts and so on. The question is - how can I don't give them the whole source code (only compiled part of it maybe), and/or give them limited rights to the project for doing them their work, but dont have the opportunity to steal the code?


Certified Scrum Developer - Anyone out there who's taken this course?

I've met a bunch of "Certified ScrumMasters" as well as "Certified Scrum Product Owners" out there... but I have yet to meet a "Certified Scrum Developer." See: http://scrumalliance.org/pages/certified_scrum_developer Who has taken this course. Was it valuable? Please let me know how your experience went. -=-= Edits -=-= I just realized what the CSD requirements are (below)... what a heavy course load! > CSD Qualifications > > At least five days of formal training are required to earn a Certified Scrum > Developer (CSD) credential. CSD applicants must also demonstrate an > understanding of agile engineering practices by taking and passing a formal > CSD assessment. > >   * At least three days must be technical training through a three-day CSD- > track technical skills course. >   * At least one of the five days must be dedicated to the study of Scrum > through a CSD-track Introduction to Scrum course or CSM/CSPO course. >   * The fifth day is an elective. You can choose from among the CSD-track > courses to develop the skills you feel would benefit you the most in your > role. The two-day CSM or CSPO course fulfils both Intro to Scrum and the > elective requirements. >


When is it NOT good to use actors in akka/erlang?

I've been working with akka for 7-8 months now daily. When I started, I would be working on applications and notice that actors would be used basically anywhere once inside the actor system for communicating between most objects. So I did the same - spin up another actor for x/y/z. It seems to me that this may be too indiscriminate, adding complexity where it isn't needed - but I can't find any discussions on where actors vs plain synchronous or even async logic via futures should be used. I started pondering my stance after my coworker mentioned something similar. I realized several cases more recently where I have pondered a task and then avoided creating another actor because I could achieve the same result safely in an immutable implementation - eg something like getting configuration values from a db or file somewhere where you access very infrequently and will wait for the result is the actual use case. In particular, it seems to me that any case where you're playing with immutable state, actors create complexity and limit throughput - a pure function in an object, for example, can be called concurrently with no risk with any level of concurrency, yet an actor can only process one message at a time. The alternate consideration is you'll park the thread if you need to wait for the result unless you start using futures but cases where you don't need to worry about async messaging or scale it seems it may be overkill to employ an actor. So my question is - is there a bad time to use actors? I'm curious how erlang looks and would really like other people's insight. Or if there are some principles around actor use.


Prevent anomalies caused by signal propagation time

In electrical engineering class we learned that signal lines are not ideal, so it takes time for the signal to reach the other end of the cable, and if we doesn't take this into account, it can lead to crazy phenomenons like: ![enter image description here](http://i.stack.imgur.com/XAsXe.png) Imagine we have a tank game, where tank1 (played from Europe) shots tank2 (controlled from the USA). In tank1's monitor he sees that tank2 is destroyed, but it takes some (very small but not negligible) time for the signal to reach tank2's monitor. So while the signal travels, he can fire his virtual cannon too, destroying tank1. The signal of this act starts his journey to tank1, before the data that tells to tank2 that he is dead, arrives. This causes the weird phenomenon, that **tank1 destroyed tank2, but tank2 still can destroy player1** (despite that tank2 doesn't even exists). They told us, that we cant solve this problem in the hardware way, we have to prevent this in the software side, but they didn't tell us how should we do this, but I am courious, so how do we/they solve this problem? The problem is not about the time that elapse while the bullet flies in the air, it is about that the first tank should be destroyed, so it shouldn't be able to shot (or be able to do anything), but in our problem it is able, because the information that he destroyed doesn't arrived yet. **In this case we should interpret the word shot as: the bullet impacted and it destroyed the tank**. So **the actual signal** that is going to be sent to the other client **is that he is destroyed**. Not the event that the enemy tank fired its cannon.


VPS vs Web Hosting: Which one is good for java web services

I have some questions about VPS and web hosting. As far as I understand, VPS is a virtual machine on which we can do anything as we can do with our local machine. Install software, change settings etc. Web hosting is where we have only a folder in which we place our web site in. However, most of the provider currently advertise their service as "VPS web hosting". This confuses me, does that mean they are selling VPS service which can only host web sites? I need a virtual machine which host one RESTful Java service using Tomcat and Jersey and MYSQL at the backend. My plan was to hire a VPS machine, install Tomcat 7 and MySQL on that machine. Is this the right way to go? Many thanks.


Programming Style in Large Scale C++ Applications

Recently I've been browsing source code of large applications written in C++ to learn a bit but I couldn't help but notice that most if not all use a lot of IFDEFs and class-less functions (where they could have been class members/methods). An example is Qt Creator IDE source code: http://qt.gitorious.org/qt-creator/qt-creator/blobs/master/src/app/main.cpp If you notice, it has a bunch of functions around the main() function; one of them, for example, is:               static inline void toHtml(QString &t)      the above method is defined outside while I think it could have been part of some utility class maybe. Also, I think IFDEFs make the programs messy (again my opinion). **My question is** : _is it just an accepted practice in C++ world to mix procedural and OO code like that?_


Dynamically loading MPL library in closed source application

I am dynamically loading an MPL 2.0 licensed library to use some of its exported functions in a feature. My code does not distribute the library, it simply detects it's presence on the system and uses it if it's available. I also browsed the library's source code to extract the function and certain type definitions. What ramifications does this have on my software? Do I have to distribute the MPL, open-source part of my code that uses the mentioned type definitions, do I have to mention something in my EULA, etc.?


Building a common syntax and scoping framework

Hello fellow programmers, I was discussing a project the other day with a colleague of mine and I was curious to see what others had to say or if such a thing already existed. ### Background There are many programming languages. There are many IDE's and source editors that highlight and edit source code. Following perfectly and exactly the rules of a language to present auto-complete options and understand scopes in the code is rather complex. This task is complex enough that most IDE's implement different source-editors as plugins that often re-implement the same features over and over but in a different way (netbeans). From what I can tell most IDE's and source editors re-implement parsers that use regular expressions, or some meta-syntax Naur Form to describe the languages grammer generically. These parsers are implemented over and over and over again. ### Question Has anyone attempted to unify or describe a set of features through an API and have a consistent interface to parsing various programming languages and dialects. I'm not describing an IDE - but a consistent API for any program to use to parse and obtain meta-information from the source code. I realize various programming languages offer many different features which are difficult to 'abstract' into a set of features, but I feel this would be a worthwhile venture. It seems to me that this could possibly allow the authors of interpreters to help maintain a central grammer intepreter for their language. the Python foundation could maintain the Python grammer api, ANSI the C grammer api, Oracle the Java grammer API, etc ### Example usage If this was API existed code documentation generators could theoretically work across all dialects and languages to some level. It wouldn't matter if your project used 5 different languages a single application could document all of them and the comments and doc-tags within. Has anyone attempted this comprehensively?


Does having Master's degree in Computer Science help your career?

I am curious about experiences of programmers who have gone beyond college or university and now work in the industry. I am not talking about academia (you need PhD there anyway). Do you have a Master's degree? Has it helped your career? Are there any other benefits besides the knowledge one gains while pursuing the degree?


How to reject a code review that you believe is unnecessary?

I am in a position where I have been asked to review some code that fixes a problem that I don't believe exists. The fixer, who is more senior than me, insists his fix is necessary but it appears to be no more than C++ sophistry to me. Part of our deployment process is a code review, and as the 2nd highest engineer in a small company I am expected to review changes. I believe that reviewers are just as responsible for code changes as the original coder, and I am unwilling to accept responsibility for this change. How would you go about rejecting this review?


2 Servers 1 Database - Can I use Redis?

Ok I have a couple of questions here. First let me give you some background information. I'm starting a project where I have a node.js server running my application and my website running on another normal server. My application will allow multiple users simultaneous connections and updates to the database so Redis seemed like a good fit there because of its speed and atomic functions. For someone to access my application they have to login with an account. To get an account, they have to signup for one through my website. So my website needs a database, but its not important to have a database like Redis here because it doesn't need it. Which leads me to my first question: **1\. Can Redis even be used without node.js?** It seems like it would be convenient if both of my servers were using the same database to keep track of information. In some cases, they will keep track of the same information (as in user information) and in other cases, they will be keeping track of separate information. So even if the website wouldn't be taking full advantage of all that Redis has to offer it seems like it would be more convenient. So assuming Redis could be used in this situation that leads to my next question: **2\. Since Redis is linked with JavaScript, how would I handle the security from my website users?** What would be stopping my website users from opening firebug or chrome's inspector and making changes to the database? Maybe if I designed my site with the layout like this: apply.php->update.php->home.php. Where after they submitted their form it would redirect them to the update page where the JavaScript would run and then redirect them after the database updated to the home page. I don't really know I'm just taking shots in the dark at this point. :) Maybe a better alternative would be to have my node.js application access its own Redis database and also have access to another MySQL database that my website also has access to. Or maybe there is another database that would be better suited for this situation other than Redis. Anyways any direction on this matter would be greatly appreciated. :)


Specific and generic behaviour for derived objects that client doesn't need to be aware of

We have a database with tables that use an inheritance hierarchy. An entity in the derived table will have an ID that matches an entity in the base table and so on through the hierarchy. We have repository classes for the derived types/tables so that you can get specific instances by ID. The problem we have at the moment is that we want the ability to apply specific behaviour to some of the entities, but we also want some generic behaviour applied to all the base entities. It would be good if a client could treat a collection of entities as the base entity and just call the method to perform this action on it, without having to know about the specific behaviour. So the client will receive from the server a collection of entities, including their ID. The client will then call a method on the server with some of those IDs and somehow the server needs to be able to tell which derived types the IDs belong to. I considered leaving the table inheritance in place so that data isn't duplicated, but having a "type" tag in the base-table. Is this defeating the purpose of the inheritance hierarchy?


Populate fields or return object

**What is better to do in this type of scenario: populate fields or return an object?** The situation is like this: I'm doing calculations to find the prices (inc tax, ex tax, discounted etc) of a product. Is there any advice or are there any guidelines on how to handle a return value? Populate fields:               public class ProductPrice     {         public int BasePrice;         public int IncTax;         public int ExTax;         // ...              public void GetPricesForProduct(int ProductID)         { /* Populate fields based on results */ }     }      Return object:               public class PriceCalculator     {         public ProductPrice GetPricesForProduct(int ProductID)         { /* Populate object fields and return object */ }     }     public class ProductPrice     {         public int BasePrice;         public int IncTax;         public int ExTax;     }      I'm not sure I really like the first method, because the `void` return type doesn't make it clear what happens when the method executes. However, returning an object results in a class which has no functionality.


Initializing properties that aren't parameters in a constructor: alternatives

A class loads properties from a file and uses those as it performs its duties. For testing purposes I want to be able to modify said properties directly without having to use a test properties file. I did the implementation, but it seems filled with smells -- I'm wrestling with keeping this thing small (avoiding frameworks like Spring that will wrap and inject the properties). In particular, I cannot recall seeing a constructor that initializes itself via a statically loaded set of properties -- particularly that it sets variable values from somewhere other than passed-in parameters. I'm looking for arguments for/against this approach, and hoping to hit upon some alternatives if this is really as uncool as I think it is.               private static final String CONFIG_FILE_NAME = String.format("config-%s.properties",             null != System.getProperty("JAVA_ENV") ? System.getProperty("JAVA_ENV") : "development");     static {         PROPERTIES = new Properties();         try {             PROPERTIES.load(MyClass.class.getClassLoader().getResourceAsStream(CONFIG_FILE_NAME));             if (PROPERTIES.keySet().size() < 1) {                 LOGGER.error(String.format("failed to load %s: no properties", CONFIG_FILE_NAME));             }         }         catch (final IOException ie) {             LOGGER.error(String.format("failed to load %s", CONFIG_FILE_NAME), ie);         }     }          private String property1;     private String property2;          public MyClass() {         property1 = PROPERTIES.getProperty("prop.1");         property2 = PROPERTIES.getProperty("prop.2");     }          /* public accessors for property1 and property2 go here */


Point estimates scale skewed

When using planning poker for estimates, we've ended up with effectively a non-linear points scale. By that I mean that point value is inconsistent for one-pointers and, say, eight-pointers. Couple examples each:   * 1 point: add tooltip text to a couple of icons; format date&time strings   * 3 points: create new user role and specify their permissions; automatically create a new case in CRM whenever certain actions are performed   * 5 points: watchlist functionality; filtering functionality on several facets   * 8 points: integrate with a third party provider *and* introduce a persistence layer to cache their responses My concern is two-fold: we lose estimating fidelity by restricting ourselves to the low-end of the scale and any reporting (or calculating average velocity) will be erroneous. How can I entice the scrum master, product owner and the team to use a more consistent, linear scale? **Edit:** just to clarify, we are using one of the traditional decks that goes all the way up to 100... except we've somehow anchored ourselves to not go over 5, ending up with effectively a logarithmic scale.


How many bugs to expect

At a previous job (circa 2010), my manager mentioned that he's doing some research into quality metrics. The bottom line is to answer the question **how many bugs should I expect?** The goal is to try and predict how many bugs are incoming, and more importantly, how many bugs we _probably haven't yet found_. There are some problems around this metric. Historically, we tend to look at "lines of code," which is a horrible way of measuring functionality. Functional points seem better, but I don't have an easy way to describe and measure how many function points a piece of software has. The other issue is that quality will obviously vary (widely) depending on if you have really horrible QA/developers, or really awesome, or somewhere in the middle. Another issue is, obviously, what you define as a bug. Some teams look at any feature change as a bug; others try to divide (eg. new functionality vs. broken but "works as expected" functionality). Is there any research, or body of work, on helping software teams identify and predict how many bugs they should be finding?


Determine Better Coding Practice

As a new programmer, it has always been hard to create applications, because I am still at the learning stage. I understand that to achieve a particular affect or function in an application, there will be numerous ways to achieve the same result. However, should I just purely create a function to it's working state, which means that as long as it works, just as the way I want it to, then it should be fine. Can any fellow programmers of a higher level kindly let me know the right way of doing things?


Is it necessary to write a javadoc comment for EVERY parameter in a method's signature?

One of the devs on my team believes that it is necessary to write a javadoc comment for EVERY parameter in a method's signature. I do not think this is necessary, and in fact I think it can even be harmful. First off, I think parameter names should be descriptive and self-documenting. If it's not immediately obvious what your parameters are for, you're probably Doing it Wrong. However, I do understand that sometimes it's unclear what a parameter is for, so in those cases, yes, you should write a javadoc comment explaining the parameter. But I think it's unnecessary to do that for EVERY parameter. If it's already obvious what the parameter is for, the javadoc comment is redundant; you're just creating extra work for yourself. Furthermore, you're creating extra work for anyone who has to maintain your code. Methods change over time, and maintaining comments is nearly as important as maintaining your code. How many times have you seen a comment like "X does Y for Z reason" only to see that the comment is out-of-date, and in fact the method doesn't even take X parameter anymore? It happens all the time, because people forget to update comments. I would argue that a misleading comment is more harmful than no comment at all. And thus is the danger of over-commenting : by creating unnecessary documentation, you're making more work for yourself and everybody else, you're not helping anybody understand your code, and you're increasing the likelihood that the code will have out-of-date comments at some point in the future. However, I respect the other developer on my team, and accept that perhaps he is right and I am wrong. Which is why I bring my question to you, fellow developers : Is it indeed necessary to write a javadoc comment for EVERY parameter? Assume here that the code is internal to my company, and won't be consumed by any outside party.


Backend devs put down by user stories

I planned to slice in backend development into to the user stories vertically. But a backend guy on our team started to complain that this makes their work invisible. My answer was that   * at the sprint planning and review meetings we discuss backend tasks in front of stakeholders so it makes it visible, and   * maintaining a high quality during the project will result a slower startin pace than other teams, but we will have a stable velocity during the project. And velocity is highly visible to stakeholders. He still insist having stories like: "As a developer I need to have a domain layer so I can encapsulate business logic." How can I solve the issue before it pollutes the team? The root of the issue is that our management systematically consider backend work as invisible and call backed devs miners, or other pejorative terms.


functional requirements - use wording based on verbs?

### Question Should the functional requirements in a requirements doc use wording based on verbs? ### Context School assignment, working in a team, working through the SDLC. The requirements doc has been done and we are now into design. ### Problem The requirements doc has an enumerated list of what I'd call features of the app - the functional requirements. In that list are things that I'd think of as "how's" rather than "what's" and now, trying to work on design, I feel like a part of design has been prematurely dictated. I've not done this before! To me, I should be dealing strictly with things that describe "what." ### Example of current Pretend that the job is to make an omelet. Listing: crack the egg, break into bowl, scramble, etc.; crosses over the line into the territory of how. Along that track, so does wording like: create, generate, list, calculate, determine, validate, etc. - verbs, basically. Right now, I have a list of requirements that are partially rooted in verbs. My idea of a requirements doc for an omelet would be more like: has two eggs, x ounces of ham, x ounces of bacon, x ounces of montery-jack cheese, x ounces of cilantro, etc.--nothing but what (nouns). I might have, and could have, spoken up before finalizing the requirements doc if I'd had any experience.


Are there design patterns or generalised approaches for particle simulations?

I'm working on a project (for college) in C++. The goal is to write a program that can more or less simulate a beam of particles flying trough the LHC synchrotron. Not wanting to rush into things, me and my team are thinking about how to implement this and I was wondering if there are general design patterns that are used to solve this kind of problem. The general approach we came up with so far is the following:   * there is a `World` that holds all objects   * you can add objects to this world such as `Particle`, `Dipole` and `Quadrupole`   * time is cut up into discrete steps, and at each point in time, for each `Particle` the magnetic and electric forces that each object in the `World` generates are calculated and summed up (luckily electro-magnetism is linear).   * each `Particle` moves accordingly (using a simple estimation approach to solve the differential movement equations)   * save the `Particle` positions   * repeat This seems a good approach but, for instance, it is hard to take into account symmetries that might be present (such as the magnetic field of each `Quadrupole`) and is this thus suboptimal. To take into account such symmetries as that of the `Quadrupole` field, it would be much easier to (also) make space discrete and somehow store form of the `Quadrupole` field somewhere. (Since 2532 or so `Quadrupole`s are stored this should lead to a massive gain of performance, not having to recalculate each `Quadrupole` field) So, are there any design patterns? Is the `World`-approach feasible or is it old-fashioned, bad programming? What about symmetry, how is that generally taken into acount?


Should a Student be a Jack of All Trades?

I'm currently a student going to an 8 month internship this January after my first year of studies and I'm planning on expanding my programming skills maybe during weekends or weeknights. For around 2-3 years, I've been learning as much as I could just because I enjoyed programming so much when I started 2 years ago. Some things I know include:   * source control   * Java   * Python   * C   * C++   * Bash   * Linux The problem is that I only know the basics of the above, nothing in depth (except Java) and I'm wondering what would benefit me more in the future when I finish my studies. Should I learn something new? (I've been wanting to take a crack at SICP) Or should I expand on something that I know right now (I enjoy programming low level) and build something useful and big? FWIW, I'm going to use Java(JSP, servlets) and SQL for my internship.


Why do people confuse C-type strings and STL strings

The last week I saw at least three questions where people were confused about the differences between `char *` and `std::string` or made some related mistakes. Don't get me wrong, I don't have a problem with this, I just don't get the exact reason for this. Maybe it was just a coincidence.


How to deal with Programming != Job Description problem?

I'm currently in a situation where many people on here likely find themselves: I love to program, I do a lot of fun side projects, but it is not my profession. I work as an Electrical Engineering project manager, but at one point I wrote a software application that solved a tricky signal processing problem early in my career. Now the company is creating a product which will include the same functionality I created a while ago. They have asked for my assistance in designing it into the system, and to potentially help program it. My question for the community is: how have you dealt with this type of situation in the past with regards to pay and responsibility? While I would love to program as a full-time job, I am not ready to make a switch into that role. I would be happy to work on this in addition to my job, but I feel this type of specialized work would merit some form of bonus or side contract. I imagine it could also lead to an ongoing support responsibility, but I figure this could be handed off to the normal development team once the design and initial implementation is complete. Would this be an unreasonable request in a typical Fortune500?


Why is TDD not working here?

I want to write a class `A` that has a method `calculate(<params>)`. That method should calculate a value using database data. So I wrote a class `Test_A` for unit testing (TDD). The database access is done using another class which I have mocked with a class, let's call it `Accessor_Mockup`. Now, the TDD cycle requires me to add a test that fails and make the simplest changes to `A` so that the test passes. So I add data to `Accessor_Mockup` and call `A.calculate` with appropriate parameters. **But why should`A` use the accessor class at all?** It would be simpler (!) if the class just "knows" the values it could retrieve from the database. For every test I write I could introduce such a new value (or an if-branch or whatever). But wait ... TDD is more. There is the refactoring part. I could refactor class A using the DB accessor. But I could refactor it in any other way as well (e.g. introducing new classes that encapsulate the data). So, again: **How do I write tests that force A to use the database (and nothing else)?**


What is the identification procedure that registers a mobile device on a subscriber account and installs purchased content?

We know there are several moving parts to a system like the apple store or google play. At the very least;   * The device has a unique hardware id or sim card   * The user has a login/pass   * The "store" site has some crypto In what order and format (cypher/plaintext) is this data exchanged between the device and store software before content is installed?


API for Hotels and Flights

I want to implement Hotels and Airlines in my web application.People will come and will search for hotels and airline's tickets and will compare result. What are the ways to get these informations? Is there an API which give me all this for whole world? OR what are the other possible ways to get this data? Need to have some Crawler?


Creating a new file format: Write code or documentation first?

When creating a new file format for an application, you can write the code or the documentation first. When writing the documentation first, you have a better idea of what you should implement. However, you might need to change a lot of the documentation you have written afterwards when writing the code, because you may discover certain things aren't very efficient to implement that way. So: **When creating a new file format, what should you write first: The code or the documentation?**


What makes a language more suited to Artificial Intelligence?

I've always read that LISP is well suited for Artificial Intelligence, but I never found out why.


Are Intel compilers really better than the Microsoft ones?

Years ago, I was surprised when I discovered that Intel sells Visual Studio compatible compilers. I tried it in particular for C/C++ as well as fantastic diagnostic tools. But the code was simply not that computationally intensive to notice the difference. The only impression was: did Intel really do it for me just now, wow, amazing tools with nanoseconds resolution, unbelievable. But the trial ended and the team never seriously considered a purchase. **From your experience, if license cost does not matter, which vendor is the winner?** _It is not a broad or vague question or attemt to spark a holy war. This sort of question is about two very visible tools. Nobody likes when tools have any mysteries or surprises. And choices between best and best are always the pain. I also understandthe grass is always greener argument. I want to hear all "what ifs" stories._ _What if Intel just locally optimizes it for the chip stepping of the month, and not every hardware target will actually work as well as Microsoft compiled? What if AMD hardware is the target and everything will slow down for no reason? Or on the other hand, what if Intel's hardware has so many unnoticable opportunities, that Microsoft compiler writers are too slow to adopt and never implement it in the compiler? What if both are the same exactly, actually a single codebase just wrapped into two different boxes and licensed to both vendors by some third-party shop?_ _And so on. But someone knows some answers._


how to trace a drupal form script

I am completely new to Drupal. A site I have taken over www.statehr.com has a form on the front page that a) obviously submits and processes data, and b) checks for duplicate username for example via an onkeypress event. Can anyone give me an idea of where to find the script that receives the post? The action is to / so .htaccess probably intercepts it, and I see two key hidden fields               form_id     form_build_id      which probably match up on the receiving end. The form is putting data in the users table but I want to do quite a few more things with it.


optimize human-readable database with index

i need to store a large amount of data - about 10 million entries of the format               unique hash (64 chars), value 1 (5 chars), value 2 (9 chars)      i will be reading and deleting (but not updating) this data in quick succession. for example, i might write 10 lines, then read 3 and delete 3 lines, before moving on to more writes and reads... its a single threaded desktop program so reads are only initiated after writes and deletes have been completed. i would like to avoid using a database so that the data can be human-readable from the file system and so that people who download and use my program can see it and inspect it for themselves. i expect my users to be running a linux os and my program is written in python. i have come up with three possible options for how to store this data: **option 1** put the data in a single file. since the hashes are unique i can arrange them in ascending order like an index so as to give `log2 N` read times. deleting and inserting will happen often and would slow the process down as `N` gets large. **option 2** use the unique hash as a file name and put the values inside this file. this would be my preferred option so long as there are no obvious performance drawbacks? i know some file systems slow down when a large number of files exist in a single directory. and i really can't make any assumptions about which file system the users of my program will be using. i need to choose a solution which is quick on all file systems. **option 3** use the unique hash to create a directory to store the values in. so for example, if a record has hash `abcd` then i would create dir and file `base_dir/a/b/c/d.txt`. does this get around the file system performance issue issue? or is this just as bad as option 2 depending on the type of file system the user is running? **question** so really i'm just looking for help to decide which option to pick. also if you have any other options that are superior to the ones i have listed here i would like to hear them. maybe some database software like mysqli that sores data in human-readable text? that would be ideal really, but i imagine that most databases would use binary for efficiency...


What design pattern should I use for import, update, export

I need to create a simple payments validator. On the following class diagram, I tried to present the model of payments. As you can see, each payment type inherits from Payments class. ![Payments diagram](http://i.stack.imgur.com/wd1Yw.png) Now I want to work with these payments but hide the details so the user can only access what he needs. And those things are are: `Load` payments from path and return list of payments `Save` payments to path `Update` input payments list and return updated list I am not sure if the way I am doing it is correct. My idea would be to use Facade design pattern, so `PaymentsModel` class which would contain following methods should be created:               public class PaymentsModel     {              IList<ToBePaidPaymentsDto>  GetToBePaidPayments(string path){              return new IList<ToBePaidPaymentsDto>();         }              IList<DonePaymentsDto>  GetDonePayments(string path){              return new IList<DonePaymentsDto>();         }              IList<MissedPaymentsDto>  GetMissedPayments(string path){              return new IList<MissedPaymentsDto>();         }              ...          }      Then create abstract class:               public abstract class Payments<T>      {         protected string Delimiter {get; private set;}         protected int NumberOfHeaders {get; private set;}              public abstract IList<T> LoadRecords(string path);              public abstract IList<T> UpdateRecords(IList<T> records);              public void SaveRecords(string path, DataGridViewRowCollection records)         {         }      } where T is Data Transfer Object depending on the type of payments, so: `ToBePaidPayments` class would use `ToBePaidPaymentsDto` `DonePayments` class would use `DonePaymentsDto` as presented below               public class PaymentsToBePaid : Payments<IcsToBePaidPaymentDto> {              public override IList<IcsToBePaidPaymentDto> LoadRecords(string path){                  return null;         }                   public override  IList<IcsToBePaidPaymentDto> UpdateRecords(IList<IcsToBePaidPaymentDto> records){                  return null;         }          }      and               public class PaymentsDone : Payments<IcsDonePaymentDto>     {         public override IList<IcsDonePaymentDto> LoadRecords(string path){                  return null;         }              public override IList<IcsDonePaymentDto> UpdateRecords(IList<IcsDonePaymentDto> records){                  return null;         }          }      Now, my final question is - am I doing this correctly? Am I applying correct design pattern and am I applying it correctly? Thank you for advice.


JavaScript Multi Threading

Well these days JavaScript is main player in all web development technologies , on client side for making user interface better, client side logic, on some web servers as server side logic also Add to that the fact of people (at least some of them ) started moving in web game development from flash to javascript and HTML5 Isn't it time for it to support multi threading ! are there browsers that allow JavaScript to be multi threaded or is it there in any standards , HTML5 or future versions ?!


Is it impolite to file bug reports against abandoned open-source projects?

Is it considered impolite to file a bug report against an abandoned open- source project, or an abandoned branch of a still-continuing project? Is it perceived as making a request of the former author(s) of the project, which they're no longer willing to fulfil, or are bug reports merely seen as a description of the current version of the software, which may be fixed by a different person in the future?


GPL/LGPL/MPL non-code content license

I want to use a dictionary (basically a text file, and no code) that is included with an open office spell checking plug-in. The plug-in is under the tri-license GPL/LGPL/MPL which I don't understand. is that legal? If it is illegal, what if I wrote a script that uses the said open office plug-in to generate the dictionary (assuming it's technically possible, the script will generate all possible letter permutations, passes it to the plug- in and saves the correct ones) ? I will be using the dictionary in a closed source commercial application. The dictionary is in a language that has very little resources online, and short of making my own dictionary, there aren't any alternatives. Clarification: The script idea I mentioned above, isn't a _weird_ technique, I would generate a document with all possible words and use open office with the plug-in installed to show spelling mistakes and remove them, isn't this the intended use of the plug-in (spell checking)?


How do I find work experience as a minor?

I'm currently 16, and I consider myself a good developer. I've worked as a freelance and with an Israeli company (that serves other international companies) for the past year, and I've completely satisfied my clients with a consistent 10/10 rating to date. However, I've recently been trying to find work experience in real life at an influential software firm, but with limited (and by limited I mean no) success (I've only applied at the smaller firms, all of which were advertising available job positions). It is a requirement to take a week's work experience in my state, but I've already done that at a hospital (to try out my parent's career choice for me 0 a doctor), and want to have a shot at a software development firm. I've sent about 4 emails to different companies about it, but haven't received any replies yet (its been weeks). How do I go about finding work experience as a 16 year old?


I am learning Java and thinking about how and when to learn Android?

I am learning Java and I was wondering about when it would be best for me to try to develop something for Android? I have two specific concerns. 1.How is the Android API different from the main Java API? Are they similar or radically different? 2.I have heard that you need to make multiple versions of a given application for different devices. Is this correct? I have no idea where to start when answering these questions.


How to get manager to get me favorable projects

For some odd ball reason, my manager is giving me grunt work which no one wants to do. Currently he is working on a Flex/AS project, which I have previous experience with and he does not, but is unwilling to put me on that project. He cites other project needs and keeps me on them.. is it time to get out or talk to him or his boss???


Why have hardware-accelerated vector graphics not taken off?

I'm working on an app that involves real-time manipulation of vector paths at 60fps, and I'm very surprised by how little information there is on the subject. At first, I tried to implement my idea using CoreGraphics, but it didn't perform adequately for my purposes. I then discovered that there was a Khronos standard for hardware-accelerated vector graphics called OpenVG, and thankfully a kind soul had written an OpenGL ES semi-implementation called MonkVG. But despite the fact that OpenVG is a very practically useful API, it seems more or less abandoned by Khronos. According to Wikipedia, since 2011, the working group "decided to... not make any regular meeting [sic] for further standardization". The documentation, best I can find, consists of just a single reference card. And what's more, there are barely any examples of OpenVG anywhere on the internet. I can find hundreds of OpenGL tutorials in the blink of an eye, but OpenVG seems conspicuously missing. You'd think that hardware-accelerated vectors would be more important in today's world of rapidly-increasing resolutions, and it does seem that many companies are implementing their own ways of doing this. For example, Qt and Flash have schemes for hardware-accelerated vectors, and many of Adobe's tools have hardware acceleration as an option. But it seems like the wheel is getting reinvented when a standard already exists! Is there something I'm missing about OpenVG that makes it unsuitable for real- world use? Or is it just that the standard didn't catch on in time and now it's destined for obscurity? Do you think there's room for a standardized API for hardware-accelerated vector graphics in the future, or will it just be easier to use traditional raster-based techniques? Or are vectors simply on their way out, before they were ever in?


Creating a P2P application using Java

I am preparing to start a 3rd year project using Java. The object is to create a P2P application where users can write text, draw and edit at the same time. The connection between them must be P2P. At this point I still don't know details about design etc. and I'm just doing some reading. I have made a simple network application before but that was clients/server. What should I look into in order to understand how to create a P2P network? Do I need to use JXTA or, for a small scale application, it's better to make my own protocol? PS. I posted the same question on Stack Overflow, but it was closed. Hope this is a better place for it. **Update** JXTA proved a bit too complicated for my needs. As a result I ended up using JGroups, which proved very simple to work as well as efficient enough for my needs.


Nightly builds for one-man projects

I'm working on a C++ wrapper for libpcap and I'd like to get more into version control as I'm not experienced with this (the only reason I used it was to put code on GitHub :)). Does it make sense to schedule nightly builds for a one-man project? What advantages are there in doing this?


Product Owner and automated tests

One of the claims of BDD-style development is that it bridges the gap between Product Owner and developers: the Product Owner writes a story, which can be converted in an equivalent automated test "frame" that should eventually pass. What I would like to hear is how to keep bridging the gap after that: once there are automated tests in place, how do you help the Product Owner review them? Or is it enough for the Product Owner to know that the test passes, without looking at the test code itself? In short, how intimate should the Product Owner be with the actual tests implemented, and how do you keep him/her productively involved with the tests beyond the initial story writing? The reason behind this question is double. First, between the paper story and the implementation details, some assumptions may sneak in, and having the author of the story review the test can be invaluable. On the other hand, the implementation introduces quite a bit of noise, too, and requires the PO to become fairly technical (read code, run tests). Is the test implementation a "developer's detail", or is it fair to request the PO to become a bit of a developer in this area? Then, in most case, the PO can actually validate the test without the automated test, by simply using the application. However, some stories are "headless" and can only be verified via code, so unless the PO knows how to read and run tests, he/she will never be able to state that he verified the story complete.


Single-Tenant Databases - creating and updating new tenants via PHP

We've built a single-tenant webapp in PHP and as it stands each hosted 'site' has its own database. However we need to be able to run a script to create their database, assign a mysql user, and insert the default sql. Now, we've got the database and user stuff working fine, its just the importing of the SQL. From what I can tell, PHP quite simply sucks when it comes to handling sql files, so storing a 'template' sql file seems to be out of the question. My next thought was maybe storing a live database which is then cloned, giving the site its pre-populated database, however I cant see how this would work. At the same time, I'd rather not 'hard code' the table creations into PHP as if we perform any updates we want to be able to update the SQL direct from our backend control panel. Surely there has to be a logical way of handling creations and updates on a multi-tenant SaaS?


How to update dependency during runtime in my .NET application?

I have a server-client application. Sometimes the server is updated which requires some DLLs in the client to be updated as well (The DLLs are the dependencies of the main executable). For now, we have to close the client, manually deploy the DLLs, and then start the client again. This is kind of an inconvenience because the client is an automated application, so normally it doesn't need any user intervention. Is it possible for this to be done automatically without restart or user intervention? Like, the client would download the latest DLL, and replace the current one?