Introduction to Functional Programming in F# – Part 12

Datum

08.08.2023

content.autor.writtenBy

Ian Russel

Introduction

In this post we are going to look at Computation Expressions including a first look at asynchronous code in F#. It's hard to explain what they are other than syntactic sugar for simplifying code around effects like Option, Result and Async. We have actually already met one in a previous post: seq {}.

In this post we will start to learn how to use Computation Expressions, create our own simple one and look at a more complex example where we combine two effects together - Async and Result.

Setting Up

You can use any IDE. I will be using VSCode plus the ionide plugin.

Open VSCode in a new folder called ComputationExpressionDemo.

Open a new Terminal and create a new console app using:

dotnet new console -lang F#

You may have to click on the Program.fs file to get ionide started.

Introducing the Problem

Add a new .fs file above Program.fs called OptionDemo.fs. In VSCode, right-click on Program.fs and select Add File Above.

In the new file, copy the following code:

namespace ComputationExpression

module OptionDemo =

    let multiply x y = // int -> int -> int
        x * y

    let divide x y = // int -> int -> int option
        if y = 0 then None
        else Some (x / y)

    let calculate x y =
        divide x y
        |> function 
            | Some v -> multiply v x |> Some
            | None -> None
        |> function
            | Some t -> divide t y
            | None -> None

We have two simple function - multiply and divide - and we use the together to compose a bigger function. This function looks ugly with all of the Option matching. Thankfully, we know that we can use the Option module to simplify this:

let calculate x y =
        divide x y
        |> Option.map (fun s -> multiply s x)
        |> Option.bind (fun x -> divide x y)

Much nicer but what does it look like using a Computation Expression? First we will create one! Copy the following code between the namespace and the module declaration in ResultDemo.fs:

[<AutoOpen>]
module Option =

    type OptionBuilder() =
        // Supports let!
        member __.Bind(x, f) = Option.bind f x
        // Supports return
        member __.Return(x) = Some x
        // Supports return!
        member __.ReturnFrom(x) = x

    // Computation Expression for Option
    let option = OptionBuilder()

The AutoOpen attribute means that when the namespace is used, we automatically get access to the types and functions in the module.

This is a very simple Computation Expression but is enough for our needs. It's not important to know how this works but you can see that we define a type and then an instance of that type.

Replace the calculate function with the following:

let calculate x y =
        option {
            let! first = divide x y
            let second = multiply first x
            let! third = divide second y
            return third
        }

The nice thing about this function is that we don't need to know about bind or map - It's all hidden away from us, so we can concentrate on the functions.

The ComputationExpression is the option {}. Notice the bang '!' on the end of the first let. This gets handled by the Bind function in the Computation Expression. The return matches the Return in the Computation Expression. If we want to use the ReturnFrom, we do the following:

let calculate x y =
        option {
            let! first = divide x y
            let second = multiply first x
            return! divide second y
        }

Notice the bang '!' on the return and that the Computation Expression automatically handles the Option.map for use.

To test the code, replace the code in Program.fs with the following:

open ComputationExpression.OptionDemo

[<EntryPoint>]
let main argv =
    let result = calculate 8 0
    printfn "calculate 8 0 = %A" result
    printfn "result is None = %b" result.IsNone
    let result = calculate 8 2
    printfn "calculate 8 2 = %A" result
    0

Leave the 0 at the end to signify the app has completed successfully.

Now type dotnet run in the Terminal.

The Result Computation Expression

Create a new file ResultDemo.fs above Program.fs.

Rather than create our own CE for Result, we will use an existing one from the FsToolkit.ErrorHandling NuGet package.

Use the terminal to add a NuGet package that contains the Result Computation Expression that we want to use.

dotnet add package FsToolkit.ErrorHandling

Copy the following code into ResultDemo.fs:

namespace ComputationExpression

module ResultDemo =

    open FsToolkit.ErrorHandling

    type Customer = {
        Id : int
        IsVip : bool
        Credit : decimal
    }

    let getPurchases customer = // Customer -> Result<(Customer * decimal),exn>
        try
            // Imagine this function is fetching data from a Database
            let purchases = if customer.Id % 2 = 0 then (customer, 120M) else (customer, 80M)
            Ok purchases
        with
        | ex -> Error ex

    let tryPromoteToVip purchases = // Customer * decimal -> Customer
        let customer, amount = purchases
        if amount > 100M then { customer with IsVip = true }
        else customer

    let increaseCreditIfVip customer = // Customer -> Result<Customer,exn>
        try
            // Imagine this function could cause an exception
            let result = 
                if customer.IsVip then { customer with Credit = customer.Credit + 100M }
                else { customer with Credit = customer.Credit + 50M }
            Ok result
        with
        | ex -> Error ex

    let upgradeCustomer customer =
        customer 
        |> getPurchases 
        |> Result.map tryPromoteToVip
        |> Result.bind increaseCreditIfVip

Now let's see what turning the upgradeCustomer into a Computation Expression loks like by replacing it with the following:

let upgradeCustomer customer =
    result {
        let! purchases = getPurchases customer
        let promoted = tryPromoteToVip purchases
        return! increaseCreditIfVip promoted
    }

Notice that the bang '!' is only applied to those functions that apply the effect, in this case Result.

I find this style easier to read but some people do prefer the previous version.

Introduction to Async

Create a new file AsyncDemo.fs above Program.fs and copy the following code into it:

namespace ComputationExpression

module AsyncDemo =

    open System.IO

    type FileResult = {
        Name: string
        Length: int
    }

    let getFileInformation path =
        async {
            let! bytes = File.ReadAllBytesAsync(path) |> Async.AwaitTask
            let fileName = Path.GetFileName(path)
            return { Name = fileName; Length = bytes.Length }
        }

The Async.AwaitTask is required bacause File.ReadAllBytesAsync returns a Task as it is a .Net Core function rather than F#. It is very similar in style to Async Await in C# but async in F# is lazily evaluated and Task is not.

Let's test our new code. Add the following declaration in Program.fs:

open ComputationExpression.AsyncDemo

In the main function, add the following code:

"""D:\temp\export.csv""" // Replace with a file on your system
    |> getFileInformation
    |> Async.RunSynchronously
    |> printfn "%A"

