Pietro Rea

Pietro Rea
Written by Pietro Rea, a software engineer, engineering manager and author from the DC area.

After 8 years of Gatsby.js, I built my own static site generator

31 March, 2026

Finally, with the help of AI, I have moved my blog off of Gatsby.js and onto what I’ve long known should be its final state: a custom Typescript script that builds a static site from a headless WordPress instance (source code here). After only a couple of hours of work (and 50% of my paid Cursor allotment this month), I’ve done what I’ve long wanted to do for years and years: rip out Gatsby, and with it, my static blog’s inexplicable dependence on React and GraphQL. I also rewrote everything in Typescript (from JavaScript) and added over a hundred tests that run on every PR. Did I vibe code it? It’s hard to tell. I certainly didn’t read through every single test but I understand everything it’s doing because I was very opinionated and direct. The trickiest part was getting the build script to download each blog post’s embedded images…

2025 in review

01 January, 2026

This year was the first time that several co-workers and interviewees referenced my blog during conversation. A couple of folks even encouraged me to write more on it, which I intend to do in 2026. Below are some of the highlights from the year that just ended. 1/ I won’t publish a full reading list like in 2023, but I can say that in 2025 I devoted most of my reading time to Bible In A Year from Ascension Press, which I’m set to complete in about 20 days. I started BIAY in 2022 but had many stops and restarts. The only way I’ve managed to consistently work on it is by waking up early and doing it first thing in the morning. I spend about a third of my BIAY time doing the readings, a third on reading the commentary and a third on ChatGPT/Claude asking for clarifications. 2/…

Traveling from NOVA to NYC pt. 2

28 December, 2025

Part one has my 2023 recommendations. In 2025, I did more business travel than any other year, traveling to more locations and going to Meadow’s NYC office more times than in any previous year. I still agree with everything I wrote in 2023, so this update is mostly additive. The landscape in terms of options is roughly the same. I’m not aware of any new entrants in the DC <> NYC bus route but there were two exits. Jet, the upscale/luxury offering, is no more. Megabus filed for bankruptcy. All in all, Amtrak continues to be the best option to go between downtown DC and Manhattan. I wonder what would have to be true about a bus or shuttle for this not to be the case. I haven’t tried the next-gen Acela yet, but I will in a couple of weeks. My main 2025 update is this: on the Northeast…

Peru impressions

25 April, 2025

I only spent 6 days in Lima, but I can pass along a few impressions, mostly noting how things have changed in the last 11 years. The sol/dollar exchange rate has stayed relatively stable, now hovering around 3.7 soles per dollar. Talk of immigration is everywhere — with native-born Peruvians commenting on Venezuelan immigrants everywhere I went. The local cuisine now includes several items from our neighbors up north. Tequeños are now available in most restaurants in Miraflores. I also saw arepas in a few places. Lima feels just as dense and filled with cars as in 2014. Cars seem newer on the streets. Drivers seem to adhere to traffic norms more in 2025 than in 2014. Drivers are still mostly men. Chinese cars are common. Back in 2014, a high percentage of cars on the street were taxis. The number may be the same now, but it’s less easy…

Happy Thanksgiving!

29 November, 2024

This has been a very special year for my family and one that I’ve been deeply grateful for. It marks the culmination of a nearly decade-long journey that began in 2015. In 2015, Emily and I decided to leave the NYC metro area, where we’d lived for about four years, and return to northern Virginia to be closer to our families. At the time we were beginning to think about having kids (we now have two!) and I wanted to live closer to my dad, who had been living by himself since my mom passed away in 2008. I’d always dreamed about living in a multigenerational Encanto-like house filled with kids and grandparents. Finally, it happened this year! In the span of 6 months, we bought a new house with enough space for everyone, moved in, sold our first home, remodeled the basement and welcomed my dad into our household…

Take those Let’s Encrypt “Expiry Bot” notifications seriously

25 April, 2024

Last time I logged into my WordPress instance to update WordPress and its plugins, something went wrong and I ended up losing access to WordPress, which I promptly resolved in the AWS Lightsail console by re-launching a clone of the instance from a backup (go backups!). All was good until a few months later when I lost access again because the SSL cert had expired. I received a couple of warnings from Let’s Encrypt “Expiry Bot”, which I unfortunately assumed were for another host that I had wound down around the same time. As it turns out, when you relaunch an instance from backup, you’re copying the old certificate from the old host to the new host, so HTTPS works at first, but you still need to tell Let’s Encrypt’s certbot that you want to renew your SSL cert on the new host on a ongoing basis. This blog was…

The build/operate trade-off in engineering cultures

19 January, 2024

I’ll be the first to admit that the most fun part about being a software engineer is the act of writing code. I can’t think of any other trade where the feedback loop between trying something new (a few keystrokes) and seeing if it worked (yet another keystroke) is so fast. Each compile-run cycle is its own dopamine hit. And there’s nothing wrong with that! The joy that comes from the instant feedback of programming is what attracted my quick-to-wander mind to software engineering in the first place. The problem comes when you don’t reconcile the lightning-fast coding feedback loop with the much longer software lifecycle feedback loop. As you quickly learn, there’s so much more to do after you get something working on your computer. You also have to make sure your work builds and deploys in a remote machine and then and only then does the real work…

LLM explorations #1: Running LLaMA 2 locally using llama.cpp

14 January, 2024

This morning I got Meta’s LLaMA model running on my Apple Silicon (M2 Pro) MacBook Pro in under an hour using Simon Wilson’s llm CLI utility as well as its llama.cpp plugin. I spent most of that hour wrestling with my Python environment, so if you have that already set up, it would take you even less time. LLaMA and LLaMA 2 are unique because they were trained on publicly accessible data and the models are relatively small, so they can be distributed with a permissive non-commercial license and they can run on a less powerful GPU. llama.cpp made the models even easier to run since it removes the requirement to run them on a GPU. llama.cpp is an open source implementation of Meta’s LLaMa architecture written entirely in C/C++, which means it can run on any CPU that can run and compile C and C++, including your laptop’s CPU.…

2023 in review

07 January, 2024

Happy 2024! 2023 was filled to the brim for me. Second year at Meadow, in which we hired the rest of the first engineering team. We built and launched Meadow’s second product, Meadow Pay, and continued to support Meadow Price, our first product that’s now adopted by almost 50 universities. 2023 was also a logistically intensive year for our family, with our kids going to two different schools and continuing afternoon and weekend activities. Work travel to NYC also picked up. Meadow 2023 was the most productive year of my career. After raising our seed round in late 2022, in 2023 we finished hiring the first engineering team. Almost like clockwork, the perfect person showed up at the perfect time again and again, which I’m extremely thankful for. We started the year with 2 engineers and ended the year with 4. Company-wide, we grew from 7 to 11 Meadouins. In…

Books I read in 2023

30 December, 2023

In 2023, despite still only reading a modest amount, I almost tripled the number of books I read per year. The two things I did differently this year were participating in an alumni book club and using Goodreads to set a reading goal and track my reading. I quite enjoyed being part of the alumni book club, which introduced me to Latin American authors I’d never read or even heard of before. It also meant that I read more fiction than non-fiction, also a change for me this year. With the exception of Elvis and me, I learned that I’m not much of a memoir person. Blindness by Jose Saramago Good Omens by Terry Pratchett & Neil Gaiman Elvis and me by Priscilla Beaulieu Presley Demon Copperhead by Barbara Kingsolver Trust by Hernan Diaz El general en su laberinto by Gabriel Garcia Marquez When breath becomes air by Paul Kalanithi…

Milhouse icon deprecated

28 December, 2023

Between Christmas and New Years I normally update a couple of sites and servers that I maintain, including this personal blog. For this site, I update Gatsby.js and its dependencies (no major version this year), the WordPress instance that powers its headless CMS as well as its plugins. This year, during my yearly update cycle, I also decided to leave behind my Milhouse avatar, which was this site’s favicon for many years. “Milhouse” was a childhood nickname that I resurrected as a professional persona when I started working full time. I started to make this Simpsons character my profile picture in Slack, JIRA and other services. If you’ve ever worked with me you probably know that Milhouse = Pietro. But today I put Milhouse to rest, at least for a while, partially because I don’t wear glasses anymore, but mostly because in our remote working world I figured that having…

My Apple Watch life

04 December, 2023

For the past month, I’ve mostly used an LTE Apple Watch Series 9 as my main mobile computing device. My iPhone now lives in the basement full-time, plugged into a MagSafe charging puck. I still keep it turned on all the time but its primary function is now to be an APNS server for my watch. The Apple Watch Series 9 is the first Apple Watch that I believe can comfortably play this role. Two improvements have made this experiment successful for me: the new CPU and on-device Siri. This is the first Apple Watch to get the S9 SiP, which is based on the A16 chip from the iPhone 14 Pro. The previous three generations (Series 8, Series 7, Series 6) were all using the exact same CPU, which was based on the A13 chip from the iPhone 11. This is a big jump in CPU, which makes the…

The SSO tax

09 September, 2023

As a security-minded technologist, you probably use a password manager, create unique, appropriately-complex passwords and turn on MFA for all the apps you use internally, right? That’s great, but if you’re also responsible for security at your org, how can you get all your colleagues to do the same? You can roll out policies all day long, but there’s no practical way to enforce auth best practices without using an identity provider’s SSO. Once you start using SSO, you can bypass all your vendors’ default authentication systems (which are in no way standardized or offer all the features you need, like MFA) and instead use the SSO’s authentication system to protect all your service accounts uniformly. In practice, if you have 30 apps that your company uses regularly, instead of asking employees to choose a strong password and turn on MFA 30 times, now they just have to do it…

Traveling from NOVA to NYC

06 September, 2023

I’ve traveled up and down the northeast corridor for over 15 years — as a Princeton student, as a New York transplant visiting family, as a consultant, and finally for quarterly Meadow on-sites. These are some guidelines I’ve developed for myself about making this trip. First, take Amtrak if you can. Taking the train is the best way to go from northern VA to NYC. The Acela will get you from Union Station to Penn Station in a bit under three hours. The regular Amtrak train gets you there in 3 hours and a half. Taking the regular train is still more expensive than taking the bus, but booking far in advance (4-6 weeks) can lower the price significantly. My upcoming roundtrip on the Northeast Regional train was $90 (the bus is $80). Certain fares (Acela or business class) let you select your seat post-booking. Some of these seats have…

Regus Coworking

25 August, 2023

For four months this year (April-July), in addition to working from my home office, I also had a reserved dedicated desk at a Regus coworking space close to home. Regus is the “original” WeWork in the flexible office space industry. After I realized that I needed some temporary office space, I toured three different locations close to me, two from Regus and one from a local coworking company. I ended up picking Regus mainly because it had the best amenities and was the closest one to my house. I went with their “dedicated coworking desk” offering because I’m on calls most of the day and wanted to leave a monitor at the office. In this setup, you have a reserved desk in an office that you share with 1-2 other people. In practice, I had the office all by myself 90% of the time for about $300 per month. In…

Will SwiftData fix Core Data’s marketing problem?

21 July, 2023

SwiftData, Apple’s long-awaited new framework for data persistence, was finally announced last month at WWDC 2023. I say long-awaited because I’ve been waiting for a Swift-first version of Core Data for almost an entire decade, ever since Swift came out in 2014. From the very beginning, a deep rift emerged between Swift and Core Data. Core Data, by means of @dynamic in Objective-C and later @NSManaged in Swift, 100% relies on the dynamic nature of the Objective-C runtime for Core Data to work at all. This led to some serious awkwardness when Swift came along, like needing to mark almost everything in your Core Data model optional. This rift was so wide that I was sure we’d see a Core Data replacement soon after Swift came out. I didn’t expect it to take 9 years, but after seeing the Swift features that SwiftData relies on, the delay makes sense. If…

Notes on “The Manager’s Path” by Camille Fournier

19 May, 2023

I’ve read a few books on engineering management and The Manager’s Path is now one of my favorites. Even if you’re a software engineer and don’t think you’ll ever want to get into management, reading this book will put your colleagues, workplaces and careers into perspective, especially if you’re earlier in your career. This book, true to its title, describes in detail the path from individual contributor, to tech lead, to engineering manager and beyond. I imagine this book would be most helpful for an engineering manager at a startup, but the book does a good job at keeping its advice applicable to a wide range of office cultures and company sizes. The author herself draws from her own experience as an engineering leader at large financial institutions as well as a venture-backed startup, Rent the Runway in the 2010s. The book “diffs” the different levels of engineering management, laying…

