Apple rejected my app, so I decided to open-sourcing it

Emojilist project sample screens

Earlier this year, I had the project of creating one new app per month, try to monetize them or run them as a side-project/business. I started with the idea that to solve a problem that I had.

I wanted a straightforward way to create shopping lists using only emojis. Just that, only emojis are allowed. Check the repository out!

I had a fun time creating it, exploring new project architecture for iOS from scratch and trying out some good open-source libraries like Realm and Spring. I have even calculated the amount of time I spent creating it so I could calculate how much I had invested in work hours, so I could have a baseline of how much I needed to get in return by selling it:

. Sum R$/h R$
Mojilist 51 R$100,00 R$5,100

The rejection

Everything was fine, and I was excited to release, I generated the screenshots needed, and I have sent the binary to Apple for review. My surprise was that the app got rejected because it used Emojis:

Answer from Apple (1)
Answer from Apple (1)
Answer from Apple (1)
Answer from Apple (2)

First of all, I was surprised they were enforcing such policy, to me it makes no sense: they already charge a big chunk of any sale in the store (30%), the minimum I expected was to be free to use at least the emojis they have popularized throughout their platform.

Open-sourcing the project

But opinions aside, I would have to draw many icons to get the chance of resubmitting it, and I think my time would be better invested in other stuff (like learning Node.js and React.js). So I decided to open source this project to get community feedback and perhaps create something else from it. Maybe it could be a good starter for junior developers to try to understand how to build an app from scratch.

Unfortunately, I had to remove the iconography I used, as it is copyrighted. But other than that, the rest is distributed under Apache 2.0 license. Enjoy by checking out the repository at GitHub and let me know what you think!

Tags: ios, apple, app, open-source, swift, cocoapods

Simple newsletter sign-up form using Webpack 4.5.0 and MongoDB

Mail letters
Image credit to: Pexels

In this cloudy saturday 🌧, I took sometime to ship a new feature for my blog engine in Node.js: I included a simple newsletter sign-up form that uses Webpack 4.5.0 to bundle a class written in ECMAScript 2016 and communicates with a self-contained API in the blog engine that writes that information in a MongoDB instance.

Check out my pull request to see what has changed. I've called this feature Penpals and anybody that signs in will receive a direct e-mail from me, just for fun.

I think the next enhancement in this feature will be to add a notification service to let me know when a new email is subscribed, so I can easily start conversations on my inbox 📬.

Tags: signup, newsletter, webpack 4.5.0, mongodb, nodejs, javascript, ecmascript

I've created my own blog engine in 2 days using Node.js and Markdown, and it is open-sourced!

I like to write, and I always wanted to acquire the habit of blogging regularly. I've set up a dozen of Wordpress blogs for myself but never carried them on too much.

Recently, I've been teaching myself Node.js and modern JavaScript (ECMAScript), and I thought: What the hell, let's see how easy it would be to create a blog engine for myself, from scratch!.

And that's what I've done. Inspired by Felix Krause's open-blog, I also open-sourced my blog written in Node.js to anyone who wants to use or extend it.

How to use it

1. Clone this repository

git clone

2. Install dependencies

npm install

3. Create your secrets.json file

I use this JSON file to keep important information aside, like the API keys the blog uses. Right now it should look like:

  "driftKey": "a-key",
  "googleUA": "another-key"

Save it in the root of the cloned repository.

4. Serve the application

I use the port 3001, no reason behind this choice. You can change it at your will.

npm run dev
# Then open

And there you have it! This is my blog running on your machine. Now let's take a look at how to write posts.

Writing posts

1. Write anything in Markdown

Write anything in Markdown in the posts/ directory. Take a look at the posts I have written for some examples.

2. Name your blog posts

I use the convention of so all files are in order of posting. This is important because the script that generates the HTML files will order the files by name in ascending order, then reverse the order to generate the table of contents of the blog.

3. Run the mount script


npm run mount

When you have the posts, you want to publish in posts/ directory. This script will get every post and convert it into HTML and generate a JSON file with the same name that contains metadata.

