Hawaii iOS Developer Meetup – Session 3

Chae and I were ready to go. Tyler walked in and we started session 3. I have a feeling that most developers are finishing up their christmas shopping on amazon, coordinating holiday schedules, and finishing up year long projects.

With such a small group we were able to discuss optionals, the topic of the night, deeply, and strategically. I’m most interested in created a best practices process that says, “Don’t ever use optionals. But if you must, guard them like this…”

We weren’t able to come up with hard and fast rules to follow concerning optionals. But we did discuss force unwrapping, implicit unwrapping, and the fact that optionals only have 2 states:

  • some()
  • none()

At the next meetup we’re going to be covering XCTests. I had a chance to write some tests for the first time this weekend. Main takeaway: I feel so much more confident about the code that I write. Here’s the XCTest video I suggested developers review before the next meetup:

Currently my tests prove that the code works with the expected input. I’m hoping to work this week on testing my error handling code by adding in tests to do just that.

Looking forward to the next meetup on Thursday. Busily reading Advanced Swift this week. If you’re interested in joining the meetup, please click here.

Advertisements

Hawaii iOS Developer Meetup – Session 2

This time we got together and there were only 5 developers, myself included. I had wanted the format to pivot around other people’s projects. Apparently, this strange time of transitions between Swift 2 to Swift 3, makes a need for syntax talks more important.

I’ve decided to focus on Swift 3 language topics for the next few meetups. This past meetup we spent the entire hour talking about Closures. In the middle of the talk, that I was leading, I found that I knew much less about passing functions than I thought I would.

We will be circling back to this topic as we continue to discuss Swift 3. Gotta say I love how clean the language looks. Here are a few more topics we will be discussing along the way:

  • XCTests
  • Cocoapods
  • Swift JS Bridge
  • Making a Tetris clone
  • LLDB

Twitter Street Team – Gamification

img_2451

Today we had our marketing meeting. I sought help from the marketing team. I needed their help in determining how the points will function in our Twitter Street Team Kiosk. We met for a good 30 minutes but it was barely enough time.

We listed out the behaviors we are interested in increasing. Then we assigned points to each of the behaviors. It was so helpful to get this kind of feedback before I build out the system.

Just in case you can’t read my scrawl, here’s what it says:

  • Points will be tallied in real-time
  • (10) – Find/Follow good source
  • (10) – Tweet (engage)
  • (2) – Retweet other sources
  • (150) – Live tweet an event
  • (5) – DM gets a quality response
  • (1) – DM new followers

Dynamic points are added as the tweet performs online:

  • (5) – For each click tweet receives
  • (5) – For each reply tweet receives
  • (1) – For each like the tweet receives
  • (10) – For each retweet the tweet receives

I’m working with the point system in Python. No code to show yet. I am excited about this project and, now that I have most of the information I need, I can get started.

We also discussed the list topics were are interested in pushing:

  • Programs
  • Services
  • Focus 2
  • Articles
  • Live Tweet Events

Student leaderboards will consist of the following attributes:

  • Avatar image of user
  • Screename of user
  • Total points

Here’s what it looks like now:

img_2453

Here’s how I’m hoping it will turn out:

killer_queen

Finally, here are some examples of the ideal leaderboard UI that I would like to see in the finished product:

This slideshow requires JavaScript.

Keep checking back here for updates. Here’s a link to the project on Github.

Swift Pair Programming – Session 8

I’ve been sick for a few days. Didn’t want to cancel pair programming with Nick. We met online at 6pm. I got access to a repo we were working on last time with GPS. Very glad we paired. Finally getting comfortable with Swift. Started in on the agenda and didn’t stop until 7:20pm.

I had a list of topics I wanted to cover last night:

  • Conditionals
  • Coalescing Operators
  • Optional Chaining
  • Guard
  • Defer
  • Unwrapping (forced vs implicit)
  • Typealias

Surprisingly, we were able to cover all of the topics last night. I’m excited because next time we’ll be dipping into xctests.

Here are my notes from the session:

Conditionals are either some() or none(). If they are none that means they are allowed to be nil. If they have a value they will return some() with the value inside of it.

Coalescing Operators allow us to set an enumeration with a default value. If no value is set for it, we will give it this default value

Optional Chaining allows you to code nested ifs. If the first item fails, none of the following nested calls will ever be called. Allows for elegant failing.

Guards are for hacky code. If fails, we will know it and react accordingly.

Defer executes code in a block whether the containing function’s block succeeds or not. I like to think of defer as a function’s deconstructor – use it as clean up.

Code in a defer is guaranteed to execute whether the following code in the method executes or not. We also verified that the defer block has access to variables in the containing method block’s scope.

Unwrapping signals to the compiler, “I know, compiler, this will have a value when this statement is called. It may not look like it now, but I guarantee it will have a value when it needs it.”

Forced Unwrapping differs from Implicit Unwrapping.

Forced unwrapping means that you create a conditional with a question mark. This means that you are telling the compiler that “this value might be nil. Don’t freak out, I know this can be nil.” Then when you use the conditional parameter, you MUST force unwrap it in the method block.

Implicit unwrapping simply saves you from having to force unwrap a conditional every time you use it in the method block. By writing a bang character in the parameter list in the function signature, you are telling the compiler, “I know this might look like it’s nil now, but I promise I will have something in it.” Implicitly unwrapping a parameter, saves time from having to force unwrap a conditional every time it comes up later in the statement block

Typealias is used to make your code more readable. That’s it. Let’s say you create a tuple that holds an int and a String. Let’s say you’re using this to hold a customer id and a string.

Now let’s say you have a tuple that saves an Int and a String to hold a business with a business id and a string. If you just had the datatypes (Int, String) and (Int, String) how would you tell them apart?

This is where a typealias comes in handy. By typing the tuple, you can refer to them with a name rather than have to determine each time you see a tuple with (Int, String).

For customers we could write:

typealias customer = (Int, String)

For employers we could write:

typealias employer = (Int, String)

Questions that came up during the pairing session:

  • Should we use a guard statement, a conditional, an implicitly unwrapped variable, or if let when dealing with potential nils?
    if let n = function_001(), let m = function_002() 
    
      // do something
    
      else 
    
      // return error code
    
      Assignment that may or may not succeed.
    
      Only expects argument

Shared Xcode Tips and Tricks:

  • Set Finder to always show scroll bars – System Preferences -> Finder -> Always show scroll bars
  • Use GPX files to spoof Pokemon Go game – Allows you to play out a GPX file, including location and speed, catch pokemon without walking to them.
  • Fold all code to reduce cognitive load while coding: Shift + Alt + Command + Left Arrow
  • Unfold all code – Shift + Alt + Command + Right Arrow
  • Enable Focus Follows Selection to know where your cursor is at all times – Editor -> Code Folding -> Focus Follows Selection
  • Update the comments in Xcode to show at a smaller font size – About -> Preferences -> Font -> Click on comments -> reduce font size

Questions for next time:

  • Are there any online Swift playgrounds?
  • Is ScreenHero invites open to anyone?
  • Should we start streaming these pair programming sessions on twitch?
  • Mind if I start screenrecording these sessions?
  • What’s the difference between a argument and a parameter?
  • Is there an Xcode plugin that allows finger pinching to scale the font size of the code?

Thoughts to meditate on:

  • Closures are like expressions. Think of it like a parameter, or a return, or a type.
  • Able to capture scope (I don’t understand this)
  • Start xctests next time

Hawaii iOS Developer Meetup – Session 1

I biked to HICapacity at the Manoa Innovation Center and arrived 15 minutes before 5pm. I passed out nametags and felt a strange feeling bubbling up. Haven’t felt it in a long time – Impostor Syndrome.

As more developers piled in to attend the first Hawaii iOS Developer Meetup, I started feeling the Impostor Syndrome ramp up. Good sign right? This means that I’m not the smartest person in the room. And I’m gonna learn things I didn’t even know I did not know.

We had a great first meeting but I wanted to start out with something that might help other people with their own meetups. According to Gitte Klitgaard, Imposter Syndrome “affects smart people. 70% of people you know suffer from it.”

Part of Impostor Syndrome comes from being made aware that you do not know nearly as much as you do. We freak out and imagine we’ll be found out if we don’t know everything.

In the YouTube video, Gitte suggest that networking allows you to know people that know the stuff you don’t know. Now, instead of freaking out that you don’t know everything, your brain can chill and minimize the internal freak out.

She also mentions that getting out of your comfort zone pushes you into the learning zone. I found that pushing your limits is the secret to slowing time.

Prior to the meetup, weeks seemed to be racing by. This week, it’s slowed to the point of feeling like no time has passed at all.

Impostor Syndrome minimized, let’s get to the meat of the meetup.

“I have learned one thing. Showing up is 80 percent of life. Sometimes it’s easier to hide home in bed. I’ve done both.” – Woody Allen

Here’s a list of the developers who attended the first meetup:

Joseph is working on donation app for non profits. Focused on payments facilitation with PayPal. His strengths are building teams. His weaknesses are mobile. He can help with best coding practices.

John is new to Hawaii. He moved here from Washington state. He has experience working on TV apps that feature live streams and security cameras. His strength is OCD. Which allows him to work on a problem until he gets it working. Interestingly, his weakness is that he stops once he’s hit MVP and has a hard time finishing after his proof of concept. He needs help with UI. He is willing to help out with backend.

Mike is originally from Osaka, Japan. He’s been in Hawaii for 15 years. He’s been working for wedding companies. A couple of years ago he started making his own apps in Cocos2dx and Unity. He’s released 5-6 apps on the App Store. His weakness is not knowing Swift. He’s hoping to learn Swift at the meetup.

Chae started in Swift 1 and is now learning Swift 3. He’d ultimately like to put Swift on a server. He’s currently learning Vapor, a web framework for server side Swift. He’s also working on an energy auditing app and wants to put it on a server.

Jonathan is HICapacity member who is finishing up his degree in EE.
He’s currently playing with Elixir, Erlang, PureScript, and ElmEmail servers in Elixir and Phoenix.

Eric attended a bootcamp on Swift. He’s currently doing Unity game development. He has experience using SpriteKit to do games. But he’s interested in switching gears to focus on AR and VR in Swift. He’s also interested in leveraging Siri Kit. Eric made a SpriteKit template for anyone with an idea to drop right in. Eric is also a artist and painter who does animation.

Paul has a PhD in electrical engineering. His background is in C, C++, and ObjC. His strengths are algorithms. Unfortunately, he doesn’t have enough time to play with new stuff. He’s developed in Obj and enjoys hardware projects.

Jesse doesn’t have much programming experience. He’s interested in creating VR music videos. He’s just purchased a $700 3d camera that arrives in March.

Notes for Improvement

With such a varied group of developers I struggled with how to best serve them and make Thursdays from 6-7pm as beneficial as possible.

Initially the meetup agenda pivoted on introductions. I was hoping that the introductions would be a launching pad for informal conversations and camaraderie. And I still believe the format is right. Now, I see how important it is to provide a second track for developers who aren’t ready to share their progress.

I feel like it’s important to provide some kind of learning time which could take the form or a info session, article discussion, or free form conversation. I’m going to try this out at the next meetup today.

I will be requesting suggestions from the developers to build up our repository of interesting articles, tutorials, resources, open source projects.

I sent out messages to all attendees for feedback on the first meetup. The number one most common request was to move the start time from 5pm to 6pm. Now we are meeting at 6pm.

That’s it for the recap of the meeting. I am eager to see how this meetup evolves over time. I am confident that the start time will allow more people to attend.

If you are interested in attending, please RSVP for one of our weekly meetups here.

Misc Thoughts

  • Post XCode keyboard shortcuts
  • Post screenshots of current projects
  • Schedule first talk
  • List articles we are interested in talking about
    • Fuckingswiftblocksyntax.com
    • Text to speech
    • Push notificaitons (Ray Wenderlich)
    • Lets Encrypt
    • https://whatilearnedtoday.io/
    • Swift Style (Ray Wenderlich)
  • List book recommendations
    • iWoz
  • Lingering questions:
    • Why swift on the server?
    • Can work with MySQL
    • What else?
    • Why is this better?
    • Swift playground online?
    • Installing Swift on linux
    • Installing Swift on Windows 10 / 7