Ask Hackaday: Are 80 Characters Per Line Still Reasonable In 2020?

Software developers won’t ever run out of subjects to argue and fight about. Some of them can be fundamental to a project — like choice of language or the programming paradigm to begin with. Others seem more of a personal preference at first, but can end up equally fundamental on a bigger scale — like which character to choose for indentation, where to place the curly braces, or how to handle line breaks. Latest when there’s more than one developer collaborating, it’s time to find a common agreement in form of a coding style guide, which might of course require a bit of compromise.

Regardless of taste, the worst decision is having no decision, and even if you don’t agree with a specific detail, it’s usually best to make peace with it for the benefit of uniformly formatted code. In a professional environment, a style guide was ideally worked out collaboratively inside or between teams, and input and opinions of everyone involved were taken into consideration — and if your company doesn’t have one to begin with, the best step to take is probably one towards the exit.

The situation can get a bit more complex in open source projects though, depending on the structure and size of a project. If no official style guide exists, the graceful thing to do is to simply adopt the code base’s current style when contributing to it. But larger projects that are accustomed to a multitude of random contributors will typically have one defined, which was either worked out by the core developers, or declared by its benevolent dictator for life.

In case of the Linux kernel, that’s of course [Linus Torvalds], who has recently shaken up the community with a mailing list response declaring an overly common, often even unwritten rule of code formatting as essentially obsolete: the 80-character line limitation. Considering the notoriety of his rants and crudeness, his response, which was initiated by a line break change in the submitted patch, seems downright diplomatic this time.

[Linus]’ reasoning against a continuing enforcement of 80-char line limits is primarly the fact that screens are simply big enough today to comfortably fit longer lines, even with multiple terminals (or windows) next to each other. As he puts it, the only reason to stick to the limitation is using an actual VT100, which won’t serve much use in kernel development anyway.

Allowing longer lines on the other hand would encourage the use of more verbose variable names and whitespace, which in turn would actually increase readability. Of course, all to a certain extent, and [Linus] obviously doesn’t call for abolishing line breaks altogether. But he has a point; does it really make sense to stick to a decades old, nowadays rather arbitrary-seeming limitation in 2020?

Continue reading “Ask Hackaday: Are 80 Characters Per Line Still Reasonable In 2020?”

Building A 3270 Terminal Controller

We like to talk about how most of our computers today would have been mainframes a scant 40 or 50 years ago. Because of that, many people who want to run IBM mainframes such as the IBM 360 or 370 use the Hercules emulator to run the big iron on their PCs. However, mainframe IBM computers used an odd style of terminal and emulating it on a PC isn’t always as satisfying. At least, that’s what [lowobservable] thought, so he decided to get a 3270 terminal working with Hercules.

Back in the bad old days of computing, there were two main styles of terminals. Some companies, for example DEC, essentially used terminals as a “glass teletype.” That is, the screen was an analog of a roll of paper — more or less — and the keyboard immediately sent things to the remote system. However, companies like IBM and HP favored a different approach. Their terminals dealt with screens full of data. The terminal was smart enough to let you fill in forms, edit text on the screen, and then you’d send the entire screen in one gulp. Both systems had pros and cons, but — as you might expect — the screen-oriented terminals were more complex.

Continue reading “Building A 3270 Terminal Controller”

Can You Help 3D Print A Selectric Ball?

The IBM Selectric changed typewriters as we knew them. Their distinctive ball element replaced the clunky row of typebars and made most people faster typists. When [Steve Malikoff] thought about 3D printing a type ball — colloquially known as a golf ball — it seemed like a great idea.

The problem? It just doesn’t work very well. According to [Steve], it is likely because of the low resolution of the printer. However, it isn’t clear the latitudes of the characters are correct. and there are a few other issues. It is possible that a resin printer would do better and there’s a call for someone out there to try it and report back. We are guessing a finer nozzle and very low layer height might help on an FDM printer.

Judging from the images, it looks like some of the balls do pretty well, but don’t get a full strike at the tilt angle. So it could be something else. However, it does sound like cleaning up the print so it fits is a major problem.

The Selectric was notable for several reasons — you can see an ad for the machine in the video below. The type ball meant you couldn’t jam keys. Since you didn’t have to unjam keys and you had the ribbon in a cartridge, you would have to work really hard to get ink on your fingers, even if you used the cloth ribbon instead of the arguably better carbon film ribbon. The Selectric II could even use a special tape to lift the carbon ribbon off the paper for correcting mistakes. No white-out liquid or fussing with little strips of correction paper. The fact that the ball moves means you don’t have to clear space on the side of the machine for the platen to travel back and forth.

Can you help? If you have a Selectric I or II and a high-quality printer, this would be a fun project to try and report back your results to [Steve]. If you are familiar with the later issue typeballs, you might not have seen the wire clip that [Steve] uses to hold the ball in place. However, you can see them in the video ad below. More modern balls use a plastic lever that acts as a handle so even with cloth ribbons you have less chance of getting ink on your hands.

Although there were Selectrics meant to interface with a computer, you can refit any of them to do it with some work. The Selectric also has a role in one of the great techno spy stories of all time: The GUNMAN project.

Continue reading “Can You Help 3D Print A Selectric Ball?”

The Barn Find IBM 360 Comes Home

It’s a story that may be familiar to many of us, that of bidding on an item in an online auction and discovering once we go to pick it up that we’ve bought a bit more than we’d bargained for. We told you earlier in the year about the trio of Brits who bought an IBM System/360 mainframe computer from the mid 1960s off of a seller in Germany, only to find in the long-abandoned machine room that they’d bought not just one but two 360s, and a System/370 to boot. Their van was nowhere near big enough for all three machines plus a mountain of cabling, documentation, and period storage media, so they moved it to a hastily-rented storage unit and returned home to work out what on earth to do next.

Now we’ve received an email from the trio with some good news; not only have they managed to bring their hoard of vintage big iron computing back home, but also they’ve found a home for it in the rather unusual surroundings of a former top-secret UK Government signals intelligence station. With the help of a friendly specialist IT relocation company they unleashed it from their temporary storage and into the truck for the UK. It’s a tale of careful packing and plenty of wrapped pallets, as we begin to glimpse the true extent of the collection as you can see in the video below the break, because not only have they secured all the hardware but they also have a huge quantity of punched cards and disk packs. The prospect of a software archaeology peek into how a 1960s mainframe was used by its original customer is a particularly interesting one, as it’s likely those media contain an ossified snapshot of its inner workings.

We’re hoping to follow this project as it evolves, and see (we hope) a room full of abandoned junk transformed into a facsimile of a typical 1960s business computing setup. If you’d like to catch up, read our original coverage of the find.

Continue reading “The Barn Find IBM 360 Comes Home”

Upgrade Board Turns Typewriter Into A Teletype

It may come as little surprise to find that Hackaday does not often play host to typewriter projects. While these iconic machines have their own particular charm, they generally don’t allow for much in the way of hardware modification. But then the IBM Wheelwriter 1000 isn’t exactly a traditional typewriter, which made its recent conversion to a fully functional computer terminal possible.

A product of the Computer History Museum’s [IBM 1620 Jr. Team], this modification takes the form of a serial interface board that can be built at home and installed into the Wheelwriter. The board allows the vintage electronic typewriter to speak RS-232 and USB, so it can be connected to whatever vintage (or not so vintage) computer you can imagine. The documentation for the project gives a rough cost of $150, though that does assume you’ve already got a Wheelwriter 1000 kicking around.

The GitHub repository includes everything you need to create your own board, and there’s even a highly detailed installation guide that goes over the case modifications necessary to get the new hardware installed. It also explains that you’ll want to get a new keycap set for your Wheelwriter if you perform this modification, as the original board doesn’t have all of the ASCII characters.

So why adapt an old electric typewriter to function as a teletype? As explained by the [IBM 1620 Jr. Team], there are projects out there looking to recreate authentic 1960s-era computing experiences that need a (relatively) affordable paper terminal. The originals are too rare to use in modern recreations, but with their adapter board, these slightly less archaic input devices can be used in their place.

Once you’ve built your new teletype, or in the somewhat unlikely event you already have one at the ready, we’ve seen a couple of projects that you might be interested in to put it to use.

Teaching A Vintage Line Printer To Make Music, All Over Again

Sit next to any piece of machinery long enough and you get to know it by the sounds it makes. Think about the sounds coming from any 3D-printer or CNC machine; it’s easy to know without looking when the G code is working through the sines and cosines needed to trace out a circle, for instance.

It was the same back in the day, when bored and bright software engineers heard note-like sounds coming from their gear and wrote programs to turn them into crude music machines. And now, [Ken Shirriff] details his efforts to revive a vintage IBM 1403 line printer’s musical abilities. The massive 1960s-era beast is an irreplaceable museum piece now, but when [Ken] and his friends at the Computer History Museum unearthed stacks of punch cards labeled with song titles like “Blowin’ In the Wind” and “The Blue Danube Waltz,” they decided to give it a go.

The 1403 line printer has a unique chain-drive print head, the inner workings of which [Ken] details aptly in his post. Notes are played by figuring out which character sequences are needed to get a particular frequency given the fixed and precisely controlled speed of the rotating chain. The technique is quite similar to that used by musical instruments such as the Floppotron, or when coercing music from everyday items including electric toothbrushes.

Lacking the source code for the music program, [Ken] had to reverse engineer the compiled program to understand how it works and to see if playing music would damage the chain drive. The video below shows the printer safely going through a little [Debussy]; audio clips of songs originally recorded back in 1970 are available too.

Continue reading “Teaching A Vintage Line Printer To Make Music, All Over Again”

ORNL's Summit supercomputer, fastest until 2020 (Credit: ORNL)

Joining The RISC-V Ranks: IBM’s Power ISA To Become Free

IBM’s Power processor architecture is probably best known today as those humongous chips that power everything from massive mainframes and supercomputers to slightly less massive mainframes and servers. Originally developed in the 1980s, Power CPUs have been a reliable presence in the market for decades, forming the backbone of systems like IBM’s RS/6000 and AS/400 and later line of Power series.

Now IBM is making the Power ISA free to use after first opening up access to the ISA with the OpenPower Foundation. Amidst the fully free and open RISC-V ISA making headway into the computing market, and ARM feeling pressured to loosen up its licensing, it seems they figured that it’s best to join the party early. Without much of a threat to its existing business customers who are unlikely to whip up their own Power CPUs in a back office and not get IBM’s support that’s part of the business deal, it seems mostly aimed at increasing Power’s and with it IBM’s foothold in the overall market.

The Power ISA started out as the POWER ISA, before it evolved into the PowerPC ISA, co-developed with Motorola  and Apple and made famous by Apple’s use of the G3 through G5 series of PowerPC CPUs. The PowerPC ISA eventually got turned into today’s Power ISA. As a result it shares many commonalities with both POWER and PowerPC, being its de facto successor.

In addition, IBM is also opening its OpenCAPI accelerator and OpenCAPI Memory Interface variant that will be part of the upcoming Power9′ CPU. These technologies are aimed at reducing the number of interconnections required to link CPUs together, ranging from NVLink, to Infinity Fabric and countless more, not to mention memory, where OMI memory could offer interesting possibilities.

Would you use Power in your projects? Let us know in the comments.