<![CDATA[Cyclick Development]]>http://192.168.20.35:2369/http://192.168.20.35:2369/favicon.pngCyclick Developmenthttp://192.168.20.35:2369/Ghost 5.101Sat, 14 Dec 2024 08:52:32 GMT60<![CDATA[CI Platforms - GitHub Actions]]>As we discussed in our introduction to CI, Continuous Integration (CI) and Continuous Deployment (CD) are essential components of modern software development. GitHub Actions excels in these areas, automating the building, testing, and deployment of code changes. Developers can define workflows that automatically trigger these actions whenever code is pushed

]]>
http://192.168.20.35:2369/ci-platforms-github-actions/64ef6d31dee46100012f23f4Wed, 20 Sep 2023 20:32:11 GMT

As we discussed in our introduction to CI, Continuous Integration (CI) and Continuous Deployment (CD) are essential components of modern software development. GitHub Actions excels in these areas, automating the building, testing, and deployment of code changes. Developers can define workflows that automatically trigger these actions whenever code is pushed to a repository, reducing manual intervention and the risk of human error.

As one of the leating CI Platforms - GitHub Actions supports various languages, build environments, production targets and the various automation steps allow developers a huge degree of flexibility in the way they wish to configure their build processes.

Let's take an example from our own experience. We deploy the Ghost Theme used on our own site, and other company's sites for whom we develop. The Ghost CMS platform provides their own

The other great thing about the GitHub Actions workflow is it leverages the Configuration-as-Code (CaC) pattern - the benefits of which you can read about here.

A worked example

Generally we configure our repositories such that once we push to the master, we are expecting this to get deployed. More complex workflows might deploy to a staging and subsequent production environment with for example stage and production branches. The YAML looks like this:

name: Deploy Theme
on:
  push:
    branches:
      - master
      - main
jobs:
  deploy:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v3
      - uses: TryGhost/action-deploy-theme@v1
        with:
          api-url: ${{ secrets.GHOST_ADMIN_API_URL }}
          api-key: ${{ secrets.GHOST_ADMIN_API_KEY }}

Pretty simple to read right? We're telling GitHub to take action on pushes to master or main, and ultimately use the TryGhost/action-deploy-theme@v1 to deploy our theme. This goes through the steps of building, packaging and deploying our theme. Of course, this is pretty much the same for anyone who uses a Ghost theme, so it makes total sense for this to be really simple boiler plate.

Now, you'll know that GitHub is public and we don't want to expose our API url or key secrets to the entire internet, so GitHub provides a secure secret vault for that kind of information to be provided to the pipeline as it runs.

Asthe pipeline runs, we get a wealth of information about the pipeline, which is all updated live:

CI Platforms - GitHub Actions

This pipeline is rather simple, so it contains just one deploy job. However, more complex jobs show various tasks within this view, and any pipelines with test results also capture that information in this view.

There is a lot of granularity and complexity around where the agent activities are run (you can choose to run on GitHub's various agents or self-host an agent on infrastructure of your choice).

GitHub is heavily focussed on the open source community, and this shows in our example here. With minimal effort we were able to pick up a pipeline from another user (i.e. the official TryGhost repositories) and use it in our pipeline straight away.

You can read the documentation for GitHub Actions here.

]]>
<![CDATA[Cyclick Development | Who We Are]]>http://192.168.20.35:2369/cyclick-development/64ef8a77dee46100012f2440Wed, 30 Aug 2023 18:29:19 GMTEmbedded DevelopmentCyclick Development | Who We Are

At Cyclick we specialize in providing high quality, testable, maintainable and shippable solutions for all your firmware project's needs, with a particular focus on C++. With a deep understanding of embedded systems and many years experience in the industry, our consultancy offers tailored services that ensure your project's success. We are passionate about getting to the heart of your problem, and seek to understand what your customers are going to expect from the end product - focussing on what they need will ultimately create the best solution for your business.

Embedded firmware is the backbone of modern electronic devices, enabling them to perform specific tasks efficiently and reliably. It requires a specialised set of skills and expertise to develop and provide optimal performance. That's where our consultancy comes in.

