Adam Smith discussed “Architecture 101” with regards to building iOS apps during this week’s meetup. We develop apps and we tend to leave all the code in the View Controller class. This is not a good practice. Adam shared that each of our classes should ideally have a single responsibility (and therefore should only do one thing).
The single responsibility principle is a computer programming principle that states that every module or class should have responsibility over a single part of the functionality provided by the software, and that responsibility should be entirely encapsulated by the class. All its services should be narrowly aligned with that responsibility. Robert C. Martin expresses the principle as, “A class should have only one reason to change.” – Wikipedia
So how does the SRP relate to iOS programming? Well Adam shared a simple app that he built that downloaded Game of Thrones data and images from the apple website. He had created a Table View that all the devs know well: TableViewControllerDelegate.
Any usage of TableViewDelegates requires certain TableView methods in order to fulfill the contract of the TableViewDelegates protocol. Through the course of his presentation Adam refactored the TableViewController so that it only took care of the aspects of being a view controller. He completely extracted the functionality of networking and TableViewControllerDelegate out of the ViewController.
When Adam puts together a talk, I like how he leaves in common mistakes so we can watch him take them out as he explains what and why he is doing what he is doing in the code. And he’s really approachable with questions.
During this meetup we also had 3 new Hawaii iOS Developers attend. I met Leo, Jerome, and Jordan. After the meetup I showed some apps that I had written the week before we ARKit. Looking forward to the next meetup where I will be discussing ARKit further.
Still thinking about the comment Chae made when I was discussing the shortcomings of ARKit (namely that you have to map the room before ARKit works). Chae added that ARKit is an attempt by Apple to make this technology easy to use. The real value of ARKit will come when it is successfully combined with other technologies like Machine Learning and Computer Vision.
If you’re interested in attending the next meetup, please RSVP!
Over the past 3 days I participated in a Water Management Conference in Punalu’u. My job was to attend the conference and get feedback from participating Native Hawaiian Fishpond owners regarding what they need most in an app to monitor the tide, oxygen, and salinity of their fishponds.
Here are the findings with attributions regarding who said what:
- Tide graph data needs to do in and out data.
- Temperature reading is easy to get
- Please add it to the app.
- Uses Tide Graph tide app
- Thinks about using other paid features
- But has not made the jump.
- Loading all that NOAA data in Pacioos makes the web app slow.
- Told me about the Pacific Disaster Center (PDC) which is an international app for emergency managers
- Wants to find student workers
- Shared Career Fair in October
- Grab the tide data.
- Get the longitudinal data.
- Then sell it as a conservation project.
- Has experienced many problems using apps
- One big gripe was that in using an app, photos needed to be taken inside the app and the app maker did not make adding photos from the photo library possible.
- Had to take photo and assign GPS data to the photo
- Had to upload GPS data by hand. Not ideal.
- Check out the Liquid app (SeaGrant)
- The app has to load and be FAST
- Needs to look pretty and be easy to use.
- MAKE THE APP SUPER READABLE
- Need to have click-consistency in the app: Where you click should produce the same interaction every single time.
- Differentiate between finger touch to comb over data and swipe to new graph with two fingers – differentiate based on how many fingers are used to do the gesture.
- In order to do tide predictions we need at least 18.9 years of tide data. This is the scientific standard for data.
- 2 years of data is not enough to do predictions.
- We have 10 years of NOAA data on the Kaneohe buoy
- Anomalies in tide data readings might be due to turbulence in the water flow
- Send the app user a notification if the sensor is giving readings that it is being tampered with so we can go and check on it to make sure it hasn’t been moved or stolen.
- 60 points of data “meaned” and we are still getting anomalous data.
- Please smooth out the data.
- Be sure to put the sensor at 30cm from the water.
- Allow scientists using the app to show the reading in ft and m.
- Wants to be able to compare his fishpond to other fishponds
- What combination of salinity, oxygen, and tide flow worked best for other fishponds to grow limu, oysters, and fish?
- We want easy access to the data.
- Too many data points is not helpful.
Kehaulani (Mokauea Fishpond)
- Want to be able to say that makaha1 is here at this GPS
- Kids can make conclusions with their own eyes at the fishpond
- Mokauea fishpond is an educational resource for kids age 8-12
- We want them to get familiar with high/low tide dynamics
- Currently using the app Tide Tracker
- Tried out different ones
- Likes Tide Tracker most
- Needs to know when tide is lowest
- This is best time to take kids out
- Also best time to do work and pick limu
- Also best time to build rock wall.
- This requires the app to do tide predictions
- Wants the kids to kilo – look with their eyes and learn
- Need to be able to see the tide approaching
- NOAA data cannot predict king tide for specific locations.
- MOON PHASE IS HUGE
- Mahina – Teach Hawaiian names for moon phases like the Hawaiian moon phase song
- Visually showing the current moon phase is helpful in teaching moon phases to kids
- Important to show sunset/sunrise times
- Also important to show Moonrise/Moonset times
- Make the app brighter.
- Make the text size HUGE, hard to read for older people.
- Show “minus tide” in clear clear clear visuals. Like show that part of the graph in a different color and make it stand out. This is the part that Kehaulani wants the most.
- Minus tide is best time to go gather limu and move rocks.
- Add step button feature to advance to next minute/hour/day
- Maybe easier to use a single button with a fixed location
- Having a sliding gauge might make it hard to get JUST THAT RIGHT LOCATION AND INFO
- Landscape view is helpful
- TOTALLY INTERESTED IN SEEING OTHER PEOPLE’S FISH POND DATA! THEN WE CAN SEE WHAT IS WORKING FOR THEM AND ADJUST OUR SALINITY, FLOWS, ETC TO MORE CLOSELY MATCH THEIR WORKING SETTINGS
- Not all makahas have 2 gates
- Get students stoked on science to get jobs to stay here on the island.
- Feedback on the Loko I’a app
- Scrolling readjusts the axis.
- Forcing you to orient yourself every time you scroll to a different view.
- Needs to port the app to Android
- Interested in student workers to keep building out the Loko I’a app.
- If all fishpond owners have the same question, then we can build in force to solve that one issue.
- In order to determine if they all have the same needs, they need to be able to compare longitudinal data, real-time data, and predictive data.
- Salinity allows us to predict other things.
- Photosynthesis only happens during the day and stops at night.
Then there are also unsorted thoughts that I overheard and jotted down on a piece of paper during the conference:
- “Whatever data we can get, it all comes down to cost.”
- Make the data useful for us. The goal is to provide accurate fishpond data.
- Doing oyesters in a shallow pond is tough. We need an accurate assessment.
- Make a big calendar that shows the contributions from everyone.
- There are 7 makaha at He’eia Fishpond: 4 salt water and 3 fresh water. It’s important to name each makaha. Makaha 2 is called “Hihimanu.”
- “It’s good to name things to give them life.”
- We need time to work with the low tide.
- Tidal lag is affected by moon phase.
- We need to know where the water came from.
- We need a quantity of parameters to determine the models.
- Goal is to have a map and be able to see the parameters you want to see for all ponds.
- We need a map to show all the fishponds.
- Goal is to make the fishpond productive and we need to quicken the pace to learn that.
- Important to integrate the moonphase because some fish orient themselves to the moon phases.
- Make the app as user-friendly as possible.
- The goal of the conference is to get sensors into the hands of people.
- YSI and Seabird are very expensive sensors.
- “There’s not much time between the tides to move rocks.”
- The app should share, “This is exactly what we need and this is how we do it.”
I still have a few lingering questions such as: “What is the best way to allow users to select the attributes for each site? Tableview? Buttons to new view controllers? Still thinking on this one.
All in all a fantastic opportunity to learn more about the history and ancient practices of combining fresh and salt water to create brackish water to cultivate aquaculture to entice fish to grow big and strong. Email me if you have any questions!
We’ve all been waiting to try it out. All I needed was a deadline to give me the push into installing Xcode 9 beta 4 and upgrading iOS on my iPhone from 10.3.3 to iOS 11. The gains are huge. Perhaps the best thing I’ve noticed on iOS 11 has been the screen recording feature. Amazing!
During this meetup we had a chance to cover ARKit. I’m floored. Absolutely floored by this technology. I set up the this session so that we could have witness the tech hands-on. In order to prepare for this session I watched the WWDC 2017 video on ARKit. Then I searched YouTube for a tutorial video from Jared Davison.
While I was searching for tutorials I was busy installing Xcode 9 and iOS 11 on my devices. Both of these pieces of software are needed to develop and play with Augmented Reality for the iPhone.
I really like how ARKit projects have a very interesting screen lag. Sounds strange but, this is starting to feel like the future.
Next week Adam Smith will be covering Architecture 101 at the meetup. Please RSVP if you’re interested in attending. Don’t forget, we’re meeting at the iLab on Thursdays at 6pm!
During this meetup I prepared a tutorial on setting up Firebase Realtime Databases. We hit a snag in the set up of the database when I put the configuration call in the wrong place in the App Delegate. Good thing the one of the developers had done the tutorial before. As a group we were able to debug the connection and get the tutorial to work as expected.
During the group debugging session Adam commented that he wished we could always have a group of developers programming together as we located the bug much faster. 10 eyes are better than 2!
If you’re interested in attending the next Hawaii iOS developer meetup, we’ll be covering ARKit to do augmented reality with the iPhone. Please RSVP if you’re interested in attending!
Last week I attended the IT All-Campus Conference at the University of Hawaii at Manoa. There were a number of tracks attendees could take and I chose the Accessibility route.
Here’s a random assortment of takeaways from the Accessibility track:
- Accessibility is about access, not disability.
- Making site accessibly a priority makes the site better for everyone
- How does your website perform for a student studying for his finals?
- How does your website look when it’s printed?
- Get in line with A, then AA, then AAA
- The way I see my website is not the way you see my website.
- Students shut off images to save data on their plan.
- Have you looked at your website with a color blindness simulator?
- If you say required fields will be red and the user can’t see red, you need to do it a different way.
- high contrast, and large fonts to address cataracts.
- add whitespace for glaucoma patients.
- Provide transcripts as they are mandatory. Make sure your captions match the audio, not just a script that has been prepared ahead of time.
- 75 char or less in line length. Increase line height to 1 and a half height.
- Space out navigation on mobile.
- Turn your pdfs into webpages so they can be read by screenreaders.
- Not all devices can read PDFs.
- Skip links are required for repetitive navigation.
- Users don’t want to have to read through the same thing every time if they are already aware of the navigation structure.
- Add label tags to all of your forms
- Don’t use click here wording, update it to the verb that states what it is doing.
- If linking to PDF, share in the link text that this is headed for a PDF.
- Listen to a website by skipping through the headings. Section the content up this way.
- Make site navigable by keyboard only!
Resources for more information: