{code that works}

by Sadique Ali

Understanding trailing @ processing in SAS input

Posted on Sat, Mar 23, 2019

One of the first things I noticed when I started poking around in SAS code is that the input statement is very powerful, flexible and hence sometimes hard to understand. It can read pretty much anything in to a dataset as long as you tell it what to do. The use of trailing @s to take control of how SAS advances the input pointer is a powerful technique to read from input files where the data is laid out in non-standard formats.

Importing the SASUSER datasets in SAS Studio

Posted on Sat, Mar 23, 2019

I have been playing around with SAS for the last two weeks. I started with a SAS University Edition running on a VirtualBox instance on my MacBook, but soon realized that it was way more convenient to use a SAS OnDemand account. Having made the switch, I realized that all learning materials made references to and used examples with datsets from a library named SASUSER. It was not clear how to get these datasets and use them in SAS Studio.

My talk at GraphQL Summit 2018

Posted on Fri, Nov 9, 2018

I had the opportunity to give a talk at GraphQL Summit 2018 about the experience of introducing GraphQL for our Payments API at Braintree. It was well received, as far as I could tell - I received a lot of nice feedback and had great conversations with members of the community. The slides are available here on SpeakerDeck. I will update this post with links to the video of my talk when it becomes available.

Formatting Java Instant for resolutions

Posted on Sat, Jun 9, 2018

I have had to look up how to format Java’s Instant with a given resolution - for example in microseconds or nanoseconds. After fiddling with various formatters, I was happy to finally get this right.

FreeBuilder plugin for IntelliJ

Posted on Fri, May 4, 2018

My work uses FreeBuilder extensively to generate the Builder pattern for Java classes. In addition to this, we use the generated Builder classes to deserialize the data calsses using Jackson. After a while it became tiresome to type @FreeBuilder and class Builder extends ... everywhere. So I decided to write and IntelliJ IDEA plugin that does it for me.

Command line clients for gRPC - polyglot

Posted on Thu, Apr 5, 2018

Polyglot was the second gRPC client that I looked at. One of the things that I liked about it is the fact that it does not need users to generate protoset files. It generates the protoset files in flight every time it runs. This, combined with the fact that it is written in Java does have a disadvantage - every time the client makes a call, it has to fire up a JVM, generate protosets and make the request.

Command line clients for gRPC - grpcurl

Posted on Tue, Apr 3, 2018

We are in the middle of considering replacing JSON over HTTP with gRPC for communication between our internal services. One of my concerns about this was how we would be able to debug and poke around things in a world where we will no longer be able to use cURL. I have been looking at cURL like command line utilities we can use to replace most of the capabilities, if not all of cURL. So far, I have looked at grpcurl, grpc_cli and polyglot .In these blog posts, we will try and compare these tools.

A Jackson and FreeBuilder quirk

Posted on Thu, Mar 22, 2018

Jackson is a great tool to have in your tool set if you deal with JSON or XML. It facilitates easy serialization and de-serialization to and from Java classes with a convenient annotation based interface. With the same set of annotations, we can achieve both XML and JSON serialization and de-serialization. With Jackson’s data-format-xml it is even possible to give the same Class a different JSON and XML representation.

Net::HTTP and the simplest of explanations

Posted on Wed, Mar 21, 2018

This blog post exists purely to remind myself that Ruby’s Net::HTTP expects a host and a port as parameters when creating a new connection and not a url string. This is a story about how many layers of abstractions and indirections one works through on a daily basis as a developer and the effort required to dive through these layers, all the while ignoring the simplest of explanations of why things may have gone wrong in the first place.

Python URL manipulation revisited

Posted on Mon, Sep 25, 2017

My last blog post about publishing standalone files to Nexus repositories prompted me to revisit URL manipulation in Python. When I did this the last time, I used Python stand library’s urlparse and it did the job. This time around, I needed to do a different kind of manipulation. Given a URL, I had to set credentials on it. I started at urlparse and soon realized that Python3 moved this module to urllib.