« first day (433 days earlier)      last day (2822 days later) » 

00:25
@Apoph1s Welcome. Just ask, and if someone can help, they will.
 
4 hours later…
04:29
@Mohamad thank you for your insight )
 
6 hours later…
10:29
Good morning!
11:52
I would like to block access to all the controller actions from a single entry point. I am using pundit gem right now. Is it possible to block all access to controller action for whose policy is not set.
12:37
anyone here implemented a counter in rails? Like github issue numbers, for example.. when you create a repo, issues start out numbered at 1, 2, etc...
is there something out there that does this, before i reinvent the wheel?
there's probably a gem for it
what do you need it for?
i have an Issues model
and its scoped to a phase, a project if you will
i need to number the issues so that i can reference them in the feed
so instead of saying "mohamad created issue 'remove this wall'" I can say "mohamad created issue #1"
and below it i can have a text excerpt...
I'm afraid not...
i could use the id column if there only ever 1 project, but clearly this is not the case
I m not aware of something that's ready made like that
12:43
i have to have an issue_number column that defaults to 1... then, when a new issue is made it has to have the number 2, 3, and so on...
it sounds like a db trigger :D
use the before_save hook
have it increment the issue number
morning
@Kitler yeah, I'm looking for something slicker though, but that might have to be it...
gems, gems everywhere
12:58
seems like an awful lot of code for something that ought to be simpler
It can be dealt with like this: Issue.where(project_id: 1).maximum(:sequence) + 1
 
1 hour later…
14:30
how do you make an ajax request to rails via PATCH?
mine keeps throwing 404 BUT PERFORMING the action
14:49
Good morning all
hey wayne!
so get this wayne, they told me i have been put into the final round of interviews 3 weeks ago and I STILL haven't heard back
i mean what the .. ? its one thing to tell me i am not accepted i would have been fine with that but to tell me i am ACCEPTED and then NOT CALL ME is just retarded
15:07
Hmm. I think I'll go look on the workplace site about that.
I'm sitting in a waiting room draining my phone's battery. That gives me something to do.
lol
does this make sense?
respond_with(@order) do |format|
    format.js
end
26
Q: How do I properly follow-up with a hiring manager, to check on the status of a position?

IsziI had an interview on Monday, which I think went fairly well. I was told that I was the last to interview for the position, and that they were expecting to make their decision by that Friday. I also sent a thank-you note via e-mail to the hiring manager, CC to the other interviewers, on the Tue...

I don't know if that makes sense it not.
Battery down to 85% after two hours. Mostly browsing web trying to figure out this Android programming thing
15:55
I don't know if it's ironic, but it is at least annoying that the Android dev pages aren't mobile friendly
every site that is not mobile friendly is automatically annoying in my book
lol
16:51
@Nithin I think respond with is getting deprecated. i would stear clear from it. even if it were not, which i think isn't true, it obfuscates too much...
17:30
why must rails fight me on everything x.x
I m adding a virtual attribute and have attr_accessor :notifications in the model, what more do you want -.-
there needs to be another framework for ruby
competition would be good
there was one can't remember the name, wayne linked it a while ago
i mean look at PHP.. with all the frameworks
and ruby has.. RAILS.
lol
comparing ruby to php is not really nice :P
grab a keyboard and bash your head and voila you got a php framework
lol
not wanting to start a flame war but that's not really fair to php either
17:44
no flamewar, php has it's uses but most people out there write crap code
I m not talking about laravel/symphony and co
the php community seems to be working really hard to improve the language ..
There is Sinatra for ruby right? but its more or less lightweight rails :P
yeah that's the one
17:55
The one I've had my eye on is lotusrb.org
I can't vouch for it, but it claims to be about the things I care about. It's still new.
looks really promising
18:17
I don't like Rails any more is a pretty good summary of what I think is broken about Rails, and explores Lotus a little.
Disclaimer: I'm not really a Rails programmer, and not entirely qualified to have opinions about it.
I got the battery down to 55% with five hours of pretty continuous web browsing, watching videos, and 10 minutes of playing a game. My goal today is to drain it. To learn how long it takes, what happens, and how long it takes to charge it after. And because I'm home from work today, and need to fill the day with amusing things to do.
18:56
your phone?
i have an lg g3 and my batter lasts for 48 hours
Maybe I've got a defective battery, then.
@Kitler Yeah, got an android phone.
19:11
< basement keyboard hero
Username change?
yup
Cool. I had a pair of cats, twins, nicknamed Kittler and Pussulini. They were little terrorists.
hahahahahha
so much win
 
