Archive January 2010
How To Master a Programming Language V
For my final post of the series How to Master a Programming Language, I want to make note how you can take the programming knowledge that you have gained so far and apply it to something bigger.
Learn a Framework
Now that you have worked through the language and applied it to solving problems, how do you go about solving bigger problems or accomplishing large project? Answer: Use a framework.
If you are unfamiliar with frameworks, they allow you extend the API of your language beyond the base software library. All frameworks are not created equal, a given language may have several frameworks available – each one used for solving a different problem.
Java
C#/VB.NET
PHP
Ruby
Python
Start a Project For Yourself
You will only start to appreciate a programming language and its framework when you start working with it to create something of value.
If you already have an idea in mind – great! Run with this idea and start using the tools that you have learned.
If you are stuck trying to figure out a potential project – talk to people. People always speak of ideas, but few people actually follow up. Identify phrases such as “I wish there was…”:
- “… a website that would do this…”
- “… an easier way of doing this…”
Still stuck? Here is a list of resources to help you in the right direction:
I am always looking for suggestions from my readers. If there are any frameworks or programming project websites that I should add, please feel free to share.
How To Master a Programming Language IV
At this point you should competent in the programming language that you have chosen (Part III) — you should be able to recognize basic code constructs (such as types, loops, and variable assignment). You should also be able to recognize syntax and semantic errors in your code and be able to debug them.
The next step to mastering a programming language involves “flexing your code muscle.” What I mean by that is to start using the knowledge you have acquired through reading books and tutorials and apply it to solve problems.
Flexing Your Code Muscle
Basic Exercises
I came across a website a while ago that lists 15 Exercises for Learning a new Programming Language by Prashant N Mhatre.
The purpose of these exercises is to learn how to perform basic mathematical and commonly used code procedures in your language of choice.
Topics Covered by 15 Exercises
- Program Interruption
- Mathematical Problem Solving
- Sorting a list
- If Statements
- Loop Mechanisms
- Exception Handling
- Input and Output
- File Operations
- Date Operations
- String Searching and Replacement
- Inserting into List
- Language specific operations
Most of these topics can be applied to mostly any 4th generation programming language.
Problem Solving
I have previously listed several websites with programming puzzles to allow practice your skills: Get Hired By Solving Programming Puzzles.
Out of all the sites with programming puzzles, I would have to recommend Project Euler.
There are over 270 problems (as of 1/15/2009) with new problems being added every month. The problems found on Project Euler are geared towards students and are not meant to be too extensive. The problems can be solved using any programming language.
Setup an account with Project Euler and start solving problems. If you are finding the problems too difficult, Project Euler has the option to sort the problems in ascending difficulty.
If you continue to have difficulty, read about the mathematical concept you are solving for (e.g. Fibonacci, Greatest Common Divisor, etc.) on a site like wikipedia and think about how you would solve the problem without a computer. Then think about how you would apply that technique using a programming language.
Practice, Practice, Practice
“Practice isn’t the thing you do once you’re good. It’s the thing you do that makes you good.” – Malcolm Gladwell
This post is all about practice, which is also the mantra of this blog. If you want to become a master at programming, this is one step that you cannot leave out.
How do you practice using your programming skills?
How To Master a Programming Language III
Now that you are comfortable working within your desired editor or IDE (Part II) – you can start to focus on learning the programming language syntax.
To learn a programming language you can read a variety of different books or read through online tutorials and how-to’s. Since everyone approaches learning differently, I will leave the decision up to you.
Programming Books
If you learn best by reading a book, I suggest choosing a tutorial book that walks you through learning the language rather than a reference book (at first).
A tutorial books is the better choice because it can be read cover-to-cover and it encourages the reader to work through problems, examples and case studies.
I am a big fan of the Deitel & Deitel books for this reason.
C++ How to Program
Paul J. Deitel and Harvey M. Deitel
Visual C# 2008 How to Program
Paul J. Deitel
Java How to Program
Paul J. Deitel and Harvey M. Deitel
I’ve also mentioned before that I am also recommend the Head First series of books because they teach programming concepts in a practical way without technical jargon.
Head First HTML with CSS & XHTML
Elisabeth Freeman and Eric Freeman
Head First PHP & MySQL
Lynn Beighley and Michael Morrison
You can also find free e-books (in pdf format) that teach programming languages. I recommend How to Think Like a Computer Scientist by Allen B. Downey for learning the Python language.
Programming Tutorials and How-To’s
If you learn better by online tutorial or if you want to supplement your books – there are many websites that offer programming language tutorials.
Again, I recommend finding an online tutorial that walks you through learning the syntax of the language.
List of Tutorials
- Ruby Tutorial (via RubyLearning.com)
- C/C++ Tutorial (via CProgramming.com)
- Free Programming Tutorials (via freeprogrammingresources.com)
- Programming Tutorials (via tutorialguide.net)
- Misc. Tutorials (via ProgrammingTutorials.com)
- Web Building Tutorials (via w3schools.com)
A Grasp of the Language
After you have read through a book or tutorial, you should have a good grasp of the language syntax – but you are far from being a master of the language at this point.
Keep in mind that you don’t need to memorize every little detail about the language, but you should be familiar. You should know how to reference the language API, a useful reference is gotAPI.com which has a comprehensive listing of many programming languages.
If you know of any good tutorial websites or books, please share in the comments.
How To Master a Programming Language II
So you’ve chosen a programming language that you want to learn, where do you start?
Learn the Environment
Depending on the type of language that you have chosen (interpreted vs. compiled) there may be several options available to you in choosing an editor or Integrated Development Environment (IDE).
Editors
Most programming languages can be written in your editor of choice. The preferred editor will include at a minimum syntax highlighting.
Some Text Editors Supporting Syntax Highlighting
Integrated Development Environment
If you want a full-featured editor, you may consider choosing an Integrated Development Environment (IDE). IDEs will provide an interactive debugger, advanced syntax checking, integration with software configuration management (SCM) systems, etc. Sometimes learning all the features of the IDE is just a big of a task as learning a language.
Some Integrated Development Environments
- Visual Studio (C/C++, C#, Visual Basic, Others via Install)
- Eclipse (Java, Others via plug-ins)
- Netbeans (Java, PHP, Ruby, etc.)
Resolve Dependencies
Depending on the language you are learning, there may be additional dependencies that your development environment requires. Whether you are using an IDE or text editor you need to have the language interpreter or compiler installed (or else you won’t get very far).
Also, if you are developing web applications, you will need to have a web server or web application server installed and configured.
Most IDEs will resolve these dependencies for you – however, you may also consider using a all-in-one local server environment.
Basic Programming Tasks
After your programming environment is setup correctly (you may need to make some additional tweaks along the way), work through a “Hello World!” problem in the language of your choice. Make sure you can do the following:
- Check for Errors in Syntax
- Compile via GUI and Command Line (if your language supports this)
- Run your Program
At this point you should have basic command of your environment. As you work with it and get deeper into your language, you will become more familiar with the different features and options available to you.
How To Master a Programming Language
With the start of a new year, as a programmer have you made a resolution or goal to learn a new programming language?
For the next few days, I will be writing a series of posts titled How to Master a Programming Language, where I will be walking you through the steps that you need to take to learn the ins and outs of a programming language.
If you really want to master a new programming language, you have to do more than just read these posts — you need to take action!
Think about what you have done previously when learning a language. Is there anything you have done differently that has helped you learn a language? Please feel free to share your experiences in the comments.
Read the series of posts here:
5More Programming Books Recommended By Readers
Due the overwhelming success of one of my previous posts: 6 Books Every Programmer Should Own, I wanted to compile a list of books suggested by readers.
These books are programming-language neutral and are an effective tool to writing succinct code.
Clean Code: A Handbook of Agile Software Craftsmanship
Robert C. Martin
This book covers the best practices, case studies and first hand experiences with creating “clean” code.
Recommended by: Squirrel Hacker, Noroctal Labs and kodeninja
Refactoring: Improving the Design of Existing Code
Martin Fowler, Kent Beck, John Brant, William Opdyke, and Don Roberts
This book covers the best practices in modifying existing code.
Recommended by: kodeninja
How To Design Programs: An Introduction to Programming and Computing
Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, and Shriram Krishnamurthi
This book is geared to the beginning programmer and focuses on the design and creation of programs.
Recommended by: Dave
Structure and Interpretation of Computer Programs
Harold Abelson, Gerald Jay Sussman, Julie Sussman
Picking up where How To Design Programs left off, this book explores ways to look at code from an object-oriented point of view.
Recommended by: Dave
If you were the original commenter, please contact me and I will provide a backlink to your website or blog.









