# flow\_analytics

Published articles for flow\_analytics.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Hardware Learning 01 - LEDs have a plus side

DevFeed: [Hardware Learning 01 - LEDs have a plus side](<https://devfeed.tech/articles/hardware-learning-01-leds-have-a-plus-side-28166.md>)

Original publisher: [Read original article](<http://fuzzyblog.io/blog/flow_analytics/2022/07/21/hardware-learning-01-leds-have-a-plus-side.html>)

Author: Fuzzygroup

Published: 2022-07-21T03:32:00Z

Content type: tutorial

Language: en

Sources: [Scott Johnson](<https://devfeed.tech/sources/scott-johnson.md>)

Topics: [Hardware](<https://devfeed.tech/topics/hardware.md>), [Learning](<https://devfeed.tech/topics/learning.md>)

Tags: [flow-analytics](<https://devfeed.tech/tags/flow-analytics.md>), [hardware](<https://devfeed.tech/tags/hardware.md>), [hardware-learning](<https://devfeed.tech/tags/hardware-learning.md>), [led](<https://devfeed.tech/tags/led.md>)

### AI overview

A beginner hardware-learning note explaining that LEDs have positive and negative sides, with the longer lead marking the positive side. It also notes that resistors are non-polar and that a ballast resistor limits LED current to help prevent damage.

### Source excerpt

As part of the yet to be announced Flow Analytics startup, I have to learn quite a bit more about building hardware. All of my learnings will be blogged for anyone who wants to follow along. Tonight's learning is simple: LEDs have a plus and a minus side. The plus side is denoted by a LONGER lead. Additionally: Resistors are non-polar (it doesn't matter what side you connect them on); I knew this already but it felt wise to write it down since you always use a resister with an LED A resistor used with an LED is called a ballast resistor and "The ballast resistor is used to limit the current through the LED and to prevent excess current that can burn out the LED. If the voltage source is equal to the voltage drop of the LED, no resistor is required." See Also - LED math is on this link!

## Rails Tip : When You Are Testing Model Files without a Database Table Delete Fixtures File

DevFeed: [Rails Tip : When You Are Testing Model Files without a Database Table Delete Fixtures File](<https://devfeed.tech/articles/rails-tip-when-you-are-testing-model-files-without-a-database-table-delete-fixtures-file-28291.md>)

Original publisher: [Read original article](<http://fuzzyblog.io/blog/rails/2022/07/20/rails-tip-when-you-are-testing-model-files-without-a-database-table-delete-fixtures-file.html>)

Author: Fuzzygroup

Published: 2022-07-20T14:02:00Z

Content type: tutorial

Language: en

Sources: [Scott Johnson](<https://devfeed.tech/sources/scott-johnson.md>)

Topics: [Rails](<https://devfeed.tech/topics/rails.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Ruby](<https://devfeed.tech/topics/ruby.md>)

Tags: [activerecord](<https://devfeed.tech/tags/activerecord.md>), [factorybot](<https://devfeed.tech/tags/factorybot.md>), [flow-analytics](<https://devfeed.tech/tags/flow-analytics.md>), [rails](<https://devfeed.tech/tags/rails.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [software-testing](<https://devfeed.tech/tags/software-testing.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

A Rails testing tip explaining that model tests without a backing database table can fail when Rails tries to load an unintended fixture file. Deleting the fixture file prevents the test runner from querying the missing table; the article also notes that FactoryBot suppresses fixture creation.

### Source excerpt

I generate a lot of models without ActiveRecord backing. The reason for this is I try and follow a fairly functional style of Ruby coding where I use class methods. The reason I use models for this: I don't know what to call them other than a model The models directly is auto loaded so I can refresh it with reload! in Rails console My normal process for this: rails g foo Delete the migration Delete the "< ..." at the top i.e. the inherits from ActiveRecord stff; exact syntax varies from Rails version to Rails version Today I hit this error when running a test and it puzzled me: Error: VolumeCommonTest#test_it_should_have_the_right_values_for_cubic_feet_of_water: ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR: relation "volume_commons" does not exist LINE 9: WHERE a.attrelid = '"volume_commons"'::regclass This actually took me a bit to figure out. Here's the tldr: It was coming from bin/rails test test/models/volume_common.rb It was the result of the test runner trying to load the fixture file. The reason this was surprising was that I normally customize each Rails project with ThoughtBot's FactoryBot gem and this time I forgot. FactoryBot suppresses fixture file creation but since I screwed up, it was there and tried to get loaded into a missing table. And, yes, the error is mine since I didn't read it well but at times like these I wish for a gem called abusive_error messages which sees "PG::UndefinedTable" and shouts out something like: Yo! Hoser! Where be da database table ? Ah if there were only infinite time to craft the software tools we really want ...