tutorial

Learn how to code for Windows and/or OS X
2015, May 5

Both web development and mobile apps development are quite trendy things to be doing right now. But what about regular ol' PC or Mac apps? They are known as fat clients and if you look a bit around you, they are everywhere. Computers are not going away anytime soon so being able to build Windows or Mac apps is a great and challenging skill to possess. Just take a look at how many programs you are using on your computer: see? Somebody had to make them at some point and why couldn't this somebody be you?

First, learn how to code

Whether your chosen path is developing for the web, mobile or fat clients, you will need to learn the basics, namely programming. If you've already written code (other than HTML and CSS, that is), you can skip this. If not, continue to read.

At this point in your path, it is way too early to choose what kind of programmer you will become. You need a gentle introduction to what programming really is. There's just the book for that: Python for Kids: A Playful Introduction to Programming. Don't be fooled by its title, this book is very much suited for adults too. It will show you what a program is and how you can build simple ones using the Python programming language.

Choose your path: Microsoft Windows or Apple OS X

Now that you know what programming is and that you wrote your first computer programs, it is time to choose for which platform you want to build apps: Windows or OS X. I won't compare them or enter the any kind of discussion as to which one is better. We'll leave that to the people who believe one is better than the other. While it is perfectly possible to develop Windows apps on a Mac using dual-boot with Bootcamp or running Windows in a virtual machine, just know that if you are going down the OS X path, you'll need a Mac as it is not possible to build Mac apps on Windows.

1. Learn how to make Windows apps

First, you'll need to learn a programming language suited for Windows development. The bits of Python you learned from the previous book won't be enough to create triple A Windows programs. This language is C# (pronounced 'see sharp'). Once again, I know just the book you'll need to get you started: Pro C# 5.0 and the .NET 4.5 Framework (Expert's Voice in .NET). You will both learn the C# language in depth as well as learn how to use Microsoft's code editor tool, Visual Studio. Note that Microsoft offers a free version of Visual Studio, Visual Studio Community, that packs everything you will need to build awesome Windows apps.

Once you are done with this (big) book, I'd advise you to learn even more C# by getting one of my all time favorite technical book: C# in Depth, 3rd Edition. In this book, Jon Skeet will shed a lot of light on topics that may still be a bit obscure such as delegates, events, lambdas, and so on. By the way, if you want to read a bit about delegates and events, I wrote a few tutorials covering just that: Understanding and implementing events in C#.

Now, you are ready for the last bit: Windows Presentation Foundation or WPF for short. WPF is the framework that allows you to create great UI's for your apps and link them to your code. Although the learning curve might be a bit steep, I found that this book by Pavel Yosifovich does a great job at teaching the basics of WPF and beyond: Windows Presentation Foundation 4.5 Cookbook.

If you reached this point, pat yourself on the back, you are now armed to conquer the world of Windows fat clients and an exciting new software developer career is awaiting you! Or maybe, you now want to learn how to build Mac apps? Then, read on.

2. Learn how to code for the Mac

At this point, you have written your first programs using the Python language. It is time to learn another language suited for building Mac apps: Swift. Swift is a rather young language that was first introduced by Apple in June 2014 in order to replace their aging Objective-C programming language. If you ever tried to teach yourself Objective-C but gave up due to its complexity, rejoice: you don't need to anymore! This path only uses resources focusing on Swift.

To learn Swift, Team Treehouse has a great video course. 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 who does a great job at laying the foundation you'll need in order to learn Cocoa, the Apple framework used to build OS X applications. Don't dismiss the free Apple eBook on Swift, The Swift Programming Language. I would advise you to quickly read it right after Treehouse's lessons. If at some point you need a quick syntax refresher, check out my other site, MySwiftTips: you'll not only find tips and tricks for building iOS and Mac apps, there are also tips dedicated to the Swift language. I've also built a serie of playgrounds you can use to experiment with the Swift syntax: swift-cheatsheet.

Speaking of Cocoa, now is the time to learn it! Get Cocoa Programming for OS X: The Big Nerd Ranch Guide (5th Edition). Aaron Hillegass and team from the Big Nerd Ranch will teach you all the intricacies of building stunning apps for the Mac.

At this point, you should be equipped to distribute some awesome apps on the Mac App Store!

Any other resource?

Do you know of any other great resource you really enjoyed to learn how to build Windows or Mac apps? Let me know or tweet.

back to top | share this on Twitter:


I need a sponsor for the next version of RailsBricks!
2015, April 28

RailsBricks, the Rails app builder, has become quite popular in its one year and a half of existence and is now in its 3rd version. With Rails 5 just around the corner, now is the time to start working on the next RailsBricks iteration.

I would also love to add a new huge feature to RailsBricks 4: an integrated app deployment tool! How amazing would it be to graduate from PaaS and be able to just type rbricks --deploy myserver, letting RailsBricks do all the setup for you (create a user, install and configure a web server, take care of generating and copying your SSH key, etc)?

To make this happen, I will need some help, though. I need one or more sponsors willing to help making RailsBricks 4 the awesomest web app builder (and show their support for a little open-source project with big ambitions).

Why do I need sponsoring for RailsBricks 4?

I have a full time job and am also currently working on several other projects such as Humblepad as well as giving online development courses. Initially, RailsBricks is just a tool I built to make my life easier and go from an idea to a working app as fast as possible. I didn't think it would become a tool used and loved by many but it happened. That is really awesome and I'm happy with this situation but the other side of the coin is that now, I also need time to care for it. For example, each time new versions of Ruby or Rails are released, I take less than a week to produce an updated version of RailsBricks. I keep adding features, fixing quirks, answering support requests and am mostly doing this alone.

The vision I have for RailsBricks 4 has a much larger scope than before. I'd love to give you THE best Rails app builder out there and add more awesome features.

Obviously, this would take some time from me away from all the other things I do and as I still need to eat and pay the rent, this unfortunately has a cost. This is why I'm looking for sponsors that would allow me to take that time in order to make RailsBricks 4 not only happen but also without compromising on my vision. If you are interested in becoming a sponsor (or know people who know people), contact me.

RailsBricks 4 features I'd like to add

As I see it, RailsBricks 4 would pack all the existing (but rewritten) features currently in version 3 and these:

  • the option to create a discussion forum
  • generate both valid Rails 4 and, soon, Rails 5 apps
  • a plug-in system to allow other developers to add features to RailsBricks
  • a complete app deployment tool also able to configure your server from scratch
  • a comprehensive documentation and tutorials

Don't you want this to happen? Then help me! Get in touch and let's talk if you want to know more.

back to top | share this on Twitter:


tutorial

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

or

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.

Enjoy!

back to top | share this on Twitter: