Related
I have to take a small introductory talk on ruby tomorrow, I want to avoid going the boring power point presentation way and have a hands on session.
The goal would be to introduce ruby to people, just the basic concepts really.
I'm planning to take an example from Why's Poignant Guide, do you know of any interesting example that would captivate the attention of the audience and make it an interesting talk.
EDIT : I'm done with the talk, it went reasonably well, there were about 50 people who turned up, About 10 of them picked up ruby really well. Some complained that I went too fast. All in all I covered the basics of ruby, didn't touch the OO Stuff. As for the examples I gave one in which we could scrape data from our college website using watir-webdriver. Thanks to all for your valuable answers and comments.
Ok, so your audience are not programmers, so there's no point of pointing out Ruby's advantages over other languages. Also, there's no place for advanced topics such as metaprogramming or more serious OO or functional programming.
What I would try to show them first is irb, how they could evaluate simple mathematical expressions, and show them the concept of variables.
Strings and string interpolation.
Loops (10.times{ puts 'Hello world!' }) and branches (if-then-else).
If you have time, show them arrays (not sure about hashes)
I would also try to squeeze in a simple program in Sinatra as well. Students already know web and you can show "how the web really works" using couple lines of Sinatra code.
Maybe they'd be interested in a bit of web scraping.
My project Easy Roommate parser visits a flat-mate sharing web site, and parses profiles to see which ones are compatible with what you want. My main warning is that my code isn't very good, and if lots of people used it, the web site owners may complain. However, it would be solving a problem that's common to many students.
Another project I did ages ago was Get to philosophy, which tried to work out why, when you click on the first link in each Wikipedia article you come across, you usually end up at Philosophy. Warning: this project is abandoned.
Why's Guide is a little nuts for the average audience, more of a work of art than an educational tool. If you like whimsy, you might want to check out Rails for Zombies.
You could show them how to write programs that can be useful for college students in general. For example, let's say they have to study some chapters of a book for an exam. I have a Python scripts, 30 lines or so, that takes a number of days and a list of tuples representing page ranges, and prints how many pages you need to study each day, and at what page you need to get by the end of each day. For example, if you have to study pages [10,19] and [30,33] over two days, you'd need to get to the end of page 16 on the first day, and to the end of page 33 by the second.
You could show them how to implement this sort of thing with Ruby. It's a bit dry, but very practical.
To show oo stuff (if you want to do) consider showing some automation of the Browser with watir. -> Real oo with real objects all in simple Ruby. Perfect for interesting and lively demos to motivate young people (maybe everybody wants to try it out after the presentation (my experience)).
http://watir.com/examples/
Sonic Pi is a Ruby based SDK and DSL. Its typical usage is in music creation and sound generation (samples and synthesizer sounds). The Sonic Pi website http://sonic-pi.net contains tutorials, which are specifically designed to teach programming from the start. There is even a guide for teachers! Sonic Pi is really entertaining and it gives you immediate sense of achievement.
i'm newbie in programming and i as a marketing executive so i dont know anything about programming but i very excited to learn programming so now i learn independently.My friend said to me,better for beginner learn C++ first then go to ASP clssic then ASP.NET+PHP+CI..now i in ASP stage.
Question 1 : it is correct suggestion from my friend?
search suggestion
I stack on this problem
how to create live search same as this link http://www.w3schools.com/php/php_ajax_livesearch.asp
this is my db code
Set rsGuestbook = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT staff_name FROM master WHERE staff_name like '" & Request("s") & "%'"
rsGuestbook.Open strSQL, oConn
livesearch.php?q="+str,true = livesearch.php?q="+str,true
please help
First off, if you're only starting out, then don't worry overly about any particular language (unless you have a specific need to learn it). You'd be better off learning the core tenets of programming from a generic tutorial such as:
http://lifehacker.com/#!5401954/programmer-101-teach-yourself-how-to-code
Once you've got a grasp on the basics then try to learn a language suited to your goal. If that's web development then PHP/ASP.NET/RUBY etc. If it's desktop/mobile then look at C/C++/C#/Obj-C/VB.NET according to whatever the platform you are working on needs/offers.
Take a look at W3Schools for web-based languages tuts:
http://www.w3schools.com/
As to the second part of your question, there is so much wrong with your snippet of code on so many levels that I would just put it quietly aside in the cupboard, and re-visit it once you've got a better handle on the basics, and you'll see why it's wrong.
Learning C++ is quite 'advanced' and not what I'd recommend for someone who's not studying a computer science degree course or working as a professional programmer. It's a very big and complex language that requires a lot of other skills, not least object orientation and general computer science knowledge.
It would be far more appropriate for you to start with something far more simple, such as classic ASP or PHP. Choose one only! Then buy a book. Then play for a bit. Then build a simple website about your cat/hamster/car/boat/ear-wax. Then build another one using the lessons learned from the first website. I'd suggest looking at several months to hone your skills, particularly as you're doing it part time.
Learning to program is about as simple as learning to play a musical instrument. The more you practice the better you get. Some people are naturally good at it, but, alas, most aren't and have to work very hard.
When your first starting out the language isn't to important (of course go for an easier language). For the most part many of the larger languages are interchangeable (for example a cout in C++ is the pretty much the same as a System.out.print in JAVA). The more important thing you need to grasp is program structure, Object Oriented Programming principles, and the other basic "do's" and "dont's" of programming. These ideas will apply to just about every programming language you use.
IMO (and this may be wrong) the language you learn is the least important aspect when you are a beginner. Most programmers will have to use many languages in their career and spending the time to learn every in and out of each language would be a waste. For example I started out learning Visual Basic in highschool. After a few months I was switched to C++. Once I went to college I had to learn JAVA for 6 months, then switched to Ruby, then C, CSS, HTML, Android SDK and Javascript. After that I got a job and had to learn C# and how to use AJAX, .Net, facebook API and other languages. Moral of the story is the principles are more important than the languages.
My advice: First find out what you want to program. Ira Rainey has some good suggestions as to where to go and what to learn if you look at his answer (though I would include JAVA for a desktop/mobile language)
C++ shouldn't be to advanced if you have the right material to learn it. I would recommend working with C++ to make a few very basic programs. Start by trying to make a basic calculator that will send all input to command line. Once you got the basics down (+,-,*,/) then you can slowly evolve it to be more and more complex (^,%,!). This will give you a platform to build off and a goal to obtain.
Here is a site to help you learn C++
I've gotten quite interested in coding katas in recent months. I believe they are a great way to hone my programming skills and improve the quality of the code I write on the job.
There are numerous places where Katas can be found. like..
http://codekata.pragprog.com/
http://schuchert.wikispaces.com/Katas
http://www.codingdojo.org/
I've found these to be excellent repositories of Katas... my attempts at some of them have been been immensely rewarding.
However, I feel that all the Kata's I've seen so far have one short coming. None of them seem to allow me to practice refactoring bad code. It's great learning how to write clean code the first time around...but in my current job, I don't have too many opportunities to write new code. Rather I'm often battling against legacy code and trying to figure out how to refactor modules, eliminate dependencies, and reduce coupling.
As such, I'm on the look out for a couple Katas that I can use to hone my skills of refactoring legacy code and turning it into clean code.
Does anyone know of any that already exist? I know I get a lot of practice at it while I'm at work...but I'd like to hone my skills to the point where I'm able to quickly see how to break apart dependencies and separate concerns in classes that do far too much.
I don't know of a site that catalogs them directly, but one strategy that I've used on occasion is this:
Find an old, small, unmaintained open source project on sourceforge
Download it, get it to compile/build/run
Read the documentation, get a feel for the code
Use the techniques in Working Effectively with Legacy Code to get a piece of it under test
Refactor that piece, perhaps fixing bugs and adding features along the way
Repeat steps 4 through 6
When you find a part that was especially challenging, throw away your work and repeat it a couple times to reinforce your skills.
This doesn't just practice refactoring, but other skills like code reading, testing, and dealing with build processes.
The hardest problem is finding a project that you're interested enough in to keep working in. The last one I worked on was a python library for genetic programming, and the current one I'm working on is a IRC library for Java.
I feel like necromancer replying to such an old thread, but there is one thing that would make for a worthy addition - Legacy Code Retreat.
Idea is to have a Code Retreat with legacy code and try to practice the very techniques for dealing with such, but I can't see anything that would ban you from simply using the code prepared and practicing with it by yourself. Just using it for creating a Golden Master makes for an hour of work, and there's a lot more you can do. If your kata usually last around 2 hours, I'd say just by splitting what usually happens on LCR into kata gives you four different things to work on.
There's a GitHub repository by idea's author, J.B. Rainsberger, that contains a simple legacy system that you are to work with, Trivia Game.
From my experience as organizer/participant, folks really liked this and it was illuminating to see what can be a problem in a legacy code and where your refactoring can lead you astray (and how!). Here's yet another account of how it looks like, by Andreas Leidig.
Emily Bache has a github repository with some refactoring katas: Emily Bache's Refactoring Kata Repo. There are variants of KataYahtzee and KataTennis to refactor. Also, she has a variant of the Gilded Rose Kata, which was designed as a refactoring kata.
Also, she has the Racing Car Katas in her repo: Racing Car Kata. The Race Car Katas also include good exercises for refactoring.
Those kata have the code in multiple langauages:
C++
C#
Java
Javascript
Python
Ruby
Having been a hobbyist programmer for 3 years (mainly Python and C) and never having written an application longer than 500 lines of code, I find myself faced with two choices :
(1) Learn the essentials of data structures and algorithm design so I can become a l33t computer scientist.
(2) Learn Qt, which would help me build projects I have been itching to build for a long time.
For learning (1), everyone seems to recommend reading CLRS. Unfortunately, reading CLRS would take me at least an year of study (or more, I'm not Peter Krumins). I also understand that to accomplish any moderately complex task using (2), I will need to understand at least the fundamentals of (1), which brings me to my question : assuming I use C++ as the programming language of choice, which parts of CLRS would give me sufficient knowledge of algorithms and data structures to work on large projects using (2)?
In other words, I need a list of theoretical CompSci topics absolutely essential for everyday application programming tasks. Also, I want to use CLRS as a handy reference, so I don't want to skip any material critical to understanding the later sections of the book.
Don't get me wrong here. Discrete math and the theoretical underpinnings of CompSci have been on my "TODO: URGENT" list for about 6 months now, but I just don't have enough time owing to college work. After a long time, I have 15 days off to do whatever the hell I like, and I want to spend these 15 days building applications I really want to build rather than sitting at my desk, pen and paper in hand, trying to write down the solution to a textbook problem.
(BTW, a less-math-more-code resource on algorithms will be highly appreciated. I'm just out of high school and my math is not at the level it should be.)
Thanks :)
This could be considered heresy, but the vast majority of application code does not require much understanding of algorithms and data structures. Most languages provide libraries which contain collection classes, searching and sorting algorithms, etc. You generally don't need to understand the theory behind how these work, just use them!
However, if you've never written anything longer than 500 lines, then there are a lot of things you DO need to learn, such as how to write your application's code so that it's flexible, maintainable, etc.
For a less-math, more code resource on algorithms than CLRS, check out Algorithms in a Nutshell. If you're going to be writing desktop applications, I don't consider CLRS to be required reading. If you're using C++ I think Sedgewick is a more appropriate choice.
Try some online comp sci courses. Berkeley has some, as does MIT. Software engineering radio is a great podcast also.
See these questions as well:
What are some good computer science resources for a blind programmer?
https://stackoverflow.com/questions/360542/plumber-programmers-vs-computer-scientists#360554
Heed the wisdom of Don and just do it. Can you define the features that you want your application to have? Can you break those features down into smaller tasks? Can you organize the code produced by those tasks into a coherent structure?
Of course you can. Identify any 'risky' areas (areas that you do not understand, e.g. something that requires more math than you know, or special algorithms you would have to research) and either find another solution, prototype a solution, or come back to SO and ask specific questions.
Moving from 500 loc to a real (eve if small) application it's not that easy.
As Don was pointing out, you'll need to learn a lot of things about code (flexibility, reuse, etc), you need to learn some very basic of configuration management as well (visual source safe, svn?)
But the main issue is that you need a way to don't be overwhelmed by your functiononalities/code pair. That it's not easy. What I can suggest you is to put in place something to 'automatically' test your code (even in a very basic way) via some regression tests. Otherwise it's going to be hard.
As you can see I think it's no related at all to data structure, algorithms or whatever.
Good luck and let us know
I must say that sitting down with a dry old textbook and reading it through is not the way to learn how to do anything effectively, even if you are making notes. Doing it is the best way to learn, using the textbooks as a reference. Indeed, using sites like this as a reference.
As for data structures - learn which one is good for whatever situation you envision: Sets (sorted and unsorted), Lists (ArrayList, LinkedList), Maps (HashMap, TreeMap). Complexity of doing basic operations - adding, removing, searching, sorting, etc. That will help you to select an appropriate library data structure to use in your application.
And also make sure you're reasonably warm with MVC - i.e., ensure your model is separate from your view (the QT front-end) as best as possible. Best would be to have the model and algorithms working on their own, and then put the GUI on top. Or a unit test on top. Etc...
Good luck!
It's like saying you want to move to France, so should you learn french from a book, and what are the essential words - or should you just go to France and find out which words you need to know from experience and from copying the locals.
Writing code is part of learning computer science. I was writing code long before I'd even heard of the term, and lots of people were writing code before the term was invented.
Besides, you say you're itching to write certain applications. That can't be taught, so just go ahead and do it. Some things you only learn by doing.
(The theoretical foundations will just give you a deeper understanding of what you wind up doing anyway, which will mainly be copying other people's approaches. The only caveat is that in some cases the theoretical stuff will tell you what's futile to attempt - e.g. if one of your itches is to solve an NP complete problem, you probably won't succeed :-)
I would say the practical aspects of coding are more important. In particular, source control is vital if you don't use that already. I like bzr as an easy to set up and use system, though GUI support isn't as mature as it could be.
I'd then move on to one or both of the classics about the craft of coding, namely
The Pragmatic Programmer
Code Complete 2
You could also check out the list of recommended books on Stack Overflow.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I've had several false starts in the past with teaching myself how to program. I've worked through several books (mostly C and Python), and end up just learning the syntax without feeling as though I could sit down and actually write a program for myself. When I try to look through the source trees of a project on Codeplex or Sourceforge, I never seem to know where to start reading the code -- the dependencies seem to go in all directions.
I feel as though I'm not learning programming the way it's done "on the street," so I figured I'd take a different approach to asking how a newbie should learn how to code. If you had to learn programming all over again, what are the things you wouldn't do? What did you spend time doing that you now know wasted you weeks or months?
Where I see beginners wasting weeks or months is typing at the keyboard. The computer is very responsive and will cheerfully chew up hours of your time in the edit-compile-run cycle. If you are learning you will save many hours if
You plan out your design on paper before you approach a computer. It doesn't matter what design method you pick or if you have never heard of a design method. Just write down a plan while your brain is fully engaged and not distracted by the computer.
When code will not compile or will not produce the right answer, if you can't fix it in five minutes, walk away from the computer. Go think about what's happening. Print out your code and scribble on it until you believe it's right.
These are just devices for helping to implement the simple but difficult old advice to think before you code.
When I was learning, I solved countless problems on the 15-minute walk from the computing center to my home. Sadly, with modern PCs we don't get that 15 minutes :-) If you can learn to take it anyway, you will become a better programmer, faster.
I certainly wouldn't start by looking at "real" software projects. Like you say, it's too hard to know where to start. That's largely because large projects are more about their large-scale design than about the individual algorithms or about program flow; for one thing, you're probably looking at a complex GUI application with multi-threading, etc. There isn't really anywhere to "start" looking at the code.
The best way to learn programming is to have a problem you want (need) to solve, and then going about solving it. But most importantly, WRITE CODE. When you read programming books, do ALL the exercises. Make sure you did them right. There's no substitute for writing code. No substitute for screwing up and then fixing it.
Stack Over F.. wait no, heh.
The biggest time-sinks for me are generally in respect to "finding the best answer." I often find that I will run into a problem that I know how to solve but feel that there is a better solution and go on the hunt for it. It is only hours/days later that I come to my senses and realize that I have 7 instances of Firefox, each containing at least 5 tabs sprawled out across 46" of monitor space that I realize that I've been caught in the black hole that is the pursuit of endless knowledge.
My advice to you, and myself for that matter, is to become comfortable with notion of refractoring. Essentially what this means (incase you are are not familiar with the term) is you come up with a solution for a problem and go with it, even if there is quite likely a better way of doing it. Once you have finished the problem, or even the program, you can then revisit your methodology, study it, and figure out where you can make changes to improve it.
This concept has always been hard for me to follow. In college I preferred to to write a paper once, print, and turn it in. Writing code can be thought of very similarly to writing a paper. Simply putting the pen to the pad and pushing out whats on your mind may work - but when you look back over it with a fresh pair of eyes you will, without question, see something you will wish you had done differently.
I just noticed you talked about reading through source trees of other people's projects. Reading other people's code is a wonderful idea, but you must read more selectively. A lot of open-source code is hard to read and not stuff you should emulate anyway. So avoid reading any code that hasn't been recommended by a programmer you respect.
Hint: Jon Bentley, Brian Kernighan, Rob Pike, and P. J. Plauger, who are all programmers I respect, have published a lot of code worth reading. In books.
The only way to learn how to program is to write more code. Reading books is great, but writing / fixing code is the best way to learn. You can't learn anything without doing.
You might also want to look at this book, How to Design Programs, for more of a perspective on design than details of syntax.
The only thing that I did that wasted weeks or months was worry about whether or not my designs were the best way to implement a particular solution. I know now that this is known as "premature optimization" and we all suffer from it to one degree or another. The right way to learn programming is to solve a problem, measure your solution to make sure it performs good enough, then move on to the next problem. After some time you'll have a pile of problems you've solved, but more importantly, you'll know a programming language.
There is excellent advice here, in other posts. Here are my thoughts:
1) Learn to type, the reasons are explained in this article by Steve Yegge. It will help more than you can imagine.
2) Reading code is generally considered a hard task. So, it is better to get an open source project, compile it, and start changing it and learn that way, rather than reading and trying to understand.
I can understand the situation you're in. Reading through books, even many will not make you programmer. What you need to do is START PROGRAMMING.
Actually programming is a lot like swimming in my opinion, even if you know only a little syntax and even lesser amount of coding techniques, start coding anyway. Make a small application, a home inventory, an expense catalog, a datesheet, a cd cataloger, anything you fancy.
The idea is to get into the nitty-gritties of it. Once you start programming you'll run into real-world problems and your problem solving skills will develop as you combat them. That's how you become a better programmer everyday.
So get into the thick of it, and swim right through... That's how you'll make it.
Good luck
I think this question will have wildly different answers for different people.
For myself, I tried C++ at one point (I was about ten and had already been programming for a while), with a click-and-drag UI builder. I think this was a mistake, and I should have gone straight to C and pointers and such. Because I'm just that kind of person.
In your case, it sounds like you want to be led down the right path by someone and feel a bit timid about jumping in and doing something by yourself. (You've read several books and now you're asking what not to do.)
I'll tell you how I learned: by doing plenty of fun, relatively short projects, steadily growing in difficulty. I began with QBasic (which I think is still a great learning tool) and it was there where I developed most of my programming skills. They have of course been expanded and refined since that time but I was already capable of good design back in those days.
The sorts of projects you could take on depend on your interests; if you're mathematically inclined you might want to try a prime number generator or projecting 3D points onto the screen; if you're interested in game design then you could try cloning pong (easy) or minesweeper (harder); or if you're more of a hacker you might want to make a simple chat program or file encryption software.
Work on these projects on your own, and don't worry about whether you're doing things the "right" way. As long as you get it to work, you've learned many things. Some time after you've completed a project you may want to revisit it and try to do it better, or just see how other people have done that sort of thing.
Given the way you seem to want to be led along, perhaps you should find yourself a mentor.
Do not learn how to use pointers and how to manually manage memory. You mentioned C, and I spent plenty of time trying to fix bugs that were caused by mixing *x and &x. This is evil...
Find some problem to solve, write or draw a sketch of an algorithm solving the problem, then try to write it. Either use Python (which is much more friendly for beginners) or use C with statically allocated memory only. And use books/tutorials. They offer multiple excercises with solutions, so you can compare yours with them and see other approaches.
Once you'll feel that you can actually write something simple, see some book/tutorial for Object Oriented Design. It's not the best the world has to offer, but it might turn out to be intuitive. If not, check the functional programming (like LISP, Scheme or Haskell languages), or programming in logic (like Prolog). Maybe those will suit you better.
Also - find some mate. A person you can talk to about coding, code maintenance and design. Such person is worth even more than a book.
To all C fans: The C language is great, really. It allows memory usage optimization to the extent impossible in high-level languages as Python or Ruby. The compiled code is also very fast, and is the only choice for RTOS, or modern 3D games engine. But this is not a good entry point for a beginner, that's what I believe.
Oh, and good luck to you! And don't be ashamed to ask! If you don't ask, the answer is much harder to find.
Assuming you have decent math skills try http://projecteuler.net/ It presents a series of problems to solve of increasing dificulty that should be solvible by writing short programs. This should give you experience in solving specific problems with out getting lost in the details of open source projects.
After basic language syntax, you need to learn design. Which is hard. This book may help.
I think you should stop thinking you've wasted time so far-- instead I think you're education is just incomplete, and you've taken a step you're not really ready for. It sounds like the books you've read are useful, you're learning the intricacies of the language. It sounds like you're just not accustomed to the tools you'd use then to package that code together so it runs.
Some books cover that focus on topics like language syntax, design patterns, algorithms and data structures will never mention the tools you need to actual apply that information. These books are great but if its all you've touched I think it would explain your situation.
What development environment are you using? If you're developing for windows you really should be proficient with creating projects, adding code, running and debugging in Visual Studio. You can download Visual Studio Express for free from Microsoft.
I recommend looking for tutorial like books that actually step you through the UI of development environment you are using. Look for actual screenshots with dropdown menus. Look at what the tutorials walk you through, and if its something you don't know how to do consider buying that book. Preferably it will have code you can copy'n'paste in, not code you write yourself.
I personally don't like these books as I can anticipate how to do new things in VS based on how I'd do other things. But if you're training is incomplete from a tools-usage perspective this could move you in the right direction.
It is probably harder to find these types of tutorial books for Python or C development. There is an overabundance of them for .Net development though.
As someone who has only been working as a programmer for 6 months, I might not be the best person to help you get going, but since it wasn't that long ago when I knew next to nothing, its quite fresh in my mind.
When I started my current job programming wasn't going to be part of my job description but when the opportunity came up to do some programming on the side, I couldn't pass it up.
I spent about 1 month doing tutorials on About.com's Delphi section. As much as people diss about.com, Zarko Gajic's tutorials were simple to understand and easy to follow. Once I had a basic knack of the language and the IDE, I jumped straight into a project exporting accounting data for a program called "Adept". Took me a while but I got there...
The biggest help for me was taking on a personal project. I developed an IRC bot in Java for a crappy 2D game called Soldat. I learnt a lot by planning out and coding my own project.
Now I'm pretty comfortable with Delphi Pascal, SQL, C# and Java. I think, once you get the hang of one OOP language, you can learn the syntax of another language, and it gets a lot easier to catch on.
Perhaps start with a small existing project, and find some thing within it that handles some core part of what it does - then with a debugger, step through it and follow what it's doing from the point where you ask it to do that thing for you.
This helps you in a number of ways. You start to better grasp all of the various things that are touched by the code as it attempts to complete its request. Also, you learn invaluable debugging techniques which it seems like far too many developers lack - while you can often eventually discover what is wrong either with repeated printf() (or equivalent) calls, if you can debug you can solve issues an order of magnitude faster.
I have found that conceptually, a great mental model for understanding programming in the abstract is a pattern of data flow. When a user manipulates data, how is it altered by a program for digestion and storage? How is it transformed to re-present to the user in a form that makes sense to them? Fundamentally code is about transformation of data, and all code can be broken down into constructs of various sizes whose purpose is to alter data in one way or another, bugs forming around the mismatch between what the programmer was expecting from the data, how high level libraries the coder is using treat the data, and how the data actually arrives. Following code with a debugger helps you fully understand this transformation in action by observing changes as they occur.
Standard answer is to make something; picking an easy language to do it in is good, but not essential. It's more the working out stuff in your own head, fixing it because it won't work, that really teaches you. For me, this always happens when I try my eternal dream projects (games) which I never finish but always learn from.
I think the thing I would avoid is learning a language in isolated snippets that don't really hang together but just teach various facets of a particular language. As others have said, the really hard and important thing is to learn design. I think the best way to do this is through a tutorial that walks you through creating an actual application, teaching design along the way. That way you can learn why certain decisions are made and learn how to accomplish what's needed to implement the design choices.
For example, I found Agile Web Development with Rails to be a really easy way to learn Ruby on Rails, much better than simply reading a Ruby manual or even poking my way around scattered web tutorials.
Another thing that I would avoid is developing code in isolation, that is, not having people look at it as I go along. Getting feedback from a mentor will help keep you on the right track with respect to the choices you are making and the correct use of language idioms.
Find a problem in your life or something you do that you just feel could be more efficient and write a small solution to it. It might just be a single script but you will gain much more confidence in your abilities when you start to see useful results of your work. You will also be more motivated to finish it as you are interested in using the solution. Start simple and small and then gradually move up to bigger projects.
And as your working on a small project, focus on building everything with quality. I think this is lost on some programmers who feel that their software is more impressive if it contains a ton of features but usually those features aren't well done or usable. If you focus on building quality solutions to real problems you'll be a fantastic programmer.
Good luck!
Work on projects/problems that you already know how to solve partially
You should read Mike clark's article : How I Learned Ruby. Essentially, he used the test framework for Ruby to exercise different elemnents of the languages.
I used this technique to learn python and it was very, very helpful. Not only did i learn the language, but I was very proficient in the test framework for Python at the end of the excercise. Once you have the basics you can start reading code and then working on building some larger project.