Image for post
Image for post
photo credit: Andre Mouton

I read a lot of stuff by developers discussing different aspects of being a developer. I’ve repeatedly hit a couple of themes this week that got me thinking about my time in the field, the people I’ve worked with, and my progression as a professional.

I determined that two topics I come across frequently are deeply intertwined and an inescapable result of the nature of our industry. This is the preponderance of what seems to be two types of people: those with impostor syndrome, and know-it-alls.

There are so many articles, posts, and tweets from developers of all skill levels…

A simple picture of three cropped rooftops next to each other, very close together. Like painted ladies in San Francisco.
A simple picture of three cropped rooftops next to each other, very close together. Like painted ladies in San Francisco.
photo credit: Jeffrey Czum

If you’re like me the first class you often write in a new app is User. After all, you’re writing an app because you want it to be used, and users are just the people to do that.

Usually, users have names. What data type do you use for a name? A string? How about email? Oh, a string again? And for Date of Birth, you probably use Date or Datetime.

What if I told you there was a better way?

If you’re at all familiar with Domain Driven Design (DDD) then you’ve at least heard of a Value Object…

Angular logo
Angular logo

*This article assumes a basic familiarity with rxjs observables.*

Last week I saw a post on by Nicolas Larrode titled ‘Communicate between Angular components.’ In the article, he detailed a simple service that allowed data to be passed between components by using a service that exposed a Subject.

If you’re not familiar with a Subject, just think of it as a two-way Observable. You can subscribe to it, sure, but you can also push values to all of its subscribers. Like so:

So in the article, Nicolas describes how we can use a subject in a service as…

Image for post
Image for post

When I first got into angular, I had some real complicated forms. I was working on a financial application at work that had details about various bonds and other financial instruments and forms had dynamic numbers of child forms and sometimes grandchild forms etc. Reactive forms were clearly the way to go, I loved them. But there was one thing I despised. In tutorial after tutorial, even on the angular site, I saw this:

get name() { return this.form.get('name'); } 
get email() { return this.form.get('email'); }
get password() { return this.form.get('password'); }
this.form ={ …

Justin Miles

Full-stack developer, Dad. Passionate about clean code and constantly learning. Current interests: Angular, DevOps, Domain Driven Design, and birding.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store