Such Blog

Migration From Rails 3.2 to Rails 4 With Devise, Hstore, Facebook Oauth and Bunch of Stuff

In this article, I’ll try put best things thet I found, when I was upgrading one of my Rails app from Ruby on Rails 3.2 to Ruby on Rails 4.0.2.

  • Upgrade your Ruby version at least to 2.0(I would recommend 2.1)
  • Upgrade bundler
  • Upgrade your application to the most recent Rails 3.2 version
  • Check gems compatibility ready4rails4.net
  • Write more tests, they’ll be very usefull

I recommend to use bunch of usefull gems to upgrage your app step by step:
gem protected_attributes
gem active_resource
gem actionpack-action_caching
gem activerecord-session_store
gem rails-observers

So first – watch the video: (http://railscasts.com/episodes/415-upgrading-to-rails-4)
Then modify your Gemfile, if you have an assets group, it needs to be removed…
Don’t forget:
– to update any gems that require something special
filter_parameters
secret_key_base (you can use rake task: ‘rake secret’)
strong parameters
– …

Some links that may help you:
Edgeguides upgrading-from-rails-3-2-to-rails-4-0
Upgrading to Rails 4.0 from Rails 3.2 – Test case – Part I (preparations, configuration, gems) http://upgradingtorails4.com/

Hstore:
postgresql-rails-4-countdown
using-arrays-of-hstore-with-rails-4

If you’ll have a problem with devise strong(unpermited)parameters:
http://stackoverflow.com/questions/18629221/unpermitted-parameters-devise-oauth-rails-4
https://github.com/plataformatec/devise
https://coderwall.com/p/bsfitw

Comments are welcome – I think you mast finish this small article wiht your pain %)

JS Course Lessons & Materials

Links:

http://programmers.stackexchange.com/questions/16528/single-statement-if-block-braces-or-no
http://www.sketchingwithcss.com/samplechapter/cheatsheet.html
http://resin.io/happy-18th-birthday-javascript/
http://mrpotes.github.io/jshint-extension/
http://tech.pro/tutorial/1743/javascript-template-engine-in-just-20-lines
http://ejohn.org/apps/learn/
https://github.com/coolwanglu/vim.js
http://plnkr.co/edit/3URdRjICx4wpVQCRf5y7
http://www.storminthecastle.com/projects/goo.js/
https://github.com/johnrobinsn/goo.js/blob/master/src/goo.js
http://en.wikipedia.org/wiki/Grey_goo
http://perfectionkills.com/exploring-canvas-drawing-techniques/
http://oridomi.com
http://ubilabs.github.io/geocomplete/
http://www.html5rocks.com/en/tutorials/canvas/performance/

=== Home works, practics ====
http://plnkr.co/edit/AqkKoXLYOl5gdWSuQkIN
https://docs.google.com/document/d/1dxcOKLLkVPBOF46XQspO3PLmTKsEvp5Fk0IBgkbpKs4/edit
https://github.com/sudodoki/sample-utils-test

RoR Course Models and ActiveRecord

Models…

Links

  1. active_record_basics
  2. migrations обратить внимание на
    2.1 Guides RoR
    2.2 migrations and seed data
  3. association basics

Home work

“Свой Twitter” ;)
Есть пользователи, твиты, подписки, ответные твиты, темы оформления и профили в социальных сетях. Пользователи могут подписываться друг на друга.

Истории:
Как пользователь, я могу указать разные профили в соц. сетях
Как пользователь я могу написать твит
Как пользователь я могу подписаться на другого пользователя
Как пользователь я могу ответить на любой твит
Как пользователь я могу выбрать одну из существующих тем оформления сайта

Задача:
– Спроектировать БД,
– Создать модели и миграции
– Связать модели отношениями

JS Course Fourth Lesson

js_basics

Links1(css):

http://lea.verou.me/css3-secrets/#intro
http://lea.verou.me/more-css-secrets/#intro
=== methodologies ===
http://bem.info/method/
http://oocss.org/
http://www.kapowaz.net/articles/cargo-cult-css
=== preprocessors & mixin libraries ===
http://sass-lang.com/guide
http://compass-style.org/
http://bourbon.io/
http://lesscss.org/#synopsis
battle-of-the-less-mixin-libraries-less-elements-vs-less-hat-vs-bootstrap
http://learnboost.github.io/stylus/
http://visionmedia.github.io/nib/
== less vs stylus vs sass – mixins ==
https://gist.github.com/paulmillr/2005644

