Firebase benefits Key/Value document (NoSQL) Real time database Hosted URL based Integrated Authentication Firebase NoSQL data design principles: – Don’t treat firebase like a relational database – User Root branches as your primary container – Avoid deep nesting – Duplicating Data (More art than science) – Design around data access – Data design is driver … Continued
First Android App using Kotlin : language features
Project Link Points to ponder from this app about Kotlin: Koding Efficieny Cocise Syntax Avoids boiler plate code (really slick) Error reduction Null Safety Ability to indicate intentions Excellent compatibility with Java and Android Singleton pattern for a class is just done using object keyword insted of class (So simple!) – Automatically instantiated – All … Continued
Using Braintree SDK on Android for Paypal and Credit Card Payments
Previously it was just using Paypal SDK to accept Paypal payments but now it requires you to use Braintree SDK to accept Paypal, Credit card or other types of payments. Accepting a payment through Braintree SDK is a multistep process. Requirements: 1. Braintree live account (you need to apply for it, they will review and … Continued
Accepting Stripe payment in an Android app
Android Integration from the official site: https://stripe.com/docs/mobile/android — Add this to your build.gradle implementation ‘com.stripe:stripe-android:6.1.2’ — We will use built-in Stripe cardinputwidget to collect card information — in the view’s layout.xml e.g. activity_layout.xml include <com.stripe.android.view.CardInputWidget android:id="@+id/card_input_widget" android:layout_width="match_parent" android:layout_height="wrap_content" /> — In the activity file MyActivity.java import com.stripe.android.view.CardInputWidget; import com.stripe.android.Stripe; import com.stripe.android.model.Token; CardInputWidget … Continued
Object oriented design : SOLID principles
S : Single Task Responsibility : Each class does only one task well O : Open/Close : Open for extension, closed for change L : Liskov substitution principle : if a method can take a class as a parameter then it must be able to work by taking other subclasses of that class I : … Continued
Temperature and Humidity Controller for Egg hatching
http://arduino-info.wikispaces.com/LCD-Blue-I2C /* YourDuino.com Example Software Sketch 16 character 2 line I2C Display Backpack Interface labelled “A0 A1 A2” at lower right. ..and Backpack Interface labelled “YwRobot Arduino LCM1602 IIC V1” MOST use address 0x27, a FEW use 0x3F terry@yourduino.com */ /*—–( Import needed libraries )—–*/ #include <Wire.h> // Comes with Arduino IDE #include <LCD.h> #include … Continued
Revisiting Datastructures : Implementing Basic Binary Tree in Java
package ds; public class BasicBinaryTree<X extends Comparable<X>> { private Node root; private int size; public BasicBinaryTree(){ this.root = null; } public int size(){ return size; } public void add(X item){ … Continued
Datastructures revisited : Implementing Basic Linked List in Java
public class BasicLinkedList<X> { private Node first; private Node last; private int nodeCount ; public BasicLinkedList(){ first = null; last = null; nodeCount = 0; } public void add(X item){ … Continued
Sending my name to Mars!
Mars Boarding Pass! Ok this generated iframe from nasa is broken but here’s an screenshot :
Datastructures Revisited: Implementing Stack in JAVA
This is the stack implementation in JAVA package ds; public class BasicStack<X> { private X[] data; private int stackPointer; public BasicStack(){ data = (X[]) new Object[1000]; stackPointer = 0; } public void push(X item){ … Continued