My strategy for learning a programming language quickly

When I first arrived at my new school, I was completely unaware of what programming language they were using to teach the students – it’s something that is prone to change over time and isn’t usually mentioned on a job spec. Many schools throughout the UK will use Python from start to finish in both a procedural and object-oriented fashion later down the line, whereas some schools are still using Visual Basic. I was alarmed to find out that the senior students use C# – a language I had very little knowledge of and experience using outside of playing with it in Unity. Or so I thought.

This article is all about how I was able to rapidly learn C# and begin adding it to my programming repertoire because I was suddenly in a position where I had to! This isn’t a situation that is unique to educators such as me; as a developer, a system architect, or whatever role you are currently in or aspire to be in, there could be times where you too are forced to rapidly learn a new language, framework, or technology in the face of new circumstances, such as a new client or acquisition, or maybe your boss was just feeling malevolent.

Tip 0) A reminder that the language acquisition overlap is huge

Chances are, what you know already in another programming language will transfer over to a new one that you’re attempting to learn. Core concepts such as variables, classes, functions, arrays, and so on are more often than not going to remain identifiable as you change technology, give or take semantic differences. This is just like how once you learn how to speak another language, you get more efficient at the language learning process.

Granted, some jumps are larger than others, like getting used to semicolons and braces when you’re from a Python background, or entire design patterns such as MVC (Model View Controller) when learning a new framework like Laravel or Rails. Chances are though, you already know more than you’re aware of!

One more thing, please don’t be afraid of admitting you don’t know something! If you’re familiar with Broadwell’s learning competence theory, this is one step closer to mastering something!

Tip 1) Learn by doing

I knew to start writing C# my best bet was to download Visual Studio and get started*, and that’s exactly what I did. I dedicated a few hours to installing the software and building basic programs and algorithms that I knew just so that I could come to understand the syntax and general workflow.

I played around with building console apps, using Winforms to build some basic desktop applications, and when I was ready I decided to start looking around at tutorials online and on YouTube to learn some more complicated functionality, such as accessing databases, accessing and writing to CSV (Comma Separated Value) files, and so on. I remember laughing to myself when I found the StringBuilder functionality was just like the implementation in Java.

You can do as much or as little of this as you want, but I truly believe this is the most effective way to learn it, more so than reading or watching alone.

I realise that this isn’t the only way to develop in C#, especially on macOS or Linux. But this is what we do in my workplace, so it’s how I opted to learn.

Tip 2) Find a good reference guide

(If you want to suggest something to add here, please let me know in the comments!)

I don’t recommend reading textbooks or references from start to finish as an effective guide for learning programming languages. But finding a good reference that you can look at for additional insight is a great way of learning. Here are a few of my favourites for the languages I use most, and they’re completely free (unless stated otherwise):

Multiple / General Purpose

  • Codecademy (JavaScript, C#, Java, etc.)
  • freeCodeCamp (Web Development)
  • The Odin Project (JavaScript, Ruby)
  • General MOOC websites like Coursera, edX, Udemy, and FutureLearn also fall under this category

JavaScript

C Sharp

PHP

Tip 3) Learn from others

Learning from one another is a tried and tested way of aiding you on your learning journey. You’d be surprised what you can learn by sitting down with someone for half an hour when you get stuck. For me, sitting down with my colleagues and having them run through some of the aspects I was unsure about was immensely helpful.

I realise that this isn’t everyone’s cup of tea, nor is it a luxury available to everyone. As a bonus, I recommend giving fellow developers tweeting about the technology you’re learning a follow on Twitter if you use it.

Tip 4) Remember that this is an ongoing process

Don’t be discouraged. Remember, learning is something that developers and other professionals (teachers included!) never stop doing and there will always be gaps in our knowledge. We can’t possibly be experts on absolutely everything, so remember that it’s only necessary to learn what you need – you can always learn more along the way and there’s absolutely no shame in that.

In my experience, smart people are those who recognise that there are things that they themselves do not know.

The smartest people aspire to go one step further and learn what they don’t yet know.

Conclusion

In all, it took me a few days to get comfortable with working in C# and to develop my confidence where I was able to pick apart my learners’ work and debug it comfortably. I realise that I am absolutely not an expert, nor do I claim to be. But I know enough to do my job effectively, to teach it to other beginners, and to start me down the path of continuous learning and improvement in my own skills.

I hope that you enjoyed this piece of writing and that you find it useful whenever you might find yourself needing to learn something in a hurry.

Why I continue to develop with PHP

I have no doubt that if you work in any realm of software engineering, or have at the very least spent enough time on Twitter, you’ll have encountered the seemingly endless cycles of arguments about what programming language, framework, or paradigm is best, and why everyone else is wrong.

PHP is no stranger to being a point of contention among different factions of web developers and is sometimes depicted as ancient, labouring technology. In reality, this is so far from the truth that it’s astonishing.

Why do people dislike it?

Some people can’t even give you an answer! It’s just fun to make fun of it. Though many do have genuine and understandable answers. A great deal of PHP code is written terribly, without conforming to the accepted standards that make working with the language, especially in corporate environments, significantly easier. Even common frameworks like CodeIgniter and the ubiquitous WordPress are guilty of this, hence the derision. Other codebases don’t make use of modern PHP functionality and suffer as a result.

A lot of other ridicule comes from lack of consistency in older function naming conventions and quirks of the language itself, but I really feel that this is grasping at straws at most, and such criticisms could be directed at other languages like JavaScript too, that aren’t flawless.

Node.js isn’t king, yet

Node.js, the JavaScript runtime powering many web applications is an insanely powerful tool with great frameworks to boot. It’s incredibly popular and is sometimes credited with being the future of all web development – JavaScript across the entire stack.

This, of course, doesn’t mean that PHP (and indeed other languages) are being forced out. Languages like PHP (and Python, Ruby, etc.) have diverse and mature ecosystems that power everything from simple blogs to large eCommerce monoliths. Let’s look at the statistics:

The PYPL index indicates that JavaScript sits at #3, and PHP shortly trails at #4, from this time of writing.

According to the TIOBE index, PHP continues to rise, sitting at around tenth place at the time of this writing.

Bare in mind, this includes usage of JavaScript across the entire stack, including front-end, where it remains an integral building block of the web.

The rise of Laravel… and WordPress

Backend Frameworks with the most stars on GitHub:

1. Laravel – 61.6K⭐️
2. Django – 52.1K⭐️
3. Flask – 52.1K⭐️
4. Spring Boot – 50.8K⭐️
5. Express – 50.2K⭐️
6. Ruby on Rails – 46.5K⭐️
7. Meteor – 42K⭐️
8. Nest – 30.5K⭐️
9. Koa – 30K⭐️

Which one is your favorite?— Marko ⚡ Denic (@denicmarko) September 26, 2020

The Laravel web framework, despite being relatively new, has skyrocketed its way to stardom on GitHub. This naturally isn’t representative of its usage, but its MVC, Rails-like architecture, command-line interface Artisan, database interactivity via object-relational mapping, templating engine, and testing suite for robust Test-Driven Development all out of the box, it’s a Swiss army knife that makes development not just easy, but immensely fast. I routinely make use of this framework, so I’m biased, but I highly recommend it.

For better, or for worse, WordPress continues to climb in usage. It’s easy to set up, its assortment of plugins and themes are unparalleled across all content management systems (CMS), and to its credit, has been working hard to rectify many of its historical security problems. The rise of JAMstack and static site generators have arguably made WordPress even more popular – by utilising it as an easy-to-use headless CMS that exposes its API to hydrate rapidly loading front-ends. Of course, if you’re looking to make money, then coding your own plugins and themes will remain profitable.

Okay I’m convinced! What now?

PHP is a fun and useful programming language to have in your arsenal, but don’t take my advice for it, go and explore the elephant ecosystem for yourself! I strongly recommend the following learning resources for getting on your way:

  • Codecademy is ideal for absolute beginners who want to learn language syntax without needing to install the language.
  • PHP The Right Way is something you should keep on hand at all stages of your career – it will remind you of the best ways to do things and common pitfalls to avoid. It will also guide you on how to install the language and package manager, Composer, on your operating system.
  • Laracasts is an incredible learning resource for both PHP and Laravel, with plenty of free learning paths for you to sample. I highly recommend a paid subscription if you’re serious about PHP. Great for Vue.js too.
  • Codecourse is another strong contender with plenty of free resources on PHP, Laravel, and other popular microframeworks.
  • PHP.net and of course, the language’s actual documentation.

Final thoughts

Ultimately, my tl;dr answer for why I develop using PHP in 2020 is because I like it. I grew up with it – and it remains and continues to mature as a respected and powerful tool on the Internet. This article’s purpose isn’t to discredit other languages, like JavaScript, but to reaffirm PHP’s place among them, and to serve as a reminder that it isn’t going anywhere anytime soon, regardless of how many paamayim nekudotayim jokes you make!