Learn To Program With Literate Programming

My heyday in programming was about five years ago, and I’ve really let my skills fade. I started finding myself making excuses for my lack of ability. I’d tackle harder ways to work around problems just so I wouldn’t have to code. Worst of all, I’d find myself shelving projects because I no longer enjoyed coding enough to do that portion. So I decided to put in the time and get back up to speed.

Normally, I’d get back into programming out of necessity. I’d go on a coding binge, read a lot of documentation, and cut and paste a lot of code. It works, but I’d end up with a really mixed understanding of what I did to get the working code. This time I wanted to structure my learning so I’d end up with a more, well, structured understanding.

However, there’s a problem. Programming books are universally boring. I own a really big pile of them, and that’s after I gave a bunch away. It’s not really the fault of the writer; it’s an awkward subject to teach. It usually starts off by torturing the reader with a chapter or two of painfully basic concepts with just enough arcana sprinkled in to massage a migraine into existence. Typically they also like to mention that the arcana will be demystified in another chapter. The next step is to make you play typist and transcribe a big block of code with new and interesting bits into an editor and run it. Presumably, the act of typing along leaves the reader with such a burning curiosity that the next seventeen pages of dry monologue about the thirteen lines of code are transformed into riveting prose within the reader’s mind. Maybe a structured understanding just isn’t worth it.

I wanted to find a new way to study programming. One where I could interact with the example code as I typed it. I wanted to end up with a full understanding before I pressed that run button for the first time, not after.

When I first read about literate programming, my very first instinct said: “nope, not doing that.” Donald Knuth, who is no small name in computing, proposes a new way of doing things in his Literate Programming. Rather than writing the code in the order the compiler likes to see it, write the code in the order you’d like to think about it along with a constant narrative about your thoughts while you’re developing it. The method by which he’d like people to achieve this feat is with the extensive use of macros. So, for example, a literate program would start with a section like this:

Continue reading “Learn To Program With Literate Programming”

These 20 Projects Just Won $1000 In The Hackaday Prize

For this year’s Hackaday Prize, we’re doing something spectacular. We’re funding the next great piece of Open Hardware by giving away thousands of dollars for the best hardware projects. Just a few days ago, we wrapped up the Anything Goes portion of The Hackaday Prize, an electronic free for all to build the coolest gizmos imaginable. Now, it’s time to announce the twenty winners of the Anything Goes portion of The Hackaday Prize.

The winners of the Anything Goes challenge, in no particular order, are:

These twenty project just won $1000 and will now move on to the last phase of The Hackaday Prize, to be judged by our fourteen celebrity judges. Congrats! There’s a lot of work for these project to do before the final judging in October. Better get to work!

citizenScienceIf your project didn’t make the cut, there’s still ample opportunity for you to build the next great hardware gizmo. For the next few weeks, we’re running the Citizen Scientist portion of The Hackaday Prize. We’re looking for projects that expand the frontiers of knowledge, and give the common man the tools to discover the world.

Citizen Scientist is this month’s Hackaday Prize challenge to create something new, study something undiscovered, or replicate scientific studies. We’re opening up the gates for everyone to build their own apparatus and do their own research.

Like the Design Your Concept and Anything Goes rounds of The Hackaday Prize, the top twenty projects will win $1000, and go on to the Hackaday Prize finals for a chance to win the Hackaday Prize – $150,000 and a residency at the Supplyframe Design Lab in Pasadena.

If you don’t have a project up on Hackaday.io, you can start one right now and submit it to The Hackaday Prize. If you already have a project up, add it to the Citizen Scientist challenge using the dropdown menu on the left sidebar of your project page.

The HackadayPrize2016 is Sponsored by:

Poetic SSIDs

Artists see the same world that the rest of us do. They just see it from a little bit off to the left. Where you see picking an ESSID for your router as being a hassle, or an opportunity to insult your neighbors, [Dmitry], alias [::vtol::] sees a poetry-delivery mechanism.

Based on ESP8266 units, each “poet” has a battery and a switch. Turn it on and it changes its SSID once every ten seconds, feeding everyone who’s listening the next line of a poem. You can’t connect to the network, but you can occasionally hit refresh on your WiFi scanner and read along.

Since they’re so cheap to build, [::vtol::] sees them almost as if they were poetry-throwies. You could easily afford to leave a few around the city, guerilla-style, broadcasting your (slow) message one SSID at a time. We love the video clips (inlined below) of him riding the subway with the device on.

Continue reading “Poetic SSIDs”

Artificial Muscles To Bring Relief To Robotic Tenseness

