Skip to main content

How do I learn to program?

The Question

This question is asked often.
You will see many answers, some even contradict each other.
Here are a few I have seen.

  • "It really depends on what your overall goals are."
  • "Start with an easy language like..."
  • "Start with a harder language like..."
  • "Just start"

All of these answers have valid reasons, but they do not help someone get started.
I see this question come up over and over. I started to wonder how did I learn? How did other people learn?

Finding Answers

I set out on a journey to find an answers. I started asking programmers questions. The answers I found were fascinating.

One question I asked was "How did you learn to program? Where you self taught or did you learn in school?" 90% of the responses said self taught. My first interesting enlightenment. This shouldn't of been such a big surprise. After all I was self taught.

My second enlightenment came when I was trying to find a way to teach my son to program. I realized that the first programming language is not that important. What is important to learn first is the basics and logic.

Third, I started teaching programming to other people. I quickly confirmed my first assumption. People who are self taught can program, what they are missing is solid design principles. They have not learned how to create modular, reusable code.

Now I had another question "How do I take what I know and help others learn?".

My Solution

I believe what I came up with is a unique approach to teaching programming.
The following is how I do it.

  1. I allow my students to learn any programming language they want. I will help them pick one based on interests.
  2. I do not teach any programming languages. Let me clarify. I teach basic logic and program design. Once a student has learned these principals they will very quickly learn the language of choice.
  3. I teach SOLID design principals. My students are expected to learn and use these principals.
  4. And last, but most importantly, my classes are live. This allows me to work with students one on one. Students are encouraged to ask me questions about things they are learning outside of class. They can ask me questions about personal projects they are working on.


  1. Mr. Bairn,

    Your class was well structured. You provided a lot of direction and experience that I could not get out of any amount of online tutorials. I wish you well and look forward to learning more from you in the future.



Post a Comment

Popular posts from this blog

I don’t test my code and you shouldn’t either.

Wait, what? I am sure about now you are saying something like “Not testing your code is asking for trouble.” Let me clarify, I do not test my code through the UI.
It started about a year and a half ago. I was given a task to write a trigger for a client. The only problem was they had hit the data limit in their Salesforce sandbox. While my project manager worked on getting permission to delete records, I had work to get done. How was I going to do it if I couldn’t create records? Then it hit me, I could use test classes to test my code. This one simple thing changed my programming style. I wrote the code, and wrote very robust test classes at the same time. They had to cover everything I could think of. I couldn’t create a record in the Salesforce UI. When it was done, I had very well written code, and my tests were also complete. Fast-forward a week. We had deleted records and freed up space. The client was testing the trigger we had made for them. They came back with “It’s not work…

Salesforce - Lightning Components in Communities

Recently I built a Lightning component, tested it with as in internal user, and it was beautiful. Everything worked as expected. The work was turned over to the project manager to demo to the client. During the demo nothing worked, just errors. After the demo I received the call. “What did you build? Why didn’t it work?”     I couldn’t understand what had happened. I asked him to show me how he had demonstrated it. He went straight to the community builder, plopped my component on the page, and ERROR! Unbeknownst to me the recordId does not pass to lightning components in the community the way it does as an internal user.
Now you get to learn what I learned.
The problem: Force:hasRecordId does not work in community builder.
The Record ID is not passed by default in the community builder. However, there is a workaround to use it.
The Solution: In your component add force:hasRecordId. This is not needed for community builder; however, it ensures it still works in the internal org as …

Eating an elephant, Breaking Code into tiny bites.

Most people have heard the joke “How do you eat an elephant? One bite at a time.” When programming we often end up biting off huge pieces and trying to shovel them down. We start by building. We are almost always figuring out how to make it work. There is no book that says “If you need to create a sales report here is the code…” The reason is simple, every situation is different. One company might only care about the number of sales in a month. Others might want to track where the sales came from, what interactions led to the sale, the dollar amount, etc. (This later scenario is more likely) We end up with code that is cluttered, is not very optimized, and just plain ugly. What are we going to do to fix it? This is where breaking it into small pieces comes in. In my programming, it is rare for me to have a method that has more than 10 lines of code. Yes, you read that right no more than 10 lines of code PER method. I have had programmers tell me that is impossible. It’s not only poss…