Siv Scripts

Solving Problems Using Code


Fri 16 October 2020

My Week of JavaScript

Posted by Aly Sivji in Thoughts   

I had two weeks of vacation planned around PyCon, but canceled it since it didn't make sense to take time off when I couldn't go anywhere because of COVID-19.

I was feeling pretty down when the conference start date passed. I had spent the past few months looking forward to …

Read more...







Mon 27 January 2020

Managing Python dependencies with pip-tools and requirements.txt

Posted by Aly Sivji in Quick Hits   

The paradox of choice in Python packaging tools makes dependency management more complex than it needs to be. In this Quick Hit, we will explore Python dependency management and demonstrate an easy-to-implement workflow to generate reproducible environments.

Note: this article assumes familiarity with virtual environments.


Background

We use dependency management …

Read more...



Wed 21 November 2018

Patching Import Inside Function

Posted by Aly Sivji in Quick Hits   

I started my first tech job at a large corporation. We have lots of internal tools and systems that allow us to solve large-scale data problems. It's been an interesting change from startup life where platforms weren't as mature, where systems weren't as integrated into workflows and processes.

While I'm …

Read more...


Sun 21 October 2018

Testing 101: Introduction to Testing

Posted by Aly Sivji in Deep Dives   

Programming is writing code to solve problems. Software Engineering is the practice of using a structured process to solve problems. As engineers, we want to have a codebase we can change, extend, and refactor as required. Tests ensure our program works as intended and that changes to the codebase do …

Read more...


Sat 20 October 2018

Transfer Files with rsync

Posted by Aly Sivji in Quick Hits   

I recently purchased a new computer and needed to transfer files from the old computer to the new one. Tried a USB drive, no luck. Tried copying files over the network via the macOS Finder, but the sheer number of files (~500,000) made this an exercise in futility.

Googling …

Read more...








Mon 30 April 2018

Trust the Process

Posted by Aly Sivji in Thoughts   

The journey of a thousand miles begins with a single step.

Everything in life that's worth having requires effort. In tech, it also requires convincing somebody you are good enough to take a chance on.

A few months ago, I pivoted from data into web development because I wanted to …

Read more...


Sun 04 March 2018

People-centric Organizations

Posted by Aly Sivji in Thoughts   

(Note: This essay was written for my Foundations of Leadership course.)

Software Engineering is the discipline of Computer Science concerned with “developing and maintaining software systems that behave reliably and efficiently, are affordable to develop and maintain, and satisfy all the requirements that customers have defined for them” [1]. Creating …

Read more...


Mon 26 February 2018

PHP + MySQL using Docker Compose

Posted by Aly Sivji in Quick Hits   

Being a Software Engineer isn't just about being effective in a specific programming language, it's about being able to solve any given problem using the tools at hand.

This week at work I have to extend the functionality of a WordPress plug-in so it can fit into our microservices-based backend …

Read more...



Fri 05 January 2018

@ Python's Matrix Multiplication Operator

Posted by Aly Sivji in Quick Hits   

2017 will forever be etched in our memories as the year Python overtook R to become the leading language for Data Science. There are many factors that play into this: Python's simple syntax, the fantastic PyData ecosystem, and of course buy-in from Python's BDFL.

PEP 465 introduced the @ infix operator that is designated to be used for matrix multiplication. The acceptance and implementation of this proposal in Python 3.5 was a signal to the scientific community that Python is taking its role as a numerical computation language very seriously.

Read more...



Mon 01 January 2018

Increasing namedtuple Readability with Type Hints

Posted by Aly Sivji in Quick Hits   

Dynamic typing refers to programs checking variable types at runtime versus compile time. By not having to define the variable type as we write code, we can work faster and take advantage of duck typing.

On the other hand, we do miss out on some benefits that types bring. Similiar to how the principles of test-driven development force us to write smaller, more testable functions, thinking about types improves software design by making us cognizant of the values our variables hold as well as the values our functions can return.

Read more...


Sun 31 December 2017

2017: Year in Review

Posted by Aly Sivji in Thoughts   

Here’s to the new year. May she be a damn sight better than the old one, and may we all be home before she’s over.

End of year is the perfect time to reflect on the past and to plan for the future.

2017 Highlights

  • Became more public …

Read more...





Sun 19 November 2017

HTTP: Hypertext Transfer Protocol

Posted by Aly Sivji in Deep Dives   

The startup I work for is making a transition into a microservices-based architecture. I'm working with a Senior Engineer to design a new backend platform based off our current monolith.

We plan on having a bunch of REST API endpoints in containers that DevOps will orchestrate using Kubernetes. The current …

Read more...


Sat 18 November 2017

Soaking it in

Posted by Aly Sivji in Thoughts   

Truly wonderful the mind of a child is

It was an action packed week at work: we migrated our infrastructure to the Google Cloud Platform and into Kubernetes. Pods, nodes, deployments. Oh my!

Not that I helped much with the migration; I'm new and still learning the ropes.

I know …

Read more...


Sat 04 November 2017

First Month as a Professional Developer

Posted by Aly Sivji in Thoughts   

The best laid schemes o' mice an' men
Gang aft agley

I started a new job as a Mathematician / Software Engineer at a Chicago-based healthcare startup in October. It's my first proper development job and I could not be more excited.

I get paid to write code. It's pretty awesome …

Read more...


Sat 07 October 2017

Terminal Tricks: Directory Bookmarks

Posted by Aly Sivji in Quick Hits   

Even though my development folders are well organized, I still have to feel my way around the filesystem when I'm looking for a project directory. It's like trying to find a lightswitch in a dark room: a cd here, an ls there, maybe a find when I'm stuck.

I always …

Read more...



Fri 22 September 2017

Code Complete

Posted by Aly Sivji in Thoughts   

2017 is the year I became deliberate about my approach to programming. Like most newbie developers, I hacked together spaghetti code around chunks of answers I found on StackOverflow (Praise Be).

I didn't care how I solved the problem, only that it was solved enough to cross off my todo …

Read more...


Sat 09 September 2017

Visualizing Stacks

Posted by Aly Sivji in Quick Hits   

A stack is a linear data structure that holds a collection of items. We can define operations performed in a stack from the point of view of a user:

  • .push() - add item to top
  • .pop() - remove and return item from top
  • .peek() - return top most element
  • .is_empty() - True if stack …

Read more...







Wed 17 May 2017

A Gentle Introduction to Context Managers: The Pythonic Way of Managing Resources

Posted by Aly Sivji in Tutorials   

Summary

  • Explore with statements and the context manager protocol
  • Implement context manager class to query MongoDB
  • Convert try...finally block to with block and increase code readability

I recently read Steve McConnell's Code Complete to level up my software development skill-set. The book has helped me become more deliberate about programming and problem solving in general. Before I sit down to write a single line of code, I take some time to plan out the work I am going to do versus code by the seat of my pants

Read more...