When I first started on my journey to teach myself software development I was clueless on how to do anything. I found myself reading way to many books at the same time, and worst or all I was not really understanding anything that I was reading.
This was very frustrating for me to learn this was because I was not progressing in the slightest. As I progressed and kept pushing the ball forward, I started to notice things and think about how I learned to build applications in the past without even knowing what I was doing or the programming language (I built an entire application without C# without even knowing C#).
I used to reflect on how easy it was for me back then to build stuff without even knowing programming languages. I realised somethings that were so fundamental to learning were missing, somethings that I applied without even thinking about to help me I no longer included…
I thought about the process that I followed back then, it really boiled down to: learn X so I can do Y. That’s what I did! If I wanted to create a string object in C# as the starting point of my application, I just googled how to create a string object in C#. Or perhaps I wanted to do some string manipulation, “hey Google …”.
Learning X to do Y is the most fundamental aspect of knowing how to learn, and I am not alone here, other people have discovered this to be true (before me even), such as John Sonmez who created a course that teaches you how to learn using this principle. (I’ll give credit where it’s due, this blog post has influence from John’s course, but I want to share my spin on it that I have tweaked in a way that I think is more proactive.)
But that’s not the only aspect of learning effectively.
As I continued to practise and yet, struggle to teach myself I discovered that there are a whole array of other things that I wished I knew about and a specific process that you need to follow to learn effectively.
I have spent months tackling different approaches and often found myself at many times not progressing at all. I would spend a lot of time playing with technologies, but without this process I didn’t know how to progress my knowledge any further.
It is especially difficult if you don’t understand many of the underlying concepts that support the thing that you are learning.
I have structured this blog post in such a way that’s it’s easy to follow my (and other people’s) steps on how to learn.
I would strongly advice that you read my previous blog post, on how to codecamp yourself (after reading this post) on how to take it further.
Research is the most difficult part of them all, because it entails trying to figure out or learn about the thing you want to learn about, it’s really pre-learning.
I have spent many months trying to grasp as much as I could about a certain technology. Yes it was painful and difficult, but you won’t have to experience that like I did.
In this section I’ll discuss some of the steps you can follow to understand what it is that you’re trying to learn.
1. Understand the picture
You can think of your understanding of something as a big puzzle. When you first set out to build your puzzle the first step that you’ll probably do is look at what the puzzle picture looks like. Studying this picture carefully before building is the utmost important step to do, otherwise you’ll have no clue on what you’re building.
This principle really applies to pretty much all subjects, but we’re focusing on frameworks for today. The most important thing you can do is to understand this big picture as best as possible.
In my case I am learning the Spring framework and Enterprise Java, after many months of effort! The most vital step that you can do is to understand really what is the scope of the thing you’re trying to learn.
I am learning Enterprise Java, specifically the Spring framework, but let’s not make that you’re concern unless you’re also learning Spring.
Find some summary or overview of the framework that you’re wanting to learn. This is a very important step to do when learning.
Exercise! Research the framework that you’re wanting to learn and understand what it is about, but leave out all the details.
This can easily be achieved by Googling a summary of the framework that expresses the framework as a whole.
Purposefully answer questions of where this framework is useful and what problems it solves.
2. Summarise the scope
Okay, so you should have a good idea of what the framework that you’re learning is about. It’s now that moment of the day where you get to summarise what you have learned.
So for each aspect of the framework, take note of it, just as a simple high level summary.
For enterprise Java it’s really as simple as this:
Java Enterprise Edition summary
- Contexts and Dependency Injection
- Enterprise JavaBeans
- Bean Validation
- The MVC framework, JavaServer Faces
- Java Transactions
- Java Persistence
- Java Message Service
- RESTful web services
- SOAP web services
- JSON Processing
- Batch Processing
But remember I said I was learning the Spring Framework? Well just for the sake of explaining it to you and of this guide, Spring is built on top of the Enterprise Java platform (Java EE).
This stacking concept is very clearly expressed and reminded to newcomers who are learning to build web applications with Node.js, but it isn’t very clear when you come into the Enterprise Java community with Spring.
Simply put, Spring is partially build on-top of Java EE, it uses some of the low-level APIs such as Servlets, JDBC, etc. but offers alternatives to Context and Dependancy Injection, web MVC framework, etc.
The simple answer is to understand that these stacking technologies should provide cohesive levels of abstraction. This simply means that you shouldn’t at all have to deal with the stacks’ lower-level concerns. These are simple rules of software design. The answer really is to learn the highest level of abstraction first, in this case it is Sails.js apposed to Node.js’ HTTP idiom.
With a stack like Java EE where technologies are offering alternatives opposed to (well sometimes included) higher levels of abstraction, it can be more tricky, it’s important to summarise what has to offer Spring offer opposed to what Java EE has: (As a hint, they both have an web MVC framework, Context and Dependency Injection.)
Spring framework summary:
- Core Spring with Dependency Injection, Spring Expression Language
- Aspect-Orientated Programming
- Web with Spring MVC and Spring WebSocket
- Data Access with Spring JDBC, Transactions, Object/Relation Mapping support
- Integration services for Remoting (RMI, Hessian or Burlap, etc), EJB support, JMS, etc.
- Testing with Spring Unit and Integration testing
Besides talking about very specific technologies, it is important to notice how a technology works because you can run into things like this that you may not be sure about. I wasn’t sure about how Spring contrasted from Java EE, until I went out and understood the differences.
3. Goals and success
Defining your goals and what your success is the most important. In fact it’s so important because it will be your driving force to work to achieve this one thing.
My goal is still standing.
Become an Enterprise Java developer.
Yes it’s difficult, it does take a lot of time and persistence, but I know after all the effort and time I will have finally made it
Defining your success is a process of imagining what your expected outcome will be like.
My success case will be that I am competent in building MVC applications and SPA applications with Angular and Spring.
Hey Adrian! What’s the difference between goals and success?
Well your goal is what you want to achieve, it’s a very broad definition.
It could also be “Become a Node.js developer” or “Become a Python Django developer”.
The success of it is what you’re able to do or what you’re competent in.
Like I stated earlier, mine is being competent in building Single-Page-Application apps with Angular and Spring. Your success criteria could be “building React.js apps with Node.js”.
It’s important to be specific with your success criteria so that you won’t stray off and do other things.
Having the success criteria is very important because with it, once you have gotten to a point of execution you can look at your success criteria and realistically determine how much further or how close you are to achieving your goal.
4. Learning resources
Ahh man! My favourite time of the day… No, wait? My favourite section is learning resources!
When I first started I thought books and documentation was the best! You couldn’t get cleaner than that! Documentation was the holy grail for all understanding.
Months went by having this believe, and kid you not, it was painfully slow. The truth is that there isn’t only one medium that is “the best”. For example there may be excellent video courses explaining the concepts of a framework you’re learning, and there can be official documentation that can be just bad, plain and simple.
The idea is that you should not be religious about the learning resources that you use, but rather embrace and use all of them.
So which ones should you use?
Well I’d always recommend that purchase a video training course that shows you how to build an application. This is ideal because often courses like these use the 80/20 rule (where they show you 20% and you’re capable of the other 80%). Often an industry leading expert is behind the mic explaining and sharing their experience with you (this is valuable stuff).
If you can’t afford to pay for professional online video courses you can always turn to your best friends, the books and documentation.
I have this article here that talks about how to read framework specific books and documentation which goes into detail on how to find the right books, how to read these books the correct way and how to read documentation.
Because that article covers all that you should know, I’ll learn step 4 here.
5. Filtering learning resource
Ahh man, now I doing that thing I always do. I’m including a section just before publication time (it’s a Thursday).
So you have probably chosen a course online or just found a few good books and the official documentation.
Watch the online course, completely and fully. This is your best guide that you could possible have on getting started!
“But Adrian, all I have is a book and the documentation.” Well
5. Learning strategy
So you may have the books and the tutorials all lined up, but are you ready to learn? How are you actually going to learn to be competent with the tools that you are using? Like I said, tutorials and videos only cover just enough to allow you to get started, but you’re expected to go beyond and learn on your own afterwards.
5.1 Learning plan
What you need is a learning plan. I discussed learning plans very well in one of my previous articles how to codecamp yourself, but just for you, I’ll briefly mentioned what a learning is.
A learning plan is a guide that you decide for yourself on what you should do with what you are trying to learn. It specifies to learn X so you can do Y.
A quick example (for the sake of completion).
Write a blogging platform application
- Design the domain model
- Add service components that incorporate business logic with dependency injection.
- Write unit tests to test these service methods
- Include MongoDB database
- Add Mongo Object-Document Mapping to Domain classes.
- Add Spring data repository interfaces.
- Write unit tests to test against mock data.
- Include Spring MVC controllers and Thymeleaf templates to create webpages
- Be able to view recent articles, view single articles, categories, tags.
- Include Spring security to include login authentication
- Productionalising your application
- Add development profiles: development, production and testing.
- Add git repository to a continuous integration server.
- Publish application on online hosting platform: AWS or Heroku.
Remember the summaries that you had made from summarising the scope of a framework? Well this when you would incorporate that into you learning plan.
I have included most from the core components of the framework:
- Core Spring with Dependency Injection, Spring Expression Language (going to use)
- Aspect-Orientated Programming (not using)
- Web with Spring MVC and Spring WebSocket (using spring mvc, not websocket)
- Data Access with Spring JDBC, Transactions, Object/Relation Mapping support (using transactions)
- Integration services for Remoting (RMI, Hessian or Burlap, etc), Java EE support (EJB, JMS, JMX, JCA), Email, Task scheduling and Caching. (using email service support, task scheduling and caching)
- Testing with Spring Unit and Integration testing
So once I have this summary I am able to go into each module and look at how it works and how it fits into the bigger picture of this framework and see how I can incorporate every aspect into my application.
Now you may have noticed I have only chosen specific components from the Spring framework to build my blogging application. Well I am only learning X to do Y. I don’t need to use WebSocket’s or a messaging solution to build this simple application, so leave it out!
Remember learn X to do Y.
That is how I thought you should do that and I spend months trying to build just a simple application. I got a ton of stuff wrong and I failed repeatedly to actually do anything.
Let someone how you how.
It’s important to understand that you can really make this a lot easier if you stop “hacking” and just let someone show you how to initially get started. Let them give you the 20% so you can fulfil the 80%.
By having that 20% coverage you’ll have some grounding on how things work and can build up from there. It is very difficult to do otherwise.
Programmers are all hackers. A hacker is someone who can just build something without even understanding how it works, they just get it done by the power of Google and Stackoverflow.
Remember that C# application I told you about earlier? Well I hacked that thing by hacking it together. But that didn’t come from nothing. To be fair, I spend many many months, years perhaps playing with the GUI forms, designing form layout and playing with examples and tutorials; this was my grounding. When I finally took action to get started and add the functionality to it, I knew how to do it.
5.2 Find existing application
Existing similar applications or applications built with the framework you are wanting to learn are going to help you significantly to get started.
This provides you with the opportunity to look at how other people use the framework, and learn from exisitng code. This approach is by far the best and can save a lot of frustration and will provide some guidance.
Once thing that I wished I realised a long time ago is I should look at existing applications and code and try to re-implement it or use samples from it in my own application.
I have tried to build an application many times before but failed because I didn’t really understand how to implement anything or think in that way. Frameworks were a new paradigm to me.
If you haven’t used a framework before you’ll soon realise the paradigm shift. When building an application you are purposefully inverting the control over to the framework to let it manage everything and only trigger parts of your code when certain activity is required. This basically how frameworks work.
Being a hacker can be quite difficult and very frustrating at many times. So you’ll need to look at how someone else did what you’re wanting to do! This is vital because you can try very hard and not progress at all. I have done this.
Google the type of application that you want to build with the stack that you’re using.
If you can’t find something that suites your need, than just google examples. “Spring MVC example applications”.
Now that you have an application, open it up and read through the code and try to understand things that you don’t know.
Rewrite this application, even if you don’t understand what certain sections or annotations do or are for. You’ll eventually figure it out.
This is another exciting part that I’m all jumped up on and excited about! Taking action…
Yes, it can be difficult once you’re learning and feel a bit overwhelmed and scared. This is natural. I felt very overwhelmed and confused for a long time, but as I gave it more and more of my time everyday, that overwhelming feeling eventually faded.
Trust the process and you will succeed!
6. Learn enough to just get started
Go out of your way to not learn how to use the framework just yet, but rather how to setup a project in your IDE and use the frameworks dependencies. Build a simple project that can run! No code required!
It’s really not that difficult to do, and you could just Google “How to create Spring MVC starter project” or how to setup “Sails.js starter application”.
Once you have this and only do you have this, look at some of the examples that the project’s website has. Try implement them.
Remember to focus on the minimal core components even if you don’t understand a thing that you’re doing.
7. Play around, keep playing and play some more
Yes this is true, we do learn best by playing and trying different ways or combinations of something to understand how it works.
Playing is important because you’ll get the opportunity to learn about the different aspects and components of the framework.
A few exercises that you can do is to try more complex examples and build demonstration applications. Try implement and work with other sample applications.
Remember you don’t need to worry about building an application just yet, but instead focus on playing with this new toy.
This is where that existing application I told you about in section 5.2 really comes in to shine. Only once you have played with some of the examples and sample applications can you took into understand how this application works and functions. Some parts of this existing application should make some sense now, you can use that new knowledge and “patterns” on how to do something from the existing to build something that works.
8. Build something that works
My first application was something that I glued together using paper and a few stickers. I mean this thing was awful, but it did work.
You’re first few applications aren’t going to be perfect, they actually be far from it! Don’t settle to build this big complex application that is feature rich and can do this and that!
Instead build something that works and is simple, and you are incorporating most core components of the framework.
Do this many times.
Some application ideas you can start off with are:
- Todo list application. Todo lists are the most traditional applications that you can build for a web application. Create an application that you can add tasks to and save them to the database.
- Basic movie catalogue. Build a movie catalogue where you can add Movies to. Select a movie and view its information, such as actors, genre, director, etc. Be able to search Actors and view their stared movies. Search movies and genres. If you want to have a challenge, add a service that automatically pulls movie information from Rotten Tomatoes or IMDB.
- Blogging platform. Yes a blog that you can write blog posts, have categories of blog posts with tags and have authors.
Remember learning and practising is an iterative process, you’ll get just a bit better ever time and every time that you build an application you can make it more complex.
Once you have built a few simple applications it really becomes a breeze.
When you’re building these applications you’ll have a lot of questions of why something works in a specific way, and what other way could you use in place of it.
Should you teach what you are learning?
Yes, you can teach to solidify your knowledge of understanding something.
This was recently evident to me when I was explaining lamba expressions to my friend who is a PHP developer. I thought I had understood lamba expressions so clearly until I needed to explain the concept to him. Questions then came up, “hey, can you create a lamba expression from an abstract class with one abstract method?” — I later tried it out, and no you can’t, obviously, it’s an implementation specific concept that uses functional interfaces (it’s a Java thing).
How would I possible know if you could create a lambda expression from an abstract method in an abstract class without trying it myself?
So after that realisation I decided to make it a habit of explaining things to myself that I had just learned.
You don’t actually have to teach in a traditional way by recording videos, but by explaining what you are learning.
Go ahead and revise to yourself your understanding of the thing that you have been playing around with. Ask yourself questions as if someone else where asking you to explain things. Often at times you’ll explain something and discover a gap in your knowledge.
Even if you’re just learning something new, you’ll often come up with a ton of questions in the building process and you’ll find yourself asking more questions, such as how does this work? Why does it do it this way. Playing is so fundamental to learning as you’ll want to try out different combinations of things when playing.