Coder Social home page Coder Social logo

Hi, I'm Aslam 👋🏽

  • 🧑‍💻 Full Stack Developer
  • 📷 Photographer
  • 🎭 A long time ago, in a galaxy far far away, an actor

I am proficient in PHP, JavaScript, HTML, CSS, MYSQL and React with experience in front end development, system administration, database management and small API construction. Over 15 years, I have built many websites from scratch and with platforms like Wix, Squarespace and Wordpress.

After I developed a myofascial disorder, I left the arts and redirected all my resources into my love for technology 💻. When I am able, I still take the occasional photograph ➜ aslamhusainphotography.com.

Programming is a passion (code is poetry!). I love writing vanilla JavaScript, and the functional programming of React, but also the OOP discipline of writing PHP classes! As a self taught developer, I am always keen to learn more, particularly about lower level languages and Data Structures and Algorithms.

My first foray into coding was in the 1990s with Macromedia's Director (the prehistoric Flash). When I was 10 years old, I learned to program basic RPGs with action script and since then I've never stopped learning.

Things I've built recently

Wordpress Theme Development Environment package (with hot module replacement)

I built a composer package aslamhus/wordpress-hmr which streamlines WordPress theme development by integrating Webpack and HMR (Hot Module Replacement) for real-time updates during development. It provides a simplified asset management system through a configurable assets.json file, enhancing developer efficiency and enabling modern frontend practices within the WordPress ecosystem.

Repo: https://github.com/aslamhus/WordpressHMR

Spotify API Client

I built a Spotify API library in PHP to query the Spotify database, build playlists and get user data. It offers multiple options for authentication – managing user permissions, server-to-server use cases and refresh tokens. Other features include an ORM design for entities like Artists, Albums, Tracks and Playlists.

Repo: https://github.com/aslamhus/Spotify

GoogleDriveUploader Library

For a project that required archiving and uploading large audio files to a client's Google Drive account, I built a PHP Library that peforms basic uploads for small files and resumable uploads for large files, in this case over 300MB, with the Google Drive API v3.0. I enjoyed the many challenges of building this library such as using generator functions to allow for asynchronous uploads, providing an abort/cancel upload feature, and implementing a resumable upload feature that uploads the file in chunks. This library is publicly available to install via composer aslamhus/google-drive-uploader. I have provided extensive documentation about the set up which requires creating a service account on Google Cloud Console to handle authentication.

Repo: https://github.com/aslamhus/GoogleDriveUploader

Video Editor

I built a vanilla JavaScript video editor interface that can handle trimming and cropping videos in browser. While the editor doesn't perform any video manipulation by itself, it exports an object with user edits that can be sent to a backend service. I welcome contributions. If you are interested in contributing, please check out the repo and read the readme/contributing files.

Repo: https://github.com/aslamhus/

Rectangle Packer algorithm

For a project I'm currently working on I need to stitch multiple videos together on the server to create the illusion of multiple videos playing simultaneously. Playing 10+ simultaneously is not a viable option for the browser. However, stiching the videos together as a single video provides a workaround for browser constraints. But stiching the videos together into a grid on the server posed the following problem, "how do I fit a variable number of videos into dynamic screen sizes while maximizing the space used?" The videos' aspect ratio is known, but the grid dimensions and screen size are not. This is a NP-hard math problem, known as the Rectangle packing problem. I wrote my own heuristic algorithm that finds a best fit by starting with a best guess for the size of each video and then incrementing or decrementing the size until certain optimal constraints are met.

The second problem was to handle looping of the videos. Each individual video in the grid loops, so the grid video must loop as well. The hitch is that the videos have variable lengths. After much research, I used the Euclidean lowest common denominator with prime factorization in order to determine the shortest length the grid video would have to be in order to accommodate all the loops of the videos.

I wrote a PHP Library to solve these problems and stitch the videos together on the server using FFMPEG.

You can find the source code for a JavaScript and PHP implementation of the algorithm in the Repo. I also made a web application to test and analyse the algorithm which you can play around iwth.

Repo: https://github.com/aslamhus/RectanglePacker/.

Example: https://aslamhus.github.io/RectanglePacker/example

PHP QueryBuilder, Database and Search Classes

I wrote my own Database, Search and Query Builder classes, focusing on a fluent design that enables method chaining to facilitate MYSQL queries. I tried to balance flexibiltiy with complexity, leaving room to scale the classes for more sophisticated queries, while also avoiding unnecessary bloat that sometimes accompanies larger libraries. I chose PDO as the database interface layer. The higher level Search Class allows me to perform both FULLTEXT match...against searches and searches that leverage the LIKE operator with wildcards. I enjoyed writing with the fluent design pattern because it makes the code both readable and flexible.

Simple Log Class

For some of the more complex automations for clients, I am relying more and more on logging to maintain, watch and debug these systems. Though for production APIs I use the excellent library Monolog, I built a lightweight PHP Log class for my own projects with features for writing, searching, clearing, and overwriting log entries.

React piano keyboard

For a Jazz Radio station "coming soon" landing page, I built a simple piano keyboard which is playable with touch or the mouse.

See it in action https://straightnochaser.ca

React Table Component

I built my own Table component that handles operations like sorting, filtering, pagination and select and deleting rows. A particular challenge was to create an efficient pagination system for result sets with 10s or 100s of pages.

DevOps - Backup applet

Most recently, I used Linux/Applescript to build an applet that automates the backup of all the websites on my server. A cron job runs the app every month. It shows a progress bar that keeps me apprised of the backup status/progress (archiving directories, rsyncing, etc). Each backup/snapshot is organised by date and time, and I can customise the needs for each site with a .backupignore file. It also sends me an email report if the backup fails or is successful every month.

My first NPM package!

I use the File API a fair bit, so I decided to create a library/package I could reuse that selects, reads, and previews files.

Check it out here: @aslamhus/fileselect

Languages and frameworks I use

  • PHP
  • Javascript
  • React
  • Webpack
  • HTML
  • CSS
  • Linux
  • Jquery
  • MYSQL
  • Node

Passing familiarity with...

  • Swift
  • Java
  • Applescript

Skills I want to learn

  • Typescript
  • Python
  • Node
  • C++
  • Tensor Flow

Other Skills

  • Graphic Design / Retouching (Adobe Photoshop / Adobe Lightroom)
  • Video Editing (Final Cut Pro X)
  • API testing (Postman)
  • Writing (I'm also a playwright/poet)

Some of my recent web design work

Cory Weeds A website for one of Canada's leading Jazz musicians. Built with Wordpress. This website has several custom plugins, including a bandcamp plugin that displays all the artists available music in a custom music player.

Duende Management A UK based Talent agency. Built with Wix. I loved using Wix's javascript framework Velo to create an automated display of all the agency's actors. The client is able to update photos, description and stats for each actor without having to touch the design.

Kate Novak A UK based voice over artist. Built with Wordpress. I loved creating two different custom audio players using HTML5 and javascript.

Aslam Husain's Projects

c3po icon c3po

A binary translating C3PO game for my nephew

db icon db

PHP Database Class for mysql

db-v2 icon db-v2

A PHP Database wrapper for PDO operations, featuring a QueryBuilder and high level Search class

dragndrop icon dragndrop

a simple drag and drop class for javascript

email icon email

Wrapper for SendGrid API v3, providing a fluent interface for composing and sending emails in PHP, with features such as dynamic template data, attachments, and more

fileicon icon fileicon

Create a file icon image with any file extension.

fileselect icon fileselect

A simple library for selecting, reading, and creating previews of files. FileSelect can generate previews for pdfs and images (including HEIC).

googledriveuploader icon googledriveuploader

A PHP Class that simplifies Google Drive file uploads by providing convenient methods for both basic and resumable uploads, with support for asynchronous processing.

imgselect icon imgselect

React component to select, preview and read files

log icon log

Simple PHP Log Class for flexible logging to default or custom log files. Provides features for writing, searching, clearing, and overwriting log entries

paginatedtable icon paginatedtable

The PaginatedTable is a React component for displaying data in a sortable, filterable, and paginated table with customizable cell rendering. It is an extension of @aslamhus/Table component

rectanglepacker icon rectanglepacker

heuristic algorithm for efficiently packing rectangles of a fixed aspect ratio into a defined space, addressing the NP-hard bin packing problem through iterative adjustment of tile sizes and arrangement.

spotify icon spotify

A PHP library for interacting with the Spotify API, providing methods to make authenticated requests, retrieve resources, create playlists and perform searches.

table icon table

React component for building Tables with pagination, filtering and ordering methods

videoeditor icon videoeditor

a javascript video editor UI which can trim and crop videos.

wordpresshmr icon wordpresshmr

HMR setup with webpack and wp-scripts for wordpress development and production

xhr-wrapper icon xhr-wrapper

a wrapper for an XMLHttpRequest with abort token and progress handling

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.