Monthly Archives: September 2013

Frustrations in Learning to Code – How to Stay Motivated

My Rails course is now over – no more structured learning, no more homework or assignments due, no more regular help where I can ask all my stupid questions.

I want to stay on top of it – but sometimes things happen that demotivate me a bit. For example…

  • When I go to RoRo events, or development hubs, I should be getting inspired by all the experienced and intelligent people there, but I actually find myself focussing on how much I don’t know. Because I’m a bit mental like that.
  • When I think of all the things I don’t know, I make a big list of all the things I need to try, the resources I need to read, the videos I need to watch and the tutorials I need to do – and I get massively overwhelmed. I have trouble focussing, and feel like I’m trying to learn everything, and am getting nowhere.
  • When friends/family look at the apps I’m building, ignore the functionality and focus on “you should add some colour, different font, pictures, background” – I think about how I have no inspiration r.e. design, and that as long as my things don’t look good, no one is going to want to use them (oh great, ANOTHER skillset I need to learn).

So – What am I doing to keep on top of it, and not wallow in self pity?

  • Stop comparing! I need to stop comparing myself to people who work in development full time and/or have been working on their development skills for years. I’m new to this, I need to admit that skills take time to learn. Otherwise, everyone would be genius coders.
  • Do a little bit of learning each day. Sure it seems like I have a never ending list of things I need to read, watch or do – but if I can manage to do even a small bit each day, then even if I am not making a dent in the mountain, I am still learning things and moving forward.
  • Keep building. Although my skills are limited, I have three projects I am working on, and by trying to build them I am slowly but surely increasing my skills and continuing to learn.
  • Stay connected. I am going to keep going to RoRo nights, development hubs and meet ups with my class mates. I am even going to Rails Camp in November! I know that staying home is lazy and easy, but going and mingling makes everything seem more possible.
  • Make deadlines. I have not really been doing this but I really think I should be. I know that I am more likely to get things done if I make deadlines for specific tasks. E.g. Add this feature before 20th September. Finish this Rails book by end September.

I’ve said it before, but I need to keep reminding myself: It’s not that  ”I’m not good at this”, but “I’m not good at this yet!”

Leave a reply

Tips on Using Devise (For Beginners)

Devise is an awesome, popular gem for handling authentication in Rails. Using Devise means even the newest of newbies can get authentication working on their app.

The Devise documentation on GIT is excellent, but I am making my own notes here because I discovered that every time I install Devise, I have the same issues (my forgetfulness). So here are my steps to installing Devise (for beginners).

Step 1: Add the Devise gem to your Gemfile

gem 'devise'

Step 2: In Terminal, run bundle.

$ bundle

Step 3: In Terminal, run
$ rails generate devise:install

Step 4: READ WHAT IT OUTPUTS IN TERMINAL (This is the bit I always forget and skip). The requirements are covered in the next few steps…

Step 5: Ensure you have defined default url options in your environment files. So, in config/environments/development.rb you can add the following at the top (after the first line of code, so it is in the code block)
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
Step 6: Make sure you have defined a root URL in your config/routes file. e.g.
root 'book#index'
Step 7: Make sure you have flash messages in your app/views/layouts/application.html.erb

<%= notice %>

<%= alert %>

Step 8: If you are using Rails 3.2 (OLD!) it tells you to make another change in config/application.rb

config.assets.initialize_on_precompile = false

Step 9: And finally, if you want to be able to make changes to the Devise Views, you should run this command
$ rails generate devise:views

Step 10: Now it’s time to generate your User model (or Admin, or whatever your authenticating model is).
$ rails generate devise User
Step 11: Don’t forget to migrate your database, then restart your server
$ rake db:migrate

Step 12: Now you have all you need to start authenticating users! Remember to check out the new Devise folder in your Views if you want to customise any of the login or edit forms.

Step 13: You should also run

$ rake routes

to see all the new routes you have, so you can start linking to them. E.g. linking to a new_user_registration for a new signup or new_user_session for a sign in.

Here are the simple ones I have used in my navigations previously:

<% if current_user %>

  • <%= link_to 'Settings', edit_user_registration_path(current_user) %>
  • <%= link_to 'Sign out', destroy_user_session_path, :method => 'delete' %>
    <% else %>
  • <%= link_to 'Sign in', new_user_session_path %>
  • <%= link_to 'Sign Up', new_user_registration_path %>
  • <% end %>

Now that I’ve done this blog post, I’m all ready to cut and paste every time I make a new app!

Leave a reply

3 Things That Changed The Way I Learn To Code

During July and August I attended a 10 week (part time) Back End Web Development course at General Assembly. Now that the course is over, I wanted to make a few notes about my experience there, and why I think I got so much out of it.

Firstly – doing a structured course helped me enormously because it got me out of my comfort zone (reading and learning), and got me into creating things. Previously I had been watching videos, reading blogs, doing online tutorials – but not really building or creating anything. At the GA course I was forced to create a little console app halfway through the course and a bigger web app by the end of the course. I was also making other little practice apps for homework.

Now, as any coder anywhere will probably tell you – the best way to learn is by doing, and by being forced to just shut up and code, my learning moved forward faster than ever before.

Another great thing I got out of the course was understanding what all the errors mean. Previous to the course, errors were scary, and could result in me deleting a whole app and starting again. Now that I understand more about errors, and now that I know that they a) should be expected and b) are almost always fixable, I’m not so scared of them and I can just work through them until they’re fixed.

But by far the best thing about the General Assembly course was the tutor Ben Askins. This guy is super experienced, but also super patient and helpful. He went the extra mile to give us as much help as we needed, even coming in on a weekend. He also helped introduce us to the larger Ruby community, encouraging us to attend Ruby events. This was something I had always been scared of doing – (so shy). But getting involved in the Ruby community helped me connect with other people who were at my own level (reassuring) or people who were willing to help me learn (surprising number of these kind of people in the Ruby community).

So, whether you’re planning on attending a proper school, or are trying to teach yourself to code, these are the three things that really made me learn so much faster and more effectively.

  1. Building things – not just reading or watching
  2. Becoming comfortable with errors
  3. Meeting the community (scary for some people, I know).


2 Replies