Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Resistor color codes! #133

Closed
wants to merge 9 commits into from
Closed

Conversation

joewalnes
Copy link
Collaborator

Type in a query like "1.58m ohms" and get back the color codes in
an electronics resistor "brown green gray yellow".

Type in a query like "1.58m ohms" and get back the color codes in
an electronics resistor "brown green gray yellow".
@joewalnes
Copy link
Collaborator Author

It looks like this: http://joewalnes.github.com/stuff/resistors-zci.png

@ghost ghost assigned majuscule Nov 3, 2012
@majuscule
Copy link
Collaborator

Wow! Very cool! It really looks beautiful. I have to run to the store this second, but I'm going to take an in depth look at it when I'm back. Expect a longer reply soon :-)

@majuscule
Copy link
Collaborator

Awesome. One thing that I noticed is that your attribution link does not match our cannonical style. Would you please change that to 'More at resisto.rs'? I like it on the same line though. I have deployed this plugin on my development server, dylan.duckduckgo.com (check it out :-)), and have asked the rest of the team if they have any ideas for improvements. I think it looks fantastic and expect to move forward with this quickly.

Thank you very much for contributing to DuckDuckGo!

@joewalnes
Copy link
Collaborator Author

Great!

Just to be clear, do you mean changing the case of 'more' to 'More', or is there something else I should do to match the style?

I also plan to add some more features to this (like the reverse query where you type in colors), but I'll submit these in follow up changes.

Thank you for making such a hackable product :)

@majuscule
Copy link
Collaborator

I was referring to both the case and surrounding brackets. A reverse query feature would be very cool.

I'm glad you like our plugin interface :-) If you have any suggestions or comments about it, please don't hesitate to say so or email me personally at dylan@duckduckgo.com. We're all ears.

@joewalnes
Copy link
Collaborator Author

Ok, I've made that change. Please check it looks ok.

@majuscule
Copy link
Collaborator

Hi again Joe!

Thank you for making that change. I definitely think it helps fit in with our other plugins. @yegg also recommended losing the bold - this is reserved for exact text matches. Perhaps italics would fit? Maybe better without text-decoration. I'm not sure. It was also suggested to add (ohm) after its symbol for clarity.

What do you think?

@joewalnes
Copy link
Collaborator Author

Losing bold: Will do. I find italics hard to read, so it will probably be
best keeping it plain.

'ohm': Check.

I'll send the updates tomorrow.

I'm also planning on expanding the Goodie to include different variations
of resistors and what they mean (see http://resisto.rs/#4.7k for example),
so the layout may have to change again. I'll put that in a separate pull
request when it's ready.

cheers
-Joe

On Sun, Nov 4, 2012 at 6:48 PM, Dylan Lloyd notifications@github.comwrote:

Hi again Joe!

Thank you for making that change. I definitely think it helps fit in with
our other plugins. @yegg https://github.com/yegg also recommended
losing the bold - this is reserved for exact text matches. Perhaps italics
would fit? Maybe better without text-decoration. I'm not sure. It was also
suggested to add (ohm) after its symbol for clarity.

What do you think?


Reply to this email directly or view it on GitHubhttps://github.com//pull/133#issuecomment-10057981.

Joe Walnes added 6 commits November 8, 2012 08:12
e.g. instead of:
  yellow red black brown
we now say:
  yellow (4), red (2), black (0), brown (x10)
These seems to be more common.

e.g. 4.7K ->
* 5 bands (old): yellow(4), purple(7), black(0), brown(x10), tolerance
* 4 bands (new): yellow(4), purple(7), red(x100), tolerance
It always shows one extra color (gold = 5%). This is the most
common value and showing this makes it a lot more obvious how
the colors match up with a real resistor.
@joewalnes
Copy link
Collaborator Author

Hi Dylan,

I've made a bunch of changes based on your feedback, and also feedback from users of the resisto.rs website:

  • Added the 'ohms' text for clarity.
  • Ditched the bold and made it more consistent with the styling around the rest of the site.
  • Added Goodies metadata.
  • Included a default tolerance color band rather than some confusing text at the end (removed confusing text).
  • Show the more common 4 band variation of resistors, rather than 5 band.
  • Indicate what colors actually so the conversion is less opaque. e.g. 4.7K => yellow(4), purple(7), red(x100), gold(+/-5%).

Updated screenshot:
http://joewalnes.github.com/stuff/resistors-zci2.png

Thanks
-Joe

@majuscule
Copy link
Collaborator

Hi Joe!

Thanks for making the changes we suggested. I've removed the use of each @ for compatibility with earlier versions of perl, and made two small formatting changes (padding and margin). I think it looks fantastic, and am now merging it in to our repository.

You can check it out live on my development server right now at https://dylan.duckduckgo.com/?q=4.7k+ohms and it should be live within the next few days.

Thanks again!

@majuscule majuscule closed this Nov 16, 2012
@joewalnes
Copy link
Collaborator Author

Awesome - can't wait to see it live! :)

My OCD is kicking in.... I think the padding-bottom needs to be reduced by
one pixel. I've just tested on FireFox and Chrome (on Mac and Linux) and
it's not quite even.

cheers
-Joe

On Thu, Nov 15, 2012 at 7:29 PM, Dylan Lloyd notifications@github.comwrote:

Hi Joe!

Thanks for making the changes we suggested. I've removed the use of each @for compatibility with earlier versions of perl, and made two small
formatting changes (padding and margin). I think it looks fantastic, and am
now merging it in to our repository.

You can check it out live on my development server right now at
https://dylan.duckduckgo.com/?q=4.7k+ohms and it should be live within
the next few days.

Thanks again!


Reply to this email directly or view it on GitHubhttps://github.com//pull/133#issuecomment-10433366.

@majuscule
Copy link
Collaborator

Hi again Joe,

It's live! (and looks awesome)

Sorry for the wait. We've recently redesigned our goodies page inside and out, and were waiting for the completion of some infastructure before making a new release (ResistorColors is listed now under Science :: Reference along with your attribution).

On my machine, the padding-bottom looks just right - but if you think it's better off -1 on the majority of browsers, please make the commit and I'll be happy to add it!

Also what do you think of triggering on "ohms" as well as "ohm". I'm not sure if that's actually the correct way to say/write it? But it's a mistake I made. I also just noticed that it is written as "ohms" in the ZCI?

Thank you for contributing to DuckDuckGo!

@majuscule
Copy link
Collaborator

Actually it does trigger on 'ohms', I'm not sure why I thought it wasn't. Check it out!

@joewalnes
Copy link
Collaborator Author

Awesome!

I tested the padding on a few different platforms. It does differ slightly, but most of them look good. Happy to leave it as is.

@joewalnes
Copy link
Collaborator Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants