posted 8 days ago · 11 minutes read
Through the year, I have written three posts about learning web development. One with Ruby, one with Python and one with C#. Together, these three posts account for over 25% of the traffic on my blog. As I am receiving an increase of emails from people asking if the books I recommend are still up-to-date, I think now is the perfect time to revisit them and consolidate them here. Do you want to learn how to code? Read on... .
First, I want to make a distinction between cobbling bits and pieces together to produce a quick Minimum Viable Product - MVP - and programming. This guide is all about learning how to program, not how to copy-paste bits of code to build something that is somewhat usable. Therefore, don't expect to learn everything and be proficient in a month. If you are a dedicated learner, it will take you at least a year.
Of course, this guide assumes that you can operate your computer and do some basic tasks such as copying a file and installing a program.
I've already said it in one of the original posts, writing HTML and CSS is not programming. Both are markup languages, they work hand in hand and are used to specify how a web page looks. You wouldn't call writing a Word document programming, would you? Still, you will need to learn how to write HTML and CSS. That's exactly where we'll start.
Before you jump into the specifics of your chosen path (Ruby, Python or C#), you will need some basic knowledge that will be applied to any kind of web development. That is:
HTML stands for HyperText Markup Language. It is by using HTML that you instruct web browsers (Chrome, Safari, Firefox, etc...) which elements a web page will contain. A paragraph, a header, a bullet points list, an image and so on.
CSS, the acronym for Cascading Style Sheets, is responsible for telling a browsers how HTML elements should look. The font color, the size of images, the position of your paragraphs and much more.
To learn both HTML and CSS at the same time, get the book Head First HTML and CSS. This will be your starting point. After reading this book, you'll be able to create small static web sites. Static, as opposed to dynamic, means that your pages won't offer user interaction such as a sign up page or dynamic content generated from a database such as a product catalog. But let's not jump ahead.
Git is a version control system. It keeps track of changes in your code files and allows you to revert them at an earlier stage if you made a mistake. If you later plan to work with other coders, using a version control system is not an option. There are many different version control systems such as Microsoft Team Foundation Server, Mercurial, SVN or Git. Go with Git. It's quite a popular version control system. In order to learn Git, you can have a look at my Learn to use Git and remote repositories in 15 minutes post to get a decent overview and then complete the free online tutorial at Git Immersion.
In order to create dynamic web apps, at some point, you will need to store data. Any kind of data. Whether blog posts, user profiles, player scores and so on. That's what databases are for. In order to navigate through a structured database, you make use of one language called Structured Query Language or SQL for short.
You won't need to become an expert database administrator to develop web apps but will still need a good understanding of what they are as well as a basic knowledge of SQL. That knowledge you'll get it by reading the book titled Sams Teach Yourself SQL in 10 Minutes (4th Edition).
First, let me get this straight: whatever language and framework you decide to learn, all of them will allow you to get to the same result: developing web apps. There's no best language. Each of them have their strengths and weaknesses but ultimately are well suited for the task at hands. Also, note that once you'll have learned a stack, switching to another one will be far easier than starting to learn from scratch. Understand that no one can answer the question which language should I choose? except you. I can offer a few insights, though:
Now is the time to make a choice. Take your time, search online for these three options and find some feedback. Done? Alright, then jump to the section related to your choice.
Before jumping into C# itself, you will need a foundation of what coding actually is. Unfortunately, I've never found a reference to learn the basics of programming which uses C#. That is why I recommend that you first learn the basics using this book: Python for Kids: A Playful Introduction to Programming. Don't let the title fool you: it is an excellent introduction to programming! I keep recommending that one. And yes, it's Python so even if you go the C# route, you'll gain some basic Python skills along the way.
Armed with a better understanding of what programming is, you can dive into an introduction to the C# language with Head First C#. As of this writing, the latest edition of the book makes use of Visual Studio 2012. Visual Studio 2013 has been released for a while but most examples will work with both versions. Or you can install Visual Studio 2012 to follow the examples exactly as they are presented to you in the book (there are free versions of Visual Studio, the Express editions).
C# is an object-oriented language. You picked that up from the previous book. If you still have some issues wrapping your head around the concepts, you can read the short OOP Demystified. You will really need to master these concepts to become a good C# developer.
After all these introductions, it's time for something more technical. Professional C# 5.0 and .NET 4.5.1 is the book you are looking for. These 1498 pages will give you a deeper understanding of the C# language as well as how it interacts with the latest version of the .NET Framework. Sections of the book are dedicated to various types of programs you can build using C# such as Windows applications and Web applications.
To complete your basic training with C#, there's one book that is not optional and ranks among my all-time favorite programming books: C# in Depth, 3rd Edition. Learn from it thoroughly. It highlights and explains a lot of concepts many C# developers are not comfortable with. Things like delegates, lambdas, etc.
Congratulations! If you made it so far, you should now know how to build awesome web apps with C# and the .NET framework.
At first, you will need some programming basics. As it turns out, there's one book that will teach them to you using the Ruby language: Learn to Program, Second Edition (The Facets of Ruby Series).
Before you can get your feet wet with web apps development, you'll need a better understanding of the Ruby language. Read these two books, in this order: Eloquent Ruby (Addison-Wesley Professional Ruby Series) and then Practical Object-Oriented Design in Ruby: An Agile Primer (Addison-Wesley Professional Ruby Series).
When it comes to developing web apps using the Ruby language, the popular Ruby on Rails framework is your best bet as a beginner. Unfortunately, I can't recommend any book for the newcomer. There isn't any that I know of. Those that are supposedly intented for beginners skip too many concepts and don't really explain the magic behind Rails apps. That's where the Ruby on Rails: Level 1 Course from The Pragmatic Studio comes in. Know that compared to a book, it is not a cheap course at $179. But believe me, it's worth it.
You now have two options to get the knowledge you will still be missing with Rails. Sign up for Ruby on Rails: Level 2 Course which will cost you $135 if you bought the Level 1 or read Agile Web Development with Rails 4 (Facets of Ruby).
When you reach this stage, you should be a well rounded Rails developer, ready to go out on your own! Congratulations!
There's a book that's well-suited for getting the basics of programming: Python for Kids: A Playful Introduction to Programming. No kidding. Don't let the title distract you. It is one of the best introductory text for learning how to program. It will teach you the basic knowledge you will need to master before continuing on your learning path. Actually, it is a book I also recommend if you choose to follow the C# path.
Now that you have some Python and programming basics, you'll need to really understand what object-oriented programming is. This is what you'll find in Python 3 Object Oriented Programming. Don't skip this one, it's a gem!
If C# has ASP.NET MVC and Ruby has Rails, Python has the Django framework in order to code web apps. To learn Django, first complete the Django tutorial on Django's official site. Then, further your education with Two Scoops of Django: Best Practices For Django 1.6.
And now, you should be able to create fantastic web apps with Python! Congratulations!
What about other technologies? You may have heard about Java, PHP, NodeJS and more. They are all valid and widely used web technologies but unfortunately, I don't have enough experience using them to recommend a clear learning path.
What about other resources? I can recommend the resources listed in this guide because I have a direct experience with them, whether reading them or teaching using them. You will notice that some Amazon books listed here use my referral id. It is not a ploy to make money but know that if you buy any of the resource listed in this guide, I receive a little something from Amazon. I would recommend these resources nonetheless and that's what I've done in my past guides.
Word of caution: whatever resource you choose in order to learn, stay away from what I consider gimmicks. These include expensive online courses that will teach you how to hack, not how to program. I will not name any here but if you are in doubt about a training outlet, just contact me and if I known them, I'll give you my opinion.
If you look in the sidebar on the right, there is also a list of books I recommend.
This is a shameless plug but if you have any interest in building apps for OS X or iOS (iPhone/iPad), together with Kyra and Guillaume, we are building Brick, a course aimed at the complete beginner that will teach you the basics of programming before moving on to developing apps for iOS and OS X using the Apple Swift language.
posted 26 days ago · 3 minutes read
About a year ago, I wrote a tutorial about installing a Ruby on Rails development environment on OS X Mountain Lion. Here's an updated and easier version to set up Ruby, Rails and PostgreSQL on a fresh install of OS X 10.9 Mavericks.
You will be prompted with a dialog containing 3 options: get Xcode, not now, Install. Select Install and wait for the operation to complete. This will install utilities like Git. Even if you don't use Git, you will need it to install RVM. Let's do that now.
In order to develop using the Rails framework, you need to have a Ruby interpreter installed on your machine. The good news is that OS X comes pre-installed with one. The bad news is that it is an older version than the one we need.
Ruby Version Manager or RVM for short is a very useful piece of software that will allow us to have multiple versions of Ruby (and Rails and any other Gem) on our machine. Think of RVM as a virtual environments manager which will house specific versions of Ruby. You can then switch between versions at will.
Open a terminal and type the following command (you may need to enter your password at some point):
curl -L get.rvm.io | bash -s stable
Now that RVM is installed on your machine, we can install a newer version of Ruby. We'll use version 2.1.2. If your terminal is still open, close it and relaunch it. When you open a terminal window, some scripts are executed and installing RVM added some. We need them.
Issue the following command (you will also need to enter your password during the install):
rvm install 2.1.2
Now, we'll make 2.1.2 the default Ruby. Just enter this command:
rvm use 2.1.2 --default
I see that many advocates the use of the Postgres.app. I personally don't like to use it as the config files don't get stored in a standard location and this location tends to change with updates to the Postgres.app. Instead, we'll install PostgreSQL using homebrew. Homebrew is a package manager for OS X similar to apt-get on Linux. You don't have to install it, it was done automatically when we installed RVM previously.
In a terminal window, issue the following command to make sure we are using the latest version of homebrew:
Then, we can install PostgreSQL with:
brew install postgresql
This step is not necessary if you know your way around PostgreSQL but I find it makes starting the PostgreSQL server and stopping it easier. Edit the hidden file
.bash_profile located in
~/. Add the following lines at the end:
alias pg_start="pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start" alias pg_stop="pg_ctl -D /usr/local/var/postgres stop -s -m fast"
Now, if you close and reopen your terminal, you'll be able to start PostgreSQL by issuing
pg_start and stop it with
To connect to your PostgreSQL server from pgAdmin, make sure the server is running (
pg_start if you took the previous optional step). Launch pgAdmin. You will need to fill in the name (I use
local), the server name
localhost and the username which is your OS X username. Leave the password blank.
Installing Rails is now trivial and you can install it like any other gem by issuing:
gem install rails
Here is a template for your Rails
database.yml in order to connect your app to PostgreSQL rather than the default SQLite:
development: adapter: postgresql encoding: utf8 database: database_name_dev username: your_osx_username host: localhost test: adapter: postgresql encoding: utf8 database: database_name_test username: your_osx_username host: localhost production: adapter: postgresql encoding: utf8 database: database_name username: database_username password: database_password port: <server_port> host: <server_address>
Now, you have a complete development environment for Ruby and Rails. Why not test out RailsBricks to develop Rails apps faster? Install it with
gem install railsbricks. You can also speed up your Git workflow with qwikGit. Get it with
gem install qwikgit.
posted about 2 months ago · less than a minute read
RailsBricks is an app generator I created to speed up Ruby on Rails development. RailsBricks is open-source. By the way, this site was built with RailsBricks!
To get RailsBricks, just install it like you would install any other gem with
gem install railsbricks.
Happy Ruby on Rails coding!
posted about 2 months ago · 2 minutes read
Chris Beard moves from interim CEO to permanent CEO:
the board has reviewed many internal and external candidates—and no one we met was a better fit.
In a new ad from Microsoft, Cortana makes fun of Siri. Seems Microsoft is learning from Samsung in the ads department. When promoting a product, always make sure you compare it to an Apple one.
This "Windows compatible hardware development board" is designed to facilitate development of software and drivers for mobile devices that run Windows, such as phones, tablets, and similar System on a Chip (SoC) platforms.
Still, at $300, I wouldn't pitch it against a $100 Raspberry Pi.
Apple refreshed its MacBook Pros lineup. Faster processors and more RAM.
I tend to disagree with the conclusion, though:
I conclude from all this that anyone who wants to make a satisfying living as an independent app developer should seriously consider only building apps based on sustainable revenue models.
I don't think the model of paid-upfront apps is a bad one. I think building yet another RSS reader when the App Store is filled with them is a bad model. The name Unread in itself is not a good one as when searching for RSS, Unread doesn't even show in the first 10 results. Remember: build (new) things people want and stay away from yet another note-taking, todo-list, rss-reader app if you really want to make a profit.
It seems Apple quietly launched their own CDN network as reported by Dan Rayburn.
Right now they control the entire customer experience, except for the way content is delivered to their devices, and they are quickly working to change that.
That's a good thing. Hope it can improve the speed of services such as iTunes Match and App Store search.
Samsung just released its Q2 numbers.
Operating profit for the quarter was 7.19 trillion, a 15-percent drop from a quarter ago.
Quick! Time to make another ad bashing Apple products!
posted about 2 months ago · 1 minute read
The last sentence takes the anonymous could-be-from-any-company cake, though: Microsoft will "focus on breakthrough innovation that expresses and enlivens... digital work and digital life experiences." If you parse that, it turns out that what the e-mail says is "we will try to sell more things by making good things that people like."
Xcode beta 4 was released. It adds
private modifiers to the Swift language and corrects many issues.
This week, we announced Brick. It is a web-based course on app development for Mac and iOS with the Swift programming language. Intended for the complete beginner to programming, it is also suitable for seasoned developers wanting to learn the intricacies of developing for the Apple platforms.
According to Wired UK, Apple filed a patent for a smartwatch design named iTime. A possible announcement for September?
Very good piece from Ars Technica: Explaining Continuity. If AirDrop, Handoff, iBeacon, etc... are still a black box to you, this article will shed some light.
If you feel like bricking your Mac, the Mac OS X 10.10 public beta is out. Get it here. Or maybe, install it on a separate partition or in a VM ;-)
posted about 2 months ago · 5 minutes read
With Guillaume and Kyra we formed Team Brick in order to teach programming for Apple OS X and iOS using the new Swift language. It is named Brick and it is intended at the complete beginner. No prior programming experience required.
I see a lot of questions online that are a variation of "Is Swift suited as a first language for a complete beginner?". Opinions differ but I personally think it is a great language to learn how to code. Here is why.
First, there's a distinction that needs to be made: hacking bits and pieces together after completing a few video lessons on popular online training outlets in order to quickly produce a MVP is not programming. Understanding what programming is requires a certain amount of theoretical knowledge and becoming a proficient programmer requires to know how to apply these concepts.
With that out of the way, let's continue to see why Swift is an excellent choice for people wanting to seriously learn how to write programs.
To write code, you need a development environment. The most basic one is composed of a text editor and an interpreter or a compiler. Setting up a proper development environment can sometimes be a pain, especially when one needs to download and configure multiple packages, make sure they are compatible with each other and keep them individually updated. Seasoned programmers don't break a sweat to manage their environment but this is typically a point where novice struggle. Want to know everything required to set up Ruby on Rails on a Mac? Have a look at one of my previous guide and you'll get a sense of all the steps involved.
If you take Ruby and/or Python, two languages heavily recommended to learn how to code, once you are done setting them up, you will also need a certain level of familiarity with the command-line interface. Again, to many beginners, this is quite cryptic. Notice that at that point, you haven't yet started to learn how to code.
Some languages offer what is known as an Integrated Development Environment or IDE for short. It is a special kind of software whose purpose is to ...write software. IDE usually include an editor, a compiler, a debugger and plenty of nice and useful features for coders such as code completion (meaning that you start typing a word and the IDE can autocomplete it). Swift development is done using an IDE. It is made by Apple, it's free and it's named Xcode.
Setting up a Swift development environment is as easy as visiting the Mac App Store, looking for Xcode and clicking on "Install". Done.
Undefined method '' for nil:NilClass. Not super friendly for a beginner, right?
On the other hand, Swift is capable of highlighting such mistakes as you are typing your code. Again, this is due to the language compiled nature and the use of the Xcode IDE. Not only Swift requires you to be very explicit in your instructions, it can also warn you that you are currently typing something that is not quite correct. If it can't catch a mistake as you type, as it sometimes happens, it will happen at compile time before you execute your program and usually issue a relevant and easy to understand error message. This is, in my opinion, more novice-friendly.
As said earlier, becoming a programmer requires to understand a lot of basic concepts. One such concept is known as data types. In a nutshell, it means that a computer must know which type of data you are feeding it: a number, text, dates, etc.
Interpreted languages such as Ruby and Python are quite popular because they effectively abstract such concepts. In theory, this allows for a boost in productivity by not having to care about these but in practice, it often results in sloppily written code that turns out to be difficult to maintain and troubleshoot. For example, a programmer familiar with the concept of data types and the way a computer uses them will be more productive. On the other hand, because these languages abstract the concept, it is difficult to explain it to a novice and then have the novice truly understand what (s)he is doing.
Swift, to some extent, lets you choose if you want to be explicit about data types (type annotation) or if you want the compiler to take care of that for you (type inference). This is excellent for beginners as they are able to grasp the concepts at first and then are given the possibility to take shortcuts.
Swift is a very modern language. It features some quite advanced concepts such as closures, generics, extension methods, type inference, functional programming patterns, and many more. A beginner is unlikely to need these at first but as (s)he continues to learn, they'll come in handy in order to craft great apps for the Apple ecosystem without having the need to switch to another language that would allow for more functionalities.
On the other hand, Swift adheres perfectly to the OOP key characteristics which are polymorphism, encapsulation and inheritance. It makes teaching and understanding the concept of objects in programming quite simple. You can easily translate
Cat is an
Animal in Swift.
Everybody learns how to code for a different reason but at some point, many want to benefit from the countless hours spent learning. Swift allows you to jump in a thriving ecosystem by letting you publish (and sell!) your completed apps on the Mac App Store and on the iOS App Store.
The culture associated with other languages (again, Ruby and Python or even the NodeJS platform) is mostly open-source. It is rather rare to see an app written in Ruby being sold (and would even be frown upon). On the other hand, it is common for iOS developers to sell their creations on the App Store.
There's one caveat, though. Swift is a great first language to learn how to code, yes. But not right now. That is because the language itself is currently in a beta phase and won't be officially released before September 2014. At this moment, the core of the language is still undergoing heavy changes, sometimes weekly. That would make it quite difficult for a novice to start learning it.
When Apple officially releases Swift, if you are still looking at learning how to code, I'd recommend that you consider Swift as your first programming language. Oh, and maybe that you take a look at Brick as we are betting on Swift to teach you how to become a great coder!
posted 2 months ago · 2 minutes read
I'm trying a new thing on this blog: the week in tech. News that caught my eyes between Fridays and that I find relevant from a developer's perspective. The intent is to have a short digest which shouldn't take more than 5 minutes to read. If the audience justifies it, I'll make a separate outlet for it. Of course, feedback is welcome!
This made the news this week:
Microsoft Corp. said it will eliminate as many as 18,000 jobs, the largest round of cuts in its history, as Chief Executive Officer Satya Nadella integrates Nokia Oyj’s handset unit and slims down the software maker.
Among the first business units to get axed, Xbox Entertainement Studios. That means that there won't be any original shows for Xbox as initially announced by the company.
The full story here.
The combination will create apps that can transform specific aspects of how businesses and employees work using iPhone and iPad, allowing companies to achieve new levels of efficiency, effectiveness and customer satisfaction—faster and easier than ever before.
The first thing that came to my mind was iAS 400.
More broadly, Turner said that Microsoft has just a 14 percent share of all devices when one counts smartphones and tablets alongside PCs, and that this represents a huge opportunity for the company and its partners.
Does that mean that companies with 0% market share have even a larger growth opportunity? Interesting way to present numbers!
As stated in the first entry, the only one at this time (emphasis mine):
We have big plans for the Swift language, including improvements to syntax, and powerful new features. And as Swift evolves, we will provide tools in Xcode to help you migrate your source code forward.
This is yet another hint at retiring Objective-C as the first citizen language for any Apple-related development in the future.
Anybody can get Xcode 6 beta 3. No need for a paid developer subscription.
Not even a month after the wall huggers anti-iPhone ad, Samsung now takes a stab at the iPad with yet another Apple-bashing ad. What if, for a change, Samsung would boast about its unique features without always feeling the need for a comparison with the competition? Stay classy.
posted 2 months ago · 1 minute read
Ever worked with people using Windows machines while you are on Mac or Linux? Have you ever had issues with line endings formatting? Or even worse, reached the infamous Git error:
fatal: CRLF would be replaced by LF in ......
So I wrote an absolutely not awesome script that converts DOS CRLF line endings with Unix LF line endings. just save this in a file named
#! /bin/sh for x do echo "Converting $x ..." tr -d '\015' < "$x" > "convert.$x" mv "convert.$x" "$x" echo "$x done." done
Simple! Don't forget to
chmod u+x crlf2lf and if you want to use it on all the files within a directory, just do this:
...and that's it!
I published the script on Github. Not because it's beautiful or complicated but because it would be fun if people would extend it to do more, like make it recursive and so on.
Displaying posts 1 - 8 of 77 in total
qgit -cmpinstead of a long serie of Git commands.