Open source your old projects

22 April, 2023

Every time a business or project shuts down, all the source code it produced, typically private and proprietary, never sees the light of day again. This is a real shame, especially for organizations that poured millions into R&D to produce it. I’ve always believed that we should release as much source code to the public domain as possible. Complete reference implementations help new developers learn and troubleshoot. At the very least, we can point to something and say to ourselves “I worked on this!”. To this end, a few weeks ago I released the source code for the marketing website for sweetstackhq.com. I don’t own this domain anymore, but here’s a live version hosted on Netlify. Sweetstack is a restaurant-tech project that I worked on full-time from late 2021 through the first half of 2022. The idea behind Sweetstack is now a thing of the past, but I wanted to…

GitHub Copilot for Business

18 March, 2023

GitHub Copilot for Business came out on Valentine’s day of this year. My personal Copilot license was so game-changing that when the business version came out, I got licenses for all the other software engineers at Meadow.  The most reliable way to use Copilot is to let it handle well-structured, “repetitive scaffolding”, which is so common in modern programming. It’s also good at figuring out the right import paths in TypeScript, which reduces my need to context-switch. I’m more watchful when Copilot suggests business logic. But it’s also surprising (and somewhat spooky) how good these suggestions can be. One time, Copilot figured out the rules to calculate Pell Grants based on the number of credits a college student is currently taking. This information was nowhere else in our code base. Copilot, or something like Copilot, is the future of programming. If you haven’t tried it yet, I strongly encourage you to try it. Even though…

New writing setup: Gatsby.js and WordPress as a headless CMS

16 February, 2023

As I proposed in my Gatsby.js retro, I finally transitioned this blog from using Markdown files stored in git to using WordPress as a headless CMS (diff here). It’s still a statically-generated site and it still uses Gatsby.js. The only thing that changed is how the underlying data is stored and managed. My writing workflow now looks like this: I write on my self-hosted WordPress instance, saving drafts as needed. I used the web interface for this blog post but I can use any writing tool that WordPress supports. For example, I wrote the last post about Meadow’s seed funding announcement from bed on the WordPress iOS app. When I’m done writing a blog post, I click “Publish” on WordPress, which tells Netlify via webhook to kick off a new Gatsby build. The build process grabs all my WordPress content using a GraphQL WordPress plugin, and re-publishes my updated blog onto…

Meadow raises a $3.5M seed round

03 February, 2023

I’m very excited to announce that Meadow has raised a $3.5M seed round to build a modern student financial services platform for universities. Here’s our press release, and here’s the reporting from Business Insider (paywalled) that came out on Tuesday. I haven’t written about Meadow on here before, so allow me to formally introduce it. Meadow is an early-stage startup whose mission is to empower students financially and to promote economic mobility through higher education. In the U.S, what students end up paying for college is not the “sticker price”, but rather an amount discounted by grants, scholarships and other forms of aid. Figuring out what you actually need to pay to attend college is opaque and confusing, complicating planning and decision-making for students and their families. Many students don’t even try to engage with this system, assuming college is out of reach for them. So in 2008, Congress mandated…

4 years of blogging on Gatsby.js, a retro

07 January, 2023

It’s been over four years since I started building my blog on Gatsby.js. It’s common to read blog posts about moving your blog over to a new platform (here’s my post from 2018), but I find it much more valuable to read about how it went for those people after using the new platform for a while. Four years after moving to Gatsby.js, I’ve averaged between 3 and 4 blog posts a year. During this time, I’ve also had over 22k visitors, averaging to ~400 visitors per month. Not a large site or audience by any means, but I definitely wrote more and had more readers than before. “Can’t repeat the past?…Why of course you can!” – Jay Gatsby Trying to put myself in my 2018 shoes is difficult, but I remember moving to Gatsby with several goals in mind. Here’s what they were: Learn more about React and GraphQL,…

Taking notes with BBEdit 14, Working Copy and a self-hosted git repo

