Ask Hackaday: How Do You Python?

Python is the Arduino of software projects. It has a critical mass of libraries for anything from facial recognition and neural networks to robotics and remote sensing. And just like Arduino, I have yet to find the killer IDE for Python. Perhaps I just haven’t tried the right one yet, but it could be that I’m just doing Python wrong.

For Years I’ve Been IDLE

IDLE with interactive shell that has highlighting and code completion

I’m a Linux-only type of a guy so using IDLE for Python is a natural fit. It’s in the repositories for super quick and easy install and there’s basically zero configuration to be done. Generally speaking my preferred development environment is text editor and command line compiler. IDLE is just one step above that. You get a separate window for the shell and each Python file you’re working on. Have IDLE run your code and it saves the file, then launches it in the shell window.

For me, there are two important features of IDLE’s shell. The first is that it keeps an interactive session open after you run your Python code. This means that any globals that your script uses are still available, and that you can experiment with your code by calling functions (and classes, etc) in real time. The second desirable feature is that while using this interactive shell, IDLE supports code completion and docstring support (it gives you hints for what parameters a function accepts/requires).

But simplicity has a tough time scaling. I’m working on larger and larger projects spread over many files and the individual nature of IDLE editor windows and lack of robust navigation has me looking to move forward.

The Contenders

I’ve tried perhaps a half-dozen different Python IDEs now, spending the most time on two of them: Geany and Atom. Both are easy to install on Linux and provide the more advanced features I want for larger projects: better navigation, cross-file code completion (and warnings), variable type and scope indication.

The look of Geany brings to mind an “IDE 1.0” layout style and theme. It’s the familiar three-pane layout that places symbols to the left, code to the right, and status along the bottom. When you run your program it launches in an interactive terminal, which I like, but you lose all IDE features at this point, which I despise. There is no code completion, and no syntax highlighting.

I have been using Atom much more than Geany and have grown to like it enough to stick with it for now. I’d call Atom the “IDE 2.0” layout. It launches with a dark theme and everything is a tab.

Atom has symbol view that isn’t shown all the time. CTRL-R brings it up and it uses a search style but you can also scroll through all symbols

Atom depends heavily on packages (plugins that anyone may write). The package management is good, and the packages I’ve tried have been superb. I’m using autocomplete-python and tabs-to-spaces, but again I come up short when it comes to running Python files. I’ve tried platformio-ide-terminal, script, and runner plugins.  The first brings up a terminal as a bottom pane but doesn’t automatically run the file in that terminal. Script also uses a bottom pane but I can’t get it to run interactively. I’m currently using runner which has an okay display but is not interactive. I’ve resorted to using a “fake” python file in my projects as a workaround for commands and tests I would normally run in the interactive shell.

Tell Us How You Python

It’s entirely possible I’ve just been using Python wrong all these years and that tinkering with your code in an interactive shell is a poor choose of development processes.

What do you prefer for your Python development? Does an interactive shell matter to you? Did you start with IDLE and move to a more mature IDE. Which IDE did you end up with and what kind of compromises did you make during that change. Let us know in the comments below.

Storing Data on a Single Atom

In the electronics industry, the march of time brings with it a reduction in size. Our electronic devices, while getting faster, better and cheaper, also tend to get smaller. One of the main reasons for this is the storage medium for binary data gets smaller and more efficient. Many can recall the EPROM, which is about the size of your thumb. Today we walk around with SD cards that can hold an order of magnitude more data, which can fit on your thumb’s nail.

Naturally, we must ask ourselves where the limit lies. Just how small can memory storage get? How about a single atom! IBM along with a handful international scientists have managed to store two bits of information on two pairs of holmium atoms. Using a scanning tunneling microscope, they were able to write data to the atoms, which held the data for an extended period of time.

Holmium is a large atom, weighing in at a whopping 67 AMU. It’s a rare earth metal from the lanthanide series on the periodic table. Its electron configuration is such that many of the orbiting electrons are not paired. Recall from our article on the periodic table that paired electrons must have opposite spin, which has the unfortunate consequence of causing the individual magnetic fields to cancel. The fact that holmium has so many unpaired electrons makes it ideal for manipulation.

While you won’t be seeing atom-level memory on the next Raspberry Pi, it’s still neat to see what the future holds.

Thanks to [Itay] for the tip!

Via Gizmodo.

Very, Very Tiny X86 Systems

The most interesting market for Intel in recent years has been very, very small form factor PCs. ARM is eating them alive, of course, but there are still places where very small and very low power x86 boards make sense. The latest release from SolidRun is the smallest we’ve seen yet. The SolidPC Q4 is one of the smallest x86 implementation you can find. It’s based around the MicroSoM, a module even smaller than a Raspberry Pi, and built around a carrier board that has all the ports you could ever want from the tiniest PC ever.

