Skip to content

Instantly share code, notes, and snippets.

Dean Marano deanmarano

  • Chicago, IL
Block or report user

Report or block deanmarano

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am deanmarano on github.
  • I am deanmarano (https://keybase.io/deanmarano) on keybase.
  • I have a public key whose fingerprint is 1ED8 25AD 5F29 01AF F6EE 85D4 4ACB A2B4 5335 A703

To claim this, I am signing this object:

@deanmarano
deanmarano / turry.md
Created Jul 15, 2016
The story of Turry
View turry.md

From http://waitbutwhy.com/2015/01/artificial-intelligence-revolution-2.html

A 15-person startup company called Robotica has the stated mission of “Developing innovative Artificial Intelligence tools that allow humans to live more and work less.” They have several existing products already on the market and a handful more in development. They’re most excited about a seed project named Turry. Turry is a simple AI system that uses an arm-like appendage to write a handwritten note on a small card.

The team at Robotica thinks Turry could be their biggest product yet. The plan is to perfect Turry’s writing mechanics by getting her to practice the same test note over and over again:

“We love our customers. ~Robotica”

Once Turry gets great at handwriting, she can be sold to companies who want to send marketing mail to homes and who know the mail has a far higher chance of being opened and read if the address, return address, and internal letter appear to be written by a human.

View tested-jekyll.md

Testing Your Jekyll Site, The Ruby Way

Here at eSpark Learning, we use Jekyll to host our marketing site, https://www.esparklearning.com. Within eSpark Engineering, we love automated testing - most of our codebases require a passing test suite for all changes. As we add more javascript to our Jekyll site, we wanted to add a test framework that would give us real world tests - testing that the HTML was valid was no longer enough.

Acceptance Testing with RSpec, Capybara, and Selenium

To create real world acceptance tests for our site, we used a few technologies we were familiar with:

  • RSpec - Behaviour Driven Development for Ruby
  • Capybara - Test web applications by simulating how a real user would interact with your app
  • Selenium - Selenium automates browsers
View farewell-app-store.md

Farewell, App Store - The Web Strikes Back

Native apps became hugely popular for many good reasons - but many of those reasons are no longer valid. Performance, offline capabilities, push notifications, background workers, installation abilities, databases, and more have fundamentally changed browsers - and it's time to start using them. Together, we'll explore the current pros and cons of native versus web apps and take a deep dive into real world offline web app. By breaking down it's internals, we'll give an idea of what the web offers today and see just how awesome a truly offline web app can be.

@deanmarano
deanmarano / promises.coffee
Created Feb 22, 2016
Promise Support for Jasmine
View promises.coffee
itPromises = (testName, testFn) ->
it testName, (done) ->
promise = testFn()
if typeof promise.then == 'function'
promise.then(done, ->
fail("Promise was rejected - #{JSON.stringify(arguments)}")
)
else
fail('specs with itPromises needs to return a promise')
done()
View shopping.md

Veggies

  • 2 jalapeno peppers
  • 4 cloves garlic
  • 1 tablespoon ginger
  • 2 onions
  • 1 medium tomato
  • 1/2 pounds carrots, peeled and sliced

Fruits

  • 1/4 cup lime juice
@deanmarano
deanmarano / tips.md
Last active Jan 13, 2016
Development Tips
View tips.md

General

(bullets need expanding or categorization)

  • Class names should not be verbs, nor should they be verbs turned into nouns. (ex Enroller, UserAuthenticator)
  • Don't be clever. Clever is not obvious, and harder to read. Always code for the reader.
  • Reading code is hard. Writing code is easy. Get better at reading code.
  • Wrap third party calls (anything over the network) in their own wrapper. Don't make network calls outside of wrapper classes.
  • The rule of proximity - declare variables, methods, imports, etc. as close as possible to where they are used. (exception - standards of grouping imports near the top, etc.)
  • Push conditionals to the edges - out (to your public API) and in (towards the APIs you use), away from the middle.
    • If you’re writing a web service, play with the idea of making new endpoints instead of conditionals as query params
View user_enroller.rb
class UserEnroller
attr_reader :user, :email
def initialize(user)
@user = user
if @user
# do some initialization, set some variables
end
end
View gist:a597eec343facb565bc4
https://lostechies.com/chadmyers/2008/11/21/do-not-test-private-methods/
http://peterprovost.org/blog/2012/05/31/my-take-on-unit-testing-private-methods/
https://dzone.com/articles/why-shouldnt-i-test-private
http://programmers.stackexchange.com/questions/135047/new-to-tdd-should-i-avoid-private-methods-now
You can’t perform that action at this time.