Reputation
8,936
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
19 48
Impact
~402k people reached

11h
comment How to *detect* if open source software is used in a commercial product?
@ddyer: that's correct; that is the obfuscation part which I didn't mention. My guess is that most infringement investigations focus on the easier cases first, that is, when the infringing party did not use obfuscation. Otherwise it would have taken an entirely different route - it would require one or more whistleblowers, and then some subpoena to collect evidence directly from the infringing party's workplace. The cost would only be justified if it is a dispute between two large commercial software companies where code theft is suspected.
1d
comment Is there a design pattern for managing deep many-to-many relationships?
Are you sure you want to "reduce the amount of data"? Are you instead looking for ways to "reduce the amount of non-trivial code and logic" that needs to be written to implement the required behavior? (I notice that the ongoing management of the data requires relational data structure, similar to a database.)
1d
comment Nomenclature for class that holds functions arrays of a particular object type
You are probably designing a language for collection-oriented programming on data. The language might as well be somewhat SQL-like, or somewhat LINQ-like, or somewhat FP-like. In any case, each "method" or "step" is not necessarily executed immediately; LINQ works because each declaration creates a "command object" that captures the user's intent, but the execution is deferred, because a single command may have no physical meaning on its own, unless combined with other commands which give rise to a wide range of meanings
1d
comment Nomenclature for class that holds functions arrays of a particular object type
See also: collection oriented programming
1d
comment Nomenclature for class that holds functions arrays of a particular object type
Methods, or Command, or whatever. If they are queries (i.e. they don't modify anything) then they are Queries. Or Utility if the class contains a lot of unrelated things.
1d
comment Why use an opaque “handle” that requires casting in a public API rather than a typesafe struct pointer?
@JonathonReinhart suggestion: you can mention "strict aliasing rule" in your question to help steer the discussion toward the more important aspects.
2d
comment How to *detect* if open source software is used in a commercial product?
The question is also relevant for the case where a commercial proprietary code base is suspected to be stolen by a competitor, though the question isn't worded this way.
2d
comment What Classes as a “C-derived” language
"low level language" specifically refers to assembly language. My guess is that, given the way it is described, the course specification does not consider the C language to be "low level language", i.e. it is considered a high-level language. @Deduplicator It is UK education, any definitions could happen.
2d
comment What Classes as a “C-derived” language
There is too little information about this question that is publicly available from internet searches. From the only sample on "Paper 2 (1CP0/2A)" I can find on this official source,
2d
answered How to *detect* if open source software is used in a commercial product?
2d
comment How can you build an effective team in a hot desk workplace
workplace.stackexchange.com
2d
comment Why use an opaque “handle” that requires casting in a public API rather than a typesafe struct pointer?
Reuse of integer table index will actually suffer from the ABA problem, where an object (index 3) is freed, then a new object is created and is unfortunately being assigned index 3 again. Simply put, it is difficult to have safe object lifetime mechanism in C unless reference counting (along with conventions on shared ownerships to objects) is made into an explicit part of the API design.
2d
answered Why use an opaque “handle” that requires casting in a public API rather than a typesafe struct pointer?
2d
comment How to read a file in C++?
Firstly there is no universal way of parsing a file of unknown format. You have to know the file format in order to parse its information. If the file is a text file, people can use their logic and intelligence and human-pattern-recognition skills to try make sense of the data, but this cannot be done in a failure-proof way. Otherwise, a file is an array of bytes, and you can ask to read chunks of bytes from it. C gives you FILE and C++ gives you std::ifstream (input file stream). Your OS also gives you another lower-level file API.
Aug
27
comment Rewriting a library licensed under AGPL but keeping the public interface
Notice that pending court decisions and legislative actions may change the legal aspect of that question. Current situation is that API is eligible for copyrights, but what constitutes a fair-use of API is not yet firmly decided.
Aug
26
comment How should an embedded OS be combined with user code?
(3) essentially requires you to create a module loader mechanism. Binaries don't work by concatenation; they work by having addresses, offsets and jump tables that point to the right places.
Aug
25
comment What would be the best way to implement priority based programming without adding too much of if-else processing logic
A simplified summary is that to implement the UI handling of a user "dragging and dropping" an item from one place to another place, one would implement a remove item followed by an insert item.
Aug
25
comment What would be the best way to implement priority based programming without adding too much of if-else processing logic
It appears to be an entirely UI design issue, relating to ways to allow users to indicate the relative priorities between pairs of objects at a time. The theoretical basis is en.wikipedia.org/wiki/Partially_ordered_set , meanwhile there are plenty of simple tricks that will do the same, but choosing the right code depends on the UI design. (This assumes the numbers of items will remain practically small.)
Aug
20
awarded  Popular Question
Aug
19
comment How to represent an algorithm as a class?
There is a related concept called collection-oriented programming which is applicable to your code snippet.