« first day (1041 days earlier)      last day (3275 days later) » 

23:04
Or a Marilyn Monroe quote
I call shenanigans. This is horse twaddle. People can put anything in wikipedia, but it don't make it true. That is not a legitimate contraction. No sane Southener would contract the 'would' in that context. The smallest it'd get'd be "y'all wudnv". — Mitch yesterday
@JeroenVannevel Next profile: "I heard you like quotes."
Given a function that expects a number, would it make more sense to return false/null if the input is not a number, or to throw something like IllegalArgumentException?
Depends on what the function is doing.
If you're trying to divide a number and the input is not a number, I'd throw IllegalAE.
Splits a number into a list/vector of its digits
123 => (1,2,3)
return an empty list
23:10
Will it also split abc into (a, b, c)?
I always found it best to make those kind of functions passive
@Mast Negative
I'd throw it.
Prevent unexpected output.
Now, making it return an empty list would still make it evaluate to true, while returning nil would eval to false
If somebody is doing something with your function your function shouldn't be doing in the first place, you should ask yourself whether you want to allow it. If not, throw.
23:12
That was my initial thought^ but was wondering if it would make sense
(defn explode-num-to-digits
  "Given a number N, returns a list of its separate digits.
  Throws IllegalArgumentException is N if not a number."
  [N]
  (try
    (if (number? N)
      ;; Does this one-liner need documentation or is it clear enough?
      (map #(Character/digit % 10) (str N))
      ;; else...
      (throw (IllegalArgumentException. "Input is not a number")))))
Looks pretty decent methinks
It'll be part of a bigger thing I'll put up for review later
@PinCrash exception
invalid input is exception
returning an empty list is how you'll end up with Javascript code
7
lol gotcha
0
Q: DAL Naming conventions

Jonathan AllenI'm working on a new data access library (not ORM, but not as Spartan as Dapper either). In terms of naming conventions, which do you prefer: version 1 dataSource.FromTableOrView("Customer", new {CustomerKey = customerKey} ).AsModel<Customer>().Execute(); dataSource.FromTableOrView ("Customer", ...

. 13 questions
oh god why
23:32
0
Q: Merge sort through vectors C++

halouxFirst off, thanks folks for the review. There are a couple of things that I want to accomplish here. I want to create a CLI program that takes two given size vectors, merge sorts them and then spits it out. My implementation compiles fine, but sometimes I get subscript out of range errors. This u...

nice
23:53
@nhgrif That's SO, how's your CR badge progress looking for those 3?
Going great.

« first day (1041 days earlier)      last day (3275 days later) »