Blogs

post-image

Restarting a Flutter App with Flutter Driver

Wednesday, Mar 11, 2020 flutter

Flutter Driver is a neat way of testing Flutter applications perfoming integration tests. It allows you to run your Flutter application in an emulator and to control the app from your test code, performing taps and asserting that the app works as expected. One problem I faced when using Flutter Driver is that the app won’t restart between tests. For example, I would run a test in which the user performs a login, then a test in which the user performs a registration, but after the login test, the test left the app logged in.

Continue Reading
post-image

Code Cafeteria - 2 - Past work experiences

Saturday, Jan 18, 2020 podcast, codecafeteria

This is Episode 2, and today we talk about our past job experiences. Miguel talks about what he learned about the gaming industry when he worked there, Kai shares his experience working in Germany and New Zealand before becoming a freelancer, and Lara talks about my time as QA before becoming a developer. Music by Chillhop: https://chillhop.com/listen

Continue Reading
post-image

First Year Freelancing

Sunday, Jan 5, 2020 flutter, android, ios, freelancing

First year freelancing I just completed my first year as a Freelance Software Developer. But, technically, I started this journey way before. In this blog post, I’d like to share with you how I went from full time employee (FTE) for 12 years to self-employed Software Developer. Be aware, I am here to share my experience NOT to offer advice. There are way more experienced freelancers out there than can help you, and as well, any legal queries should go to professional tax advisors in your country of residence.

Continue Reading
post-image

Code Cafeteria - 1 - Developer Communities

Saturday, Jan 4, 2020 podcast, codecafeteria

In this episode we’re talking about developer communities. We’re starting off by trying to define what different types and categories of communities there are. It’s quite interesting how many different angles there are to look at communities from: online vs. offline, people- or technology-centric, vendor-driven and many others. All three of us have been part of different communities over time and we talk a bit about how each of us got involved with developer communities in the wider sense and what we currently do.

Continue Reading
post-image

Building a Messaging App in Flutter — Part III: Redux

Monday, Oct 21, 2019 flutter

This is part of a series of articles describing the work we did for Timy Messenger, a messaging app for groups to communicate and organize themselves. Build with flutter. In this article I will explain how and why we used Redux as our state management solution in Timy Messenger. The app is open source and the code is available for you get here: janoodleFTW/timy-messenger Why you need state management In most software applications, we can split what we consider User Interaction or Interface (UI) and Business Logic.

Continue Reading
post-image

Building a Messaging App in Flutter — Part II: Main Method

Friday, Oct 11, 2019 flutter

This is part of a series of articles describing the work we did for Timy Messenger, a messaging app for groups to communicate and organize themselves. Build with flutter. In this article I will explain everything that goes in the MaterialApp top level Widget, including the custom logger, the Redux configuration, localization and Firebase Cloud Messaging configuration. The app is open source and the code is available for you get here:

Continue Reading
post-image

Building a Messaging App in Flutter — Part I: Project Structure

Friday, Oct 4, 2019 flutter

This is the beginning of a series of articles describing the work we did for Timy Messenger, a messaging app for groups to communicate and organize themselves. Build with flutter. In this article I will explain the project structure both for the Flutter app and for the Firebase Cloud Functions. This app is open source, and in this articles I will be explaining some of the insides and coding we did.

Continue Reading
post-image

How to Record Your Own Talks

Wednesday, Jul 17, 2019 tools

Update March 18th 2020: Due to the amount of events that are going online, I have updated this guide to help also for those recording their talks at home. Public speaking has never been so popular in the developer community, not only it is a fantastic way to share knowledge but also for personal and professional growth. You may have noticed that every time someone announces they are speaking someone asks: Is it going to be recorded?

Continue Reading
post-image

Testing with SynchronousFuture in Flutter

Monday, Jun 24, 2019 flutter