Custom, robotic prosthesis are on the rise. In numerous projects, hackers and makers have taken on the challenge. From Enabling The Future, Open Hand Project, OpenBionics to the myriad prosthesis projects on Hackaday.io. Yet, the mechatronics that power most of them are still from the last century. At the end of the day, you can only fit so many miniature motors and gears into a plastic hand, and only so many hydraulics fit onto an arm or leg before it becomes a slow, heavy brick – more hindering than helpful. If only we had a few extra of these light, fast and powerful actuators that help us make it through the day. If only we had artificial muscles.

Continue reading “Artificial Muscles To Bring Relief To Robotic Tenseness”

Hacking The Tesla Model S Rear Drive Unit

[Jason Hughes] is a big fan of Tesla, he’s spent a lot of time hacking on them to figure out what fancy things the automaker is up to. His most recent adventures are with the rear drive unit of a Tesla Model S.

[Jason] has had some fame in the Tesla community before; his most publicized hack was finding the model number for Tesla’s next edition of their car hashed away in the firmware. For this project he procured a rear drive unit from… somewhere, and with some help got it onto his bench at home.

His first steps were to hook it up to some power and start sniffing the CAN bus for commands. It took him a few hours but he was able to get the motor turning. He kept working at it until he had the full set of commands. So, he hooked up circulating water to the unit for cooling, and put it through its paces (at one point the unit announced it was now traveling at 117mph).

In the end he was able to get all the features working, including generation! He even made his own board for contrl. Just listening to the motor spin up is satisfying. Videos after the break.

Continue reading “Hacking The Tesla Model S Rear Drive Unit”

The World’s Supply Of DB-19 Connectors

[Steve] over at Big Mess O’ Wires has a very, very niche product. It’s the Floppy Emu, a hard disk emulator for the Apple II, Lisa, and very old Macs. The Floppy Emu takes data stored on an SD card and presents it to these classic computers through a contemporary connector, the venerable DB-19. This connector is in the same family as the familiar DB-25 parallel port, DE-9 serial port and the old DA-15 joystick port, but there’s something very special about the DB-19 connector – nobody makes it anymore, and no surplus electronics store has any in stock. They’re unobtanium, and when you’re making a product built around this connector, you’re going to have a few problems.

Those problems have come to a head over the past year, but getting a few thousand DB-19 connectors manufactured has always seemed just out of reach. It would be a five-figure investment for a very niche product, and [Steve] would have to find someone to make the connectors.

The world’s shortage of DB-19 connectors is no more. After chatting up a few people in the NeXT and Atari communities, [Steve] set up a group buy and manufactured the first batch of DB-19 connectors in recent memory. The world’s supply of DB-19 connectors, all 10,000 of them, is now in [Steve]’s living room.

The process of manufacturing ten thousand DB-19 connectors actually wasn’t that hard for [Steve]. Over the past year, he’s reached out to manufacturers to get a quote, and he still had those numbers in his rolodex. The only problem was finding an engineering drawing of a DB-19 connector and transferring a large amount of money to Hong Kong. The drawing was easy enough, as datasheets sometimes last longer than the parts they describe. Transferring the money over to the manufacturer meant convincing a bank manager there is not a Nigerian prince in Hong Kong and thirty minutes of paperwork.

After a few months, a round of prototyping, and a trip through customs, the world’s supply of DB-19 connectors finally landed on [Steve]’s porch. He still needs to ship them out to the NeXT and Atari folk who participated in the group buy, but the great shortage of DB-19 connectors is over for now.

Hackaday Prize Entry: Dave Thomas’ Desert Dryer

It seemed utter madness — people living in hot desert climates paying to heat air. At least it seemed that way to [David Thomas] before he modified his tumble dryer to take advantage of Arizona’s arid environment.

Hanging the wash out to dry is a time-honored solution, and should be a no-brainer in the desert. But hanging the wash takes a lot of human effort, your laundry comes back stiff, and if there’s a risk of dust storms ruining your laundry, we can see why people run the dryer indoors. But there’s no reason to waste further energy heating up your air-conditioned interior air when hot air is plentiful just a few meters away.

[David]’s modification includes removing the gas heating components of the dryer and adding an in-line filter. He explains it all in a series of videos, which at least for his model, leave no screw unturned. It’s not an expensive modification either, consisting mostly of rigid dryer hose and copious amounts of aluminum duct tape. He mentions the small fire that resulted from failing to remove the gas igniter, so consider yourself warned. The intake filter and box were originally intended for a house air-conditioning system, and required only minimal modifications.

This is a great build, being both cheap and easy to implement as well as being environmentally friendly without requiring a drastic change to [David]’s lifestyle. It makes us wish we had a similar endless supply of hot air.

The HackadayPrize2016 is Sponsored by: