415 reputation
111
bio website tchatzigiannakis.github.io
location Athens, Greece
age 24
visits member for 1 year, 11 months
seen yesterday

Who I am

  • Undergraduate in Electrical and Computer Engineering.
  • Member of the IEEE and the IEEE Computer Society (formerly member of the IEEE Communications Society).
  • Hobbyist programmer since the age of 10.

What I use

  • I currently prefer to develop in C# and Java.
  • I use C, x86 ASM and JavaScript situationally.
  • I've also used C++, VB.NET, Ruby, Python, PHP, Prolog, UnrealScript and Vala at one point or another.

1d
comment How did OOP evolve to include the notion of Properties
Good answer, it explains the exact practical reasons that led to the introduction of properties as a language-level construct.
Dec
19
comment Is it good practice to inherit from generic types?
I probably misunderstood, then.
Dec
17
comment Is it good practice to inherit from generic types?
Extension methods apply anyway.
Dec
17
comment Is it good practice to inherit from generic types?
@Mawg They can be available only for instantiation.
Dec
17
comment Is it good practice to inherit from generic types?
+1. As has been pointed out, this is not quite the same as typedef, but it still is very useful in some scenarios, because it helps the reader distinguish between pieces of data that are of the same type but shouldn't be mixed and pieces of data that are of the same type and should be mixed.
Dec
11
comment Is there ever a reason to use an array when lists are available?
I'll take your word for it, although I don't understand exactly how simple explicit boundary checks can add up quite as much. At least it's good to know that there is an observable difference, it makes it easier to choose one or the other (in scenarios where they would otherwise seem interchangeable). Cheers!
Dec
10
comment Is there ever a reason to use an array when lists are available?
What you're saying is correct, but it assumes that either we don't know the element count beforehand (in which case, arrays aren't useful anyway) or that we do know the element count beforehand but we deliberately don't use it in the case of the list. If we do use the element count to initialize the list with the desired capacity, we get only one array allocation (until you reach that capacity), thus we pay the same performance costs. All other common operations are equal (search, retrieval by index, assignment by index), except for further adds (which arrays don't have at all).
Dec
10
comment Is there ever a reason to use an array when lists are available?
How is an array "faster" than a list, considering that List<T> is implemented using an array? If you know the element count beforehand (which you have to know, when using an array), you can use that knowledge when initializing the list as well.
Dec
3
comment Which are the cases when 'uint' and 'short' datatypes are a better fit than the standard int(32)?
The short answer, I think, is that programmers have gotten used to the signed semantics and are inclined to assume those, even when dealing with unsigned types (and thus unsigned semantics). Most people assume it's a matter of the programmer being lazy or uneducated, but the programmer in question may in fact be very educated and very careful and wants to avoid subtle pitfalls. If you like, take a look at soundsoftware.ac.uk/c-pitfall-unsigned and anteru.net/2010/05/17/736.
Oct
16
comment In a generic method, what exception should I throw when a type parameter is unacceptable?
@RobertHarvey Yes, this is exactly what I was looking for, thank you! Care to make it a (summarized) answer?
Oct
16
comment In a generic method, what exception should I throw when a type parameter is unacceptable?
@RobertHarvey Yes, I understand that. In my method, any object is acceptable as an argument (so no problem there), but only specific types are acceptable for the type parameter T (specifically, public interfaces - neither of which can be expressed in the constraint). So I'd like to know if there is perhaps another kind of exception that I should be throwing in this case. (Resharper's complaint isn't my main concern - maybe I should remove that note.)
Oct
16
comment In a generic method, what exception should I throw when a type parameter is unacceptable?
@RobertHarvey "Cannot resolve symbol T", where T is the type parameter.
Sep
18
comment How to responsibly handle license mistakes?
I was talking about the scenario where I am the sole copyright holder of the new files that cause the violation, but it's useful to know what happens when this isn't the case. Thank you!
Sep
18
comment How to responsibly handle license mistakes?
@gnat That's great, but this isn't about legal assistance. It's about what's the responsible and professional thing to do with the repository, whether it's considered good or bad practice to mess with its history or rebuild it altogether, etc. If there is some other phrasing I should have used, please go ahead and suggest it or edit it directly.
Jul
8
comment Why is software OS specific?
Even if APIs are "not part of the operating system", they are still different if you go from one OS to the other. (Which, of course, raises the question of what the phrase "not part of the operating system" really means, according to the diagram.)
Jul
1
comment Going through The C Programming Language K&R in Visual Studio
These are quite different languages. C++ is inspired by C and C# is inspired by C++ and Java, but they are by no means the same language, not by a long (or "long int", in C) shot.
Jun
19
comment When should the programmer's spoken language be used during development?
While I don't have an answer to your question, I feel I should point out something. Whatever answer you choose to follow, consider whether that answer would apply equally well to speakers of languages with more "exotic" alphabets - Greek, Russian, Indian, Chinese, Japanese, etc. (That is, would you be okay with the possibility of ever seeing identifiers in these alphabets, assuming the compiler supported it?)
May
30
comment Why are interfaces called interfaces?
@GeorgeHowarth Yeah, but interfaces can mean other things too. For example, an API can expose no "interface" types at all.
May
12
comment Does C++ compiler remove/optimize useless parentheses?
Um... What kind of optimization are you expecting, exactly? If you're talking about static analysis, in most languages I know of, this will be replaced by the statically known result (LLVM-based implementations even enforce this, AFAIK). If you're talking about execution order, it doesn't matter, as it's the same operation and without side effects. Addition needs two operands anyway. And if you are using this to compare C++, Java and C# regarding performance, it sounds like you don't have a clear idea of what optimizations are and how they work, so you should focus on learning that instead.
Apr
23
comment Why is there a new() constraint in C# but no other similar constraint?
@AvnerShahar-Kashtan I don't know. It may be an artifact of the compilation/decompilation process, like the t variable (which could be replaced by nested return statements).