1,105 reputation
922
bio website
location Europe
age
visits member for 2 years, 6 months
seen Apr 19 at 4:47

A software developer by day, a human developer by night.


Mar
10
comment The dream of declarative programming
@jamesqf You can't really see the point without actually trying yourself (I'd recommend QML of Qt for playing with declarative ideas). Imagine someone who only knows imperative programming, and them trying to understand point of OOP or functional programming without actually trying it out for real.
Mar
10
comment The dream of declarative programming
@jamesqf In declarative programming, you would just state that something is sorted. You could declare sort order be bound to some variable/property. And then it would be so. No need to explicitly call sort every time new data is added or sort order changes.
Mar
9
comment Why aren't `void *`'s implicitly cast in C++?
It's worth noting, that casts through void* are more unsafe in C++, because with the way certain OOP features are implemented in C++, pointer to same object might have different value depending on pointer type.
Jan
22
awarded  Enlightened
Jan
22
awarded  Nice Answer
Dec
28
comment Are all magic numbers created the same?
@supercat Case by case I think. If it is a single bit, use << to indicate which bit, for example. If it is kilobyte division, then I'd use decimal number. Etc, case by case.
Dec
20
comment Are all magic numbers created the same?
This answer could benefit from a mention, that some "obvious" numbers, 1024 definitely being one, are such that other developers are very likely to spontaneously write them as numbers, even when someone defines a named constant for them. I for one most likely would not even think of searching the source code for existing constant for 1024 if I didn't already know there is one, if I needed to use 1024 in byte amount conversion.
Nov
8
comment Is it good practice to rely on headers being included transitively?
A note about including unnecessary headers, it does matter to compilation times, first of directly (especially if it is template-heavy C++), but especially when including headers of same or dependency project where the include file also changes, and will trigger recompilation of everything including it (if you have working dependencies, if you don't then you have to be doing clean build all the time...).
Nov
8
comment Is it good practice to rely on headers being included transitively?
Note about order of includes: sometimes the order is important, for example when including X11 headers. This can be due to design (which might in that case be considered bad design), sometimes it is due to unfortunate incompatibility issues.
Oct
27
awarded  Yearling
Sep
24
awarded  Autobiographer
Aug
27
answered Multithreading: am I doing it wrong?
Jul
2
awarded  Curious
Jun
28
reviewed No Action Needed Checked vs Unchecked vs No Exception… A best practice of contrary beliefs
Jun
26
awarded  Custodian
Jun
25
reviewed No Action Needed Is hadoop designed only for “simple” data processing jobs, where communications between the distributed nodes are sparse?
Jun
25
comment Is template “metaprogramming” in Java a good idea?
Indeed, assuming there is a performance benefit now, without measuring is folly. Your goal could be, make sure code gets inlined and optimized by JIT. Another thing is, if it works and doesn't need maintenance, don't fix it.
Jun
23
answered Is there a benefit in compiling your code as you go along?
Jun
23
comment Is there a benefit in compiling your code as you go along?
Quite often scripting code is developed "live", that is it is executed in REPL environment. So "compilation" indeed happens all the time, most code that is written to the source file has also been executed once. Not all write script code this way, but I'd say anybody used to and fond of the relative "safety" of statically typed languages and compiler errors given by bad code, they should work in scripting languages this way.
Jun
12
comment How to name a method that both performs a task and returns a boolean as a status?
@Doval about premature optimization: exceptions are often fundamental architectural aspect, and by the time there is meaningful profiling data, it's too late to change, it'd need too many changes. Premature optimization argument only really applies to internal implementations, parts that can be easily changed.