From: "Nicholas A." Date: 2011-02-04T23:19:24+09:00 Subject: Re: Totally lost in learning Ruby Hilary, When you first begin to learn about programming, your first obstacles will have to do with basic language syntax, understanding how/when/why to use variables, loops, conditional expressions, data structures, etc. In the beginning, those basic building blocks may seem curious and disjunct, but but you will use them constantly and directly every single time you sit down to write any real code. As you get started, even basics such as knowing how/why to indent lines of code can give you trouble. Becoming familiar with the process of installing and working in your development environment (your choice of OS, Ruby installation, IDE/text/code editor, etc.), and executing and debugging snippets of code, can take a while to become comfortable. After you become familiar with the basic language concepts, tool set, and work flow of writing/executing simple bits of code, you'll become more able to use libraries and frameworks that do valuable things: create GUI windows and widgets that obtain and display processed data for the user, create web interfaces that obtain and display processed data, work with graphics, media, compressed files, and other binary data types, save/retrieve/manipulate text data in useful real-world ways, manage larger data structures, perhaps control robots, or anything else you want to accomplish... You'll settle on favorite libraries/frameworks and become proficient at making them work together to create full applications that do useful things for users. Along the way, you'll learn to think more about designing sensible and efficient user interfaces, you'll learn to handle usage problems that come from how different people expect to use computer programs, you'll learn to catch typical bugs that occur in text data processing, anticipate and eliminate potential security weaknesses, deal with usability issues in multiuser applications, etc. It can take years and many tens/hundreds of thousands of lines of written code to really become proficient at writing rock solid pieces of software that people use easily and intuitively. The problem with most tutorials and books for beginners is that they end with the basics of language structure and bits about using libraries/frameworks, etc. Once you understand enough basic syntax and concepts like using loops to search and sort through lists of data, you need to see and play with lots of code to actual working applications. You need to see, experiment with, alter and write from scratch lots and lots of working code. To get started with that, you could try, for example, downloading wxRuby and playing with all the included code examples. Take the GUI grid widget example and _alter_ the code to make it display a sample data file that you've read from a file on the hard drive. Put together a simple application that reads a directory of image files, displays the file names in a text list, and then displays the image when the file name is clicked. Write a small recipe database application. Write a clone of a classic simple video game. Find a web host that supports Ruby and learn how to enter data via HTML forms, process that data with CGI, and display tables of the processed data using HTML. Enter your sample data file into a MySQL database and write the SQL code needed to search and sort that data by any field in the database. When you get stuck, post a question online, with the code you're trying to make work. You're likely to get detailed help when you have specific questions about how to fix a small portion of almost-working code. I wrote a tutorial for the REBOL language which takes you through all the stages of learning, including line by line documented code and full case studies for more than 50 applications: http://re-bol.com. It's been among the top 3 search results for "computer programming tutorial" for several years. I'm currently rewriting that tutorial for Ruby, but in the meantime, it should give you a nice complete understanding about how to progress beyond just the basics. All the concepts will be directly applicable to learning Ruby. Hope that helps :) -- Posted via http://www.ruby-forum.com/.