Showing posts with label Ranting. Show all posts
Showing posts with label Ranting. Show all posts

Sunday, June 2, 2024

The most costly phrase

You know what the most costly phrase you can say is? "While you're in there..."

Not my computer
I've said it while I was discussing work to be done on my car. Suddenly a job that should have cost a couple hundred dollars now costs a couple thousand. I went in to get the oil changed and the tires rotated and I said, "while you're in there... the air conditioning seems weak." It turns out that replacing the A/C compressor on my car costs a bit over $2k. But it's about to be summer, and it gets hot and humid here.

The same applies with computers. My primary desktop computer crashed a few days ago. The first attempt to reboot hung. The second got as far as the boot menu before powering itself down. The third reboot wouldn't even bring up the BIOS.

Sunday, March 3, 2024

Rant: Ubuntu RAID checking

In addition to a 40-year career as a software engineer specializing in operating systems, I've also managed corporate and personal computer systems. It should be no surprise, then, that my primary home computer system has RAID 1 arrays for several critical file systems.

Some years ago, while far from home, I wanted to demonstrate the utility of RAID arrays to a client. As I explained the up-time benefits in case of a failure, I logged into this system remotely and displayed the array status. To my surprise I found that one of the drives in the array had failed! The system continued to run, of course, because of the redundancy. This perfectly illustrated my point to my client.

RAID arrays need periodic checking to identify any errors that may have developed. For years this was kicked off by a cron job at 1 am local time on the first Sunday of each month. However, apparently with the adoption of systemd a few years ago, the start time changed. It now starts at a random time in the 24 hour period after 1 am.

Today it randomly started at 9:33 am, which was shortly after I sat down at my computer. It's now 12:30 pm, and these checks will run for another two hours. While this is running, applications randomly freeze as they compete for access to the file systems.

What brain-dead idiot thought that starting this at a random time on a Sunday was a good idea?

Monday, June 29, 2020

Wire, Tri, and Wor

Earlier today I cleaned up the VFD driver and the keypad remapping code so it was consistent with the rest of this project's code, and updated the top module for my P170-DH rebuild. Behavioral simulations ran fine, and synthesis and implementation gave only the expected warnings, so I decided to load it into the hardware and see how it ran.

At first I was pretty happy. The VFD displayed a single zero in the right-most digit, with the decimal point illuminated to just the right of the zero. The VFD driver reads the WR register, which is stored in RAM 0 register 1, via a dual-port interface to the RAM. Since an i4002 RAM clears itself to zeros while the reset input is asserted, this is what it should display. Unfortunately, that was the last part that worked as expected.

Thursday, December 19, 2019

Thank you, FedEx!

I received my 4-layer printed circuit boards from JLCPCB today as scheduled. I put one on my bench and ran some basic checks with an ohmmeter, checking to make sure none of the power buses were shorted to ground or each other, and that they connect to the most remote devices on the board. They look great and I didn't find any electrical issues.

The solder stencil came in the same box, enclosed in a separate plastic sleeve which protects it from damage. It, too, looks great, and I very much like the protective sleeve.

I also got the notice of refund from PayPal for the scratched board: $12.66. Thank you, JLCPCB. I'm going to add them to my list of preferred vendors.

Finally, thank you DHL for delivering on schedule, even though it's a week before Christmas and I'm sure you're dealing with higher than normal volumes.

Wait... DHL? What about FedEx?

Sunday, December 15, 2019

Scratched

I received an email from JLCPCB shortly after 3am this morning (4pm Monday in China) indicating they had a problem with one of the boards I ordered:
Thank you for your order from JLCPCB. Your order is completed now, but we regret to tell you that there is is 1 pcs less due to the scratch during the manufacturing process.

To not delay the delivery of your order, we sent those PCBs that are good out first. For the remaining quantity, we can remake and resend or refund the cost accordingly. Please kindly let us know which you prefer.

So sorry for the inconvenience caused!

Friday, May 24, 2019

Linux CoreUtils developers break "ls"


I've been running Linux Mint 18.2 on my desktop for the last few years, and I've been pretty happy with it. However, it's based on Ubuntu 16.04, which is getting kinda long in the tooth. Specifically I found I couldn't compile the version of wxformbuilder I need for my KiCad work because it requires a newer compiler than is available for Ubuntu 16.04.

