DEV Community

Cover image for The Twelve days of Coding Christmas
John Zittlau for Jobber

Posted on

The Twelve days of Coding Christmas

On the twelve days of Christmas, my true language gave to me...

I've coded in many languages over more than three decades (but this list doesn't really go back more than say two of those decades). Here is a list of the 12 features I remember being most happy to see (in no particular order).

1) Generics in Java
Yes, Java did not invent the concept of generics, but Java is where I was introduced to them. The ability to "strongly type" something and yet have that strong type not be hard-coded in the definition was revolutionary to me.

I'm a big fan of typing, and this opened up big flexibility while still maintaining typing assurances.

2) Swing UI
So I started using Java because it was an easier path for me to do some dot-by-dot rendering on the screen vs. MFC (which had a cost at the time).

This was before Swing and doing any sort of UI without events or the full palette of components that Swing brought to the table was a pain.

I'd used other UI systems (Open Look) that had much of this, but I couldn't wait to use a powerful UI "framework" in my chosen language.

Swing came along and made me look like a designer! (OK not really, but at least I could add buttons and lists and checkboxes oh my!)

3) Thread synchronization
Threads are scary. Rolling your own threading primitives to coordinate and sequence threads was common. When libraries started coming out that provided simple access to thread locks and thread-safe mutations, threading became a whole lot less scary.

There was a dark side to this. In Java (for example, and sorry for all the Java references, it wasn't the first language I used professionally, but it is still the language I've used most in a professional setting despite not touching it for many years now), threading became "too easy". What I mean but that is with all the constructs the language provided, it looked like threading was a "simple" thing to do. And so many developers who didn't have any business doing threads because they really didn't understand the dark sides of thread safety did threads. Much bad code resulted.

4) ORM
Hey, get off my lawn! I expect many of you reading this never had to deal with an application where you had to write every SQL statement by hand and then write code to copy the results of a query into some data structure that represents that data. (And then doing the reverse, manually building up an update/insert from that data structure)

ORMs (Object Relational Mappings) simplified all that. Now the heavy lifting of converting to/from SQL to your program's data structures is done magically and behind the scenes. So Easy!

And again, there is a dark side. Because the developers are removed from the SQL, they have far less insight into what is being done to the database, and bad DB performance is often the result.

5) Abstract Classes
I liked interfaces. They made sense and seemed powerful. I liked inheritance (even multiple inheritance). But what I really liked was Abstract Classes.

The ability to create a "stub" class that implements common functionality but leaves room (in fact requires) child classes to fill in the blanks. This opened so many doors in OO design for me.

Of course the kids these days, they'd point to mixins. And they'd be right.

6) REPL
This was (and is) a huge win. The ability to try some code snippet trivially without having to put that code in some "real" program and run the whole program is a huge time saver.

7) Online regex testers
It seems regex crops its head into nearly every project. I love regular expressions, but have to admit that I used to do lots of experimentation where I'd put some regular expression in the real code, then run it, dump the output and see what happens.

With online regex testers, you can easily play with your regex. And with the more powerful online testers, you can use multiple example lines to test many cases at once. Plus seeing how the groups are shaking out and everything. Big Win!

8) Frameworks that handle input sanitation and output encoding
Security is hard. Remembering to clean your input and output is hard. Modern frameworks that just do that for you are great. One less thing a developer needs to stress about.

Except not. developers always need to think through the security of what they are doing, so as with ORM above, these frameworks can provide a false sense of security (pun intended).

9) log file aggregators and search tools
Back in server-side pre-history, a server was a single computer. Maybe you had to combine a couple of log files all stored in /var/log, but it was all in one place and you could cat/sort/grep everything together and understand how things happened.

Then log files started getting organized in their own directories and piecing things together became hard. Then you had pool of servers and piecing things together became something you'd pay hard money for.

I can't imagine keeping a modern SaaS application live without these.

10) stream processing
I love being able to take a collection of items and then process over them stitching things together with Select/Reject/Map/Reduce and come out the other end with either a subset of the collection or an aggregate function of the collection.

Sure in some sense this is syntactic sugar to explicit looping (until you run in an environment where these commands work across multiple processing units), but done right, the intent of what you are doing is clear compared to what would happen in a for-loop and since you are writing a bit less code, you are likely to introduce fewer bugs.

11) Javadoc
Not sure Java was the first place for this, but it was the first I was exposed to. Being able to do some simple "markup" in the code and then have our API automatically documented in a nice searchable/indexable way was huge.

As with most developers, I'm not big on writing documentation. This took the effort to a minimum and made it less of a chore.

12) 12.days
Here's a Ruby one. Particularly when testing something time-based in a REPL (see below), I want to try different time intervals. In the past, I was used to doing lots of integer multiplication to get to seconds since the epoch from some number of hours/days/years in the past/future.

Ruby letting me just say "12.days" and have a meaningful Duration object is a huge time/brain saver.

13) (Special mention) Microsoft LINQ
This one gets special mention because I just don't have many opportunities to write code in a Microsoft environment and so have only had small chance to play with LINQ. The concept is awesome and I'd love to get serious with it.

There you have it.
The 12 (well 13) things I remember being excited of when I read about them. I'm sure there are many more I've forgotten and many I've just never been exposed to.

What about you? What language features could you not wait to try out when you heard of them?

About Jobber

We're hiring for remote positions across Canada at all software engineering levels!

Our awesome Jobber technology teams span across Payments, Infrastructure, AI/ML, Business Workflows & Communications. We work on cutting edge & modern tech stacks using React, React Native, Ruby on Rails, & GraphQL.

If you want to be a part of a collaborative work culture, help small home service businesses scale and create a positive impact on our communities, then visit our careers site to learn more!

Header image used under Creative Commons Attribution-Share Alike 3.0 Unported and sourced from wikimedia

Top comments (0)