Tag Archives: web development

A Map of Resources for Learning Ruby

My previous chart of resources to learn programming was well-received, but some people suggested additional resources. I decided I would try a new format to display more resources for learning programming. It is a map of different resources, which are ordered from left to right based on experience. You can choose a resource from each vertical, and then move to the right as you gain experience. A sample path is shown in the image. It would be interesting to see how these kind of charts can be improved to quickly display relevant information about each item. Click on the image below get a clickable image map, an SVG should be coming soon.

Map of ruby resources

Mathematica, Bing vs Google, Web Hosts

Mathematica
Mathematica 9
just came out and it has a bunch of new features, such as a suggestions bar which helps you perform various actions after you enter a query, and support for units, like “centimeters and gigabytes”. I think math education should make much greater use of computers, and Mathematica is the most powerful tool to do so. In addition, it has many beginner-friendly features, such as the ones above or the ability to enter input in English if you don’t know the Mathematica syntax for something. Perhaps math education should be based on figuring out how to turn real-world problems into a format Mathemtica can understand.

Mathematica Suggestion Bar

Bing vs. Google 
A while ago Google changed their shopping search from being free like their regular search to paid-only inclusion, like PriceGrabber and Nextag.  Microsoft just launched a campaign against Google, calling them Scroogle. It attacks Google for not stating more prominently that the results are paid, and that they even partially base their sorting by how much much a merchant pays.

I don’t know if it’s such a big deal. Google Shopping used to be filled with all sorts of low-quality sites, and now it’s much easier for them to keep it high-quality. However, they have lost Amazon from their results, which makes a pretty big difference. Also, it would be better for the user to not factor in pay when you initially display an item. They don’t seem to do that though for a general search, and for a more specific one, you can always sort by price, which wasn’t useful when they had low-quality results.

Web Hosts
I made a couple of small changes to the Web Host chart, including adding another free static web host. More of those services should be coming out soon with the announcement of Google Drive support for web publishing. To keep on top of updates and add additional details, I created a Webpage version of my web host guide. This should be the one-page stop for people to find the right web host.

The Zappable Guide to Finding a Web Host

I decided to update the Zappable Guide to Finding a Web Host. This guide is intended for a newbie who is would like to find out about different hosting options, though I think others can find helpful stuff here too. Most people just Google for information and get results based on SEO instead of what’s most helpful. While Google’s results have improved, you still won’t get a helpful review of the many different options possible. In the chart, I try to explore many different free options, and a couple of paid options too. (Note: I made some of the links into affiliate ones.)

The basic categories I explore are Static Hosting, Cloud Hosting, Cpanel hosting and regular dynamic hosting. I provide recommendations for in each category that I think are good and reliable. This chart should help people quickly find a good web host choice. If you want some more background info and specific details, see finding a web host. The chart is embedded below and a PDF is available here.

Updates:
I created a webpage version of this chart, which will be able to contain more info and be updated more frequently. For example, see the Dreamhost coupons.

[scribd id=114665037 key=key-kjqjs8p81ywuxs2hf2b mode=scroll]

Chart for Learning a Programming Language

Note: View my updated chart on Learneroo.com

The previous chart helped beginners pick a language, this one shows them what resources to use to learn it. It’s better to spend time doing things than to passively read or watch content, so I selected interactive websites, books and courses. Start by going through an online tutorial, and then either read through some of a book or watch an online course. Personally I think a book is better than a video since they’re more concise and easier to reference, but most videos below are short and to the point. The chart is based on these posts: Picking a LanguageGeneral TipsJava and PythonWeb: HTML Javascript and PHPLearning Ruby and Rails

Free Resources For Learning a Programming Language

Java Python Ruby Javascript
Good For Kids / Game Programming Greenfoot Invent Your Own Computer Games  Hackety-Hack, Games: Ruby4Kids CodeAvengers
Interactive Tutorial – Codecademy? No, You can try Programr Yes Yes, there’s also
TryRuby
Yes
More Practice and Help CodingBat Problems Visualize Python executing
(also CodingBat)
RubyMonk*
(1st part is free)
Use Firebug or Developer Tools.
(See Waterbear for visual coding)
Good Free Book for Teaching Programming How to Think Like a Computer Scientist How to Think Like a Computer Scientist Learn to Program
Humble Little Ruby Book
Eloquent Javascript
Interactive Video Course Intro to CompSci
Programming methodology
(Warning: full Stanford course)
Udacity – Intro to CompSci – Building a Search Engine CodeSchool’s RubyBits* .AppendTo Javascript 101
Advanced Book Effective Java* Dive Into Python 3 Pickaxe Guide* JavaScript: The Definitive Guide*
More Training / Bootcamps See Local / Online colleges See online courses or corporate PythonTraining Most Bootcamps are for Ruby on Rails Catalyst.
For kids: CodeHS.com
* Not free. Update: added affiliate code to Amazon links.

