Posts

Showing posts with the label Software Engineering

Seth Godin on cash flow and not raising investment capital

Image
As a founder, one of the most important lessons I’ve learned is the power of cash flow in maintaining independence. Seth Godin perfectly captures this idea when he says, "If we don't run out of cash, no one can tell us what to do." In the early stages of building a business, it’s easy to become consumed with raising capital, seeking out investors, and worrying about funding. But the more I reflect on it, the clearer it becomes: self-sufficiency is key. When you manage your cash flow well and keep the business running on its own, you're not just surviving—you’re keeping control of your vision and your decisions. Investors can bring valuable resources, but they can also bring constraints, pushing you to meet their expectations over your own. Cash flow, on the other hand, gives you the freedom to take risks, experiment, and focus on the long-term goals that matter most to you and your business. For any entrepreneur, the goal shouldn’t just be about scaling quickly or att

Dyslexia: The Dial-Up Modem of the Brain in a Fiber-Optic Era

Image
In the world of spelling and reading, there's a fascinating dance between encoding and decoding sounds, known as phonemes. Picture it as your brain donning the hat of a modem, transmitting and receiving these linguistic signals. But what if your modem operates at a different speed? Enter dyslexia, where the brain's modem seems to be stuck in the dial-up era while others zoom along the fiber-optic lanes. In essence, those with severe dyslexia might as well be navigating the internet with a sluggish 56k connection, while the rest of us enjoy lightning-fast fiber connections. Consider English, with its hefty 40 phonemes. It's like navigating a labyrinth of linguistic pathways, increasing the likelihood of miscommunication and errors. In contrast, Italian boasts a lean 25 phonemes. It's like having a cleaner digital signal, reducing the chances of miscommunication. There are simply fewer opportunities for errors, unlike the myriad pathways English presents. Language itself

A* Pathfinding Algorithm in JavaScript

Image
In the realm of pathfinding algorithms, the A* algorithm stands out as a versatile and efficient method for finding the shortest path between two points on a grid. This blog post will delve into the inner workings of the A* algorithm, using JavaScript as the language of choice for our implementation. We'll explore the key components of the algorithm and provide snippets of the source code to illustrate its functionality. Demo https://adamstirtan.github.io/astar-js/ Overview of the A* Algorithm A* (pronounced "A star") is a heuristic search algorithm commonly used in various applications, such as robotics, video games, and geographical information systems. It efficiently finds the optimal path from a start point to an end point while considering the cost of movement and avoiding obstacles. The algorithm maintains two sets: the open set and the closed set. The open set contains nodes to be evaluated, while the closed set contains nodes that have already been evaluated. A* u

Creating boundary: How software developers can disconnect from work

Image
Picture this: You've just wrapped up a marathon day of coding, bugs, and Zoom meetings that seem to multiply like rabbits. You're finally done, and you close that laptop with a triumphant sigh. But wait, you're not quite done – work's lingering like a virtual ghost, haunting your every move. For software developers and those glued to their screens all day, the struggle to disconnect from work is as real as debugging that cryptic error message. So, welcome to the not-so-technical guide on how to take back your life from the code-monster's clutches – it's time to create some space between your work-life and your home-life. The need for disconnection So, you're a software developer, and your typical day reads like a mix between binary code and a suspense novel. Meetings, code, meetings about code – and suddenly, your 9 to 5 feels more like a 24/7. You close your laptop, but it's like trying to close Pandora's box; work thoughts keep popping up like thos

Using Dependency Injection in .NET Console Apps

Image
Are you tired of hearing the words "Dependency Injection" and instantly picturing complex web applications with fancy UIs? Well, my fellow developers, you're in for a treat, because in this article you'll see how to use Dependency Injection in console apps! You might be thinking, "Console apps? Isn't that reserved for simple command-line utilities?" But, hold on. With Dependecy Injection, your humble console app can tap into the same power and flexibility that  ASP.NET  Core developers wield for their web applications. Sounds good, right? Let's dive in and see how we can turn even the most mundane console apps into flexibile and testable applications. In this article, I'll guide you through the process of setting up a basic console app with a  ServiceCollection  that'll make any  ASP.NET  Core developer feel right at home. Installing NuGet packages You'll need to install the Microsoft.Extensions.DependencyInjection package in your console

Stop writing code during interviews and do this instead!

Image
With generative AI, writing code during an interview just doesn't make sense anymore The reality is we expect that you can code. It’s implied, it's taught in schools to children, it’s integrated into video games like Roblox. Asking a professional software developer to write trivial coding problems like the Fibonacci sequence during an interview is no longer good enough. We can do better and here’s how. Introduction Technical interviews for software engineers are at a crossroads. The traditional practice of having candidates write code is facing new challenges in the age of generative AI. Writing code is becoming easier to automate, raising questions about its relevance in evaluating real-world skills. In this article, we propose a shift towards code reviews as a better assessment method. Code reviews offer a window into how candidates reason, think, and communicate in a typical workday. They also provide a robust defense against cheating. Join us as we explore the changing land

