b/Shannon (u/shannon)

Personal blog

p/Coming Back To Life

It's been sometime since I've really written any code. The last two and a half years have been pretty bad for me. I'll probably post about that some other day, but for now just know that I honestly didn't think I was gonna make it. But I did. And I'm really working to go from surviving to actually living again. I'm seeing a therapist again. I'm journaling again. I'm reading again. I'm working on software projects again. I'm trying to connect with friends again.

p/Writing Code Again

I'm writing code again. It's something I've always enjoyed, but I've taken significant time off, roughly two years. A number of issues forced me to take a break. Some of those issues are resolved, some I'm still dealing with. I'm working through the ones I can. Others will be with me for the rest of my life.
Anyhow, this application, DVRSLY, is the app I've been working on the most. Starting just three weeks ago, I've had to relearn a lot of the programming knowledge I used to have. I had to learn some new tech as well. I have experience with Ruby on Rails but not version 8, which I'm now using. I never used Docker before, so that was a bit of a learning curve. I also am learning Kamal, a deployment system from 37signals.
I truly enjoy writing code. I enjoy figuring things out and solving problems. I'm working on my own stuff for now. Yes, I could contribute to existing projects like mastodon, but I don't think I'm up to digging into such a large codebase. Maybe some day. Maybe I'll just continue my apps. There's no harm in more apps, more choices. Especially since DVRSLY, and a few of my other projects, are Free and Open Source Software (FOSS). If you're unfamiliar with the concept, you can read about it in the Open Source Guides.

p/All My Apps Look The Same

I'm building a few web apps. I'm using Ruby on Rails with Bootstrap CSS. I use a basic layout with a top nav, a footer, and the main content in-between. I use plain text almost exclusively instead of heavily stylized text or graphics. I prefer this style. It's simple, straightforward, and easy to navigate. I've been told by more than a few people that my apps are boring, ugly even. I think they are useful. While I believe an app can be nicely polished, it's not the most important aspect which is function. I remember having this discussion more than once. Form over function to me is pointless. You can build pretty pages, cool graphics, amazing color schemes. But if you have limited time and resources, give me a black and white, plain text site that actually does something any day.
Would you rather a car with beautiful body panels and a luxurious interior but no engine? Or would you like a car with missing panels, primer paint, but a functional drivetrain that can get you from one place to another?
I'll take ugly but functional any day.

p/Invisible vs Visible Disabilities

I’m full time wheelchair user though I can stand and walk a few feet but realistically if I can’t use my chair I ain’t going. I’m also AuDHD Level 1 / Primarily Inattentive.

I find it so much more difficult to get accommodations, help, or acceptance of my autism because people can’t see it. They don’t realize when I’m struggling if I don’t just up and leave or have a meltdown. I have held high paying jobs. I drive a car. I am verbal so people don’t believe that I’m autistic. Example: my roommate got her first taste of my struggles five years ago when I started screaming and crying and hitting myself because my laundry wasn’t done the right way. I was in my late 40s at the time.

My wheelchair is there for everyone to see. They cannot deny its existence. They might think I’m faking or just lazy, but they can’t ignore my chair. They can look at the steps leading up into a building and then look at my chair. They understand it’s a place I cannot go. They expect me to ask about accessibility for every place we go. They can see why.

But they cannot see my autism. Despite explaining sensory processing disorder and sensory overload, they still don’t understand why I don’t want to go to concerts, movie theaters with their blasting sounds. Or why it is physically painful to watch tv with flashing lights or fast jump cuts. They can only see my explosions. Or rigidity of actions and thought. And most times they see it because I didn’t get the support or accommodations I need.

p/Being Homeless Sucks

Being homeless sucks. I was homeless for a year. I lost my job and burned through my savings paying my mortgage. Eventually I lost my house and ended up homeless. I crashed at a friend’s place, cheap motels, and my car. I finally got a full time job but couldn’t get an apartment because of the foreclosure on my credit. I did my laundry at laundromats, cleaned up in bathrooms at Dunkin’ Donuts and Starbucks, slept in my car while parked with the truckers and other homeless folks in Walmart parking lots. About a year later I moved in with a friend permanently. Yeah, being homeless sucks.

p/12 Hours To Deploy

I spent about 12 hours to get a Rails 5 application, recently upgraded to Rails 8, to deploy to a new virtual private server, or vps. While the application ran fine on my local development machine, it did not run at all on the new production vps. Turns out that when you run the rails app:update tool it doesn't add all the new helper scripts and configuration files. It just adds some of them. I spent the last 12 hours figuring out what was missing, what needed to be updated, and what needed to be removed. Later today I will add a list of the files here. Right now I need to get some sleep.

p/Rails 6 to Rails 8 Upgrade and Deployment Through Kamal

This is a list of all the files added, modified, or deleted as part of the upgrade from Rails 6 to Rails 8, from MySQL to SQLite, and from hand deployed to Kamal deployed. I did not list application specific files if they did not require modifications to facilitate the upgrade. It's probably missing a few steps but it's what I can remember / find in my .zsh_history file.

I hope you find this helpful.

You can view the actual commits at https://github.com/smhauck/ProjectUseful/commits/main/. See the listing at the end of the page.

COMMANDS

(in approximate order)
bundle add kamal
rails app:upgrade
yarn install --immutable
rails credentials:edit
rails db:system:change --to=sqlite3
bundle add solid_queue
rails solid_queue:install

ADDED

Many of these files had to be copied from a clean Rails 8 app.
.dockerignore.kamal/*
.kamal/hooks/docker-setup.sample
.kamal/hooks/post-app-boot.sample
.kamal/hooks/post-deploy.sample
.kamal/hooks/post-proxy-reboot.sample
.kamal/hooks/pre-app-boot.sample
.kamal/hooks/pre-build.sample
.kamal/hooks/pre-connect.sample
.kamal/hooks/pre-deploy.sample
.kamal/hooks/pre-proxy-reboot.sample
.kamal/secrets
app/assets/stylesheets/application.bootstrap.scss
app/javascript/application.js
app/javascript/controllers/application.js
app/javascript/controllers/hello_controller.js
app/javascript/controllers/index.js
app/views/layouts/_navbar.html.erbbin/brakeman
bin/dev
bin/docker-entrypoint
bin/jobs
bin/kamal
bin/rubocop
bin/thrustconfig/cache.yml
config/credentials.yml.enc
config/deploy.ymlconfig/queue.yml
config/recurring.yml
Dockerfile
log/.keep
Procfile.dev
storage/.keep

MODIFIED

Many of the modifications in these files had to be copied from a clean Rails 8 app. Other changes had to be hand edited.

app/controllers/pages_controller.rb
app/views/layouts/application.html.erb
bin/setup
config/application.rb
config/boot.rb
config/environments/development.rb
config/environments/production.rb
config/environments/test.rb
config/initializers/assets.rb
config/initializers/content_security_policy.rb
config/initializers/filter_parameter_logging.rb
config/initializers/inflections.rb
config/initializers/version.rb
config/puma.rb
Add to .ruby-version
3.4.1
Add to bin/rails
APP_PATH = File.expand_path("../config/application", __dir__)
require_relative "../config/boot"
require "rails/commands"
Add to bin/setup
# Install JavaScript dependencies
system("yarn install --check-files")
Add to app/controllers/pages_controller.rb
def index
end
Add to config/routes.rb
get "up" => "rails/health#show", as: :rails_health_check
get "pages/index"
root 'pages#index'
Add to Gemfile
gem 'bootsnap'
gem 'cssbundling-rails'
gem "image_processing", "~> 1.2"
gem 'kamal', require: false
gem 'jbuilder'
gem 'jsbundling-rails'
gem 'loofah', '~> 2.21'
gem 'propshaft'
gem 'puma', '>= 5.0'
gem 'rails', '>= 8.0.2'
gem 'rails-html-sanitizer', '>= 1.6'
gem "solid_cache"
gem "solid_queue"
gem "solid_cable"
gem "sqlite3", ">= 2.1"
gem 'thruster', require: false
gem 'turbo-rails'
gem 'stimulus-rails'
Remove from .ruby-version
2.6.6
Remove from bin/rails
APP_PATH = File.expand_path('../config/application', __dir__)
require_relative '../config/boot'
require 'rails/commands'
Remove from config/routes.rb
get "welcome/index"
root 'welcome#index'
Remove from Gemfile
gem 'bootstrap', '~> 4.3.1'
gem 'carrierwave'
gem 'coffee-rails', '~> 4.2'
gem 'jbuilder', '~> 2.5'
gem 'jquery-rails'
gem 'loofah', '~> 2.19.1'
gem 'mysql2'
gem 'puma', '~> 3.7'
gem 'rails', '~> 6.1', '>= 6.1'
gem 'rails-html-sanitizer', '~> 1.4.3'
gem 'sass-rails', '~> 5.0'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
gem 'sprockets', '~> 3.7.2'
gem 'turbolinks', '~> 5'
gem "webpacker"

REMOVED

config/spring.rb
app/assets/config/manifest.js
app/assets/javascripts/application.js
app/assets/javascripts/jquery-ui.min.js
app/assets/javascripts/jquery.tablesorter.js
app/assets/javascripts/tinymce/*
app/assets/javascripts
app/assets/stylesheets/application.scss
config/initializers/application_controller_renderer.rb
config/initializers/backtrace_silencers.rb
config/initializers/cookies_serializer.rb
config/initializers/mime_types.rb
config/initializers/new_framework_defaults_5_2.rb
config/initializers/secret_token.rb
config/initializers/session_store.rb
config/initializers/wrap_parameters.rb
package-lock.json

List of commits

66203dc 
dbc7d63 
cb556d1 
6586c3b 
9b9f8e4 
b43beb4 
0781ab6 
59252a1 
6fa6723 
0293da1 
f8cf76c 
ee017d9 
60342d3 
85cdf1d 
2406d2d 
25b9f6c 
ecfbc0a 
257b2ba 
af8e794 
3d99c4d 
fbfdb4e 
55d67cf 
0c48c5c 
3018d51 
3c7413a 
034c8ae 
decf900 
0392be9 
6b7e114 
f212320 
0c75ad7 
a542669 
ecff695 
a6ee45d 
2c08d97 
d6197c2 
7d243c8 
9ca2bf0