Things People Don't Know They Need

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

Share your must have insights.


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.


Precisely :smiley: . One code base and a better user experience. :smile:

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.



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.

1 Like

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.

1 Like


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.

1 Like

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.


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

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

1 Like

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!

1 Like

Alternatives to rails “view layer”

I only have one right now ._.
But a good one :smiley:


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

1 Like

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)


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.