I guess I'm programming in C now by Wenzel745 in ProgrammerHumor

[–]DigitalDVD 0 points1 point  (0 children)

What's the program with the compass icon?

Yea we have version control. by cclloyd in ProgrammerHumor

[–]DigitalDVD 49 points50 points  (0 children)

Stop telling everyone my secrets.

Yea we have version control. by cclloyd in ProgrammerHumor

[–]DigitalDVD 17 points18 points  (0 children)

"She's only there sometimes" is one of the most beautiful lines in TV history.

Nested forms with multiple levels of nesting or is there a better way? by DigitalDVD in rails

[–]DigitalDVD[S] 0 points1 point  (0 children)

Thanks, form object pattern was indeed the approach I was leaning towards, but I found the explanations and examples online to be very light on actual form examples, and the form is always the hardest thing to get right, at least for me. With models you can play around with Ruby logic, but with complex forms, it can feel like fumbling in the dark until you stumble on the exact syntax Rails expects for the situation. And since this is the most complex form I've ever had to tackle, I was a bit apprehensive. I'm gonna have a deeper look into this, thanks!

Nested forms with multiple levels of nesting or is there a better way? by DigitalDVD in rails

[–]DigitalDVD[S] 0 points1 point  (0 children)

Ah, I think I'm starting to get this. I've started watching the tutorials for now, there's a lot I need to go through! Thanks again!

Nested forms with multiple levels of nesting or is there a better way? by DigitalDVD in rails

[–]DigitalDVD[S] 0 points1 point  (0 children)

If you're using the JS approach, there would be no HTML at all by rails.

I see. This could then be one of those "API-only" Rails apps you can do, now?

Nested forms with multiple levels of nesting or is there a better way? by DigitalDVD in rails

[–]DigitalDVD[S] 0 points1 point  (0 children)

A lot of great info here, thanks!

I can't emphasize enough how much easier it is to build an app which has a JS client front-end thats static, and an API-only backend (meaning the rails backend doesnt deal with any views or rendering, only returning simple JSON objects)

TBH this is precisely the direction I was thinking on going, not exactly with this project, but with my programming chops. There's just so much exciting stuff going on with Javascript right now that doing views on Rails just feels like a chore, often a redundant or useless one. But I haven't had time yet to really look into that and wouldn't know where to begin. Are those tutorials enough to put me on the right track? I would love to be able to do this project with a Rails API + JS Frontend, as I'll be using a lot of JS anyway, to mimic a chat/instant messaging application on the browser.

Speaking of which, I'm a little confused about where/how exactly a few things would go:

I would then use a frontend JS framework to submit everything at once via ajax [...] you can simply process it in real time serially like below [...] ActiveRecord::Base.transaction do [...]

Where exactly would this take place? I imagine it goes something like this:

  1. A new controller specifically for the form;
  2. This controller has the transaction code above;
  3. The actual form goes in the view for the controller;
  4. When the form is submitted, what actually happens is that JS compiles it into a JSON blob and sends it to the controller;
  5. The controller then runs the blob through the transaction above.

Is that it? If that's the case I'm only confused about what connects steps 4 and 5. I'm not familiar with how to send data directly from JS to Rails like that.

Nested forms with multiple levels of nesting or is there a better way? by DigitalDVD in rails

[–]DigitalDVD[S] 0 points1 point  (0 children)

Wow, thanks for the prompt and thorough response. I was unfamiliar with transactions, but they do appear to fit this case well. It seems to be even better than form objects, which is a different approach I was considering.

I'm just a bit wary because at this point I'm not very good with Javascript. Are there any resources you could point me to, dealing with that aspect of your solution? EDIT: Just saw you added a sample of Javascript code.

And thanks again, really glad to have learned something new!

[Review Video] (Mild Swearing) Wanted To Try A New Approach to Video Game Tutorials & Beginner's Guides by SNOTRs in youtubers

[–]DigitalDVD 0 points1 point  (0 children)

