# Things People Don't Know They Need

**URL:** <https://metaruby.com/t/things-people-dont-know-they-need/495>\
**Category:** Ruby Chat\
**Created:** [April 27, 2016, 1:46pm UTC](https://metaruby.com/t/things-people-dont-know-they-need/495 "2016-04-27T13:46:20Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielpclark](https://metaruby.com/user_avatar/metaruby.com/danielpclark/32/823_2.png) [@danielpclark](https://metaruby.com/u/danielpclark)\
**Post date:** [April 27, 2016, 1:46pm UTC](https://metaruby.com/t/things-people-dont-know-they-need/495/1 "2016-04-27T13:46:20Z")

</div>

It’s common for people to be interested in things that are current or relevant for them and so they will skip pass many blogs and articles thinking that they’re not either of these.

**This thread is for anyone who knows something awesome that people are unaware of just how much they need it. Just give a brief explanation of what it is and what it’s for.**

I wrote an article that explains how to have just one code base in Rails and still do everything that adding a front-end javascript framework would do without having to learn or write any AJAX. See it here: [Unobtrusive JavaScript via AJAX in Rails](https://blog.codeship.com/unobtrusive-javascript-via-ajax-rails/)

Share your must have insights.

---

<div class="post-metadata">

**Author:** ![kofno](https://metaruby.com/user_avatar/metaruby.com/kofno/32/159_2.png) [@kofno](https://metaruby.com/u/kofno)\
**Post date:** [April 27, 2016, 1:52pm UTC](https://metaruby.com/t/things-people-dont-know-they-need/495/2 "2016-04-27T13:52:44Z")

</div>

I’m a long time fan of ujs in rails. It’s how I do most of my JS on this platform. I’ve seen some well known ruby folks who don’t like it, but I’ve found it to be great way to avoid having to have logic on the server _and_ the client.

I like to write my rails apps as just request/response apps, and then sprinkle ujs magic in places where I’d like a better user experience, without waiting for the full page loads. It works really well.

---

<div class="post-metadata">

**Author:** ![danielpclark](https://metaruby.com/user_avatar/metaruby.com/danielpclark/32/823_2.png) [@danielpclark](https://metaruby.com/u/danielpclark)\
**Post date:** [April 27, 2016, 1:57pm UTC](https://metaruby.com/t/things-people-dont-know-they-need/495/3 "2016-04-27T13:57:43Z")

</div>

Precisely 😃 . One code base and a better user experience. 😄

Figuring out how to call the UJS when the page was loaded took a while. Many peoples solutions on S.O. just won’t work. I’ve found using a period as a hyper link as a good place holder to then target with jQuery.

---

<div class="post-metadata">

**Author:** ![AstonJ](https://metaruby.com/user_avatar/metaruby.com/astonj/32/8_2.png) [@AstonJ](https://metaruby.com/u/AstonJ)\
**Post date:** [April 27, 2016, 2:02pm UTC](https://metaruby.com/t/things-people-dont-know-they-need/495/4 "2016-04-27T14:02:08Z")

</div>

Ruby.

A lot of people do Rails stuff without learning Ruby. Ruby is so easy to pick up that this really should be the first thing anyone who wants to do Rails to do.

A Kindle.

Learning and continuing to learn is really important imo, and having a Kindle makes this so much easier - not just because of the size and connivence, but because of the technology. Paper ink is much easier for you to read and the lack of constant flicker much less fatiguing for the brain (which should mean you take things in better).

A good code editor with a theme designed for modern displays.

You spend so much time looking at and working with code that you want a decent code editor and a theme that is easy on the eye.

---

<div class="post-metadata">

**Author:** ![danielpclark](https://metaruby.com/user_avatar/metaruby.com/danielpclark/32/823_2.png) [@danielpclark](https://metaruby.com/u/danielpclark)\
**Post date:** [April 27, 2016, 2:15pm UTC](https://metaruby.com/t/things-people-dont-know-they-need/495/5 "2016-04-27T14:15:27Z")

</div>

**Taking Regular Breaks**

The body’s metabolism switches to sleep mode if you remain stagnant for about two hours. It’s important therefore to be active periodically to maintain a healthy metabolism and your health. Some people implement the Pomodoro Technique (_P.T. focusses on mental agility_) which normally is a break every 25 minutes from your work. Personally I feel better at blocks of 45 minutes of work with activity in between each session (_with my focus on my metabolism_). _Breaks also help refocus on whether you’re doing what you ought to be doing._

---

<div class="post-metadata">

**Author:** ![danielpclark](https://metaruby.com/user_avatar/metaruby.com/danielpclark/32/823_2.png) [@danielpclark](https://metaruby.com/u/danielpclark)\
**Post date:** [April 27, 2016, 2:58pm UTC](https://metaruby.com/t/things-people-dont-know-they-need/495/6 "2016-04-27T14:58:42Z")

</div>

**Blinders**

You’ve seen horses with blinders on. This is for helping them focus on just what’s ahead of them. When you want creative big ideas it’s best to have open space and high ceilings. But when you want to focus then wearing a baseball cap with some fabric over it to block your peripherals will hone in your focus and allow narrow focus. A man made blinder goggles with pin holes in them and won a memorization competition. The narrower you shield your field of vision the easier it is to focus on what’s directly before you.

Sound plays a part as well. If you can narrow the direction of sound, or better yet wear ear phones or ear plugs, you will get sharper focus.

Ever noticed how when you’re focussing and there is a distraction you try to mentally block it out? This happens on many levels all of the time. Our brains are good at what they do. But by physically blocking things you’re helping your mind avoid peripheral distractions and empowering it to give more attention to your current focus.

---

<div class="post-metadata">

**Author:** ![kofno](https://metaruby.com/user_avatar/metaruby.com/kofno/32/159_2.png) [@kofno](https://metaruby.com/u/kofno)\
**Post date:** [April 28, 2016, 12:24pm UTC](https://metaruby.com/t/things-people-dont-know-they-need/495/7 "2016-04-28T12:24:58Z")

</div>

I just try not to work in marathons. I get up if my coffee cup is empty, or if I just accomplished a task. Also, a couple times a day, I’ll work out on a heavy bag.

---

<div class="post-metadata">

**Author:** ![kofno](https://metaruby.com/user_avatar/metaruby.com/kofno/32/159_2.png) [@kofno](https://metaruby.com/u/kofno)\
**Post date:** [April 28, 2016, 12:27pm UTC](https://metaruby.com/t/things-people-dont-know-they-need/495/8 "2016-04-28T12:27:13Z")

</div>

Here’s a post that’s a couple years old about UJS (DHH calls this SJR).

[https://signalvnoise.com/posts/3697-server-generated-javascript-responses](https://signalvnoise.com/posts/3697-server-generated-javascript-responses)

TLDR; use the right tool for the job. If you’ve got a high fidelity UI, then use a JS framework (or Elm 😉) and go for it. For most apps, SJR is probably a better, simpler solution.

---

<div class="post-metadata">

**Author:** ![danielpclark](https://metaruby.com/user_avatar/metaruby.com/danielpclark/32/823_2.png) [@danielpclark](https://metaruby.com/u/danielpclark)\
**Post date:** [April 28, 2016, 6:13pm UTC](https://metaruby.com/t/things-people-dont-know-they-need/495/9 "2016-04-28T18:13:08Z")

</div>

> [@kofno](#):
>
> If you’ve got a high fidelity UI, then use a JS framework

One thing that may lead me to a JS framework would be persistent apps on iOS and Android devices. I’ve heard that JS apps can be native & offline on iOS but I haven’t looked too much into it. Otherwise I’ll steer clear of using JS too much.

I’ll check out that article in a bit… Thanks!

---

<div class="post-metadata">

**Author:** ![PikachuEXE](https://metaruby.com/user_avatar/metaruby.com/pikachuexe/32/854_2.png) [@PikachuEXE](https://metaruby.com/u/PikachuEXE)\
**Post date:** [April 29, 2016, 1:36am UTC](https://metaruby.com/t/things-people-dont-know-they-need/495/10 "2016-04-29T01:36:48Z")

</div>

Alternatives to rails “view layer”

- [http://www.sitepoint.com/introduction-to-cells-a-better-view-layer-for-rails/](http://www.sitepoint.com/introduction-to-cells-a-better-view-layer-for-rails/)

I only have one right now .\_.  
But a good one 😃

---

<div class="post-metadata">

**Author:** ![danielpclark](https://metaruby.com/user_avatar/metaruby.com/danielpclark/32/823_2.png) [@danielpclark](https://metaruby.com/u/danielpclark)\
**Post date:** [April 29, 2016, 1:43am UTC](https://metaruby.com/t/things-people-dont-know-they-need/495/11 "2016-04-29T01:43:16Z")

</div>

Awesome! **Love the cell idea.** Only thing I don’t like is their use of haml.

---

<div class="post-metadata">

**Author:** ![PikachuEXE](https://metaruby.com/user_avatar/metaruby.com/pikachuexe/32/854_2.png) [@PikachuEXE](https://metaruby.com/u/PikachuEXE)\
**Post date:** [April 29, 2016, 1:56am UTC](https://metaruby.com/t/things-people-dont-know-they-need/495/12 "2016-04-29T01:56:08Z")

</div>

You can use other template languages: ERB, Slim (Not sure RABL or JBuilder supported, need to ask)  
Also you don’t even need a template, you can just return `String` or other things (but for caching I think you still need to return string, not sure)

---

<div class="post-metadata">

**Author:** ![kofno](https://metaruby.com/user_avatar/metaruby.com/kofno/32/159_2.png) [@kofno](https://metaruby.com/u/kofno)\
**Post date:** [April 29, 2016, 11:56am UTC](https://metaruby.com/t/things-people-dont-know-they-need/495/13 "2016-04-29T11:56:21Z")

</div>

I like that it scopes helpers. I haven’t integrated cells yet. Not sure what’s bugging me, but haven’t lept in yet. But that part is so much better then global helpers.
