Skip to content

Instantly share code, notes, and snippets.

View ajrussellaudio's full-sized avatar
👋
Hiya

Alan Russell ajrussellaudio

👋
Hiya
View GitHub Profile

#Factory Pattern

The Factory design pattern is a way of creating objects to some template, without either the instantiating function or the object classes themselves being concerned with the details of the actual creation.

##So yeah...

A Type of object superclass is defined somehow. There are examples online of this being done with abstract class inheritance and with interface composition. Since there is a chance Val Gibson may be reading this, I'll avoid using inheritance! And since there is a chance Tony is reading this, I'll use Pokemon in this example:

public interface Pokemon {
@ajrussellaudio
ajrussellaudio / android_project.md
Last active September 1, 2016 13:52
A brief for my Android project

Android Synthesiser

My task will be to create a simple audio synthesizer, or sound generator, to be used on Android devices.

This project will better address my domain of understanding, coming from a background in audio engineering and music, and having a good understanding of audio synthesis, design and implementation in analog electronics. It will also be closer to my projected career path post-CodeClan, and something cool I'd love to learn about and have in my portfolio.

  • There are frameworks for this which I will avoid.
  • There is a built-in low-level audio API which I will probably make use of.
  • There is also an NDK implementation of OpenSL ES, which allows C/C++ code to be used within an Android project. This is no doubt well beyond me as an Android novice, but it may be possible to lift C code from [other ope
@ajrussellaudio
ajrussellaudio / android_audio_terms.md
Last active September 6, 2016 12:11
A glossary of terms I don't understand (yet) in Android

Android Project Glossary

  • Thread
  • Priority
  • AudioTrack
  • AudioTrack.getMinBufferSize()
  • AudioTrack.write()
  • AudioFormat
  • AudioManager

#Canvas

##Learning Objectives

  • Learn about canvas on Android
  • Create a simple drawing app

#Canvas [i]: This lesson is taken from this Android Canvas Tutorial.

Algorithms

Guess Who?

Two ways of playing:

  • 1 Guessing by name
  • 2 Guessing by characteristic

For 16 people/cards:

7 Deadly Sins of Interviews

  • Don't be late - Be way too early and get a coffee
  • Dress appropriately - Wear a suit
  • Be polite - shake hands, say hello, please, thank you, sit up straight
  • Do your homework - research the company, when did they start, how many employees, where are their offices, who is doing the interview, what do they do, pick 5 useful things about the company
  • Don't give closed answers - Expand on yes/no answers, start a dialogue
  • Be enthusiastic - be stand-out, be unique, not meh. Make an impression
  • Ask questions - What's the career path? Appraisal process? Opportunities to advance? Opportunities to travel?

6 Deadly Sins of CVs

  • Keep it quick for the reader - 30 seconds per CV (heirarchy of info), 2-3 pages
  • Keep it relevant - No boy scout badges. Show distinction from other candidates, show unusual interests, personalise it (everyone reads books and watches movies)
  • Spellcheck - Attention to detail, including font sizes etc
  • No stupid fonts - and be consistent throughout. Sans serif, 11pt
  • Cough up to gaps - include part-time McJobs. Gaps look worse than shit jobs.
  • It's your selfie - You've got 30 seconds to present yourself. It is a sales tool

Bonus - Covering letter is just as important - Tailor it to the company

5 Deadly Sins of Tests

  • Read the question carefully - Don't jump straight in
  • Don't have messy handwriting - Use best, neatest handwriting
  • Put your name on the paper - or else it goes in the bin
  • Give open answers - Write in sentences, be expansive
  • Double check answers

"Hey Alan..."

"I already commited my Node.js project, but I forgot to add node_modules to a gitignore. How fucked am I??"

It's cool, don't panic. First make your gitignore file:

$ touch .gitignore

JS Record Store

Learning Objectives

  • Implement an OO JS program using the 'new' keyword
  • Practice adding methods to objects
  • Using JS data structures and loops
  • Practice building a TDD program from scratch

Requirements