Bruno Rocha

on Software Engineering & Electronics

Bruno Rocha

Hi, I'm Bruno! I'm a software engineer who likes to break things apart. Here you can find a compilation of my blog posts and other projects/contributions to the tech community.

This page only contains articles I've written on general software engineering & tech. If you're looking for my articles on iOS development, check out my other website SwiftRocks.

Focus on concepts, not approaches

As long as there has been software concepts, there has been evangelism around them. More common for widely-known concepts like Clean Code and TDD, evangelists are developers who preach for the adoption of a specific pattern or platform, often with the intention of it being seen and used as some global solution that can be applied in all circumstances.

Is that a good way of acquiring knowledge? Let's evaluate its implications.

How To Solve Any Crash

Closed: Cannot Reproduce

Ever had a crash in which you had absolutely no idea what was going on, and no amount of testing allowed you to reproduce the issue? If so, you've come to the right place!

Well, sort of. As you'll see in this article, the ability to debug complex crashes is not something immediate. Keep this out of your expectations: there's no magical instrument that you forgot to run that will give you the output you're expecting. When it comes to complex crashes, what we need to do instead is prepare our environment so that these issues are better understood when they arrive, making them more actionable. Let's see how to do that!

Reverse engineering a 5 year old Xcode issue

Xcode has a feature called Organizer that shows you important information about builds you sent to the App Store, with the most relevant ones being crashes and energy reports (for CPU/memory usage). In my experience, this feature will work perfectly fine if you pushed the build from your own machine, but if that's not true for any reason (the most common being because you're using a CI pipeline to do) then you might have a frustrating experience.

Have you ever had issues with Xcode not symbolicating crashes? Me too, and I found the fix by reverse engineering the IDE.

How necessary are the programming fundamentals?

I've been meaning to write an article about computer science fundamentals and how it can improve a programmer's career for a long time, but I always had trouble finding a good way of introducing this topic.

In this article, we'll introduce the field of algorithms and data structures, show how this knowledge is applied in practice using an analogy, and finally use all of that to clarify why large companies like Google and Apple are so focused on it. I hope that this will give you the tools to make your own conclusions about this topic, allowing you to not only understand why they do what they do but also to help you determine if this is something you should be studying to achieve your goals.

Building a Face Detecting Robot with URLSessionWebSocketTask, CoreML, SwiftUI and an Arduino

iOS 13 marks the release of long-waited features like Dark Mode, but it also brought some needed changes on less popular aspects. Prior to iOS 13, creating socket connections required coding very low-level network interactions which made libraries like Starscream and the go-to solution for sockets in iOS. Now with iOS 13, a new native URLSessionWebSocketTask class is available to finally make creating and managing socket connections easier for developers.

Some time ago I created a little side project that involved an Arduino-powered servo motor that menacingly pointed at people's faces with the help of CoreML, mimicking the Team Fortress 2 Engineer's Sentry Gun. With iOS 13, I decided to re-write that using the new Socket APIs and SwiftUI.

Timsort and Introsort: Swift's Sorting Algorithms

Have you ever asked yourself which algorithm is used by Swift's sorting method? There are many sorting algorithms out there, and chances are that you'll rarely have to use something other than the language's builtin sort() method. However, knowing the properties of the sorting algorithm built into your language is important if you want to prevent unwanted behaviors and nasty edge cases.

iOS Security: Reverse Engineering Messenger's Chat Bubbles

In this article, I show how simple is the process of reverse-engineering an App Store's app by using dumped class information and a debugger hooked to a jailbroken device to make Facebook's Messenger allow me to select custom chat bubble colors.

Enjoyed this? Subscribe to be notified of new posts.