Learn new Rails features with Rails Play
2015, March 29

Build a playground to experiment with Rails quickly and easily

Ever wanted to quickly try out a new gem or experiment with a Rails feature? That's what Rails Play is all about. It creates a Ruby on Rails playground app containing a few models, seed data, controllers and basic CRUD views. Everything you need to start playing packed in one simple command, rplay -n. Check out RailsPlay.net.

The importance of experimenting

There's a thing I try to hammer as much as possible into the brain of people I coach: learn by experimenting features in isolation. This method is also recommended by Justin Weiss in his Practicing Rails book. In essence, it is the practice makes perfect mantra applied to coding with Rails.

When learning Rails, separate features into small, bite-sized blocks and try them out outside of the context of a larger project. That means building, building and more building test apps. Starting again and again with rails new, using scaffolds to generate models, controllers and views, preparing your database and seeding some data can become tedious and distracts you from your learning. This is why I made Rails Play.

What can Rails Play do for you?

Rails Play simply builds a Rails app with few models, associations, controllers and CRUD views much like rails generate scaffold would do. On top of that, it runs bundle install, it migrates your database and seeds it with some initial data. That's it. It's not much but it removes the friction of creating yet another test app just to experiment with a new gem or a Rails feature you want to try out.

Rails Play is not an app builder. You should not use it to start a new project. If that is what you are looking for, check out RailsBricks which is a full-featured Rails app builder.

Get Rails Play and start playing

In order to install Rails Play, you only need to have Ruby installed on your machine. Run gem install railsplay from the command line and you are good to go.

Create a new Rails app with Rails Play

Create the app:

rplay -n

Run your Rails server:

cd railsplay
rails server

Point your browser to http://localhost:3000.

Give your app another name

Simply specify the app name after the -n option:

rplay -n MyAppName

Note that Rails app naming conventions apply.

Skip bundle install and database setup

You can also opt for not having bundle install, rake db:migrate and rake db:seed to be run automatically after your app gets created. This can be useful if you want to change Rails version or add other gems to your Gemfile:

rplay -n --skip-bundle


rplay -n MyAppName --skip-bundle

Want to contribute or make a suggestion?

If you enjoy the tool and have an idea, a comment or a question, just open a new issue on Github or drop me a line.


back to top | share this on Twitter:


How to teach yourself iOS app development with Swift properly
2015, March 19

If you already tried teaching yourself iOS app development in the past but didn't quite make it because you couldn't get yourself into the intricacies of Objective-C, there's still hope. This hope comes in the form of Apple brand new programming language: Swift.

Much like my previous How To Teach Yourself articles, here is one comprehensive path for learning the Swift language and the iOS 8 platform. Interested in building great iPhone, iPad and maybe Apple Watch apps? Then read on...

What is Swift?

Swift is a new programming language made by Apple. It is designed for OS X, iOS and Apple Watch app development. First announced at WWDC 2014 on June 2, Swift was released officially on September 9, 2014. Right now, it is still a pretty new language but I don't think I'm mistaken if I say that in the future, this will become the de facto language for programming the Apple ecosystem and that it will ultimately replace Objective-C, an old and venerable language which first appeared in 1983, over 30 years ago.

Right now, there are many online courses, books and tutorials available for learning app development with Swift but there's no one stop shop to learn everything you'll need to become an app developer (except if you are already an experienced object-oriented programmer, then stop reading and go watch the iTunes U Stanford course on iOS 8. Everything you'll need is in there).

Where to go for a comprehensive learning?

So, here is the path that I would currently recommend to aspiring Swift developers eager to teach themselves:

Programming & Swift basics

First, and especially if you are new to programming or need a refresher, you'll want to learn some programming theory along with the basics of the Swift language. Team Treehouse has an excellent primer video course on the Swift language. Go register on the Team Treehouse website. If you use this referral link, you'll get a 50% discount on your first month. I don't think you'll need more than a month for following these courses: Swift Basics, Swift Functions and Optionals, Swift Enums and Structs and Object-Oriented Swift. These courses are taught by Amit Bijlani, an experienced mobile developer. Once you are done with these, it is time to move away from Treehouse. Of course, you can also follow the next Treehouse batch of courses on iOS development but I don't recommend them: they teach by mimic rather than giving an in-depth explanation of the concepts.

iOS 8 development basics: the design

When you code for an iOS device, you have to place an extra level of attention on how you design your app. A clumsy user experience or bad interface design are a common cause for Apple to reject your app from being published on the App Store. This is Apple, after all. The Overlords of design. I strongly recommend you learn this with Simon Allardice through his course at Lynda.com titled iOS App Development with Swift Essential Training. There, you will learn the intricacies of laying out your UI and connect it to your code, using Apple Xcode 6.

iOS 8 development basics: the SDK

Now that you should feel comfortable with building a UI for your app and use Table Views, Tab Bars and more, it is time to learn how to make your app do fun things! Beginning iPhone Development with Swift: Exploring the iOS SDK by David Mark, Jack Nutting & Kim Topley is your best bet. It will not only build on your UI crafting foundation, it will also teach you things like storing data on an iOS device, work with iCloud, Core Graphics, gestures, the camera, the accelerometer, the GPS and much more.

At this point, you should now be able to write cool apps, ready to be deployed on the App Store.

Going further

The web is loaded with resources on Swift and iOS development. Make sure you keep an eye out for new tutorials at Ray Wenderlich. Many of them are of great quality. Subscribe to Dave Verwer's iOS Dev Weekly newsletter as well. The information Dave presents is a goldmine.

Do you know any other excellent resource to learn iOS 8 development with Swift? Don't forget to Let me know. Happy learning!

back to top | share this on Twitter:

Want to learn web development? I'll teach you
2015, March 13

Since I started writing articles on my blog about learning how to code a few years ago and also through the RailsBricks site, I receive quite a lot of emails from people having questions about how to best learn web development and how to start a career as a coder. From time to time, I also get asked if I could mentor or coach aspiring developers. After pondering the idea for a while (and also working on the HowToCode.io project), I decided to offer individual one-on-one training on a permanent basis. As I love talking about coding and many of you are eager to learn, this seems like a good fit.

What to expect?

Learning a new trade such as web development can be a daunting endeavour. Many pick up a book or an online video course boasting that this is the resource that will turn you into a developer. Unfortunately, there is a lot more to that if you really want to be a full time web developer.

I'm not saying this will be easy but by learning with me, you'll progress much faster and will have a dedicated trainer able to answer all your questions while being guided on a comprehensive path containing all the topics you need to master before applying for a web developer position. I can even help you build your portfolio, edit your cv and make your profile stand out as well as coach you for a job interview.

Is it for anyone?

No. Before I start training you, we'll need to have an in depth discussion about who you are and what your goals are. I am not interested in showing you how to cobble bits and pieces of code together, I want to thoroughly train you as a professional web developer.

Limited availability, apply now

I don't intend to do this as a full time job. I love to code and I need to code. Thus, I have a limited amount of slots available for training developers. Apply now to secure a spot and maybe, soon, we'll spend some quality time together!

back to top | share this on Twitter: