Are you someone who wants (or maybe is being forced) to learn a programming language? Learning to program isn’t just syntax and structure. Here are six questions you should answer about your programming language before writing your first program.
While learning the syntax, structure and tools, make sure you can answer the these questions.
1. What is latest version of your language?
By keeping yourself with the most up-to-date versions of your language, you minimize the risk associated with using old software with known security flaws. Building software can be risky, if not done carefully, so make sure you are using the most up to date version of your language.
Paying attention to the version information is also a great way to date the information and numerous resources you find out there in the wild. C# is in version 8 now. If you find a book about C# 2, it is NOT new, and can probably be recycled.
2. Who hosts the documentation, and where?
Programming languages will either have an organization, or a corporation which acts as the owner / maintainer of that language. C# is owned and maintained by Microsoft, and the C# documentation is hosted on their website. Python is hosted by the Python Software Foundation. Java, by Oracle.
Find the documentation website, and favorite it.
3. How do you manage dependencies and libraries?
Nowadays, nobody codes anything entirely by themselves. All languages start with a basic platform library that contains the very basic commands, keywords and structural expectations. C# has the .NET runtime. Java, the JDK. Often times open-source community provides the rest via a packaging system.
Learn your packaging platform, and how it works. Each package will often be just like the programming language itself, with versioning, docs, etc.
4. How do you test your code?
Unit testing has been a best practice for software development since the early 2000s. Unit tests are an extremely useful tool in your belt, enabling you to prove out functionality you are exploring or have written yourself. Every major language will have a library associated with writing unit tests. Using the packaging platform from step three, your next step should be finding out how to test your code. You, and your users, will be grateful that you did.
5. What risks are there? What should you watch out for?
In general, programming is a ‘high access’ activity on your computer, your networked environment, your data, etc. The convenience of doing things quickly or in bulk is precisely what a programming language can enable, so be careful. Make sure your SQL statements have WHERE clauses, and are guarded by a transaction that can be rolled back, if done in error. Make sure your loops have defined end states. Make sure you know precisely what your memory pointer is pointing to. Low-level compiled languages have more potential to damage computers directly by overwriting memory or restricted data. High-level interpreted languages tend to cause file or data related issues.
A computer does EXACTLY what it is told to do, and nothing more. Remember that, and be VERY sure it is doing what you intend.
6. How do you package and deploy the code you write?
Remember that code is just part of the story here, and is largely just a work product to the end result itself. Hosting a JavaScript site on a localhost isn’t enough, nor is a bunch of class files for a JAR file. When you write code, the goal is to ship an artifact of some kind. Don’t just start with Hello World, but start with Hello World deployed somewhere!
There are lots of resources out there for learning programming in a digital age. As you go through your learning, make sure you can answer these six questions while you’re learning the basics of the language. Happy coding!
2 thoughts on “Six Questions You Need To Answer When Learning a New Programming Language”