Programming In Plain English

Star Trek had really smart computers, that you could simply tell what you wanted to do and they did it. The [Rzeppa] family has started a plain English compiler. It runs under Windows and appears to be fairly capable.

Plain language programming isn’t exactly a new idea. COBOL was supposed to mimic natural language with statements like:

MULTIPLY HOURS BY RATE GIVING PAYAMOUNT

You could argue this didn’t go over very well, but there is still a whole lot of COBOL doing a whole lot of things in the business world. Today computers have more memory and speed, so programmers have been getting more and more verbose for decades. No more variable names such as X1 and fprdx. Maybe this will catch on.

Continue reading “Programming In Plain English”

Binary Math Tricks: Shifting To Divide By Ten Ain’t Easy

On small CPUs, you often don’t have a multiply or divide instruction. Of course, good programmers know that shifting right and left will multiply or divide by a power of two. But there are always cases where you need to use something that isn’t a power of two. Sometimes you can work it out for multiplication.

For example, multiplying by 10 is common when dealing with conversion between binary and decimal. But since 10n is equal to 8n+2n, you can express that as a bunch of left shift three times to multiply by eight, adding that value to your original value shifted left once to multiply by two.

But division is a different problem. n/10 does not equal n/8-n/2 or anything else simple like that. The other day a friend showed me a very convoluted snippet of code on Stack Overflow by user [realtime] that divides a number by 10 and wanted to know how it worked. It is pretty straightforward if you just stick with the math and I’ll show you what I mean in this post. Turns out the post referenced the venerable Hacker’s Delight book, which has a wealth of little tricks like this.

Continue reading “Binary Math Tricks: Shifting To Divide By Ten Ain’t Easy”

Apollo 11 Trig Was Brief

In this day and age where a megabyte of memory isn’t a big deal, it is hard to recall when you had to conserve every byte of memory. If you are a student of such things, you might enjoy an annotated view of the Apollo 11 DSKY sine and cosine routines. Want to guess how many lines of code that takes? Try 35 for both.

Figuring out how it works takes a little knowledge of how the DSKY works and the number formats involved. Luckily, the site has a feature where you can click on the instructions and see comments and questions from other reviewers.

Continue reading “Apollo 11 Trig Was Brief”

Solder To Aluminum

If you’ve ever tried to solder to aluminum, you know it isn’t easy without some kind of special technique. [SimpleTronic] recently showed a method that chemically plates copper onto aluminum and allows you to solder easily. We aren’t chemists, so we aren’t sure if this is the best way or not, but the chemicals include salt, copper sulfate (found in pool stores), ferric chloride as you’d use for etching PCBs, and water.

Once you have bare aluminum, you prepare a solution from the copper sulfate and just a little bit of ferric chloride. Using salt with that solution apparently removes oxidation from the aluminum. Then using the same solution without the salt puts a copper coating on the metal that you can use for soldering. You can see a video of the process below.

Continue reading “Solder To Aluminum”

Learning About VNAs

We live in a good time to be an electronics geek. It used to be only the richest or shrewdest among us had a really good oscilloscope, while these days it is entirely feasible to have a scope that would have cost a fortune a few decades ago, a logic analyzer, arbitrary waveform generator, and what would have once been a supercomputer and still not be in debt. One of the cooler pieces of gear for people working on RF electronics is a vector network analyzer (VNA) which used to be exotic, but now can be bought for very little. But what do you do with it? [W2AEW] has the answer.

We always look forward to a video from [W2AEW]. Even if we know about the subject he covers, we usually pick up something new or interesting. Like all of his videos, this one is intensely practical. Not a lot of drawing but plenty of scope shots and experimenting.

Continue reading “Learning About VNAs”

The Sound Of Silence: Speed Up Your Video Consumption

There’s a lot of interesting content produced on video these days. Invariably, though, when we post something some comments will appear lamenting that a video isn’t the most efficient way to disseminate technical information. We have mixed feelings. Some things benefit from being able to see, for example, a screencast. Some people like the human connection of seeing an instructor interact with a class instead of just reading. But we will admit that sometimes a video takes longer to watch, especially if it is full of pauses. Unsilence is a tool from [labmoellertim] that can fix that. The command line tool takes a video and strips out the parts that are silent. You can also use it as a Python library if you want to build your own tools using the technique.

If you’ve ever taken a class online, it isn’t uncommon to speed up a video so you can get through class faster. This works to a point, but removing or speeding up silent gaps means you don’t have to “listen faster.” Of course, you could still speed up the video, too.

Continue reading “The Sound Of Silence: Speed Up Your Video Consumption”

Soon… Inkjet Your Circuit Boards

Printed circuit board fabrication — especially in basements and garages — have been transformed by the computer revolution. Before that, people would use a permanent marker or little decals to layout circuit boards prior to etching. Sometimes, they’d do it on film and use a photo process, but they did make decals that you applied directly to the board to resist the etch. Now a team from Georgia Tech, University of Tokyo, Carnegie Mellon, and the University of Nebraska has brought things full circle. Their process inkjet prints silver traces on a substrate that they can then transfer to a circuit board — no etching required.

They start with a standard Epson inkjet with cartridges that have silver-bearing ink. The patterns print on a transfer paper that ensures the particles fuse so there’s no sintering step required to make sure the traces are all conductive. A sticky backing is applied and peels the pattern off the transfer paper. You can see more in the video below.

Continue reading “Soon… Inkjet Your Circuit Boards”