I took Monday and Friday off, but I worked a bit on Saturday and all of Sunday. I drank a lot of beers and worked on integrating Girlfriend Plus Android with the web socket API.
I did half of stage five of the Maclehose trail. I was planning to do stage six as well but I got lost and ended up in Shek Kip Mei.
- [x] Blog: Weekly Summary - [x] Android: Conversation POJO - [x] Android: PhoneyCharacter -> ConversationListItem - [x] Android: UIConversation -> ConversationListItem - [x] Android: Add Sylvia SKU - [x] Android: Handle Sylvia in BiographyView
I wrote last week's blog, very important work. Then I wrote some Android code to integrate the websocket model
UIConversation into the ConversationListActivity. I guess I did some work on the BiographyActivity as well.
- [x] Android: Stuff is not rendering properly in ConversationList - [x] Android: Fix SocketCharacter rendering in ConversationList - [x] Android: Do not render last message time if it is zero. - [x] Android: Set name and picture in SocketConversationActivity - [x] Android: Render UIChatMessages in SocketConverastionFragment - [x] Android: Set [PLAYER_ID] as a constant - [x] Android: Set Profile Pic at top - [x] Android: Render Decisions Notes: Had two beers with Sandeep the night before and got very drunk. Slept badly and woke up quite hung over. Spent the day working on the ConversationFragment with the new Websocket data models. The heart of the application is in ConverastionActivity and ConversationFragment. Might be a good idea to merge the Fragment and the Activity. Adapters is very complicated as well.
All Android work, looks like I finished up the ConversationListActivity and moved onto the ConversationActivity. From my notes it looks like I was very hung over while doing this work. Thanks a lot Sandeep.
- [x] Android: Send Decision up the socket when the clicky click happend - [x] Android: Enable the Be Cool Timer - [x] // TODO: Only start the story if the RoomState is UNLOCKED / CAN_TRIAL - [x] Android: Chat Messages should come in live. mSocket needs to notify of deltas - [x] Android: Show Timer after sending a message - [x] API: sequenceNumber on PreviousInteraction - [x] API: sequenceNumber on ChatRoom.decisions - [x] API: Keep alive messages should obey the interface - [x] API: UIConversation needs to have a SKU on it - [x] Android: Model KeepAlive class - [x] Android: Model ChatChoiceResponse class - [x] Android: Decisions should be removed when a newer message comes in? - [x] Android: Decisions are appearing when they shouldn't. Hanging around too long. - [x] API: Characters are coming down as empty when doing a GET_ROOM_SNAPSHOT - [x] Buy that book and mail it to Marmy - [x] Android: Sylvia chat seems to crash when starting the trial - [x] PlayerMessageContainer should be GONE instead of invisible. - [x] // TODO: Add some nonsense in here for fun - [x] Android: sequenceNumber on Decision in UIChatRoom - [x] Try on a KitKat - [x] Jackson blowing up on KITKAT - [x] // TODO: Don't capture this, it's gross - [x] // TODO: Put this back in - [x] Android: Possible to remove mChatRoom? Just pass it around? NO - [x] Android: Render messages in ConversationView - [x] Android: Use LiveData for Websocket Deltas Notes: Had one beer with Sandeep, Kris and Patrick. I ordered two more beers but did not like them so I didn't drink them. Slept very well, woke up before my alarm clock. Chatted with Dom about creating a physical document parsing SaaS product. William did not meet me for lunch. While I was working two product managers were discussing complicated user stories for some banking application. I'm glad I don't have to deal with product managers anymore. Went for a run with the Cruise after work.
I knew I was taking Friday off, so I busted out a ton of work. I implemented a lot of logic in the Android application. Tried out the app on KitKat and discovered it crashes immediately due to some Jackson failure. I resolved it by downgrading Jackson. I also figured out how to use Android's LiveData classes with my web socket API.
After work I went for a run with Cruise and kicked his ass.
Did the first portion of Maclehose Stage 3, ended up in some place that seemed like a cult, the place was full of guys wearing blue shorts and no shirts. That's a sure sign of a cult, a uniform. The people there seemed to be uncomfortable with my presence. I was wearing a blue shirt and blue shorts. They were probably thinking "Where did this guy get that shirt?"
- [x] Android: Helper class to create WsClient messages - [x] Android: Remove hardcoded messages. - [x] Android: Scroll to the bottom onCreate() - [x] Do sequenceNumbers have to be contiguous? No - [x] API: Add Biography to Stories - [x] TODO: Put this into the ChatChoice class - [x] API: CREATE_STARTED_STORY should have a storyId on it - [x] API: Must provide application type (GIRLFRIEND, BOYFRIEND, SITUATIONS) when opening the socket - [x] API: Add biography to UIConversation - [x] Android: Set Sylvia's biography
I woke up and Google Hungout with some friends in Canada. I actually wrote quite a lot of code while I was on the call. After that I went to the supermarket, bought 12 beers and brought them over to a friends house for a poker game. I decided to bet very aggressively almost every single hand and it paid off and I won.
Then I went to a dinner for my Grandma's birthday, I don't know how old she is. Let's do the maths.
I have heard Grandma say "When I was 24 I had four kids!" Dad is her fourth kid. Let's say she was 24 when Dad was born. Dad was born in 1957. 1957 - 24 = 1933 2021 - 1933 = 88
It was a cold and gray day, an excellent day for writing computer software.
- [x] Android: Add in Sylvia biography - [x] Android: Move URL and storyCategories into build.gradle - [x] Android: Jackson POJOs should not explode when encountering extra fields. - [x] API: CREATE_STARTED_STORY should have a storyState on it. - [x] Android: PlelariousWebsocket should handle the CREATE_STARTED_STORY message - [x] Android: Conversation List does not seem to update. Start Story -> Go Back it stays locked. - [x] Android: Conversation state should change when CREATE_STARTED_STORY response comes back successfully - [x] Android: Last message and lastMessageTime should be updated in Conversation List when a message comes in. - [x] Android: Socket count down timer is wrong - [x] Android: Put socket url in config - [x] Android: Send ConversationRead message up the socket when opening a Chat - [x] API: CREATE_CONVERSATION_READ message should have include the unread count. - [x] Android: Model CREATE_CONVERSATION_READ message - [x] Android: Handle CREATE_CONVERSATION_READ message - [x] Android: Model the ERROR message. - [x] Android: Do not send a ConversationRead message if the story has not started yet. - [x] Android: Handle CREATE_USER_CHOICE message - [x] Android: Model CREATE_USER_CHOICE message - [x] Android: Hide the BE-COOL message if PlayerMessages are present?
I actually streamed a portion of myself coding on Sunday. The trickiest bug to fix was an error with the count down timer. The timer indicates when the next message will come in, but it was saying all sort of nonsense. Looking at the data coming down it looked like the API was incorrect, the nextTriggerTime was always the same. So I looked at the API, it seemed correct and I had a test to verify it's logic.
So I made a deal with the king of web sockets and connected directly to it. The trigger times looked correct to me. What was going on. Then I realised... I was using a
float for the nextTriggerTime. 32 bits is not enough to model the number of milliseconds since 1970! I changed it to a double and the bug was fixed. It should probably be a
long, but I'll need to change the API for that.
That was quite a fun bug to fix, since it was a simple change and immediately the timer behaved correctly.