So we left off last time with looking at a bit of coding and teasing you with the upcoming problem set.
我们上次讲到了查看一些代码,并且给你们带来这下面的习题。
Why not write the program in a way where you figure out dynamically when the program is run how much memory you need rather than hard coding in two with or within that constant.
为什么不写一个可以动态的方式写那个程序,程序可以动态分配内存,而不是用常量硬编码两个值。
There are encoding regions called exons and those are interrupted by non-coding regions called introns.
编码蛋白质的部分叫外显子,外显子被不编码蛋白质的内含子打断
That goes back to that idea of sort of discipline coding. It's easy to have assumptions about what you think are going to come into the program when you writ it. If you really know what they are use them as search, but if you think there's going to be some flexibility, you want to prevent the user getting trapped in a bad spot, and exceptions as a consequence are a good thing to use.
这又回到了规范编码的想法上来了,在你写代码的时候考虑,什么会进入你的代码的思考是简单的,如果你真的知道,他们是用他们来做搜索的,而你希望有一定的灵活性,你想要阻止用户,陷入一个艰难的境地,那么异常是非常实用的。
That might be a good way to do it but it's going to be more of a challenge because you might - you're going to have a lot of these non-coding sequences that are in the way.
这或许是个好方法,但这会带来更大的问题,因为也许--,会有许多不编码蛋白质的序列,干扰你的筛选
应用推荐