So I decided to upgrade my systems to something based on the Ubuntu 18.04 release, which is the latest long-term support release. Everything seemed to be going well until I started tried to list files in a directory. The first thing I found is that the sorting in "ls" now ignores underscores in file names.

For example, I was looking for a file named "pcb_parser.cpp" in the file listing:
pcb_layer_widget.cpp
pcb_legacy_draw_utils.cpp
pcb_netlist.cpp
pcbnew_config.cpp
pcbnew.cpp
pcbnew_printout.cpp
When I reached the file named "pcbnew_config.cpp" I figured I must have missed it and scanned the list from the top again. Confused, I looked more methodically and found the names continue:
pcbnew.cpp
pcbnew_printout.cpp
pcb_origin_transform.cpp
pcb_painter.cpp
pcb_parser.cpp
pcbplot.cpp
pcb_plot_params.cpp
What is this madness? This doesn't look like a sorted list to me.

As best I can tell, the people who maintain the core apps (like "ls") have decided to "improve" this fundamental application by changing the default sort algorithm to so-called "Natural Sorting". This means that if you have files with names from "file1" to "file20", you'll see "file10" after "file9" rather than after "file1". That's kind of a nifty trick, but the change in behavior is extremely confusing to those of us who have worked with Linux, Unix, and Unix-like systems for decades.

Apparently they also decided that underscores and spaces don't really count as a character, and file names are sorted as if they don't exist. Except when they do, because "file 13" will be sorted just before "file_13" which will come just before "file13", but after "file12". Clear?

That's all very nice. Except they decided to make "Natural Sorting" the new default behavior instead of an option you can choose. The docs say that the "-v" option turns on this behavior, but by trial and error I discovered that the "-v" option actually turns it OFF. Quite frankly, the unexpected change to a 40 year-old behavior is both unwanted and alarming.

Then I discovered something else: if you have spaces in a file name, "ls" now adds single-quote marks around the name. Like this:
pcb_plot_params.cpp
'pcb plumber.cpp'
pcb_screen.cpp
But only if it's displaying on a terminal, so sometimes you see them and sometimes you don't. Again, this is the new default behavior.

You can disable this by adding either "-N" or "--literal" to the "ls" command, or by setting an environment variable in your .bashrc file:
QUOTING_STYLE=literal
But to find this you have to go looking for this in email threads and bug reports, because it's seemingly not documented elsewhere.

Many people have objected to these changes, but the CoreUtils developers don't care. I guess they want to leave their marks on the world, even if they're black marks.

Sunday, February 24, 2019

Plagiarism

Definition of Plagiarize by Merriam-Webster
https://www.merriam-webster.com/dictionary/plagiarize

plagiarize

verb
pla·​gia·​rize | \ ˈplā-jə-ˌrīz also -jē-ə- \
plagiarized; plagiarizing

Definition of plagiarize


: to steal and pass off (the ideas or words of another) as one's own : use (another's production) without crediting the source

: to commit literary theft : present as new and original an idea or product derived from an existing source

Sunday, April 1, 2018

More issues with the iCEblink40-HX1K

I decided it might be worth implementing a simple UART to allow the use of a PC serial port when testing the I/O peripheral interface. And it sounded like fun.

I looked on OpenCores to see if there was one I wanted to grab instead of writing my own, but most were complex clones of the 16550 UART chip, complete with a bus interface to control registers; far too complex for what I wanted. After all, the receiver is a simple state machine, and the transmitter almost trivial.

I coded up the transmitter in one evening. The receiver took a bit longer, about two evenings. Another evening was spent running it through the Xilinx iSIM simulator working out the kinks. I wrote a top module that took the output of the receiver and looped it back into the transmitter; something of a very complex loopback plug. I connected a PmodRS232 module to the board and connected that to one of my computer's serial ports. All that was left was loading it into the iCEblink40 board and giving it a test. I tapped a key... and got back garbage.

Tuesday, May 2, 2017

Some good news re Lattice

After bad-mouthing Lattice for dropping support for the USB programming interface to their iCEblink40 demo card, I got down to the business of coding my VFD Driver test board test driver.

For those who are insistent about using open-source code to the exclusion of all commercial products, there is an open-source toolchain for the iCE40 series of FPGA: Project IceStorm. That's really cool. If I was looking for an interesting hobby project this might be one, but I already have way too many irons in the fire as it is. Thus I'm using the Lattice-provided IceCube2 development environment.

