« first day (538 days earlier)      last day (686 days later) » 

 
15 hours later…
19:23
Some guy once told me that as a professional, it is good practice to make functions no longer than (roughly) 10-15 lines (with the implication that otherwise the code is getting hard to read). While I think it is necessary to avoid spaghetti code, I don't think it is a good thing to divide larger sections of code up into smaller pieces, as in my opinion readability will suffer, as you have to go through more seperated pieces of code.
So I'd love to hear from the pros: Is there a similar rule you try to follow, or is there something I didn't understand about that?
Besides that I think I often find myself in situations where it just isn't possible to divide things up any further (without over complicating things).
At my work, I think we break up functions when the individual pieces are used in other places, subject to change (blackbox-style), or a conceptually distinct action, so to speak.
That seems to be a much better guide line.
I never really thought about how to organize code so far I really just used what seemed convenient (which is not necessarily the best way, as I've found out numerous times), or when I tried writing something in a bit a cleaner style I still just did it intuitively.
20:18
@flawr Pretty much the same thing as Elendia said
Although long files also trigger a warning in my head that it's refactor time.
Recently, I needed to add a new 150-line function to a 1200 line file, so me and my manager teamed up on refactoring it and now it's an 800 line file with the new function and all of the same functionality included
I call that a success
20:44
PRs with a net negative diff are always the best.
Do you use PRs? There are only 2 people who do software where I work (including me and the CEO), so we always just commit to the same branch 99% of the time.
There are a dozen developers here. We absolutely use PRs.
I have, uh, 7 PRs open right now for two separate but related tasks.
(7 PRs is a lot at once, mind you. That's more than usual.)
 
2 hours later…
22:29
I never noticed the genius of the alt-text on this one until now:
> If things are too quiet, try asking a couple of friends whether "a couple" should always mean "two". As with the question of how many spaces should go after a period, it can turn acrimonious surprisingly fast unless all three of them agree.
Oh wow, good spot.
23:21
So, my job at Microsoft is a bit different than I expected in regards to code quality/PRs
first off, I submit tons of PRs. I currently have 4? active PRs, but on some days (yesterday was one of them), I can submit up to 10
I think I submitted 7 yesterday
Secondly, there aren't super strict restrictions on code quality
They do have tools to automatically check some stuff (like whitespace, etc), but even those aren't required
The only requirement is that somebody has to approve your PR
which people take pretty seriously, at least on the team I'm on
(that somebody has to be a code owner of the project, unless you are a code owner yourself, in which that somebody can be anybody, but you still need a second pair of eyes)
Yeah, we typically require two approvals per PR at my job (primary/secondary reviewer). Project owners/leads don't necessarily have to be one of them, but often are.
We definitely don't submit that many PRs per day here. Aside from the 7 I have now, I made two others in the last four-ish weeks.
I wonder if that's because changes here tend to be pretty substantial so there's just no way to do that many different things in one release cycle.
what tool do you use? Gitlab? Visual studio online? Private Github?
Private GitHub repos.
I actually really like the toolset around VSO
I'd never heard of it, but after using gitlab, I definitely think it's an improvement
I haven't used Github a ton with collaborative stuff, so I can't really speak to it
my experience as a developer sounds completely different than either of yours. Which is almost certainly because of the difference in team size
23:32
I've had small teams as well :)
How big is your team at the moment, Nathan?
Did you have everyone commit to a single Master branch on those teams as well?
That said, when I'm on a small team, I'm usually working on my own stuff without any collaboration
@El'endiaStarman define team. It's complicated
My manager is over 5-6 people, but I actually don't work with any of those people
but the tasks I work on technically fall under a different manager, who also has a team of 5-6 people. But I don't report to him, so I just work with him and one other person on that team
so I actively work with 3 other people
@NathanMerrill I'll let you define it. :P I think my "team" stretches the meaning of team because collaboration among us is so fluid.
but as far as the number of people I have collaborated with, it's probably around 30.
and that will only grow as I continue to work
@DJMcMayhem Most of the smaller teams didn't use git
23:38
Heh, in this release cycle, I've interacted directly with, uh, nine other developers.
and the one smaller team that did, I was learning git for the first time, so I don't quite remember how they did it
@NathanMerrill o_O did they use any source control?
My company uses mercurial
no. One had all of their code in an online portal
@NathanMerrill That sounds awful. How did that work?
fine. it was just me working on it for most of the time
I also loved the language (XSLT), so I enjoyed the work
the online portal was definitely a frustration, but it was manageable
and the other job that didn't use version control was a single guy with a wordpress site that wanted help
which I quickly quit
(before I misrepresent the job, it was a big company, but he was the only one in charge of the website)
23:56
My last job didn't use any Version Control
But that's because it was a sandwich shop

« first day (538 days earlier)      last day (686 days later) »