Capstone project

So far — two weeks in, and I have only picked which project I’m going to work on. No actual work has been done. I’m going to make updates to this story as I work on it. To go over the successes / setbacks. And will continue to publish on it, as I go. This is the initial stub of a story to start with.

Oct. 20, 2014 — first day of working on it will be after work. I will start writing story cards, and begin the skeleton project. I will devote the entire evening to this endeavor. Aftermath — I built up a document of how I’m going to tackle the assignment. Pretty much went over what elements will be in my design. I “borrowed” the code I wrote for a lightning talk, and I’ve started updating it. I’ve taken some screen shots, and started placing them in the design document. I also started a board on trello, and build up a first set of cards to work on. Once they are all played, I will have a working app / cloud service. Including some spikes. So alot more progress than before today. But alot to go. I’m going to work on my other homework, so I can spend more of tomorrow working on this thing. November 23rd is the big day for turning in the project. December 5th will be the date that results are available, after will evaluate everyone’s work. Or I should say three peoples work.

Oct. 23, 2014 — looked at the cloud code from the prior class that I took. And I was scared how much was not readily apparent. But I know this code works, I can add small pieces that I need, and hopefully get it to return stub information. So I will be working thru this tonight. I hope I can get something running. I will write on here the successes and failures…. Starting to work on it. Will be relearning how to import a project, I want to move the files, and customize it. So I need to pull into eclipse. Later — well I tried getting communications to work, and to no avail. I cannot get it to run, it continues to crash with the dreaded NoClassDefFoundError: no matter what I do. And then I ran into gradle problems, and now the software won’t even start, I have hosed it up completely. I placed a question on the discussion forum for the class, and hope one of the instructors can swoop in with some advice. But I’m completely lost, and right now it looks pretty hopeless. I really want to get this functional, and even half way decent. I won’t give up, but this is one of those lows. I feel like an idiot, and I keep thinking, if I fail, they will let me retake it, if they do offer it again. But will be in a year, and will likely be completely different projects. But by then I might work this stuff out. And I spend all evening on this, so no work on my homework in the other classes I’m taking, so I’ll feel pressure from that as well. Oh well, need to get some sleep. Hopefully will have happier news.

Happy news….I thought to look back at my folder from the class, and there is source code examples for how to connect to a server, so I have the code for a client, I just need to work out what has to stay, and start reconfiguring. Whoo that is a relief. I could not find any examples that did precisely what I needed, and kept running into difficulties. Hopefully I can get it up and running over the weekend, and then I can work on other obstacles. So from the lowest of the lows, to happy in only a few minutes. Night everyone.

October 24 — 16 minutes and the sample code is running. I used git to lock my changes in. Will be keeping a local repo going. I will feed the cloud code into it as well. And now I can start making changes. And I will watch the capstone videos to see if I can glean any more details about the assignment. The mid assignment is due tomorrow, so will get that in. I was able to retrieve a class from the cloud server, and display a string on screen.

October 25 — just found out I can deploy my service locally, with either in memory or actual database, and that I can use unsafe code that I already have, so no certificates to setup, and can use hard coded doctors / patients. That this is an example app, not for real patients, and it just shows that I understand how to wire up the app, to handle all the nifty features they taught us. And have a demonstration video of all of it, and the source code, and writeups, and this will greatly simplify communication. And make it easy for me to test, since I’m running it all locally, and don’t have to deploy it to Google or Amazon. Although I will eventually work out the real security, and actually deploy a cloud app. I watched the class videos, and looked at the discussion forums, and these are the answers I’ve picked up from the instructors. Halloween party with my nephews soon, food and candy, a great combination.

October 26 — went to Hubers and picked out some pumpkins. Came home and got stuck in traffic. Turned in the design document, and watched the Walking dead. The next day, I evaled other submissions, as well as my own. Will find out in a week what everyone thinks of it. But will continue working on it. Next big day is November 23rd. I also dropped the programming class I was taking. Was too much work, and I was missing a big deadline for it. I added it to my watchlist though, and will take it when it is convenient.

October 27 — So I spent several hours playing with media players, and I finally got it working. I can now show an animation, which is part of the spec. So I will see if I can make it show this each time it pushes or pulls to show it is working. It took alot of time to work out. And alot of unclear error messages. I have no idea if I’m going to get all this, but I made some progress. Now to sleep. Hopefully I will have a better day at work as well, the machine I’m on is not building whatsoever.

October 29 — Still slow going. I’m trying to get some alarms going. Various techniques, but so far they only work if I’m running the app the whole time. So not real useful. Many more hours trying to get pieces working. I tried building a broadcast receiver to see if it would function by itself, but no luck. Maybe if I build a broadcast receiver, along with setting the alarm to fire a broadcast, and then see if that works. And then finally get it to show an intent activity for the alarm. When I get this to work, I’ll build a ui to set alarms, then update the alarms, and save the alarms for the next reboot. And I can start working on the actual checkin, which is more of the meat. A little disheartening that it is taking so much effort to get these functions to work. I did get an animation to play, which will be used for busy indicator. But it shows once, and then doesn’t reappear, so my first defect to clear up. And I can’t move that card over till I get it working. I’m also working on the alarm spike as I mentioned. Although for this time constrained project, I’m using the spike code. This is definitely not the way to run things, but I have less than a month, and I might barely make it. Amy is putting up with me, and I’ve promised to take it easy on the coding after this class. Perhaps till the new year? I guess I’m making the promise now. It is in writing. And doesn’t go for work of course.

October 30, 2014 — So night and day difference today, was able to add a broadcast receiver and have it show a blank activity page which will become the checkin page. I had forgot to create the receiver, seems obvious now. Also needed to tell the activity that it is a new activity, and that helped it construct the activity and show it. I will need to set the exact times for alarms, but I’m well on my way now again. Will be working on the software pulling the medications, and showing the questionaire based on those. And then get my first checkin across. That will be a big first step toward a full end to end feature. Coolness. ☺

November 1, 2014 — worked out how to tell if the user was a doctor, or a patient. And added the Doctor account, and two patients. I think I’m going to use the user name as the patient id. Or hard code one. ☺ Since the accounts are already hard coded. So making good progress, and getting ready to start the meat of the project. But a bunch of unknowns are starting to be explainable. And I’ve got this part test driven. And will have it committed soon. I think that I’ll start on my controller, that will be the only controller.

November 2, 2014 — My birthday, getting a little work done. It helped that the time changed this weekend. I’m starting to enter the world of databases. I’m hoping using the simple database will work. The good thing is my tests should let me know. I’m building up what I need, and assuming that it will work. If it doesn’t I’ll refactor it, till it does work. Also I added unit tests on both sides. I may try to get roboelectric working to have some actual UI tests. Three weeks to go. If I get the back end done within a week, that will give me two weeks to get the rest of the screens going. Feels good right now, next weekend I will have 0 work done. But I’m hoping to have the back end done by then. I like having this forum to keep a journal of what is going on. And of the progress I’m making.

November 3, 2014 — Difficult day again. Was able to hard code id’s, and get the account type out of the login. So my app will know whether to show doctor or patient side. I’ll start with medicines for doctor, but will require mapping who is the doctor, and who is the patient. I have the account numbers hard coded, I might be hard coding too much. I’ll ask on the forum for the class. May not go to Tennessee over the weekend.

November 4, 2014 — Ok, so we are going to Tennessee, and we will be staying somewhere half way down, and still get to enjoy CookOut. I moved alot of code so that it is in the correct namespaces. And Added some starter screens for Doctor and patient. And got it to make the decision based on the authentication. So I should be good to go getting the name off the server and try and get the alarm screen done. And get the alarms more fool proof. If I were to blow through that, I can start getting the checkout info built up, and build the screen, and get it ready to submit a checkout. I cut scope, I will not have the user able to edit a submitted checkout. I’m keeping those cards in a wishlist pile, that I may or may not get to.

November 5, 2014 — A little V for vendetta during dinner, along with the history of Marvel. I have tonight, and tomorrow, then will be back at it on Sunday. At the end I’ll go back thru this, and tell which features got completed each day. Wow I have a time picker so that I can set the time. And the alarm is firing the screen I want. And I cleared the history, so hitting back button doesn’t go back to the set screen. So next thing is I can only have one broadcast queued at a time. But I can build my own queue, and as each alarm goes off it will queue the next, and calculate the next one for tomorrow. It makes it easier on startup, I have it queue the alarms and store them, when the receiver is created it should pull those in, decide which one is next, and clear off any that expire. Make sure I have them all created, and if the user cancels one, it should remove it, find the next one, and schedule it. So getting some more UI going, and work out the queuing. Going like gangbusters again. ☺ Ok Need to work on adding the text to the list view. And I worked out that one broadcast is kept alive at a time. So I will need to store the timings for alarms, and when an alarm goes off, schedule the next one for the next day. And I have it able to schedule this on reboot of the device. So might have the alarms wrapped up tomorrow, I hope. Still alot to go, but I’m getting stuff done.

November 6 — So I got it to add dates to the list view. But I had to create a custom date widget, because a bug causes two calls to the modifyed date, and is a known android issue for 2 years. And I will need to fix formatting issues, and also persist the alarms in both the broadcast receiver, and the screen itself. So I build myself some more work. But keeping at it. And it doesn’t highlight correctly. So I created these cards, as these will need to be there. So didn’t make my week goal, but still going to enjoy this weekend. New capstone video was released, will check it out.

November 10 — Good news, Capstone extended till Sunday after Thanksgiving. Bad news — that means I get two extra days, since I’ll be traveling for Thanksgiving, and won’t be able to work on it. Also I did not work on it yesterday at all. And I have either a cold, or really bad allergies. I left work early, and will make up the time. I’m going to get some done on Capstone, but have major congestion going on. Will definitely be turning in early tonight, I watched the class video, and might have found a pointer for one of my answers. I did enjoy the weekend, and got to see alot of people I hadn’t seen in awhile. And also got to visit with my grandmother. And fix my dad’s netflix connection.

November 11— called in sick. Lot’s of allergies, or a cold. I finally have a version that will fire alarms. I’ve been working on it off and on, after taking a long sleep. Nyquil coma. So I got the alarms working. It is really rough, and would like to separate it out into a test driven class, but will do that later. Starting working on the medicines class, and build an enum of all the medicines. I made it into work on the 12th, will update more later.

November 13 — went to work yesterday, took it easy, worked on Capstone tonight. Feeling better, just coughing some. Made up an hour of work time, I have 11 to make up for being sick. I’m getting some of the medicine code in place. Right now I’m getting the dreaded 404 error. Trying to find out what I did wrong… At least I got rid of the annotation error that I had at first. But test driving is showing me the fails, before tying it in. And I’m getting it to work just in memory first, then get it to work in a database. Jim sent me the link for the 3d scanning software (take pictures all around, and it builds up an object). That will work for my other project of cubizing stuff. 12 days till I upload what I have. Once I get the setting and recovering of the medicines, I will build up those screens, so I can see it on Android. Then tie in the checkins. And then add in the alarms for so many hours of no eating, etc. Now, I’m getting 400 Bad Request error. I think the medicines is not being properly converted.

November 15— didn’t work on it Friday, but I worked on it today. And I got medicines to store, and to pull back out. I had to change and use simpler getters and setters. Turned out I couldn’t leave those out. I probably could still add a method to add, but JSON replaces the whole list. Tests all pass, and I committed. I will have to find out what is magic about the location the files are at, in another namespace it didn’t pull up correctly. Will take a dinner break, and be back at it. I might try and get the data structure for checkins in place, and then start wiring up the android side, and see if the whole thing works. ☺ Plus start on the alerts. I’ve probably typed that a few times now. And I worked out the magic, I changed the location of the application, it was searching below that location in the hierarchy, and now that I have it where it is needed, it sees the repository. And I’m adding some more screens on Android, and getting closer to setting the medicines. I was up late working on it, and got it to represent the patients.

November 16— I’m getting the checkin data structure ready, since I had problems with Patient data coming across, I want to get over this hurdle. And I want to see if there is a way to filter the database based on the date, I think I might be able to but need to look up Jpa and spring, and multiple criteria. Would be a bonus, because in real life, there could be thousands of checkins for a patient, and many many patients. And would need to limit how much data is being sent to the phone, probably for the last few days… Nine days till I submit the code. I think I’m looking good for barebones code. I have moved alot of cards in the last day or so. I have built up the checkin data structure, no tests yet, but I got spring to compile it, and it should look for id, and for times past the given time. And sorted ascending in time. I have empty methods that I can call into, and I will get a failing checkin test soon. Hopefully I will write of my success. And take a dinner break…. well it works once, then it adds another entry and the size fails. Of course I can change the test to see if it contains the solution, and then it won’t mind if more than that is there. That worked, as long as my tests fail the right way, and pass the right way I’ll leave it alone. But may try a composite key. And I did and got it working in about 15 minutes. It now only places one at a time, and replaces if the id and time are the same. Nice progress. Time for walking dead.

November 17— Great progress, was able to get all patients to show up for doctor. Working on individual records now…. and I have alot of the ui done. Need to wire it with the correct id’s, and have it pull and populate data. Focusing on getting medicines going, and will get that going tomorrow. Feel like alot to go, but trying to get the basics going, and make note of the extras. Will be going to the wire, which will be Sunday. And then put together demo on monday and tuesday.

November 18 — Went to the doctor for medicine for my cold. And I’m continuing on with Capstone. I have it displaying the medicines from the test. Now just need to be able to add, and to save, and to delete if necessary. Plus I added in some names so that it displays the persons name, and communicated to the various activities some crucial data. Got it to successfully save the medicines from the doctor side of the app. And to retrieve the list. ☺ And I fixed the CheckIn cloud side to not return a boolean, since it doesn’t like it using RetroFit, and the templated classes, it is too basic I guess. But good progress again, most of a feature. Tomorrow, hopefully CheckIn will largely be done. Then two major features to go. A feature a day to keep the doctor away? ☺ Night, I’m getting silly.

November 19 — Checkins….. so first I uploaded a video to youtube. To make sure I can do this process for my demo. I reread the requirements, and it tells us to include a link for something like youtube, so now I can do that. It is another cat video, one of our cats getting near a moth, and meowing alot. As I feared, it fails when checkin comes up. I think because the object is not newed up on running checkin. I may have to cache the credentials… so looking into it….ok if I store the security credentials it works. But root users could access it. So I’m constructing a card to do this another way. If I store the auth key that might be better. It is only useful for a limited time, and would not reveal username, or password. Feeling bad, realizing that my passwords are stored on my cloud service relatively in the clear. So many things that I might get dinged on, but they are not requirements for the capstone. Just realistic concerns, that I guess I can’t deal with. It is definitely crunch time. I’m trying to make a decision, the best route may be storing the oauth key, which does not represent a permanent login, and is only valid for a single app. I’m going to try it, and see if I can get it to work. Well fail, I’ll fix it tomorrow, another set back. I got it to briefly to work, but with security thrown out the window. Will code more secure tomorrow. Night.

November 20 — I got it to update based on a new login screen. It just calls the init method, and starts the checkin activity. And it works even if I kill the program running on the stack. That took care of the card I was working on yesterday, and a new one I made for the login. Now to build up the checkin, and send off to the database. And then build the doctor view of it. Hopefully I can get that up and running fast…. So far I have the static pieces ready, three questions… the rest are based on dynamic events. I’ll need to try dynamically adding some items, and then identifying them and placing them in the checkin structure. Shouldn’t be so bad. I’m saying that now though. Lots to get done over the next few days. But feeling better about it. And worked extra, till midnight, and got it to display the screen. I think I’ll post a picture of it here….

Check In activity screen

Well that worked very well. It has a series of radio groups. Right now I don’t have any of it wired up. Some of it is dynamic, and is based on how many medicines are prescribed. If yes is clicked, I will need to start date / time pickers and set the time. And these will be displayed on screen as well. All of this information will be captured, and sent into the cloud service.

November 21 — Got feedback on the spelling error on first line. Fixing, and fixed. Looking into wizard style. Looks like I can do this wizard style. Almost there, it is almost 2 am. But getting alot of it done. Up really late. I have some bugs, turning in, and will work more on it tomorrow. Made a note of the defects, and created some cards. Night : 3:19 AM

November 22 — T minus 3 days. Got the wizard up and running this morning, was able to take care of 4 related defects for the wizard. Mostly on the page right before all the medicine questions. I wrote a test to interrogate the checkins in memory, and I see the one I just made, and several others that have slightly buggy data. And while testing I found another defect. But getting the non buggy version committed now. I have my final cards, and I’m proceeding. Cool, had a good lunch at the water park Chinese Resturaunt (Koo Seafood Buffet and Grill). And now I can view the checkin from the doctor screen. So next is filtering on patient, and still displaying checkin. Large part of this is duplicate, so should be easy, call the same helpers. I already have it seeing when text changes, and have a way to filter my text. And will get that working, then throw the real Patients at it. And last call the Individual patient that they click on. Looking good, and will hopefully have the rest of today, and tomorrow to work on the rest. Sweet I got it to filter on a sample list view list. Now to do that with the real thing, and link it to the Individual Activity…. Had to fix some problems but I have it done. I’ve gotten four cards done in one day. I have an equivalent amount of work over tomorrow, and part of Monday. I think I can do this. Time for Northstar for a dinner break. Working on another defect, and brainstorming my last couple days coding for this. Awesome fixed the animation, so it shows correctly. And stops itself after 3 seconds. Plus it was causing my login issue, it was showing during login, and would screw up every subsequent login, unless it was correct. So now I can go back, and enter a different user, and it works. Two defects with one fix, and can use it on other login to show it. Getting some tech debt done late at night. Will proceed with the major feature tomorrow. Really productive day. Glad that only a few more are left.

November 23, 2014 — While typing up the requirements document I found out that I need to filter on the server and not on android side. So I’ll change that around. And I want to show the Patient name when logged in, as well as the doctor. So that you can tell from the demo that there are actual accounts. Ok so I got that taken care of. I’m working on the last required feature. Conducting some experiments… but once I get the alarm to go, it will call the cloud, if conditions are met, and it will handle this signal by test driven cloud. I really wish I had time to get the android test framework in place. And will build the screen showing who has an alert, which will go to the checkins screen for that patient. Plus I was looking at discussion forums, and they recommended changing the time to see effects quicker, so that is a really good idea, but should have thought of it. ☺ Well, and I’m trying to get more done on alarms. And found out it is broken for PM , didn’t use HOUR_OF_DAY. And that I.D. needed to be different. So I’m refactoring untested code. And will be adding more features on top. Well fixed the alarms on a real device, simulator is spotty. So will be filming a demo of me working the app with my wifes tablet, and upload to dropbox, and edit on my mac. Rough night, had to fix stuff I thought I had done. Hope I can finish this thing up tomorrow.

November 24, 2014 — Well I did feel better. My alarm situation is melting down. I ended up causing a situation where the alarms continually went off. And I had to cut thru the alarms section. And now I had to create a defect on canceling an alarm , it doesn’t work. And it is firing the 12 hour alarm right away, instead of when I want it to…. feels like the code is devolving as I’m working on it. It makes me feel horrible. This is what coding without tests is like. I’m paying the price now for it. I hope to fix the shenanigans, and get back on track again tomorrow. At least I took care of a fatal defect. And I’ll keep plugging on the rest. I worked out some of the solution, but stepped on a hornets nest after I started doing that. I’m pretty sure tomorrow when I’m calmer I can get to the bottom of this, and get more working. Looks like I’ll be wrapping this up Wednesday at this rate, possibly some on Friday. Addendum: Stayed up till midnight, and worked out why the Critical alarm was going off right away. It was a stupid mistake, I set alarm to 10 A.m. but of today, and not the next day. I feel better again.

November 25, 2014 — 3 coding cards to play. Rest of it is getting documentation, and zip files in order to upload for review. Ok one card down, I was able to fix canceling an alarm, along with the other alarms still working. ☺ Now 2 more. Cool, forgot something, and kept trying different things, then I saw the problem. I have only 1 more production card, and then it is wrapping everything up. I can ping the warnings, and can set and clear. So tomorrow I will tie it together, and allow the sets and clears to happen. Will make a note that the clear can use the existing login and immediately clear the alarm. On doctor side it will pull the alarms for their patients, and show them. ☺ So close, and I can get this done in alot less than a day, I predict. Going great. ☺Lots of smiley faces.

November 26— home for the holidays. I completed the code. Now to wrap up the demo, and submit it all. Night to all. Written on my little droid phone screen.

November 28 — yesterday hectic trying to film demo. Also found a defect, and fixed it last night. To do with alerts. I filmed the demo at 2am. Also edited it. I voiced over and finished editing today. Will upload once i get internet. Typed from my phone. I’ve uploaded the files after a last edit. And submitted to Coursera. There is a slight chance I could get a Nexus tablet, but I’m more concerned with getting full credit. I’ll finally have the last updates written as I get a grade on this, and I’ll scrape the trello board for data on what happened when.

November 30 — back home in Columbus, was nice having the actual weekend off. Got to see Hunger games, and Big Hero Six. Both good movies. Starting tomorrow, I will be evaluating other assignments and my own. Probably won’t see any updated till the 13th of December.

December 1 — starting to review other peoples code. At least one was totally incomplete. Makes me feel better about my project. I didn’t get what I wanted done, but I got all the requirements. So far, a few have looked alot better, UI wise, but mine looks about the same. And I learned alot.

December 4 — Figured up the total hours for this project, I estimate 113 hours for the project. Looking back thru this log, along with looking at git commit history. I will eventually scrape trello for what I can get on each day. But a major capstone. Lots of time on the weekends, and alot of midnight oil, especially the last week and a half. Plus trying to get stuff done at night, while spending the day with family during Thanksgiving. Thank you Amy for not divorcing me. ☺

December 12 — Tomorrow I get my score, has been good to take a break from coding. I updated my Android Studio, and removed one line of gradle code to make it build. And that has been all my programming outside of work.

December 13 — My hard work yielded a perfect score. ☺ Yay, I will get the certificate, and received alot more knowledge. After the new year, I’m thinking of enrolling in another course, and will be attending a google user group at the forge. So may have other blogs about those things. I will still circle back, and refresh this, so watch for updates, but that can keep for later. So relieved/happy about this.