Dev box
I'm a 32-year-old Ruby on Rails web developer. With the help of friends and co-workers, I've been teaching myself Rails. I worked as a Rails developer for Crowd911 in Colorado. I live in Berlin.
In my developer blog I publish a stochastic array of thoughts and ideas, lessons, mistakes, questions and attempts as answers about Rails and Ruby. I am also posting Anki cards that I used to help myself study. In my view most knowledge is about practice. If you have thoughts, questions, ideas, corrections, arguments, feel free to email me at henryvw@gmail.com.

What is a Runtime Environment / a Run-time Library?

The runtime environment is a category for a library of functions, which every computing language has, that operates during the runtime of the program.

You could call it simply a library. It is a library of functions. However these special 'runtime' functions are necessary for the program to work properly while it is running. 

Node.js is an example of a runtime environment. It is a javascript runtime environment designed for servers to serve and communicate over a network (beziehungsweise the world wide web, via HTTP). 

Read More
Javascript, Node, Runtime

What is the difference between the Internet and the World Wide Web?

This is an obvious, but important question, that many people don't actually know the answer to.

The Internet is a system of networked computers registered by IP addresses to access a shared frame. Millions of computers are linked to the internet.

The World Wide Web is an information space where documents, e.g. HTML DOMs, are accessible via URIs, e.g. web URLs. (URIs which, in addition to providing a specific identifier or "name" like a URI, also provide the "address" where you can locate it on a Server). The World Wide Web serves and edits these documents based on the HTTP language. The World Wide Web is built on top of the Internet - i.e. the IP connections. The HTTP language and HTML DOMs are just one of many types of languages and documents/data that can be transferred across the Internet. 

Read More
Computing Theory, The Internet, WWW

Concurrency is not parallelism

Screen shot 2015 07 29 at 11.48.17 am

What is concurrency?

Concurrency is how you structure and handle inbound requests to be processed efficiently.

A user clicks on a button and the button makes a GET request from a server. Meanwhile you are still loading a different piece of the web page. 

What is parallelism?

Parallelism is running processes simultaneously.

Your concurrent structure determines which, and whether, certain processes (threads) will be run in parallel, as the most efficient method to complete them quickly and successfully.

What is a thread? 

A thread is the smallest process which can be handled by itself.

What is the meaning of the gopher image?

Concurrent composition

This design is not automatically parallel!

What if only one gopher is moving at a time? 
Then it's still concurrent (that's in the design), just not parallel.

However, it's automatically parallelizable!

Moreover the concurrent composition suggests other models.

Read More
Computing Theory

Gulp, Browserify and NPM - Using A Particular Javascript Combination

The ancient philosophers always start by asking the question, how do we define our different terms?, because this question is the doorway to a shared understanding.

How do we define NPM?
NPM might be compared to Gems or Bundler in the Ruby world. NPM manages Javascript packages (SOMETIMES called modules). A package consists of the relevant files, plus a package.json file. The package.json file contains meta-data about the package. It is similar to a Gemspec file in the Ruby world. Note that Node's approach, which is imitated in NPM, is to encourage the writing of small, distinct libraries that solve small, particular problems very well.

How do we define the tool Gulp?

Gulp might be compared to a Rake Task. Gulp minimizes and uglifies your Javascript.

How do we define Browserify?

Browserify combines all separate Javascript files into one giant file. It uses modules similar to NPM. 

Gulp + Browserify? 

We might think of Gulp and Browserify together as 

How do we define CommonJS?

CommonJS is an attempt to offer structure in defining Javascript modules, to solve Scope problems in Javascript. CommonJS makes a standard format that forces you to expose the appropriate variables to the "universe." 

Node.JS also standardizes module structure for Javascript 

https://github.com/greypants/gulp-starter

Read More
Javascript, NPM, Gulp, Browserify

What are the differences between Bower and NPM?

There are a number of key differences between Bower and NPM.

Bower is widely used for front-end packages. Many Javascript libraries are keyed around the front-end. Bower is also "unopinionated." It works well with many different tools, like RoR and PHP projects.

NPM is widely used for both front-end and back-end packages. This is partly because NPM was conceived for Node, (the Node Package Manager). NPM has more packages than Bower. NPM also has the ability to enable different versions of dependencies. This seems like it would make things more complicated, but it can be very helpful to avoid "Dependency Hell."

 

 

Read More
Javascript, Bower, and NPM






Footerfull