08 September, 2022

I take a lot of notes as I work during the day. I usually keep a running log of the work I’m doing for the day. It helps me think out loud and write proto-documentation for myself. It’s a great way to remember what I was up to before. Last October, as I quarantined in my son’s bedroom, I decided to reorganize all my notes and update my note-taking process. Previously, I used Ulysses for Mac to manage all my notes. I loved the design of the app and the syncing functionality, but I was starting to have performance issues. Opening Ulysses on my (then) new M1 Mac would sometimes take 5-10 seconds. It was even worse on my iOS device. I suspected there was something in my big pile of notes that Ulysses didn’t like. I contacted support but couldn’t get to the bottom of it. Enter BBEdit. BBEdit…

Reclaiming the lost art of Linux server administration

28 January, 2022

One of the skills I wish I’d learned earlier in my career is basic Linux server administration. Specifically in relation to hosting something on the web, either a web app or API that I wrote myself, or something from the thriving self-hosted community, such as WordPress. Managing servers is increasingly seen as the ‘older way’ of doing things, so it’s easy to become a software developer and never learn to set up a VPS, set up remote access, stand up a firewall, etc. Choosing to actively manage your infrastructure is part of a much larger discussion about the proper way to choose your tools. This discussion is extensive and it runs along many different dimensions. There’s the axis of new vs. old tech and also of build vs. buy. Finally, there’s the decision to use managed vs. unmanaged services. This last one is the topic of this blog post. At…

Filtering emails by the List-Unsubscribe header in Fastmail

22 October, 2021

I get too many emails. You get too many emails. Everyone gets too many emails. It’s such a reality of digital life that no one really talks much about it anymore. The onslaught is seemingly unstoppable. Every new online account is liable to become another source of unwanted email. Innocuous interactions like getting a “digital receipt” at the store or joining a “loyalty program” at a restaurant just means one thing: spam. Back when I mostly used Gmail, I used to manually create filters to weed out senders that didn’t respect my unsubscribe requests. Since I moved to Fastmail a couple of years ago, this became much simpler with the most underrated feature in the history of email: filtering by email header. Specifically, filtering by the List-Unsubscribe header. Note: As far as I know, Gmail does not support filtering by email headers. For the adventurous, you may be able to…

Announcing “iOS App Distribution & Best Practices”, First Edition

21 April, 2021

I’m excited to announce the release my new book, iOS App Distribution & Best Practices! You can read it online if you have a raywenderlich.comsubscription. If you like to read books on paper, you can buy the print version from Amazon in a few weeks. Why this book? One of the reasons why I’m so excited for this book is because I think it fills a real, persistent need that so many people have. Most resources for learning iOS focus on the tools and frameworks for making the app but say almost nothing about sharing your work with others, be it other members of your team, external testers, or the public at large. This state of affairs would be fine if app distribution were straightforward. Unfortunately, the opposite is true. App distribution is often one of the most complex and downright frustrating parts about shipping an iOS app. Developers can…

No more magic

04 April, 2021

Hurricane Sandy hit New York City three months into my first job as a software developer. At the time, I was working for the Huffington Post in Manhattan. HuffPost’s data centers were also in Manhattan and they got hit hard: “Datagram, the ISP whose Manhattan servers host BuzzFeed, Huffington Post, Gawker, and other sites, has lost power, an official there told us via text this evening.” “Basement flooded, fuel pump off line – we got people working on it now. 5 feet of water now,” the official wrote. HuffPost had backup servers, but unfortunately they were across the Hudson River in New Jersey. The whole system went down. The native apps I worked on didn’t work at all and huffingtonpost.com redirected to a Tumblr for a while. As I remember the story, HuffPost’s CTO John Pavley went to the flooded data center himself to help get things up and running…

Debugging how you think about code signing

13 December, 2020

I’ve spent the last 2 weeks researching and writing about code signing and provisioning for my upcoming book “iOS App Distribution & Best Practices”. During my research there were a number of things I found surprising. This post documents my personal gotchas in the hopes it helps someone. I also offer five specific tips on how you can fix any faulty thinking you might have about these two topics. You’ll find this post more helpful if you already have some understanding of code signing and provisioning. If you’re starting from scratch, check out the resources at the bottom of the post first. So why is it hard? Code signing and provisioning routinely trump even the most experienced developers on Apple’s platforms. There are a few reasons for this: the system behind them is complex and opaque. The frequency of issues is also low. You might run into issues at least…

