Author Topic: I find "programming" a constant distraction from electronics in some "tutorials"  (Read 5132 times)

0 Members and 1 Guest are viewing this topic.

Offline bsfeechannel

  • Super Contributor
  • ***
  • Posts: 1667
  • Country: 00
Your skillz will be in demand in a post apocalyptic world.

Will?
 

Offline hugo

  • Regular Contributor
  • *
  • Posts: 167
  • Country: ca
Sorry, I don't know the answer ... ::)
 

Offline etiTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 1801
  • Country: gb
  • MOD: a.k.a Unlokia, glossywhite, iamwhoiam etc
Sorry, I don't know the answer ... ::)

Bravo, what concise wit you show.  :-+
 

Offline Mecanix

  • Frequent Contributor
  • **
  • Posts: 269
  • Country: cc
In contrast; I am relatively new to electronics 'aka' nowhere near the average skilled EE. Still a whole lot to learn before being able to design fully functional analog circuits all by myself. Thanks to modern tech and online knowledge sharing I've somehow managed to get things going the way I wanted, and that is primarily because of the programming background and experience I have (15+ years now?). E.g. without programmatically implementing some sort of clock/timing and switching logic, my circuit wouldn't be half operational at present.

So.. yea, far more fancy ICs and jtag TPs than actual passives and traces in my case :/ Parts cost is double also.

To each his/her own I'm guessing. Good luck with the transition from analog to digital  ;D
« Last Edit: September 23, 2020, 05:34:43 am by Mecanix »
 

Online vk6zgo

  • Super Contributor
  • ***
  • Posts: 7627
  • Country: au
What did people do before Arduino and microcontrollers were the go-to "solution" (lazy solution) for almost EVERY project online, if they wanted to generate waveforms?
They'd use a 555 instead to flash a LED. And they were lauded as geniuses, of course.

Who uses a 555?
Self flashing  LEDs have been around for decades!

I greatly prefer to use a 90v battery, a capacitor, & a resistor to flash a neon, anyway!
Your skillz will be in demand in a post apocalyptic world.

The problem is, where would I find a 90v battery, unless some boxes of 9v batteries survived, so I can "series 'em up!" ;D
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19817
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
It speaks volumes that only ONE person "gets" what I am on about. Thank you for speaking up, and not allowing the majority to imply I am retarded, or "stupid" for thinking how I do.  :-+

Many, many years, an old boss of mine told me "the TRUE component-level, electronics fundamental designers are a rare breed - now it's all module-pluggers who call themselve 'electronics engineers' when all they know how to do, for the most part, is copy blocks and plug them together"  - I recall having brought up this conversation (this was the 90s) - boy was he ever right!

I heard that many decades (not years) ago, in the 60s and 70s. Context: digital integrated circuits, opamps, and pre-assembled modules.

If only one person gets what you are on about, then obviously you have not expressed your position clearly enough.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: tooki, eti

Offline bsfeechannel

  • Super Contributor
  • ***
  • Posts: 1667
  • Country: 00
They'd use a 555 instead to flash a LED. And they were lauded as geniuses, of course.

555 was for the weak. Real men flashed their leds with unijunction transistors.
 
The following users thanked this post: newbrain

Online vk6zgo

  • Super Contributor
  • ***
  • Posts: 7627
  • Country: au
They'd use a 555 instead to flash a LED. And they were lauded as geniuses, of course.

555 was for the weak. Real men flashed their leds with unijunction transistors.

Bah! Humbug!

If you absolutely have to flash LEDs, like a barbarian, instead of neons like a civilised person, you should use an astable MV using BC108s, or maybe even OC71s.
I'm pretty sure you could get a 12AT7 to work at lower voltages, too.

A couple of relays back to back might work, ------ but a bimetallic strip would be even better.

As for 555s,-----------they were regarded as "so easy, even caveman can do!"
No plaudits were awarded there.
More like, "Well, duhh!"
 

Online Circlotron

  • Super Contributor
  • ***
  • Posts: 3214
  • Country: au
They'd use a 555 instead to flash a LED. And they were lauded as geniuses, of course.

555 was for the weak. Real men flashed their leds with unijunction transistors.

Bah! Humbug!

If you absolutely have to flash LEDs, like a barbarian, instead of neons like a civilised person, you should use an astable MV using BC108s, or maybe even OC71s.
I'm pretty sure you could get a 12AT7 to work at lower voltages, too.

A couple of relays back to back might work, ------ but a bimetallic strip would be even better.
Luxury!
Back in my day we did it with contacts driven by clockwork.
And incandescent bulbs.
None of this LED rubbish!
 
The following users thanked this post: newbrain

Offline fourfathom

  • Super Contributor
  • ***
  • Posts: 1902
  • Country: us
They'd use a 555 instead to flash a LED. And they were lauded as geniuses, of course.

555 was for the weak. Real men flashed their leds with unijunction transistors.

