Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Fantastic Foreskin
Jan 6, 2013

A golden helix streaked skyward from the Helvault. A thunderous explosion shattered the silver monolith and Avacyn emerged, free from her prison at last.

Any recommendations for a surface on which to solder? I need to solder wires onto tiny smt components not attached to a circuit board and it would be real nifty if I could touch the iron to the surface I'm working on. Maybe just a blank PCB?

Adbot
ADBOT LOVES YOU

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
I like to suspend components/wires in the air in a helping hand/third hand. Just a bunch of alligator clips on articulated arms. Frees up my actual hands for holding the iron/solder.

TheMostFrench
Jul 12, 2009

Stop for me, it's the claw!



Can I ask for help here about programming garage/gate remotes here? My dad has an old gate and remote made by O&O, which seem to be defunct, and we need a couple more. I can't find any info about them online or any documentation for the gate control box. Some videos I've seen suggest you can clone remotes by setting them near each other instead and pressing some button combinations instead. We found a brand of programmable remotes which say they will work with the code on the one we have already, but the instructions say to use a learn/set button on the control box, but that doesn't exist on our hardware. I'm heading around there tomorrow so I'll make sure to get some photos and share them if it's acceptable to do so.

Dominoes
Sep 20, 2007

Some Goon posted:

Any recommendations for a surface on which to solder? I need to solder wires onto tiny smt components not attached to a circuit board and it would be real nifty if I could touch the iron to the surface I'm working on. Maybe just a blank PCB?
https://www.amazon.com/gp/product/B07CBS3G21

Good luck with that soldering approach. Like Stack, I've been using helping hands to make adorable spider monsters. It's tedious, and the hands I have don't do a great job of staying where you leave them. Ie internal forces push them unless they're positioned just-so when you let go. And the rotating them unscrews the clips.

Flux+touch may be your friend here, depending on the size of the leads.

I just built an abomination of a breadboard resistor mesh. Planned to complete it by hand-soldering a 14-lead SMT quad op amp to jumper wires, but am too intimidated. Going to hail-mary this and hope the PCB works without testing the design first.

Dominoes fucked around with this message at 17:09 on Jun 10, 2020

GnarlyCharlie4u
Sep 23, 2007

I have an unhealthy obsession with motorcycles.

Proof

I was still chuckling at "amazon copyright pin" when I saw "sky" :pusheen:

Fantastic Foreskin
Jan 6, 2013

A golden helix streaked skyward from the Helvault. A thunderous explosion shattered the silver monolith and Avacyn emerged, free from her prison at last.

Dominoes posted:

https://www.amazon.com/gp/product/B07CBS3G21

Good luck with that soldering approach. Like Stack, I've been using helping hands to make adorable spider monsters. It's tedious, and the hands I have don't do a great job of staying where you leave them. Ie internal forces push them unless they're positioned just-so when you let go. And the rotating them unscrews the clips.

Flux+touch may be your friend here, depending on the size of the leads.

I just built an abomination of a breadboard resistor mesh. Planned to complete it by hand-soldering a 14-lead SMT quad op amp to jumper wires, but am too intimidated. Going to hail-mary this and hope the PCB works without testing the design first.

I was having trouble keeping the wire in place, so it was solder in one hand, iron held like a pencil, and a pinky holding up the wire. I was thinking it'd be easier if I could tape everything down to a flat surface, but I'm still a neophyte here.

GnarlyCharlie4u
Sep 23, 2007

I have an unhealthy obsession with motorcycles.

Proof

Some Goon posted:

I was having trouble keeping the wire in place, so it was solder in one hand, iron held like a pencil, and a pinky holding up the wire. I was thinking it'd be easier if I could tape everything down to a flat surface, but I'm still a neophyte here.

https://www.digikey.com/short/zht8bn

or
https://www.amazon.com/QuadHands-Helping-Hands-Third-Soldering/dp/B00GIKVP5K

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib

These are garbage, unless Aven makes one that's actually useful. LocLine style ones are better for sure. TBH, I've mostly moved to cross-tweezers on the articulating stands: https://smile.amazon.com/dp/B07DD2VGLP/
They act like a heat sink for the wire, and no teeth means no damaging the insulation while holding the wire (and yes, heatshrink stops that, but prevents them from acting as a heatsink). I've got 3-4 sets of them around. I don't think I paid that much for them, but I like that they can be positioned better than the standard flexy ones, including very far apart or close together, which maintaining access without trying to reach around a bar.

