Self-referencing many-to-many relationships using Gorm in Go(lang)

Recently I had to do this, and couldn’t figure out how to do it (maybe I need to start reading documentation more closely). But I found the way to do it:

type User struct {
	Id       int64
	Contacts []User	`gorm:"foreignkey:user_id;associationforeignkey:contact_id;many2many:user_contacts;"`
}

Re: React Native

I’ve been reading a lot about React Native.

From the latest piece I read:

It’s early and if you don’t have a lot free time or care to be on the bleeding edge, I’d recommend waiting a bit before using it to develop a production app.

Reading is all I’ve done so far, and I do want to start experimenting with it, but haven’t had much time. Fortunately, I have 2 weeks of vacation time ahead of me, so hopefuly I’ll be able to spend some time playing around with it.

As I’ve said before, I don’t really like JavaScript as a language, but if I’m going to learn it, it is going to be to use React. The comments I’ve seen of it all seem positive, both for the web version and for the native initiative.

Even if I don’t dive right in, at a minimum I’ll keep up with it’s progress via rss feeds and twitter.

Stole my words.

› Introducing ComponentKit

So, Facebook announced ComponentKit yesterday.

ComponentKit takes a functional, declarative approach to building UI and emphasizes a one-way data flow from immutable models to immutable components that describe how views should be configured.

Its great to see that Facebook contributes this much to the open source community. It really is.

But, how many UI libraries does Facebook need?

My Projects

These are the projects that I’ve worked on. Take a look, and feel free to ask anything.

Mejores Prácticas del Desarrollo de Aplicaciones para iOS con Swift

I wrote a book about Swift’s best practices, and how to leverage them to create scalable iOS applications.

SwiftEnEjemplos.com

An ongoing effort to curate a list of fine-grained Swift examples. I got the idea from https://gobyexample.com, and decided that this was a good opportunity to create something to help Spanish-speaking developers that want to learn Swift reduce the learning curve of learning this new exciting language.

AprendeiOS.com

A blog centered around sharing tips, tricks, and news about iOS development, in Spanish. I also host a weekly podcast called “El Podcast de Aprende iOS,” where each week I choose a topic related to being an iOS developer in 2017 and talk extensively about it.

WebDevTalks.mx

I’m a member of the comitee that organizes a developer-focused monthly meetup in my hometown. We gather once a month to talk about JavaScript, Ruby, mobile development, and industry best practices.

I’ve been particularly focused on getting the word out there about the meetup, and encouraging students to attend our sessions.

iosjobs.mx

I saw an opportunity to create a site to help Spanish-speaking developers land jobs at companies looking for iOS contractors. With iosjobs.mx, I worked hand to hand with recruiters to help them tailor their offers to make them more attractive to potential recruitees.

The site was originally built using Phoenix, the Elixir web framework, and later ported to WordPress. I published a weekly newsletter every week for 6 months, and stopped because I couldn’t justify the time I was putting into it.

Open Source Code

  • SwiftyOpenPay: I wrote this small client to communicate with OpenPay’s API, since their ObjC client was really outdated. Wrote it with Swift 2.1, have yet to update it to Swift 3.
  • PTModel: PTModel is a simple object store for iOS applications. It lets you persist data locally, without the hassle of dealing with other more complex (and powerful) libraries.
  • P3Foundation: This is PFoundation’s evolution to use Swift 4.
  • P3UIKit: This is PUIKIt’s evolution to use Swift 4.
  • P3NetworkKit: This is PNetworkKit’s evolution to use Swift 4.

Deprecated

  • PFoundation: This is my wrapper around Foundation classes and contains many utilities that I reuse constantly.

  • PUIKit: My wrapper around Apple’s UIKit, in the same fashion as PFoundation.

  • PNetworkKit: Set of utility classes built on top of PFoundation that make network tasks a breeze.

SSL Pinning on Android

I had to do SSL Pinning on Android today. What a fucking mess.

Most of the posts I read on how to do it used libraries like okhttp. But the app I’m working on has its own networking stack, so I had to find a solution that could be adapted.

Fortunately, I found this, which made me really happy.

› Developer Productivity: The Art of Saying No

Interesting proposition on how to manage your time as a developer working with a team.

Loved this part:

Managers view their schedule as small chunks of time and schedule meetings throughout the day. This is incompatible with how developers (makers) operate. Makers need long periods of uninterrupted time to get things done.

And, man, do I want to start usin inboxpause now.