« first day (705 days earlier)      last day (2550 days later) » 

Anonymous
12:31 AM
Evening everyone! I received my Hacktoberfest shirt!
 
12:47 AM
Congrats!
 
Anonymous
1:05 AM
The shirt is ugly, but I got stickers! Including a female octocat!
 
1:18 AM
Do they have a pic of the shirt online?
Or the stickers?
 
Anonymous
1:39 AM
No, but I can surely post them! Imgur?
 
Anonymous
Actually, let me post them on twitter. Easier for me on my phone
 
Here's the overly clever part of my day 15 solution: An enumerator using a recursive lambda:
def digits_adding_up_to(num_digits:, sum:)
  f = ->(yielder, digits = []) do
    if digits.size == num_digits - 1
      yielder.yield(digits + [sum - digits.reduce(0, &:+)])
    else
      digit_max = sum - digits.reduce(0, &:+)
      (1..(digit_max - 1)).each do |digit|
        f.call(yielder, digits + [digit])
      end
    end
  end
  Enumerator.new { |yielder| f.call(yielder) }
end
 
1:58 AM
My day 15. Now I can go look at @Cereal's solution.
@Cereal That's easy code to read.
 
e@WayneConrad \o/
I.. I don't even know what yours is doing
What's forwardable?
 
It's a standard library that lets a class easily forward methods to, for example, and instance variable.
class Foo
  ...
  def size
    @a.size
  end
end

# is the same as

class Foo
  ...
  extend Forwardable
  def_delegator :@a, :size
end
@cereal #digits_adding_up_to is complex because how I'm finding combinations of ingredients that sum up to 100 without brute-forcing it. Yours is better for getting the solution done without being as fussy as mine and I wish I had thought of it.
Anyhow, I stand by what I said earlier. For me, this one was kinda hard.
@Cereal I like the * method that your Ingredient class has. I wish I had thought of that.
 
2:29 AM
I wasn't sure if using that was proper or not
because it just returns an arbitrary array
 
Sadly I yet again did not save my day 15 solution :|
 
2:41 AM
But here it is, reconstituted more or less how I wrote it the first time:
#Sugar: capacity 3, durability 0, flavor 0, texture -3, calories 2
#Sprinkles: capacity -3, durability 3, flavor 0, texture 0, calories 9
#Candy: capacity -1, durability 0, flavor 4, texture 0, calories 1
#Chocolate: capacity 0, durability 0, flavor -2, texture 2, calories 8

weights = [[3, -3, -1, 0], [0, 3, 0, 0], [0, 0, 4, -2], [-3, 0, 0, 2]]

calories = [2,9,1,8]

max = 0
(0..100).each do |sug|
  (0..100).each do |spr|
    (0..100).each do |can|
      (0..100).each do |cho|
        next unless sug + spr + can + cho == 100
I wasn't lying when I said I'm going for speed and lazyness over best practices :p
 
@meagar I've written some of the spaghetti-est code for my challenges so far :P
 
I actually think I enjoy it more
I write good, maintainable code all day, every day, when it actually matters
Solving one-off problems with garbage throw-away code is actually really satisfying :p
 
Anonymous
Got my #Hacktoberfest merch! Thank you, @digitalocean and @github! I'm especially happy to receive a female octocat! https://t.co/aPcewABHXT
 
3:40 AM
Started putting my solutions up github.com/meagar/aoc
 
