Showing posts with label Software Development. Show all posts
Showing posts with label Software Development. Show all posts

Sunday, 21 August 2016

Energy measurement with Domoticz and Grafana. Yes, it's easy!

A while ago I started tracking the power and gas consumption at home. To do this I read the meters every sunday afternoon and this gave me some insight in the power consumption. Unfortunately this also means that you have the measurement resolution of a week, so you can't really change your habits and see the effect on power/gas consumption.

Sunday, 14 August 2016

11 Months Later: About productivity and mental health as a software dev

Recently I was asked whether I could share the tips and tricks that I still implement from my post from about 11 months ago. At first, I wasn't even sure that I would be able to name things I've learned and managed to keep doing.

Then I started thinking: is it even important that I can name them? Do I have to be consciously aware of the improvements I've made? But maybe the more important thing to realise is: even if I gain a single improvement from reading a book, something tiny that I did not do before, it is a gain and it is worth it! On top of that, everyones situation is different. This is why the stuff that helped me might not necessarily work for you.

So in my opinion books like these should be used more like frameworks, toolboxes, but not as a manual or bible. Similar to how this post describes the concept of Scrum implementation:
The Scrum framework leaves different options and tactics to play the game, ways that are at any time adopted to the context and circumstances.
Even if you implement only a small subset of the possibilities that Scrum provides, you're still benefiting from it and you can choose to combine it with other tools within (or even outside) the Scrum framework to streamline (optimise, improve, whatever) your work(flow) even more. This is something that is explained based on examples and anecdotes in the book Scrum & XP from the trenches, which you can download for free!

In conclusion

While I don't want to sum up the things I do better because they might not work for you, I'll list the things I currently do and things that I wish I would be better at implementing. These are from Blueprint of a productive programmer as the other book (Becoming a better programmer) is basically a huge list of great advice that you should probably read every 4 weeks until you really think you're implementing > 10% of it :).

Things I have learned and am able to implement (at least partially):

  • Chapter 2 from Blueprint of a productive programmer: 
    • Minimise Distractions, Stay off Facebook (I actually uninstalled FB and WhatsApp from my phone)
    • Avoid meetings (unless it's REALLY clear what needs to be discussed for both parties and other means of communication will NOT suffice)
    • Commit to repository often (especially if you have trouble focussing because of stuff like A.D.D.)
Stuff that I really want to do better (but have forgotten to actually keep doing)
  • Chapter 5 from Blueprint of a productive programmer:
    • Eat the right food
    • Take regular breaks
    • Prevent or treat RSI
At the same time I found the book as a whole to give me a great insight in overall pitfalls in your daily routines as a programmer. If you're a programmer (and even if you're a pretty good programmer) I'm sure you will gain something from reading it :). Again, here are the books:

Becoming a better programmer by Pete Goodliffe:

O'Reilly StoreAmazon (Kindle)

The Blueprint for a Productive Programmer by Moshfegh Hamedani:

Amazon ebook

Saturday, 21 May 2016

So PalmOS is really dead now?

I've been enjoying me PalmOS devices for quite some time now. First as an organizer and multimedia device and later as part of my collection of obsolete technology. What I really liked about PalmOS was it's speed and 'simplicity' if I may call it that. Of course I'm looking at an of from the past, knowing that there are a lot of OSes for portable devices that have a lot of features that PalmOS never had.

In the past years I've had a Sony Clie PEG-N760C and a PEG-NR70V. Later I upgraded to the Tungsten T2, then the T3 and finally the LifeDrive (which I've upgraded to an 8GB CompactFlash card). Of all those devices, only the T3 and the LifeDrive are still with me (and in working order :D). Recently I acquired a Palm Tungsten T|X, which was one of the last devices that Palm made before switching over to WebOS on the Pre series of smartphones. I was surprised to find that this device actually has received a patch/update to support WPA2 and WPA Enterprise! That is friggin AWESOME! While the Tungsten T|X only has Wireless B built in (802.11b = 11mbps) it works, and the device probably wouldn't be able to handle much more throughput anyway. Because the digitiser was broken, I ordered a new one from eBay, and it was pretty easy to replace it. It seemed like I had a high-end PalmOS device with WiFi, Bluetooth and a "high res" screen.

This is how I got started on wanting to revive PalmOS, at least from a developers perspective. I wanted to write (or port) a JSON library and use it to interact with REST API's or something. Or a remote control for my home automation system. Or basically anything that I could code that did not exist yet for PalmOS. But I hit a few roadblocks.

Lack of documentation and community

There isn't a lot of 'publicly available' documentation on PalmOS development. While the SDK docs can be found in some of the deep dark corners of the web, and a development environment can be set up, there is just no active community at all. It seems like development has stopped for about 10 years (or more!) and all what is left is these obsolete devices that are not able to use most of their functionality. Considering the fact that the devices aren't sold anymore, there is no market for software development on PalmOS and you're not actually gaining anything other than personal satisfaction (most people have forgotten that PalmOS existed at all!) this seems reasonable.

