I finally Code in COBOL…Again

If you happen to be millenials, you may not know COBOL or COmmon Business Oriented Language. COBOL is primarily used in business, finance, and administrative systems, as a compiled English-like computer programming language, never for more bare metal purpose, not until now.

I’ve known COBOL since my childhood and used it extensively for learning and developing apps. After more than 30 years, I’m back to use it in order to program firmware for microcontroller! Yes, you read it right, COBOL is for programming microcontrollers.

Why on earth you want to use COBOL for microcontroller? Well, for starting, I’m getting bored of C and C++. I’ve been using C-like language since I coded professionally, more than 20 years! C, C++, Perl, Java, PHP, C#, and especially using Objective-C for the past 10 years. As it seems I’ll be programming for microcontroller for many years to come, it’s time to use another language, so I won’t be bored to death.

How?

As COBOL supported object-oriented since 2002, it became easier than ever to use it for any use cases.

For this particular use case, I managed to make GnuCOBOL – a free and open-source modern COBOL compiler and runtime environment – to work together with Xtensa’s toolchain to compile COBOL program and target it for ESP8266.

A “hello world” LED blinking code to make LED connected to GPIO 15 to blink, is something like this:

That’s easy!

I have yet to manage it compiled and run for AVR-based microcontroller. But I hope that will change soon.

Why?

I should start with why. For starter, verbosity and English-like syntax of COBOL always fascinate me. With the maker movement and its “promise” to democratize hardware programming, I believe COBOL will be much easier to learn – even for kids – than other language.

With the abundant of now-retired oldtimer COBOL programmers and the more accessible hardware (microcontrollers, single-board computer), I believe they will be back to “hot seat” of programming, spending hours and days in front of their laptop and hardware kit, and eventually fill old age with happiness.

Then imagine, kids learn COBOL accompanied by their parent or grandparent that happens to have COBOL experience in the past, spending time together hacking hardware, man… that’s priceless. And that’s what really drive me to evangelize hardware programming with COBOL.

I will be back with some more details, sample code, working development and runtime environment, and share all resources on my GitHub.

Really exciting!

Apa Gunanya OS di dalam IoT Device?

Perhatian saya “terperangkap” ke dalam sebuah obrolan di Facebook Group IoT Geek Surabaya, yang sedang membahas standards dan protocols seputar Internet of Things (IoT). Saya ikut nimbrung dengan sedikit berpendapat tentang messaging protocol seputar IoT dan sekaligus menyertakan referensi ke deck yang saya publish di sini, untuk memperlihatkan technological possibility around IoT:

 

Ternyata mas Muhammad Hadi Lo sebagai thread-starter dari obrolan di atas tampaknya membaca slide-slide lain di dalam deck itu, terutama tentang beberapa kemungkinan Operating System (OS) seputar IoT. Lalu dia menanyakan sebuah pertanyaan yang menurut saya cukup profound, saya kutip di sini: Continue reading Apa Gunanya OS di dalam IoT Device?

Journey to mbed Platform – Part 1

This post is more to my note than a tutorial or article, so that I can get back to it when trying to replicate the steps. But hopefully you’ll find it useful as well. Keep in mind, I’m using Mac as development machine. If you use Windows or Linux, some of steps may not be compatible.

So, got my first STM32 board, STM32F401 Nucleo development board. Although it has its own development framework, it seems the world has been taken its attention to ARM mbed platform. It seems the community is quite vibrant, a lot of libraries and sample code, and possibly I can code cross platform with another ARM-based board.

12303954_10153665887826855_8036219025334785268_o-2.jpg

To start, I create an account in mbed developer website. Then my attention goes to NUCLEO-F401RE page. Continue reading Journey to mbed Platform – Part 1

Bandung IoT Developer Day

Yay!… H-1 sebelum acara “Bandung IoT Developer Day”! Acara gratis ini akan berformat seminar dan dalam episode pertama ini (sebagai awal dari episode-episode selanjutnya) diusung tema “developing for IoT with web technologies”.

Acara ini sudah diideasi sejak 3 bulan yang lalu, dan mulai dipersiapkan sejak 1 bulan terakhir. Two thumbs-up buat organizer: DycodeEdu sebagai leading education provider yang berfokus pada modern/latest technologies, dan Iot4Bdg sebagai komunitas IoT pertama dan terbesar di Bandung. Organizer telah menyiapkan semuanya dengan cukup baik, dan berhasil “sold out” akhir minggu lalu dengan mengumpulkan 100 peserta dan lebih dari 50 diantaranya sudah ter-confirm akan hadir. Mewakili penyelenggara, saya berterima kasih kepada calon peserta yang sudah daftar. Terima kasih pula buat media partner dan teman-teman lainnya yang telah ikut men-share info tentang acara ini. Semoga besok semuanya lancar dan kita semua bisa mendapatkan manfaat dari acara ini.

Continue reading Bandung IoT Developer Day