Learning a New Language

Generally, every program I write, regardless of what useful thing it actually does, and regardless of what programming language it is written in, has to do certain things, which usually includes

  • Importing a library and calling functions contained within that library
  • Handling datatypes such as converting between strings and integers, and knowing when this is implicit or explicit, how dates and times work, and so on
  • Getting command line parameters or parsing a configuration file
  • Writing log messages such as to files or the system log
  • Handling errors and exceptions
  • Connecting to services such as a database, a REST API, a message bus etc
  • Reading and writing files to the disk, or to blob storage or whatever it’s called this week
  • Spawning threads and processes and communicating between them
  • Building a package whether that’s a self-contained binary, an RPM, an OCI container, whatever is native to that language and the platform

It’s easy to find examples of most of these things using resources such as Rosetta Code and my first real program will be a horrific cut and paste mess – but it will get me started and I’ll soon refine it and absorb the idiomatic patterns of the language and soon be writing fluently in it, and knowing my way around the ecosystem, what libraries are available, which are the strengths and weaknesses of the language, the libraries, the community and so on. Once you have done this a few times it becomes easy and you can stop worrying so much about being a “language X programmer” and concentrate on the important stuff, which is the problem domain you are working in.

About Gaius

Jus' a good ol' boy, never meanin' no harm
This entry was posted in azure, C++, Cloud, data science, f#, Haskell, Microsoft, Ocaml, Python, R, Random thoughts, Scala and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s