Bah! Humbug!

If you absolutely have to flash LEDs, like a barbarian, instead of neons like a civilised person, you should use an astable MV using BC108s, or maybe even OC71s.
I'm pretty sure you could get a 12AT7 to work at lower voltages, too.

A couple of relays back to back might work, ------ but a bimetallic strip would be even better.
Luxury!
Back in my day we did it with contacts driven by clockwork.
And incandescent bulbs.
None of this LED rubbish!

When I was a young lad we used Leyden Jars and carbon arcs, like God intended.
We'll search out every place a sick, twisted, solitary misfit might run to! -- I'll start with Radio Shack.
 
The following users thanked this post: tooki, bsfeechannel

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Bah I used motor, acetylene flame and Fresnel lens. 🤣
 

steviefaux

  • Guest
I get your point. A good idea would be for people to say "If you're not interesting in the programming side, click here. Although you might struggle without it" but at least they give the option to skip.

It's a lot like forums. I thought it was just me but others have said the same. You ask a question and would like an answer, the angry rant can come at the end.

So you ask

How do I do A, I know I can do it other ways but how would I do it this way.

And annoyingly get

"You shouldn't be doing it that way you should be doing it this way blah blah".

It's annoying. Just answer my question first then added "But, really you should be doing it this way".

Perfect example was my question about plaster powder recently. In the UK we have a shortage but I still need to plaster my small room at some point so am perfectly entitled to buy some. So I grabbed some bags before they all disappeared again. I then had a thought, the powder has a end of life date, what if I put it in a air time bucket, would it mean the plaster lasts longer. So I asked this simple question. The first response was roughly

"Why are you buying the plaster now if not using it straight away. There are some of us unable to complete jobs because people like you are buying the plaster up  when you're not about to do a job. Don't buy the plaster until you're ready to do the job".

 >:(

Answer my question first THEN have your rant. Thankfully someone did with

"It wouldn't work because as you put the powder in the bucket, moisture will also be trapped in the airtight seal which will still make the plaster go off".

Simple. I'm an IT engineer and you see it a lot in my profession, people wondering off instead of sticking to the topic.
 

Offline bobcat2000

  • Regular Contributor
  • *
  • Posts: 209
  • Country: us
You can skip the first 10 - 20 pages from google.  Google shows you the most popular topics.  Start from page 20, you may find what you are looking for.  It depends on how you search google.

 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9903
  • Country: us

It's a lot like forums. I thought it was just me but others have said the same. You ask a question and would like an answer, the angry rant can come at the end.

So you ask

How do I do A, I know I can do it other ways but how would I do it this way.

And annoyingly get

"You shouldn't be doing it that way you should be doing it this way blah blah".

Probably because most of us want to get something working while still young enough to use it.  There's a reason that almost every project seems to involve an Arduino and that is because it interfaces well with the world and the user.

In the OP, the device was CHOSEN to be an AD9833 knowing, actually knowing, that it has to be controlled via a 3 wire interface with a protocol like SPI.  Is there some analog way to create waveforms?  Sure!  But it won't use the AD9833.  If the device choice is cast in stone, it will be controlled by a uC.  Arduino or 'other' is another choice but it's likely that the Arduino already has a library.

Get the project working in the shortest amount of time with the least amount of effort.  That's the plan!

The electrical part of the project is trivial but the device control and user interface are not.  For a decent interface, figure a couple of dozen SSI chips (to handle rotary encoders, LCD display, etc, and maybe more but you would still wind up building the better portion of a CPU in order to handle the SPI part.  Could this get to 100 SSI chips?  I wouldn't be surprised!  It depends on the features.  Personally, I gave up wire-wrap projects a long time back.  Code is so much easier to change.

Modern projects enjoy feature creep.  We can do things with uCs that simply weren't possible 50 years ago,  The cost of the performance enhancement and feature creep is code.  Lots and lots of code.

The code describes the features of the project, the electrical schematics say nothing.  Of course the code is presented early!  It's the only thing that matters.
 
The following users thanked this post: newbrain

Online vk6zgo

  • Super Contributor
  • ***
  • Posts: 7627
  • Country: au
Bah I used motor, acetylene flame and Fresnel lens. 🤣

In 1971, I visited the lighthouse  near John O'Groats in Scotland.

To my amazement, the lamp was an oil burning one, & the light was rotated by a clockwork mechanism.
A weight was wound up from the bottom of the tower each day, & the mechanism rotated the
lamp all night.

At the time, most Oz lamps were either electric or gas operated.

What the heck!
It worked, & well, too!
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12332
  • Country: au
Bah!  I had a hole in the roof of my cave.

I got a flashing light at one cycle per day (except when it was overcast).
 

Offline fourfathom

  • Super Contributor
  • ***
  • Posts: 1902
  • Country: us
Bah!  I had a hole in the roof of my cave.

I got a flashing light at one cycle per day (except when it was overcast).

That's 11.574~ microHz.  Try doing that with a leaky electrolytic RC multivibrator!
We'll search out every place a sick, twisted, solitary misfit might run to! -- I'll start with Radio Shack.
 

Offline pickle9000

  • Super Contributor
  • ***
  • Posts: 2439
  • Country: ca
How many ways can you flash a light or LED. There has got to be a YouTube video on that.

 

Online Circlotron

  • Super Contributor
  • ***
  • Posts: 3214
  • Country: au
Bah!  I had a hole in the roof of my cave.

I got a flashing light at one cycle per day (except when it was overcast).
Hmmm.... I was going to say I had a wooden crankshaft turned by hand that pumped two wood and leather bellows that alternately puffed on two campfires.
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Ha, I turned on the universe at the big bang and it will blink out in a few tens of billion years. Top that.  :-DD
 

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6430
  • Country: fi
    • My home page and email address
So you ask

How do I do A, I know I can do it other ways but how would I do it this way.

And annoyingly get

"You shouldn't be doing it that way you should be doing it this way blah blah".

It's annoying. Just answer my question first then added "But, really you should be doing it this way".
In 97% of the cases of this I've seen (at SO and elsewhere), A is incorrect.

If you were to ask me the question via e-mail, I'll answer the way you suggested (ie., the description of how to do A, followed by why it is the wrong way).
On the web, on forums where you have dozens or hundreds of lurkers to each asker/answerer, doing that leads to misunderstanding and spreading false knowledge.
That is why I for one won't do it in public; I'll always start with "No, that's the wrong way, because Z."  It has very little to do with the asker, and a lot to do with those others who read the question and answer.

The 3% of the cases are where the OP names the correct method, and gives a sane reason why they don't want/cannot do it that way.

In 2% of cases, their belief is incorrect, and the reason they believe they cannot do it the correct way actually does not preclude them from doing it the right way, they just believe so for wrong reasons.  The 1% of cases are nefarious (in programming, meaning intrusion or hacking attempts without any real-world use cases).

In my experience (of a few tens of thousands of programming questions in the last decade), that leaves only an occasional exception to the rule.  (I recall exactly two of such exceptions, both of which lead to a private e-mail exchange to solve the actual issue.)   I claim that while this (not answering questions with incorrect A in public) may annoy you, overall it leads to a better world, and is therefore preferable.

As to myself and teaching materials, I prefer modularity over a fixed lesson plan (or a "tutorial" video).  Just like when giving a (good) presentation, you must tailor the content to best fit the audience.  A good work log, in my opinion, would consist of a "tree" of content, with detail videos split into 1-2 minute clips.  For those who want to view all the videos at once, one can provide a playlist.
 
The following users thanked this post: Wolfram, tooki, newbrain

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6430
  • Country: fi
    • My home page and email address
As a practical example of such an incorrect question, here is one that I once again encountered today:

I need to implement a C function, that reads a file into memory.  It works perfectly in Windows, but fails in Linux, BSDs, and Mac OS with character devices, FIFOS (named pipes), proc/sys pseudofiles, etc.  How can I fix fseek() to work with character devices and FIFOs and pseudofiles?

The answer is, you don't.  You cannot.  The entire approach is completely wrong.  You cannot and should not expect to always know the exact size of your input beforehand; that is unrealistic in general.  You can only determine it for static files (files not being modified concurrently).  That approach may suffice in Windows because of its device/filesystem model, but it definitely does not suffice in most other operating systems.

The correct answer is to simply read the incoming data into a dynamically allocated and reallocated buffer, until you either determine there is too much data to process, or you encounter EOF (end of input).  Here is an example implementation written in ANSI/ISO C89 (with intent on understandability and maintainability, not efficiency).

If you look at the above question, and its accepted answer, you'll see it implements the fseek()/lseek() approach, which is unreliable.  (Not only will it fail for non-file filesystem objects like character devices, it will also fail if the file is modified or appended to while being read.)  If everyone did like steviefaux demanded and just answered the question without pointing out the error in the question, we'd all still live in third world conditions, eating mud and slinging excrement at each other.
 
The following users thanked this post: tooki, newbrain

Offline bsfeechannel

  • Super Contributor
  • ***
  • Posts: 1667
  • Country: 00
Ha, I turned on the universe at the big bang and it will blink out in a few tens of billion years. Top that.  :-DD

OK, God.

We can do things with uCs that simply weren't possible 50 years ago

Yeah. We have to go with the times. Although I love old school electronics, in my computer I have for free now things that I could only dream of a few decades ago as it would have cost me an arm and a leg. And even though I can have them for cheap these days, now they're obsolete, I wouldn't (with a few exceptions) because they're cumbersome compared to what I can have with the modern technology.

This trend of having programming alongside "pure" electronics is not new. Back in the 1970s, formal high school electronics education already included programming as part of the curriculum.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf