Code is right here. And all it's doing is when I'm getting into the different places I'm simply printing out information about where I am. What I want you to see palindrome is notice what happened here.
代码就在这儿,它的作用是当我运行到不同地方时,就输出我所在方位的信息,我想让你们看的就是注意这儿发生了什么,好了我调用了一个。
But it turns out that on Macs and if you have the right software on PCs, you can kind of get a teaser of what this environment tends to look like and be forewarned, what you're about to see is intentionally very underwhelming.
事实上,它是运行在苹果机上的,如果你在电脑上有正确的软件,可以去看看这个环境大致是怎么样的,提前说下,这个程序不会让你印象深刻,我是故意这样做的。
And I'm going to run it in a sec, but you can see, the same kind of idea.
我马上要去运行它,但是你们会明白,思想是一样的。
And now since it's reversible, we can run it forward or backward.
因为它是可逆的,所以可以正方向运行。
It's a little puzzle piece that says when the green flag is clicked and this is kind ; of like the beginning of a program; when you double click an icon on your desktop this is how something like that is implemented; it's listening for that double click, it's listening for that green flag.
是一小个按钮,它的意思是,何时点击绿色旗帜,这就好比开始运行程序;,当你双击桌面上的图标,就开始执行操作,桌面的图标需要双击,绿色小旗也等待点击来执行命令。
Now, efficiency is obviously an important consideration when you're designing code, although I have to admit, at least for me, I usually want to at least start initially with code that works, and then worry about how I might go back and come up with more efficient implementation.
现在,当你设计程序的时候效率,是不得不考虑的问题,虽然我必须承认,至少对我来说,我是先担心程序能不能运行,再去把它的效率优化的,我喜欢可靠点的东西。
But here I want it to be determined, chosen at run time.
但是在这里我想要让它是一个由运行时间。
And so very often I would find myself with gigabytes worth of data, at night I needed to analyze this data and look for this patterns and frankly the reality was sometimes I could spend 10-15 minutes whipping up a little script, a little program that unfortunately would take eight hours or more to run.
我经常会发现十亿字节的数据,晚上我就需要分析这些数据并,找出模型,坦白说,有时,我会花10-15分钟来编写一个小脚本,一个小程序,但不幸的是,运行它可能需要8个小时或更多时间。
Yes. The point is, it's not going to work, and she caught both of them, impressive, it's not going to work because iters left is already negative, it's just going to skip the whole loop, and I'm in trouble, so thank you for catching that.
是的,重点是,程序不会运行的,她发现了两个错误,很令人敬佩,程序不会运行,因为iters,left已经是负数了,它会跳过整个循环,然后就有麻烦了,谢谢你提出这个问题。
应用推荐