Here is the replay of my webinar on Delphi and the Blockchain. We start with some basics of Bitcoin and cryptocurrency, but we look specifically at some simple examples of what the blockchain is and how to use it.
BitCoin, Ethereum, & PascalCoin
Bitcoin price tracking
Mining – Proof of Work
Other Blockchain Usages
Blockchain is an emerging technology – there is still a lot to learn and discover
Everyone is focused on the Bitcoin gold rush, but Blockchain may have the bigger/longer impact
If you are wanting to target these boards from Delphi remember if it is an ARM processor you will want to run Android, and if it is an x86 then you will want to run Windows or Linux. Here are some links to some of the single board computers we discussed:
MinnowBoardby NetGate is an x86 based SBC that includes configurations with Dual Ethernet, which is great for creating network appliances. It includes support for both Linux and Windows. I’ve yet to test it, but I expect it will work fine.
Udoo x86 is another x86 based SBC (thus the name – but be aware they have non-x86 boards with different names) it supports both Windows and Linux operating systems, and your Delphi apps will run swimmingly under both operating systems. There are 4 different variations of the x86 with different configurations. It includes both a Intel Braswell SOC as the main OS CPU that runs Linux and Windows, and also an Intel Curie Microcontroller that is Arduino compatible. There are GPIO pins for both boards, and the Curie pins are compatible with most Arduino shields. You have a dedicated serial connection between the two so you can create an Arduino app with Visuino that runs on the Curie, talking to various sensors and it will run independently of your Delphi app running on the Braswell.
LattePanda is a Windows 10 specific SBC and comes with Windows 10 preinstalled. There are two different hardware configurations, and you can choose for it to have Windows 10 activated or use your own license. It also includes a separate Arduino compatible ATmega32u4 microprocessor, again with the dedicated serial connection between the two processors and GPIO pins for both processos. I was able to get Linux installed, but I wouldn’t recommend it as it was a lot of effort and the WiFi wasn’t compatible. You could technically install Delphi IDE on both the LattePanda and Udoo x86, but more likely you would want to use a dedicated development computer and then use the remote debugger/platform assist server on the SBC. They have a new LattePanda Alpha they recently launched on Kickstarter which significantly upgraded stats.
BeagleBone Black is an older ARM SBC that has its own Android distro. This works better than trying to shoehorn Android onto the Raspberry Pi – while you can get it installed, the BeagleBone Black’s Android distro is much more reliable. It has the GPIO pins like a Raspberry Pi. It is a little older and but might still be a good solution for your projects.
Orange Pi is another Raspberry Pi type ARM device that is cheaper and designed to run Android. They have a lot of different models to choose from, and just released a new one at CES. I’ve ordered a few to test, but they should run Delphi Android apps great. I have a spreadsheet of all the different Orange Pi boards and some basic specs for easy comparison. No guarantees it is 100% correct though.
We have a whole new streaming solution that should fix all the issues we were having, so expect better audio quality this time. Join Craig, David and myself for the latest on Delphi, C++Builder and software development in general.
We set up our own RTMP instance on Linode to bounce the 3 streams off of for the podcast. I used Craig’s Brolly script to setup the server, and followed this guide. I used my local machine that I was streaming from to composite as well, which may have been stressing out the poor MacBook. I’ll try adding another computer to the mix next time, possibly an Amazon Workspace instance like we did for CodeRage.
Speaking of beautiful games created with Delphi, check out some of the latest videos by Zudomon showing off the game he is developing in Delphi. You can support it on Patreon or follow along on the Facebook developer page.
The team over at Grijjy has an open source Cross Platform Cloud Logger available git the GetIt packet manager or on GitHub. The Broker and LogViewer run on Windows, but the client logging code works on Android, iOS, Linux, macOS, and Windows. It has a lot of great features and is very useful.
U.S. News an World Report just ranked Software Developer as the best job for 2018. They use data from the U.S. Bureau of Labor and Statistics to rank jobs based on pay, job security, mental engagement, stress, room to advance, satisfaction, and work-life balance. Since you are here, you most likely agree with that ranking and are surprised it took so long for someone else to recognize it.
This means we will see a lot of people interesting in software development. Anyone looking for a better job is likely to start at the top of that list and work their way down until they find one they are interested in. Not to mention everyone who sees the headlines about Software Developer replacing Dentist as the #1 Best Job. Whatever the reason, software developers will get a lot more attention.
When I’m talking to people about career advice I think it is more important to choose a career that suits the individual (internal factors) than basing the decision purely on external factors like pay, etc. That being said, I honestly believe Software Development is only going to get more important. Going forward, software development and related jobs (many of which aren’t even invented yet) will consume the many of the other jobs as automation and artificial intelligence take over more aspects of our life. It all depends on which side of the automation revolution you want to be.
When I was really young (like 3rd grade) I knew I wanted to program computers for a living. A family friend told me that I should look for a different job because by the time I entered the career market computers would be programming themselves and there would be no jobs. I remember thinking once that happens there would be no jobs, and someone would need to teach the computers how to program themselves better.
Just recently I was in Tokyo for the 10.2 launch event. I was talking to members of the press, and one of them made a similar assertion “What is the point of releasing better developer tools when soon computers will be programming themselves?” I shared the story from when I was a kid and said that “Yes, AI is automating and consuming other jobs, but the programmer will be the last to go. Once AI’s no longer need humans to make them better there will be no jobs for anyone!”
If you aren’t familiar with the Law of the Instrument, otherwise known as Maslow’s hammer/gavel, or the golden hammer it is often expressed as
If your only tool is a hammer, you treat everything as like a nail.
My understanding is that the law of the instrument means you are limited by instruments or tools you know how to use. For example, if you have a screw, some wood, and a hammer, then you might successfully get the screw into the wood, but a screwdriver would be a better alternative.
The law of the instrument also means an obsession with the perfection of the instruments you know. I remember back in the day when I was convinced there was no reason to bother with any other programming languages because Delphi was the best. Now I’ve spent some time using a lot of other programming languages, and so I can confidently say Delphi is the best, while I can see the value and use of other programming languages.
I believe it is worthwhile learning about new technologies, frameworks, languages, or methodologies. Then you can pick the correct one for the job. This doesn’t mean you need to be an expert in all of them, but you should know enough that you are confident in your choice.
The reverse of this is the obsession to chase new and exciting technologies and recreate things every few years. This keeps the developers entertained, but doesn’t really provide business value. Again I believe Delphi does a good job with this as it respects your existing code while moving forward to new platforms, features, and frameworks.
So what is the Curse of the Programmer?
When I’m talking to other programmers I see two behaviors. The first is, every problem they encounter in life (at work and beyond) they respond with “I could write a program to do this,” or some variation. By extension, they also cast a critical eye toward any software system (even those developed by themselves) to see how to do them better. This results in a huge backlog of projects that they create to fix problems, fix a problem better, or just out of curiosity to see if they can.
This is similar to the Law of the Instrument, but I see it more as your learning the flexibility and power of programming results in your seeing many opportunities to apply it. I’ve talked to people in other industries, and I think the general tendency is fairly universal, it is just that programming is (in my opinion) so much more powerful and flexible than many other applied technologies.
The second behavior, which is something to be more cautious about falling into, is the urge to create a “library” or “framework” instead of finishing the program at hand. For example, you are creating a program to solve a problem, and in the process, you create series of libraries just in case you need to solve similar problems.
There is value in having reusable libraries, functions, components, and frameworks. The trick is to not let the creation of them get in the way of shipping. The best way I’ve found to deal with this is to only create the library when you need it. Write your code with the appropriate level of coupling to solve the problem at hand. When you need to reuse a bit of it elsewhere, consider refactoring it into something reusable. Then as you use it in more places you can keep refactoring it and expanding it until you have a full blown framework.
How do you see the Curse of the Programmer in your life? What do you use to prevent every project from spawning a series of reusable frameworks?
The joke goes that, when asked, the software developer responds that their New Year’s Resolution is “7680×4320” or 8K. Joking aside, tradition has it that at the turn of the year we evaluate our lives and look for areas of improvement. Here are a few of my software development related New Year’s #CodingResolutions!
Unit Test More: DUnitX and TestInsight being my tools of choice. Most of the code I write is integration code, integrating component A with control B, and I use that as a justification to not unit test it. But when I do write library or component code, I try to create a unit test for it. I find it very useful to do so and am always working to be more consistent.
Take a course on Embarcadero Academy: There are a few free courses, as well as some premium courses from the top trainers in the community. Something there for everyone to learn from.
Get better at using version control on personal projects: Version control is a must when you are collaborating with others on a project. I remember the first development job I had where I was working with other developers. We emailed code back and forward. We used the archived history of emails if we needed to roll back to an earlier version. The lead developer maintained the “authority.” Needless to say, this was a mess and didn’t work very well. RAD Studio has a great history feature that automatically backs up the last few versions of your files when you save, and you can set it to save on execution (a great idea), so it might seem like version control isn’t as necessary on non-collaborative projects. This just isn’t true. The IDE will integrate into today’s top version control systems, so there is no excuse not to. I signed up for a paid Developer account on GitHub, which is where I keep all my projects. BitBucket is another popular choice, which offers private repositories for free, but charges you for collaborators (the opposite model of GitHub). BitBucket offers Mercurial too. Which system do you use?
Setup my own Continuous Integration server: If you don’t have an automated, repeatable build process, then you don’t have a release. Designating one of your developer’s computers (even if that is you) as the build server is not a valid solution. If you are going to have a Build Server, then you might as well have CI (with automated Unit Tests!) so you know your build is always good. Craig Chapman provided a recent webinar on setting up your own Continuous Integration system with SVN & Jenkins. Jenkins is a popular solution for CI that even offers a RAD Studio plugin, but if you want to simplify things, take a look at Continua-CI from VSoft.
Automate more with DevOps: Version Control and Continuous Integration are the first steps in DevOps as a developer, but there is more. Everything that can be automated should be automated.
Pay attention to Warnings, Hints, Static Code Analysis, Audits and Metrics: One of the beauties of using a compiled language is we have a compiler that will immediately detect a huge number of errors, which we must fix if we want to even use or test our programs. The compiler also provides a number of Hints and Warnings that frequently indicate your program might not function exactly like you intended. I have a policy of always addressing Hints and Warnings too. I’m also a big fan of FixInsight, which really expands these compiler messages in so many useful ways. Our favorite IDE also includes more options to keep your code fresh and maintainable: Code Toxicity and Audits and Metrics. The Code Toxicity is available in all editions and provides some simple static code analysis for things like Cyclomatic Complexity. Keeping an eye on these is a good way to make sure your code is maintainable and less likely to have unintended behaviors. The Audits and Metrics takes this to the next level with a lot more detail. And it’s included in Enterprise and Architect editions.
More focus on best practices and software security.
Do more with RAD Server. I’ve done a lot of building REST clients and they are great. I’ve done some basics of building REST servers but would like to do more. RAD Server is a great solution for building REST services.
Deploy RAD Server to the Cloud. I’ve done a little with Amazon Cloud Services and that is what I am thinking about doing, but there are a lot of other great cloud hosting options out there to consider.
Keep Exploring the Amazing 3rd Party components from all the great Technology Partners. The GetIt Package Manager makes it easy to install a new component or library.
Build some Neural Network and Artificial Intelligence solutions with Delphi. This is something I’ve always been interested in but never implemented. There are so many advances in this field right now, which makes it even more exciting. Additionally, there are so many promising libraries available for Delphi. Boian Mitov of Mitov Software has IntelligenceLab. Dew Research has a great looking math engine. And then RiverSoft has a serial of libraries for Genetic Algorithms, Fuzzy Logic, and an Inference Engine. You can check out a video about IntelligenceLab today. I’d love to see an IDE add-in that uses neural networks for static code analysis and help with writing code.
Beyond all of that, I want Blog, Podcast, and create more training videos.
How about you? What are your New Year’s #CodingResolutions?
Here in the Delphi community, we all know Dr. Bob Swart, and CodeRage wouldn’t be complete without him (he has a session this year on Customizing DataSnap Method Output, don’t worry.). This year we are also hearing from Uncle Bob, the author of Clean Code – A Handbook of Agile Software Craftsmanship. This is one of those “must reads” that all software developers should have on their bookshelf.
I had an opportunity to see Uncle Bob speak a few years ago, and it was very memorable. This session will be like no others you’ve seen. He is speaking on “The Clean Coder – An Introduction to Software Professionalism.” His session and the live Q&A will be available only during the live CodeRage session, so be sure to join Uncle Bob for this amazing session!
Early on I learned Turbo Pascal, which was a huge step up from the Basic and Batch File programming I cut my teeth on. When Delphi came along I thought it was brilliant and fell in love immediately. I had no interest in learning other programming languages or tools. Delphi did it all, and that was great. I found myself plenty of work and enough to keep my interest.
From there I went back to full-time Delphi programming, but the new company I was working for bought into the “there aren’t enough Delphi developers” myth and decided to move to C# & WinForms. We immediately were able to hire some new C# developers, but as we got to know them we found out they had more Delphi experience than C#, but they bought into the “there are no Delphi jobs” myth and rebranded themselves as C# developers. (This is what we call a circular argument or self-fulfilling prophecy.) In the end, the project took 4 times longer than it should have, despite having more developers, and “more modern developer tools.” They really should have stuck with Delphi.
I moved to a new job doing Delphi development full time, and then that company bought into the C# & Silverlight are the future. Since I had C# experience, I started working on the new Silverlight front end. The back end and the desktop app remained in Delphi (with a little C++). We all know what happened with Silverlight (if you even remember it . . .)
Throughout all of this, I still found myself choosing to Delphi for personal projects. Occasionally I’d try personal projects in other tools and languages as a way to get to know them better, but I still found Delphi to be a better solution for most general purpose projects. One of the defining characteristics of Delphi for why I keep coming back to it is that it makes the common tasks really, really easy while keeping the rest simple and possible.
Other tools that focus on productivity, make a small subset of tasks as easy as Delphi does, but also make anything beyond those tasks, or the that “ideal” scenario, hard or impossible. While other general purpose tools don’t do anything to optimize common scenarios, which makes simple tasks more complicated than they need to be.
Now with multi-platform development Delphi is more important than ever. The approach Delphi and FireMonkey provide make it quick and easy to do the most common tasks, while also keeping all the platform APIs and features within reach.
Delphi really invented the 3rd party component market as far as I am concerned. From the beginning, it shipped with all the source code for the VCL and also included a robust OpenTools API and component model making easy for others to extend the IDE, and build reusable components and libraries. All the technology partners are a huge part of why I choose Delphi.
Delphi also has a huge commitment to the code we as developers develop. I attend a lot of general software developer groups, and it is common to hear developers complaining about how they just finished porting their code to support a new version of their tools, only to have it all break again because a new release of their non-Delphi programming language or framework just came out. Often times they just throw it all out and rewrite to support a new version. Sure, Delphi it isn’t perfect, and sometimes there are incompatibilities or breaking changes from version to version, but by comparison, Delphi is so much better at this than any other language or platform out there that I have seen.
I started out choosing Delphi because it was what I knew. Now I choose Delphi because it gets the job done better than the alternatives. The fact it is faster for development is nice, but only part of the equation. I used to have a hat that said “Delphi does it all, especially Windows” and that is truer than ever today.
So why do you Choose Delphi? Share your reasons in the comments or on your blog #WhyIChooseDelphi