The second part of that question is key. If you are one of a few programmers, and after banging your head on your keyboard for endless nights you can't figure something out, with no one else in your organization to ask, what do you do? Not having someone to ask has more to do with the fact that it would take too long to bring them up to speed to even have them assess the problem. Are these the instances where you have uncomfortable conversations with management and tell them a third-party contractor with more experience will be required?
这个问题的第二部分是关键。如果你是少数几个程序员之一,并且在你的键盘上敲了敲无尽的夜晚后,你无法弄明白,你的组织中没有其他人可以问你,你做了什么?没有人要问更多的事情是,要让他们加快速度甚至让他们评估问题需要很长时间。这些情况是您与管理层进行不愉快的对话并告诉他们需要具有更多经验的第三方承包商吗?
7 个解决方案
#1
There is a time and place when everybody hits a problem where there doesn't seem an obvious way out.
有一个时间和地点,每个人都遇到一个似乎没有明显出路的问题。
1) Ask yourself if you are the first person ever to solve this - if not, then there is likely to be an answer out there. Try Google, SO etc.
1)问问自己,你是否是第一个解决这个问题的人 - 如果没有,那么可能会有一个答案。试试Google,SO等。
2) Take a break and try and do something else for a while - it's amazing what a few hours away from the keyboard and thinking about something else can do.
2)休息一下,尝试做一些其他的事情 - 距离键盘几个小时并想着其他事情可以做的事情真是太神奇了。
3) Try talking about the problem to someone else, even if they aren't technical - sometimes the process of explaining a problem to someone who isn't technical or involved can lead you to the right answer or an approach from a different angle.
3)尝试向其他人谈论这个问题,即使他们不是技术问题 - 有时向非技术人员或参与者解释问题的过程可以从不同的角度引导您找到正确的答案或方法。
4) Admit it's harder than you had envisaged or you are stuck. A good boss will help you get to the right outcome, for both you and their business. Make them aware of the effort put in and the conclusions and decisions you've made to date.
4)承认它比你设想的更难或你被卡住了。对于您和他们的企业来说,一个好老板会帮助您获得正确的结果。让他们了解所付出的努力以及您迄今为止所做出的结论和决定。
5) If all else fails, help your boss choose the contractor as you'll probably have to maintain their code :-)
5)如果一切都失败了,请帮助你的老板选择承包商,因为你可能需要维护他们的代码:-)
#2
My favorite is rubber ducky debugging, explained here: http://lists.ethernal.org/oldarchives/cantlug-0211/msg00174.html
我最喜欢的是橡皮鸭调试,在这里解释:http://lists.ethernal.org/oldarchives/cantlug-0211/msg00174.html
We called it the Rubber Duck method of debugging. It goes like this:
我们称之为Rubber Duck调试方法。它是这样的:
1) Beg, borrow, steal, buy, fabricate or otherwise obtain a rubber duck
(bathtub variety)1)乞讨,借用,偷窃,购买,制造或以其他方式获得橡皮鸭(浴缸品种)
2) Place rubber duck on desk and inform it you are just going to go over some code with it, if that's all right.
2)将橡皮鸭放在桌子上并告知它你只是要用它来查看一些代码,如果可以的话。
3) Explain to the duck what you code is supposed to do, and then go into detail and explain things line by line
3)向鸭子解释你的代码应该做什么,然后详细解释并逐行解释
4) At some point you will tell the duck what you are doing next and then realise that that is not in fact what you are actually doing. The duck will sit there serenely, happy in the knowledge that it has helped you on your way.
4)在某些时候,你会告诉鸭子你接下来做什么,然后意识到这实际上并不是你实际在做什么。鸭子会安静地坐在那里,因为它在你的路上帮助了你,所以很高兴。
Works every time. Actually, if you don't have a rubber duck you could at a pinch ask a fellow programmer or engineer to sit in.
每次都有效。实际上,如果你没有橡皮鸭,你可以在紧要求下让一位程序员或工程师坐下来。
Andy
#3
Some times if I can't come up with a solution it might be because I am headed the wrong path with my approach to solving the problem. It helps me a great deal to not think about the problem for a little bit. Coming back to it after a break can give one fresh insight that might help find a solution.
有时候,如果我无法提出解决方案,那可能是因为我走错了路,用我解决问题的方法。一点点不考虑这个问题对我帮助很大。休息后回到它可以提供一个可能有助于找到解决方案的新见解。
#4
Depending on the problem sometimes I develop one-off apps to test/work with that particular feature/bug/whatever without all of the other pre-conditions and dependencies that exist in the project (and could be affecting the result).
根据问题,我有时会开发一次性应用来测试/使用该特定功能/ bug /没有项目中存在的所有其他前提条件和依赖项(并且可能影响结果)。
Try redefining the problem. Sometimes you can rework the software you're writing so that you don't encounter the problem that you're trying to solve. Somtimes it's not a problem with your solution, but instead the state of the software that you're trying to implement it in.
尝试重新定义问题。有时你可以重写你正在编写的软件,这样你就不会遇到你想要解决的问题。有时候这对你的解决方案来说不是问题,而是你试图实现它的软件的状态。
#5
First I google
And if that doesn't help I try to split the problem into parts I can solve. Usually the insight I get doing those parts will enlighten me sufficiently so I can take a new stab at the difficult part.
首先我谷歌如果这没有帮助我尝试将问题分成我可以解决的部分。通常,我对这些部分的洞察力会让我充分了解,因此我可以对困难部分进行新的尝试。
#6
I like to start working on the easiest bits first. So what if you can't figure out how to find the optimised path algorithm in your map? Just start by writing the flood-fill drawing code. Then do the AI routines for combat, after all they need to get done as well. Then while you are working on the weather simulator, you will realise that your subconscious has been working out the details for the pathing algorithm while you slept.
我想先开始研究最容易的比特。那么如果您无法弄清楚如何在地图中找到优化的路径算法呢?首先编写泛洪填充绘图代码。然后做AI战斗的例程,毕竟他们也需要完成。然后,当你在天气模拟器上工作时,你会发现你的潜意识已经在你睡觉时计算出路径算法的细节。
#7
I faced this situation for an entire project in which I was the only programmer on the job, responsible for architecture all the way down to maintenance.
我遇到了整个项目的情况,我是工作中唯一的程序员,负责架构一直到维护。
I dealt with it by aggressive use of Google and programming Q&A sites, though I didn't have SO at the time (resorted to Yahoo! Answers a couple of times). Most of the time I wouldn't find exactly what I needed, and I had to use my brain and do some hard-core trouble-shooting to solve most problems.
我通过积极使用谷歌和编程问答网站来处理它,虽然我当时没有SO(几次使用Yahoo! Answers)。大多数时候我都找不到我需要的东西,而且我不得不使用我的大脑并做一些核心故障排除来解决大多数问题。
When you get absolutely stuck behind a brick wall, you need to come up with workarounds that are satisfactory for your end users. Chances are you won't be able to make everything work by sheer force of programming.
当你完全被困在一堵砖墙后面时,你需要提出令你的最终用户满意的解决方法。有可能你无法通过纯粹的编程力量使一切工作。
I agree with another answer here that sometimes getting up and walking away from a problem will often provide you with flashes of insight that would never occur to you while you're behind the keyboard. I have often had my most brilliant ideas come to me while driving or in the shower.
我同意这里的另一个答案,即有时起床和离开问题通常会为您提供在键盘后面永远不会发生的洞察力。我经常在驾驶或淋浴时来到我身边。
#1
There is a time and place when everybody hits a problem where there doesn't seem an obvious way out.
有一个时间和地点,每个人都遇到一个似乎没有明显出路的问题。
1) Ask yourself if you are the first person ever to solve this - if not, then there is likely to be an answer out there. Try Google, SO etc.
1)问问自己,你是否是第一个解决这个问题的人 - 如果没有,那么可能会有一个答案。试试Google,SO等。
2) Take a break and try and do something else for a while - it's amazing what a few hours away from the keyboard and thinking about something else can do.
2)休息一下,尝试做一些其他的事情 - 距离键盘几个小时并想着其他事情可以做的事情真是太神奇了。
3) Try talking about the problem to someone else, even if they aren't technical - sometimes the process of explaining a problem to someone who isn't technical or involved can lead you to the right answer or an approach from a different angle.
3)尝试向其他人谈论这个问题,即使他们不是技术问题 - 有时向非技术人员或参与者解释问题的过程可以从不同的角度引导您找到正确的答案或方法。
4) Admit it's harder than you had envisaged or you are stuck. A good boss will help you get to the right outcome, for both you and their business. Make them aware of the effort put in and the conclusions and decisions you've made to date.
4)承认它比你设想的更难或你被卡住了。对于您和他们的企业来说,一个好老板会帮助您获得正确的结果。让他们了解所付出的努力以及您迄今为止所做出的结论和决定。
5) If all else fails, help your boss choose the contractor as you'll probably have to maintain their code :-)
5)如果一切都失败了,请帮助你的老板选择承包商,因为你可能需要维护他们的代码:-)
#2
My favorite is rubber ducky debugging, explained here: http://lists.ethernal.org/oldarchives/cantlug-0211/msg00174.html
我最喜欢的是橡皮鸭调试,在这里解释:http://lists.ethernal.org/oldarchives/cantlug-0211/msg00174.html
We called it the Rubber Duck method of debugging. It goes like this:
我们称之为Rubber Duck调试方法。它是这样的:
1) Beg, borrow, steal, buy, fabricate or otherwise obtain a rubber duck
(bathtub variety)1)乞讨,借用,偷窃,购买,制造或以其他方式获得橡皮鸭(浴缸品种)
2) Place rubber duck on desk and inform it you are just going to go over some code with it, if that's all right.
2)将橡皮鸭放在桌子上并告知它你只是要用它来查看一些代码,如果可以的话。
3) Explain to the duck what you code is supposed to do, and then go into detail and explain things line by line
3)向鸭子解释你的代码应该做什么,然后详细解释并逐行解释
4) At some point you will tell the duck what you are doing next and then realise that that is not in fact what you are actually doing. The duck will sit there serenely, happy in the knowledge that it has helped you on your way.
4)在某些时候,你会告诉鸭子你接下来做什么,然后意识到这实际上并不是你实际在做什么。鸭子会安静地坐在那里,因为它在你的路上帮助了你,所以很高兴。
Works every time. Actually, if you don't have a rubber duck you could at a pinch ask a fellow programmer or engineer to sit in.
每次都有效。实际上,如果你没有橡皮鸭,你可以在紧要求下让一位程序员或工程师坐下来。
Andy
#3
Some times if I can't come up with a solution it might be because I am headed the wrong path with my approach to solving the problem. It helps me a great deal to not think about the problem for a little bit. Coming back to it after a break can give one fresh insight that might help find a solution.
有时候,如果我无法提出解决方案,那可能是因为我走错了路,用我解决问题的方法。一点点不考虑这个问题对我帮助很大。休息后回到它可以提供一个可能有助于找到解决方案的新见解。
#4
Depending on the problem sometimes I develop one-off apps to test/work with that particular feature/bug/whatever without all of the other pre-conditions and dependencies that exist in the project (and could be affecting the result).
根据问题,我有时会开发一次性应用来测试/使用该特定功能/ bug /没有项目中存在的所有其他前提条件和依赖项(并且可能影响结果)。
Try redefining the problem. Sometimes you can rework the software you're writing so that you don't encounter the problem that you're trying to solve. Somtimes it's not a problem with your solution, but instead the state of the software that you're trying to implement it in.
尝试重新定义问题。有时你可以重写你正在编写的软件,这样你就不会遇到你想要解决的问题。有时候这对你的解决方案来说不是问题,而是你试图实现它的软件的状态。
#5
First I google
And if that doesn't help I try to split the problem into parts I can solve. Usually the insight I get doing those parts will enlighten me sufficiently so I can take a new stab at the difficult part.
首先我谷歌如果这没有帮助我尝试将问题分成我可以解决的部分。通常,我对这些部分的洞察力会让我充分了解,因此我可以对困难部分进行新的尝试。
#6
I like to start working on the easiest bits first. So what if you can't figure out how to find the optimised path algorithm in your map? Just start by writing the flood-fill drawing code. Then do the AI routines for combat, after all they need to get done as well. Then while you are working on the weather simulator, you will realise that your subconscious has been working out the details for the pathing algorithm while you slept.
我想先开始研究最容易的比特。那么如果您无法弄清楚如何在地图中找到优化的路径算法呢?首先编写泛洪填充绘图代码。然后做AI战斗的例程,毕竟他们也需要完成。然后,当你在天气模拟器上工作时,你会发现你的潜意识已经在你睡觉时计算出路径算法的细节。
#7
I faced this situation for an entire project in which I was the only programmer on the job, responsible for architecture all the way down to maintenance.
我遇到了整个项目的情况,我是工作中唯一的程序员,负责架构一直到维护。
I dealt with it by aggressive use of Google and programming Q&A sites, though I didn't have SO at the time (resorted to Yahoo! Answers a couple of times). Most of the time I wouldn't find exactly what I needed, and I had to use my brain and do some hard-core trouble-shooting to solve most problems.
我通过积极使用谷歌和编程问答网站来处理它,虽然我当时没有SO(几次使用Yahoo! Answers)。大多数时候我都找不到我需要的东西,而且我不得不使用我的大脑并做一些核心故障排除来解决大多数问题。
When you get absolutely stuck behind a brick wall, you need to come up with workarounds that are satisfactory for your end users. Chances are you won't be able to make everything work by sheer force of programming.
当你完全被困在一堵砖墙后面时,你需要提出令你的最终用户满意的解决方法。有可能你无法通过纯粹的编程力量使一切工作。
I agree with another answer here that sometimes getting up and walking away from a problem will often provide you with flashes of insight that would never occur to you while you're behind the keyboard. I have often had my most brilliant ideas come to me while driving or in the shower.
我同意这里的另一个答案,即有时起床和离开问题通常会为您提供在键盘后面永远不会发生的洞察力。我经常在驾驶或淋浴时来到我身边。