Dear Blog-Viewers,
Welcome again to another wonderful week in the world of computer science. This week, I overcame a wall in my programming–dealing with networking! Last week I figured out how to automatically convert street addresses into latitudes and longitudes among other Java concepts with EcoMap Editor. This week I learned how to gather that information and synthesize it into the EcoMap iPhone app through different methods of networking. I learned that all of the important code is run in something called a closure which captures data from the network. But all methods related to that data must be run within that closure and closures cannot return values…
At first I felt like this^.. so confused. (Even Shrey Gupta apparently doesn't always understand. Just kidding, he does!) But then I remembered what I had learned about with multi-threading. The tableview (as you will see in the next image) of services must be populated with data once the data has loaded from the network; the closure ensures that all the data has been gathered from the network before any of it is used. The program would otherwise just appear to be blank. So finally I figured out how to deal with networking issues and populated a tableview.
I am proud to reveal that the iPhone app is really taking its shape! For weeks I have been learning concepts like data handling, multi-threading, and basic swift developing techniques. But now, all of these concept have come together into what looks like a somewhat usable app. You can see each row has a green title, a transparent, unobtrusive description, and an image of the site to show what that service is all about.
Next steps include creating a home/introduction page, designing pretty buttons, creating a detail view that allows users to get more information by tapping on a service from the above table, and figuring out how to get information about what materials are needed most at different composting locations.
With regards to that last feature, different compost locations might have different needs. For example, if there is a large supply of banana peels in one bin, it is possible that the location might need more leaves and paper shreds to chemically balance the compost pile. Being able to regulate what materials go into compost bins is essential to the most efficient production of soil.