SSL Certificate support is limited to SHA1

While some tools exist to convert CA root certificates to PDB files, the PalmOS does not support SHA256 certificates. This means that most of the HTTPS interwebs is not reachable from the browsers, and secure communication is basically impossible. Most companies that have a WPA2 Enterprise-secured WiFi-network use an SHA256 certificate and this makes using the Tungsten T|X on a corporate network (or country-wide WiFi-hotspot network like the Dutch Ziggo WiFiSpots) impossible. SHA256 has been used in at least one application that I know of, pssh2. Unfortunately re-using this code in an application and rewriting part of PalmOS are two different things.

So what can we still do with our legacy devices?

When these devices were still awesome, a lot of cool stuff has been made. And because the internet was not as big as it is today, most of these apps work offline! Over the next few weeks I'm going to show a few applications that I've used in the past decade and might be nice for you to re-live the PalmOS days again :).

Felix from the 2022 here:

The PalmDB community strives to host files for abandoned projects as well as ROMs for devices and other useful tools. Check it out here. They have a Discord as well! Also Dmitry Grinberg is hacking Palm OS like there is no tomorrow, and there is a guide on how you can get started with a toolchain for PalmOS development here. Of course there is a subreddit as well: /r/Palm. Have fun!

Sunday, 13 March 2016

Introducing the Epoch WebService for Low-Power IoT devices without RTC

Edit: the epoch service is down. There are so many alternative ways to do something like this. 

Today I was working on the OakPowerBoard project and I asked myself: why isn't there a web service that just allows you to get the current Unix Timestamp without having to parse loads of response data? Well, I couldn't find it! So I built it and deployed it to Azure! Until I find a shorter domain you can use the following URL as you see fit!

  http://tiwtieapp.azurewebsites.net/now?format=json

This will return the server time. No padding, no trimming, just the time! Neat, right? I've contacted the owner of epo.ch, but haven't had a response yet.

So why did I do this?
The OakPowerBoard firmware does HTTP requests anyway, so doing a request to this web service does not cost a lot of extra code. Implementing a bare-bones NTP client is probably a lot more work! And of course, nearly every internet-connected platform has examples for a simple HTTP GET request, this cannot be said for NTP. Enjoy!

Monday, 7 September 2015

About productivity and mental health as a software dev

Hello World!

As an experiment I'll be posting stuff about my life, work, ideas and more. Depending on the responses I'll consider putting more effort in this. Expect nerd stuff, me bragging about the awesome hardware I purchased second hand and me raving about the next best thing to build your web service with.

I'm not usually someone who reads books often, but in the past few weeks I've made a change in the way I spend my day at work. The changes were minimal but allowed me to be a little more physically active and decrease the time I spend frustrated while trying to solve problems in our web service back-end. The changes I made were inspired by two books, The Blueprint for a Productive Programmer: How to Write Great Code Fast and Prevent Repetitive Strain Injuries by Moshfegh Hamedani and Becoming a better programmer by Pete Goodliffe. Links to the books in different stores will be at the bottom of this post. I didn't finish Becoming a better programmer yet but I'm plan on finishing it soon. 

As I usually don't really read any book at all (my work research is mostly on-line) I found it a really nice way to read a lot of stuff that wasn't necessarily something I was Googling for. Both books are meant for programmers that are passionate and are focused on making yourself function more optimal in situations where you need to deliver code fast and pressure is usually high. Small tips and tricks help you optimise the way you handle your work day and how you plan it. I recommend both books to anyone who feels that your work could be easier but doesn't know what he/she is currently doing wrong to prevent this. 

The Blueprint for a Productive Programmer

This book handles mostly concerns related to physical health (and the effects of long term physical strain on your ability to continue doing your job), managing your time more efficiently, minimise distractions, and improve your mental health. I feel that really any programmer should read this, the book is worth it's weight in gold! Very practical and easy to read. But as the author states in the book: 
“Reading this book is one thing, putting it into action is another. If you don’t practice what you learn in this book and continue with your bad habits, you’ll be just wasting your time. ”
Excerpt From: Moshfegh Hamedani. “The Blueprint for a Productive Programmer: How to Write Great Code Fast and Prevent Repetitive Strain Injuries.”

I guess the best thing is to do what I did, start reading and if you feel that you won't be able to implement change, just stop reading. I actually forgot about that until in finished the book :). 


I'll be writing about Becoming a better programmer in a next post. If you have any questions or comments, fire away!


Links to the books:

The Blueprint for a Productive Programmer by Moshfegh Hamedani:

Amazon ebook


Becoming a better programmer by Pete Goodliffe:

O'Reilly Store, Amazon (Kindle)