An introduction to Particle Swarm Optimization (PSO) using C#

Image
In the realm of optimization algorithms, Particle Swarm Optimization (PSO) stands out as an efficient and intuitive technique inspired by social behaviour. Developed in the 1990s by Eberhart and Kennedy, PSO has gained popularity in various fields, including engineering, computer science, and economics. By simulating the movement of a swarm of particles, PSO searches for optimal solutions in complex problem spaces. In this post, we will delve into the essence of PSO, employing a relatable metaphor to facilitate understanding, and present a basic implementation in C#. Understanding PSO through the flock of birds metaphor To grasp the concept of PSO, let's imagine a flock of birds searching for the most favourable location to roost for the night. Each bird represents a potential solution to the optimization problem. The goal is to find the optimal location, analogous to the solution we seek. Initially, the birds scatter randomly across the sky. However, they are not entirely clueless

Create a Discord bot in C# and .NET - Part 3

Image
This is part 3 in the series of articles about creating a Discord bot in C# and .NET. In part 1 of the series, we completed our project setup in Visual Studio and created all the necessary information in the Discord developer portal. In part 2 , we created a bot using the Discord.NET library and added some basic functionality. 🧑🏻‍💻 Source code: https://github.com/adamstirtan/DiscordBotTutorial 🧠 Part 1: https://blog.adamstirtan.net/2023/10/create-discord-bot-in-c-and-net-part-1.html 🧠 Part 2:  https://blog.adamstirtan.net/2023/10/create-discord-bot-in-c-and-net-part-2.html Implementing Logging using the ILogger interface As we build out new features debugging will become more involving. By implementing logging we'll be able to print to the terminal when something happens and we'll have a much better idea of what the is doing. Add NuGet package Microsoft.Extensions.Logging.Console dotnet add package Microsoft.Extensions.Logging.Console Update the ServiceCollection in Progr

Create a Discord bot in C# and .NET - Part 2

Image
This is part 2 in the series of articles about creating a Discord bot in C# and .NET. In part 1 of the series, we completed our project setup in Visual Studio and created all the necessary information in the Discord developer portal . This article assumes you have a working console application and our bot's Discord token is stored in user secrets. This article will focus on the fundamentals of using the Discord.NET library to create a Discord bot from a console application. Then we'll finish off by creating a simple command called !echo which will repeat back what was said. 🧑🏻‍💻 Source code:  https://github.com/adamstirtan/DiscordBotTutorial 🧠 Part 1: https://blog.adamstirtan.net/2023/10/create-discord-bot-in-c-and-net-part-1.html 🧠 Part 3:  https://blog.adamstirtan.net/2023/10/create-discord-bot-in-c-and-net-part-3.html Install the Discord.NET NuGet package We're going to use Discord.NET, an unofficial .NET wrapper for the Discord API . It's a comprehensive lib

Create a Discord bot in C# and .NET - Part 1

Image
Creating a Discord bot is a fun way to add new functionality to your Discord server. The Discord API is very comprehensive and beginners may find it too complex to know where to get started. In this series of articles, I'm going to show you have to create a Discord bot using C# and .NET from scratch. The articles will demonstrate fundamentals such as new project setup, starting the bot and adding useful bot commands like: simple responses, embeds and remote API calls. 🧑🏻‍💻 Source code: https://github.com/adamstirtan/DiscordBotTutorial 🧠 Part 2: https://blog.adamstirtan.net/2023/10/create-discord-bot-in-c-and-net-part-2.html 🧠 Part 3:  https://blog.adamstirtan.net/2023/10/create-discord-bot-in-c-and-net-part-3.html Project setup in Visual Studio Open Visual Studio 2022 and create a new project. Choose Console App as the project type. Give your project a name and choose where to save the source code. For simplicity, check "Place solution and project in the same directory&qu

Remote .NET development with tunnels using Visual Studio Code and Synology NAS

Image
  Visual Studio Code allows you setup a remote development environment that using secure tunnels. In this article I'm going to show you how to use a Synology NAS running DSM 7.2 as the remote environment. We'll install some development tools on the NAS and the .NET SDK and configure the environment properly using our $PATH variable and run the Code CLI as a service so after your Synology reboots, the secure tunnel will be started. Remote Tunnels official documentation Installing .NET on Linux SynoCommunity 1. Install git and nano on Synology The first thing we need to do is install some new packages on the Synology NAS. These packages come from the community contributors at SynoCommunity.com . These packages will allow us to install git and nano, the terminal file editor. Open the Synology DSM web interface Open the main menu Select Package Center Select Settings Select the Package Sources tab Select Add Use SynoCommunity as the name and https://packages.synocommunity.com as th