The SolidPC Q4 is technically only a carrier board featuring a microSD slot, Displayport, HDMI 1.4B, two RJ45 ports with the option for PoE, three USB 3.0 Host ports, jacks for mic and stereo sound, and an M.2 2230 connector for a wireless module. The interesting part of this launch is the MicroSoM, a System on Module based on Intel’s Braswell architecture. Two models are offered, based on the quad-core Atom E8000 and the Pentium N3710. Both modules feature up to 8GB of DDR3L RAM and 4GB of eMMC Flash.

The interesting part of this launch is the MicroSoM, a System on Module based on Intel’s Braswell architecture. Two models are offered, based on the quad-core Atom E8000 and the Pentium N3710. Both modules feature up to 8GB of DDR3L RAM and 4GB of eMMC Flash. The size of these modules is 52.8mm by 40mm, or just a shade larger than the stick-of-gum-sized Raspberry Pi Zero.

The SolidPC isn’t intended to be a Raspberry Pi competitor. While those cheap ARM boards are finding a lot of great uses in industry, they’re no replacement for a small, x86 single board computer. The pricing for this module starts at $157 according to the product literature, with a topped out configuration running somewhere between $300 and $350, depending on options like a heatsink, enclosure, or power adapter. If you want a small single board computer with drivers for everything, there aren’t many other options: you certainly wouldn’t pick a no-name Allwinner board.

Atomic Arduino (and Other) Development

Even the most die-hard Arduino fan boys have to admit that the Arduino development environment isn’t the world’s greatest text editor (they’d probably argue that its simplicity is its strength, but let’s ignore that for now). If you are used to using a real code editor, you’ll probably switch to doing your Arduino coding in that and then use the external editor integration in the IDE.

That works pretty well, but there are other options. One we noticed, PlatformIO, extends GitHub’s Atom editor. That makes it cross-platform, powerful, and with plenty of custom plug ins. It also supports a range of platforms including Arduino, many ARM platforms, MSP430, and even desktop computers running Linux or Windows.

Continue reading “Atomic Arduino (and Other) Development”

An Intel Atom CPU In The Raspi Form Factor

For years now, people have been trying to stuff an Intel processor on a credit card sized board. An x86 board that can fit in your pocket is an intriguing device – after all, that’s what Gumstix, the forerunner of the Raspberry Pi, were. Efforts to put x86 on a dev board have included the Minnowboard, the Intel Galileo and Edison, and even the Intel Compute Stick. These have not seen the uptake you would expect from a small x86-powered board, but that tide may soon turn. The UP board is exactly what you would expect from a Raspberry Pi-inspired board with a real Intel processor.

The feature set for the UP board is impressive for a credit card sized board; it’s powered by a quad-core Intel Atom x5-Z8300 CPU running at 1.84 GHz. The board comes equipped with 1GB of RAM, 16GB of eMMC Flash, Gigabit Ethernet, five USB 2.0 ports (one on a pin header) and one USB 3.0 port. Up also includes a real-time clock, HDMI, the same 40-pin GPIO pin connector found in the Raspberry Pi Model B Plus, and DSI and CSI connectors for the Raspberry Pi camera and touch screen.

To be fair to all the previous attempts at making a board built around an x86 chip that borrows heavily from the Raspberry Pi, there haven’t been many chips out there that have been suitable for credit card-sized applications. Only in the last year or so has Intel released chips suitable for an x86 single board computer, and the growing market of Windows 10 tablets bears this out. While it remains to be seen if the UP board will be a success, more than a few people will pick one of these up for a miniature Skype box.

Dexterous hexapod rocks an Atom processor

[Matt Bunting’s] hexapod caught Intel’s eye (and their wallet). This coordinated little bot runs Ubuntu on an Atom Z530 processor, popular in netbooks like the Dell Mini 10, and uses a webcam to coordinate and monitor its motion. Intel picked up two of them from [Matt] to exhibit at trade shows. As you can see, the 18 servos provide some gorgeous motion to the beast. It’s no DJ Roomba but it approaches the zen-like perfection that is the A-Pod.

[Thanks Miked]

SGI 10,000 core concept


In a bold move, Silicon Graphics has decided to see how much crap many cores they can shove in one box. The Molecule is 10,000 core rackmount machine designed to leverage low cost consumer CPUs like the Intel Atom. It emphasizes high memory bandwidth and throughput between CPUs. While this sort of space efficiency is interesting it’s certainly going to take some serious cooling to get designs like this off the ground.

[via Hacked Gadgets]