These are the nice LocLine style, if you've got the room: https://smile.amazon.com/dp/B079CHJQKH/

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
I recently bought a magnetic dial indicator stand and 3D printed some attachments to add alligator clips and tweezers to it. It's rocking my world. The arm has zero movement / backlash when you lock it down, it stays right where you want it.

Dominoes
Sep 20, 2007

This is the one I commented on where the hands won't stay in place unless you find the 0-force points in 6-dimensional alligator-clip space.

And, do be careful about how much power you apply to the actuator +VCC.
https://www.youtube.com/watch?v=Cz-17z44F6g&t=51s

Dominoes fucked around with this message at 18:49 on Jun 10, 2020

shovelbum
Oct 21, 2010

Fun Shoe

Dominoes posted:

https://www.amazon.com/gp/product/B07CBS3G21

Good luck with that soldering approach. Like Stack, I've been using helping hands to make adorable spider monsters. It's tedious, and the hands I have don't do a great job of staying where you leave them. Ie internal forces push them unless they're positioned just-so when you let go. And the rotating them unscrews the clips.

Flux+touch may be your friend here, depending on the size of the leads.

I just built an abomination of a breadboard resistor mesh. Planned to complete it by hand-soldering a 14-lead SMT quad op amp to jumper wires, but am too intimidated. Going to hail-mary this and hope the PCB works without testing the design first.

I have that thing I think, never had the unscrewing issue, look at how the jam nuts work and you should be able to do ok

edit: you gotta get an assortment of breakout boards for common SMT ICs, saves me so much trouble

Dominoes
Sep 20, 2007

oh nice! It looks like if you twist the clips on tightly, you can use the grippy discs to rotate the clips without them becoming loose. Is that what you're referring to?

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS

ante posted:

I recently bought a magnetic dial indicator stand and 3D printed some attachments to add alligator clips and tweezers to it. It's rocking my world. The arm has zero movement / backlash when you lock it down, it stays right where you want it.

These things btw





They are designed to stay right where they're clamped on, even against a lot of force, because otherwise dial indicators would be useless

Fantastic Foreskin
Jan 6, 2013

A golden helix streaked skyward from the Helvault. A thunderous explosion shattered the silver monolith and Avacyn emerged, free from her prison at last.


I've got the former which is why I was able to do it at all. If y'all think a better version is the way to go I'll try that.

shovelbum
Oct 21, 2010

Fun Shoe

Dominoes posted:

oh nice! It looks like if you twist the clips on tightly, you can use the grippy discs to rotate the clips without them becoming loose. Is that what you're referring to?

Basically just screw the knurled piece all the way down, and then the clip all the way down, and you can then loosen the clip freely without risk of it falling off because you have several turns to play with with everything screwed down , and when you get it where you want it you back the knurled knob off until it is pressing against the clip and jamming it in place.

edit: I have the quadhands that mounts a panavise and it's really good for that because then you can put the board in the vise and have the springiness of the arms pressing the parts onto the board which is held securely.

shovelbum fucked around with this message at 21:31 on Jun 10, 2020

Dawncloack
Nov 26, 2007
ECKS DEE!
Nap Ghost
Hello friendos

I am trying to figure out the following circuit. I am close. Or so I think, feel free to correct me!


It is an audio compressor that I am trying to adapt to be used as a hearing protection for headphones. Not that that's super important.

I can figure out much of what happens. Up to 3V, the diodes do not conduce and the output voltage is just an attenuated version of the input.
After 3V (since those are two 1.5 forward voltage diodes) the positive side of the wave goes to the upper branch of the central mesh, and the negative, to the lower branch. The 100 ohm resistor and the capacitors form a low-pass filter, and the 22k resistors.

The signal is split mostly so that electrolytic capacitors can be used, since they can have larger capacitances for the same size.

The filter attenuates practically everything, since the cutoff frequency is something like 72Hz.

The 220ohm resistor is there so that excess current goes away and doesn't contribute to the sound.

Here are my questions:

- What on earth is the central branch for? Where does the current even go?? I have simulated the circuit with spice and yes, it has a smal influence but.... how? And how do I represent that mathematically??

- THere are earphones that require more or less voltage to work, depending on their sensitivity and impedance. I was thinking of changing the 470k resistor for a smaller resistor and a potentiometer. What should I watch out for?

- Same with the current. I could put another potentiometer by the 220 resistor. Maybe I could have a bit more control over the power that makes it to the load (the headsets impedance) What should I watch out for ?

For reference, I am using this website to understand headsets, do tell me if it's audiophile BS, in which case, please, point me in a right direction!
In essence, I am trying to come up with a circuit that is essentially that one, but with perhaps some potentiometers to adapt it to the widest possible variety of headsets, so that, when I know impedance and sensitivity of the headset I can turn the pots and make sure that the output doesn't go ear-damaging crazy (so say, 90dB (SPL) max.

Thanks in advance!

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
If I'm reading this correctly, you shouldn't use this circuit with earphones on the output. It's designed to be used with high impedance line inputs. Loading the output will ruin its function. If you want to use it for that place it between your line out and your headphone amp (and I don't know... glue the volume knob on your headphone amp in a fixed position?) If you insist on scaling it up, remember that most headphones are 8 to 32 ohms and some fancy ones are 600 ohms. You also have to scale up your capacitance in the same proportion you scale down the resistors to preserve the function.

As for how it works, the caps and first 2 diodes form a peak detector. The central branch with the potentiometer sets how how fast that peak detector's output decays. Anything significantly louder than the most recent peaks gets divided down by about 20x by the 22k into 470k. Note that it doesn't really set an absolute limit as much as it just attenuates the highest peaks relative to the average waveform envelope. If you want to keep your headphones from damaging your hearing, maybe just 2 diodes with series 10 ohm resistors, one in each direction is better. If that's not loud enough you can do 2 back-to-back zeners.

E: as for where the current goes in the central branch, one of those caps is above ground and the other is below ground. As time goes to infinity the value of both of those caps goes to equal, and if the input is DC balanced (audio is. Otherwise it burns out your speakers) that value is 0V. Current flows from the high capacitor, dropping its voltage toward 0, to the low capacitor, raising its voltage toward 0.

Stack Machine fucked around with this message at 16:35 on Jun 11, 2020

Dawncloack
Nov 26, 2007
ECKS DEE!
Nap Ghost

Stack Machine posted:

If I'm reading this correctly, you shouldn't use this circuit with earphones on the output. It's designed to be used with high impedance line inputs. Loading the output will ruin its function. If you want to use it for that place it between your line out and your headphone amp (and I don't know... glue the volume knob on your headphone amp in a fixed position?) If you insist on scaling it up, remember that most headphones are 8 to 32 ohms and some fancy ones are 600 ohms. You also have to scale up your capacitance in the same proportion you scale down the resistors to preserve the function.

As for how it works, the caps and first 2 diodes form a peak detector. The central branch with the potentiometer sets how how fast that peak detector's output decays. Anything significantly louder than the most recent peaks gets divided down by about 20x by the 22k into 470k. Note that it doesn't really set an absolute limit as much as it just attenuates the highest peaks relative to the average waveform envelope. If you want to keep your headphones from damaging your hearing, maybe just 2 diodes with series 10 ohm resistors, one in each direction is better. If that's not loud enough you can do 2 back-to-back zeners.

Ooh, fascinating, thanks! As you can imagine you are dealing with a newbie here. Thank you, you have given me a lot of info. I mentioned the maximum sound pressure, but obviously i know this circuit provides just attenuation. But now I know what to google to get to the math of it!

So what would be your suggestion for a hearing protection circuit, again ? Just a resistor and two diodes? I am not sure how that would work, would you mind sketching a schematic ? My fear with just diodes and a resistor would by that faints sounds (under the diode forward voltage) would not be heard at all. Perhaps I just didn't understand. Perhaps you gave me a shorthand explanation and I am too ignorant to fill in the gaps myself.

Yeah, if anyone knows a circuit that I can nicely turn into a hearing protection circuit, the kind of thing that would go between a console (PC, CD player, whatever) and ear/headphones, I would be a taker.

Thanks again!

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
Phone posting but let me try to draw the options I was thinking of:


This one to limit sound level to about .7v, which may be too quiet:


