425 reputation
210
bio website gaprogman.com
location Hull, United Kingdom
age 28
visits member for 2 years, 7 months
seen Nov 7 at 14:42

Sep
23
comment Will a binary include methods that are not called in the source code?
That makes sense. I mean, say you include the std but only call cout, you don't want all of the other code from std included in your binary. Right?
Sep
23
comment Will a binary include methods that are not called in the source code?
@MichaelT but a private method can only be called by methods within the class itself, right? So if a private method is included in the compiled library that is not pointed to by anything...
Sep
23
awarded  Revival
Sep
23
answered How do I distribute my scientific software with as few dependencies as possible?
Sep
23
comment Will a binary include methods that are not called in the source code?
So in my example oldFoo is dead code and, as such, the compiler and linker would be able to flag it as dead code, if the tool chain I'm using supports dead code detection?
Sep
23
comment Will a binary include methods that are not called in the source code?
@thorstenmüller Ah, yes. Sorry, I was using the term 'compiler' to refer to the entire compilation tool chain.
Sep
23
asked Will a binary include methods that are not called in the source code?
Sep
23
awarded  Informed
Sep
23
comment Is it appropriate for interviewers to ask candidates for their Stack Exchange user name?
I've no problem with giving my SO account username. I, too, link it on my CV. If a potential employer knows what SO is, that's a bonus. I like to think that by openly saying "I ask questions and look for better solutions with the help of my peers (users on SO sites)," it's showing that I'm open to new ideas, techniques and such. Just use the first rule of The Internet: don't post something, that you don't want folks to see.
Sep
19
comment Would copyrights drop if I re-write open source project into another language?
@stonemetal thanks for the pointer. I'll make a point of sticking to clean room techniques where I can.
Sep
18
revised Do you perfect your code as you go or FINISH the product first, improve structure later
Fixed a blatant grammatical error
Sep
18
comment Would copyrights drop if I re-write open source project into another language?
How does this stand with white-box (I think that's the term) program development? Say I develop a piece of software by looking at other, precomiled, software (without reverse engineering back to the source code). My new software is based on how I believe other solutions handle the problem, but it isn't derived from the original source code. Is it still a derivative work?
Sep
18
comment In what situations does it make sense to use an enumeration when writing object-oriented code?
I tend to use enums for properties in objects that can take one of many different values. For instance, if I'm writing a packet parser, I'd want to know whether the packet was RX'd or TX'd, so I'll have a direction enum rather than (as @Dunk pointed out) magic numbers of error prone strings.
Jul
5
comment Why can't `main` return a double or String rather than int or void?
@sunny From what I've been able to gather from my experience with Unix-like OSs, 0 is used as a "normal exit" (0 errors) because it's unambiguous when compared to other integer values. Since most (not all) modern languages are designed to be be similar to (if not designed on the back of) C, and since C was used to write Unix, I'd say it was a historical decision by KnR.
May
2
comment How should I assess answers to the programming assignment I use for hiring
Is it possible to have the candidates talk their way through their code? I'm thinking that you could get the candidates sat at a laptop with you, you both read through the code and the candidate discusses why they chose certain algorithms/structures. That might give you a better insight into the candidates than just blind testing their code.
Apr
3
awarded  Yearling
Jul
25
comment What sorts of software patent issues should one be aware of when writing software?
@User (about point 2) What if a user happens to get hold of your software and uses it within one of the above territories? Then you're in the scary grey area. The grey area that most folk get sued, and lose in - because most judges don't have a clue about the case they're presiding over. And will side with the big corporation almost every time - "they've made a lot of money with this. Means that they must be right"
Jul
25
comment What sorts of software patent issues should one be aware of when writing software?
Isn't it kind of funny that most of these patents were granted recently. I mean software has been around since the 40's, yet the shell companies that sue developers claim to have invented the abstract names for the features that have been around since the 70's and 80's within the past 10 years. How has no one mentioned this? Is this not a stable argument in court?
Jul
25
comment What sorts of software patent issues should one be aware of when writing software?
@GavinCoates direct quote form the article that Stephen C linked "[LodSys] has sued or threatened to sue not only large companies like Adidas and the New York Times but also hundreds of one- or two-person app makers"
Jul
25
comment What sorts of software patent issues should one be aware of when writing software?
@mouviciel Whilst I agree with what you've said, the reach of those software patents is global. Just look at all the Apple vs Samsung stuff that's been going on. The patents that Apple hold (whether they are justified, real or not) have had an affect on what consumers can buy globally. Germany, The UK, The US, France and Canada to name a few countries where one company have taken the other to court over patents. Note: I mean to be neutral in this post