Talk is cheap. Show me the code – Linus Torvalds
I have been constantly looking at ways to improve my programming skills and this blog post is an attempt to summarize what I have learned over the years. Trying to solve complex problems on a daily basis will definitely improve programming skills, but some of the following practices will speed up the learning process.
Here are the 12 ways to improve your programming skills,
1. Read the Documentation (RTFM)
Whether you are working with a programming language or a software library, you should at least once read through the entire official documentation. You may not learn everything, but you will be aware of the capabilities and the limitations of the language or the library you use. Here are some examples from my experience,
If you are a Java programmer, you should go through Oracle’s official Java tutorials. If you are a Java web application developer who frequently uses Struts2 framework, you should go through the Struts2 documentation.
If you are an Android developer, read the entire Android API guide.
Reading through the documentation may seem like a daunting task and you may not understand everything you read, but it would be very helpful in the long term. It gives you the 20,000 feet view of the language or the library.
2. Study Open Source Projects
One of the beautiful things about programming is that a large number of expert programmers and software companies share their work publicly as Open Source Software. To accelerate your learning, study popular open source projects in your programming field. Downloading, studying and running these projects enables you to quickly grasp how top programmers use the language and libraries effectively.
Always look for high quality open source projects from well known programmers or software organizations such Apache Foundation. For example, If you are an Android developer, you can look at some cool open source projects from Jake Wharton such as Retrofit or butterknife.
If you are a Java programmer, look for trending Java projects on GitHub or take a look Apache projects. Some of the cool projects to look at are Apache Commons, Apache Struts 2 and Apache Hadoop. If you are a .NET/C# programmer, take a look at this list of .NET open source projects. Some of the cool open source .NET projects are Microsoft EntityFramework, NUnit and CruiseControl.NET. You can also take a look at trending .NET projects on GitHub.
3. Study the Source Code of Platforms, Frameworks and Tools
In addition to studying third party open source projects, you can also take a look at the source code available for your platform, tools or frameworks. Since the source code in this case is written by experienced programmers who are responsible for the platform/framework/tools, this code is usually of very high quality. This code is also the most tested code available for you to study!
By studying the source code, you will learn how your programming platform works under the hood. This gives you considerable confidence on the code you write. For example, if you are an Android developer, you can download and study the Android platform source code. Similarly if you use Struts2 in your Java Web applications, you can download Struts2 source code and take a look under the hood.
Source code for most of the major platforms/frameworks/tools are available these days. Check out the following links to some of the major source code repositories,
4. Study Code Written by Your Peers
If you work in a company, try to find top developers in your team or organization. Study their code and try to understand the logic or patterns used. If you don’t understand something, ask the authors for help.
You can also ask top programmers in your team to take a quick look at the code you write (I am not talking about the formal code reviews). Most of the folks would be more than happy to help you. Find someone who is willing to be your programming mentor. Having a mentor is probably the fastest way to be an expert programmer (or for that matter to be an expert in any endeavor). The feedback loop is short and you will quickly attain the mental model level of your mentor.
5. Study Your Development Environment
Learn the features available in your development environment or IDE thoroughly. Efficient use of development tools and IDE will substantially improve your programming productivity. Learn the shortcuts and features offered by the IDE and deliberately practice them. Initially you may find this a bit hard, but after a while you will wonder how you worked without those tricks and shortcuts!
Each IDE offers a list of tips for increased productivity. Find your favorite IDE in the list below, take a printout of the tips and tricks page and keep it near your desk.
- Eclipse Tips and Tricks
- Xcode Keyboard Shortcuts
- NetBeans Tips and Tricks
- Android Studio Tips
- IntelliJ Tips
- Komodo IDE Tips
- Microsoft Visual studio
- Zend Studio
6. Attend Online Programming Courses
Recently there has been an explosion of online courses available for programmers. Both paid and free courses are available for different programming skill levels. I have found that even free courses are very helpful and valuable in learning new technologies. I recommend that once you enroll in a course, push yourself to complete it and attempt all the exercises and tasks given as part of the course.
One good thing about online courses is that most of them are created by experts and the curriculum will cover all the major ideas and best practices in the field. I have attended many of these programming related courses and found them to be challenging and useful. Here are some of my favorites,
- Developing Android Apps (UD853) by Udacity. This is an excellent online course for learning Android development.
- How to use Git and GitHub(UD775) by Udacity. Git is now the main version control system for most projects and this will give you hands on experience on the tool.
- Stanford Video Lectures on iOS Development. This is not an online course, but rather video recording of Stanford iOS course (CS193P). I found it very useful to learn iOS programming.
Here is a partial list of Websites offering online courses,
- Udemy – Udemy offers free and paid courses on a wide variety of topics, programming being one of them.
- Udacity – Udacity offers free and paid courses for programmers. Recently they seem to be focusing on mobile development. Companies such as Google also publishes their free training courses here.
- Coursera – Coursera offers a large number of training courses from major universities across the world on a wide range of topics. Most of the courses are free.
- edX – edX offers a large number of free online courses from a number of universities.
7. Read Top Programming Books
Programming books gives you a complete overview of the programming subject being covered. It reflects years of professional experience that the author has in the subject. Reading books is a quick way to attain considerable high level understanding of your programming field.
When it comes to programming, there are 2 distinct types of books – books that deal with the language, framework or tool fundamentals and books that deal with conceptual knowledge and best practices. Books of the first category gets obsolete pretty soon and I usually avoid hard copies of them. But books of the second category are the most useful and you should have them in your library.
I specialize in Web application programming and following are some of the books that has been very influential in my career. Some of them deals with software methodologies or about structuring software teams. As you progress in your career, these are as important as the knowledge of the programming language or best practices.
I have the following books in my library. I highly recommend these books (Please note that my primary area is Java based technologies),
- Effective Java by Joshua Bloch
- Expert One-on-One J2EE Design and Development by Rod Johnson
- Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
- Code Complete: A Practical Handbook of Software Construction by Steve McConnell
- Don’t Make Me Think, Revisited: A Common Sense Approach to Web Usability by Steve Krug
- Scrum: The Art of Doing Twice the Work in Half the Time by Jeff Sutherland
- The Pragmatic Programmer: From Journeyman to Master Andrew Hunt, David Thomas
- Refactoring: Improving the Design of Existing Code by Martin Fowler, Kent Beck, John Brant, William Opdyke, Don Roberts
8. Learn Basics of Data Structures and Algorithms
Large number of programmers have no formal education in programming. This means that they have little background in algorithms and data structures. One of the key things that differentiate good programmers from brilliant programmers is the knowledge of algorithms and data structures.
If you have a fairly good idea of algorithms and data structures, you will find that you can handle complex programming tasks much faster. When it comes to usual Web development, mobile development etc. you may find that you can get a lot of things done without deep knowledge of algorithms and data structures. However if you start working on anything complex such as machine learning, data processing or reporting, you will be handicapped without a solid foundation in Algorithms and Data Structures.
Following is a set of resources for learning data structures and algorithms,
- Book: Introduction to Algorithms by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein
- Princeton University course on Algorithms
- Udemy Course On Introduction to Data Structures & Algorithms in Java
- Naveen Garg’s Video Tutorials on Data Structures (IIT Delhi)
- TopCoder Algorithm Tutorials
9. Learn Attributes of Good Software Code
Once you master a programming language, the next thing to learn is the attributes of good code. Programming is relatively a new human endeavor, but still there is considerable research data available on what makes good programs. High quality software programs are readable, flexible, extensible, testable, maintainable and reusable. Learn specific techniques that will enable us to meet these software requirements. I recommend that you read Clean Code: A Handbook of Agile Software Craftsmanship by Robert C. Martin and Code Complete: A Practical Handbook of Software Construction by Steve McConnell.
10. Participate in Online Programming Challenges
It is now generally known now (thanks to the book Outliers by Malcolm Gladwell) that in order to attain expert level skills (world class) in any area, you need to practice for at least 10,000 hours. The same applies to programming as well. Solve programming problems, work on interesting projects and regularly participate in online challenges to improve your programming skills.
Whenever I get free time, I try to solve interesting programming problems. Following is a list of Websites providing online programming challenges and problems,
- Codwars - Achieve code mastery through challenges.
- TopCoder – Challenge yourself, and get paid!
- GeeksforGeeks – Computer science portal for geeks
- Sphere Online Judge (SPOJ) – Become a true programming master
- Project Euler – Computer programming problems
- HackerRank – Programming problems and competitions
- DailyProgrammer on Reddit – Daily programming problems
11. Write More Complex Code
One of the important aspects of skill acquisition is that whenever you work on the edges of your capability, your capabilities substantially improve. This applies to programming as well. Look for difficult and complex problems and try to solve them in your area of expertise. Some of the interesting examples of such complex problems include character recognition, solving captchas, machine learning algorithms etc.
Another way create complex code is to try to solve programming problems with intent of making them as generic as possible. A generic solution is always much more complex than solutions which are tailored to a specific data set or problem.
12. Use Code Analysis Tools
There are a number of tools available to check the quality of your code. These tools have a pre-defined set of rules against which the code is evaluated. It is also possible to integrate these tools to your IDE. For example, You can integrate CheckStyle to the Eclipse Java IDE and whenever you write Java code, CheckStyle will report errors or warnings based on its configuration. CheckStyle comes with a set of predefined code quality metrics, however you can fine tune it based on your project needs. If you are a Java developer, you should check out these tools,
If you work on .NET technologies, check out NDepend for Visual Studio. Enabling these tools as part of IDE forces you to improve the code you write.
In this post, I have given an overview of the ways in which you can improve your programming skills. There are a large number of programming opportunities available and good programmers are in great demand and command good pay. I would recommend that you spend a predefined amount of time on each of the above learning activities every week. As Peter Norving argues in his essay, Teach Yourself Programming in Ten Years, The key is deliberative practice: not just doing it again and again, but challenging yourself with a task that is just beyond your current ability, trying it, analyzing your performance while and after doing it, and correcting any mistakes.
October 17, 2015 | Posted in Programming 2 Comments » | By Jayson