This one to get 2x the zener voltage, so you can choose a zener diode for the appropriate voltage level.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
You know now that I think about those circuits they work entirely by loading the amp. That's probably not great because if the amp wins they burn out and you sudden get a burst of loudness anyway. Maybe drop about 22 ohms in series with this circuit's non-ground input so it's dropped in a resistor instead of the amp.

e: like this so the amp sees 22+your headphones ohms normally and 24 ohms when the limit hits.

Stack Machine fucked around with this message at 16:58 on Jun 11, 2020

Forseti
May 26, 2001
To the lovenasium!
Old school guitar amp trick was to put an incandescent lightbulb in series. I did that to a Class A tube amp I has to allow it to achieve that desirable tube distortion at non earsplitting levels. Basically the bulb conducts well at low power but higher power causes it to light up which in turn increases the resistance and compresses the wave.

Not sure how feasible this is for the low power of headphones or how feasible it is for audio reproduction rather than creation with regard to distortion but could be a fun experiment if you have some tiny christmas light bulbs or something like that handy.

Dawncloack
Nov 26, 2007
ECKS DEE!
Nap Ghost

Forseti posted:

Old school guitar amp trick was to put an incandescent lightbulb in series. I did that to a Class A tube amp I has to allow it to achieve that desirable tube distortion at non earsplitting levels. Basically the bulb conducts well at low power but higher power causes it to light up which in turn increases the resistance and compresses the wave.

Not sure how feasible this is for the low power of headphones or how feasible it is for audio reproduction rather than creation with regard to distortion but could be a fun experiment if you have some tiny christmas light bulbs or something like that handy.

This is also a pretty cool idea, I'll start doing the math soon. Thanks!

Stack Machine, what do you mean by loading the amp ? If you had time to just throw a link my way or something that would be great.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

Dawncloack posted:

This is also a pretty cool idea, I'll start doing the math soon. Thanks!

Stack Machine, what do you mean by loading the amp ? If you had time to just throw a link my way or something that would be great.

Not a link but search terms in quotes: the problem is good audio amplifiers are all "closed-loop amplifiers" They use negative feedback to keep their output at a given voltage. If we just "clamp" their output to a given value, they'll drive the maximum current they can source into that load to try to get it at whatever voltage they're trying to achieve. Put another way, the "small signal output impedance" of a good audio amp is very very small. So we add a series resistor in series with the amp and before our clamp so the amp gets to drive what it wants to and the extra power is burned up in our resistor.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius

Forseti posted:

Old school guitar amp trick was to put an incandescent lightbulb in series. I did that to a Class A tube amp I has to allow it to achieve that desirable tube distortion at non earsplitting levels. Basically the bulb conducts well at low power but higher power causes it to light up which in turn increases the resistance and compresses the wave.

Not sure how feasible this is for the low power of headphones or how feasible it is for audio reproduction rather than creation with regard to distortion but could be a fun experiment if you have some tiny christmas light bulbs or something like that handy.

What do you put it in series with? Just put it in series with the power cord or modify the amp circuit to put a bulb in?

Edit: I looked it up, you put the bulb in the wire from the amp to the speaker.

Cojawfee fucked around with this message at 18:36 on Jun 11, 2020

Forseti
May 26, 2001
To the lovenasium!
Yep, it's a dead simple mod. In the guitar amp case where the goal is just make the amplifier work harder for a given volume I think the compression is a side effect and lightbulbs are just a cheap way to get a "resistor" that can handle high power. Apparently the same idea was used with audio compression as the intention decades ago though, I found an article that talks about movie theaters in the 1930s doing it to make the movies easier to hear over air conditioning and audience noise. Pretty interesting read and talks more about the theory of it rather than the "just slap this thing in there and see if you like the sound" mod that I did on my amp :D

http://www.lampifier.com/MIC/info/pages/lampifier_technology

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
Put another way, the voltage gain of an audio amplifier is fixed, so if we just clamp its output like in the figure on the left it'll drive as much current as it can to get that output to the voltage gain times the input.



With our resistor, like in sketch on the right, we attenuate the signal in ordinary operation but we also limit the current from the amplifier through the clamp, in this totally made-up case to about e: 59mA. I realized while I was walking the dog that there IS a speaker in this system too.

