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: Change Jen_lunch Work jesse reika_lesson

Change

permalink

Jen lunch

12:51pm JST Tuesday 28 October 2008 (day 14097)

Going with Andrew to meet Jen for lunch in a bit. Helpin' support her quota of lunches for the month.

2:13pm JST

Nice to see Jen! We ate at the curry place near Herbeans after finding the Herbeans satellite location closed.

Andrew and I raced back; I won. Twice.

permalink

Work

9:21pm JST Tuesday 28 October 2008 (day 14097)

In the middle of some pretty big changes, and a bit (unnecessarily) nerve-wracking because I've spent a good deal of time on this data, though it's officially a test database. I should just do a backup first thing tomorrow and then feel better about doing whateva I want with the data.

The changes will allow entire invoices to be changed at once, whereas before the code only supported changing a single aspect / line item at a time. The new system is necessarily a bit more complicated, including the ability to sort the items before saving them. As such, I need to store sort_by values, and to make the coding a bit easier, I'm just wiping all of the line items for the invoice and then writing all the ones that were on the screen at the time of the save. That way we can delete/add/sort the items all day and they'll show up perfectly upon save.

Right *now*, I'm in the middle of removing the contract_id from the invoice items. I knew from the start that it wasn't 3rd normal to have it in there, but at the very start I didn't allow a single contract to have two invoices, so invoice_id and contract_id were effectively the same. I've got all the code fixed to not write contract_ids in the invoice items, but those functions still take contract_id (and invoice_id (I was smart enough to do that)) as a parameter. I'll be removing those parameters on function calls and from the function definitions tomorrow. There's still one bit of code that I think reads by contract_id, though I might have confused that with code that reads from the invoice table using contract_id (which makes sense according to 3rd normal rules). Anyway, that shouldn't take too long to fix.

I ran my save for some test data, and it saved okay and read okay except for one detail: I hadn't saved all the bits I needed. D'oh! Suddenly all the previous-balances and discounts and tax-items and late fees all became the default type: "products" because I hadn't needed to specify their types when I was just saving an item at a time. I just adjusted the item with that ID and all the non-adjusted bits stayed the same. But now that I'm deleting them all first, I have to recreate them all from nothin'.

Fortunately, I've got a pretty legible technique for writing the fields for the items. To write the invoice items on the screen, I'm running a foreach over all the existing items in the DB, and for each field, I'm outsourcing to a different function which will write the field according to what type of item it is. For example, the produts need to have a quantity attribute. But the tax item does not. There's five different products in the invoice, 3 of which are quantity 10 units and the others are quantity 4 hours, but the tax is just the tax. No quantity nor units needed (well, currency is a unit, but).

So I'll just expand that paridigm and make hidden fields where I'm not allowing them to be changed, but still need to remember the values. (well garsh, that's what hidden fields are for!)

Okay, so tomorrow:

  1. * archive my DB

  2. * remove contract_id from various functions' calls and definitions that should just be using invoice_id

  3. * add hidden fields where I've got none when writing the invoice items

  4. make a button to actually add items to the invoice. (in this case, all the fields will be editable, until the item is saved.)

  5. * the delete button is already written

  6. basically copy the technique I've used to allow editing of invoices to allow editing of contracts. If I do it smartly, I can reuse the functions that write the fields for each part of each item. (*)

  7. sort out why the sort code isn't working

(*) by design, the items in the contracts are essentially the same as the items in the invoices: for it's precisely the items in the contracts that are slapped right into the invoice.

permalink

jesse

6:47pm JST Tuesday 28 October 2008 (day 14097)

In a combination of bored and panicked, Jesse called me today to see if I could hang out while he had no lessons at work. He said last week or so that he's had very few students at Gaba recently. David from my i-group has said the same thing about his school (Geos) and has suggested that the industry in general is collapsing in Japan.

I stayed at work until 6:15pm and then busted out to chat with Jesse a bit. We met under the big Starbucks overlooking ½Âë crossing and then went to the McDonald's just across the street (to the left) from there. I chowed a chicken burger, and we each ordered softserve ice creams cause the shake machine was out.

Chatted about his recently finished ticking system for his church, and because he wanted to make it open source, I suggested he turn it into a tutorial. The size of the project simply isn't big enough (at the moment) to warrant a forum, user base, bug tracking system, etc.

Good to reconnect with him a bit. I hope we can keep in touch mo' betta' than we did during 2007 and the first 3/4ths of 2008.

permalink

reika lesson

9:47pm JST Tuesday 28 October 2008 (day 14097)

Met Reika at the cafe above the bookstore near the other (bigger) McDonald's close to Shibuya. (I know of a 3rd McDonald's that's "in" Shibuya, but I wouldn't say it's close to the station.) Happily for me, she had done homework which featured some mistakes, so I used those to help adjust her English brain cells toward better spelling, grammar, and more fluency.

She's doing quite well, and I'm pleased to know someone with such high aspirations: she's got a good sense of what she'd like to do for her career (translation, interpretation, international business), and is looking for work to specifically support her path.

The lesson went by pretty quickly, and then we wandered a bit: I showed her ÉûÅÔ¿´Àþ, and then we went up entrance 15 to find Cross Tower, at the top of which we hoped to get a lovely view of Shibuya. I'm sure it woulda been a lovely view of Shibuya if only they woulda let us into the restaurant. With tears in our eyes, we headed back down the elevator, but only after I pointed out how cute Uncle Cow was, and how he'd love to have a view of the city. The woman surprised me with her creative answer (in Japanese): "yes, but Uncle Cow can't give milk, so I'm sorry.."

(very few Japanese would think of such an off-the-wall answer)

Back to the station and up the rest of entrance 15 to the walkway next to the Ginza Line and then waved and hugged by in front of my (favorite) line, Tokyu Toyoko.

permalink
prev day next day