Learning Ruby and Rails

Note: This post on Ruby and Rails is the final one in a series on Learning How to Program. Previous posts were: Picking a Language, General Tips, Java and Python, and Web: HTML, Javascript, PHP

Say you don’t want to edit old PHP scripts, but instead want to create your own new web application. A good choice would be Ruby on Rails, the ‘cool’ framework for creating websites. It contains various tools and elements that are common to most web applications so you do not need to re-create them from scratch in your own website.   For example, most web apps have forms that take user data and place them in a database. Ruby on Rails lets you create such forms quickly and securely. Rails is written in Ruby, so to code with Rails, you will need to know some Ruby. While you don’t actually have to spend that much time coding with Ruby before starting Rails, I think it makes more sense for a beginner to get comfortable with programming basics before taking on a complex web framework.

Ruby
As always, it’s good to jump right in with an interactive tutorial, which there is no lack of in Ruby. You can spend a few minutes on TryRuby and then look at Codecademy or go through slightly more advanced material on RubyMonk, which has 1 free course and additional courses for $10/month. If you like videos, you can pay $25/month and get access to CodeSchool’s courses, including RubyBits.

You should have a book also though. Learn to Program is geared at teaching programming concepts to beginners, and they aso have a more recent paid edition. The Humble Little Ruby Book is good for learning Ruby, though if you prefer more attitude and random cartoons, there’s the famous Why’s Poigant Guide to Ruby. If you have more experience and really want to get experienced at Ruby, there’s the Pickaxe Guide.

If you want to download something to teach kids Ruby, there’s Hackety-Hack, and if they’re just interested in games, there’s Ruby4Kids.

Ruby on Rails
After learning the basics of programming and Ruby, you can start learning Rails, which also has interactive tutorials. CodeLearn recently launched to let people learn Rails by trying out things from within their browser. If you like learning by watching zombie videos, check out CodeScool’s famous RailsForZombies. You can then signup to CodeSchool and get access to the sequel.

The ‘official’ free text to learn Rails is the Ruby on Rails Tutorial, which goes through all the details on how you would create a Twitter-clone, from getting things installed to version control, from “rails-flavored” ruby to nice CSS styles, and of course, all the fundamentals of Ruby on Rails.
The book places a strong strong emphasis on writing test code, which is code that tests out your main code to ensure it does what you want it to. It follows the TDD and BDD processes, which means you write the tests before you write your actual program’s code. Sometimes you will spend more time writing the tests than actually writing the rails code, but this way you will know your software always works. You can always skips some of the test-parts if you feel its too much.
The issue with a step-by-step tutorial book is that you need to make sure you think about how to do things, and not just copy what the book says. It might be helpful to try to figure out what to do before looking at the code in the book, though that won’t always be possible.

If you have a little experience, you might like Agile Web Development with Rails, which goes through how to create a shopping-cart application in part 1, and contains a rails reference in part 2. To learn how to do specific things, you can watch the screencasts on Railscasts. There’s also the official Rails Guides, which cover various aspects of Rails.

Of course, to actually learn Rails or programming well, you need to work on your own projects. As mentioned, you should find someone to help you work through a project. If you have a couple months, you could consider signing up at one of the Rails bootcamps that sprung up recently. Devbootcamp pioneered the bootcamp approach in SF, AppAcademy  claims they’ll only charge you if you get a job, Starter League is well-established in Chicago and Flatiron School recently started in NY. They charge $8k – 12k, but many give partial refunds if you take a job with one of the companies they’re connected with.

With all these resources, it’s easy to try out programing and then pursue it further if you like it.

Creating Websites – Programming Required

In a previous series, I discussed how you can build websites – no programming required. While you don’t need to program to setup  you’re own blog or wiki, you will need to program if you want to create or customize things beyond what your software has options for. In recent posts, I gave some tips for getting started with programming, and linked to some resources on Java and Python. This post will focus on the web languages – HTML, Javascript & PHP, and the final post will be on Ruby.

