Live data from Hacker News

Ask HN: How to break up and delegate programming tasks

news.ycombinator.com

11–20 of 36 posts

Re: Ask HN: How to break up and delegate programming tasks

#11

I'm a big fan of old fashion modules are flow charting. Start by flow charting your program, divide the task into a group of single statements tasks that can be described without the words, "and", "or", "but", etc. If you need to use those words, you need to chain tasks or make decisions. After several revisions (3-4) you should have a nice overview of what the program should do, and how it will do this. Selected tig…

Now you have your scrum/agile modules which can be outlined and given to subordinates, and tracked.

"Agile" micromanagement is great if you're looking to bleed talent. Highly recommended if you're looking to reduce costs and don't care who leaves.

Re: Ask HN: How to break up and delegate programming tasks

#12

I'm a big fan of old fashion modules are flow charting. Start by flow charting your program, divide the task into a group of single statements tasks that can be described without the words, "and", "or", "but", etc. If you need to use those words, you need to chain tasks or make decisions. After several revisions (3-4) you should have a nice overview of what the program should do, and how it will do this. Selected tig…

Now you have your scrum/agile modules which can be outlined and given to subordinates, and tracked. "Agile" micromanagement is great if you're looking to bleed talent. Highly recommended if you're looking to reduce costs and don't care who leaves.

Indeed, a collaborative team is much better than top-down micromanagement. It's a pleasure to work with "agile" teams where everyone can define their own tasks.

Re: Ask HN: How to break up and delegate programming tasks

#13
This may be a very unpopular approach, but it has always worked well for me. Look at the tenets of Extreme Programming and I would imagine you will find great success.

First, how to break up tasks. I write very small user stories. I aim for things that can be accomplished in half a day. This forces me to do two things. We now have smaller tasks with tangible end goals that actually produce something for the end user. These are usually easier for everyone, from management to intern to understand and follow through to completion. We also don't overthink a task, bite sized chunks are easier to digest, after all.

Second, as a few others hand pointed out, you have to trust your junior and mid level developers to complete a task on their own. Write the story in a way that they can understand what the end goal and tangible result will be. If you keep it small and discuss these openly, this will get a lot easier in a short period of time. Don't worry about the implementation details so much, that will come more in a second.

Third, (here comes the unpopular parts!) TEST! Preferably, at least in my view, use Test Driven Development. Enforce an cultural change of moving towards testing. This will document the code as much as anything and if a refactor needs to be done after a junior or mid level developer completes a task, the tests will facilitate that. It will increase your level of trust in their work as they complete tangible user story goals.

Fourth, pair program. You don't always have to, but heck after a while you might actually like it. Pairing allows you to riff off of one another. Junior and senior level developers can get a lot out of this, far more than just the junior learning something from the senior. If you are finding that your junior developers aren't "getting your style" pair for a while. You might start to understand them as well.

Finally, all of this leads to trust. Look, code bases will need refactoring. I am quite Senior and I am sure if I sat with your code, or you with my code, we would find areas where things could have been done better. Trust that if the code works and does what it needs to do according to the small tangible goals of a user story, and that when it has accompanying tests, you and others will be able to refactor it and make it even better over time.

Re: Ask HN: How to break up and delegate programming tasks

#14
post #6

Stop treating your junior developers like monkeys who are only there to implement your brilliant ideas. That's not their job. Every developer should be able to solve problems; the more senior the developer the greater the impact and complexity of the problem they should be solving. Your job as a senior developer is to work out the high-level architecture that will contain the solutions to the smaller problems - eg so…

I agree with you fully, in theory.

However, you have to understand that not all places have the luxury of their junior developers being that competent. We've tried, and we've been bitten many times. I've done it a few times myself since I started managing a team. I give them responsibility, lee-way to make their little "component" how they deem (obviously sticking to basic coding standards, at least), and ample time to complete the work. Senior developers are also at their disposal to answer questions that may arise, or even plain design advice.

And even after all of that, we're left with a steaming pile of half-copy-pasted-from-elsewhere code that's been kludged together and barely works. Some of the code is just there because it was in the sample code, others are just leftovers from failed attempts. Almost as if they kept throwing code at the problem until it "worked". They don't even bother to take a cursory look at the framework method/function that they're utilizing to maybe understand what it does, if not how or why it does so.

I don't know, perhaps we're not doing something right as well. Or maybe we're just unlucky that we have quite a string of dud junior developers. Or perhaps I'm just ranting.

Re: Ask HN: How to break up and delegate programming tasks

#15
post #14
post #6

Stop treating your junior developers like monkeys who are only there to implement your brilliant ideas. That's not their job. Every developer should be able to solve problems; the more senior the developer the greater the impact and complexity of the problem they should be solving. Your job as a senior developer is to work out the high-level architecture that will contain the solutions to the smaller problems - eg so…

I agree with you fully, in theory. However, you have to understand that not all places have the luxury of their junior developers being that competent. We've tried, and we've been bitten many times. I've done it a few times myself since I started managing a team. I give them responsibility, lee-way to make their little "component" how they deem (obviously sticking to basic coding standards, at least), and ample time…

Out of curiosity, how do you handle things like testing, continuous integration, and code review? I have found, as I stated in another comment, that these sorts of things help quite a bit. Developers will more often than not rise to the occasion when told they need to test and be ready for continuous integration. The only thing I have found useful is to draw the line between ample time and too much time. This comes down to tasking appropriately in small chunks. If the cadence of development in the groups is that, on average, you get two things a day integrated, then I have found that engineers will ask more questions and make better decisions.

Re: Ask HN: How to break up and delegate programming tasks

#16
When I'm outsourcing stuff, I like to use the "clean room" approach. I give the junior developer/outsourcer either a simplified version of the codebase, or some raw materials, and ask them to do the task I need. Then they hand me back the code and I integrate it into the full codebase.

This way they don't need to know the full system or even have access to version control; they just need to get their small goal completed, I can take care of the rest.

Over time, they can earn more and greater responsibility/access.

Re: Ask HN: How to break up and delegate programming tasks

#17
post #14
post #6

Stop treating your junior developers like monkeys who are only there to implement your brilliant ideas. That's not their job. Every developer should be able to solve problems; the more senior the developer the greater the impact and complexity of the problem they should be solving. Your job as a senior developer is to work out the high-level architecture that will contain the solutions to the smaller problems - eg so…

I agree with you fully, in theory. However, you have to understand that not all places have the luxury of their junior developers being that competent. We've tried, and we've been bitten many times. I've done it a few times myself since I started managing a team. I give them responsibility, lee-way to make their little "component" how they deem (obviously sticking to basic coding standards, at least), and ample time…

Are you running into more design issues ie they didn't fully understand how to solve the problem so they are just throwing code at it? Or are you running more into code issues where the code is just sloppy?

For the first problem I would consider that after you give them a problem and they solve it have them white board it for you. Ask questions about how they handle certain edge cases or problems. If they haven't have them go back and figure it out.

For the problem with sloppy code have code reviews every few days. Just keep on asking questions about special cases, and giving advice on how to better structure code.

Re: Ask HN: How to break up and delegate programming tasks

#18
It takes experience, experimentation, and what works for one team or individual, may need to be altered to work for another team or individual.

I like to break up tasks into what I hope is achievable in 4 hours. Always assign yourself as much (or more) of these sized tasks than those your assigning others, if you don't want to appear that your only a manager.

Re-evaluate these sizes often. Especially with a new project, new team, or new person. Maybe due to something you did not foresee right out of the gate, this 4 hour task is really a 16 hour task. Or possibly the other developer is working hard, and learning fast, but you just misjudged how quickly they can complete it in. In this scenario, the next time it comes to split up work (or if you really over-shot, you can re-split up what you gave them) remember this metric, and size it a bit smaller.

Depending on distractions, and how well the above process is tuned, I only hope for 1 of these 4 hour issues to be completed per day, while at the same time, looking at it over a week or two average, not daily, as many programmers do not work in a predictable linear fashion.

Over time as engineers progress and grow at their craft, what they may have been able to do in 4 hours, might be 20 minutes. As you work with others you will get a feel for this, and become more tuned into other people's forte's. Not everyone is good at CSS for example, even if you know how it works. So its not just about skill. The longer you work with people, the better you will get at carving out tasks that work for you and for them, and for the team.

So in summary, experiment with it, give yourself as much work, and in the same manner you delegate tasks to others delegate tasks to yourself. Re-evaluate the size of these tasks often, and try to create tasks that others can get done in a reasonable amount of time, so that they get the feeling of completing something.

Not everyone can be given a big gigantic month long task and not get lost in it, and on the other hand, tasks smaller than 4 hours, really start to feel (and take the energy) of micro-managing. The more senior the developer that has proven they meet goals on time and communicate well, these can be relaxed a bit, and you might find someone really prefers 2-3 day sized tasks, but can also be reliable in this manner.

Finally, ask them. You might be surprised.

Re: Ask HN: How to break up and delegate programming tasks

#19
The most important realization I had this year is that the biggest problem in software development (from the tech perspective) is not about programming, but about getting people to talk and cooperate.

I don't think you can successfully break up programming tasks for junior devs, who can then independently implement them. It has two problems:

1) You either get a lot of code with incompatible ideas, or you do a lot of coaching.

2) The junior devs are not learning as much as they could.

So you should not try to do this on your own, but rather involve the people who will be implementing the project in the process. You can still design the system in your head in advance, but I think the best approach is to then discuss it with the people on the project and come up with the final version together. Maybe somebody will have a better idea, or just tell you something you missed. As you go deeper and deeper, you will keep discovering problems on the lower levels. Some things will remain unknown or require experimentation, but for most you can come up with a solution. I think it's very valuable if everybody on the team understands the big picture. If the application has a few completely separate modules, then you can do the lower level design in different groups, but it's still useful if the task breakdown comes from the people who will be working on the code. Doing it in a meeting, rather than a write up and review process, gives them instant feedback.

Regarding the task breakdown itself, I try to think of how I'd implement all of the code myself. That means thinking about what data comes though the system and where it can be used to set code boundaries, which parts are more important and which can wait, what would be the smallest presentable version and how can I move it further after it's done, do I have some non-code dependencies (business decisions, dealing with external services). I like to draw diagrams (mainly the data flow). Sometimes tasks are simply large and you can't do much about that, but you can at least some milestones for them.

This makes sense to me in a smaller company when building some web application, probably does not make sense in a different situation. (Sorry for a long comment.)

Re: Ask HN: How to break up and delegate programming tasks

#20
post #14

Earlier quoted context omitted.

I agree with you fully, in theory. However, you have to understand that not all places have the luxury of their junior developers being that competent. We've tried, and we've been bitten many times. I've done it a few times myself since I started managing a team. I give them responsibility, lee-way to make their little "component" how they deem (obviously sticking to basic coding standards, at least), and ample time…

Out of curiosity, how do you handle things like testing, continuous integration, and code review? I have found, as I stated in another comment, that these sorts of things help quite a bit. Developers will more often than not rise to the occasion when told they need to test and be ready for continuous integration. The only thing I have found useful is to draw the line between ample time and too much time. This comes d…

We have unit-testing for framework-level code, which is more often written by a senior developer. Continuous integration builds happen every half-hour I think, so we quickly pick up if someone pushed something that breaks the compilation or build process. Though, at that level, I should point out that quite a lot of our business code is written in python, so even basic syntax errors go through further than they should. In this department, I'm pushing for getting lint-checking via Sonarqube integrated into our CI process, which is almost production ready, but delayed.

As for code-review, well to be honest, we don't have a formal process at all. It's simply been that way since before I got here. But in my unit we've managed to get buy-in from the high-ups to start off with it in the next project. So I hope that helps us quite a bit. At least, it'll help me out as I'm currently the only one that reviews code. Every once in a while when I've got down time I go through the commits, and add TODO's and comments all over the place. I've found that it makes it quite obvious to the developer if he sees such comments abundant in their code. If it's seriously bad, I speak to them personally and explain things in detail including the "why"s.

I'll definitely see if we can maybe push for unit-testing for our business code. I'd guess that that, and the incoming code-review processes will help a bit. Perhaps they'll not fight it too much when they realize that it'll increase their quality as well as their overall skill.

Post reply on HN