Cuttlepress

Blogging about Hacker School?

Day 18

Scattered and frustrating day. I variously worked on planning a high school workshop, the Tic Tac Toe game, Sass, and a Metaphone implementation in JS and was variously thwarted by poor communication, apathy, the hackiness of CSS with respect to equal-height columns, and file I/O, respectively. This is pretty much what I’ve got for today:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var fs = require('fs');
var filename = "speech.txt";


var ampersand = function(lines){
  console.log(lines.split(RegExp("[^A-z]{1,}")).join("&"));

}

var main = function() {
  var lines = fs.readFileSync(filename,'utf8');
  ampersand(lines);
}

main();