Before learning actual programming languages  you’ll want to get familiar with the basics of the web. Web pages are structured with HTML and styled with CSS, so you should quickly learn how they work. If you were editing pages before using a WYSIWYG tool like Expression Web, its time to start editing the actual HTML and CSS code. You can either do this in a simple program like Notepad++, or within Expression Web from the “code” view so you can still use some of its tools. To start learning HTML, you can go through a tutorial, such as one of the resources here from Mozilla. W3Schools often comes up on Google searches, and they have some useful interactive resources, but beware that they may contain a few inaccuracies. To get an idea of how HTML and CSS is used, you can view the source of any webpage you visit by clicking on “view source” in your browser. You can also play around with the HTML and CSS from within the Chrome developer tools or with Firebug on Firefox. This will let see how many different websites use CSS styles.

HTML on modern websites are not created by hand or by an HTML editor, but by web applications, such as a CMS. Web apps are written in programming languages, such as PHP or Ruby. As discussed, many web apps are written in PHP. So if you want to develop new components for your WordPress blog or wiki, you need to learn PHP.  W3schools has a fair amount of info on PHP, and I don’t think it has too many errors. WebMonkey looks like it has a good tutorial for beginners.  There aren’t many new interactive tutorials on PHP, but there are many books you can purchase.

If you’re more interested in front-end development (such as visual effects on a page), you need to learn Javascript. Unlike PHP, it is growing in popularity, so there are a ton of resources online to learn Javascript. Previously-mentioned Codecademy created their first tutorial for Javascript, and they have many courses on the topic. They have a bunch of competitors now, such as CodeAvengers, which seems geared at kids. Its good to go through a book too, and Eloquent Javascript is a great interactive resource. The key is to not just read, but to practice and build things, which is easy to quickly do in Javascript. Firebug and Chrome’s developer tools have great features for trying out your own javascript and exploring other website’s scripts also. After you know the basics of Javascript, you will be able to not only customize web pages, but also create other things like Chrome extensions. In fact, Javascript can now even be used to run the server-side of a website with Node.js (though its not for beginners). This means that you could conceivably create entire websites with javascript only. If you really want to learn Javascript well, you could consider attending Catalyst which is a new bootcamp that opened to train beginners.

Stay tuned for the next post on Ruby and Ruby and Rails, the most popular modern framework for creating websites.

Top Posts on Zappable

Although I have a top posts section, I thought it would be helpful to provide links to some selected content, organized by topic. (Note: I put an asterisk by posts that are first in a series.)

Education

Web & Programming How-To

Articles on SeekingAlpha and LifeHack

Miscellaneous

Learning How to Program – Picking a Langauge

Lately, learning how to program has become quite popular, so I figured I would put together a quick guide to help people get started. As I discuss in The Future of Education II, I think many people should learn some programming. Even if they don’t want to do it full-time, they’ll still be able to use it for various smaller things in life. In part I of this guide, I’ll discuss the different popular languages that one can learn.

The first step is to pick a language. You shouldn’t worry to much about this choice, since you can learn the basic programming fundamentals no matter what programming language you choose. However, you might as well pick the language that fits best with your goals. Since the web is the main area of action nowadays, I’ll quickly review how websites work before going through different languages.

The webpages you view have been sent over by a server. Sometimes, its just a static page that was just sitting there on the server, but on modern sites, the page is often dynamically created for you. That means some code was being run on the server (the “back-end”) to generate the page that it sent over to you. Websites can use any language on their back-end that is supported by their web host. The page that gets displayed is formatted in static HTML (a markup language), but it can contain Javascript that runs in the browser which allow it to do many more things.

Javascript
Since Javascript runs in all browsers, it can be a good choice of language to learn. No installation is required, since it can immediately be tried out in the browser. Javascript can be used for visual effects, but also for doing things without having to update the entire webpage. Modern web apps require Javascript for many of their features. (For example, try loading Gmail without javascript.) Javascript is also used in many web-related areas, such as creating browser extensions. It is often used for other areas that beginners might be interested in, such as creating AppScripts to work with Google Apps, or On(X) to automate things on Android. If you are interested in any of these purposes, javascript may be a good language to learn. However, Javascript has certain confusing parts, so if you’re not planning on using it for one of the above purposes, you can try a more elegant language  such as Python.