SynchronousFuture is a nifty little class that can facilitate testing anything related to Futures in unit tests. For example, this UserService has a method that returns a Future<User>: class UserService { Future<User> getUser() { ... } } UserService is being used inside another class or method, for example in Redux inside the Middleware, but also could be inside a BloC pattern, inside a Presenter in MVP, etc. void loadUser(UserService service) { service.

Continue Reading
post-image

Should I Add Generated Dart Files to Git?

Monday, Jun 17, 2019 flutter

Packages like json_serializable or build_value facilitate the life of Flutter developers by generating code that is tedious to write, like JSON parsers or object builders. The way we generate code in Flutter is currently changing as we speak. Traditionally, what we would do is: Add the desired package to our pubspec.yaml, like the build_value dependencies: built\_value: ^6.6.0 2. Add the build_runner package to our dev_dependencies: dev\_dependencies: build\_runner: ^1.5.2 built\_value\_generator: ^6.6.0 3.

Continue Reading
post-image

Improving Your Flutter Code

Wednesday, Jun 12, 2019 flutter, tools

It doesn’t matter how many years we have been working as developers, we will always make the same mistakes: deploy code which is far from clean. Here’s where testing and static analysis can help us. Static analysis checks our code without running it, looking for programming errors, and it is also known as linting or lint analysis. Tests instead, look for implementation errors by running our code. If you are writing Flutter apps, you should be writing as well tests, that’s an essential part of software development, and since testing is way easier than with native application development, we have no excuse.

Continue Reading
post-image

From Keras to ML Kit

Friday, Sep 14, 2018 machine learning

How can I use my Keras model with ML Kit? Keras is an open source neural network library written in Python, which is capable of running on top of TensorFlow (this will be our case). It’s the go-to library for building neural networks with ease. It abstracts the details of TensorFlow, while being fully compatible with it. If you start learning neural networks, you will find yourself using it more and more.

Continue Reading
post-image

Custom TensorFlow models on ML Kit: Understanding Input and Output

Friday, Sep 7, 2018 machine learning

You can find this example in my repo deep-learning under android-mlkit-sample: https://github.com/miquelbeltran/deep-learning/tree/master/android-mlkit-sample My recommendation, before attempting this tutorial, be familiar with Firebase and to take a look at the codelab: Identify objects in images using custom machine learning models with ML Kit for Firebase. The problem with the above examples is that they were a bit too much complex for me. To undestand better how all works, I created a simpler example.

Continue Reading
post-image

Exporting TensorFlow models to ML Kit

Friday, Aug 31, 2018 machine learning

ML Kit is the new tool from the Firebase family to bring TensorFlow into your mobile applications. With ML Kit, it is easier than even to load and run trained models on Android, if you want to get started using ML Kit, I recommend you the following codelab: Identify objects in images using custom machine learning models with ML Kit for Firebase. In this article, you will learn a way to export your custom TensorFlow models to the tflite format to run on ML Kit.

Continue Reading

Deep Learning Nanodegree: Recap!

Monday, Aug 27, 2018 machine learning

I completed the program roughly in two months. I started the 12th of June and completed it today, 27th of August. The limit to complete the program was four months so I had until mid October to finish it. The program consists in 5 parts that cover the following topics: Neural Networks Convolutional Neural Networks Recurrent Neural Networks Generative Adversarial Networks Deep Reinforcement Learning And each part is completed with a final project that gets reviewed by Udacity.

Continue Reading

Deep Learning ND: Face Generator

Monday, Aug 6, 2018 machine learning

Today, I will also be talking about using neural networks to generate new things, but in this case images rather than text. The 4th part of the program focuses on GANs (Generative Adversarial Networks), a type of neural network with a peculiar architecture. It is not a single neural network, but two, competing against each other. In GANs, you have two neural networks: Generator and Discriminator. The Generator is a CNN (Convolutional Neural Network) that, as the name suggests, given some random input, will generate a new image.

Continue Reading
post-image

Deep Learning ND: Generating TV scripts

Wednesday, Jul 18, 2018 machine learning

Today I will be talking about the third project: A Recurrent Neural Network using LSTM (Long Short Term Memory) cells used to generate text. The principle will be the same as text prediction: Given some words, it will give us a list of possible words to put after. To create this model, we use a dataset containing lines from The Simpsons, from scenes happening at Moe’s Tavern, and we use it to generate a new scene.

Continue Reading
post-image

Deep Learning ND: Dog Breed Classifier

Saturday, Jun 30, 2018 machine learning

I am currently taking part of the Deep Learning Nanodegree at Udacity, where I learn everything about deep neural networks and their real world application. Now I just passed the second project (out of five), which is building a dog breed classifier using image recognition on a Convolutional Neural Network (CNN). Before starting learning about CNNs, I did some of the optional content available after the first project. Andrew A. Trask, author of Grokking Deep Learning, conducted a lesson about Sentiment Analysis with a handcrafted neural network, explained the roadblocks you might find while doing so and some optimisations to take care about.

Continue Reading
post-image

Deep Learning ND: First Project

Saturday, Jun 16, 2018 machine learning

I am currently taking part of the Deep Learning Nanodegree at Udacity. This program goes through 5 different projects in order to become familiar with neural networks and apply them in a practical way. I tried to learn Machine Learning in the past, but never fully succeed. I started the Introduction to Machine Learning from Coursera but quit after week 8 because it was impossible to keep following. I also did some small projects using TFLearn (a library that helps using TensorFlow) but always without a clear idea of what I was doing.

Continue Reading
post-image

Tips for refactoring to RxJava 2 with Kotlin

Monday, May 7, 2018 android

We recently finished our refactoring from RxJava 1 to version 2. It was an interesting trip, and thankfully, less painful that we expected. On our way we learned few things that I will share here. Observables or Single/Maybe/Completable/Flowable? The first big question you will have is if you want to keep using Observable or you will want to switch to the newly introduced Single, Maybe, Completable or Flowable. Some of them were available on RxJava 1 already but with limitations: For example, Completable on RxJava 1 didn’t work with Retrofit so we could not use it.

Continue Reading
post-image

Using MediaDrm for device ID tracking

Tuesday, Mar 27, 2018 android

If you read the Best Practices for Unique Identifiers you will see that Google discourages the usage of device (hardware) identifiers in order to identify users. With the recent news regarding Facebook data privacy practices, it’s important to raise awareness on how can app developers track your devices, match users across different apps and how is the operating system protecting us. Until now, requesting the ANDROID_ID has been the go-to solution for many.

Continue Reading
post-image

Keep sanity with your versionCode

Friday, Mar 16, 2018 android

Releasing Android apps is not a joke: Increase your version number, create a release build, sign the build, upload the APK, write nice release notes (in all supported languages!), roll to alpha, roll to beta, roll a 5% to Production, a 10%… until finally all your users get the update. Thankfully we have learned to automate most of that. Your CI will take care of building and signing the release and upload it to the Play Store.

Continue Reading
post-image

DroidKaigi 2018

Saturday, Feb 10, 2018

This was my first DroidKaigi and as well my first big conference as speaker. It was not my first time in Japan, it’s a country that I don’t get tired of visiting as it has so many things to offer, including now one of the friendliest conferences out there. Moments before my talk Tickets and CfP The call for proposals happened last year around October, giving us applicants a lot of time to prepare.

Continue Reading
post-image

Hello World of Annotation Processing in Kotlin

Sunday, Sep 24, 2017

This is the result of some trial and error until I got a simple annotation processing example working, with the challenge of not using Java, but Kotlin instead. Hopefully will help you get started! Sample code here: https://github.com/miquelbeltran/kotlin-code-gen-sample The goal is to generate a new class with the method getName() which will return the String “World”. So if we annotate the class Hello, it will generate the class Generated_Hello, and it will contain the method getName() that returns “World”.

Continue Reading
post-image

The costs of Kotlin Android Extensions

Saturday, Jun 17, 2017

Update: Kotlin 1.1.4 has a fix! Kotlin 1.1.4 is out Kotlin today announced the new 1.1.4 version which features an improvement for using Kotlin Android Extensions on custom views and View Holders. You can read more about the experimental proposal here: https://github.com/Kotlin/KEEP/blob/master/proposals/android-extensions-entity-caching.md If you are still curious about the original article, please keep reading! I am a big fan of the Kotlin Android Extensions as they helped me to get rid of copious amounts of boilerplate code.

Continue Reading
post-image

Android of Things ❤️ Arduino

Sunday, Jun 11, 2017

The Android of Things platform has some big advantages compared to Arduino or Raspbian. We Android developers can use the same tools we use for building applications for our projects, including all our favorite libraries, Google Play Services, and of course Kotlin. On the other hand, there’s a big disadvantage. Compared to Arduino, the Raspberry Pi can’t handle the low level custom protocols of some sensors. And compared to Raspbian, many of the available HATs are currently not supported.

Continue Reading
post-image

Refactor with the new ViewModel class

Saturday, May 27, 2017 android

Note: Article updated to the latest Architecture Components version, and added clarifications for onSaveInstanceState. I use Lara Martin’s android_book_listing project to try different architecture patterns. I have a branch using MVP, a branch using MVVM and one branch with MVP + Dagger. So I thought it would be a good idea to do a new one using the Architecture Components presented at Google I/O 2017. This is a beginner friendly article.

Continue Reading

Android: Easy (and free) test coverage reports with Codecov

Monday, Jan 18, 2016 android, ci

If you are somehow a good developer, you’ll be at least interested in having Unit Tests on your projects. If you do, you should care about code coverage of those tests. I’m not going to debate if one should aim to 90% coverage or more, but that’s a cool statistic to display on your project page and to keep track on. Looks good, but could be better! Even more advanced users can use this value to evaluate the quality of Pull-Requests.

Continue Reading

Android: Easy (and free) continuous integration with Travis-CI

Wednesday, Jan 13, 2016 android, ci

Ever seen those fancy green icons on Github, saying things like “Build Passing”? That’s a service like Travis-CI stating that the current project branch builds. In this article I will explain you how to integrate it with your Android projects, with some improvements I’ve had to face. This service is free for open source projects, and so easy to use that you will wonder why didn’t you use it before.

Continue Reading

Cloning all your Github repos at once

Thursday, Nov 19, 2015 tools

If you are moving to a new machine you’ll probably need to spend some time cloning all your Github repositories. Thankfully there’s an awesome command you can run on the terminal to get them all at once. curl -s https://api.github.com/users/USER/repos?per\_page=200 | ruby -rubygems -e ‘require “json”; JSON.load(STDIN.read).each { |repo| %x\[git clone #{repo\[“ssh\_url”\]} \]}’ Just remember to replace USER with your Github username.

Continue Reading

INTERESTED IN WORKING TOGETHER?

Contact with me