Gawking Text Files

Some tools in a toolbox are versatile. You can use a screwdriver as a pry bar to open a paint can, for example. I’ve even hammered a tack in with a screwdriver handle even though you probably shouldn’t. But a chainsaw isn’t that versatile. It only cuts. But man does it cut!

aukAWK is a chainsaw for processing text files line-by-line (and the GNU version is known as GAWK). That’s a pretty common case. It is even more common if you produce a text file from a spreadsheet or work with other kinds of text files. AWK has some serious limitations, but so do chainsaws. They are still super useful. Although AWK sounds like a penguin-like bird (see right), that’s an auk. Sounds the same, but spelled differently. AWK is actually an acronym of the original author’s names.

If you know C and you grok regular expressions, then you can learn AWK in about 5 minutes. If you only know C, go read up on regular expressions and come back. Five minutes later you will know AWK. If you are running Linux, you probably already have GAWK installed and can run it using the alias awk. If you are running Windows, you might consider installing Cygwin, although there are pure Windows versions available. If you just want to play in a browser, try webawk.

Continue reading “Gawking Text Files”

Capacitors Made Easy The Hackaday Way

If you build electronic circuits on a regular basis the chances are you will have used capacitors many times. They are a standard component along with the resistor whose values are lifted off the shelf without a second thought. We use them for power supply smoothing and decoupling, DC blocking, timing circuits, and many more applications.

Different capacitor applications. By Elcap (Own work) [CC0], via Wikimedia Commons
Different capacitor applications. By Elcap (Own work) [CC0], via Wikimedia Commons
A capacitor though is not simply a blob with two wires emerging from it and a couple of parameters: working voltage and capacitance. There is a huge array of capacitor technologies and materials with different properties. And while almost any capacitor with the right value can do the job in most cases, you’ll find that knowing more about these different devices can help you make something that doesn’t just do the job, but does the best possible job. If you’ve ever had to chase a thermal stability problem or seek out the source of those extra dBs of noise for example you will appreciate this.

Continue reading “Capacitors Made Easy The Hackaday Way”

Network Security Theatre

Summer is nearly here, and with that comes the preparations for the largest gathering of security researchers on the planet. In early August, researchers, geeks, nerds, and other extremely cool people will descend upon the high desert of Las Vegas, Nevada to discuss the vulnerabilities of software, the exploits of hardware, and the questionable activities of government entities. This is Black Hat and DEF CON, when taken together it’s the largest security conference on the planet.

These conferences serve a very important purpose. Unlike academia, security professionals don’t make a name for themselves by publishing in journals. The pecking order of the security world is determined at these talks. The best talks, and the best media coverage command higher consultancy fees. It’s an economy, and of course there will always be people ready to game the system.

Like academia, these talks are peer-reviewed. Press releases given before the talks are not, and between the knowledge of security researchers and the tech press is network security theatre. In this network security theatre, you don’t really need an interesting exploit, technique, or device, you just need to convince the right people you have one.

Continue reading “Network Security Theatre”

How Lasers Actually Work

Lasers are optical amplifiers, optical oscillators, and in a way, the most sophisticated light source ever invented. Not only are lasers extremely useful, but they are also champions of magnitude: While different laser types cover the electromagnetic spectrum from radiation (<10 nm) over the visible spectrum to far infrared light (699 μm), their individual output band can be as narrow as a few µHz. Their high temporal and spatial coherence lets them cover hundreds of meters in a tight beam of lowest divergence as a perfectly sinusoidal, electromagnetic wave. Some lasers reach peak power outputs of several exawatts, while their beams can be focused down to the smallest spot sizes in the hundreds and even tens of nanometers. Laser is the acronym for Light Amplification by Stimulated Emission Of Radiation, which suggests that it makes use of a phenomenon called stimulated emission, but well, how exactly do they do that? It’s time to look the laser in the eye (Disclaimer: don’t!).

Continue reading “How Lasers Actually Work”

How To Set Up And Run A Makerspace

A bunch of people who share a large workshop and meet on a regular basis to do projects and get some input. A place where kids can learn to build robots instead of becoming robots. A little community-driven factory, or just a lair for hackers. The world needs more of these spaces, and every hackerspace, makerspace or fab lab has its very own way of making it work. Nevertheless, when and if problems and challenges show up – they are always the same – almost stereotypically, so avoid some of the pitfalls and make use of the learnings from almost a decade of makerspacing to get it just right. Let’s take a look at just what it takes to get one of these spaces up and running well.

Continue reading “How To Set Up And Run A Makerspace”

Prusa Shows Us The New I3 MK2 3D Printer And Where The Community Is Headed

Josef Prusa’s designs have always been trustworthy. He has a talent for scouring the body of work out there in the RepRap community, finding the most valuable innovations, and then blending them together along with some innovations of his own into something greater than the sum of its parts. So, it’s not hard to say, that once a feature shows up in one of his printers, it is the direction that printers are going. With the latest version of the often imitated Prusa i3 design, we can see what’s next.

Continue reading “Prusa Shows Us The New I3 MK2 3D Printer And Where The Community Is Headed”

Wrangling High Voltage

Working with high voltage is like working with high pressure plumbing. You can spring a leak in your plumbing, and of course you fix it. And now that you’ve fixed that leak, you’re able to increase the pressure still more, and sometimes another leak occurs. I’ve had these same experiences but with high voltage wiring. At a high enough voltage, around 30kV or higher, the leak manifests itself as a hissing sound and a corona that appears as a bluish glow of excited ions spraying from the leak. Try to dial up the voltage and the hiss turns into a shriek.

Why do leaks occur in high voltage? I’ve found that the best way to visualize the reason is by visualizing electric fields. Electric fields exist between positive and negative charges and can be pictured as electric field lines (illustrated below on the left.) The denser the electric field lines, the stronger the electric field.

The stronger electric fields are where ionization of the air occurs. As illustrated in the “collision” example on the right above, ionization can happen by a negatively charged electron leaving the electrically conductive surface, which can be a wire or a part of the device, and colliding with a nearby neutral atom turning it into an ion. The collision can result in the electron attaching to the atom, turning the atom into a negatively charged ion, or the collision can knock another electron from the atom, turning the atom into a positively charged ion. In the “stripping off” example illustrated above, the strong electric field can affect things more directly by stripping an electron from the neutral atom, again turning it into a positive ion. And there are other effects as well such as electron avalanches and the photoelectric effect.

In either case, we wanted to keep those electrons in the electrically conductive wires or other surfaces and their loss constitutes a leak in a very real way.

Continue reading “Wrangling High Voltage”