PHP
PHP is a language built for creating dynamic web pages, and it runs on the server-side. Let’s say you just finished building websites without coding and now you want to be able to customize things further. You want to learn how to program the brains of the website, i.e. the back-end. A large number of websites and scripts are built using PHP, and web hosts often come with a list of one-click-install scripts. If you want to create a plugin for WordPress or work with the same script that runs Wikipedia, then PHP is for you. Practically all dynamic web hosts run PHP, and its very easy to get started with it. However, PHP has some issues, such as a messy syntax and certain inconsistencies and quirks. This means it might be better to learn a different language if just want to learn programming or you want to create an entirely new web app. However, PHP has improved over time, and if it fits your purposes, go ahead and learn it.

Python
If you just want an easy and elegant language to learn programming, Python is a good choice. Unlike PHP and Javascript, which are made for the web, Python is a general-purpose language that can be used outside of websites. Python tries to be a very readable language, so even a beginner should be able to figure out what a sample of Python code accomplish.  Python has the unusual feature of using indentation to mark different parts of code. This makes the code look less cluttered, but can sometimes cause issues when copying code. If you don’t have a specific goal that fits with one of the other languages  Python is a good choice to go with.

Ruby
Ruby is similar to Python in many ways. It is a general-purpose language which is focused more on programmer productivity than running-time on a machine. This ‘slowness’ isn’t really an issue for most cases a beginner will deal with. Ruby has become very popular recently due to the website-building framework written in it – Ruby on Rails. Rails developed certain principles (such as “convention over configuration”) that let programmers built websites quickly. If you are interested in creating websites with Rails, then it obviously makes sense to learn some Ruby. While Rails can be used without that much Ruby knowledge, I think a beginner should first learn a simple language before taking on a complex framework.

Java
Java is different than the other languages listed here in a number of ways. All code created in Java needs to be “compiled” into another code before it runs, and all variables need to be “declared” with their name and type. Java also enforces a methodology known as “object-oriented programming”, requiring all code to belong to an “object”. While there are various benefits to these decisions, they can make it take slightly longer to play around with code and test things out. Java is a heavy-duty language that runs quickly on machines, and it is taught in schools and used in many big companies. People who program in Java use an IDE for programming, which can provide various features to help with programming, such as auto-completion suggestions while they code, and automatic highlighting of certain errors. Java is also the language that Android and Android apps are written in, so if you want to code such apps, you need to learn Java. Java’s rules will help you detect certain errors before even running the code, so it does have certain benefits as a first language. However, Java is not the language to pick if if you are interested in quickly creating dynamic websites, or in writing quick scripts for various purposes.

Summary: 

Pick:__      if you want to:__
Javascript – Program front-end webpages, extensions, Appscripts, etc.
PHP – Work with existing PHP scripts
Python – Use a easy general-purpose language
Ruby – Create sites with Ruby on Rails
Java – Program Android apps, Strict rules prevent errors

 

Zappable Now on the Cloud

As discussed in this post, RedHat OpenShift offers a free tier of cloud hosting with instant setup of some common applications. Since my subscription with DreamHost is soon ending, I decided I would try out hosting my blog on the cloud.

Before switching to OpenShift, I tried out one other free PAAS – AppFog. As discussed on TechCrunch, AppFog now provides a very large free tier for web apps, which could be useful for both developers and non-developers. I setup WordPress on their site but ran into some strange technical issues so I decided to stick with OpenShift.

Instead of exporting my entire WordPress installation, I decided I would setup a new one, with a new look. I then just used the WordPress exporter to export the content of my blog to the new OpenShift installation. The next thing to setup was to point the domain name to the new location on OpenShift. However, OpenShift requires using CName records,  something my Domain Name Registar (1&1) does not support properly.* So instead I setup another cloud service, CloudFlare, between my domain name service and my web host. CloudFlare is a service that acts both to prevent attacks on your website and to speed up your site’s speed (a CDN). They offer an unlimited free tier, and a paid tier with more features. They also allow instant installation of various javascript applications for your website. There were some technical issues with setting up the domain forwarding correctly, so some links may not be working properly now, but I should get everything fixed soon.

I think that OpenShift may be a good option both for people who want a free web host and those that want to be able to scale to handle any amount of traffic.

*1&1 has an option for setting up CName records, but when I changed it, nothing happened. After a few days of emailing support, they said that their CNames only work if you paid for hosting with them. I would suggest using a different Registar, such as NameCheap.com.