Posts Tagged “programming”
Things that are related to programming or development.
-
Batman Dialer Project #1
21 August 2024
I want to build a security combination lock out device hidden inside of a
statue bust of a later to be determined character1. I want to extend this
project to do many different features and be a sort of entertaining puzzle for
people to play with. To do that I’ve decided to start a series of blog posts
describing my thought process through this, the inspiration, and how I built
it. Hopefully you enjoy my description of the process and you find some
interest or learn something new from this.
I’m debating between Athena, Da Vinci, or some possibly obscure Futurama reference. ↩
-
Using SQLite Extensions with Gorm
10 August 2024
I’ve been building a site in Golang using Gorm as my object relational
mapper because it’s a pain to map things into a struct and use the scan
interface. Not really using it as a query builder, but it’s still handy. I
recently wanted to use some extensions in my queries to do things like unicode
normalization and similar functions. I was also sick of waiting for Cgo
compilation times so I switched to a webassembly build of sqlite embedded into
my go project.
-
How I Updated Ruby on My Arch Box Cause the System One Was Out of Date
15 April 2024
I just moved my laptop to run an arch derivative because I got a new SSD
installed for more exiciting projects. To my surprise the current version of
ruby in the repos was out of date by 9 months. So I had to learn how to use
rbenv in order to build my blog and deploy new posts. It’s just like virtual
environments with python, but unfamiliar because I only use ruby because I did
this site in Jekyll, and to migrate would defeat the purpose of this site which
is to share my writing and show off the cool things I built.
-
Porting a Linux Program to Run in Browser using Emscripten
21 December 2023
On my infinitely long list of things I wanted to implement one of them was
taking a binary and stuffing it into a webpage to run entirely client side. Today I have accomplished just that with
my new Atari 2600 IDE. This allows you to write an assembly program
entirely in browser and run it without setting up any kind of toolchain on your
own machine. The following are my notes on getting emscripten, a way to
compile c/c++ to run in browser using llvm and wasm, to generate a binary and
interfacing that binary with some vanilla Javascript.
-
Tire Pressure & The Polar Vortex in Jupyter Python
05 February 2023
I had low tire pressure yesterday due to the polar vortex, so I added
additional air to my tires to about 34PSI at 22F, today it is much warmer at
nearly 50F and the PSI went up more than I expected. Also the PSI doesn’t seem
to change as much from Spring to Summer, when the weather can swing up more
than 20 degrees from night to day. I decided to write some python to try to
figure this whole thing out using the Ideal Gas Law. Also no attempt was made
to account for the weight of the car, and how that adds pressure to tire.
-
Mastodon and the Fediverse
22 December 2022
I’ve recently got fed up with the standard centralized social media, so I
joined Mastodon. Everything was feeling incredibly fake as of late.
It’s hard to build real connection on the large sites. This is my experience
joining the fediverse and tildeverse. I’ve always been interested in old
school social networks like BBS, and the whole lore that surrounds them, so I
decided to get more involved with Mastodon as hosted by SDF. I’ve had
a shell account with them since 2016 and I’m sustaining member too. It’s nice
to try out their other hosted applications.
-
Building a Go Application Inside of AWS CloudShell
29 September 2022
I’ve been learning a little bit of golang as of late, and I wanted to run it on
AWS Lambda. I had a couple errors come up about my libc, and learned that
I need to build my applications on Amazon Linux, so they can run on lambda. I
didn’t want to set up a CodeBuild just to play with a few toy example programs
or setup a couple docker containers. In fact we don’t even need to since AWS
provides CloudShell, a complete shell environment available to every user
of an AWS account.
-
Implementing a Table Create & View Update in Athena using AWS Lambda
01 February 2022
I have a DynamoDB table that is automatically exported as JSON to
compute some reports. I wanted to automate the table creation process
and load steps. Amazon Athena allows querying from raw files stored on
S3, which allows reporting when a full database would be too expensive
to run because it’s reports are only needed a low percentage of the time
or a full database is not required. It’s billed by the amount of data
scanned, which makes it relatively cheap for my use case.
-
Exporting the AWS ReInvent Calendar to iCal
23 November 2021
I went to AWS Reinvent this year, and I wanted my registered events to
show up on my personal calendar. I’m honestly surprised they didn’t
implement an iCal export for your registered events. So I took these
steps to get them.
-
Programming Practice Sites I Like
15 November 2021
I’m not a huge fan of hacker rank and it’s use in our industry. I find
the problems to be boring and repetitive, so I’m listing out some of my
preferred practice sites as a couple of alternatives with more fun and
more interesting problems. I will concede that hacker rank does have
excellent SQL practice though. They are the only ones I found with some
really good problems and a variety in engines. Enough of that though,
let’s jump into some of the ones I like better.
-
TIL my site is a JAMStack site.
10 September 2021
Today I learned that my site which has been basically the same since
2016 is a JAMStack site. Although it was coined in 2015 by
Netlify, it seems to have become really popular in the past 2 years as a
term. I’m told it’s more of a theoretical framework than anything else.
JAMStack stands for JavaScript, APIs, and Markup.
-
Search Suggestions on My Website
27 July 2021
I previously talked about the search engine I recently added to my
blog, and this is an extension to that previous post. Here I will
discuss how I added a simple search suggestion option. It works for my
website with the limited vocabulary and time to return results, but if I
was working on a larger site I might try to make it smarter. So here’s
how I implemented it.
-
The Problem with Regex Search and Replace in Java
15 July 2021
I had an issue where I needed to support
search and replace of certain quoted strings in various scripts which take the
form of $(VARNAME). There’s a minor issue with Java where if the replaced by
string contains certain characters where it will quit with an unhelpful message
like “IndexNotFound: Match group 5 not found” or something similar. This is how to
resolve that error, and the importance of escaping things.
-
Using a Bash Script to Generate Random Fake Data To Insert Into DynamoDB
30 March 2021
I’ve been studying for my developer associate certification on Amazon
Web Services. I’ve been practicing with the various streaming solutions
like SQS and Kinesis lately. I’ve wanted to branch into using DynamoDB
and capturing changes. To do that I needed to generate a lot of take
data.
-
Converting a JavaScript array of strings to numbers, and the problem with `Array.map`
15 March 2021
JavaScript has a very weird type system with how strings can sometimes
be converted to numbers. It’s a very cool feature but can cause a lot of
pain because adding 1 doesn’t always do what you think it should due to
type-juggling. So you might think there’s an easy and relatively
foot-gun free to convert an array of strings to numbers. You would be
wrong, well maybe not at least if you don’t use the functional language
stuff in JavaScript or just do an in-place update or your array, but
that’s besides the point.
-
Interactive Breadth First Search in a Grid
20 December 2020
Breadth first search(BFS) is a very powerful and useful algorithm for
exploring graph like structures. A BFS searches it’s nearest neighbors first
before moving on. It’s main use is to find a path using
the fewest hops. Here we use it to explore a grid that can be modified
by a user. In this grid, we have verticies (the grid boxes), and edges
(the box north, south, east and west).
-
Lights Out Game
29 July 2020
Shown below is a lights out kind of game. Scores are not tracked or anything
it’s just something meant for fun. The goal is to get the board either completely
lit up or completely black. It inverts the color of whatever you click on and those directly adjacent squares. Those squares directly to the north, south, east and west.
-
My Relative Credit Card Spend
03 January 2019
I’ve had a credit card now for about 2 years, so I thought I would make
a cool visualization that shows my relative spend through out the year
on a daily basis. I think this plot came out to be relatively cool.
-
Reimplementing the Tree Command
30 September 2018
I decided I’m going to try to reimplement the tree utility from
scratch in a very limited version. Mine will only work from the current
directory and will support no arguments. This article will take you
through my implementation of the problem.
-
A Brief Introduction to AWK
30 December 2017
This will be brief introduction to awk and it’s many uses. I will show a
few brief segments about various uses of awk and when it comes in handy
for certain tasks. For more detail one should read the
Awk User’s Manual.
-
CyberSeed 2017 - Application Security
21 October 2017
I recently competed at the 4th Cyberseed event at UConn in the
application development competition. The challenge was to build a secure
application according to specific specifications before the competition. Then
the individual teams would attack each others apps in order to collect various
flags placed in our apps. This year was the first for this particular event,
and the challenge was to build a secure medical repository. The teams were
then given the source for each others apps a couple of days before the event.
This event was a lot of fun and lead to a lot of lessons about secure app
development for me.
-
Finding the Largest File Stored in Your Git Repository
30 January 2017
This command will find the largest file from the output of git ls-files
which outputs the path to each of the files stored in git below your
current directory.
-
Calculating the Size of Your Video Library
07 December 2016
This command will calculate the size of your movie and video library in
days. You can modify the awk command as you see fit to calculate the time
lengths.
-
Coin Frequencies
07 November 2016
I was counting some coins and was wondering if some coins should be
produced more frequently because they would be used more often so I wrote
an minimized change count algorithm to decide if certain coins should be
produced more often.
-
Sine-Cosine Demo App
06 September 2016
I had to create a sine-cosine demonstrator for a class, this is that demo.
-
A SQLite Tutorial
24 May 2015
This is my in-depth SQLite tutorial for C++. This is the first
tutorial I am doing on this website. It is really difficult to find a good
tutorial for prepared statements with SQLite, and that is what this tutorial
will remedy.