Stack Machine fucked around with this message at 20:53 on Jun 11, 2020

Spatial
Nov 15, 2007

Does it matter which way the differential signals of an Ethernet PHY are connected to the isolation transformer? Example with just the relevant signals connected:



Let's say you swap +/- on the left. Does it still work? Why or why not? :frogdunce:

Foxfire_
Nov 8, 2010

No? If you're encoding a symbol by "Wire A voltage > Wire B voltage", flipping them is going to encode different symbols.

Spatial
Nov 15, 2007

These magnets aren't magic? :mad:

But is totally fine to flip the signals on both ends, right?

Forseti
May 26, 2001
To the lovenasium!
Uhhhh magnets are most definitely magic. Just ask Violent J and Shaggy 2 Dope.

I think you should be fine flipping both of them. Just curious, I'm guessing this makes the board routing easier? :)

Edit: Well, assuming it's actually just a transformer and doesn't have diodes or something in there.

Spatial
Nov 15, 2007

Forseti posted:

I think you should be fine flipping both of them. Just curious, I'm guessing this makes the board routing easier? :)

Edit: Well, assuming it's actually just a transformer and doesn't have diodes or something in there.
Busted. :v: I had to change the connector after already going through the process of laying out the whole thing.

Yup, pure transformer. Pretty cool looking too, I got these surface mount ones TDK makes:

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
You can get ethernet jacks with "integrated magnetics" now too, just in case board area is too tight to have a separate transformer.

Spatial
Nov 15, 2007

I know about those, much easier to deal with! I can't use a magjack for this because the ones I can source are all far too tall for the design. I spent ages looking for low profile ones.

These TDK transformers are tiny, 3.2mm square, so overall it works out to about the same board area.

Dawncloack
Nov 26, 2007
ECKS DEE!
Nap Ghost

Stack Machine posted:

Not a link but search terms in quotes: the problem is good audio amplifiers are all "closed-loop amplifiers" They use negative feedback to keep their output at a given voltage. If we just "clamp" their output to a given value, they'll drive the maximum current they can source into that load to try to get it at whatever voltage they're trying to achieve. Put another way, the "small signal output impedance" of a good audio amp is very very small. So we add a series resistor in series with the amp and before our clamp so the amp gets to drive what it wants to and the extra power is burned up in our resistor.

Daaaaamn, thanks!

Ok, so THAT is what the 220 ohm resistor is doing in the schematic that I first posted. I knew it was to eliminate current but now I know why, and why it doesn't make a lick of sense to add a pot to that.

