Page 1 of 2 | Next »
[13:31:07] eelster: I mean you certainly can make a personal blog in rails and it's not particularly hard to do so, but learning rails is a bit more difficult than using a wordpress blog on the whole.
[13:35:33] eelster: But if you're writing your own application for the first time in rails you're probably going to have security holes as well. No insult to you at all, major companies have that.
[13:37:05] eelster: dminuoso: Yeah. I immediately distrust most people who call themselves "experts". I've found that the people who know enough to know they're not experts are generally much better at giving advice.
[13:38:01] eelster: Yep. It is really hard. That's why companies pay tons and tons of money for pen testing.
[13:39:41] eelster: I'm certain. I had this boss once that would dismiss any security concerns you brought to him saying "IPSec handles this". To this day, I don't know why he thought that was a good answer. This dude was sending plaintext passwords over port 80 "IPSec will take care of this".
[13:42:34] eelster: Like, if you were packet sniffing you could've gotten the password as I demonstrated to him in wireshark.
[13:45:50] eelster: Oh. It sounds like he was actually correct about that IPSec stuff. He was so wrong about most of everything else I had just assumed he was making that up as well.
[18:04:05] eelster: Zarthus: the size of `int` in C isn't standard. You can find out how big it is on your system by compiling and then running this program https://hastebin.com/fahapazohu.c
[18:05:19] eelster: Or you should probably use "%lu" instead of "%d" in the specifier, but it doesn't really matter as the number isn't going to be that large, but that's bad practice on my part.
[17:05:01] eelster: some_var= is a method, @sum_var= is not, so receive(:some_var=) works because that's a method name.
[17:12:46] eelster: Wait so when you use something like attr_writer :test it doesn't write the method
[17:14:09] eelster: I wasn't saying use it without a receiver. I was just leaving off the `expect(obj).to` for brevity as the receive method was the only part I was really talking about.
[17:40:13] eelster: Pry is kinda great sometimes though especially if you use it with the extensions that let you step into methods and go line by line.
[18:07:20] eelster: Ohh ok with sort that makes more sense. I wasn't able to get it just using > or <.
[18:08:13] eelster: Yeah which is why if you have nil on the left it will give you a NoMethodError instead of an ArgumentError because > and < aren't defined for nil:NilClass.
[18:11:53] eelster: If you don't mind my asking, why does the error message matter? They're both ArgumentError in terms of handling.
[18:14:12] eelster: So you can use #compact to remove the nils from the array if you'd like to, but if it's a problem that nils are there than it's worthwhile investigating that.
[18:16:34] eelster: Like I said, it depends upon if it's ok that the nils are coming in or not. It's too vague to know either way.
[18:18:03] eelster: I use it with DBs a fair amount if I'm looking for an optional field in a table.
[18:21:50] eelster: Normally it's from a collection that I've already gathered of all the data then I have to sometimes iterate through a specific column. It's not a super common use, but I definitely have it. It'll be like if I have something like this, but probably with a much better example: https://hastebin.com/oxilevumiy.rb
[18:22:17] eelster: And with more behavior between the first query and the if statement so I actually end up doing something with all_people
[18:25:55] eelster: I always just get sad looking at the new features knowing that we're probably only going to keep using Ruby 2.3 probaby next january where we'll finally upgrade a bit.
[20:42:54] eelster: Oh wow that's weird I must've messed up when I used / to search the man irb for irbrc.
[20:43:38] eelster: Yeah, pry is great and I actually load it in my irbrc, but I'm using jruby just to test one thing and I don't really want to install the gems loaded in my irbrc into jruby.
[23:11:49] eelster: nacsurte I don't believe so. You can check if a key is in a hash by using the #key? method.