IceCube2 is a fairly simple wrapper around your choice of two synthesis tools: the Lattice Synthesis Engine (LSE) and Synopsys Synplify Pro. LSE is part of the basic (free) license, while it appears that Synplify requires an extra-cost license. A "performance limited" version of Aldec Active-HDL is provided for simulation and debugging. Active-HDL is a major player in the Verilog/VHDL simulation market, and even the cripple-ware version appears to be on par with Xilinx Isim.

Normally I'd be saying "But Active-HDL won't run under Linux!" at this point, but I found a listing for it in the WineHQ database that gives it a Platinum rating. For non-geeks that means it appears to run very well under the Windows emulation environment in Linux.

I haven't tried to synthesize anything yet, but I may reconsider whether I want to put a Spartan-6 LX4 or an iCE40-HX4K in my calculator rebuild.

Friday, April 28, 2017

LatticeSemi Brokenness

While I'm ragging on vendors for their stupidity, let me turn my attention to Lattice Semiconductor and their broken support for their own demonstration boards.

I've previously written about the Lattice iCEblink40-HX1K demo board. This little board sells for $40 and has several Pmod compatible interface ports. When I designed my VFD Driver test board I decided to use this demo board (which I already own) to drive it. Now that the test boards are in fab I thought I'd load the latest iCEcube2 development environment and get started on some Verilog.

I'd forgotten that the last time I tried to program this board I failed to get their programming software to talk to the board, despite it having a USB programming interface on the board. This time I read the documentation more closely, and discovered that they dropped support for the on-board programming interface in 2014. Seriously? They expect you to buy one of their programming "cables" (pod) for $162.50 to program a $40 experimenter's board?

Searching the 'net I found two documented solutions. One is to load an older version of the development environment. The other is to use a set of completely open-source tools to synthesize, place-and-route, and program the chip. I'm going to use the former for simplicity.

A third possibility may be to use the Adept programming software from Digilent, as it seems Lattice used their tech for the programming interface on the iCEblink40 series of demo boards.

The newer iCEstick and iCE40-HX8K breakout board uses a non-proprietary FT-2232H for the USB interface, and doesn't suffer from this stupidity. If you want to play with a Lattice demo board, avoid the iCEblink40 series!

Saturday, March 4, 2017

KiCad stupidity

As I work on the layout of my nRF24LE1 programmer board I'm discovering all sorts of stupidity in KiCad:
  1. The X coordinates increase as you move left-to-right, but the Y coordinates increase as you move from top-to-bottom. Anyone who ever took a mechanical drafting class would know that no one creates drawings that way. Drawings always start with the (0,0) coordinate in the lower left, not the upper left.
  2. The PCB is drawn inside a frame that is sized to the paper you may print on (A4, US Letter, etc.). If your board doesn't fit in a US Letter (8.5" x 11.0" frame you have to select a different paper size. 
  3. The coordinates displayed at the bottom of the window are relative to the upper left corner of the paper you might print on. Although you can set a relative origin by tapping the space bar, when placing components using the edit dialog box you can only specify relative to the upper left corner of the paper page.
  4. There is a "Move Footprint Exactly" dialog box. However, this moves it relative to its current position, not to an absolute position. There is a proposed patch for this, but it will no doubt be relative to the paper origin.
  5. There is a "Set Grid Origin" option. It affects only the manufacturing output but has no effect on the layout display.
  6. If you draw a "graphic line or polygon", to delineate the board outline for example, you can't edit it. You can move it only by doing a rectangular area select, but if you want to change its length you can't; you have to delete the line and re-draw it.
  7. There is no way to create a via other than as part of switching layers while routing a signal.
Many of these issues could be because the KiCad developers are programmers and not engineers. I say that as someone who is a programmer by education, training, and profession. In the begining, raster graphics plotted from upper left to lower right because that's the way CRT-based TVs were scanned. But I had a mechanical drafting class in 8th or 9th grade (mid 1970s), and understand that computer programs are used mostly by non-programmers.

None of this is made better by the sycophants who bleat about how KiCad is the one true way and how everyone else in the world does things wrong and we all must adapt to their broken way of doing things.

Wednesday, June 12, 2013

Why did I stop ordering from you?

This evening I received a phone call from a California phone number that I didn't recognize. I was busy at the time and let it go to voicemail. About 10 minutes later my phone beeped to announce an incoming email.

