您一天的工作时间有多少花在编码上?
我最近一直在考虑软件估算,并且对编码所花费的时间有很多疑问。 我很想听听那些至少有几年软件开发经验的人的意见。
当您必须估计您将花费在某件事上的时间时,您一天中有多少小时用于编码? 其他非编码时间都用来做什么?
您发现您花在编码上的时间比您的队友多还是少? 您觉得自己完成的工作比他们多还是少?
您的工作条件如何? 私人办公室、共享办公室、团队房间? 单独编码还是两人一起编码? 您的工作条件如何改变您每天花在编码上的时间? 如果您可以在家工作,这会提高还是降低您的工作效率?
你们使用什么开发方法? 瀑布? 敏捷? 从一种方法更改为另一种方法是否对您每天的编码时间产生影响?
最重要的是:您对自己的生产力感到满意吗? 如果不是,您会做出哪一项更改对其影响最大?
I've been thinking about software estimation lately, and I have a bunch of questions around time spent coding. I'm curious to hear from people who have had at least a couple years of experience developing software.
When you have to estimate the amount of time you'll spend working on something, how many hours of the day do you spend coding? What occupies the other non-coding hours?
Do you find you spend more or less hours than your teammates coding? Do you feel like you're getting more or less work done than they are?
What are your work conditions like? Private office, shared office, team room? Coding alone or as a pair? How has your working condition changed the amount of time you spend coding each day? If you can work from home, does that help or hurt your productivity?
What development methodology do you use? Waterfall? Agile? Has changing from one methodology to another had an impact on your coding hours per day?
Most importantly: Are you happy with your productivity? If not, what single change would you make that would have the most impact on it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
我是研发部门的软件开发人员,每周工作 40 小时。
我花了大约 10% 的时间来写代码。
在我的非编码时间里,我主要测试、评估、比较并记录结果。 我还花了很多时间为我将要编写的代码编写规范并研究我将要编写的代码,我参加当前项目的头脑风暴会议等。
我可以说,从我的队友(也是软件开发人员)那里,我是目前写代码最多的人; 但取决于我们每次执行的任务。
我不会将实际编码量化为努力工作。 如果有良好的规范、适当的研究和对项目的良好理解,编码就只是一种
形式
,并且几乎可以顺利快速地进行。我们在这里有一个共用办公室,有两个团队。 我们大多是单独编码,很少是两人一起编码。 我的工作改变了我编码的时间; 过去我大部分时间都花在编码上,而对编码没有很好的理解。 如果我有一项任务,我会立即开始编码,并在每次意识到我做错了什么时重新编码等等。 而且效果非常差。
现在的开发方法介于原型法和螺旋法之间。 它明显改变了我编码的小时数。
我对自己的工作效率感到满意,这与我的截止日期和目标有关。
I'm a software developer in an R&D department working 40 hour a week.
I spend like... 10% of my time actually coding.
In my non-coding hours I mostly test, evaluate, compare and put down results. I also spend a lot of time writing specification for the code I will write and researching for the code I will write, I participate in brainstorm meetings for the current projects, etc.
I could say that from my teammates (also software developers) I am the one who codes most at the moment; but in depends on which task we work at each time.
I would not quantify actually coding as working hard. If there is a good specification, a proper research and a good understanting of the project, coding is just a
formality
and goes on almost smoothly and quickly.Here we have a sharred office, with two teams. We are mostly coding alone, rarely on a pair. My work changes a lot the amount of time I was coding; in the past I was spending most of my time coding, without a very good understanding of the coding. If I had a task I would immediately start coding, and re-coding each time I realised I did something wrong and so on. And it was very ineffective.
The development methodology is somewhere between prototyping and spiral now. It has clearly change the number of hour I code.
I am happy with my productivity, related to my deadlines and goals.
实际上,平均每天可能需要 4 或 5 小时。 虽然它“不稳定”,但有时可能会持续 8 或 9 个小时。
在我认识的所有软件开发人员中,编写生产代码(而不是研究代码)的开发人员中,4 到 5 名似乎是实际编码最多的人。 还有很多其他事情正在发生。
老实说,有很多拖延症。 我发现它有点像作家阻塞。 有时只是很难开始,但是 2 小时的良好课程就可以完成很多工作。 这只是您必须经历的所有准备工作和实验,以确保您采取正确的方法。 无休止地盯着窗外、检查电子邮件等……
Realistically, it probably averages out to 4 or 5 hours a day. Although its "lumpy" - there may be days where there could be 8 or 9 hours of it.
Of all the software developers I know, the ones that write production code (as opposed to research) 4 to 5 seems to be the max of actual coding. There is a lot of other stuff that goes on.
And to be honest there is a lot of procrastination. I find its a bit like writers block. sometimes its just hard to get started, but then a good 2 hour session is a LOT of work done. Its just all the preparation you have to go through, the experimentation to make sure you are taking the right approach. The endless amount of staring out the window and checking email etc...
我每周工作 37.5 小时。
其中 30 小时 (80%) 我应该向我们的客户计费。
事实上,我发现我大约 60% 的时间用于实际客户端系统上的编码,20% 的时间用于尝试新技术和阅读博客,20% 的时间浪费在办公室政治和“社交”上。
我对此感到高兴吗?
我是否希望能够每周盯着屏幕 30 个小时来完成指定的作业?
出色地。 由于 20% 的时间用于提高自己的技能,因此在 60% 的有效编码中,我可能比 90% 的时间(如果不这样做的话)产出的还要多。
再说一遍,尝试向上级解释这个事实;)
I work a 37.5 hour week.
30 of those hours (80%) I am supposed to be billing our clients.
In reality I find that I use about 60% coding on actual client systems, 20% experimenting with new techniques and reading blogs, and 20% is wasted on office politics and "socializing".
Am I happy about it?
Do I wish that I could stare at the screen 30 hours a week coding on my given assignments?
Well. Since 20% of the time is used bettering myself at my craft, in the 60% that is effective coding I probably produce more than I would in 90% of my time if I didn't.
Then again, try to explain that fact to the higher ups ;)
对我来说,项目之间的切换是拖延的一个重要原因。 当我刚刚完成一个项目时,我倾向于拖延开始分配给我的下一个要求。 我的大脑感觉仍然处于编码模式,但我必须首先估计创建规范的费用。 所以我必须从编码转向打电话给客户之类的,这感觉很不舒服。
对我提高工作效率最有帮助的是在一天的头几个小时消除任何干扰,并立即开始执行当天最重要的任务。 我需要尽早进入流程。
我建议您看看《程序员之石》:
我们知道压力会损害某些认知功能。 这些功能的丧失可以准确地解释为什么编程如此困难,并向我们展示了许多其他改进我们组织事物的方式的机会。 其后果涉及语言、逻辑和文化规范。 点击此处查看简介...
For me, switching between projects is a big cause of procrastination. When I've just finished a project I tend to procrastinate on kicking off the next requirement assigned to me. My mind feels still like in coding mode, but I then have to estimate the expenses for creating a spec first. So I have to switch from coding to calling customers and the like, which feels uncomfortable.
What helps me most in being productive is to cut away any distraction in the first hours of the day and starting immediately with the day's most important task. I need to get into the flow as early as possible.
I recommend having a look at The Programmers’ Stone:
We know that stress impairs some cognitive functions. The loss of those functions can precisely explain why programming is hard, and show us many other opportunities to improve the ways we organize things. The consequences roll out to touch language, logic and cultural norms. Click here for the Introduction...
我每天大约 40% 的时间都花在编码上。 40% 用于非编码活动(例如与我们粗略的构建服务器进行斗争,或者弄清楚为什么 NUnit 再次失败而没有错误消息,或者试图弄清楚为什么我们的代码停止与楼下的 Oracle 服务器通信......诸如此类的垃圾) )。 另外 20% 通常花在拖延或开会上。
我对自己的工作效率满意吗? 绝对不。 我每天工作 7 个小时左右,其中大约 2.5 个小时用于编码。 我宁愿每天花 5-6 个小时进行编码,只用一个小时来处理其他事情(遗憾的是,只有一件事才能实现这一点——PM 停止每天摆弄构建脚本—— - 不会发生)。 不幸的是,由于我是一名企业开发人员,管理层并不认为时间被浪费了。 因为我一天中 40% 的时间完成的工作比大楼里的大多数无人机(包括 PM)一周完成的工作还要多,所以他们认为我的工作效率很高。
I spend about 40% of my day coding. 40% goes to non-coding activites (such as fighting with our sketchy build server or figuring out why NUnit failed with no error message again or trying to figure out why our code has stopped talking to the Oracle server downstaird... junk like that). The other 20% is usually spent procrastinating, or in meetings.
Am I happy with my productivity? Absolutely not. I work 7ish hours/day, and I spend about 2.5 of that coding. I would much rather be spending 5-6 hours of my day coding, with only an hour dedicated to all the other stuff (sadly, the one thing that would make that happen -- that the PM stop diddling with the build scripts every day -- isn't going to happen). Unfortunately, since I am a corporate developer, management doesn't see the time being frittered away. Because I get so much more done in that 40% of my day than most of the drones in the building get done in a week (including the PM), they think I'm productive.
@Bernard Dy:我职业生涯的大约 30% 是在公司环境中度过的(目前不是)。 通常是在一些失败(或没有失败,但失败)的启动想法,或某种倦怠/改变之后。 暂时还可以,很高兴认识来自完全不同背景的人(谁会想到和律师和精算师一起玩会这么有趣),但最终我发现太难了早上充满动力(或者假期结束后害怕回去)——可能是因为你定义的原因(只是缺乏关心)。 但至少它是很好的经验和想法的来源。 你可以在任何地方遇到才华横溢的人(不仅仅是聪明的程序员——我总是试图找出企业背后真正的大脑是谁)。
有趣的是,我唯一一次实践严格的敏捷/XP 是在公司环境中——在这种情况下,可能每天 7 个小时实际动手编写代码(两人一组)——一天之后我从来没有如此疲惫过。 不确定这是否是一件好事,也许我只是懒惰。
@Bernard Dy: I have spent probably 30% of my career in corporate settings (am not at the moment). Usually its after some failed (or not failed, but fizzled) start up idea, or some kind of burnout/change. Its ok for a little bit, it is nice to meet people from totally different backgrounds (who would have thought that lawyers and actuaries could be so much fun to hang out with), but in the end, I just find it too hard to get up in the morning with motivation (or after a holiday dread going back) - probably for reasons like you define (just a lack of care). But its good experience and a source of ideas at the least. And you can meet brilliant people everywhere (its not just programmers who are smart - I always tried to seek out who the real brains were behind a business).
Interestingly the only time I have practiced strict agile/XP was in a corporate setting - in that case probably 7 hours a day was actual hands on code (in a pair) - I have never been so exhausted after a day of that. not sure if that is a good thing, perhaps I am just lazy.
我从事外包工作,基本上我整天都在编码,我有两个项目,我没有太多时间做其他任何事情,这意味着我不能承担更多工作,因为我无法完成任何事情,这是一个很好的政策,你应该尽你所能。
还要记住,您应该有空闲时间,而且非常重要的是要充分休息,因为如果不这样做,您的工作效率就不会很高。 这里的关键是计划和纪律。
在我和妻子一起度过的非编码时间里,我也喜欢出城,尽量不去思考我的项目,我越能保持这种平衡,我的工作效率就越高。
当我工作不多的时候,我喜欢阅读编程博客,也喜欢学习编程。
最后我想说,恕我直言,我们的职业不应该被视为一项工作,相反,你应该将其视为有趣的事情。
I do outsourcing and basically I code all day, I have two projects and I don't have much time to make anything else which it means that I can't take more work cause I could not finish anything, that is a good policy, you should take just as you can.
Remember also that that you should have spare time and very importantly is to rest enough because if you don't you won't be very productive. The key here is planning and discipline.
In my non-coding time I spent it with my wife, I also like to get out town and try not to think on my projects, the more I make this balance the more productive I am.
When I don't much work I like to read programing blogs and also I like to study programming.
And finally I would like to say that IMHO our carreer should not be seen as a work, instead you should see it like something fun.
回答我自己的一些问题:
我目前所在的团队只进行总体任务估计,因此很难跟踪每天的工作时间。 我想说的是,在我的职业生涯中,花在编码上的时间在 25%(主要是管理)到 85%+(每周在家工作 4 天,每周开一次半天的会议)之间。 不过,如果我必须猜测的话,平均值可能在 60% 左右。
对我花在编码上的时间影响最大的是会议的存在与否。 当我与每个人都在同一个房间处理敏捷项目时,会议往往是临时的,而且时间很短,因此编码所花费的时间非常长。 我还觉得当我在团队会议室时,我花在做非编码事情上的时间更少——有时甚至更少,因为当没有人清楚地看到你的显示器时,很容易浪费时间,无论是意外还是其他原因。 。 :)
To answer some of my own questions:
The current team I'm on does only does gross task estimation, so it's hard to track hours per days. I would say that, for my career, the time spent coding has been anywhere between 25% (mostly management) to 85%+ (working from home 4 days a week, get together for a meeting for half a day once a week). If I had to guess, though, the average is probably somewhere in the vicinity of 60%.
The biggest influence for me in time spent coding is the presence or absence of meetings. When I worked on agile projects with everybody in the same room, meetings tended to be ad-hoc and very short, so the time spent coding was very high. I also felt I spent less time -- sometimes a lot less time -- doing non-coding things when I was in a team room, because it's much easier to waste time, accidentally or otherwise, when nobody has a clear view of your monitor. :)
我是一名企业开发人员,Joel Spolsky 在 StackOverflow 的几个播客中将我称为“沮丧”的人。 因为我的公司不是一家软件公司,所以没有什么商业理由去实施软件专家建议公司采取的许多措施来提高开发人员的生产力。
我们没有私人办公室和双 30 英寸显示器。 我们的源代码控制系统是 Microsoft Visual Source Safe。 说够了。 另一方面,我可以做很多事情来充实我的一天,并为我的工作增添一些多样性。 我参与业务分析、项目管理、开发、生产支持、国际实施、培训支持、团队规划和流程改进。
我想说,我每天 85% 的时间都在编码,此时我可以集中精力并且有一项主要的编程任务。 但更常见的是,我每天大约 50% 的时间用于编码。 如果生产支持(与编码无关)很繁重,我一天可能只会用 15% 的时间来编码。
我工作过的大多数公司都没有积极参与评估敏捷流程或测试驱动开发,但他们在瀑布方面也做得不好; 他们的大多数开发人员都像剪切粘贴的牛仔一样毫无顾忌地工作。
有时我会在家工作并带着孩子,这可怕。 我的工作效率更高。
我的工作效率很好,但如果消除干扰因素和心理环境切换的成本,我的工作效率可能会更好。 生产支持和项目管理开销都会造成这些类型的中断。 但两者都是工作中必要的部分,所以我认为我无法摆脱它们。 我想考虑的是对团队进行重组,以便项目人员可以专注于项目,而其他人可以通过致力于支持来避免干扰。 然后当项目结束时交换。
不幸的是,没有人愿意提供支持,因此我希望采取的其他生产力改进措施将是以下之一:
I'm a corporate developer, the kind Joel Spolsky called "depressed" in a couple of the StackOverflow podcasts. Because my company is not a software company it has little business reason to implement many of the measures software experts recommend companies engage for developer productivity.
We don't get private offices and dual 30 inch monitors. Our source control system is Microsoft Visual Source Safe. Enough said. On the other hand, I get to do a lot of things that fill out my day and add some variety to my job. I get involved in business analysis, project management, development, production support, international implementations, training support, team planning, and process improvement.
I'd say I get 85% of my day to code, when I can focus and I have a major programming task. But more often I get about 50% of my day for coding. If production support (non coding-related) is heavy I may only get 15% of my day to code.
Most of the companies I've worked for were not actively engaged in evaluating agile processes or test-driven development, but they didn't do a good job of waterfall either; most of their developers worked like cut-and-paste cowboys with impugnity.
On occasion I do work from home and with kids, it's horrible. I'm more productive at work.
My productivity is good, but could be better if the interruption factor and cost of mental context switching was removed. Production support and project management overhead both create those types of interruptions. But both are necessary parts of the job, so I don't think I can get rid of them. What I would like to consider is a restructuring of the team so that people on projects could focus on projects while the others could block the interruptions by being dedicated to support. And then swapping when the project is over.
Unfortunately, no one wants to do support, so the other productivity improvement measure I'd wish for would be one of the following: