
Found via imgur.

Found via imgur.
Here’s the capsule review: iOS 10 Programming for Beginners, written by fellow Tampa developer Craig Clayton, is a great book. If you’re new to programming, it’s for you, because it doesn’t assume any prior programming experience. If you have programming experience but are new to iOS programming or the Swift programming language, you’ll also find it useful. Hey, I’ve been programming for years, I have an app in the App Store, and I run Tampa iOS Meetup, and I learned a couple of things from it!
Craig knows what he’s talking — and writing — about. He organized and ran the Suncoast iOS Meetup here in Tampa as well as intensive iOS coding academies, and he makes a living writing mobile apps. If you’re a Patriots fan with an iPhone, chances are you’ve used his app (pictured on the right).
iOS 10 Programming for Beginners starts with the basics — getting familiar with Xcode, the tool used for writing iOS apps — and then spends a couple of chapters getting you up to speed with Swift through the use of programming exercises in Xcode’s playgrounds.
Once the book has provided you with enough Swift knowledge to be dangerous, it spends a couple of chapters introducing iOS’ UI elements and basic application architecture. The final two-thirds of the book is devoted to building a single application: Let’s Eat, a restaurant review app that becomes more sophisticated and gains more features with each chapter. Each chapter begins with an explanation of the topics that will be covered, and features both clear explanations of those topics, along with step-by-step instructions for turning those topics into working code. Craig does an excellent job of explaining what he did with his code and why he did it.
As you work on Let’s Eat, you’ll have built a professional-looking app that uses a number of iOS features, including GPS and maps, the camera, iPad multitasking, iMessage, and even 3D touch. When you’re done, you should be able to take the knowledge from working on the app and apply it to your own projects.
If learning iOS programming was one of your new year’s resolutions, do yourself a big favor and get your hands on iOS 10 Programming for Beginners. There’s a lot of knowledge packed into this book!
You can get the book from:

Photo by Deanna Gray.
Tampa is lucky to have three iOS meetups. In addition to my group, Tampa iOS Meetup, we’ve got:
Suncoast iOS and Tampa Bay Cocoaheads cover topics better suited for intermediate- to expert-level iOS developers, and they do so quite well. This year, I decided shift the focus of Tampa iOS Meetup towards a different audience: people who were either new to iOS development or who were new to development in general.
With that in mind, the January 2017 session of Tampa iOS Meetup (which took place on Tuesday) was about developing a simple app: a tip calculator. While a tip calculator is a simple application, even the simplest of mobile apps have a lot going on underneath the hood, what with the programming language, the application development framework(s) involved, and the IDE. I covered a fair bit of ground in my presentation, and after a little review, have decided to tweak the format.
Future Tampa iOS Meetups will have two parts:
I think that this approach will be more useful, especially to developers who are new to iOS programming or just programming in general. It would give attendees a chance to try out the concepts while they’re still fresh in their minds, as well as a chance for me to help people with their programming.
I’d like to thank Wolters Kluwer for providing the space in which to hold the meetup, as well as the food (excellent salads) and drinks! Special thanks to John Wang, my go-to guy at Wolters Kluwer, and source of valuable feedback for my presentations.
Let’s start by building a simple app that will grow into the tip calculator. This one will be simple — it will be an app that says “Hi there” when the user taps on a button. Over a couple of articles, we’ll make changes to it, and in the end, it will be a tip calculator.
Start by creating a new iOS project. Launch Xcode, then use File → New → Project…. This will take you to a dialog window where you’ll choose a template, which is a pre-made set of files that you can use as a starting point for your project.
Think of Xcode’s templates as being the coding answer to templates that Office-style apps provide when you create a new document. Just as PowerPoint lets you choose from pre-made templates so you don’t have to design your deck from scratch and have more time to focus on its content…

…Xcode lets you choose from pre-made templates of code, each one designed to be the basis for a different link of app.
Here’s what the “Choose a template for your new project” windows looks like:
In this window, you should:
The “Choose options for your next project” window lets you specify a number of options for your project. For this project, we’ll use it to specify a name for your project, leaving the other settings at their default values.
In this window, you should:
You’ll now be at the screen where you specify where the project should be saved. In this window, you should:
Xcode will spend a moment or two generating your project’s files and folders, after which you’ll be taken to a place where you’ll be spending a lot of time: the Xcode main interface.

Xcode’s main interface is divided into 5 general areas:
Right now, we’re going to focus on the toolbar because we’re going to run the app.
Even though you haven’t yet written a single line of code or created a single user interface, you already have a working app. The Single View Application template that your app is using as its basis already contains enough code for an application that will run.
We’ll run the app in the Simulator, which comes with Xcode and can simulate any supported Apple device. It’s useful for quickly testing an app without having to load it onto a device, and handy when you want to test your app on a type of device you don’t have.
To run the app:
The simulator will take a couple of moments to start up, after which you should see this:
It’s not much to look at, but that’s because we haven’t built a user interface or added any code yet. Now that we’ve confirmed that our template runs, stop the app by clicking the Stop button:
It’s time to work on our app’s user interface. In order to do this, let’s take a closer look at the left column of the Xcode interface, which is where the navigators live. We’re interested in the Project Navigator, which lets us navigate through all the files that make up a project:
To show the Project Navigator, do the following:
The storyboard is where you draw the user interfaces for the screens (or more accurately, views) of your apps. The term “storyboard” is borrowed from filmmaking; in that field, it’s a way of graphically organizing the scenes of a movie. Here’s an example — an early storyboard for a film that eventually became Star Wars: A New Hope…
In Xcode, a storyboard is a way of graphically organizing the views of your app. It’s where we’ll define the user interface of our app, once we’ve done a little housekeeping.
Near the upper right-hand corner of the Xcode interface, you’ll find a set of buttons that determine what the Xcode interface shows. We’ll want to make sure that the both the left and right sidebars are visible:
Do the following:
Now that we’ve set up Xcode’s sidebars, let’s set up the storyboard so that its views are iPhone SE-sized. Xcode has a feature that makes it easy to design for various screen sizes, and it’s located near the center of the bottom of the Xcode interface:
Do the following:
These steps will cause the storyboard to display iPhone SE-sized views in the portrait orientation.
Now that we’ve set up the view, let’s look at the objects we’ll put into it. Look at the libraries, located near the lower right-hand corner of the Xcode interface:
Of the libraries that are available, we want to make use of the Object Library, which contains user interface objects that we can put on our app’s views. Do the following:
It’s time to put user interface items onto the view. The first user interface item is a button:
Let’s now add a label, which is a container for read-only text that can neither be selected nor edited by the user:
Since this is a simple app, we’re done drawing its user interface. Time for the next step…
Run the app right now, and you’ll see this:
However, if you tap on the Tap me button, nothing happens. In our simple app, we want the text in the label to change to Hi there! when the user taps the Tap me button.
As its name implies, the Single View Application template that we’re building our app on comes with a single view. We just placed a button and label on that view. However, that view doesn’t do very much because we haven’t yet written any code to control that view. This view-controlling code that we’ll write will go into the view controller file, which is very conveniently named ViewController.swift in our project.
We’re going to connect the button and label in our view to the underlying view controller in this step. In order to do this, we’d like to have both the view (which lives the in Main.storyboard file) and the underlying view controller code (which lives in the ViewController.swift file) visible at the same time. This is possible with the Assistant Editor feature, which makes it possible to view two files side by side.
The Assistant Editor button is located near the upper right-hand corner of the Xcode interface. Do this:
You should see something like the screenshot above. You may want to expand the Xcode window so that it takes up the entire screen.
Let’s connect the button to the view controller code first:
ViewController: UIViewController {override func viewDidLoad() {A pop-up will appear. This pop-up lets you define the type and details of the connection between a user interface object and the underlying view controller code. There are two types of connection, and we’ll use both in this simple app:
Since we’re dealing with the button right now, we’re defining an action connection:
Do the following with the pop-up:
The following code will appear in the view controller:
@IBAction func buttonPressed(_ sender: Any) {
}
This is a new method (that’s another term for a function) named buttonPressed, and it will be called whenever the user pressed the Tap me button.
Do the following:
Let’s now define an outlet connection for the label:
ViewController: UIViewController {@IBAction func buttonPressed(_ sender: Any) {Another pop-up will appear:
Do the following with the pop-up:
The following code will appear in the view controller:
@IBOutlet weak var replyLabel: UILabel!
This is a new variable named replyLabel, and it will be used to access the label in order to change its contents.
Do the following:
There’s just one thing left to do: write the code that changes the text of the Label to “Hi there!” when the user presses the Tap me button. We already have a method — buttonPressed — that gets called when the button is pressed; all we have to do write the body of that method.
All it takes is one line of code to get what we want. Add the following line to buttonPressed…
replyLabel.text = "Hi there!"
…so that the method in its entirety looks like this:
@IBAction func buttonPressed(_ sender: Any) {
replyLabel.text = "Hi there!"
}
Run the app. It should look like this:
Now press the Tap me button. You should see this:
As you can see, Hi there! got shortened to Hi t…. That’s what happens when a label doesn’t have enough space to accommodate the text it contains. There’s a simple fix…
Do the following:
You should now see the full Hi there! when you press the Tap me button:
After all, the app’s name is Tip Calculator. Don’t worry — in the coming installments in this series, that’s exactly what this app will become. I thought it would be a good idea to start with a simple exercise first, in order to get you comfortable with Xcode and creating simple apps.
In the next article in the series, we’ll look at getting input from the user with text fields.
Although this is an extremely simple project, I’ve made its files available for download — click here to get them!
Swift Algorithm Club — an open source project of the great iOS (and Android) tutorial site RayWenderlich.com to build implementations of useful algorithms and data structures in the Swift programming language — is looking for someone to help maintain it.
While they have two maintainers on the project (Kelvin Lau and Vincent Ngo), they could use some help, since it’s a popular GitHub project with almost 11,000 stars, over 800 watchers, and over 100 contributors. Hence their call.
The successful candidate will have the following responsibilities:
If you’d like to apply, you should email Kelvin Lau with your answers to these questions:

It takes great confidence to pose for a pic like this…
…the kind of confidence a co-maintainer needs!
I’m interested in the role, and emailed an application to Kelvin Lau. In the spirit of openness and collaboration, I’ve decided to share what I sent. Give it a look!
Hello, Kelvin!
I’m Joey deVilla, and I’d like to become a co-maintainer for Swift Algorithm Club!I’m a technology evangelist by day, and rock-and-roll accordion-playing mobile developer and bon vivant by night, as well as a long-time reader of RayWenderlich.com. I think I’d be well-suited for the role, and as proof, I have submitted my answers to the questions you posed in the article calling for co-maintainers.
I’ll admit it: a big part of my reason for wanting to be a co-maintainer on the Swift Algorithm Club is to be able to say “The first rule of Swift Algorithm Club is…to get ’em as close to O(1) as possible.”
But seriously, I’d like to be a co-maintainer of the Swift Algorithm Club for the following reasons:
The boring stuff: I have a degree in Computer Science from Queen’s University, which is one of Canada’s nicer schools. I learned algorithms and data structures from Dr. Robin Dawes (4.2 rating on RateMyProfessors), and we’ve stayed in touch. I know my depth-first searches from my breadth-firsts, I can pronounce Euler properly (it’s “oiler”), and I know where the word “trie” comes from (retrieval).
I once had to explain to some art students why they couldn’t represent all the possible states of their game using individual QuickTime cells. It was a “Virtual Bubble Wrap” game with 95 bubbles, which meant that it would take 2^95 cells to represent every possible state (for comparison’s sake, the estimated number of photons in the universe is a smaller number: 10^89).
The more interesting experience: I am “internet famous” for using P=NP to figure out that I was dating a con artist. The story is on my personal blog under the title What happened to me and the new girl (or: “The girl who cried Webmaster”), and ended up in print in an anthology titled Never Threaten to Eat Your Co-Workers: Best of Blogs.
I’ve been blogging since November 2001, with my personal blog, The Adventures of Accordion Guy in the 21st Century. I started my personal tech blog, Global Nerdy, in August 2006, and since then have written over 3,000 posts which have acquired over 8.6 million pageviews.
Here’s a small sampling of what I’ve written:
I should also mention that while working at Microsoft as the Windows Phone evangelist (the second-hard evangelism job in mobile), I had a short-lived children’s show, complete with puppet co-host. Here’s the first episode: How to create your own games with Kodu
I’ll admit that it’s not as fat as I would like, but here it is: https://github.com/
If you have any questions or need additional information about me and my qualifications, please feel free to contact me!
— Joey


Another of my goals for this year is to considerably raise my proficiency with a programming language I thought I’d never use again, despite its ubiquity: Java.
Until last year — and by “last year”, I mean 2016 — I hadn’t done anything with Java since I looked like this…

…and since the preferred Java IDE looked like this…

…and was distributed via something like this:

That all changed thanks to the Tampa iOS Meetup, a regular gathering for people interested in learning how to develop iOS apps:

Angela Don and I started Tampa iOS Meetup in October 2015, fresh off a successful “Intro to iOS Programming with Swift” presentation at BarCamp Tampa Bay. The BarCamp presentation in turn was the result of our meeting at Ybor Tech OpenHack, a monthly gathering of programmers for conversation over beer at New World Brewery, one of Tampa’s better beer pubs.

The moral of the paragraph above is one I’ve been touting for years: if you want opportunities, you’ve got to network. One of my goals this year is to turn up my outreach, not just in the Tampa Bay area where I live, and not just nation-wide, but globally.

At one of the meetups, one of the attendees asked me for help with an assignment for a Java course he was taking. I told him that I’d be happy to help, but warned him that it had been over a decade since I’d written anything in it. While C# (with which I have more recent experience) is similar to Java, it’s not the same thing. He was undeterred, and we arranged to meet at a coffee shop, where I could help him as he did the assignment.
Our meeting never happened. Between putting in a lot of overtime at work and tending to his family in the remaining time, he didn’t have any time to do the assignment and didn’t even have any idea of where to begin.
“I need it by tomorrow. Could you do it for me? Just tell me your hourly rate, and I’ll pay you,” he said.
“Look, let me see if I can even do it first,” I replied. “We can talk money later.”
“I’ll send you my assignment,” he said, “and it has to be done using JavaFX.”
“JavaFX it is,” I said, making a mental note to Google the term.

After spinning my wheels for what felt like an eternity trying to get a project using JavaFX (which turned out to be a GUI library) running using Eclipse (a.k.a. the worst IDE ever), I switched to NetBeans and had a simple “Hello World!” program operational in a few minutes.
With what remained of the evening, I now had to do the actual assignment: given a full filename that the user enters, read the contents of that file, and then display all the words in that file in an alphabetically-sorted list.
A couple of hours later — and some Googling for reference material on Java Lists, file operations, and JavaFX UI elements — I surprised myself with a working program:

After cleaning up the code and adding some Javadoc comments in order to make it academically complete, I emailed him the code (for the curious, it’s on GitHub). A couple of days later, he told me that he got full marks for the assignment. I was pleased with myself, and thought that this would be my last encounter with Java.

A couple of days later, he made a second call for help. I gave him a couple of pointers to put him in the right direction, but after a number of impassioned pleas, I ended up coding the whole thing. This time, it was a “states and capitals” quiz, complete with pop-up windows for right and wrong answers:

I used an Iterator to “step through” the set of states and capitals, which were stored in a Hashmap. I worried that using it might have been beyond the scope of the assignment, but it greatly simplified the code. My friend got full marks for the project, which you can find on GitHub.

Good things come in threes, and with two assignments that earned full marks, my friend asked for help with the final assignment: the clichéd-yet-mandatory “access a database and display some of its contents” assignment. Here’s the text of the assignment, which for some reason was set in Comic Sans, which I’m sure is not the official font of Serious Database Work:
Create a JavaFX GUI that allows the user to retrieve records from the customers table in the “pcparts” database. The GUI should allow the user to specify desired fields, desired order, and a where condition. Display only the desired fields in the desired order for the desired where condition. You may display the records in the GUI in any way you wish.
This time, there wasn’t even any pretense that I’d provide tips and he’d write the program. I just told him to check his inbox later that night.
Here’s what my implementation looked like:

Once again, you can see it on GitHub.
As with the other two assignments, it was an evening’s worth of work, most of the time spent Googling for information about JDBC and Java ObservableLists. With the completion and submission of this assignment — and the full marks he got for it — my friend successfully completed his Java course.
“And that,” I thought, “will likely be the last I’ll see of Java for a while.” I decided that the projects shouldn’t go to waste sitting on my hard drive and posted them to my GitHub account, which needed some fattening anyway.

A couple of months later, I got an email from a recruiter. Thanks to my online presence, I get these on a regular basis, but this one was intriguing:
Hi Joey,
I’m an IT Recruiter with [recruiting company], I came across your profile and was impressed with your skills and background so I wanted to reach out to you regarding an exciting opportunity!
Our client is looking to hire a Developer Evangelist to join their growing team based out of Baltimore, MD. They are looking for someone that is passionate about technology and can provide code samples, white papers, blog postings, and other educational content in order to demonstrate the power of our client’s platform. The role is 50% travel but in between trips to trade shows and conferences all of the work would be remote.
Unlike most of the recruiting emails I get, this one seemed worth replying to, and a day later, I had a phone interview. It went well enough for them to ask me for a resume, references, and — horror of horrors — take a timed online Java proficiency test.
“And this is where I’ll get taken out of the running,” I thought. There’s been at least one time when I’ve failed a test on a language that I was comfortable with and used regularly; how the hell was I going to pass test for Java, which I’d made a career of avoiding and with which I hadn’t worked with in 16 years, with the exception of those homework assignments?
I still went along with the process and took the test. I managed to answer a number of its questions, and a lot of that was thanks to the Java practice I got from doing my friend’s assignments. Despite that, I figured I’d get the “Sorry, you didn’t make the cut” email in a couple of days.
Instead, I got a call: “Congratulations! The platform architect and product manager would like to schedule an interview with you.”

All my interviews were conducted via Skype. The first and most crucial one was with Product Manager Jason Rusk (to whom I report) and Platform Architect Robert van Voorhees. During the interview, Robert asked if I had anything posted on GitHub, especially in Java. I pointed him to the assignments, and he gave them a quick once-over.
“Good clean code, easy to follow, nice notes,” he said, nodding approvingly.

On the 15th of September, I got an email that started like this:
Hi Joey,
Congratulations again on your offer from SMARTRAC. I have attached a copy of your contract for you to look over. They would like to offer you an hourly rate of $[ask me in person over a beer]/hr and a conversion salary of $[again, ask me in person over a beer].
Smartrac’s Smart Cosmos platform is largely written in Java. While I’m not likely to contribute code to it, I’ll most certainly help partners and customers integrate with it. Furthermore, many of these other people may be coding in Java, and I’ll need to provide code samples in their language. Hence this year’s push to go back to Java after studiously avoiding it for nearly two decades.
Luckily for me, Smartrac hooked me up with IntelliJ IDEA Ultimate, a Java IDE that’s light-years better than NetBeans (and thousands of light-years better than Eclipse)…

…and I’ve been making the most of my spare moments getting Java practice in the form of Android development. Even at the airport, when my flights are delayed by hours:

None of this would’ve come about had I not helped my friend with his homework, so I suppose another one of my 2017 plans should be to help people learn to code when I can. You never know how it’ll pay off!

Creative Commons photo of Z566M nixie tubes displaying 2, 0, 1, and 7 by “Hellbus”.

As of the start of 2017, I’ll have passed the traditional 90-day probationary period as Smartrac’s Technology Evangelist. So far, it’s been an enjoyable, exciting, and challenging whirlwind.

It helps that I’m working with some brilliant people with all sorts of experience, ranging from electrical/radio engineering to biophysics to good ol’ computer science, to having been in the Navy and Homeland Security, and who’ve contributed to some open source frameworks that you may have used if you do front end web development.
I am the dumbest guy in the room, and that’s all right with me.

One of my goals for this year is to make the most of my proximity to all these smart people, and all the knowledge, chances to learn, and access to opportunities that they provide, and in return, showcase their brainpower and works to audiences both technical and non-technical.
The experience has been made even better by the sweet gear that I’ve been assigned…

…as well as the travel opportunities I’ve been in my short span of time at the company, including Asheville, North Carolina, where Smartrac has both an office and an RFID tag and inlay manufacturing facility…

…three trips to the Baltimore office, where our core platform development team works (well, we’re actually in Columbia, just outside Baltimore)…

…a partner visit in London at the start of December, and an upcoming trip to New York…

…where I’ll be working our booth on the exhibit floor at the National Retail Federation’s Big Show 2017, a conference that will be in its 116th year:
Another goal for 2017 is to make the most of the opportunities presented before me, whether in the form of the material support that I get from the company, as well as the chances to travel all over the U.S. and the world to meet customers, developers, partners, prospects, and talk about Smartrac’s technology. In the rush and general busy-ness of working in a fast-paced business where the stakes are high, it’s all too easy to forget that with this line of work come some pretty rare opportunities.
At the heart of Smartrac’s offerings is the Smart Cosmos platform, a data virtualization technology for real-world objects and their interactions that is built around something that we call the TRIM metaphor.
Hey, we’re a tech company, so of course TRIM is an acronym:
| Things |
|
| Relationships |
|
| Interactions |
|
| Metadata |
|

If you combine Smart Cosmos with a technology to make real-world objects detectable by processing power — such as the RFID technology that was the original basis of Smartrac’s business — you’ve got the basis for a lot of applications, from manufacturing to retail to healthcare and more.
A technology like Smart Cosmos needs to be explained to a number of parties, from technical decision-makers and the developers who have to integrate Smart Cosmos with their organization’s systems and workflows, to non-technical decision-makers who need a layperson-friendly explanation of the technology they’re counting on to drive their business. That’s where I come in.

As far as Smartrac is concerned, my big goal for this new year is to spearhead the revision of our library so that both technical and non-technical people who want to find out more about our platform, from the broadest, high-level strokes to the finest details of its API and inner workings, can do so quickly, easily, and accurately. A lot of this will be the wholesale updating of the Smart Cosmos site, writing and editing the blog, case studies, white papers, documentation, and creating documents that aren’t limited to writing, but also audio (in the form of things like podcasts), audio-visual (in the form of videos) and even interactive tools. As far as I’m concerned, as long as what I produce helps our audience understand our platform, the sky’s the limit.
It’s going to be an exciting year!

Over the past little while, Apple has been telling iOS developers that by January 1, 2017, in order to be in the App Store, any app that made a connection to a server could do so only via a secure one — that is, only HTTPS and not HTTP connections would be allowed. They’ve just announced that “this deadline has been extended and we will provide another update when a new deadline is confirmed.”
Starting with iOS 9, apps allowed only HTTPS connections by default. However, many servers — including OpenWeatherMap’s, which powers a number of weather apps, including the one featured in my tutorial — don’t accept HTTPS connections. That’s why they still offer the option to let your app make connections over plain old HTTP by changing the default App Transport Security settings in the app’s info.plist file.
You could allow apps that you were developing to use plain HTTP connections by editing their info.plist files in its text form and adding this snippet…
<key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> </dict>
…or do it the graphical way:
While requiring that all connections be secure ones helps to keep network data secure and reduce the probability of unwanted access, a large number of web services are still not using secure connections. This is probably the reason for the deadline extension.
You have a reprieve, iOS developers, but the sooner your apps’ connections are secure, the better.