Showing posts with label api. Show all posts
Showing posts with label api. Show all posts

Monday, April 30, 2018

Building an API on NodeJS with Mongoose





I spent a couple more pomodoros than expected, but I cleared up a couple of points of misunderstanding about working with MongoDB.  Prima facie, NoSQL makes sense, and certainly seems more attractive than working with a relational database.  I've heard from some people who are more accustomed to working with MySQL and PostgreSQL that MongoDB doesn't scale well, but I don't have enough commercial experience of the two approaches to have an opinion yet.

I find this approach, of writing the code out by hand, is an excellent way of forcing myself to slow down and meditate on the material.  I bear in mind that I save myself time on Stack Overflow in the long run; and at any rate, it makes me more self-reliant and better at RT(F)M.

Sunday, December 11, 2016

State of the Mission: Sunday, 11th December 2016

Week 50 of 2016


Mission DevOps

Work Completed

I started Learn Ruby the Hard Way, got up to Chapter 40, and have been posting about my learning along the way.

Plans for Next Week

Focusing on Learn Ruby the Hard Way is proving as beneficial as I had hoped, and I have every reason to complete it by the end of Week 51 of 2016.  Thereafter, my focus will be on PROJECTS, i.e. something to show for all my efforts.
  1. Transferring my Pastebin to Gist using APIs.
  2. The Toy Robot Challenge
  3. Advent of Code
  4. Starting my job research web scraper and analysis tool.
There is every reason for me to get started on substantive projects that I can put on Github and then direct all and sundry to.  Owing to the paucity of code in my Github, I have been reticent to contact potential recruiters and apply for jobs, but come the last of December, business shutting down notwithstanding, I should have every reason to send out missives and apply online. 

Special Project

My super-special-but-perhaps-not-so-top-secret project is ticking along on schedule.  I have a few more weeks to go, so that's all I've got to say about it for now.

The Odessia

Not much progress on the Odessia this week, but my schedule will permit a lot more creative writing time soon.

Personal Matters

Just the usual washing, cleaning, tidying for the most part.  I have been in touch with uncle, who has been unwell, and attended to the usual bits and pieces that crop up.  One day, when I'm very wealthy and successful, I will have a secretary to handle these matters.





Friday, December 2, 2016

From Pastebin to Gist: Not So Fast!


I published my first paste on Pastebin five years ago (at the time of writing), and Pastebin has been very good to me ever since, but it's time to migrate my data to Gist on Github.

I looked around for an automated migration solution, but couldn't find any.

Then I thought about copying and pasting all my pastes, but that's stupid, laborious work, and no self-respecting programmer would do something so repetitious.

So what's the clever solution?

The following headers are the skeleton of my plan.  I will update this post as I progress.

Part One: Get the raw pastes from Pastebin

Pastebin API

Pastebin has a scraping API and a developer's API which costs a lifetime membership.  At the time of writing there is a big discount on lifetime membership, so I bit the bullet and got it.  The practice it gives me will be more than a decent ROI.

Construct the Query, in Ruby

All the sample scripts are given in PHP, but there must be a way to do it in Ruby, or failing that, in JavaScript.

Execute the Query

Part Two: Upload the raw pastes as separate Gists

Github API

Construct the Script, in Ruby 

Execute the Script


1,050 hours

It took me 13 working days to complete my first 100 "work" pomodoros as a Junior Software Tester at Profectus Group.  Much of ...