1 hour later…
20:25
Pussulini is brilliant!
I wish I could take credit for it. A friend of mine at the time came up with it. Very bright fellow.
I find it shocking that someone can have a controller action that size
sorry, but that's insane. I've worked on some complex applications and never even came close to a controller action that size
that to, demonstrates a fundamental lack of design principles... surely there is some design pattern to solve this like presenters, form objects, service objects, etc...
@Mohamad Link?
@WayneConrad for what? the design patterns part, or what I'm talking about?
I'm talking about the link you posted "I don't like Rails anymore"
oh yea
i saw that 2 and i was horrified of the controller lol
20:37
I didn't actually read that code... I was watching the video on my phone, and it was kinda small.
but i think he was trying to make a point
I thought it was lots of controller methods... I didn't know it was one big method. Either way, yuck!
21:09
Mmmm, cherry crisp. Mom is home after an outpatient surgery, and she's requested that I make her a cherry crisp. How can I refuse that?
hola
aaaand now I have a craving for pie
was wondering if anyone could sanity check this
class DudeBro
def initilize(name, awesomeness)
@name= name
@awesomeness = awesomeness
end
def dudePrint
puts "Name: "+ @name+ " Awesomeness:"+ @awesomeness.to_str
end
end
tom = DudeBro.new('Tom',5)
Throws this

wrong number of arguments (2 for 0)
21:29
@Btuman Misspelled initialize.
@WayneConrad today is not my day
thanks!
(btw feel free to share that pie recipe)
Haha! Ok. She printed it off the web. Let me see if I can find the URL.
Oh, it's a Paula Deen recipe. I was wondering why it called for butter in 25 pound blocks.
hahahahaha
By the way, you could do puts "Name: #{@name} Awesomeness: #{@awesomeoness}". The .to_str is done for you when you use interpolation.
\o/
21:38
@Ahmad Hello, welcome!
o/
:D
@OcuS And to you too, sir. Welcome.
There's soda in the 'fridge. Bar opens after dinner. Please don't leave a mess.
can I haz ownership of "Ruby :: Sometimes on rails" room plz
Ummmmmm. No?
21:40
KTHXBYE
@OcuS :)
I marked the room as a favourite. Expect me to lurking around from now on.
@Ahmad That'd be great!
:)
Oh oh. I need to find an "FFTs for dummies who goofed off during Calc class" page.
21:52
@ocus
sorry
YES?
:|
class DudeBroHaus
def initialize(dudeBros)
@dudeBros = dudeBros
@dudeBros.sort_by!{|bro| bro.awesomeness}

end

For what ever reason, the sort by breaks when I try to initialize a dudeBroHaus with an Array of dudeBros

undefined method `awesomeness' for nil:NilClass
(repl):20:in `block in initialize'
(repl):20:in `each'
(repl):20:in `sort_by'
(repl):20:in `sort_by!'
(repl):20:in `initialize'
(repl):75:in `new'
(repl):75:in `initialize'
undefined method `awesomeness' for nil:NilClass
(repl):20:in `block in initialize'
I thought I understood FFTs enough to do what I need to do, then I found this that talks about sliding windows, 1D, 2D and 3D, and I realized I don't know anything
but dude bro has that method
def awesomeness
return @awesomeness
end
@Btuman When you paste code, you can format it as code by selecting a section of it and clicking on "fixed font" on the right. That works when you edit your post, too.
@Btuman First, you can replace your def awesomeoness...end with attr_reader :awesomeoness. A little trick Ruby will do for you.
@Btuman The problem is that your array contains a nil.
21:58
@wayne
do I need to alter the sort_by method when switching in attr_reader :awesomeoness
No. attr_reader builds you the exact equivalent of the reader you had coded by hand.
wayne, I checked the array, i don;t see any nils in any of the ones I am trying to test
Let's confirm that. Try p dudeBros.any?(&:nil?) before the sort. If that prints false, then you're right.
ill pop that in in a sec
By the way, your names are funny. I don't think I've ever seen a DudeBroHaus class before. Actually, I'm sure of it. :)
22:15
lol thanks, you should see the names in my test scripts
22:27
Oh, window functions. I have to learn about window functions.
For someone who doesn't care to do the math, I'm making myself do a lot of math.
22:56
the company windows or are you doing some awesome home automation project
I'm trying to teach my Android phone to decode Morse code.
via sound?
ah
via sound
Which I need to apply to the sample stream before applying a FFT. Apparently.
Yep. I've learned how to capture sound samples. I've got a minute of morse code audio in a file on my PC. I'm going to use that to learn how to do the processing, because Ruby is way easier for playing around in. Then I'll take what I learned and code it in Java (ugh) on this phone.
a friend of mine suggested an app that responded to sneezes
23:01
in various languages
23:46
It looks like nobody does FFT in Ruby.
The most popular Ruby FFT library has 6000 downloads or something. The NArray gem is popular, and supposedly does fft, but it's documentation is worthless.
Woohoo! The fftw3 gem worked.

« first day (433 days earlier)      last day (2822 days later) »