Toggle Dark

Pedro Piñera

Toggle Dark
Software Engineer at Shopify 🛍. I like building tools for developers and doing open source.
Mostly doing Ruby & Swift, and sometimes Javascript
Journal 📝
October 13th 2019

One of the most bitter moments when I got very into the iOS community was realizing that very admired community members completely refused to debate opinions other than theirs. Some even tried to hurt me when they perceived my opinions as a risk for the idolatry they had been working for years.

I decided to distance myself from such a toxic environment and now in hindsight I think it was a great decision. Now I can see all of it from outside.

October 13th 2019

It feels so great being in control of the content that I produce and decide on how I'd like it to be presented on my website. I'm considering adding a gallery section akin to Instagram to share photos taken from my phone.

But before that, I'd like to build an app to write and share posts. Right now I'm writing this from an iOS Git client and the process is not very straightforward.

indie web
October 13th 2019

What does working on paid product would mean for Tuist, a project some companies depend on and that I've been maintaining for the last 3 years? I'd still maintain it, but it will no longer be my main priority. I'll develop features that support my work and enable other developers to contribute to Tuist to support their projects too.

Tuist will be to my projects what Ruby on Rails is to Basecamp.

open sourcesustainabilityside projects
October 13th 2019

Most of my career I've invested a lot of time into open source, which is great from the altruistic point of view, but this morning I was pondering if it'd make sense to invest all that time into building useful products that I can sell to developers. At the end of the day, it's money what we need for living. Open source has many positive things, but it also has frustrations and challenges that are tough to go through when it's your free time what you need for it.

side projects
October 9th 2019

TIL from Vytis, release engineer at Zalando, that XCTest creates an instance of XCTestCase per method, and for that reason if the instance variables of the class are not set to nil in the teardown method they remain in memory until the execution of the tests suite finishes.

October 9th 2019

I really miss having an iOS app to post entries in the website journal. Every time I do it, I have to create a folder in the repository with the unix timestamp as the name, a post.mdx file, add the content to it, and then commit and push the changes.

Although not very inconvenient, I'd like to be able to do it on the go. Pick up my phone, open an app, write what I want to share, and hit share. I did some groundwork to start building the app but I couldn't find time lately to work on it.

September 28th 2019

I really like the process of defining abstractions to make things easier for developers. Devising, and implementing such abstraction for iOS developers is what led me to build Tuist. Developers keep comparing Tuist with XcodeGen saying that Tuist is a limited version of XcodeGen.

It shares with XcodeGen the project generation, but those limitations are thoughtfully designed to make iOS developers life easier. Instead of translating concepts from XcodeProj domain to a YAML domain, Tuist takes the opportunity to simplify most intricacies, leaving the user with a beautiful declarative API that defaults to some pre-defined conventions.

I'm looking forward to keep pushing the abstraction idea beyond project generation, and a bit sad that I can't put more time into it. If I just got Shopify to use it.

September 28th 2019

A few years ago, I called myself iOS developer. I felt very comfortable with the platform and did not see myself developing for a platform other than iOS, or a programming language other than Swift. Things changed, and nowadays I find myself doing frontend development, developing command line tools, and implementing a web API with Rails. Not only that, I also like designing the user interface of the software that I develop. I learned that software is more than just writing some code, putting it on a GitHub repository, and creating some hype around it. In order for users to love our craft, the software needs an identity and tell a story. That's why I worked on designing an implementing a website for Tuist; a website where we could share those stories with users. We also worked on writing up documentation that helped users understand the motivations behind the tool, and how to contribute to it if they are interested in doing so.

September 26th 2019

Adding dark mode to a website is the most bike-shedding activity but damm it! I like like doing it a lot.

September 26th 2019

After a handful of hours debugging a FOUC content on this Gatsby website, and even opening an issue on the theme-ui repository, I found out what was the problem. I was using a <body> tag inside another <body> tag. That caused the browser to apply styles after having already loaded most of the content.

September 25th 2019

The advantage of owning your content, is that you can decide its format. I just added support for inlining code snippets:

let message = "Hello world"
September 23rd 2019

Last Saturday, we celebrated what I can consider one of the happiest days in my life, my wedding with María José. Being surrounded with family and friends from Spain and Berlin, all of us celebrating love together is something that I can't describe with words. I wanted to talk to everyone, telling them how happy I was to celebrate such important moment with them. María José was so beautiful. She made me feel very nervous when I saw her coming with her father.

September 20th 2019

If there's one craft that I'd like to get better at, that's desining and implementing beautiful web interfaces. I look at interfaces like GitHub, NextJS, or Stripe and I wonder what's needed to be there. I think all it takes is observations and imitation.

September 20th 2019

