NYC Developer Pro

  • Archive
  • RSS
  • Ask me anything
  • Submit a post
Function composition is the process of applying a function to the output of another function. In algebra, given two functions, f and g, (f ∘ g)(x) = f(g(x)). The circle is the composition operator. It’s commonly pronounced “composed with” or “after”. You can say that out-loud as “f composed with g equals f of g of x”, or “f after g equals f of g of x”. We say f after g because g is evaluated first, then its output is passed as an argument to f.
Composing Functions, part of a Series on Compositional JavaScript
    • #javascript
    • #composition
    • #medium
    • #design patterns
    • #programming
  • 8 years ago
  • 4
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

USGS Releases New JavaScript Library to Create Location Search Widgets for Web Applications

Yummy!

    • #javascript
    • #usgs
    • #widget
    • #web development
  • 8 years ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

A collection of .gitignore templates

fraterartifex:

github, github.com

This is GitHub’s collection of .gitignore file templates. We use this list to populate the .gitignore template choosers available in the GitHub.com interface when creating new repositories and …

If I only would’ve known about this earlier. A time-saver, for sure.

The *shiznit* of jolly ole _.`gitignore`_ files. Almost good enough to whittle away the wee hours of a Sunday morning over… Okay, sure, *at least that good*—good enough that *The Donald* could shakes a tail-feather.

image

Originally posted by vanityfair

    • #thedonald
    • #trump
    • #donald trump
    • #president
    • #idiocracy
    • #snl
    • #github
    • #gitgnore
    • #giterdone
  • 8 years ago > fraterartifex
  • 1
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

4 Line Node.js HTTP Test Server

obscurejavascript:

I don’t usually use libraries in my blog posts, but with just 4 lines of code it is possible to create a simple server HTTP server:

var connect = require('connect'),
    serveStatic = require('serve-static');

connect().use(serveStatic(__dirname)).listen(process.argv[2]);
console.log('Now listening on port', process.argv[2]);

Which is run like:

node server.js 8080

With 8080 being the port number. This will create an HTTP server that can server all the static assets in the directory that server.js is placed. Which is really useful for quickly testing pages in any location on your hard drive when you don’t want to setup a server. Keep in mind that, just opening up the file in the browser can lead to a bunch of issues when accessing external resources on the page.

connect.js is a framework to build servers. While serve-static.js just creates middleware that servers static files at a given location. __dirname is a Node.js constant which gives the current location that a file is in. And finally, process.argv is just the array of all arguments passed to the file (including node).

The libraries can be installed with npm which comes with modern Node.js versions:

npm install connect serve-static

Github Location: https://github.com/Jacob-Friesen/obscurejs/blob/master/2015/server.js

  • 8 years ago > obscurejavascript
  • 27
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+
Pop-up View Separately
  • 8 years ago > learntocodewithme
  • 166
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Introducing RumbleX!

nodeknockout:

NKO Team here to pass along some exciting news. We’re partnering up with Rails Rumble to form a brand new organization called RumbleX!

Both Node Knockout and Rails Rumble will continue to run as yearly competitions (stay tuned for dates!). In addition, we’ll be launching some new competitions in 2016. Sooner than you might think too 😀

We also have one more person joining us at RumbleX. Nick Plante, aka zapnap, the co-creator of the 48 hour virtual competition structure, and the co-founder of Rails Rumble way back in 2007. Damn, that’s so long ago millennials consider it “back in the day”.

Keep your eyes peeled because we got some great stuff brewing.

Follow @RumbleX on Twitter.

  • 8 years ago > nodeknockout
  • 3
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+
This is not a style guide in the usual sense; I’m assuming you already have your opinions on JavaScript indentation and all the other religious standpoints, so I’m going to focus on some Node specifics I find essential.
Node.JS: Style and Structure (via nodeninja)
  • 8 years ago > nodeninja
  • 2
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+
This is an apples to oranges comparison. PHP is an older language, running behind the Apache web server in a request/response fashion. Node.js is a non-blocking event-loop framework running JavaScript within the V8 engine, with an optional web server built in. Then again, is it really an apples to oranges comparison? Both technologies are commonly used to serve webpages to browsers.
PHP + Apache Stack vs Node.js (via nodeninja)
  • 8 years ago > nodeninja
  • 6
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Test Driven Node.JS Development

TDD your node.js

  • 8 years ago > nodeninja
  • 3
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+
Node.JS is a terrible platform. It’s terribleness stems from a very simple aspect of it, and this aspect happens to be central to how it works: callback-based I/O

Why Node.JS is absolutely terrible

I don’t necessarily agree with the post (mainly because most of the things this guy hates about Node is what I like), but it is an interesting viewpoint.

(via nodeninja)

  • 8 years ago > nodeninja
  • 5
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+
Page 1 of 2
← Newer • Older →

About

Software Engineer πŸ’™ NYC πŸ’™ Ruby, Node, React, Full-stack, Mobile (iOS & Android) πŸ’™ Made in NYC

Me, Elsewhere

  • @nycrubypro on Twitter
  • oddlyzen on github
  • RSS
  • Random
  • Archive
  • Ask me anything
  • Submit a post
  • Mobile
Effector Theme — Tumblr themes by Pixel Union