Reputation
23,113
Next tag badge:
122/100 score
14/20 answers
Badges
5 44 87
Newest
 Nice Answer
Impact
~243k people reached

1d
comment Are file-scope `static` variables in C as bad as `extern` global variables?
@xiver77 I have the luxury of writing more high-level code, so neither sacrificing architecture for performance nor using C is necessary in my line of work :) When writing C, I find it much more challenging to write correct code, and the choice of suitable abstractions is different from what I'd prefer, but it's still possible to provide a lot of safety. My answer tries to clearly mark C++-specific ideas as such. Your point about small files is very good, that makes it easier to reason about the program and reduces but not eliminates the problem posed by static variables.
1d
answered Are file-scope `static` variables in C as bad as `extern` global variables?
2d
reviewed Leave Closed Why do arrays in .Net have Length but other collection types have Count?
2d
comment C++ serialization design review
Ah! So you are not (de-)serializing widget instances (that would be weird…), but these widgets just need to read and write structured data? Do you have to implement existing file formats, or are you free to define an ad-hoc format? Do different widgets use common or similar formats that could be implemented as a common Model? You could then do a user interface–domain logic–model–DAL split rather than munging everything together as a WxWidget god object. In fact, I don't see why widgets are relevant here.
2d
revised C++ Runtime and runtime-linking
involving requiring words
2d
comment Javascript coding convention: capitalization with requirejs
(1) Unlike many languages, JS does not have a concept of a module system or a module hierarchy. (2) Most languages with a module hierarchy tend to lowercase module names, e.g. Java or Python: reserve CamelCase for classes. (3) Some languages with a module hierarchy tend to CamelCase package names just like class names, e.g. Perl or Haskell: distinguish modules from variables and functions. (∴) There's no clear precedent, and either reason makes a lot of sense as long as you stay consistent. While I have a clear personal preference, this question is entirely opinion-based.
2d
answered C++ Runtime and runtime-linking
2d
comment Changing field type
I'm voting to close this question as off-topic because it's not about software development concepts, as explained in the help center. Implementation questions are explicitly off-topic!
Aug
25
comment How to triangulate a 3D polygon?
@arthur.sw Your question is still unclear: Have you already tried out any algorithms such as the ear clipping method? Did it meet your needs, or precisely what aspects were suboptimal? Why precisely does Delauney triangulation not work for you? What do you mean by “3D face out of any 3D polygon”? A face is planar, but there cannot generally be any plane that contains all points of a “3D polygon” (an oxymoron in itself). And what are the properties of a “good solution”? Please show your work, and describe your problem very, very precisely. We are programers, not psychics.
Aug
25
comment die() or try/catch when interacting with MySql database in PHP?
Note that the mysql extension is old, broken, and deprecated. The ancient, C-like error handling isn't its greatest flaw, by far. Do yourself a favour and use PDO or at least mysqli instead.
Aug
23
comment Constantly getting PHP error when I submit a form
I'm voting to close this question as off-topic because it's not about software development concepts, as explained in the help center. Implementation questions are off-topic here!
Aug
22
comment PHP - Condition and Loop
Also, your loop condition is wrong – did you mean $x < $legend? As it is, the loop condition will never be true so the loop will be skipped.
Aug
22
comment PHP - Condition and Loop
I'm voting to close this question as off-topic because it's not about software development concepts, as explained in the help center. Implementation questions might be suitable for Stack Overflow, but this question is not of sufficient quality to be migrated there.
Aug
22
revised C++ serialization design review
reworded so that it doesn't sound like I had written cxxtools
Aug
21
answered C++ serialization design review
Aug
19
comment Commercial use of an open source software
The GPL does require you to provide the source to anybody who asks in one case. One of the options for making the source accessible is to provide a written offer for the source with your software. Anyone who distributes the software must also include a copy of the offer, and anyone with the offer must get access. This effectively means you'd have to send a copy of the source to anybody who asks if you didn't opt for another source distribution mechanism, e.g. dumping it on GitHub or an anonymous FTP server.
Aug
16
comment Porting security from Java/.NET to PHP
@Flosculus In some Wiki systems or Webapps, there might be user-supplied code that must be sandboxed. However, sandboxes are more important on the Desktop. Java was developed with the expectation that “applets” would catch on: small programs that could be downloaded from the web and be safely run in a sandbox. That dream has been shattered w.r.t. Java, Silverlight, and Flash, but JavaScript continues to be a popular sandbox environment on the web, due to a different set of tradeoffs.
Aug
16
answered Porting security from Java/.NET to PHP
Aug
16
reviewed Close How can variables be created at runtime?
Aug
16
reviewed Close Need sorting method for coordinated, flattenned collection