On The Road Again: Balancing Childcare and Coding

After 5 weeks back in Pittsburgh to visit family and friends, we are officially back on the road. We are going back out West, but this time, we are headed north. The first stop we are really excited for is Custer State Park in South Dakota, so we’ve got just a bit of driving before we get there!

Family pic as we were leaving Pittsburgh

I’m a little nervous to see how my coding journey goes from the road. I have some freelance SEO/marketing work that I do, but it’s easy to do this work whenever I can squeeze it in. It doesn’t require my full concentration and setting up the second monitor like coding does! One thing I both love and hate about learning a new skill is that you must be fully concentrated on it. Trying to learn while being constantly interrupted by a 2 year old just won’t work.

In Pittsburgh I was able to get a lot of coding done because Calla was able to spend a lot of time with her grandparents. On the road, we have no childcare – it’s the 3 of us, 24/7. Tim has freelance work that he must get done also. So we have to juggle the following:

  • My freelance work
  • Tim’s freelance work
  • Childcare
  • Traveling
  • Learning to Code
  • Working on my app idea

The thought of trying to balance all of that makes my head spin. But I’ve come to the conclusion that there is no such thing as actual balance…you will always feel like one of those areas (or more) is suffering. And you just have to accept that uncomfortable feeling! It means you are living a full life.

I know from past experience that getting worked up over it doesn’t help anything, so we will have to take it one day at a time. Tim and I are going to try to alternate workdays, so one of us will be responsible for Calla for a good chunk of time (4 hours?) one day, and the other will take on that responsibility the next day, and we will alternate.

Right now, we are driving every day (not something we like to do…usually our minimum stay somewhere is 2 days) trying to get back out West. It’s not conducive to getting anything done, because as anyone who has RVed can tell you, a travel day takes all day between packing up to leave, then driving, then unpacking…you’re lucky if you get a couple hours to decompress before bedtime and you wake up and do it all over again.

I have my eyes on 3 days at Devil’s Lake State Park in Wisconsin…that will be my first chance at making some progress. Wish me luck!

A No Good Very Bad Coding Day

I sat down today to code for about an hour. It’s one of the last days that we will have childcare, so I had to make the most of it before we hit the road again. Do you ever have a day where nothing works the way you expect it to? That’s what happened to me today. Almost like, I wish I would have never even sat down at my laptop today and attempted this, because I think I messed up more than I solved!

I dove back into my tutorial. I thought I remembered exactly where I was, but after about 20 minutes, the tutorial told me to take an action on a button that I hadn’t even created yet. Hmmm…I think I may have remembered incorrectly. So I combed back through the tutorial and figured out exactly where I left off.

The goal of today was to actually save my meals and display them in a list. Up until today, I have been working with hard-coded values behind the scenes. It was time to take the user’s input, store it in a “Meal” object, then pass it to the MealTableViewController to display it in the list.

The tutorial had me to an unwind segue, which lets you return to view controllers that already exist. So we need the unwind segue for when the user either saves the meal object, or cancels out of the “Add” process.

I keep getting errors and using the auto-correct feature that’s built into Xcode, and I think that’s been a bad idea. It’s adding code that I don’t know about, then I get even more errors. It feels like this is getting out of hand. I’ve basically accomplished nothing today. I know this is a learning opportunity, but it sucks.

I’ve tried to back out of my changes, but I’m confused where I even left off. I got desperate enough to just open the final source code of the tutorial and compare it to what I have, which is not the way I like to learn…but I think I’ve gotten myself into a hole too deep to dig out of.

Now I have to go pick up my daughter, so this problem will have to wait for another day. To calm my nerves I leave you with a picture of one of my favorite places: Arizona.

More soon.

Fixing Build Errors and Creating Navigation

I’ve got 99 problems…

Days like this really frustrate me, but I know that they’re a part of learning. Today I spent all of my coding time fixing errors.

Last time when I finished up my tutorial section, I had a build error: “use of undeclared type”. I banged my head against the wall for about 20 minutes trying to figure out how to solve this last time I sat down…but, I know by now that as much as I want to sit there and figure it out…I should get up and do something else, because when I come back and revisit the problem, I almost always easily solve it. That was the case this time, too. I last sat down and coded about a week ago (eek – determined to up the frequency) and couldn’t figure out how to solve the build error. I sat down today and had it fixed within 5 minutes.

Instead of going through the tutorial line by line and making sure my code matches it exactly (which is a perfectly fine way to solve a problem, but it probably wouldn’t teach me much), I try to figure the error out myself. The compiler underlined the undeclared type, which was “MealViewTableCell”, a class that I made the last time I coded. Why couldn’t it find it? I looked at this class – I made it last time I did a tutorial. Turns out that I incorrectly named this file, which should have been “MealTableViewCell” – it’s easy to see how someone could get confused, right? Even though it was a simple naming error, I’m glad I figured this out without resorting to comparing my code line by line to the tutorial.

I finally solved my build error…onto the rest of the tutorial! First I had a checkpoint: I needed to run my app and make sure my TableView is populating with the meal names and pictures that I hard-coded into the table. Just because something builds does not mean you’re out of the woods. I launched the simulator, and my table view was blank.

What the tableview should look like on the left. My app on the right. Nailed it?

Luckily I figured this one out pretty quickly by going back into the tutorial and figuring out where I may have missed a step. When you go a week in between lessons, it can be hard to remember exactly where you left off. What happened was that I forgot to point my Table View Controller to the MealTableViewController class. Once I fixed this, I was able to see my Table View Populate:

Looking more like the tutorial now…

Navigation

I worked with navigation controllers and segues to build a path through my app. I’m about halfway done with this part of the tutorial, but so far, I added a navigation controller to my app. I then changed the title property of the navigation bar and added a bar button (in “+” form) as well.

I then added a “Show” segue between my meal list and the input screen for adding a new meal. Once I saw what this did, I switched the segue type to “Present Modally”. This kind of segue does not automatically have a navigation bar, so I had to manually add one by embedding it in its own navigation controller.

This is as far as I got today, but I’m really impressed by the built in functionality of the segues in iOS. I hope that this means developing navigation in apps will be easier than I expected. Time will tell!

My App Idea + High Level User Stories

I just got back from my first backpacking trip! I’m an avid hiker but I had not backpacked until this past weekend. We went on the North Country Trail, which is the longest trail in the US at 4800 miles. It spans from New York to North Dakota. We did a small section that crosses through Moraine State Park, and spent the night in a backpacking shelter with the company of wolf spiders. The most challenging part was the heat and humidity, as it’s over 90 and extremely humid in Pittsburgh right now! I was warned that I wouldn’t get much sleep, so that was a challenge, but an expected one. Thankfully my toddler slept through the night last night, so I was able to get a good night’s sleep!

Backpacking on the North Country Trail – Slippery Rock, PA

Back to reality today. The whole point of me learning to code is so that I can code my app idea. What is it, you ask? Come over here and sign my NDA. Only kidding. It’s no secret, and that’s because no one has the same passion for YOUR idea that you do. I think of ideas constantly and the only ones that have any value are the ones that are executed upon. So if you have a “million dollar idea” I challenge you to actually take some action to bring it to fruition, otherwise, it is worthless.

My idea is for an app that connects outdoor enthusiasts. I’ve gone on so many hikes over the past year…alone. I would have loved to have someone to hike with, but I don’t know how to find them. I’d like to be able to say: “I’m in Sedona, Arizona until April 30. I can hike on Mondays, Wednesdays, and Fridays from 5-7 PM. I enjoy moderate to difficult hikes.” then I’d be matched with other people who’s schedules, abilities, and interests fit with mine.

My 30th birthday hike – Usery Mountain Regional Park in Mesa, AZ

I’d like to make this available for a host of outdoor activities – running, climbing, kayaking, biking, etc, but the idea was born from hiking.

I’ve spent the past few years of my career as a business analyst (BA). A BA is someone who translates the business needs of the company into software requirements. We basically speak both the language of the business + the language of the developers, and can easily go between the two. We take big problems and divide them into really small chunks of work that developers can work on and show progress on within a sprint. So the majority of the job is fully understanding the needs of the business then dividing that work up (and fleshing out lots of details) so that the developers can work on it in bite size pieces.

Since I have so much experience doing this, it only makes sense that I’m starting to think about taking my app idea and breaking it down into workable chunks. As a corporate BA, I’d do this in a much more formal process and try to iron out as many details as I could ahead of time, recognizing that a lot of details can’t be thought of until development begins. I always did my best, though. This time around, I’m keeping my user stories very high level, and just jotting down bullet points/questions underneath each one. After all, I’m going to be the developer on this project!