Core Data by Tutorials 8th Edition

24 November, 2020

The eight edition of Core Data by Tutorials is out! This edition is compatible with Swift 5.3 and iOS 14. I can’t believe it’s been six years of book updates over six versions of iOS and five versions of Swift. Core Data continues to be a great choice for persisting and querying a complex object graph on Apple’s platforms. I’m very grateful for our outstanding book team: Matthew Morey, Aaron Douglas, Darren Ferguson and Richard Turton. https://www.raywenderlich.com/books/core-data-by-tutorials/v8.0

Coming Soon: “iOS App Distribution & Best Practices” Book

18 August, 2020

I’m happy to announce that I’m working on a new book with the raywenderlich.com team. I find it hard to believe that the last book I co-authored, Core Data by Tutorials, came out six years ago. I’ve felt the itch to work on a new book for a couple of years, specifically on the topic of app distribution, and I’m happy that it’s finally happening. The working title for the new book is iOS App Distribution & Best Practicesand it is going to cover everything you have to do after you’re done coding. Like Core Data (less so now than in 2014), the road to getting your app in your users’ hands is paved with gotchas and frustration. Anyone who has wrestled with code signing or who has had to deal with an App Store rejection knows this. The book will cover all the usual suspects like certificate management, code…

Deleting Derived Data with Automator

31 July, 2020

Anyone who spends any significant time in Xcode has to delete the Derived Data directory from time to time. When you have an odd indexing problem that doesn’t go away, like faulty auto-complete, deleting Derived Data usually solves it. This used to be much easier in Xcode 7 circa 2015, but ever since Xcode 8 there’s been no dedicated button to delete Derived Data. The workflow for doing this manually consists of going to Preferences > Locations in Xcode, then clicking into the Derived Data location and deleting the directory in Finder. That’s fine, but it takes 4-5 manual steps. There’s a much faster way of deleting Derived Data that I’ve been using for a couple of years now. And you get to use Automator! Start with a bash script The first thing you can do to make your life easier is to write a quick bash script to execute…

Saying Goodbye to Upside

12 July, 2020

My last day at Upside was a week a ago. I haven’t written much about my job since I joined so before I moved on I wanted to write down a few memories. I joined Upside in the summer of 2017, almost 3 years ago. At the time I had decided to wind down my consulting shop and start interviewing for a job. I wanted to find a growing company in DC that could leverage my mobile chops. After working from home for almost two years I was yearning to work in an office again. At the time, Upside did not have an opening for an iOS developer. I remember using all the “outbound” techniques I learned for Sweetpea Mobile to get my foot in the door. Read: I spammed most of the leadership team on LinkedIn until I got an interview. Soon after, I joined Upside’s mobile team as…

VS Code Insiders & Settings Sync

30 March, 2020

Like many developers, I often do my work on multiple machines. While I do not own a day phone and a night phone, I do have three Macs that I could get work on: an iMac that I share with the family, a personal laptop and a work laptop. This is usually not a problem when it comes to the actual source code. I can push to Github from one machine, pull from Github from another and resume. The problem that I’ve always struggled with is keeping my IDE settings in sync. I like tweak my key bindings, color themes and other settings to match my ideal workflow. So when I sit down at one of my computers and realize that I forgot to set up the Quick Open shortcut I use everywhere (Cmd + Shift + O), it feels like I put my shoe on the wrong foot. I’ve…

Try out NetNewsWire 5

24 March, 2020

I’m currently on paternity leave for our second child. At the same time, the world is going through an unprecedented global pandemic, which requires everyone to practice social distancing. That means lots of time at home. Between bursts of child care I sometimes have some downtime to update this blog. After making some tweaks to the plugin that generates this blog’s RSS feed, I wanted to test out my changes using an RSS reader. I’ve been using Reederon iOS for years, but nothing on the Mac. It didn’t take me long to find NetNewsWire, an RSS reader worthy of an Apple Design Award. The app is open source so I went ahead and cloned the GitHub repo and built it with Xcode. I experienced some code signing issues (the year is 2020, right?) getting it to build with my free Apple Developer account, so I hopped onto their Slack and…

