โ€ข

newsletter

Programming literacy: learn new languages and paradigms

Looking to improve your skills at work? Well, it's all about honing the basics: concepts, syntax, and semantics. That's why you should consider practicing a new programming language or paradigm. It's a revealing experience.


Sandro Maglione

Sandro Maglione

Software development

Programming literacy is a thing. Is not? Well, there should be ๐Ÿ’๐Ÿผโ€โ™‚๏ธ

Here is how I (and more than one AI) define it:

The ability to read, write, and understand code; programming concepts, syntax, and semantics, as well as applying skills to solve problems and communicate ideas.

This time of the year is ideal for a detour into unknown land, exploring new paradigms and languages.

It's also the best way to advance your programming skills. Here is how I go about it ๐Ÿ‘‡


You don't know what you don't know

One thing is knowing something and not liking it. A whole other problem is not knowing entirely something that could turn you into a different person.

Then there is knowing but not trying, just shaming. We all know those people ๐Ÿ‘€

It took me way too long to even hear the concept of "functional programming". Once I did, I jumped into it, explored, and never looked back.

Same for languages and platforms. You must know the struggle of PHP before appreciating the beauty of other languages (TypeScript).

It pays off to code for mobile, then web, games, and eventually stick to what you like best โœจ

Project-oriented learning

Programming (actually everything) is learned by doing. And programming offers a lot of resources to make you do stuff.

December for example is Advent of Code month. At this time last year I tried OCaml (you should as well).

There are also challenges for specific languages, example Advent of TypeScript.

The holidays are ideal for this. Remember that app that you were so excited about, but never had the time? The new year is that time.

Some suggestions of things to explore

Since the exploration is all about learning (and not the outcome of what you implement), you can get creative.

For example, here is some Lisp (Racket) that I wrote (some madness for you ๐Ÿ‘):

; define-syntax: Define format of new syntax expression
(define-syntax ++1
	; syntax-rules: Define some extra keywords required by the construct
  (syntax-rules ()
		; patterns: Define how the compiler will translate the new expression
    (
			(_ x) ; ++1 x
			; Define how the pattern will be translated
			(begin
				(set! x (+ x 1))
			x)
		)
))

;; EXAMPLE
(define a 1)
(++1 a) ;; => (begin (set! a (+ a 1)) a)

This had to do with functional programming, macros, continuations, OOP with closures, and more madness. I have no intention of using it for any app, but what a learning experience it was ๐Ÿ™Œ

Here are some ideas for you to get out of your comfort zone:

  • OOP or functional programming
  • Static or dynamic languages
  • Software app or game
  • Web or native mobile app
  • Frontend or backend (or cloud)
  • Complied or interpreted languages
  • Concurrency or parallelism
  • Shared memory or message passing
  • C++ ๐Ÿ˜ฑ

Pick one, as far away from what you are used to, and be ready to emerge on the other side with a new perspective ๐Ÿช„

My (frequent) detours into game development

A personal favorite of mine is game dev.

Making game is as far away as it gets from web apps. It's like plunging into another world with its own rules.

Software tends to be long term, strict, with rigid requirements. This fits well with the functional model, making everything strict and type safe.

Games jump the fence to OOP, mutability, and imperative code. It forces another pattern of thinking, managing the scope of a project, more low-level and creative.

Every time I am tempted to game dev, I learn something new, and I am reminded how insane is making a game.

On the topic, I released a package for ECS in TypeScript: @typeonce/ecs.

It's my way to make the madness of game dev more reasonable and manageable ๐Ÿ™Œ


Closing some projects and soon coming with new material on Typeonce. Meanwhile, I am sharing some of the patterns I learned recently:

New snippets incoming, as well as some ideas for new courses ๐Ÿ‘€

See you next ๐Ÿ‘‹

Start here.

Timeless coding principles, practices, and tools that make a difference, regardless of your language or framework, delivered in your inbox every week.