4:06 AM
Average time to solution is about 9 minutes for days 15 down to 10
 
 
1 hour later…
5:19 AM
Maaaaan, I just missed the leaderboard :(
I had to let my dogs out and lost 10 minutes
 
 
7 hours later…
12:44 PM
wI eyeballed the input for day 16, and nothing even remotely comes close to matching the desired output
 
Just woke up and reading day 16
this would be an easy one for the old IBM unit-record (non-computer) equipment.
 
I don't think the given values to match to the input are entirely accurate
Jk, got it
 
1:08 PM
I've got a count, but it's not what I expected. Oh well, let's feed it to the web page and see what it says.
Yep, my code is wrong.
 
Anonymous
I updated everything yesterday, and the default theme on my machine (adwata or something) is much bulkier now :-/
 
Haha! I misread the problem. I thought it was asking me to find the 'number of sues', not the 'number of the sue.'
 
1:23 PM
Oh,cool, I get to abuse lambdas again. I'll probably make meagar sad.
 
My #select is returning false...
._.
part 2 done
I am just not in the mood to write good code today
 
I didn't attempt to jam both solutions into one program this time.
 
@Cereal I write twice as much code as you guys do :(
 
But you usually write it better ~
 
1:36 PM
Maybe for this problem, but the last problem, who can understand all that junk I wrote? You said it yourself: "I.. I don't even know what yours is doing"
 
Anonymous
The flies are back. I think they like the smell of my hair mousse. What I don't understand is why they are here now... I have been using this mousse forever, even before I started working here. And the issue only started last month
 
@WayneConrad I think that has more to do with my lack of experience
@HunterStevens Do flies have noses?
 
@Cereal No, no, look. Check this out, and tell me whether it's "lack of experience" that makes this a dense knot of hard-to-understand code. This is from my day 15:
 def score(amounts)
    amounts.zip(@ingredients).map do |amount, ingredient|
      ingredient.coefficients.map do |coefficient|
        amount * coefficient
      end
    end.transpose.map do |a|
      a.reduce(&:+)
    end.map do |factor|
      [factor, 0].max
    end.reduce(&:*)
  end
@HunterStevens Someone threw some fruit away again?
 
@WayneConrad the only one I haven't done that for is Day 8
 
1:42 PM
Alright, I better go to work sometimes. The more I wait, the worse traffic gets. And the later I get to come home, which means I get the bad traffic coming home, too. Actually, I'm pretty much doomed at this point.
 
@WayneConrad I was just looking at that function
 
I might as well have written that function in APL.
 
I wrote something similar in mine
  def calc_totals(a)
    @ingredients.map.with_index { |ing, ind| ing * a[ind] }.transpose.map { |n| [n.inject(:+), 0].max }
  end
 
Anonymous
@WayneConrad No the trash cans are clean... The past week I coincidentally changed my hair product (balm instead of mousse), and the flies were not around. (Even if I ate food, there was at most 1) Today, I started using mousse again, ate food (same as the past week), and saw 2-3 flies
 
Anonymous
I just clorox-wiped the top of my desk, kb, mouse, and kb-slider-thing. Took 4 wipes, with 3 of them dark gray/brown (yuck!!)
 
Anonymous
 
Anonymous
They seem to be gone now... Looks like sanitizing everything worked!
 
@HunterStevens It's gross, but you could put up fly tape
 
Anonymous
@meagar (a) Yes that is gross, (b) People like to throw around a small foam ball, and I am afraid this will create a new office sport
 
Oh man
You do not want to play "throw the ball at the fly tape"
It's coated in the nastiest, stickiest stuff known to man
 
Anonymous
I do not want to play it, but I guarantee someone will want to, because, people
 
2:06 PM
I've been here an hour and a half and I've done nothing productive
today is not my day
 
Anonymous
2:22 PM
What I'll be deciding for the next hour: Next to ICE Servers, does the form input have an .l. or .I. ?? wiki.asterisk.org/wiki/download/attachments/27200129/…
 
Copy-paste into JS console, call toUpperCase on it :)
 
Anonymous
I mean, I am following an image, not text I can copy/paste
 
3:03 PM
Oh, I thought you took that screenshot
@HunterStevens In that case, it's an "L"
eagarm ~ $ nslookup stun.l.google.com
Server:		192.168.43.1
Address:	192.168.43.1#53

Non-authoritative answer:
Name:	stun.l.google.com
Address: 74.125.142.127


eagarm ~ $ nslookup stun.i.google.com
Server:		192.168.43.1
Address:	192.168.43.1#53

** server can't find stun.i.google.com: NXDOMAIN
 
Anonymous
3:52 PM
I have asterisk working (kind of)!! Yay
 
5:29 PM
Got to work late, been in meetings all day. Yay.
 
6:12 PM
I'm taking one of my projects out of mothballs... turns out my README is pretty bad for remembering how to set up the database. Darn you, past me!
 
Anonymous
7:03 PM
@Cereal do you work in an office? When you get a migraine at work, do you leave for the day? If not, how do you manage?
 
@HunterStevens I don't leave
Just keep working
 
Anonymous
Does it affect your focus at all? I do not have one right now, but I was worried I did. (I felt dizzy, and could barely focus earlier)
 
I just work. They're not as severe as they once were, or I've gotten inured to them, I'm not sure which.
 
It completely affects my focus. A lot of the time I just stare at the screen because I can't finish my thought
 
I'm somewhat stupid after a migraine, for anywhere between hours to days. But I start out kind of stupid anyway, so it doesn't make much of a difference.
 
7:07 PM
^ That's how I feel
 
Anonymous
Do you guys work in a cubicle, where starring at the screen looks like working?
 
Anonymous
I am in an open office environment, so I do not want to stare at the same screen for too long. IDK if my boss actually notices, but it is best to assume he does
 
I work in a cubicle
Definitely wouldn't want to work somewhere where my boss was breathing down my neck about how I was spending my time, though
 
Yup. But we have lower than avg so neighbors can peer in.
 
Anonymous
That does not happen here, but I would prefer a cubicle. I already keep to myself, so a physical barrier would be nice
 
7:18 PM
I wouldn't be able to work in an open office
I was be very stressed
I have an metric ton of deskspace, and I use it
so if I had to have people on the right and left of me
 
Anonymous
Why would you be stressed?
 
Wouldn't have enough space, people judging how I'm spending my time, noise
The closest person to me that I can hear is like 10 meters away, and their noise bothers me
 
Anonymous
Noise has been a problem a few times, where I actually put ear plugs in.
 
I'd probably get more work done, though
It wouldn't be as high quality
 
Anonymous
I have plenty of desk space... All I have is a mug, purse, monitor, tower, papers/pens, phone, and sanitizer. And the occasional snack
 
7:21 PM
Good quality headphones/earbuds are a must for me... I can't think straight with everyone talking around me -.-;
 
I have 3 pads of paper, 2 monitors, laptop, coffee, food, headphones, tablet, extbooks
 
Anonymous
You would be stressed because you feel you would be observed all the time?
 
Absolutely. I'm a private person
 
Anonymous
@Jared I have had those days a couple months ago... But now nobody phases me (usually). Headphones/music is distracting to me actually (at work)
 
@HunterStevens Ah, I usually turn it onto something bland and monotonous, like voiceless electronic tunes. Or if i'm feeling fancy some Hans Zimmer pandora
 
Anonymous
7:25 PM
@Jared Another issue I have with headphones is that if someone were to ask me a Q, I would not hear them immediately. I don't like when others do it, so I do not want to do it myself
 
Yea, people don't really wander around here without bugging me on IM first
I can see how that would be bothersome
 
Anonymous
In regards to people talking, IDK how it stopped bothering me recently. Maybe because I realized that I am not in the conversation (by default). => Example, everyone talking about sports or the weekend, I am not included or brought into the convo, so I assume NO convo includes me
 
Open environment. Can we find who invented the idea and whine at them?
 
Yea, then when they put us in cubes lets complain about no sunlight
 
Cubes are no good either.
 
Anonymous
7:27 PM
And when they install LED bulbs, complain how it's too bright for a Monday morning
 
Yea, i want a trashcan fire in the corner for that startup feel
 
Best environment is small offices surrounding a common area. Pair programming done in common area, calling your doctor or just taking a break from the team is done in your office.
 
Anonymous
@WayneConrad Like, a study room, but at work? I would hate to call the doctor in front of others. It is no one's business
 
Anonymous
...I just ate a whole sleeve of those townhouse slightly-buttered oval crackers.
 
I could get down with that... couches or tables with just monitors hanging out so i can hook up in the common area. Then my own person cube/area
1 more to go for a whole box!
 
Anonymous
7:29 PM
Aren't there 4 sleeves in a box?
 
Most people here have their own office
This cube is big enoug hto be an office
 
Anonymous
lol, a guy in the next room (same suite) is singing Magic Bus
 
I suppose there are 4 in the wide ones. I usually get the 2 packs (although the last time I bought some was probably a year ago) :x
 
Anonymous
@Jared we bought a variety "entertainment pack" or something. 2 or 3 sleeves each of 4 different crackers.
 
Well, I never knew there were entertaining crackers
 
Anonymous
 
@HunterStevens No, you have your office--with a door--for that.
 
Anonymous
I would only want a cubicle so I can feel like I am in my own space, myself. Internet history is not an issue, because given we are an ISP, that stuff is easily tracked.
 
Anonymous
@WayneConrad I completely misread that.
 
Anonymous
Does anyone here pair program? We do not do that, but we only have 7 or so devs (including myself), each with their own projects/assignments
 
I do. Not as part of a normal work, but probably 20% time doing so
 
Anonymous
7:37 PM
The closest thing to pair programming I do is (with a coworker, though) =>
 
Anonymous
!!wiki rubber duck debug
 
Rubber duck debugging is an informal term used in software engineering for a method of debugging code. The name is a reference to a story in the book The Pragmatic Programmer in which a programmer would carry around a rubber duck and debug their code by forcing themselves to explain it, line-by-line, to the duck. Many other terms exist for this technique, often involving different inanimate objects. Many programmers have had the experience of explaining a programming problem to someone else, possibly even to someone who knows nothing about programming, and then hitting upon the solution in the...
 
I generally PP when there is a new bit of functionality going in. Sit and talk it through with another dev then get that feature's training wheels on together. Then one of us runs with it once its all setup and the other goes back to whatever.
 
I rubber duck my supervisor
that's pretty close to pair programming
 
7:50 PM
I used to. It's difficult and wonderful.
 
@HunterStevens I do occasionally pair program, with great results.
It can be a huge productivity booster
 
 
1 hour later…
Anonymous
9:15 PM
In Rails, I know you can render partials. Is the same possible for vanilla html?
 
No
 
Anonymous
So the only thing to do is repeat yourself?
 
Or don't use vanilla HTML.
 
Depending on your web server, you may be able to embed one file in another with a server-side directive
 
gg23
 
Anonymous
9:17 PM
Well, a site for a plugin we want to use is meh, but the html ughh.
 
But yes, if you're in plain old HTML, you're going to copy-paste a lot. This is why PHP and every other web-oriented language sprang into existence :)
 
Anonymous
There can be a lot of improvements - doubango.org/sipml5/index.html?svn=20
 
9:34 PM
Once again, FactoryGirl's magic makes it impossible to tell why it's doing what it's doing. I'm just about fed up with magic. Rails magic, FactoryGirl magic, all kinds of magic.
Grr.
 
You know what the solution is?
More magic.
2
 
Hah!
Looks like FactoryGirl is off the hook this time. Instead it's the activerecord sql server adapter.
Magic. Sheesh.
 
10:17 PM
It seems like whatever you do wrong in FactoryGirl, you get "undefined method name for ...:Symbol"
 
11:13 PM
How a simple typo can actually end up being totally confusing. I guess the same could happen to me too :)
 
11:56 PM
Awesome link
 

« first day (705 days earlier)      last day (2550 days later) »