My favorite bug of 2018

10 December, 2018

The last days of 2018 are upon us! It’s a time for introspection, new resolutions and DateFormatter bugs. Someone reported a curious bug in an iOS date picker that I help maintain. When selecting one of the last days of 2018, the date picker would incorrectly think the date was in 2019. For example, picking 12/31/2018 would come back as 12/31/2019. It turned out this was not a bug with the date picker, but rather how I wrote a particular date format. To illustrate my favorite bug of 2018, let’s start by creating a Date for the last day of 2018: let calendar = Calendar.current let lastDayOf2018Components = DateComponents(calendar: calendar, year: 2018, month: 12, day: 31) let lastDayOf2018 = calendar.date(from: lastDayOf2018Components) Let’s say you want to display the date as “Dec 31, 2018” so you code up a reasonable looking DateFormatter: let dateFormatter = DateFormatter() dateFormatter.dateFormat = "MMM d, YYYY"…

New Blogging Platform: Gatsby.js

31 May, 2018

You know you’re a developer when you’ve spent more time moving your blog from platform to platform instead of actually writing blog posts. Until recently, this blog was hosted on Squarespace, which I still recommend to anyone who wants to host a website with minimum hassle. In my case, I wanted to learn more about statically generated sites so I decided to leave Squarespace’s high-touch walled garden for something that I could implement myself. If you’re interested in static site generators, the first thing you realize is that there are lots and lots of frameworks to choose from. There’s a site called StaticGen that lists all the popular static site generators and lets you filter them by programming language, template tool (e.g. Handlebars, Jade , etc) and popularity on GitHub. In my particular case, I wanted to do something in JavaScript, so it came down to using either Next.js or…

99 [r]eddits v2.8.3 is now available

28 November, 2017

For the past month, I’ve been working on an updated version of 99 redditsfor iOS with Aman. 99 reddits is a lightweight Reddit client that lets you quickly explore images and (some) animated GIFs from any subreddit. 99 reddits was first launched back in 2012. Up to this point Aman had been updating the app 1-2 times per year with folks from Elance / oDesk and funding development with an In-App Purchase. Looking for a side project with real users and inspired by Artsy’s Open by Default, I shot him a PR one day. Compared to other times I’ve worked on side projects, this release has been a real success. There are two things that made a big difference this time: Trusted team > lonely developer. Aman and I have worked together for over 4 years at different companies and on different projects. I’ve learned a ton about product management…

Radar: UIToolBar pinned to bottom of the safe area broken on iPhone X

18 November, 2017

Update 2017-12-04: “Engineering has determined that your bug report (35633289) is a duplicate of 34404165 and will be closed.” For the 99 reddits app, I updated the UI to respect the “safe area” in iOS 11. One of the view controllers made use of a UIToolBar, which doesn’t look right on iOS 11 when I attach the bottom of the toolbar to the bottom of the safe area (see attached screenshot). Filed as rdar://35633289 and on Open Radar. Summary: On an iPhone X, when you add a standalone UIToolBar to a view controller and add a constraint from the bottom of the UIToolBar to the bottom of the its view controller’s safe area, the bar button items appear outside the UIToolBar. It works perfectly on an iPhone 8. Steps to Reproduce: In a storyboard file, add a UIToolbar to the initial view controller. Add three constraints: trailing to the safe…

Core Data by Tutorials (Fourth Edition) Now Available

12 October, 2017

I’m happy to announce that there’s a new edition of Core Data by Tutorialsavailable today, fully updated for iOS 11, Swift 4 and Xcode 9. How time flies! I still remember working on the original version of the book back in 2013 and it doesn’t seem that long ago. That’s the same year Apple announced Swift 1.0 at WWDC. It was a busy time getting up to speed on this new language and rewriting our Objective-C drafts. Even among experienced iOS developers, Core Data is infamous for its learning curve and sharp edges. With newer options for persistence such as Realm and Firebase, I see a lot of iOS developers skip right past Core Data, ignoring the framework that ships with the SDK. The truth is that Core Data offers a robust, free, solution that integrates nicely with all the native frameworks and tools you already use every day. No…

