Pedro Piñera

Home 🏚
Journal 📝
About 👨‍💻
Speaking 🎤
Open Source 🐙
Lens 🔍
Wiki 📝
Books 📚

Journal

Social networks come and go, and I really like posting social media. In this section, I’m trying to mirror the stuff I post to social networks.

You can subscribe to my journal RSS feed.

7 November 2019

Tagged with: macos, ci

This is a note to self because I've been searching for the commands below so many times in the last months. They serve to know how much disk space is available in a macOS environment, and how much disk space each folder takes:

  • df -h: Disk space available and used.
  • du -sh ~: Disk space taken by a folder.

6 November 2019

Tagged with: tuist, xcodeproj, open source

I have just published a new version of XcodeProj, 7.3.0 that removes the Swift Package Manager as a dependency, making it possible to consume the package, and extends a utility class that generates base build settings to support app extensions.

5 November 2019

Tagged with: tuist, watch

Support for Watch apps is coming along to Tuist. Kas did a great job at extending the convenience of Tuist's DSL to the definition of watch apps too. He even implemented a check to ensure that the bundle identifier of the companion extension follows the right convention {watchapp_bundle_id}.watchextension.

5 November 2019

Tagged with: mobile, scale, projects

One of the terms that I'm trying to avoid lately is scale. I think is a vague term that leaves you wondering what it means. It's like saying that something is good or bad. Good in the eyes of who? Or bad in regards to what criteria? I'd rather talk in terms of problems and how to tackle them. In the context of software development, we can talk in terms of maintenance costs, interdependency between in code and between team, the testability or extensibility of the code. Those are more concrete examples that give the people that we talk to or the audience of our talks a better sense of what we are talking about.

29 October 2019

Tagged with: mojave, macos

For those of you who ran into an issue with expired certificates in macOS and can't find installers of older macOS versions, this tool is just gold. It saved me some time wandering around the internet to find the link.e

27 October 2019

Tagged with: web, a11y

I can say I'm new to web development. Over the last months I've been playing a lot with frameworks, tools and programming languages that are mostly used in web development. This website for instance is developed with Gatsby & React.

I decided to spend some time this morning to revisit the accesibility of the website and make sure that all the content that I make available is accessible by anyone. Firefox has great tooling built-in to assess the accessibility of your website. Let's see what I find out and the areas of improvements.

27 October 2019

Tagged with: social networks

My relationship with the social networks is a love & hate relationship. I'm again pondering the idea of giving up social networks. The reasons? Well... the same as always. I keep falling into the trap of seeking recognition and approval by the community and the people that follow my work. What's wrong with that? That instead of doing things for the sake of being motivated, I do it to prove things or show off things to people, and I don't like having that attitude.

26 October 2019

Tagged with: swift, package, docker

Just as a note to self, the following one-line Docker command is very useful to build/test Swift packages in a Docker container:

docker run --rm \
--volume "$(pwd):/package" \
--workdir "/package" \
swift:5.1 \
/bin/bash -c \
"swift package fetch && swift test --build-path ./.build/linux"

25 October 2019

Tagged with: tuist

I'm incredibly excited to start building Galaxy, a web app for Tuist projects that provides teams with insights that help them make informed decisions about the project structure. Just recently Apple announce a framework to collect metrics from your apps, which is great to optimize things in your apps, but what about projects? Teams don't know how many warnings their builds are throwing, the number of modules, the size of them... What if a developer introduced a regression in build times, who is going to catch that on a PR unless there's a third-party element that keeps track of that information, compares, and alerts you if something is very bad.

13 October 2019

Tagged with: ios, community

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.

13 October 2019

Tagged with: indie web

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.

13 October 2019

Tagged with: open source, sustainability, side projects

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.

13 October 2019

Tagged with: side projects

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.

9 October 2019

Tagged with: swift

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.

9 October 2019

Tagged with: opensource

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.

28 September 2019

Tagged with: tuist, abstractions

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.

28 September 2019

Tagged with: tuist, fullstack

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.

26 September 2019

Tagged with: gatsby, react, javascript

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

26 September 2019

Tagged with: gatsby, javascript, react

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.

25 September 2019

Tagged with: opensource, coding

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"

23 September 2019

Tagged with: life

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.

20 September 2019

Tagged with: design, web

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.

20 September 2019

Tagged with: xcode, ios, android

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.

20 September 2019

Tagged with: indieweb, frontend

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.

19 September 2019

Tagged with: wedding, life

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.

18 September 2019

Tagged with: life

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?

17 September 2019

Tagged with: reading, opensource

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.

16 September 2019

Tagged with: xcodeproj, tuist

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.

15 September 2019

Tagged with: reflection, javascript

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.

15 September 2019

Tagged with: angle, sideproject

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!

13 September 2019

Tagged with: tuist

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.

13 September 2019

Tagged with: tuist

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.

13 September 2019

Tagged with: open source, discovery

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.

13 September 2019

Tagged with: reflection, inclusivity

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?

12 September 2019

Tagged with: open source, javascript, gatsby, react

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.

12 September 2019

Tagged with: open source

Hello world!