TechHui

Hawaiʻi's Technology Community

Leo D's Blog (6)

Google API Authorization Using Oauth2 in Ruby on Rails

Added by Leo D on April 22, 2015 at 6:30pm — No Comments

Ruby on SOAP

The slightly misnamed SOAP (Simple Object Access Protocol) protocol is in a sense a type-strong version of the much better know JSON interchange format.  The Ruby community clearly doesn't have as much affection for SOAP as the Java and .Net communities, but that makes sense as Ruby is a dynamic language with duck typing, which meshes better in philosophy with the lightweight JSON format, rather than the much more expressive and heavyweight SOAP format.

If given the choice between…

Continue

Added by Leo D on March 9, 2015 at 7:00pm — No Comments

Importing large data sets in Rails and Postgres

In one of my recent projects, I needed to import a lot of data from csv files into a database as persisted domain objects in a web application.  This file import functionality wasn't just for application bootstrapping or a one-time legacy data migration, but for a recurring task that allowed the web app to receive updates from a third party vendor.

The number of records in each file could reach into the millions, so I knew from the outset that the plain-vanilla method of creating…

Continue

Added by Leo D on September 16, 2014 at 3:00pm — No Comments

writing a json api service in Rails

In the past few years, I've written a few json API's in rails.  There are a few trends driving the popularity of API's, one being Service Oriented Architecture, and another being client side rendering.  

Service Oriented Architecture can apply to all services, not just browser accessible ones.  It consists of making services available via a standard like SOAP or JSON, to increase re-usability and modularity, SOAP and JSON being the two most popular SOA protocols.  SOAP is XML-based,…

Continue

Added by Leo D on September 5, 2014 at 5:00pm — No Comments

A pretty neat programming interview question

Added by Leo D on March 24, 2014 at 10:03pm — 1 Comment

Sequencing computations in Javascript

Sequencing computations in Javascript

Given any sequence of simple assignment statements concluded by a return statement, we can view the whole sequence

as a function that executes the first statement,

and then executes and returns a function that contains the rest of the statements.

For example, this sequence of two statements, which results in 6,



x = 3;

2*x;

=>

6

can be re-written as:



(function(x){

return…
Continue

Added by Leo D on March 20, 2014 at 2:00am — 1 Comment

Sponsors

web design, web development, localization

© 2019   Created by Daniel Leuck.   Powered by

Badges  |  Report an Issue  |  Terms of Service