Replace my file path with one that you know exists on your system. The three quotes """ override escape sequences in a string. We have to use Async.RunSynchronously to force the async code to run.

Computation Expressions in Action

So far we have seen how to use a single effect but what happens if we wnat to use two (or more) like Async and Result? Thankfully, such a thing is possible and used regularly. We are going to use asyncResult from the FsToolkit.ErrorHandling NuGet package we installed earlier.

The idea for this example comes from the FsToolkit.ErrorHandling website:

https://demystifyfp.gitbook.io/fstoolkit-errorhandling/asyncresult/ce

Create a new file called AsyncResultDemo.fs above Program.fs and add the following code:

namespace ComputationExpression

module AsyncResultDemo =

    open System
    open FsToolkit.ErrorHandling

    type AuthError =
        | UserBannedOrSuspended

    type TokenError =
        | BadThingHappened of string

    type LoginError = 
        | InvalidUser
        | InvalidPwd
        | Unauthorized of AuthError
        | TokenErr of TokenError

    type AuthToken = AuthToken of Guid

    type UserStatus =
        | Active
        | Suspended
        | Banned

    type User = {
        Name : string
        Password : string
        Status : UserStatus
    }

AuthToken is a single case discriminated union. It could have been written like TokenError but is generally written as seen. The first AuthToken is the name of the type, the second is the constructor.

Now we will add some constants, marked with the Literal attribute:

[<Literal>]
    let ValidPassword = "password"
    [<Literal>]
    let ValidUser = "isvalid"
    [<Literal>]
    let SuspendedUser = "issuspended"
    [<Literal>]
    let BannedUser = "isbanned"
    [<Literal>]
    let BadLuckUser = "hasbadluck"
    [<Literal>]
    let AuthErrorMessage = "Earth's core stopped spinning"

And now we add the core functions, some of which are async and some return Results. Don't worry about the implementations, concentrate of the return types:

let tryGetUser (username:string) : Async<User option> =
        async {
            let user = { Name = username; Password = ValidPassword; Status = Active }
            return
                match username with
                | ValidUser -> Some user
                | SuspendedUser -> Some { user with Status = Suspended }
                | BannedUser -> Some { user with Status = Banned }
                | BadLuckUser -> Some user
                | _ -> None
        }

    let isPwdValid (password:string) (user:User) : bool =
        password = user.Password

    let authorize (user:User) : Async<Result<unit, AuthError>> =
        async {
            return 
                match user.Status with
                | Active -> Ok ()
                | _ -> UserBannedOrSuspended |> Error 
        }

    let createAuthToken (user:User) : Result<AuthToken, TokenError> =
        try
            if user.Name = BadLuckUser then failwith AuthErrorMessage
            else Guid.NewGuid() |> AuthToken |> Ok
        with
        | ex -> ex.Message |> BadThingHappened |> Error

The final part is to add the main login function that uses the previous functions and the asyncResult CE. The function does four things - tries to get the user, checks the password is valid, checks the authorization and creates a token to return:

let login (username: string) (password: string) : Async<Result<AuthToken, LoginError>> =
        asyncResult {
            let! user = username |> tryGetUser |> AsyncResult.requireSome InvalidUser
            do! user |> isPwdValid password |> Result.requireTrue InvalidPwd
            do! user |> authorize |> AsyncResult.mapError Unauthorized
            return! user |> createAuthToken |> Result.mapError TokenErr
        }

The return type from the function is Async<Result<AuthToken, LoginError>>, so asyncResult really is Async wrapping Result. This is very common in LOB app writing in F#.

Notice the use of functions from the referenced library which make the code nice and succinct. The do! = supports functions that return unit and is the same as writing let! _ =. The mappError functions are used to convert the errors from the authorize and createAuthToken functions to the LoginError type used by the login function.

To test the code, copy the following under the existing code in AsyncResultDemo.fs or create a new file called AsyncResultDemoTests.fs below AsyncResultDemo.fs and above Program.fs.

module AsyncResultDemoTests =

    open AsyncResultDemo

    [<Literal>]
    let BadPassword = "notpassword"
    [<Literal>]
    let NotValidUser = "notvalid"

    let isOk (input:Result<_,_>) : bool =
        match input with
        | Ok _ -> true
        | _ -> false

    let matchError (error:LoginError) (input:Result<_,LoginError>) =
        match input with
        | Error ex -> ex = error
        | _ -> false  

    let runWithValidPassword (username:string) = 
        login username ValidPassword |> Async.RunSynchronously

    let success =
        let result = runWithValidPassword ValidUser
        result |> isOk 

    let badPassword =
        let result = login ValidUser BadPassword |> Async.RunSynchronously
        result |> matchError InvalidPwd

    let invalidUser =
        let result = runWithValidPassword NotValidUser
        result |> matchError InvalidUser

    let isSuspended =
        let result = runWithValidPassword SuspendedUser
        result |> matchError (UserBannedOrSuspended |> Unauthorized)

    let isBanned =
        let result = runWithValidPassword BannedUser
        result |> matchError (UserBannedOrSuspended |> Unauthorized)

    let hasBadLuck =
        let result = runWithValidPassword BadLuckUser
        result |> matchError (AuthErrorMessage |> BadThingHappened |> TokenErr)

In Program.fs main function copy the following:

printfn "Success: %b" success
printfn "BadPassword: %b" badPassword
printfn "InvalidUser: %b" invalidUser
printfn "IsSuspended: %b" isSuspended
printfn "IsBanned: %b" isBanned
printfn "HasBadLuck: %b" hasBadLuck

In the terminal, type dotnet run and press enter. You should see successfull tests.

If you put a breakpoint in the createAuthToken function on the if statement and debug the code, you will see that you only hit the breakpoint twice, on success and hasbadluck cases.

The code for the last section can be found at:

https://gist.github.com/ianrussellsoftwarepark/2d11367c69d5f14231d439580034742d

Further Reading

Computation Expressions are very useful tools to have at your disposal and are well worth investigating further.

It is vital that you learn more about how F# handles asynchronous code with async and how it interacts with the Task type from .Net Core. You can find out more at the following link:

https://docs.microsoft.com/en-us/dotnet/fsharp/tutorials/asynchronous-and-concurrent-programming/async

Conclusion

In this post we have had a first look at Computation Expressions in F#. They can be a little confusing to begin with but make for extremely readable code.

If you have any comments on this series of posts or suggestions for new ones, send me a tweet (@ijrussell) and let me know.

Part 11Table of Contents

 

Ian RusselIan RusselBlog
Blog

Introduction to Functional Programming in F# – Part 9

Explore Active Patterns and Computation Expressions in F#. Enhance code clarity and functionality with these advanced techniques.

Ian RusselIan RusselBlog
Blog

Introduction to Functional Programming in F# – Part 5

Master F# asynchronous workflows and parallelism. Enhance application performance with advanced functional programming techniques.

Ian RusselIan RusselBlog
Blog

Introduction to Functional Programming in F# – Part 11

Learn type inference and generic functions in F#. Boost efficiency and flexibility in your code with these essential programming concepts.

Ian RusselIan RusselBlog
Blog

Introduction to Functional Programming in F# – Part 6

Learn error handling in F# with option types. Improve code reliability using F#'s powerful error-handling techniques.

Ian RusselIan RusselBlog
Blog

Introduction to Functional Programming in F# – Part 7

Explore LINQ and query expressions in F#. Simplify data manipulation and enhance your functional programming skills with this guide.

Ian RusselIan RusselBlog
Blog

Introduction to Functional Programming in F# – Part 3

Dive into F# data structures and pattern matching. Simplify code and enhance functionality with these powerful features.

Ian RusselIan RusselBlog
Blog

Introduction to Functional Programming in F#

Dive into functional programming with F# in our introductory series. Learn how to solve real business problems using F#'s functional programming features. This first part covers setting up your environment, basic F# syntax, and implementing a simple use case. Perfect for developers looking to enhance their skills in functional programming.

Ian RusselIan RusselBlog
Blog

Introduction to Functional Programming in F# – Part 2

Explore functions, types, and modules in F#. Enhance your skills with practical examples and insights in this detailed guide.

Ian RusselIan RusselBlog
Blog

Introduction to Functional Programming in F# – Part 10

Discover Agents and Mailboxes in F#. Build responsive applications using these powerful concurrency tools in functional programming.

Ian RusselIan RusselBlog
Blog

Introduction to Functional Programming in F# – Part 4

Unlock F# collections and pipelines. Manage data efficiently and streamline your functional programming workflow with these powerful tools.

Ian RusselIan RusselBlog
Blog

Introduction to Functional Programming in F# – Part 8

Discover Units of Measure and Type Providers in F#. Enhance data management and type safety in your applications with these powerful tools.

Laura GaetanoBlog
Blog

My Weekly Shutdown Routine

Discover my weekly shutdown routine to enhance productivity and start each week fresh. Learn effective techniques for reflection and organization.

Bernhard SchauerBlog
Blog

ADRs as a Tool to Build Empowered Teams

Learn how we use Architecture Decision Records (ADRs) to build empowered, autonomous teams, enhancing decision-making and collaboration.

Ian RusselIan RusselBlog
Blog

So, I wrote a book

Join me as I share the story of writing a book on F#. Discover the challenges, insights, and triumphs along the way.

Rinat AbdullinRinat AbdullinBlog
Blog

Process Pipelines

Discover how process pipelines break down complex tasks into manageable steps, optimizing workflows and improving efficiency using Kanban boards.

Rinat AbdullinRinat AbdullinBlog
Blog

Learning + Sharing at TIMETOACT GROUP Austria

Discover how we fosters continuous learning and sharing among employees, encouraging growth and collaboration through dedicated time for skill development.

Rinat AbdullinRinat AbdullinBlog
Blog

Innovation Incubator Round 1

Team experiments with new technologies and collaborative problem-solving: This was our first round of the Innovation Incubator.

Rinat AbdullinRinat AbdullinBlog
Blog

Innovation Incubator at TIMETOACT GROUP Austria

Discover how our Innovation Incubator empowers teams to innovate with collaborative, week-long experiments, driving company-wide creativity and progress.

Laura GaetanoBlog
Blog

5 lessons from running a (remote) design systems book club

Last year I gifted a design systems book I had been reading to a friend and she suggested starting a mini book club so that she’d have some accountability to finish reading the book. I took her up on the offer and so in late spring, our design systems book club was born. But how can you make the meetings fun and engaging even though you're physically separated? Here are a couple of things I learned from running my very first remote book club with my friend!

Christian FolieBlog
Blog

Running Hybrid Workshops

When modernizing or building systems, one major challenge is finding out what to build. In Pre-Covid times on-site workshops were a main source to get an idea about ‘the right thing’. But during Covid everybody got used to working remotely, so now the question can be raised: Is it still worth having on-site, physical workshops?

Laura GaetanoBlog
Blog

Using a Skill/Will matrix for personal career development

Discover how a Skill/Will Matrix helps employees identify strengths and areas for growth, boosting personal and professional development.

Rinat AbdullinRinat AbdullinBlog
Blog

Using NLP libraries for post-processing

Learn how to analyse sticky notes in miro from event stormings and how this analysis can be carried out with the help of the spaCy library.

Sebastian BelczykBlog
Blog

Building a micro frontend consuming a design system | Part 3

In this blopgpost, you will learn how to create a react application that consumes a design system.

Blog
Blog

My Workflows During the Quarantine

The current situation has deeply affected our daily lives. However, in retrospect, it had a surprisingly small impact on how we get work done at TIMETOACT GROUP Austria.

Daniel PuchnerBlog
Blog

Make Your Value Stream Visible Through Structured Logging

Boost your value stream visibility with structured logging. Improve traceability and streamline processes in your software development lifecycle.

Daniel PuchnerBlog
Blog

How to gather data from Miro

Learn how to gather data from Miro boards with this step-by-step guide. Streamline your data collection for deeper insights.

Peter SzarvasPeter SzarvasBlog
Blog

Why Was Our Project Successful: Coincidence or Blueprint?

“The project exceeded all expectations,” is one among our favourite samples of the very positive feedback from our client. Here's how we did it!

Jonathan ChannonBlog
Blog

Tracing IO in .NET Core

Learn how we leverage OpenTelemetry for efficient tracing of IO operations in .NET Core applications, enhancing performance and monitoring.

Christian FolieBlog
Blog

The Power of Event Sourcing

This is how we used Event Sourcing to maintain flexibility, handle changes, and ensure efficient error resolution in application development.

Rinat AbdullinRinat AbdullinBlog
Blog

Event Sourcing with Apache Kafka

For a long time, there was a consensus that Kafka and Event Sourcing are not compatible with each other. So it might look like there is no way of working with Event Sourcing. But there is if certain requirements are met.

Sebastian BelczykBlog
Blog

Building A Shell Application for Micro Frontends | Part 4

We already have a design system, several micro frontends consuming this design system, and now we need a shell application that imports micro frontends and displays them.

Rinat AbdullinRinat AbdullinBlog
Blog

Consistency and Aggregates in Event Sourcing

Learn how we ensures data consistency in event sourcing with effective use of aggregates, enhancing system reliability and performance.

Sebastian BelczykBlog
Blog

Building and Publishing Design Systems | Part 2

Learn how to build and publish design systems effectively. Discover best practices for creating reusable components and enhancing UI consistency.

Aqeel AlazreeBlog
Blog

Part 2: Data Analysis with powerful Python

Analyzing and visualizing data from a SQLite database in Python can be a powerful way to gain insights and present your findings. In Part 2 of this blog series, we will walk you through the steps to retrieve data from a SQLite database file named gold.db and display it in the form of a chart using Python. We'll use some essential tools and libraries for this task.

Nina DemuthBlog
Blog

Trustbit ML Lab Welcomes Grayskull e150 by Tenstorrent

Discover how Trustbit ML Lab integrates Tenstorrent's Grayskull e150, led by Jim Keller, for cutting-edge, energy-efficient AI processing.

Sebastian BelczykBlog
Blog

Composite UI with Design System and Micro Frontends

Discover how to create scalable composite UIs using design systems and micro-frontends. Enhance consistency and agility in your development process.

Chrystal LantnikBlog
Blog

CSS :has() & Responsive Design

In my journey to tackle a responsive layout problem, I stumbled upon the remarkable benefits of the :has() pseudo-class. Initially, I attempted various other methods to resolve the issue, but ultimately, embracing the power of :has() proved to be the optimal solution. This blog explores my experience and highlights the advantages of utilizing the :has() pseudo-class in achieving flexible layouts.

Daniel WellerBlog
Blog

Revolutionizing the Logistics Industry

As the logistics industry becomes increasingly complex, businesses need innovative solutions to manage the challenges of supply chain management, trucking, and delivery. With competitors investing in cutting-edge research and development, it is vital for companies to stay ahead of the curve and embrace the latest technologies to remain competitive. That is why we introduce the TIMETOACT Logistics Simulator Framework, a revolutionary tool for creating a digital twin of your logistics operation.

Aqeel AlazreeBlog
Blog

Part 3: How to Analyze a Database File with GPT-3.5

In this blog, we'll explore the proper usage of data analysis with ChatGPT and how you can analyze and visualize data from a SQLite database to help you make the most of your data.

Rinat AbdullinRinat AbdullinBlog
Blog

State of Fast Feedback in Data Science Projects

DSML projects can be quite different from the software projects: a lot of R&D in a rapidly evolving landscape, working with data, distributions and probabilities instead of code. However, there is one thing in common: iterative development process matters a lot.

Aqeel AlazreeBlog
Blog

Part 1: Data Analysis with ChatGPT

In this new blog series we will give you an overview of how to analyze and visualize data, create code manually and how to make ChatGPT work effectively. Part 1 deals with the following: In the data-driven era, businesses and organizations are constantly seeking ways to extract meaningful insights from their data. One powerful tool that can facilitate this process is ChatGPT, a state-of-the-art natural language processing model developed by OpenAI. In Part 1 pf this blog, we'll explore the proper usage of data analysis with ChatGPT and how it can help you make the most of your data.

Felix KrauseBlog
Blog

License Plate Detection for Precise Car Distance Estimation

When it comes to advanced driver-assistance systems or self-driving cars, one needs to find a way of estimating the distance to other vehicles on the road.

Rinat AbdullinRinat AbdullinBlog
Blog

LLM Performance Series: Batching

Beginning with the September Trustbit LLM Benchmarks, we are now giving particular focus to a range of enterprise workloads. These encompass the kinds of tasks associated with Large Language Models that are frequently encountered in the context of large-scale business digitalization.

Rinat AbdullinRinat AbdullinBlog
Blog

So You are Building an AI Assistant?

So you are building an AI assistant for the business? This is a popular topic in the companies these days. Everybody seems to be doing that. While running AI Research in the last months, I have discovered that many companies in the USA and Europe are building some sort of AI assistant these days, mostly around enterprise workflow automation and knowledge bases. There are common patterns in how such projects work most of the time. So let me tell you a story...

Rinat AbdullinRinat AbdullinBlog
Blog

The Intersection of AI and Voice Manipulation

The advent of Artificial Intelligence (AI) in text-to-speech (TTS) technologies has revolutionized the way we interact with written content. Natural Readers, standing at the forefront of this innovation, offers a comprehensive suite of features designed to cater to a broad spectrum of needs, from personal leisure to educational support and commercial use. As we delve into the capabilities of Natural Readers, it's crucial to explore both the advantages it brings to the table and the ethical considerations surrounding voice manipulation in TTS technologies.

Christian FolieBlog
Blog

Designing and Running a Workshop series: An outline

Learn how to design and execute impactful workshops. Discover tips, strategies, and a step-by-step outline for a successful workshop series.

Rinat AbdullinRinat AbdullinBlog
Blog

Machine Learning Pipelines

In this first part, we explain the basics of machine learning pipelines and showcase what they could look like in simple form. Learn about the differences between software development and machine learning as well as which common problems you can tackle with them.

Daniel PuchnerBlog
Blog

How we discover and organise domains in an existing product

Software companies and consultants like to flex their Domain Driven Design (DDD) muscles by throwing around terms like Domain, Subdomain and Bounded Context. But what lies behind these buzzwords, and how these apply to customers' diverse environments and needs, are often not as clear. As it turns out it takes a collaborative effort between stakeholders and development team(s) over a longer period of time on a regular basis to get them right.

Felix KrauseBlog
Blog

Part 1: Detecting Truck Parking Lots on Satellite Images

Real-time truck tracking is crucial in logistics: to enable accurate planning and provide reliable estimation of delivery times, operators build detailed profiles of loading stations, providing expected durations of truck loading and unloading, as well as resting times. Yet, how to derive an exact truck status based on mere GPS signals?

Rinat AbdullinRinat AbdullinBlog
Blog

Trustbit LLM Leaderboard

To address common questions concerning the integration of Large Language Models, we have created an LLM Product Leaderboard that focuses on building and shipping products.

Felix KrauseBlog
Blog

Creating a Cross-Domain Capable ML Pipeline

As classifying images into categories is a ubiquitous task occurring in various domains, a need for a machine learning pipeline which can accommodate for new categories is easy to justify. In particular, common general requirements are to filter out low-quality (blurred, low contrast etc.) images, and to speed up the learning of new categories if image quality is sufficient. In this blog post we compare several image classification models from the transfer learning perspective.

Nina DemuthBlog
Blog

7 Positive effects of visualizing the interests of your team

Interests maps unleash hidden potentials and interests, but they also make it clear which topics are not of interest to your colleagues.

Christian FolieBlog
Blog

Designing and Running a Workshop series: The board

In this part, we discuss the basic design of the Miro board, which will aid in conducting the workshops.

Christoph HasenzaglChristoph HasenzaglBlog
Blog

Common Mistakes in the Development of AI Assistants

How fortunate that people make mistakes: because we can learn from them and improve. We have closely observed how companies around the world have implemented AI assistants in recent months and have, unfortunately, often seen them fail. We would like to share with you how these failures occurred and what can be learned from them for future projects: So that AI assistants can be implemented more successfully in the future!

Felix KrauseBlog
Blog

Part 2: Detecting Truck Parking Lots on Satellite Images

In the previous blog post, we created an already pretty powerful image segmentation model in order to detect the shape of truck parking lots on satellite images. However, we will now try to run the code on new hardware and get even better as well as more robust results.

Rinat AbdullinRinat AbdullinBlog
Blog

Strategic Impact of Large Language Models

This blog discusses the rapid advancements in large language models, particularly highlighting the impact of OpenAI's GPT models.

Felix KrauseBlog
Blog

Boosting speed of scikit-learn regression algorithms

The purpose of this blog post is to investigate the performance and prediction speed behavior of popular regression algorithms, i.e. models that predict numerical values based on a set of input variables.

Jörg EgretzbergerJörg EgretzbergerBlog
Blog

8 tips for developing AI assistants

AI assistants for businesses are hype, and many teams were already eagerly and enthusiastically working on their implementation. Unfortunately, however, we have seen that many teams we have observed in Europe and the US have failed at the task. Read about our 8 most valuable tips, so that you will succeed.

TIMETOACT
News
News

TIMETOACT is Mendix training partner

We are convinced of Mendix's no-code/low-code platforms and are therefore not only a Mendix partner, but also a Mendix training partner.

Rinat AbdullinRinat AbdullinBlog
Blog

5 Inconvenient Questions when hiring an AI company

This article discusses five questions you should ask when buying an AI. These questions are inconvenient for providers of AI products, but they are necessary to ensure that you are getting the best product for your needs. The article also discusses the importance of testing the AI system on your own data to see how it performs.

Rinat AbdullinRinat AbdullinBlog
Blog

Let's build an Enterprise AI Assistant

In the previous blog post we have talked about basic principles of building AI assistants. Let’s take them for a spin with a product case that we’ve worked on: using AI to support enterprise sales pipelines.

Rinat AbdullinRinat AbdullinBlog
Blog

Announcing Domain-Driven Design Exercises

Interested in Domain Dirven Design? Then this DDD exercise is perfect for you!

Aqeel AlazreeBlog
Blog

Part 4: Save Time and Analyze the Database File

ChatGPT-4 enables you to analyze database contents with just two simple steps (copy and paste), facilitating well-informed decision-making.

Matus ZilinskyBlog
Blog

Creating a Social Media Posts Generator Website with ChatGPT

Using the GPT-3-turbo and DALL-E models in Node.js to create a social post generator for a fictional product can be really helpful. The author uses ChatGPT to create an API that utilizes the openai library for Node.js., a Vue component with an input for the title and message of the post. This article provides step-by-step instructions for setting up the project and includes links to the code repository.

Aqeel AlazreeBlog
Blog

Database Analysis Report

This report comprehensively analyzes the auto parts sales database. The primary focus is understanding sales trends, identifying high-performing products, Analyzing the most profitable products for the upcoming quarter, and evaluating inventory management efficiency.

Kompetenz
Kompetenz

DevOps and CI/CD

A DevOps introduction gains momentum and focus with the support of our experts. We record the initiatives and capture the context of the company.

TIMETOACT
Service
Headerbild zu Application Modernization
Service

Application Modernization

Application Modernization focuses on modernizing existing applications. The key to success in Application Modernization is the strategy and selection of projects.

TIMETOACT
Service
Header zu Fullstack Development
Service

Fullstack Development

The trend in Software Development is towards Full-Stack Development. Full-stack developers are programmers who work in both frontend and backend development and thus have competencies in the areas of databases, servers, systems and clients.

TIMETOACT
Technologie
Technologie

Advice around Mendix

Develop your solutions quickly and independently in low-code with the leading technology vendor. Use the Mendix toolkit and model your applications with visual elements.

TIMETOACT
Service
Navigationsbilc zu Application Development
Service

Application Development

Application Development refers to the process of modifying, designing and/or developing one or more applications. Gaps in the software landscape can be closed by tailoring applications individually to the customer.

Kompetenz
Kompetenz

AI - A technology is revolutionizing our everyday lives

For ARS, AI is an increasingly natural and organic part of software engineering. This is particularly true in cases where it is an integral part of applications and functions.

TIMETOACT
Technologie
Atlassian Logo
Technologie

Bamboo, Bitbucket, Sourcetree

Continuous Integration and a Continuous Delivery Pipeline with Bamboo, Bitbucket and Sourcetree. We can help you with our years of experience as a user as well as a solution partner of Atlassian products in many areas.

TIMETOACT
Technologie
Logo Atlassian Confluence
Technologie

Confluence from Atlassian

Create, organize, and collaborate on tasks - all in a single place. Confluence is a workspace for teams and organizations where you can store your documentation and collaboratively develop and share knowledge. Dynamic pages give your team a place to create, capture, and collaborate around projects or idea development.

TIMETOACT
Technologie
Technologie

Our service offer for Mendix

The Dutch software manufacturer gives us the possibilities to create platform-independent low/no-code solutions for you with its products. In addition, we offer a wide range of services related to Mendix and are available to you from conceptual design to hosting and operation of your new solution.

TIMETOACT
Technologie
Logo Jira Service Management
Technologie

Jira Service Management from Atlassian

Enable developers, operators, and other teams from different departments to collaborate and improve their service management responsiveness. Respond quickly to incidents, requests, and changes, and provide your customers with an optimized service experience.

TIMETOACT
Referenz
Referenz

Introduction of Jira to Hamburger Hochbahn

The Hamburger Hochbahn AG controls the development of its new mobility platform "Switchh" via the Atlassian project management tool Jira – introduced, administered and hosted by the TIMETOACT GROUP.

Kompetenz
Kompetenz

ARS Golden 4

Agile development, DevOps, APIs and microservices are the state-of-the-art gold standards for their digital systems and products.

TIMETOACT
Service
Header zu Requirement Engineering
Service

Requirement Engineering

Requirement Engineering, also known as Requirements Analysis, is a central component of the Software Development process. In this process, the requirements for the system to be developed are defined using a systematic procedure.

TIMETOACT GROUP
Branche
Branche

Digital transformation in public administration

The digital transformation will massively change the world of work, especially in public administration. We support federal, state and local authorities in the strategic and technical implementation of their administrative modernisation projects.

TIMETOACT GROUP
Branche
Headerbild für lokale Entwicklerressourcen in Deutschland
Branche

On-site digitization partner for insurance companies

As TIMETOACT GROUP, we are one of the leading digitization partners for IT solutions in Germany, Austria and Switzerland. As your partner, we are there for you at 17 locations and will find the right solution on the path to digitization - gladly together in a personal exchange on site.

TIMETOACT GROUP
Branche
Schild als Symbol für innere und äußere Sicherheit
Branche

Internal and external security

Defense forces and police must protect citizens and the state from ever new threats. Modern IT & software solutions support them in this task.

Service
Service

Cloud Transformation & Container Technologies

Public, private or hybrid? We can help you develop your cloud strategy so you can take full advantage of the technology.

Kompetenz
Kompetenz

Software Engineering

Software engineering is the art of creating good software. Software engineering is the discipline of creating your digital products using methods proven by science and practice.

TIMETOACT GROUP
Service
Headerbild zur offenen und sicheren IT bei Versicherungen
Service

Open and secure IT

Just a few years ago, insurers were reluctant to move into the cloud or platform world. Concerns about security and governance often prevailed. The paradigm has changed. Insurers are looking at cloud solutions and are increasingly willing to rely on standard solutions for core applications as well.

TIMETOACT
Referenz
Referenz

The digital customer file with IBM Content Manager

The prefabricated house specialist SchwörerHaus KG has relied on IBM technology for many years to set up a digital customer file.

Service
Service

Application Integration & Process Automation

Digitizing and improving business processes and responding agilely to change – more and more companies are facing these kind of challenges. This makes it all the more important to take new business opportunities through integrated and optimized processes based on intelligent, digitally networked systems.

Service
Service

Managed Service: Mailroom

In the TIMETOACT mailroom, business documents are converted into data in a highly efficient manner and returned securely to the end customer for further processing.

Service
Service

Software, Mobile and Web App Development

Standard software often cannot completely fulfill a company's own requirements - TIMETOACT therefore develops customized software solutions.

TIMETOACT
Referenz
Referenz

Interactive online portal identifies suitable employees

TIMETOACT digitizes several test procedures for KI.TEST to determine professional intelligence and personality.

TIMETOACT
Technologie
Headerbild zu Containerisierung mit Open Source
Technologie

Containerisation with Open Source

Containerization is the next stage of virtualization and provides secure and easy compartmentalization of individual applications. The process of deploying an app has been simplified many times in recent years.

TIMETOACT
Referenz
Referenz

TIMETOACT implements integrated insurance software

Less than one year from project start to system implementation: TIMETOACT developed the integrated, browser-based insurance software "HERMES" for the VOV D&O insurance association. The cross-departmental individual software completely covers all core processes of the insurance company. Users particularly appreciate the intuitive user interface and the high performance of HERMES.

IPG
Marco RohrerMarco RohrerBlog
Hintergrundgrafik für IPG Partner Clearsky
Blog

Bring IT service management and IAM systems together

How do companies bring their complex IT service management and IAM systems together in an end user-friendly way? In our interview, Clear Skye and the IPG Group show, how it works very easily

TIMETOACT GROUP
News
News

Proof-of-Value Workshop

Today's businesses need data integration solutions that offer open, reusable standards and a complete, innovative portfolio of data capabilities. Apply for one of our free workshops!

TIMETOACT
Blog
Blog

TIMETOACT starts with the implementation of ESG-Suit

Compliance with ESG and sustainability standards is mandatory for companies in order to meet the requirements of the EU's Corporate Sustainability Reporting Directive (CSRD).