- Hello, Startup: A Programmer's Guide to Building Products, Technologies, and Teams
- Soft Skills: The software developer's life manual
- Notes to a Software Team Leader: Growing Self-Organizing Teams
- The Complete Software Developer's Career Guide
- One-Month Money: Why money ruins our economy
- The Mythical Man-month
- The Subtle Art of Not Giving a F*ck
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myNameSpace.backboneExtensions.methods.render = function() { | |
this.$el.html(this.tmpl(this.model.attributes)); | |
return this; | |
} | |
MyView = Backbone.View((function() { | |
var myRender = myNameSpace.backboneExtensions.methods.render; | |
return { | |
// your properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************* | |
* CHA 2555 - ARTIFICIAL INTELLIGENCE (2012-2013) | |
* Andrew Williams | |
* u0857629@unimail.hud.ac.uk | |
* BSc (Hons) Software Development | |
************************************************/ | |
/******** | |
* XOXO | |
******** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
using(var stream = File.Open(@"D:\test.txt", FileMode.Open)) | |
using(var httpClient = new HttpClient()) | |
{ | |
stream.Dump(); | |
var httpContent = new StreamContent(stream); | |
// pretty sweet test server by Henry Cipolla | |
// http://henrycipollablog.com/2011/12/06/testing-multipartform-data-uploads-with-post-test-server/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Problem: | |
// We have lots of data that we want to process that can be easily parallelised | |
// We want to process all our data and combine the results | |
// "Map is an idiom in parallel computing where a simple operation is applied to all elements of a | |
// sequence, potentially in parallel.[1] It is used to solve embarrassingly parallel problems: those | |
// problems that can be decomposed into independent subtasks, requiring no | |
// communication/synchronization between the subtasks except a join or barrier at the end." | |
// - https://en.wikipedia.org/wiki/Map_(parallel_pattern) | |
void Main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
var task1 = Task.Factory.StartNew(() => { | |
Thread.Sleep(1); | |
return 1; | |
}); | |
var task2 = Task.Factory.StartNew(() => { | |
Thread.Sleep(1); | |
return 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
myVar = 1; | |
console.log("myVar should be 1: " + myVar); // should be 1 | |
setTimeout(function() { | |
console.log("myVar should be 1, but isn't: " + myVar); // should be 1, but isn't | |
}, 100); | |
})(); | |
(function() { | |
myVar = 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
Stopwatch sw; | |
var ints = Enumerable.Range(0, 25000); | |
Func<int, double> func = (x) => { | |
double result = 0; | |
for(var i = 0; i < x; i++) { | |
result += Math.Cos(i); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TermFinder: | |
@staticmethod | |
def find_terms(to_search, terms): | |
resultDict = {} | |
for term in terms: | |
resultDict[term] = TermFinder._find_term(to_search, term) | |
return resultDict | |
@staticmethod | |
def _find_term(to_search, term): |