[Remind-Fans] Remind & Birth Control. ;-)

Dennis Groves dennis.groves at gmail.com
Wed Jan 2 06:17:36 EST 2008


This is one of those delightful computer science problems that is  
assigned during your freshman year. ;-)

First you have to understand the birth control method:

The Standard Days Method is fairly straightforward to use. All you  
need to do is keep track of how long your menstrual cycle is, in order  
to determine when Days 8 through 19 occur.

When the first day of your period arrives, this is Day 1 of your  
cycle. Mark this on your calendar.
Between Day 1 and Day 7, it is highly unlikely that you will become  
pregnant.
Between Day 8 and Day 19, you are at your most fertile.
Between Day 20 and 32 you are unlikely to get pregnant.

So I came up with the following as 'solutions' to the problem:

; Method 1
;
; REM [trigger('2008-01-01' + 7)] *1 UNTIL [trigger('2008-01-01' +  
18)] MSG FERTILE

; Method 2
;
SET _period ('2008-01-18')
SET _f_start (_period + 7)
SET _f_end (_period + 18)
REM [trigger(_f_start)] *1 UNTIL [trigger(_f_end)] MSG FERTILE

I got stuck though. Because what I would like is something much more  
programatic so that you would have a running history of past periods  
sorta like the following:

; Method 3
;

REM ( Jan period) MSG Fertile in Jan
REM ( Feb period) MSG Fertile in Feb
REM ( Mar period) MSG Fertile in Mar
REM ( Apr period) MSG Fertile in Apr

This way I can later generate a yearly calendar that shows what the  
past fertility times were for example. Bonus points if you can put the  
first day of the cycle on the calendar (the day of the period) and the  
final day (day 30) of the cycle as well as the fertile periods. They  
should show up in both calendar and reminder modes. This is what I was  
kinda hoping to produce with something like the above Method 3:

Darwin:~ dennis$ remind -c+5 StandardMethod
+----------+----------+----------+----------+----------+---------- 
+----------+
|  Sunday  |  Monday  | Tuesday  |Wednesday | Thursday |  Friday  |  
Saturday |
+----------+----------+----------+----------+----------+---------- 
+----------+
|30 Dec    |31 Dec    |1 Jan     |2 Jan ****|3 Jan     |4 Jan     |5  
Jan     |
|          |          |          |          |          |           
|          |
|CYCLE_END |          |PERIOD    |          |          |           
|          |
|          |          |          |          |          |           
|          |
|          |          |          |          |          |           
|          |
|          |          |          |          |          |           
|          |
|          |          |          |          |          |           
|          |
+----------+----------+----------+----------+----------+---------- 
+----------+
|6 Jan     |7 Jan     |8 Jan     |9 Jan     |10 Jan    |11 Jan    |12  
Jan    |
|          |          |          |          |          |           
|          |
|          |          |FERTILE   |FERTILE   |FERTILE   |FERTILE   | 
FERTILE   |
|          |          |          |          |          |           
|          |
|          |          |          |          |          |           
|          |
|          |          |          |          |          |           
|          |
|          |          |          |          |          |           
|          |
+----------+----------+----------+----------+----------+---------- 
+----------+
|13 Jan    |14 Jan    |15 Jan    |16 Jan    |17 Jan    |18 Jan    |19  
Jan    |
|          |          |          |          |          |           
|          |
|FERTILE   |FERTILE   |FERTILE   |FERTILE   |FERTILE   |FERTILE   | 
FERTILE   |
|          |          |          |          |          |           
|          |
|          |          |          |          |          |           
|          |
|          |          |          |          |          |           
|          |
|          |          |          |          |          |           
|          |
+----------+----------+----------+----------+----------+---------- 
+----------+
|20 Jan    |21 Jan    |22 Jan    |23 Jan    |24 Jan    |25 Jan    |26  
Jan    |
|          |          |          |          |          |           
|          |
|          |          |          |          |          |           
|          |
|          |          |          |          |          |           
|          |
|          |          |          |          |          |           
|          |
|          |          |          |          |          |           
|          |
|          |          |          |          |          |           
|          |
+----------+----------+----------+----------+----------+---------- 
+----------+
|27 Jan    |28 Jan    |29 Jan    |30 Jan    |31 Jan    |1 Feb     |2  
Feb     |
|          |          |          |          |          |           
|          |
|          |          |          |CYCLE_END |          |           
|          |
|          |          |          |          |          |           
|          |
|          |          |          |          |          |           
|          |
|          |          |          |          |          |           
|          |
|          |          |          |          |          |           
|          |
+----------+----------+----------+----------+----------+---------- 
+----------+
Darwin:~ dennis$


Thanks!!

-- 
Dennis

"If you have ever done any security work; and it did not involve the  
concept of 'network of trust'; it wasn't security work, it was  
masturbation." – Linus Torvalds


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.roaringpenguin.com/pipermail/remind-fans/attachments/20080102/343e85f6/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1594 bytes
Desc: not available
URL: <http://lists.roaringpenguin.com/pipermail/remind-fans/attachments/20080102/343e85f6/attachment.bin>


More information about the Remind-fans mailing list