I'm working on the generation and distribution of a design system's icons to iOS and Android apps. This not-so-difficult task showed me a core difference between the Android and iOS build systems:

  • iOS: The inputs of its build process are static: x sources and y resources will be used and they need to be part of the target. As a consquence, I got a lot of pushback from iOS developers that disagreed with having all the icons as part of their project target. Why am I having all those icons if I'm not using then?

  • Android: Conversely, Gradle is more dynamic and supports manipulating the build elements along the process. That makes it possible to shrink unused resources by just setting a flag to true. There was no pushback in this platform because developers trust the build system on doing its job.

And all of that made me think about Tuist, which brings some dynamism to the iOS ecosystem by generating the project dynamically.

September 20th 2019

After a long time hearing about Cloudflare, I enabled it on my webiste to be able to serve web assets faster with their CDN network and caching.

I have to say the configuration process was very straightforward, and that I was fascinated by all the services that they provide with the basic idea of a web proxy.

September 19th 2019

I couldn't have imagined how stressful organizing a wedding will be. Mine is in 3 days and it seems there's always something to be organized. Hopefully everything will turn great and we'll have a wonderful day surrounded with family and friends.

September 18th 2019

One of the things that I'm struggling to become better at is not letting things around me make me feel outraged or angry. Why? Because anger and outrage are not worth my energy. Here are some recent examples:

  • Wedding organization turning into a complete chaos a week before because our wedding planner hasn't organized the work well since we started working with her a few months ago.
  • Comments on PRs that question everything but without proposing anything at all. Just inthe mood of that's bad, that other line too, what about this? How do you dare to do that?
September 17th 2019

Today I just read this blog post about Internet relying on the work that many people do in the open for free. Two thoughts pop in my mind:

  • Wow. 20 years maintaining such a successful and robust project is remarkable. Nowadays, developers are seeking new projects frequently to keep feeding their need of recognition. I fall a bit in the latter group, but with Tuist I'm learning to put passion upfront and forget about the rest.
  • It's really bad that most companies don't give back for the value that they receive from the tools that they use for free. cURL is an example, but certainly not the only one. It's great to see GitHub helping with sponsors, but we need to raise more awareness agains this unbalanced open source economy.
September 16th 2019

I started XcodeProj as a building block for Tuist and around 3 years later the library continues to evolve and serve as an API to Xcode projects in many different open source projects. I'm so glad of having put that seed and help all those projects and companies using it.

September 15th 2019

There are reasons to blame Javascript for, but it upsets me a bit when I people affirm that websites are slow because of Javascript. IMHO the problem here is not Javascript, but how it's used. If we bloat websites with heavy frameworks, or a tracking logic all over the place, it'll obviously be slow. It's ultimately how developers use the language and the framework to create experiences.

September 15th 2019

The last days I've been working on Angle, a macOS app that I'm developing with friends that eases and speeds up the process of trying out changes introduced to an iOS app. It's as easy as clicking a link, and the tool will make sure that the environment is ready to open it, and then launch it in a matter of seconds.

We are working on some final polishing to make sure the app works smoothly without bugs that impoverish the user experience. Can't wait to share more about it!

September 13th 2019

TIL is not a good practice to format the output of a process when the terminal is not interactive or the user hasn't indicated so. For instance, Swift's Process class is not seeing as interactive by the underlying command.

September 13th 2019

Pondering the idea of kicking off a second milestone in the evolution of Tuist, providing a standard CLI for Xcode projects. I'm considering introducing a new manifest file type, Tasks.swift, where developers can define what's runnable, buildable, testable, and releasable.

September 13th 2019

I just came across three interesting Swift libraries that I might use at some point. The downside of the Swift Package Manager being decentralized is that is hard to find hidden gems through Github's gems:

  • Bouncer: A command line argument parser.
  • Work: Execute shell command and get output. Simple and robust.
  • Motor: Swift cli spinner. Simple and fully customizable.
open sourcediscovery
September 13th 2019

Seeking developers' convenience in the Javascript industry led to, in some cases, Javascript-bloated websites that provide a user experience significantly degraded if you don't access the website with a high-end device. We are seeing a similar aim for developers' convenience in Apple frameworks like SwiftUI that are only available in the latest version of iOS. Will developers follow the excitement of using the latest of the latest and therefore release apps that are not inclusive with the people that don't want to keep up with the shiniest Apple's devices?

September 12th 2019

I added a micro blog section to my website using this Gatsby theme that I developed for Tuist. Why am I doing this when I could be publishing those posts on Twitter? I'll continue posting on Twitter, but I want to own the content that I share on the Internet. Twitter, like Facebook or Medium, might have a turn in their platform and put the content behind a wall.

open sourcejavascriptgatsbyreact
September 12th 2019

Hello world!

open source