Ok, so I love your double zenher idea, I am certainly going to apply it, and the same for the lightbulb. I am going to do the math later on today to see how well both ideas work together. In my mind, the lightbulb would provide attenuation and a certain low pass filtering. Which is great because high frequencies are the hearing-killers. And the zenhers would provide a hard limit to voltage. Which has the problem of producing distortion (if I understand correctly, which isn't a given) once that limit is reached, since the wave is square when the Zenhers activate. So I could have the best of both worlds.

If there's other suggestions for my hearing-protection-between-console-and-headphones idea I would be a taker. Thanks already!

Lightbulb idea comes from you tho. Attribution!

Dawncloack fucked around with this message at 11:05 on Jun 12, 2020

Dawncloack
Nov 26, 2007
ECKS DEE!
Nap Ghost

Dawncloack posted:

In my mind, the lightbulb would provide attenuation and a certain low pass filtering.
Newsflash: this is wrong. The inductance supplied by the bulb would be too small.

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

Dawncloack posted:


Ok, so THAT is what the 220 ohm resistor is doing in the schematic that I first posted. I knew it was to eliminate current but now I know why, and why it doesn't make a lick of sense to add a pot to that.

The 220 is between the input and ground (i.e. in parallel with the rest of the circuit). I think it's there to set the maximum resistance of the whole thing to 220 ohms, while the 22 ohm in series that I suggested is there to set a minimum resistance of 22 ohms. The reason for having a max resistance is a little less clear-cut and has more to do with keeping distortion low but the minimum resistance is more important, since it keeps the amplifier from turning the circuit between itself and the speaker into vapor.

Dominoes
Sep 20, 2007

Another hail-mary: Does anyone have experience with e-paper displays? I've done a lot of driver patching over the past week. It seems like modern panels are very capable (refresh speed, 3 colors etc), but you have to work with them in specific ways depending on the use case. Eg how you handle the buffers, what combinations of commands you send in order to get a good balance of refresh speed on the correct parts of the screen, with not burning-in the display, or causing artifacts. I think part of the prob is the Rust drivers vs C drivers vs the datasheets. The Rust HAL drivers avail are fine for full-refreshes, but lacking for quick refreshing or only updating part of the screen to get the most speed, without running you out of memory. It all seems fixable software-side. The guy who owns the Repo is reluctant to accept PRs; I think it's a lack of time combined with being conservative, where I prefer the merge net improvements even if they're incomplete/flawed approach.

Considerations you take for granted on LCD displays goes out the window, and how you handle things becomes more use-case specific.

Dominoes fucked around with this message at 19:03 on Jun 12, 2020

Forseti
May 26, 2001
To the lovenasium!
I mean I hate to say it but I agree with the repo maintainer, I wouldn't merge incomplete or flawed things either. Especially if it could cause hardware damage (burn-in in this case) when people use it without fully knowing what they're doing.

I'd just fork it and occasionally merge new changes from upstream if their library is rapidly evolving. If the interfaces are very unstable and merging is a huge hassle all the time, perhaps you could rewrite the interface to be more modular (for example, you could rewrite it using the strategy pattern) and make it easier for you to keep up to date with upstream while still letting you use your custom code more easily. Perhaps they'd be more open to a pull request of that nature?

Dominoes
Sep 20, 2007

I get it; I'm on the more reckless side of the spectrum, eg in how I handle PRs to my stuff. I'm currently working with a fork-of-a-fork. I used to always use published dependencies, but in Rust embedded land, about half my deps are linked to Githubs, either of my forks, or someone else's.

I like your modular / strategy idea. Or just go with my own forks.

The root cause of these issues is a small/new community.

Silver lining: I'm getting a good chunk of low-level learning done I wouldn't have if the existing drivers were good-to-go.

Dominoes fucked around with this message at 20:10 on Jun 12, 2020

Adbot
ADBOT LOVES YOU

Forseti
May 26, 2001
To the lovenasium!
Warning: soapbox ahead!

Yeah fragmentation is definitely a big risk. I'll fully admit I'm on the conservative end personally and I feel like most of the projects I really like tend to have a "Benevolent Dictator for Life" authority structure (e.g. I'm a weirdo Slackware user and love it). Now even though a BDfL has ultimate authority, it doesn't really work if they're not genuinely trying to work with people to address issues and ideally reaching a compromise. On the other hand, when it works it's amazing, the product feels cohesive and once you understand it it becomes really intuitive because everything was written in the same "voice" and fits together in the same way.

So my feeling is that the ideal here would be that the base library works with the broadest array of hardware with the least amount of risk, which in this case is probably slow, full screen, flashing refreshes. One should be able to download it and it should do everything it says on the box. A good design would allow you to change the parts you don't like while keeping the parts that you do in a way that lets you integrate changes that other people are making or will make in the future. This kind of design can be pretty difficult to actually pull off.

Fortunately this is a problem that's been around for forever so there are resources available if you know where to look. Strategy Pattern seems like a pretty good fit for this particular problem and comes from the book "Design Patterns", also known as the Gang of Four book, which is a great book to have as a reference and has many patterns that you are likely already familiar with because they appear everywhere. Furthermore, by making use of these patterns, your work should become more accessible to other developers because these should be familiar motifs. So even if you don't end up making use of it in this case, it's a good thing to learn and maybe deploy down the road in a future project.

I don't know the specifics of this situation so I might be totally wrong here. I think you are doing to the right thing by attempting to submit pull requests. I get that the upstream maintainer is probably doing this for free and may not want to devote a lot of time to it, but ideally I think that they should tell you why they're not accepting it and what could be improved to get it to a point where they would accept it (maybe they did, not sure). If they're not willing to devote the time to manage the project (and I wouldn't blame them, after all it's not a paying gig and who knows what else they have going on) and as a result have become an obstacle to improvement, that's a good reason to fork a project.

These are my opinions and I'm certainly not claiming to be right about everything, but hopefully others find it helpful advice :)

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply