AWS Amplify + Flutter

Over the last few weeks I have been working very hard on our capstone project. Which if you have been reading my blogs is a Flutter application combined with many Amazon web service backend tools. For example Amazon Amplify is the wrapper/service responsible for user authentication. I called it a wrapper because it encapsulates much of the aws Cognito functionality which is another service which assists with user authentication (login code, multi factor authentication, text message codes, email notifications, etc.). I have to say though that the experience has been quite difficult.

Apparently, we were unaware how new the amazon webservices libraries/packages and services are regarding their compatibility with flutter projects. The documentation is somewhat thorough, but it is not up to date and/or skips over crucial steps that might seem obvious to the creators, it didn’t help that a lot of the issues have no highly ranked stack overflow solutions/answers. The amount of effort (solid 20 hours minimum) navigating different resources (blogs, guides/tutorials, YouTube videos, documentations, stack overflow, github defect/bug tickets) to get the aws locally on my machine in sync with the remote aws instance was quite challenging and exhausting. 

In the end I was finally able to resolve all the issues but it is challenging working with this sparse and new aws flutter packages in a team environment. Doubly so when the updated packages are not being shared on GitHub. Technically we should be able to do ‘amplify pull’ from the terminal and get the latest updates from the remote but that doesn’t always work reliably. It has it’s quirks. Also I somehow had a corrupt version of npm(node package manager) which caused delays as well. Sorry for being a bit gloomy but this was a rough week of working on this project. Anyways, I/we have Aws amplify, Cognito, datastore, and storage/s3 working properly now on all our locals with the latest changes.

I then fixed/rewrote the routing logic for our flutter mobile app. It is slightly more organized and easy to read. Lots of fixes for the amplify configurations, flutter dependencies, updated ui for login page and updated the temporary home page screen so it is easier to navigate as well, renamed a few dart files with incorrect naming convention or marked the files as no longer in use, and resolved some of the many linting issues we have building up within the project.

Repository url where you can see all the commits and code changes: https://github.com/saveCraigslistTeam/craigslist

Over the next week I am planning to complete the full user authentication flow from ui to back end and back. Since aws is all setup, I was able to setup part of the authentication flow. Need to add the email confirmation code logic after a user sign up for the first time. Currently amazon Cognito will get the sign-up request and send out the confirmation code but there is nowhere on the ui for the user to enter the code and proceed to login. Afterwards, need to ensure all the different scenarios are in place. A registered account/user should not be able to create an account with the same name. Saving login data for future use, etc. etc. I would like to get at least very close to completing over the next week. Screenshots below for reference.

All in all, I think working on the project should start getting more fun since all the configurations are done(I hope lol) and I can focus on just the coding and logic of the craigslist app. Thank you for reading this far!

Draft UI Login Screen
AWS Cognito showing one unauthenticated user. i.e. user did not user the verification code they were sent to finish signing up/account creation.

Group Project – Flutter Struggles cont.

My progress was a bit halted this week on our group project. I was trying to quickly add dark mode to the application ui and ended up spending way more time than I had originally planned on it. I wanted to have the dark mode persist even if the users closed the application. So, I downloaded the provider package from pub dart website which is supposed to help you use the same variable in multiple area of the application. Basically, in flutter, you can only move data down the tree/widget hierarchy and the provider package allows you to circumvent this more easily by passing the data up or down the widget tree. It seems like I was able to get the provider functionality itself to work but my button to switch dark mode on and off is Not working yet. Also downloaded the shared preferences package which allows data to persist to the disk asynchronously, it’s not guaranteed and shouldn’t be used for critical data.  So, yeah. I went down the rabbit hole a little bit. The dark mode button is the moon/crescent shaped icon in the top right corner of the app. That said, I have been trying to get the authentication set up with aws(amazon web services) amplify but am having some issues with admin level access.

Screen shot of my flutter code running on an emulator(android studio). Flutter code is in visual studio code.

Since the dark mode is not requirement for the project, I am planning to focus on the user authentication/login set up which is a requirement. However, there needs to be some configuration setup work with aws tool. I keep getting errors trying to connect our flutter project to the amazon authentication tool(amplify). It appears that it is connected to amplify but only for one of us (the main account holder which is not me), am not 100% sure. I am still looking through the amplify documentation to see if there is a solution. Might end up having to get on a phone call with my team mates so we can figure out the issue more quickly.

Once I can get the authentication setup, then I would like to work on the other ui screens and have the routing complete, i.e., being able to navigate from the login screen to the other pages/screens of the craigslist mobile app and navigate backwards as well.

One other thing which is not a big deal but did stick out to. The collaboration over github is a bit rough haha. We need not to push code to github if the application is failing to build on our locals. It’s a bit challenging right now as we (maybe me mostly) are still spending most of our time reading documentation and getting the application setup but I think it will get easier once we are mostly focusing on the business logic. I have worked on github with developers at work but because we are making incremental and small updates to the code base that issues like merge conflicts and breaking builds do not happen too often. I suppose that might be different if you are working on a team that pushes a lot of code to production but that has yet to be my experience working for a large company.

Flutter – Syntax Struggles

This week I would like to talk about my capstone project which is designed using flutter and the dart programming language. Both of which are open source and as such will be using them for the open source course offered here at Oregon State University. The name of our team is “The Help Save Craigslist team” and our job is to design and deliver a cross platform version of the classic Craigslist experience, albeit with a modern twist and a user experience more inline with what today’s standards. We are a team with a solid foundation in Flutter. Collectively a majority of our experience is thanks to the Mobile Development course offered at OSU. However, some of us, myself included, have not utilized Amazon S3 or the other tools required for a few of the features in the project requirements.

We just had our first stand up on Wednesday afternoon this week. Since then I have spent several hours reading the flutter and dart documentation to refamiliarize myself with the syntax, tools, and other nuances of the framework and language. Additionally, I spent some time re watching lecture material from the Oregon state mobile dev course as the lecture videos explained many of the flutter concepts in detail. However, I also had to supplement with some YouTube tutorials as well. After feeling more confident in my working memory of flutter and dart I then decided to dive right in.

I first began with the setup of the local environment. Had to make sure my installation of git was proper, it was, and git bash was working as expected. Later on I figured out that I did not have an ssh key configured for GitHub (click for instructions) so I had to go ahead and configure that through the command line. Make sure to check if you already have any existing ssh keys.

Afterwards I Downloaded flutter using the command line and ran flutter doctor. Installed all the necessary applications (Android studio, vscode, chrome, flutter, etc.) and set up the mobile phone emulator in android studio so I can test the flutter application. Final step was to clone the repository to my local machine, ensure libraries are up to date, and that the craigslist app works on my computer. Done and done.

Finally decided to attempt making the user interface changes for the log in screen and I ended up re writing the screen three times. Spent too much time trying to do too many things so in the end I scrapped everything and just committed a decent rough draft that I can implement/iterate on further at a later date. That is the proper way to do things but I was in a hurry and overestimated my flutter skill, partly thanks to the mobile course I took one year ago, ha. No worries, the plan is to stick with the build in functionality and Widgets(kind of like standard library methods) that flutter natively provides while I ramp up. In the meantime I am super excited to keep working on this project with my teammates!

Flutter logo – Not my art, this is a free wallpaper.

Current Job?!

I briefly mentioned in my first blog ever that I am Java Developer at Bank of America and this is a good opportunity to talk about that some more. Prior to joining the development team I was working on the quality assurance side of the business. I joined the company as a software quality assurance analyst with very little experience in the tech industry but just like many folks in this program I had a strong willingness to learn, grow, and give my absolute best. After two years of being a QA at BofA I was approaching my three years of total work experience of being in the tech industry.

Decision time. Not sure about the entire industry but for me this was a pivotal point where I was starting to become a subject matter expert (SME) on my QA team and was being directed career wise to a senior level position on the team. I had to decide if I was going to stay in QA and work towards the Senior title/pay raises in QA or if I was going to work towards my dream of becoming a full fledged Software Developer in the tech industry. Spoke to many pears and colleagues (Suresh, Partha, Vlad, and Vijay) who were instrumental in motivating me towards Software development. I was getting really comfortable with the QA work, technologies, people, pay, and career growth. The thing is, if I had not pivoted at that time I highly doubt I would have left QA after planting my roots more deeply and getting a salary hike.

There is a lot more to the story but I think it would be too long for a blog to tell all the details. After some highly sophisticated googling and searching on reddit I decided to apply to Oregon State University(pre covid for winter quarter 2018). I believe I have always had the technical ability and skills to be a developer but I never had the confidence or metrics to showcase my abilities. My admission to OSU was probably one of the best things to ever happen to me and it gave me the structure and guidance to properly learn the basics and foundational knowledge of computer science, genuinely. Course after course I slowly built up my confidence, after breaking down crying a few times, and started applying for jobs at BankofAmerica and elsewhere. Thankfully I was able to transition to a dev team at BofA but I had a lot to prove.

After a year of hopping around a few teams and applying a lot of what I had learned in school I was finally placed on a permanent role working on a legacy Java application. It has been two years since then and in that time I have progressed through the OSU program and am right at the finish line. I have to say, working and going to school was challenging for me due to some existing health issues and a few more that I developed along the way(e.g. am now allergic to dairy and alcohol). The dairy allergy is quite brutal actually, never really noticed how much dairy there is everywhere until it started affecting my health. I have to say that although OSU was able to help me accomplish my dream, I cannot wait to be done with it so I can focus on learning new technologies like react native or swift for ios mobile development.

More coffee with Java logo because why not? This image is from unsplash.com and not one I took myself. Now that I think about it I really need to buy a coffee cup that has Java on it.

First Blog Ever?!

This is probably not a very unique back story but it’s the boring truth. I got started with computers as a kid growing up in the late 90’s. My mom used to buy these educational games for us made by The Learning Company, Knowledge Adventure, and a bunch of other studios. If I am being honest with myself they were actually quite fun to play and got us a little bit hooked to our pc’s. Had to google the name of the game as it’s been so long, “Clue Finders” had my brother and I wanting to learn.  The puzzles and story line were great for it’s time. Naturally this fixation to our computers was beneficial in learning more about the software and hardware of what was running our games.

Fast forward(skipping a lot) to today and I am currently working as a full stack Java developer at Bank of America. Future career goals are to become a senior software engineer but to do that I really need to solidify my technical skills. I tend to forget a lot of the material I have learned over the years and from the OSU post bacc program due to lack of practice. You would be surprised with how little coding you can do working in a corporate setting. Of course this varied from company to company. At least for me it will be easier once I graduate. I’ll be able to focus on leet code, problem solving skills, and personal coding projects. If possible I would like to get a Java certificate and/or spring framework certified as well. Spring is a very widely used Java framework. If I decide to stick with Java then I think it would be good to get that certificate. 

I say if possible because as I get older it’s really becoming a matter of juggling my time or creating time for things I want/need to do. For example, if money was not an obstacle I would probably be spending a majority of my free time learning Mandarin(Simplified Chinese). It’s such a difficult language and I want to speak it like a native speaker. That level of skill will probably take me anywhere from 3-5 years so the sooner I get started the better off I will be. One of the primary motivating factors is my kids whom are half Chinese and I am learning a little bit from them when I can. You know, like broken baby talk but in Mandarin :).  I’m really praying that my career progress goes well this year or the next. That way I can focus more on learning Mandarin and less on Computer Science related topics. I’m sure my spouse, kids, and in-laws would be ecstatic as well!

Luce coffee roasters in Houston, Texas. I love coffee so I’m sharing that instead of a photo of my family haha. Not sure I want to post family photos on the internet yet :).