It turned out to be from a sales rep from a board house wanting to know why I "stopped" ordering from them. The answer is easy: I placed one order with them, and they screwed it up. Then they argued with me about whether they'd screwed it up when all they had to do was compare the Gerbers with the board they delivered. There's an obvious difference when the pads for an SMD are missing, leaving only the stubs of the traces that are supposed to connect to them. Especially when the customer is telling you where to look.

Oh, but they've "invested $45 million" in the last 10 years upgrading their equipment and carry ISO this and ISO that certifications. Their new brochure looks nice, but did they also replace the customer service people? Reputations are easy to tarnish and hard to rebuild, and I have no incentive to give them another try.

(Also, their prices are almost double that of the European board house I've been using, and their product is gorgeous).

Sunday, April 14, 2013

Disappearing parts

It might seem like I'm a bit paranoid about single-source parts like the NXP BSS83. When I decided to actually build the discrete-part 4004 CPU, one of the first things I did was order enough of all the parts I'd need to build the whole project, plus extras for goofs. Since then I've received several courtesy notices from DigiKey about parts becoming obsolete, but all of them would be easily replaceable if I'd needed them. But I already have everything except the PCBs.

I have another project going which involves very low power RF circuits. It's another one that I started a couple years ago and work on in fits and starts. My plan was to build 5 or 6 of these little devices, and I carefully acquired what I thought would be the critical bits. I'd had 6 PCBs made and assembled two. This evening I decided to assemble another three for a larger-scale test. The only thing I don't have on hand are the #6-32 nylon screws that hold the PCB to the plastic case, so I went over to my local big-box hardware store where I'd bought them before. They no longer carry them. They didn't sell enough of them to waste the shelf space on them.

Why nylon? Metal has a way of detuning tuned electronic circuits so I don't want metal screws that close to the antenna.

This is not a major catastrophe. I can get suitable screws elsewhere. The big-box store will even let me order them in reasonable quantity and deliver them for pickup at the store at no cost -- with a 10-day lead time. But I wanted them tonight.

The moral of the story is that it's a really good idea to buy everything when you start, because you never know what will disappear or become harder to get.

Thursday, April 11, 2013

Co się dzieje w Polsce?

What is happening in Poland?


This is not the most popular blog in the world, but I do get views from just about every country in the world. Over the last few months, though, my views from Poland have risen until they account for more than half of views for any given period. Did I become required reading for an Electrical Engineering class? Or maybe a Technical English class?

Edited 2013-08-17 to add:

Apparently these accesses are what is known as "referer spam" (sic). Some people put a widget in their blogs that automatically provides links back to those sites which bring them the most traffic. By bombarding a blog with fake views, the back-links to these fake referrals cause the spamming site to rise in search engine rankings. Most of these fake referrals link to porn or malware sites.

Since I don't provide such automatic back-links, and I never click on any suspect referral link, their spamming does nothing but screw up my statistics. Fortunately, my stats are merely a curiosity for me.

Monday, December 31, 2012

An interesting coincidence

It's New Year's Eve for most of us  who use the Gregorian calendar, and New Year's Day for those more than 10 hours east of me. Best wishes to everyone!

I was browsing around the other day, and I noticed the following announcement in the Intel 4004 35th Anniversary site:
Coming soon: Synthesizable Verilog source and testbench for the 4001 ROM, 4002 RAM, and 4004 microprocessor.
They're doing one too! Or... are they planning to link to or repost mine, once I get the rest of the Verilog posted? I'd like to think so, but I would have thought I'd have gotten a "that's a cool project!" email by now. Not that they're obligated -- most of the code is under the Creative Commons license. Maybe they're just shy? :-D

Regardless, there will be updates. It's just that they're moving at the speed of boredom: the more bored I am the faster they move. Recently work has been very not-boring, which has slowed the pace of my hobby projects.

Monday, October 22, 2012

A Non-Update

After devoting a lot of personal time over several months to this project, my attention has necessarily turned elsewhere. Activities such as client projects, where an internal release is pending at the end of this month, have priority. They are paying the bills, after all.

That said, I have not abandoned this project. I still plan to release the Verilog source for my 4004 CPU implementation later this month. Also on my "to do" list for later this year is characterization of the DRAM array, and the layout of the remaining four PCBs to complete the CPU.