Open in app

Sign In

Write

Sign In

Dave Dash
Dave Dash

389 Followers

Home

About

Nov 20, 2019

Ruby on Rails the default names we give models

How to get rid of that Company:0x000decafbad00 in favor of something more sensible — Sometimes our defaults are terrible. = link_to(@company) I expect the above to produce something pleasant, but instead I got this: A lot of what slows me down as a coder is knowing the “right” way to do something. I still don’t know what the “right” way to fix this. I like writing short pieces of code that bake in some assumptions. So I changed my Company model like so:

Ruby On Rails

1 min read

Ruby On Rails

1 min read


Nov 19, 2019

Rails Administrate Drop Downs

For WhichOffice I’m building a little dashboard to keep track of locations of all the companies we track. I have a Location model which references a Company model. class CreateLocations < ActiveRecord::Migration[5.2] def change create_table :locations do |t| t.references :company ... I used the Rails generator for administrate to create…

Ruby On Rails

2 min read

Rails Administrate Drop Downs
Rails Administrate Drop Downs
Ruby On Rails

2 min read


Nov 6, 2019

What is 0.0.0.0 versus localhost

tl;dr 0.0.0.0 tells a server to listen on any available IP address (localhost, 192.168.0.2, or whatever). You can’t connect to http://0.0.0.0/. Recently I’ve had a few separate instances of people who did not fully understand how the 0.0.0.0 address works and more generally localhost. With the caveat that I am…

Docker

2 min read

What is 0.0.0.0 versus localhost
What is 0.0.0.0 versus localhost
Docker

2 min read


Oct 30, 2019

Why I didn’t skimp on Rails Password Protection

I started to add Rails Admin to WhichOffice which currently doesn’t have users (and to be honest, doesn’t have a lot of pages yet). I thought instead of adding users, I could put HTTP Basic Auth and be done with it, but it felt gross. So I decided to add…

Ruby On Rails

2 min read

Why I didn’t skimp on Rails Password Protection
Why I didn’t skimp on Rails Password Protection
Ruby On Rails

2 min read


Oct 24, 2019

The Danger of APEX CNAME

I’ve always liked using “naked” domains or apex domains. I worked on del.icio.us which wasn’t quite naked, but it didn’t contain the “www” until it became “www.delicious.com” (this was before it became del.icio.us and I honestly don’t know where it is now). There’s caveats to doing this, however. CDNs can…

DNS

2 min read

The Danger of APEX CNAME
The Danger of APEX CNAME
DNS

2 min read


Sep 17, 2019

Bashing yourself with Pipes

I have a special purpose Amazon EC2 instance that does a long running task and shuts down. Occasionally I’d see it start to repeat itself over and over again and never shut down. I figured out the issue and it has to do with pipes (of the Unix variety). The…

Ruby On Rails

4 min read

Bashing yourself with Pipes
Bashing yourself with Pipes
Ruby On Rails

4 min read


Mar 22, 2019

Loan to value, less can be more

We talked about loans/notes briefly during a foray into real estate investing. When investing in notes an important ratio is Loan-to-Value (LTV). This is usually a percentage and if you’ve purchased a home you’ve probably targeted 80 or 90%. 80% LTV means if you are buying a $200,000 home, you’ll…

Real Estate

2 min read

Loan to value, less can be more
Loan to value, less can be more
Real Estate

2 min read


Mar 15, 2019

Be the bank: Debt over equity

I’ve started casually looking at alternative investments. I can balance a traditional portfolio of stocks and bonds, but alternative investments (loans, real estate, private placements) are much harder to understand. I noticed myself naturally making lists of things I didn’t know and spending a bit of time researching them. Note: I’m not a professional. The following is my opinion and if there are facts listed, some of them may be wrong. This is a new frontier for me.

Investing

2 min read

Be the bank: Debt over equity
Be the bank: Debt over equity
Investing

2 min read


Aug 27, 2018

The dangers of mocking

tl;dr avoid until necessary mocking in your test suite. Refactor your code. I am a big fan of basic unit and functional testing. I ran a tutorial on testing at PyCon, I’ve contributed to a few testing libraries. I’ve helped drive testing at companies like Pinterest and Mozilla. The first…

Testing

2 min read

The dangers of mocking
The dangers of mocking
Testing

2 min read


Aug 23, 2018

Pushing to an ActiveJob/Sidekiq queue in Python (or any other language)

I use Sidekiq to do a lot of rails-related offline tasks. Because the Sidekiq jobs are tied to a large rails codebase my team often utilizes AWS Lambda for non-critical work. The benefit of Sidekiq is it’s close to our rails app which uses ActiveRecord to maintain complicated relationships. Sidekiq…

Ruby On Rails

2 min read

Pushing to an ActiveJob/Sidekiq queue in Python (or any other language)
Pushing to an ActiveJob/Sidekiq queue in Python (or any other language)
Ruby On Rails

2 min read

Dave Dash

Dave Dash

389 Followers

DadOps 24/7 and DevOps Consultant. Formerly @Pinterest and @Mozilla

Following
  • Camille Fournier

    Camille Fournier

  • Sarah Tavel

    Sarah Tavel

  • Thaddeus Howze

    Thaddeus Howze

  • David E. Weekly

    David E. Weekly

  • Heather Arthur

    Heather Arthur

See all (122)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech