• Featured post

C# Async ops

El nucleo de la programacion asincrona son los objetos Task y Task<T>. Son compatibles con las palabras clave async y await.

Primero hay que reconocer si el codigo se usa para trabajos enlazados a I/O o si son CPU intensivos.

  • Si el codigo “espera” algo como una BBDD o una response de un servidor, es codigo I/O. En este caso hay que usar async y await pero SIN usar Task.Run
  • Si el codigo realiza un calculo costoso, es CPU intensivo. Use async y await y genere otro subproceso con Task.run

Async / Await (Operaciones I/O)

La palabra clave importante aqui es await. Lo que hace es suspender la ejecucion del metodo actual y devolver el control hasta que está lista para seguir.

public Task Main()
{
	string contenido = await LeerPaginaWebAsync("http://example.com");
}

public async Task<string> LeerPaginaWebAsync(string url)
{
	using (HttpClient client = new HttpClient())
	{
		return await client.GetStringAsync(url);
	}
}

Read More

SCRUM PSM1 Certification - Index

scrum-psm1-badge

Status: Certified!

This notes are my watered-down, personal version of The Scrum Guide 2020 and the following Udemy Course: “Preparation For Professional Scrum Master Level 1 (PSM1)” by Vladimir Raykov.

If you want to get ready for the certification exam, I fully recommend buying and watching his course, several times, in Udemy.

Scrum Guide 2020
1. Scrum Guide 2020 Notes
2. Scrum Glossary

“Preparation For Professional Scrum Master Level 1 (PSM1)” by Vladimir Raykov
1. Scrum Introduction
2. The Scrum Team
3. Scrum Events
4. Scrum Artifacts
5. Scrum Practices and Charts
6. A few words before the Exam
7. Recap of key concepts
8. Possible exam questions

Java Knowledge

This are my Java-related notes. Here I have all the knowledge I refer to when I have doubts about how to use or how to implement a framework / feature I’ve already implemented once.

Version changes

Interesting changes, new functionality and APIs that come to Java with each new version. They don’t include the full changes but the ones I deemed most useful or most interesting.

1. From Java 8 to Java 11
2. Java12
3. Java13

Experience

Small, functional snipets on how to implement a determined feature.

4. Java experience sheet
5. How to create a database intermediate table
6. Java date time API
7. New script files in Java

Frameworks

How to use and implement determined frameworks in a Java project (using Maven).

8. Spring in Action (Book)
9. Spring Cache
10. Spring Beans
11. Thymeleaf
12. Spring Cors

13. Maven (builder)
14. Testing (JUnit, TestNG, Mockito)
15. Vert.x (microservices)
16. Lombok (builder)
17. MapStruct (mapper)
18. Liquibase (database version control)

Splunk

Splunk take any type of data of millions of entries and allows you to process it into reports, dashboards and alerts.

It’s great at parsing machine data. We can train Splunk to look for certain patterns in data and label those patterns as fields.

Planning Splunk Deployments

A note on config files

Everything Splunk does is governed by configuration files. They’re stored in /etc and they’ve .conf extension.

They’re layered. You can have files with the same name in several directories. You might have a global level conf file and an app specific conf file. Splunk check which one to use based on the current app.

Read More

Oracle 1Z0-819 (Java11) Certification - Index

The new 1Z0-819 certification is the combination of the old existing ones (1Z0-815 & 1Z0-816) together.

OCP Java SE 11 Programmer I - Study guide for 1Z0-815

1. Welcome to Java
2. Java Building Blocks
3. Java Operators
4. Making Decisions
5. Core Java APIs
6. Lambdas and Functional Interfaces
7. Methods and Encapsulation
8. Class Design
9. Advanced Class Design
10. Exceptions
11. Java Modules

OCP Java SE 11 Programmer II - Study guide for 1Z0-816

1. Java Fundamentals
2. Java Annotations
3. Generics and Collections
(to continue)

Google Cloud Developer Certification - Index

google-cloud-developer-image

This are personal notes for the GCP Developer certification. If you want to get ready, I fully recommend doing Qwiklabs and Coursera courses to prepare yourself.

Google Cloud Platform (GCP) Fundamentals: Core Infrastructure 1. Introducing Google Cloud Platform
2. Getting started with GCP
3. Virtual machines in the cloud
4. Storage in the cloud
5. Containers in the cloud
6. Applications in the cloud
7. Developing in the cloud
8. Big Data in the cloud
9. Machine Learning in the cloud

Getting started with Application Development 1. Best practices for app development
2. Google Cloud SDK, Client Libraries and Firebase SDK
3. Data Storage Options
4. Best practices for Cloud Datastore
5. Best practices for Cloud Storage

Securing and Integrating Components of your Application 1. Cloud IAM (Identity and Access Management)
2. OAuth2.0, IAP and Firebase Authentication
3. Cloud Pub/Sub (needs cleaning)
4. Cloud Functions (needs cleaning)
5. Cloud Endpoints (needs cleaning)

App deployment, Debugging and Performance 1. Deploying Applications (needs cleaning)
2. Execution Environments for your App (needs cleaning)
3. Debugging, Monitoring and Tuning Performance (needs cleaning)

Course Qwiklabs 1. Setting up a development environment

Extra Qwiklabs

Using the Cloud SDK Command Line Link to course

1. Getting started with Cloud Shell and gcloud
2. Configuring networks with gcloud
3. Configuring IAM permissions with gcloud
4. gsutil commands for Buckets
5. gsutil commands for BigQuery

From Java to Android with Kotlin

(Disclaimer: This are my personal notes from following Kotlin and Android courses in Udemy. This is a watered-down version from those courses. Check and buy the original courses if you want to find the full resources I used with more detail)

Android

This are my notes on the progress of things I had to learn to go from Java Developer to develop my first Android App with Android in Kotlin.

1. ViewBinding
2. DataBinding
3. MVVM Architecture
4. Live Data
5. ViewModel, LiveData, DataBinding
(wip: I still have to order and clean this series of posts from here on)
6. Recycler View
7. Navigation Architecture Component
8. Android Notifications
9. Coroutines
10. WorkManager
11. Android Testing

Extras:
12. Dagger2 Framework (dependency injection)
13. Hilt Framework (Dagger2 wrapper)
14. Room Framework (SQLite)
15. Android SQLite experience sheet
16. Android Development experience

Kotlin

This series of posts explain the main differences in language structures and usage between Kotlin and Java languages. I don’t explain the full Kotlin language, but the novelties that Kotlin implements that may be of interest to a Java developer.

1. From Java to Kotlin - Data Types & Casting
2. From Java to Kotlin - Operators & Operators Overloading
3. From Java to Kotlin - Nullable Types & Null Checks
4. From Java to Kotlin - Control Flow
5. From Java to Kotlin - Functions, Varargs & Default Parameters
6. From Java to Kotlin - Standard Library Functions
7. From Java to Kotlin - Lambdas
8. From Java to Kotlin - OOP, Companion Objects & Destructuring in Kotlin
9. From Java to Kotlin - Exceptions & Collections

Extras:
10. Kotlin cheat sheet with code examples

Scrapy (Python web crawler)

Scrapy is a web-scrapper & crawler.

Concepts

spider: class that you define and scrapy uses to scrape information from a website (our a group of websites). They must define the initial requests to make, optionally how to follow links in the pages and how to parse the content to extract data

item pipeline: after an item has been crawled by a spider, it’s sent to the item pipeline which processes it through several components that are executed sequentially. You can use them, for example, to save items to a database

How to use

# create a new project
scrapy startproject your_project_name  

# after writing a spider, it starts the crawl
scrapy crawl quotes

Read More

React JS

JavaScript library for building user interfaces. Created by Facebook.

Yarn

JavaScript package manager compatible with npm that helps automate the process of installing, updating, configuring, and removing npm packages.

Install

# add Yarn repository
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -  

echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list  

sudo apt-get update  
sudo apt-get install nodejs yarn  
yarn --version # verify

Read More

Programming Templates

personal-templates-image

Which problem does it solve?

  1. Every time I wanted to start a new project, I needed to spend the first few days setting everything up. Java11, maven configuration, docker, microservices communication, databases config etc. This took way too much time.

  2. Every time I learned a new programming language or framework, for the time I finally got to use it, I already forgot how to set everything up and running. This saves me time (at the end) and forces me to really learn how to use this new technology.

  3. For technical tests when job hunting it saves me a lot of time, so I can focus entirely on the code challenge.

Which templates do you have?

There are multiple versions for each technology, the mains are:

  • Docker with docker-compose and: Java Apps, Jekyll, Python3, MySQL and MongoDB databases.
  • Android App with Kotlin
  • Java8 and Java11 with: Spring/boot, in-memory databases (H2), rest services, microservices (Vert.x), maven multi-modules
  • Kotlin
  • Full app with React for frontend, MySQL for database and Kotlin for backend.

Github Repository