Skip to content

Instantly share code, notes, and snippets.

@valeriecodes
valeriecodes / recipes.pl
Created July 24, 2019 20:29
Experimenting with Recipes in Prolog
recipe(muffin).
recipe('chickpea soup').
recipe(tiramisu).
recipe(pancakes).
recipe(latkes).
recipe(gazpacho).
contains(blueberries, muffin).
contains(milk, muffin).
contains(butter, muffin).
@valeriecodes
valeriecodes / resources.md
Last active March 2, 2019 19:09
Global Diversity CFP Day DC 2019 Resources
@valeriecodes
valeriecodes / week6.js
Created February 27, 2018 03:26
All Tests Pass
/**
* Week 6: Anagram check (or, hacker nag cam?)
*
* Given a function 'anagramCheck(a, b)', return true if the two strings are anagrams of each other, false otherwise.
*/
function anagramCheck(a, b) {
let aArray = a.toLowerCase().replace(/\s/g, '').split(''),
bArray = b.toLowerCase().replace(/\s/g, '').split('');
@valeriecodes
valeriecodes / week4.js
Last active February 12, 2018 18:09
All Tests Pass: Week 4
/**
* All Tests Pass: Week 4
*
* Working with native Array methods.
*
* This week, you're working at Acme Artwork, a small art store whose owner needs help understanding their sales for any given
* month. The last two month's worth of sales are available to you as an array of structured objects, with various bits of data
* describing who bought what for what price.
*
* For the purposes of this puzzle, the sales records are kept at the bottom of the puzzle file. Check there for the structure
Feedback/Followup Forms:
https://docs.google.com/forms/d/1lyhcxRMpAhqbmmYooEJf7tCckD5VvRs12FIs4S4LC-8/viewform
https://docs.google.com/forms/d/1MtMMiBRy6JPcTrJ3moRhiFe32ZWXJoL3bipiHVJhQPQ/viewform
Videos:
CFP Advice from Raquel Velez and Sarah Mei
https://youtu.be/lHIHgauh000
Crafting Your Bio: By Danielle Barnes from @WomenTalkDesign
@valeriecodes
valeriecodes / week_1.js
Created January 19, 2018 18:52
All Tests Pass: Week 1
/**
* All Tests Pass: Week 1
* Given an array of integers, find out if any two items in the array add up to
* the target. For example, sumsToTarget([1,2], 3) should return true, but
* sumsToTarget([1,2], 4) should return false.
*/
function sumsToTarget(integers = [], target) {
return sumHelper(integers.sort(), target, 0, integers.length - 1);
}
## Testing Session
* _Practical Object-Oriented Design in Ruby_ by Sandi Metz (http://www.poodr.com/)
* "The Magic Tricks of Testing" talk (https://www.youtube.com/watch?v=URSWYvyc42M)
* _The Cucumber Book_ by Matt Wynne and Aslak Hellesøy (https://pragprog.com/book/hwcuc/the-cucumber-book)
* _Working Effectively with Legacy Code_ by Michael Feathers (https://www.amazon.com/Working-Effectively-Legacy-Michael-Feathers/dp/0131177052)
Gems:
* Factory Girl (https://github.com/thoughtbot/factory_girl)