Gen. 30:39 And the flocks conceived before the rods, and brought forth cattle ringstraked, speckled, and spotted.
In this interesting episode, comprising Gen. 30:25-31:13, we have some action in which Jacob uses peeled sticks to try and control what sort of offspring his flocks have. Skeptics argue about the lack of science here -- and to an extent they are right. What Jacob did is obviously a form of "sympathetic magic" - putting a striped object in front of the flocks so that they had "ringstraked," etc. offspring. Yes, Jacob was engaged in bunk. No doubt about it.
However, there is a great difference between the Bible describing a bunko process and endorsing it as true. Genesis says that Jacob did the magical bit, and it says he got the results he wanted, but it does not thereby establish that a valid cause-and-effect relationship existed -- though I do think that the story is intended to make the reader wonder whether one exists, before setting up the "punch line" which takes place in 31:10-13.
Here, Jacob indicates that God showed in a dream that Laban was intentionally cheating him. He says:
And it came to pass at the time that the cattle conceived, that I lifted up mine eyes, and saw in a dream, and, behold, the rams which leaped upon the cattle were ringstreaked, speckled, and grisled. And the angel of God spake unto me in a dream, saying, Jacob: And I said, Here am I. And he said, Lift up now thine eyes, and see, all the rams which leap upon the cattle are ringstreaked, speckled, and grisled: for I have seen all that Laban doeth unto thee. I am the God of Bethel, where thou anointedst the pillar, and where thou vowedst a vow unto me: now arise, get thee out from this land, and return unto the land of thy kindred.
In other words, the reader is now told that God divinely intervened for the purpose of evening the odds that Laban was stacking against Jacob. Jacob obviously did think at first that the sticks were the key to his success, but from events in Ch. 31, it seems that God stepped down on Jacob and disabused him of the notion.
As sometimes happens, the Bible is pulling our leg -- and like Jacob had to, it forces us to look in the mirror now and then. (For more on sympathetic magic in the Bible, and a similar lesson, look here; for a related issue see here.)