Links2(JS):

http://learn.javascript.ru/
http://www.w3schools.com/js/default.asp
http://bonsaiden.github.io/JavaScript-Garden/
https://developer.mozilla.org/ru/docs/JavaScript

Books:

Douglas Crockford, JavaScript: The Good Parts
Nicholas C. Zakas, Maintainable JavaScript
Stoyan Stefanov “”JavaScript Patterns””
Stoyan Stefanov “”Object-Oriented JavaScript””
John Resig “”Pro Javascript Techniques””
Eloquent JavaScript
Nicholas C. Zakas, “”Professional javascript for Web Developers, 3rd Edition””
Addy Osmani, Learning JavaScript Design Patterns

Home work1

moqups

Home work2

gist

Work From Home - Hints & Tips.

When I first did remote, I didn’t know what working from home was going to be like. As a programmer, I’m fairly social. I had never done it before. I was worried that I’d cabin fever with no division between my work and my home life. So, I’m still working at home, and I haven’t gone crazy yet :) But I got some tips and rules that helped me out and I’d like to share them with you:

  • the minimum remote team size should be consisted of two persons. Always have a buddy, even if your buddy is on another continent.

  • to be effective, remote teams need full autonomy and have aleader who has a strong vision and the power to fully execute on that vision.

  • focus (by far, focus is one of the hardest skills to master when you work from home)

  • get organized. Maintaining balance is one of the most difficult aspects of working at home, because the work is always right there.

  • have a set work space. Designate a specific place for a home office, try not to make it next to bed or a TV.

  • plan your day. This will help you minimize your distractions and maximize your true productive times.

  • avoid home distractions. Pets, TV and family members are just a few other distractions you’ll encounter when you work at home.

  • limit the number of times you check e-mail, facebook, twitter… You might find yourself constantly checking e-mail because you’re worried about being out of the loop.

  • brush up on your communication skills. Because you’ll be doing your work remotely, you’ll need to have excellent communication skills.

  • set office hours. Make sure to create a time slot for each of the day’s activities.

  • take breaks. When making your schedule, you might want consider working in smaller spurts, when you take breaks, you’ll be more productive.

  • get out of the house. If you’re telecommuting for much of the week, be sure to get out of the house often enough.

  • team status reports. Each team should produce a brief, summarized rundown of: what we did last week, plan to do this week, anything that is blocking us or we are concerned about.

  • persistent mailing list. Virtual bulletin board, place for announcements, weekly team reports, and meeting summaries.

  • quality internet service. Currently I have one optical connection one ethernet connection and mobile connection for reserve.

  • good chair, desk, keyboard, and mouse. If you thought you spent a lot of time at your desk in an office, just wait. You will spend even more time at the desk when working from home.

  • power protection. At home dealing with power outages and protecting the equipment from power spikes and dips are your responsibility.

  • laptop/notebook. Working from home, you will need to be on the road at last once in a while.

  • gym membership. Getting to the gym is an important part of staying healthy and sane. If you don’t like the gym, take walks or go for jogging every day.

  • useful staff:

join.me
screenhero.com
openbsd.org
gnu.org/software/screen/
google hangouts
ssh-productivity-tips VirtualPairProgramming
remotepairprogramming.com
zolrath wemux
c9.io
nitrous.io

These tools are great, but it’s equally important to remember to make use of them and be proactive while communicating with your colleagues. After all, your team trusts you to be productive and available while you work from home, so make sure to check in with them periodically and let them know how things are going. Don’t go dark and leave them wondering what you’re doing-by the time they call you to ask, they’ll already be irritated with you.

In the end, collaboration tools are only part of the telecommuting picture. A lot of it has to do with dispelling the notion that working from home is the same as taking it easy, and keeping an open line of communication with the people at the office that need you.

If you can master the art of staying available while being productive, telecommuting can be the best way to get more done without the distractions of the office.

P.S. simple rules from Brian Tracy to become a genius and get the work done:
– Concentrate on one goal at a time
– Develop your problem solving skills – find your approach
– Have your list of goals, make written plan
– Open your mind, ask questions(What if?)

And the fun part:
http://theoatmeal.com/comics/working_home

Share your tips in the comments.