Your Next Language

Rob Echlin
codeburst
Published in
3 min readMar 10, 2018

--

I have been re-learning Perl, for a maintenance project at work. If you don’t have a specific task like that, have more fun while learning, with something like a “joke” program that uses the Fibonacci series to display a list of all the characters Lady Gaga has played in her videos. Or the names of Rebecca Blacks songs. Or maybe something interesting instead.

Obvious

Good place to start. Lady Black deserves the best:

  • Blocks
  • Loops and Decisions
  • Functions
  • Comments: line and block
  • Variables
  • Passing variables to a function: by value, by reference
  • Using the public package repository, and package manager
  • Breaking long lines into readable pieces that fit in a fairly narrow window, so you can edit 3 files side-by-side, and still see a Wikipedia list of those songs and videos and you play them one after the other while telling yourself you’re researching. Or maybe I should follow a Slack channel today, that’s also research.

Scale-dependent

What scale of projects will you work on first? This will help you decide what scales of code management to learn about.

One-file script!

After Hello World, you probably need to learn:

  • Including packages from the standard library
  • Including packages downloaded from the public repository
  • Calling functions from other files

Two or more files

you also need to know about:

  • Creating other files to include
  • Specifying which functions are available outside that file

Public scale

By Public Scale, I mean that you will share libraries in a private or public repository. You will likely want to learn other things first, even if you need these skills:

  • Using files or packages shared with other projects in your team or company
  • Accessing them from where they are stored (often by the “Include Path”)
  • Producing packages for use in a private or public repository, for access by the package manager as your personal startup scales up to its first dozen, I mean thousand, customers

Standard Idioms

So, how do you really read from a file in this language?

  • Reading/writing a file
  • Reading line-by-line from a file or variable
  • Reading from a web page, or a REST API
  • Sorting
  • Send small text email

The Standard Library

What obvious tasks are you likely to need in this project?:

  • Finding things in a string — use Regular Expressions
  • Date math
  • Database manipulation
    SQL, NoSQL, DBM
  • Using configuration files
  • Reading lists of files
  • Disk access:
    Reading names of files/folders from a folder
    Creating files, folders

Preparing for Maintenance

After you get the basics lined up, and before you start doing real coding, consider how to make your code better for the maintenance programmer, which will probably be you, 6–12 months from now after the startup you’re in lays off half the staff, and I was the only one left and there weren’t any other jobs to jump to.

  • Test systems
  • Language/compiler settings to enforce good coding
  • Lint-like tools to check for common coding errors
  • Style enforcement tools
  • How to write inline docs for this language, or how to use the multi-language API generator that your team/company already uses, such as Doxygen, or Swagger.

More

I hope you have fun learning your new language!

I will next write about learning specific languages, starting with Perl, Python, and Bash, so come back soon!

✉️ Subscribe to CodeBurst’s once-weekly Email Blast, 🐦 Follow CodeBurst on Twitter, view 🗺️ The 2018 Web Developer Roadmap, and 🕸️ Learn Full Stack Web Development.

--

--

Black Lives Matter. Truth and Reconciliation. This is my place to be authentic. To write about my spiritual path, and my technical life.