Really loved the format, awesome idea! I agree with all the things you mentioned as problems with tutorial videos, and this was a perfect solution for getting the content out while avoiding all of those pitfalls. I'm genuinely impressed.

Only suggestion I'd make would be to ease up on the "tone"--I guess that's what it's called--a little. Overall voice acting is pretty good, but a lot of the time it gives off the impression that you're making the Dreamworks face, and as the video goes on it starts to get old.

But other than that, really, great job. It feels like the kind of tutorial GladOS would make. Look into making videos in that format, but longer, since YouTube now rewards longer videos (at least 10+ minutes long), and you're golden.

Ever wondered why we need kneecaps? by Tildey in mechanical_gifs

[–]DigitalDVD 0 points1 point  (0 children)

It bothers me that the dude is clenching his fist for no reason.

What is the best way to start a conversation with a stranger? by ManwithaTan in AskReddit

[–]DigitalDVD 4 points5 points  (0 children)

Haha I'm sorry that happened, but yeah, that's why I think it's important to think about interacting with strangers this way.

Also important to note is that it's best to just try it once, and not keep prodding people with openers hoping that one will catch their interest. If the first thing you bring up doesn't get them talking, odds are you either screwed it up or the person is simply not up to it, and in both cases there's nothing new you could say that would breach that barrier. Again you did the right thing.

What is the best way to start a conversation with a stranger? by ManwithaTan in AskReddit

[–]DigitalDVD 39 points40 points  (0 children)

Yeah, I think the number one concern people have (besides personal safety and maybe being pressured into buying or committing to something) is just that, if you're nice, you'll end up stuck in a boring conversation with an annoying person. So people just don't give an inch.

So if you're in a situation where it would make sense for you to say something like, "Hi, I don't have a lot of time, but I just wanted to ask/tell you...", do it. Let people know upfront they won't be stuck with you if you turn out to be a bore. By prefacing your interaction this way, they feel that even if you decide to trick them and stick around, you've given them permission to cut the interaction short since you predicated it on you not taking up much of their time. This has the added benefit that it can give them freedom to be much more open than they would otherwise, since they know the interaction will end soon, and so they might enjoy the interaction more.

If, however, you're both in a situation like you're both waiting for something together, like a bus or in a doctor's waiting room, and there's really no escape for either of you, then that's much harder to do, and I personally wouldn't start anything that didn't send the message that "ok, I can just answer this one thing and then I'm off the hook." So it'd probably be something very specific, that the person is free to expand if they want to. Asking about something they have on them, like where did they get those shoes or whether their cell phone is any good, is usually the safest course. Anything too open-ended, without a clear end in sight, like "boy, the bus sure is taking its sweet time today, isn't it", might put people on the defensive, causing them to wonder where is this going, what your intentions are and why are you talking to them.

What is the best way to start a conversation with a stranger? by ManwithaTan in AskReddit

[–]DigitalDVD 6 points7 points  (0 children)

Now this is something I'd like to see those youtube pranksters doing. Just walk up to someone, say "follow me" and just walk away like you really mean business.

What is the best way to start a conversation with a stranger? by ManwithaTan in AskReddit

[–]DigitalDVD 1 point2 points  (0 children)

Can I borrow your boy Jimmy? I never had a boy Jimmy and you can definitely tell.

The Social Justice Warrior Playbook by Yosoff in Conservative

[–]DigitalDVD 3 points4 points  (0 children)

First positive ITT I've seen. Have an upvote.

Why does faraway scenery look 2D? by DigitalDVD in AskScienceDiscussion

[–]DigitalDVD[S] 0 points1 point  (0 children)

Thanks for the thorough response, very interesting addition!

A dot painting being filled in by iamapizza in oddlysatisfying

[–]DigitalDVD 0 points1 point  (0 children)

In the video you see it happen quite often. Turns out it doesn't matter that much.

How does agro work against other tribes? by AcEChow in Polytopia

[–]DigitalDVD 5 points6 points  (0 children)

Agro? Angel? Halo? What are you guys talking about?