Skip to content

Instantly share code, notes, and snippets.

@EbenezerGH
EbenezerGH / The Big Nerd Ranch Guide by Bill Phillips and Brian Hardy
Last active August 29, 2015 14:04
Filling in the gaps of my Android knowledge.
-Favor Anonymous Inner Classes for Listeners(http://docs.oracle.com/javase/tutorial/java/javaOO/anonymousclasses.html#declaring-anonymous-classes)
-Use Fragments for ALL Interfaces after introduced in Chap. 7
-Applications written are compatible with Gingerbread and Froyo Devices (I won't worry about this)
Chapter 1
Your First Android Application
------------------------------
-No Notes
Chapter 2
@EbenezerGH
EbenezerGH / Dagger & Mortar
Last active August 29, 2015 14:07
Dagger & Mortar Notes
Mortar & Flow
http://corner.squareup.com/2014/01/mortar-and-flow.html
http://square.github.io/dagger/
Dagger helps you modularize your app into a graph of decoupled components. It takes care of all the wiring and therefore makes it easy to extract dependencies and write single concern objects.
-https://github.com/square/dagger/tree/master/examples/simple/src/main/java/coffee (Coffee Code Example) //Finish going over this
-Builds upon javax.inject annotations(Dependency Injection)
-Dagger Does not support method injection
-Lazy Injection - Lazy<T> deferes instantiation until the first call to Lazy<T>'s get() mehtod. Eachinjection gets its own Lazy<T> unless it is a singleton. Use Lazy Injection for emergencies.
@EbenezerGH
EbenezerGH / RX Java
Created October 14, 2014 05:04
Reactive Programming
http://blog.danlew.net/2014/09/15/grokking-rxjava-part-1/
@EbenezerGH
EbenezerGH / Study Links
Last active August 29, 2015 14:08
Software Developer Homemade StudyGuide YO!!
Wifly assigns connected users an IP address that can be used for communications.
SOFT AP
---------
set wlan join 7 //AP mode ON
set wlan channel 0
set ip dhcp 4 //Wifly Assigns user IP
set ip address 1.2.3.4
set ip net 255.255.255.0
set ip gateway 1.2.3.4
@EbenezerGH
EbenezerGH / Creating Goals
Last active August 29, 2015 14:14
SMART GOALS
S for specific: during each sprint planning, the team agrees on a specific set of tasks to achieve, and commits to doing them. The tasks (and the user stories), answer the questions of what do I want to accomplish, purposes/benefits of accomplishing the goal, who is involved, where it takes place, and constraints.
M for measurable: the list of these tasks, plus the movement of the tickets throughout the sprint, from development to code review to QA to release (or whatever your flow is), answers the questions of how much work and when will it be accomplished.
A for attainable: functioning Agile groups don't typically commit to something in the planning stage unless it is clearly attainable -- all the pieces are there to know how to accomplish it
R for relevant: questions like is it worthwhile, is it the right time, does it match our other efforts -- stories and tasks don't get pulled into a sprint, and committed to, unless the answer is yes to all these questions (typically...YMMV)
T for time-bound: a sprint i
@EbenezerGH
EbenezerGH / Coding Conventions
Last active February 14, 2016 19:47
Style Guide for universally understandable Code
http://www.oracle.com/technetwork/java/codeconvtoc-136057.html
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style
https://www.mattcutts.com/blog/seo-glossary-url-definitions/
http://blog.cleancoder.com/uncle-bob/2016/01/04/ALittleArchitecture.html
https://www.mobomo.com/2011/06/android-understanding-activity-launchmode/
Deck: Loaded Vanguard
https://www.muirskate.com/longboard/decks/2384/loaded-vanguard-longboard-skateboard-deck-w-grip
Trucks: Reverse Kingpin 180mm
Width 9.25 (use 180mm & up)
< 8.5 recommends 150mm
Wheels: Sharp Lipped
70mm 75a
private void showAnswerAnimation() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
int cx = mShowAnswer.getWidth() / 2;
int cy = mShowAnswer.getHeight() / 2;
float radius = mShowAnswer.getWidth();
Animator anim = ViewAnimationUtils
.createCircularReveal(mShowAnswer, cx, cy, radius, 0);
anim.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
@EbenezerGH
EbenezerGH / Abstracting Fragment Classes
Created October 18, 2015 18:04
An example of Abstracting out and calling fragments
package com.jfyg.bignerdranch.criminalintent.activities;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import com.jfyg.bignerdranch.criminalintent.R;