Generating Static files

It is also possible to loop through all your blog pages (that are enlisted in the table of contents) and generate static HTML files to be used instead of dynamic ones. This is especially useful in case you ever need to have a light version of your blog.

To generate such files, run

npm run staticize

What else can I do?

This is the starter project of a primary website. You can extend it to do whatever you would like; your imagination sets your limits. Knock yourself out and let me know if you ever use it.

Tags: open-source, blog, node.js, markdown, javascript

Anti-Patterns by Example, Premature Optimization

Anti-Patterns by Example: Premature Optimization

We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet, we should not pass up our opportunities in that critical 3%

Donald Knuth wrote this quote back in 1973, and for over forty years software engineers have been debating its validity. Is it still applicable for nowadays?

Given the right proportions, it is. Premature Optimization is different than (Basic) Optimization. It is obvious, the key word here is Premature. Sahand Saba puts it nicely:

Optimizing before you have enough information to make educated conclusions about where and how to do the optimization.

It is preferable to write well designed and readable software first and then micro-optimize it later. Wait, micro?

Micro because you must be aware of using complicated and unproven "heuristics" instead of a known mathematically correct algorithm.

Another trap in this anti-pattern to be aware of is Randall Hyde's sixth observation:

Observation #6: Software engineers have been led to believe that their time is more valuable than CPU time; therefore, wasting CPU cycles in order to reduce development time is always a win. They've forgotten, however, that the application users' time is more valuable than their time.

Considering that you know what algorithm to pick, to over or prematurely optimize it is the real trap the Premature Optimization anti-pattern wants to warn you.

It is important to remember what Rico Mariani said, "Never give up your performance accidentally." Notice he did not say, "Never give up performance." He said programmers should not give up performance accidentally. People accidentally give up performance when they don't understand the costs associated with the constructs they are using in their programs.

Examples in Real-Life

In BrightScript, Roku's official language for developing channel applications, there are two list structures: roArray and roList. In fact, roList is a dynamic roArray.

Most of the time, when I need a list I won't waste time choosing between those two: I will go straight to:

myList = [] // creates a roList

Why wouldn't I care 97% of the time, like Donald Knuth states? Because most of the time, my lists' size is so small that any optimization in that scope is marginal.

However, I should be aware of what are the constraints of the software I'm writing. If I knew the list would accommodate a few pairs of elements and never grow in size, and if the sequence is in the heart of a process that potentially can block the render thread for too long, I would put more thinking on it.

But that does not happen more often than 3% of the time.


9 Anti-Patterns Every Programmer Should Be Aware Of by Sahand Saba.
Anti-Patterns by Wikipedia.
Program Optimization by Wikipedia.
The Fallacy of Premature Optimization by Randall Hyde.
“Premature optimization is the root of all evil” is the root of evil by Oleksandr Kaleniuk.
Premature optimization is the root of all evil by The Lumber Room.

Tags: anti-pattern, engineering, premature optimization, software

The hard part of being a highly respected person

The hard part of being a highly respected person

Yesterday, I save an article about 7 Qualities of People Who Are Highly Respected. Although the click-bait-ish title, the story is good. I kept it a while ago, and I didn’t remember. It was an excellent refresher of how difficult some things are in day-by-day life.

From the list, I think I have the most difficulty in listening well and letting go of anger.

One characteristic I try to change in myself every day is to pay attention to what other people have to say, genuinely. Most of the time is not disrespect; it is that I have my mind in so many things, so many thoughts that I find difficult to focus on something outside my head. Thankfully, practicing meditation every day is helping me to overcome this challenge.

As for letting go of anger, I’m a very calm person, to everybody else. Inside my head, I’m on fire sometimes due to some opinions, but I chose to remain quiet. Perhaps that’s the first step towards truthfully letting go of anger, or maybe I am just suppressing it until it explodes.

Nevertheless, I believe to be respectful to others is a must-have quality in today’s world. One should practice it tenaciously. I’m doing my part.

Tags: character, human, mindfulness, opinion, quality