Here’s what I have so far:

 

  1. As a user, I want to add my availability for an activity so that others can join me.
  • Choose Activity
  • Add Location (radius)
  • Add Availability
    • Days of the week
    • Times
    • Date Range
  1. As an admin, I want to add activities so that people can be active with others.

     3. As a user, I want to be matched with others who are interested in the same activities so that I can meet up with them.

  • Match based on activity preference, days, and times free
  1. As a user, I want to be able to communicate with those I am matched with, so we can decide on a specific location and date/time.
  • Voting?
  • Changing it once it’s decided on

5. As a user, I want to view activity meetups that already exist, so I can join them if they fit my schedule and interests

  • Match on interest/availability, or allow general browse?

This is super high level and was accomplished in about 15 minutes. It’s not the end-all-be-all for my app by any means, but I wanted to share how you can break down a high level idea into smaller pieces.

 

Writing Unit Tests & Working with Table Views

I felt like I was able to get a lot done today. The real reason for this is that my parents are watching my daughter, so while she plays at the farm and the spray park, this mom gets to learn new tricks. It’s going to be hard once we get back on the road (have you checked out my travel blog?) to have quite as much time for coding with no childcare. My husband is currently freelancing his dev skills, so we will trade off time to work.

One part of today’s tutorial felt oddly familiar to me: unit tests. I wrote a new class, which defines a “meal”. A meal has 3 properties: name, rating, and photo. So I wrote unit tests against this class, to check for error states, and also to check that the class is working as expected. I tested with a zero rating, positive rating, a rating that exceeds the maximum, a negative rating, and an empty string.

