My Book

-
Recent Posts
Archives
- January 2019
- May 2017
- April 2017
- January 2017
- November 2016
- October 2016
- July 2016
- June 2016
- May 2016
- April 2016
- February 2016
- December 2015
- November 2015
- April 2015
- March 2015
- November 2014
- September 2014
- July 2014
- June 2014
- January 2014
- November 2013
- October 2013
- September 2013
- June 2013
- March 2013
- January 2013
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- November 2011
- October 2011
- July 2011
- May 2011
- April 2011
- January 2011
- November 2010
- October 2010
- September 2010
Categories
- Android
- Auto Layout
- Books
- CocoaTouch
- Debugging
- Genetic Algorithms
- Interface Builder
- iOS 6
- iOS Programming for .NET Developers
- iOS7
- iOS8
- Jobs
- MacBook Pro
- MonoTouch
- Networking
- Objective-C
- Streaming Media
- Sustainable Coding
- Swift
- Thoughts
- Tic-tac-toe
- Tips and Tricks
- Two Letters
- UICollectionView
- UITableView
- Uncategorized
- User Experience
- XCode 3
- Xcode 4
Meta
Author Archives: Josh Smith
Creating Tic-tac-toe in Swift
Normally I blog about a program I’ve already written. I decided this time to take a different approach, and blog about a Tic-tac-toe program that I’m writing instead. This will give people who are interested in watching a Swift program evolve over … Continue reading
Compressing a Swift array
Suppose you have an array of values in your Swift app and you need to compress it to a smaller size, with the intention of making it occupy less memory. If the array contains many consecutive repeated values it could be … Continue reading
I’m back
This blog’s half year of inactivity is over. I had joined Apple as a software engineer, to work on a low-level communications component that runs on all iOS and OS X devices. As an Apple employee I was prohibited from blogging, hence … Continue reading
Posted in Uncategorized
6 Comments
Creating ASCII art in functional Swift
This article explores an iOS app, written in a functional Swift style, that converts an image to ASCII art. For example, when given the famous Lenna photograph… …it creates a string that, when printed, looks something like this… Zooming into … Continue reading
Zipping two lists in Haskell
Studying a pure functional programming, such as Haskell, can be an eye-opening experience. The standard library in Haskell provides a zip function, which combines the elements of two lists into a single list of tuples. I decided to implement my own version, named zip … Continue reading
Posted in Uncategorized
Tagged Functional Programming, Haskell
Comments Off on Zipping two lists in Haskell
Caesar cipher in Swift
I posted a Swift project to GitHub that implements the Caesar cipher, which was the encryption technique used to protect Julius Caesar’s personal correspondence. It’s a straightforward algorithm that maps each letter in the alphabet to another letter. The code also … Continue reading
Functional parallel programming in Elixir
This article reviews a program that implements a parallelized algorithm, using a functional programming style made possible by a fantastic new language named Elixir. Along the way I very briefly introduce Elixir, review the relevance of functional programming in modern … Continue reading
Posted in Uncategorized
Comments Off on Functional parallel programming in Elixir
Getting into functional programming with Swift
This article examines two implementations of a logic puzzle written in Swift. The first example uses an imperative programming style, which is the style familiar to most iOS developers. Then we see the same small program written in a functional style, which is … Continue reading
Maximizing the Preview Assistant Editor in Xcode 6
While working through a coding tutorial in the excellent iOS 8 by Tutorials book by the Ray Wenderlich crew, I learned about the new Preview Assistant Editor in Xcode 6. This is a feature that you can enable in an assistant editor while editing a view file … Continue reading
A Swift App that Calls JSON Web Services
In this article I introduce a small iOS 8 app written in Swift, named SwiftPlaces. I wrote the app in order to get more experience with the language and try out some new features in iOS 8, such as Adaptive Layout. … Continue reading
Posted in iOS8, Swift
8 Comments