737 reputation
411
bio website github.com/ahammar
location Trondheim, Norway
age 28
visits member for 3 years, 8 months
seen 2 days ago
\\\  \\\
 \\\  \\\  
  \\\  \\\  \\\\\\\\
  ///  //\\
 ///  ///\\\ \\\\\\\
///  ///  \\\

May
24
comment In languages that don't allow underscores in integer constants, is it a good practice to create a constant for 1 billion?
Consider writing 1e9, 10^9 or 1_000_000_000 if the language you are using supports it.
Dec
1
comment Why is the sudden increase in number of Git submitters on Debian popcon graph in 2010-01?
By the way, it's popcon (popularity contest), not popcorn.
May
5
comment Is it bad practice to name an unused variable with a single underscore?
Strictly speaking, at least in Haskell, _ is a pattern, not a variable. It's a subtle difference, but it means that you can use it multiple times in something like (x, _, _) = ..., whereas trying to bind the same variable multiple times would be an error.
Feb
4
comment Is there any reason why most programming languages don't have '!>' (not greater than) and '!<' (not less than) operators?
They are, however, usually not equivalent when using floating-point numbers. For example, comparing anything with NaN is false, so !(2 < NaN) == true, while (2 >= NaN) == false.
Dec
6
comment Does simplicity always improve Readability?
@Steve314: [a..b] is syntactic sugar for enumFromTo a b, so they are exactly the same.
Nov
15
comment Introducing Programming To a Mathematician
Also, Eleven Reasons to use Haskell as a Mathematician.
Oct
3
comment Should we attempt to review all our code?
@TomSquires: Exactly. When you've been working with a piece of code for a long time, you can become "blind" to otherwise obvious flaws in it, because you see it as what it's supposed to be instead of what it is. These problems will be easier to spot for someone who has never seen the code before. Writers have the same problem, and just like books don't get released without proofreading, code should not be released without review. There are also other benefits to doing code reviews, for example it's good for transferring knowledge between the members of your team.
Aug
29
comment If this is camelCase what-is-this?
like-this-casing is very common in LISP/Scheme variants.