For example, if you call course.duration, it might return 6.
6 what? 6 Days? 6 weeks? Avdi talked about making the value “whole”, by including every element required to correctly parse the duration attribute. course.duration would now return something like Weeks. Unambiguous.
I’ve had an idea for something similar regarding Slack messages rolling around my head. Since I work remotely, most of my communication with my coworkers happens via text. Sometimes this is comments in Jira tickets, but a large amount of it happens in Slack.
Two Slack suggestions
These are just suggestions, or even personal preferences. If you read these and think:
Eh, not for me.
That’s totally fine. If you read them and think:
This is interesting. I didn’t even know anyone noticed such things. It makes no difference to me if I do these things, so I’ll lean in the direction of Josh’s preference, even if its just to make his life a little easier.
I started my first software developer role a year ago. (November 2017)
This is tremendously exciting, of course, but introduces its own set of challenges, like:
I finished Turing and I’ve got a job! Oh snap. I just finished a grueling program, and my reward is I’m fit to sit at the same table with people who know so much more than me.
I have to learn a whole new codebase. Or four.
I have to meet the standards of an inexperienced-but-competent professional, which are higher than “eager student”.
So, I’ve been thinking a lot about how to grow as a developer in my job.
What does “grow as a developer” mean?
Part of growing in anything means having goals. I have career goals that may be 5+ years out, but for the next year or two, these are the goals I’m using to drive me towards my goal of being “an experienced developer””
Build deep competency with the “standard” Rails framework. I think Rails scales just fine, and I don’t want to toss a JS-heavy front-end on our application. (I’m secretly pulling for Turbolinks and Stimulus…)
Help guide our product through a few big changes in the coming year, and help drive decisions around those changes
Support other teams within the company
Put up a lot of PRs, close a lot of tickets. Do a lot of “work”
These are not great goals, as far as good goal-setting goes, but I am not worrying too much about it, because good habits tend to be more important than good goals. And I’ve got good habits!
Here are some constraints I’m operating within:
I work on a 100% distributed team of developers, but most of the rest of the offices works in-office in Pittsburgh. (Project/Product Management, Quality Assurance, DevOps, Support, Managed Services, Sales)
My immediate team is a group of three other developers. Myself and one other dev started at the same time.
The other two developers have been on the team for about three years.
The individuals who built most of the application is no longer on the team.
there is an extreme level of trust passed to all on the team. No one is required to pair with me, or checks in with me every day to make sure I’ve committed X code or fixed Y bugs.
We’re currently without an immediate manager.
I live a balanced life. I spend time with my wife, I rock climb a lot, I’ve gotten back into running, I read a lot. I won’t spend 20 hours a week on top of my job, trying to become a better developer.
One of the topics was using “whole values”, instead of being “primative obsessed”. The example Avdi gave was clear as day.
He used a course with a duration attribute to show the problem.
3 what? weeks? days? months?
Of course, you could write a method like:
But now you’ll have trouble rendering this all over the place. You’d have conditionals every time you wanted to render courses in weeks (if it makes sense), or in months (if appropriate), or of course, days.
So, the solution is to use “Whole values”. This means an attribute should be a complete unit, in and of itself, and should need no further refining to be usable.