At our firm, we have amassed a wealth of knowledge in C++ programming for embedded systems. Our experts have worked on a wide range of projects, including IoT devices, consumer electronics and more. Whether you are a startup, a small business, or an established enterprise, we have the expertise to address your specific requirements.

We also spend the time to ensure that your solutions are testable and maintainable in future. It's key that anything we provide to you can be run through atleast the most basic of repeateable and reliable unit testing, and more often than not we prefer to setup continuous integration systems using a variety of tools to suit your environment or individual preferences.

Cyclick Development | Who We Are
Photo by John Schnobrich / Unsplash

We relish the challenges associated with embedded firmware development, such as resource constraints, real-time responsiveness, power optimization, and hardware integration. Our team excels at overcoming these challenges by employing industry best practices and leveraging the power of C++. We believe that C++ offers a unique combination of performance, flexibility, and maintainability, making it an ideal choice for embedded systems.

When you engage our consultancy services, you can expect a collaborative approach, where we work closely with you to understand your project goals and technical requirements. We then design, develop, and optimize firmware solutions that are tailored to your specific needs, ensuring that they meet industry standards and best practices.

Partner with us for your embedded firmware consultancy needs, and let us help you turn your vision into a reality. Contact us today to discuss your project and learn more about how we can assist you in achieving success in the world of embedded systems.

Cyclick Development | Who We Are
Photo by Harrison Broadbent / Unsplash

Education & Mentoring

It's also a passion of ours to engage with communities, schools and the wider open source community. Whether that's providing 1:1 sessions, on-site visits or even something as simple as a question in an email, we're always pleased to talk about ways to find solutions to problems.

In the past this has covered:

  • Why to use git
  • Git workflows (especially our favoured Git Flow)
  • Agile SCRUM
  • Getting started with Python
  • Getting started with C & C++

In the coming years, we are planning to improve our educational presence through Udemy courses, so if you have any ideas for courses you would like to see.

]]>
<![CDATA[What is Continuous Integration (CI)?]]>http://192.168.20.35:2369/what-is-continuous-integration-ci/64ef6d1bdee46100012f23ecWed, 30 Aug 2023 18:22:18 GMT

When developing code on any platform, it is always preferable to know that the changes you make are not going to break the application or workflows for other developers.

Traditionally, a suite of manual tests might be run periodically against the code, or developers were relied on to test and verify their own code before checking in. Peer reviews might also catch some mistakes.

But there are various reasons why these are no longer considered best practise:

  • How long does it take you to catch a mistake?
  • Why would you rely on someone who believes the code works before they even start testing it?
  • What if you broke something way in a different part of the codebase? As a human, you might never think to test everything - and after all, testing everything would take for ever right?

So we need someone or something who never tires, who is entirely impartial and who can work through the night to do all these things all the time - even when Jane wants to test her work at 4am because that suits her working schedule best.

Enter: CI Platforms

Continuous Integration, or CI, platforms are a ubiquitous tool in modern development environments. They allow the automation of many aspects of development including:

  • Static code analysis
  • Basic peer review checks
  • Compilation & runtime checks
  • Running of automated test suites
  • Blocking code merges based on rules and analysis of the above

CI pipelines can also be combined with Continuous Deployment (CD) pipelines to setup development, test/integration environments and even 'push to production' style environments where live customer-facing environments are deployed for immedate use. The benefit of this is that usually such pipelines have various intricate working parts, or need security authorisation, or just have so many steps that automating the deployment of applications makes perfect sense - humans are just prone to mistakes, especially when it comes to repetetive tasks.

At Cyclick Development we are running a series of posts dedicated to showing some of the tools available and contrasting them with one another. Each tool has strengths and weaknesses which make them great for some workflows and environments.

]]>
<![CDATA[Hello World - BBC Basic]]>http://192.168.20.35:2369/hello-world-bbc-basic/64ef5ec8dee46100012f2350Wed, 30 Aug 2023 15:56:13 GMT

Well now we're into languages older than me. 1981 was the year a language written to run on a platform which arguably inspired the Rasperry Pi was born. An 8-bit, 2MHz home computer platform which was also widely used in educational settings, the BBC Micro was a hugely successful peice of equipment - sales of over 1.5 million are reported.

Despite the BBC Micro platform itself being discontinued in 1994, stable releases of the BBC Micro language are still being created. You can read the Raspberry Pi article above which takes you through a basic helicopter game tutorial - but how about we start with something more simple?

The BASICs...

10 CLS
20 PRINT "HELLO WORLD"
30 GOTO 10 

So what's going on here? If you've programmed in a modern language (anything after say... 1994), you might notice some oddities. For starters, you have to put the line numbers in yourself. And the code executes in the order of your line numbers!

The above code could be typed in this order, and work exactly the same:

20 PRINT "HELLO WORLD"
10 CLS
30 GOTO 10

Try the LIST command to see the whole program in the order of execution.

If you've been following so far you will notice we've incremented in lumps of 10 lines - that's intentional and advised practise. If you've missed something out... the only way to put something in the gap is to insert it with an integer line number. So we can add:

10 CLS
11 PRINT "HELLO LADIES AND GENTLEMEN"
20 PRINT "HELLO WORLD"
30 GOTO 10

The other amusing factor here of course, is by having line 30 as GOTO 10, we've ensured the computer will run our little program for ever and ever, until the computer is reset.

What's actually going on?

Underneath the somewhat unforgiving user interface (which just prints "Mistake!" if you get something wrong), BBC BASIC is an interpreted language. This converts the typed text into machine code for execution. A somewhat unique feature of the BBC BASIC language was its ability to interpret and compile assembler code within an application. In various cases this allowed BBC BASIC to execute faster than Microsoft BASIC at the time.

You can't mention BBC Basic without mentioning Sophie Wilson - key to the design of the BBC Micro and BBC Basic, Wilson also played a critical role in the design of the ARM architecture. In the modern world, you are probably never more than a meter away from an ARM chip unless you really try hard to go off-grid!

Online interpreters

We had a play with https://bbc.godbolt.org/ for our foray into BBC Basic above - have a go for yourself!

Hello World - BBC Basic
]]>
<![CDATA[Hello World - Python]]>http://192.168.20.35:2369/hello-world-python/648dfba5b15d4800018e0168Sat, 17 Jun 2023 18:48:57 GMT

Although it shares some syntactic roots, Python is different to C because the language is interpreted. In the main, nothing is compiled before execution, and all statements are evaluated line-by-line as the application runs.

Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation via the off-side rule.

Python is dynamically typed and garbage-collected. It supports multiple programming paradigms, including structured (particularly procedural), object-oriented and functional programming. It is often described as a "batteries included" language due to its comprehensive standard library.

Flavours of Python

In this example we're using the latest and greatest Python version - 3.11. In version 3, the syntax changed somewhat to make the syntax easier to understand.

How do we speak Python?

This one doesn't take much effort. Python is often described as 'batteries included' - the language and interpreter does a lot of the work for you to build the working environment needed to run.

So...

print("Hello world")

It's really that simple! But what if we wanted to do something a bit more snazzy, add some colours perhaps? We'll get to see a few more features of the language that way:

import colorama
from colorama import Fore

print(Fore.RED + "Hello world!")
This one might not work in PowerShell or Windows CMD... Try linux :)

Here we start to see the powerful tools which come as part of Python, and from the vast community of developers who create modules for Python. Using the pip package we can pip install colorama, which will allow us to use the module in scripts going forward. The line above import colorama brings in the module to our script, and from colorama import Fore pulls the module's Fore class in a way that allows us to use Fore directly.

]]>
<![CDATA[Hello World - C]]>http://192.168.20.35:2369/hello-world-c/648df789b15d4800018e0138Sat, 17 Jun 2023 18:16:06 GMTWhat is C?Hello World - C

Let's start with the basics (at least for us - everyone has their first programming language), and for me that was C!

C (pronounced /ˈsiː/ – like the letter c)[6] is a general-purpose computer programming language. It was created in the 1970s by Dennis Ritchie, and remains very widely used and influential. By design, C's features cleanly reflect the capabilities of the targeted CPUs. It has found lasting use in operating systems, device drivers and protocol stacks. C is commonly used on computer architectures that range from the largest supercomputers to the smallest microcontrollers and embedded systems.

How do we speak C?

#include <stdio.h>
int main void()
{
   printf("Hello world!");
   return 0;
}
]]>