journal
all all entries rss SoML excited dreams runes YRUU ultimate KTRU skate sleepy nihongo
Rob is 20,117 days old today.
prev day next day printable version

Entries this day: Dream Great_idea Super_long_work

Dream

7:53am JST Tuesday 9 December 2008 (day 14139)

The tornado siren began to sound, but then an announcement was made, "introducing the greatest dancer in the world," or something and I went out onto the balcony and a dude started dancing with the bestest bumpin'est music and I was dancing way up on the balcony, and I think he saw me, then sure enough the elevator behind me dinged and one of the dancer's crew had come up to bring me downstairs and back stage to meet the guy.

- - - -

A man was throwing coins into people's hands in the audience as both his skill and his generosity of giving away money. I wondered if he would throw any to me so I help my hand out, but had to be different so I held it behind my back. He was like, "??" and I opened my fingers a bit more. Then he threw the coin like a frisbee and and it nearly slipped into the cuff of my sleeve, except that I moved my hand to try to catch it, and it missed. I picked up the coin and inspected it briefly. It appeared to be a fake Amero, so I threw it back to the guy, trying to match his skill in throwing. I did pretty well, considering the size of the disk.

The show ended, and the guy asked some members of the audience if they would buy him a drink, considering he had given away that much money, and I was like, "where's your hotel?" and he said something which might have meant the hotel right next door. I was like, "did you walk more than 10 seconds to get here?" and he said, "yeah, 30 minutes" but then I recognized it *was* the hotel right there, so I go, "yeah, but it took me a long time to get oriented in Tokyo.."

Started helping clean up, and found some marbles on the floor; collected about 10 marbles for him, looking under chairs and such.

permalink

Great idea

9:39am JST Tuesday 9 December 2008 (day 14139)

This might be a great idea, but it would be better to do it on paper.

invoice = 1, month = 11:

total due 10500; total paid 0

  1. item1 5000 yen

  2. item2 5000 yen

  3. tax 500 yen

  4. total 10500 yen

(no payment was made)

Creating new invoice (month = 12):

* Get recent invoice id.  (1)
* create new invoice header (id = 2)
* Get recent invoice month (11)
* find all prev_due items in recent invoice 
  (none)
* find all prev_paid items in recent invoice 
  (none)
* add prev_payments to corresponding prev_due items
  $payment_added_to_due_items = (none)
* find total of all not (prev_due, prev_paid, payment) items in recent invoice
  $most_recent_due = (item_price = 10500, item_type = prev_due, month = 11, invoice_id = 2)
* find all payment items in recent invoice (none)
  $most_recent_paid = (item_price = 0, item_type = prev_paid, month = 11, invoice_id = 2)
* put all of these items together
  $total_historical_items = ($payment_added_to_due_items, $most_recent_due, $most_recent_paid)
* insert total_historical_items into new invoice (2)
* void old invoice (1)

* insert contracted items into new invoice (2)

invoice = 2, month = 12:

total due 21000; total paid 0

  1. prev_due month 11 10500 yen

  2. prev_paid month 11 0 yen

  3. item1 5000 yen

  4. item2 5000 yen

  5. tax 500 yen

  6. total 21000 yen

Payment for 20000 yen:
gets applied to month 11 (10500 yen) and remainder to month 12 (9500 yen)

 

 

 

invoice = 2, month = 12:

total due 21000; total paid 20000

  1. prev_due month 11 10500 yen

  2. prev_paid month 11 10500 yen

  3. item1 5000 yen

  4. item2 5000 yen

  5. tax 500 yen

  6. total 21000 yen

  7. payment 9500 yen

creating new invoice (month 1):

* Get recent invoice id.  (2)
* create new invoice header (id = 3)
* Get recent invoice month (12)
* find all prev_due items in recent invoice
  (prev_due month 11 10500 yen)  
* find all prev_paid items in recent invoice
  (prev_paid month 11 10500 yen)
* add prev_payments to corresponding prev_due items
  $payment_added_to_due_items = (prev_due month 11 0 yen) = 0 yen, therefore does not show up
  (none)
* find total of all not (prev_due, prev_paid, payment) items in recent invoice
  $most_recent_due = (item_price = 10500, item_type = prev_due, month = 12, invoice_id = 2)
* find all payment items in recent invoice
  (payment month 12 9500 yen)
  $most_recent_paid = (item_price = 9500, item_type = prev_paid, month = 12, invoice_id = 2)
* put all of these items together
  $total_historical_items = ($payment_added_to_due_items, $most_recent_due, $most_recent_paid)
* insert total_historical_items into new invoice (3)
* void old invoice (2)

* insert contracted items into new invoice (3)

invoice = 3, month = 1:

total due ; total paid

  1. prev_due month 11 10500 yen

  2. prev_paid month 11 10500 yen

  3. item1 5000 yen

  4. item2 5000 yen

  5. tax 500 yen

  6. total 21000 yen

  7. payment 9500 yen

permalink

Super long work

12:40am JST Wednesday 10 December 2008 (day 14140)

In the same kind of gotta-finish excitement as in university with Maggie, I used the same feeling to keep me programming all day today (including designing during class with Komatsu). Including that time perhaps a bit liberally, I logged 12 hours of work today in the Tracker app that Malek wrote recently.

The good news for me today was having my headphones, so I could spend a bit of time correcting ¤æ¤ê¤«'s audio-transcription homework, and then *not* have to listen to the bit of griping going on between Malek, Andrew, and Sho. Often it's just Malek and Andrew, but they were all at it today, and I was glad to be excluded.

I think I'll be able to largely finish coding tomorrow, but it may take another long day, in which case I'll have to choose between Ami and work. Usually I choose Ami, but tomorrow I may choose work if things don't go as quickly as I hope.

For the record, this is the third iteration of how to handle carrying partial payments forward, taking into consideration payments getting split across invoices, and invoices being unpaid, and/or paid with multiple small payments.

I'm 99% sure the current technique I'm doing will work the way Sho has requested, and I'm 99.1% sure that this is the final design before I show it by the end of this week.

I'm 100% sure I should keep copies of the code for posterity, but not sure where I can keep it. Can't open-source it.

On the way to Shibuya, a woman with a great smile connected shoulder to shoulder with me and was like, "would you like a massage?" and... man. a bit dangerous for my little brain to see such a nice smile and be so tired tempted. She was pretty persistent, too, though my gentle series of "no"s and "no thank you"s prevailed. Soon as she peeled away from me, I was like, "ah dang; I should have complimented her smile." It was really really nice, and her line of work doesn't seem all that easy to me. (but programmming 12 hours is? wtf?)

permalink
prev day next day