“No Man Is an Island” or “Building Complex Systems at Sweetpea”

19 August, 2016

One of the first things I noticed after striking out on my own is how much my old employer did on my behalf. I’m not talking about the obvious things like pay and benefits. Instead, I’m talking about the (sometimes invisible) support structure in mid-size to large companies. Doing Everything A job title usually comes with a well-defined area of responsibility. Software engineers focus on software engineering. Lawyers focus on legal matters. Accountants focus on accounting. As tired and overworked as you may have felt at your old job, you never had to do everything. When you strike out on your own, the default state of the world is that you have to do everything. If you don’t follow up on an invoice, you won’t get paid. The internet is down? Can’t yell at IT to fix it anymore. You have to get on your hands and knees and rewire…

Starting a New Journey

25 July, 2016

Two months ago I left my full time software engineering job at Quidsi/Amazon to move to Washington D.C. This move was primarily a personal decision to be closer to family. At the same time, I also wanted the opportunity to focus full-time on software development consulting. I even incorporated a company to do it! It’s called Sweetpea Mobile. What does this mean? Instead of having one employer and one project to work on, I have several clients and different things to work on. It’s called Sweetpea Mobile because of its focus on mobile platforms such as iOS and Android. Sweetpea’s Opportunity Over the past five years, I’ve worked on a few mobile-focused software development teams, and I’ve been lucky (some may say unlucky) to work through different pain points and challenges along the way. Some were unique to whatever employer I was working for at the time, but others were…

Tools of the Trade for iOS Development

08 November, 2015

During the past few years of doing mobile development I’ve found a number of tools that have saved me time and frustration. This is by no means a comprehensive list of all the tools out there, but rather the small set that I’ve found helpful. They are also not all limited to iOS development. Some will be helpful on other mobile platforms or for general software development. These posts usually group apps into different categories but I’m going to list them in (roughly) the order that I started using them. Xcode Duh, right? Like many before, my journey into iOS began when I downloaded Xcode for the first time. These days I like to code using Xcode’s built-in Midnight theme. I also have Alcatraz set up on my machine to manage my Xcode plugins. My favorite plugins are BBUDebuggerTuckAway, DerivedData Exterminator and SCXcodeSwitchExpander. SourceTree SourceTree is my favorite git client…

Core Data by Tutorials updated for Xcode 6.1

31 October, 2014

We’ve updated Core Data by Tutorials for Xcode 6.1. The update includes a number of small Swift changes and some fixes for errata that readers pointed out. Here’s the official announcement. If you played with Swift while it was still in beta, you probably realized that your projects would stop compiling going from one Xcode beta to the next. Even though Swift is technically not in beta anymore, moving from Xcode 6.0 to Xcode 6.1 was no different. We’re still in the (very) early days of Swift.

Core Data by Tutorials Now Available

16 October, 2014

Good news — Core Data by Tutorials launched yesterday in PDF format. The book is written in Swift and it covers everything from the fundamentals up to the new iOS 8 APIs. The whole process was a great team effort and I’m very happy that it’s finally out in the world. Personally I prefer following a tutorial step by step rather than listening to a lecture or reading a book. I’ve always been a fan of learning by doing, especially if I’m starting from scratch. Here’s a link to the announcement on Ray’s site. Also here’s a sneak preview of chapter 1 in blog post form. I hope you guys enjoy the book.

WWDC 2014: A Strategy of Great Work

25 July, 2014

I just finished watching a WWDC talk titled A Strategy of Great Work. It’s a beautiful talk by Ken Kocienda, a software engineer who’s worked at Apple for more than a decade.. He goes through 8 stories and 11 lessons that he learned during his tenure at Apple. The last lesson is “you are never done”. He ends with this quote from Steve Jobs: “If you do something and it turns out pretty good, then you should go do something else wonderful, not dwell on it too long. Just figure out what’s next.” You accomplished something. Great. What’s next? How are you going to top yourself next time? It reminds me of Elizabeth Gilbert’s TED talk about her drive to keep creating. Two different fields, same idea.