I passed parameters to the Meal class and asserted that the class either did or didn’t initialized based on if the values were valid or not. I remember writing a lot of unit tests in my last coding job (I was a C# developer) so this was a really nice refresher. Unless you are coding on a regular basis, you forget a lot of things. It has been awhile since I’ve written code, so it’s comforting when I can actually remember how to do something!

Once I got past writing the unit tests for my new class, I created another scene in my storyboard. This was exciting – up until now, my app was just one screen. I changed the entry point of the app to be the table view that I just created. This table view is going to display a list of meals, ratings, and photos. I configured a custom cell, that includes my 5-star ratings control, a photo, and label for the meal name. I unchecked the “user interaction” property on the ratings control since it’s static on this scene.

I also created my first array (woot…ok, just kidding, I’m really not that excited about it) and loaded it with sample data to display in the table view. Here I used instances of my Meal class and then loaded them into the array and passed them dummy parameters…for now.

Next up is displaying the data in the table view. That’s what I’ll work on next time I sit down to code!

BTW – how do you like this tire cover we bought for our RV?

Coding When You Can

I think I may need a new blog theme. I set this site up super quickly – prior to this, I was trying to get my personal website set up with Hugo and I spent hours doing what was supposed to be a super easy install (yes there was some learning curve with Git and the Mac command line for this Windows girl). I then ran into issues with my hosting and thought you know what, screw it. This is taking up way too much time, and I’m here to learn how to code iOS apps, not to use Hugo for my personal website. So I went with my old familiar friend WordPress, picked out a free theme in about 2 minutes, and here I am. What I was getting at here is that I hate that the blog looks like crap unless I put a picture in the post! I mean, how many selfies can I take with my computer before it’s just boring for everyone?!

Tonight I decided to get behind the keyboard for a little while, even though it’s late and it’s Sunday and I’m up against giving my daughter her bath and bedtime routine. It seems like with my schedule, I can only spend time coding every couple of days. I think the important thing is not the frequency, but just the fact that I keep coming back to it. I’m a very determined person, and I am determined to make time for this and to see it through. The wheels in my mind are already churning about what my first app is going to be. I’m going to keep it very simple at first, but I’m excited. And I’m already kind of “over” the demo app. Is that terrible to say? I just want to care about what I’m developing, and I do not care about a food tracker. I’ve never tracked food a day in my life!

However I think I’m going to complete the tutorial. I’m about halfway done, and what’s left is back end stuff – defining a data model and actually saving the food ratings and displaying them back to the user.

Today I worked on the ratings control of my demo app. I learned how to add images to the Assets folder, how to style those images, and how to use the star rating in various selection states (highlight, empty, filled, cleared) based on the user’s actions. When a user uses the ratings control, I now have the selectedRating tracking a number behind the scenes. I also learned about property observers, although I don’t really understand them yet.

So next time I work, I’ll define a data model. I’m interested to see how this works, since my prior experience is with a SQL backend. That’s it for today! I’m off to go wash dishes then give my toddler a bath…#momlife

PS – I recently ran a SEO business and the minimum ‘good’ blog post length for SEO purposes is 1,000 words. It’s giving me some kind of enjoyment to write such a short posts, knowing that I am doing this just as an outlet for myself, not to hit some kind of magical word count or keyword score. Short blogging is so much easier 😉

Day 2: #MomLife and Layout Issues

**In case you missed my other posts, I’m currently working through this tutorial from Apple, where I’m making a food tracking app.

I tried to spend a couple hours coding yesterday morning, but instead ended up with a lot of frustration, due to this:

Ok, I don’t look annoyed here. But truth be told, I was.

That’s me, sitting in front of my computer, with my daughter all up in my grill. She was having a very needy day yesterday, and it did not jive well with me trying to do something that requires my full attention, like learning Swift. So I ended up frustrated and just called it quits for the day after getting through about 1/4 of 1 page of my tutorial. I slogged through it but because of all of the distractions, I couldn’t even really tell you what I did. Toddlers and learning to code don’t mix, let me tell you!

So today was a new day, and my parents took my daughter to the Children’s Museum. Yay, uninterrupted time to code!

Today I worked with view controllers so that a user can tap a placeholder image, choose an image from their photo library, and submit it with his/her meal rating. I was also introduced to the world of gesture recognizers, in this case a tap gesture. I also created an image picker: I learned how to bring up the photo library, how to disable the camera, and how to dismiss the picker once a user chooses an image.

All of this went pretty smoothly. I followed the directions in the tutorial and got the results as expected. By the end of it, I was able to replace the default image with one I chose from my simulator’s camera roll.

The next piece of the app is to implement a custom control: a ratings control that is made up of stars, where the user can choose a star rating between 1 and 5. I’m only about halfway through this section. Every time I scroll down a bit on the tutorial it just seems to get longer and longer! The tutorial tried to explain what a view is, but I ended up googling it to get a better idea. It seems like I’m adding a new stack view so that I can place the 5 rating buttons on my storyboard.

The tutorial also had me write up some initializers, but I don’t understand what I’m doing with those, I just copied what the tutorial said. If I took the time to fully understand every single thing I typed, I’d never get through the tutorial. I know that eventually I will need to understand that concept, but for now, I’m OK with blowing past some stuff for the sake of accomplishment.

In this section, I wrote my first loop in Swift! I remember loops well from C# and they are a universal programming concept. The loop was used to create 5 star buttons (I originally started with one). So far, when I tap the star rating, I’m getting a console printout of “Button Pressed”. Further along in the tutorial we will actually assign values to the buttons and save those, but I’m not there yet.

I’ve been noticing that something is “off” with my storyboard layout, and I have a feeling it has something to do with the constraints I assigned to my labels, text inputs, and image. I remember that at one point the tutorial had me group all of them together and then they will stay together. I also added constraints on the image to make sure it’s always a square. But somewhere along the way, things started looking like a hot mess compared to the tutorial:

Tutorial on the left, my app on the right

 

The app still functions as the tutorial says it should, so I’m not overly worried about the layout issues for now. Somehow my “Enter Meal Name” text input got way too large and so did my “Set Default Label Text” button. I tried to manually change their heights but it only caused problems because they are grouped together and have constraints. Still more to be figured out here, for sure. I also added a default image of food, where the tutorial has a different default image (“No photo selected”). So the content of that one really isn’t a problem, just the size.

I feel that many aspects of this tutorial are over my head, and as I mentioned earlier, I’m not fully understanding what I’m typing. I think that’s just the way of learning though, sometimes you have to DO before you can fully understand down the line. Here’s to continued learning!

Day 1: Jumping in with Xcode

I decided to sit down and spend a few hours starting to learn Xcode (the IDE for iOS) and Swift (the programming language for iOS apps) for day 1 of my self-taught learning experience. But where to begin? I knew a Google search would be overwhelming. Judge this however which way you want, but I wasn’t ready to lay down any cash for paid lessons or content. I started by reading the Swift documentation but before I knew it my eyes were glazed over.

My husband Tim is a developer, and he asked me a good question: why are you starting with the low level stuff? Why not start at a higher level, then learn syntax as you need to? Logical, logical Tim. But he was so right. He sent me a couple links. I started with this article on medium. It gave me a high-level lay of the land. Then I started on this tutorial right away, straight from Apple. I’d much rather actually create something than just read about creating something, so yay. I downloaded Xcode from the app store and got started with the tutorial right away.

I got through building the UI without much issue. The storyboard in Xcode was easy to use (it’s just a GUI) and with the tutorial telling me every single step….wait, I did notice that the tutorial is for an older version of Xcode. Some of the menu items, detail panels, etc are different than what the tutorial says, but I found my way around just fine.

The second section was about connecting the UI with code. Unlike the first section, this part required me to write some code. Woot, day 1, I am coding again! Maybe you can teach an old dog new tricks, suddenly my past life as a developer seemed like it was just yesterday. Except I did keep putting a semicolon after each line…that’s a C# habit. So I was churning through the tutorial, stopping when it told me to to make sure it worked, and it always did. Until it didn’t. I got to the end of the second section in the tutorial, brought up the simulator, and expected to see the app work. When I clicked a button, nothing was happening. The text in the input box was supposed to replace the text of a label above the input box. Instead I kept getting an unhandled exception and the app just went blank.

I started out by googling the exception, and a lot of the results were about a memory leak. Hmm, that didn’t seem very likely to me. This was a really simple app. My past experience tells me that googling an exception will not always send you down the path of finding the right answer. Usually it’s something a lot more obvious.  So I went back through the tutorial with a fine toothed comb. I found one line where I left a semicolon, I thought that was the issue – but nope. I took it out and still had the exception.

I ended up opening the demo code from Apple and comparing it to mine line by line – STILL nothing! I had nothing wrong in my code, so what the heck was the problem?! This is where I started to get frustrated. Coding requires so much patience. Sometimes you spend hours untangling something so simple – but that’s how you learn. So I knew this was a great learning experience, but that doesn’t make it any less frustrating.

A few hours later I realized that for one of my labels on the storyboard, instead of control + dragging it to the ViewController file, I just typed in the code that was auto-generated by doing that same action. I incorrectly assumed that control + drag only wrote the line of code. Apparently it also makes an output association behind the scenes with the storyboard.

Today’s lesson learned: there is stuff being done behind the scenes in XCode when you use the storyboard that you can’t shortcut with a line of code (at least not within my limited understanding).

Whew. Here’s to less frustrating (yeah, right!) days ahead.

My coding setup in the RV. The pink marble thing is my laptop, and I have a big monitor.

 

My Second Rodeo: iOS Development

I wanted to write this blog to keep a journal of sorts on the process of learning to code. Maybe it will help someone else. When I first learned to code, I already had a familiarity with software. I have a degree in Information Science from Penn State. My first job was doing QA work. Before I knew it, I was lead QA in my early 20’s and thought – can this really be it? I found QA repetitive (I was doing manual testing) and knew I needed to expand my skills. I asked to be moved into a developer role at my company, and I was immediately thrown into the fire – I had no clue what I was doing, but I was expected to contribute immediately. No mentors, no guidance – nothing. I ended up learning C#/.NET and was working on a web application that mainly used WebForms….yay for old technology.

I spent about a year as a developer in a very poor work environment without any support whatsoever. I wasn’t creating anything new – instead I was just fixing things or making improvements to the existing product. I felt like I was missing the “bigger picture” and knew that my desire to understand that was actually rare in the software world. So again, a role switch – this time I became a Business Analyst (BA).

I’ve spent the past few years as a business analyst and it’s a good fit for my personality. I’m a questioner by nature, and want to understand the “WHY” behind everything. I write good requirements (my former role as a developer helps with that…A LOT), and I understand technical concepts and can translate them into plain English for the business.

So how does that bring me here, into learning iOS development? Well, I have an app idea (who doesn’t?) but no really, I have an app idea that I actually think I can build. In the process of building my app, I’ll obtain a valuable skill – learning Swift. We are living on the road, making it hard to do BA work. I’d like to do freelance with my dev skills. It seems like freelance development is a lot more available than freelance BA work.

So I’m used to old C# programming. I’m interested to see how Swift compares. I’m going to start with some tutorials and go from there.

Sporting my “Binary Babes” t-shirt about 5 years ago. I got this shirt when I was involved with WIST (Women in IST) at Penn State.