#software architectural pattern
Explore tagged Tumblr posts
Text
MVC (Model-View-Controller) is a software architectural pattern that separates an application into three main components: Model, View, and Controller. ASP.NET, a popular web application framework developed by Microsoft, leverages this architecture to build scalable, maintainable, and testable web applications. In this article, we’ll dive deep into the MVC architecture, how it works in ASP.NET, and why it is a go-to pattern for developers.
0 notes
Text
Efficient Web Application Management with Modular Designs
When designing with modularity in web application development the sole main focus is enhancing efficiency, scalability, and maintainability . This actually possible by breaking down an application into independent, reusable modules. In contrast to a monolithic approach, where all components are tightly coupled, modular architectural design structures the application into separate, self-contained units. In such case, you can modularize the account verification, product management, and payment processing.
This separation allows web developers to work on individual modules without disrupting the entire system, making updates, debugging, and feature additions more manageable. Just like by following Laravel’s modular principles using Service Providers, Repositories, and Packages, teams can develop cleaner, more structured codebases that are easier to scale and maintain.
Support Parallel Development and Flexibility
Modular architecture enables software development teams to build, test, and deploy individual features independently. If one module requires changes or optimizations, it can be modified without affecting the rest of the application, reducing downtime and improving development speed. So, the modular architecture is particularly beneficial for large-scale applications like an office furniture online system, where different teams may handle inventory, customer management, and order processing as separate modules. Try implementing modularization with Laravel, you'll achieve a robust, high-performing, and future-proof web application that efficiently adapts to growing demands.
#modular#architecture#modular architecture#laravel modular architecture#modular design#office furniture#online office furniture system#high performance#laravel modules#laravel framework#PHP framework#web application design#monolithic#parallel development#large scale applications#service providers#flexibility#maintainable application design#scalable application design#coupling#cohesion#reusable patterns#software patterns#software testing#web deevlopment
0 notes
Text
Are you eager to delve into the core of web development? Join us as we explore Backend for Frontend (BFF), an intricate powerhouse that silently serves as an intermediary layer, tailoring data for distinct front-end clients, streamlining UI customization, and accelerating development. Further, learn how BFF stands as the unsung hero, elevating web development speed and performance. Stay confident and informed of the ever-evolving web development terrain with Nitor Infotech.
#micro services#Backend for Frontend#web application development service#front end development#microservices architecture patterns#web app development#software development#software services#nitorinfotech#software engineering
0 notes
Text
Do you know the Facade Pattern?
youtube
#java#100daysofcode#coding is fun#design patterns#python#python for beginners#coding#programming#software#technology#internet#javaprogramming#developer#software development#java for beginners#python programming#pythonprojects#facade#architecture#pattern#Youtube
0 notes
Text
Top 10 ChatGPT Prompts For Software Developers

ChatGPT can do a lot more than just code creation and this blog post is going to be all about that. We have curated a list of ChatGPT prompts that will help software developers with their everyday tasks. ChatGPT can respond to questions and can compose codes making it a very helpful tool for software engineers.
While this AI tool can help developers with the entire SDLC (Software Development Lifecycle), it is important to understand how to use the prompts effectively for different needs.
Prompt engineering gives users accurate results. Since ChatGPT accepts prompts, we receive more precise answers. But a lot depends on how these prompts are formulated.
To Get The Best Out Of ChatGPT, Your Prompts Should Be:
Clear and well-defined. The more detailed your prompts, the better suggestions you will receive from ChatGPT.
Specify the functionality and programming language. Not specifying what you exactly need might not give you the desired results.
Phrase your prompts in a natural language, as if asking someone for help. This will make ChatGPT understand your problem better and give more relevant outputs.
Avoid unnecessary information and ambiguity. Keep it not only to the point but also inclusive of all important details.
Top ChatGPT Prompts For Software Developers
Let’s quickly have a look at some of the best ChatGPT prompts to assist you with various stages of your Software development lifecycle.
1. For Practicing SQL Commands;
2. For Becoming A Programming Language Interpreter;
3. For Creating Regular Expressions Since They Help In Managing, Locating, And Matching Text.
4. For Generating Architectural Diagrams For Your Software Requirements.
Prompt Examples: I want you to act as a Graphviz DOT generator, an expert to create meaningful diagrams. The diagram should have at least n nodes (I specify n in my input by writing [n], 10 being the default value) and to be an accurate and complex representation of the given input. Each node is indexed by a number to reduce the size of the output, should not include any styling, and with layout=neato, overlap=false, node [shape=rectangle] as parameters. The code should be valid, bugless and returned on a single line, without any explanation. Provide a clear and organized diagram, the relationships between the nodes have to make sense for an expert of that input. My first diagram is: “The water cycle [8]”.
5. For Solving Git Problems And Getting Guidance On Overcoming Them.
Prompt Examples: “Explain how to resolve this Git merge conflict: [conflict details].” 6. For Code generation- ChatGPT can help generate a code based on descriptions given by you. It can write pieces of codes based on the requirements given in the input. Prompt Examples: -Write a program/function to {explain functionality} in {programming language} -Create a code snippet for checking if a file exists in Python. -Create a function that merges two lists into a dictionary in JavaScript.
7. For Code Review And Debugging: ChatGPT Can Review Your Code Snippet And Also Share Bugs.
Prompt Examples: -Here’s a C# code snippet. The function is supposed to return the maximum value from the given list, but it’s not returning the expected output. Can you identify the problem? [Enter your code here] -Can you help me debug this error message from my C# program: [error message] -Help me debug this Python script that processes a list of objects and suggests possible fixes. [Enter your code here]
8. For Knowing The Coding Best Practices And Principles: It Is Very Important To Be Updated With Industry’s Best Practices In Coding. This Helps To Maintain The Codebase When The Organization Grows.
Prompt Examples: -What are some common mistakes to avoid when writing code? -What are the best practices for security testing? -Show me best practices for writing {concept or function} in {programming language}.
9. For Code Optimization: ChatGPT Can Help Optimize The Code And Enhance Its Readability And Performance To Make It Look More Efficient.
Prompt Examples: -Optimize the following {programming language} code which {explain the functioning}: {code snippet} -Suggest improvements to optimize this C# function: [code snippet] -What are some strategies for reducing memory usage and optimizing data structures?
10. For Creating Boilerplate Code: ChatGPT Can Help In Boilerplate Code Generation.
Prompt Examples: -Create a basic Java Spring Boot application boilerplate code. -Create a basic Python class boilerplate code
11. For Bug Fixes: Using ChatGPT Helps Fixing The Bugs Thus Saving A Large Chunk Of Time In Software Development And Also Increasing Productivity.
Prompt Examples: -How do I fix the following {programming language} code which {explain the functioning}? {code snippet} -Can you generate a bug report? -Find bugs in the following JavaScript code: (enter code)
12. Code Refactoring- ChatGPt Can Refactor The Code And Reduce Errors To Enhance Code Efficiency, Thus Making It Easier To Modify In The Future.
Prompt Examples –What are some techniques for refactoring code to improve code reuse and promote the use of design patterns? -I have duplicate code in my project. How can I refactor it to eliminate redundancy?
13. For Choosing Deployment Strategies- ChatGPT Can Suggest Deployment Strategies Best Suited For A Particular Project And To Ensure That It Runs Smoothly.
Prompt Examples -What are the best deployment strategies for this software project? {explain the project} -What are the best practices for version control and release management?
14. For Creating Unit Tests- ChatGPT Can Write Test Cases For You
Prompt Examples: -How does test-driven development help improve code quality? -What are some best practices for implementing test-driven development in a project? These were some prompt examples for you that we sourced on the basis of different requirements a developer can have. So whether you have to generate a code or understand a concept, ChatGPT can really make a developer’s life by doing a lot of tasks. However, it certainly comes with its own set of challenges and cannot always be completely correct. So it is advisable to cross-check the responses. Hope this helps. Visit us- Intelliatech
#ChatGPT prompts#Developers#Terminal commands#JavaScript console#API integration#SQL commands#Programming language interpreter#Regular expressions#Code debugging#Architectural diagrams#Performance optimization#Git merge conflicts#Prompt engineering#Code generation#Code refactoring#Debugging#Coding best practices#Code optimization#Code commenting#Boilerplate code#Software developers#Programming challenges#Software documentation#Workflow automation#SDLC (Software Development Lifecycle)#Project planning#Software requirements#Design patterns#Deployment strategies#Security testing
0 notes
Text
Task Manager App: Effortlessly Develop One
Create a Task Manager app using C# WPF and the MVVM pattern. #WPF # Tutorial #MVVM #C-Sharp #Development #Developer #CoderTrend
Using C#, WPF and the MVVM architecture to create a stunning and Useful Task Manager Application Welcome to our comprehensive series where we delve into the creation of a sophisticated Task Manager application using WPF (Windows Presentation Foundation). This journey is not just about building an application; it’s an exploration into the robust capabilities of C# and WPF, crowned with the…
View On WordPress
#.NET Development#Advanced C Techniques#C Programming#Code Efficiency#Coding for Beginners#Desktop Application Development#Model-View-ViewModel#MVVM Pattern#Scalable Software Design#Software Architecture#Task Manager App#UI/UX Design#Visual Studio Tips#Windows Application Development#WPF Tutorial
0 notes
Photo

Service Oriented Architecture (SOA) Design Principle: Coupling, Cohesion, and Granularity
This is a short preview of the article: In the realm of Service Oriented Architecture (SOA) design principles, the concepts of Service Coupling, Service Cohesion, and Service Granularity play pivotal roles in shaping a robust and effective architectural framework. Service Coupling refers to the degree of interdependence between any two
If you like it consider checking out the full version of the post at: Service Oriented Architecture (SOA) Design Principle: Coupling, Cohesion, and Granularity
If you are looking for ideas for tweet or re-blog this post you may want to consider the following hashtags:
Hashtags: #API, #APIs, #Cohesion, #ComputerScience, #Coupling, #DesignPatterns, #Granularity, #ServiceOrientedArchitecture, #SOA, #SoftwareArchitecture, #SoftwareEngineering, #SoftwarePatterns
The Hashtags of the Categories are: #Java, #Programming, #Python, #SoftwareEngineering
Service Oriented Architecture (SOA) Design Principle: Coupling, Cohesion, and Granularity is available at the following link: https://francescolelli.info/software-engineering/service-oriented-architecture-soa-design-principle-coupling-cohesion-and-granularity/ You will find more information, stories, examples, data, opinions and scientific papers as part of a collection of articles about Information Management, Computer Science, Economics, Finance and More.
The title of the full article is: Service Oriented Architecture (SOA) Design Principle: Coupling, Cohesion, and Granularity
It belong to the following categories: Java, Programming, Python, Software Engineering
The most relevant keywords are: API, APIs, Cohesion, computer science, Coupling, Design Patterns, Granularity, Service Oriented Architecture, SOA, software architecture, software engineering, Software Patterns
It has been published by Francesco Lelli at Francesco Lelli a blog about Information Management, Computer Science, Finance, Economics and nearby ideas and opinions
In the realm of Service Oriented Architecture (SOA) design principles, the concepts of Service Coupling, Service Cohesion, and Service Granularity play pivotal roles in shaping a robust and effective architectural framework. Service Coupling refers to the degree of interdependence between any two
Hope you will find it interesting and that it will help you in your journey
In the realm of Service Oriented Architecture (SOA) design principles, the concepts of Service Coupling, Service Cohesion, and Service Granularity play pivotal roles in shaping a robust and effective architectural framework. Service Coupling refers to the degree of interdependence between any two business processes. In the context of SOA, weak coupling is highly preferred as…
#API#APIs#Cohesion#computer science#Coupling#Design Patterns#Granularity#Service Oriented Architecture#SOA#software architecture#software engineering#Software Patterns
0 notes
Link
#ASP.NET Core#Autofac#C / .NET / dotnet#Design Patterns#Programming#Software Architecture#Software Engineering#.NET#C#code#coding#CSharp#DotNet#dotnet core#Vertical Slice#Vertical Slice Architecture
0 notes
Text
The Ultimate Guide to Enterprise Software Architecture Patterns

In this blog, you will explore the types of software architecture patterns for enterprises, their importance, pros, and how to select the appropriate one for your enterprise needs.
#enterprise software architecture#Enterprise Software Architecture Patterns#enterprise software patterns
0 notes
Text
10 Essential Microservices Design Patterns
Database per service
Event driven architecture
CQRS (Command Quality Response Center)
Saga
BFF (Backends for Frontends)
Circuit breaker
API Gateway
Externalized configuration
Service Registry
Bulkhead pattern
#technology#digital transformation#tech#it consulting#it services#mobile app developers#software development#technology trends#product development service#microservices#design patterns#microservices architecture
0 notes
Text
Event-Driven Design Demystified: Concepts and Examples
🚀 Discover how this cutting-edge architecture transforms software systems with real-world examples. From e-commerce efficiency to smart home automation, learn how to create responsive and scalable applications #EventDrivenDesign #SoftwareArchitecture
In the world of software architecture, event-driven design has emerged as a powerful paradigm that allows systems to react and respond to events in a flexible and efficient manner. Whether you’re building applications, microservices, or even IoT devices, understanding event-driven design can lead to more scalable, responsive, and adaptable systems. In this article, we’ll delve into the core…
View On WordPress
#Asynchronous Communication#Decoupling Components#E-commerce Order Processing#Event Broker Paradigm#Event Sources and Consumers#Event-driven architecture#Event-Driven Examples#Event-Driven Paradigm#Event-Triggered Workflows#Microservices and Events#Middleware in Event-Driven Design#Modular Development#Reactive Systems#Real-Time Responsiveness#Scalable Software Systems#Smart Home Automation#Social Media Notifications#Software Design Patterns#System Event Handling#User Experience Enhancement
1 note
·
View note
Text
Java Design Pattern Tutorial Explained with Examples for Beginners and Students
Full video link https://youtu.be/ZDJfDMYlFZc Hello friends, a new #video about #Java #Design #Pattern is published on #codeonedigest #youtube channel. This video covers topics 1. What is #DesignPattern? 2. Why Design Pattern is important in #SoftwareDes
Java design pattern with examples for students, beginners and software engineers. Complete tutorial of Java design pattern explained with the code. Java design pattern is the backbone of software architecture design & development. Gang of Four design patterns are articulated for Object oriented programming languages like Java, Python, Scala, kotlin etc. Hello Friends, Welcome back to the…
View On WordPress
#design patterns#design patterns in java#design patterns in microservices#design patterns in software engineering#design patterns interview questions#Design Patterns Tutorial#java design pattern#java design pattern strategy#java design pattern with example#java design patterns and architecture#java design patterns explained#java design patterns for beginners#java design patterns tutorial
0 notes
Text
How to be a senior developer, pt. 1
Since I'm making a presentation for work, i figured I might as well write it out.
In this part I'll explain my viewpoint, and point out to Shuhari, vertical slices, kata, and the Cynefin framework as helpful tools for figuring out where you are.
In next three parts I'll explain what I think it means to be a good junior, experienced, and senior developer.
About me and the purpose of this talk/article
I don't especially care to impress you and establish my credibility in detail. I'm not the wisest coolest fastest developer you've ever seen, but I've been programming for ~35 years and spent most of my adult life as a professional software developer and architect. I never sought leadership or management positions, but I've been involved in hiring, onboarding, documentation, etc.
The purpose of this is to give you something to think about, to gain some clarity about how to progress. This is not a technical tutorial or life hack or your therapy session.
Classic warning labels
I’m not your dad, it’s your life, I won't tell you what to do with your career.
This is not a criticism of any of you, and please don’t come at me with “this doesn’t apply to me actually”. I will likely say something like "senior dev should know this" and you might be a senior and not know it, it's fine. This is not an appraisal, I'm not your boss, your happiness doesn't depend on me.
And even when I use the labels "junior", "experienced" and "senior" developer, I see zero benefit in assigning you three rigid categories. We're all dumb in our own ways, we're all clever and wise in our own ways.
Let's begin.
Shuhari
https://en.wikipedia.org/wiki/Shuhari
Shu-ha-ri (守破���) is a way of viewing mastery of any skill as three stages. Instead of using the more typical western idea of having "experts" who are people who just Know a lot, it instead focuses on how you interact with the skill.
In very simplified terms, it's obeying the rules and respecting the tradition (Shu), then evolving the existing rules by breaking them bit by bit (Ha), and eventually detaching yourself from the usual wisdom and rules and just vibing (Ri).
A simple way to remember the Shuhari stages - follow the rules, break the rules, transcend the rules.
Another way to look at it is mimicking others (Shu), taking a step back and understanding context (Ha) and having a global perspective (Ri).
For example, I've made 1500-2000 pancakes over the past 13 years. I started by following the existing recipe and measures (Shu). I started trying different variations and ingredients from different recommendations (still Shu).
Eventually I started breaking the traditional recipes by adding ingredients that didn't seem expected (Ha) and improvising more.
I'm not confident I'd say I reached the Ri stage, because I still use the same basic ingredients since I have a relatively limited, desired outcome. I'd argue to really be in Ri level of mastery I'd have to have a MacGyver-like flexibility when it comes to ingredients.
At that's fine. Not everyone needs to be a guru.
The important thing is - someone at Ri level of making pancakes isn't just making Shu level pancakes very very fast.
A "Shu" developer repeats what they learned in school, copy pastes from Stack Overflow, follows advice of senior developers, makes simple CRUD REST endpoints.
A "Ha" developer can improve on existing tooling or workflow, remove more complex technical debt and knows when to have exceptions to common rules.
A "Ri" developer is someone who invents workflows, architecture, enterprise patterns, combines tech stack in creative ways, and doesn't necessarily follow hype.
It should be noted that in real world, developers don't have infinite freedom because of practical considerations - audits, legal requirements, ISO certifications, Jira, limitations in your employees' know-how, etc. I can't just develop something in COBOL and then deploy it outside of a Kubernetes cluster just cause it would be a cool way to solve a problem, it needs to fit into the company goals and needs and policies.
This, sadly, also means that a company can restrict your growth in some ways. It doesn't mean you can't grow, but you can't grow in any possible way imaginable. Choose your battles, etc.
Why is this useful?
It might give you a better framework for analyzing your skill set than "junior" "intermediate" "expert". Shuhari isn't about the amount of your knowledge, it's about how you practice your skill and what is your current approach to learning.
And again - being on Shu level doesn't mean your bad / evil / stupid / incompetent / slow / dumb / etc.
Kata
This is not a new or difficult concept. Kata are the unit tests of your skills. The best way to learn is in small pieces. Sometimes all you need to do is write a few lines of code in REPL.
ADHD and others
This is not a medical advice, but keep in mind that you might prefer different learning style than others. Some people like to RTFM. Some want to dive in and try it on their own. You'll have to balance finding and using the style you prefer, but also remembering the limitations of each method. Watching youtube doesn't give you actual experience. Reading the manual doesn't help you remember everything. Trial and error programming won't alert you to potential pitfalls the code will have in edge cases.
The most effective method is, always was, and always will be having a mentor.
Remember to take breaks. Fresh air, clean water, healthy, varied diet, regular movement and exercise. With both diet and exercise, adopt an additive mindset - sure you might be eating a greasy frozen pizza, but if you add some spinach, rucola, tomatoes, peppers on top of it, you're eating _some_ vegetables. If you do only 1 push-up per day, it's infinitely more than 0 pushups.
If blaming or hating yourself for not doing enough would work, it would have worked by now.
Medication might help some. To get diagnosed with ADHD as an adult in Estonia, you must document that it's affecting your life, fulfill the diagnostic criteria, and fork out 250~350 euro for a cognitive assessment. Don't bother with state psychiatrists.
Some over the counter supplements that might or might not help: Vitamin D, Omega-3, Lecithin, Magnesium L-Threonate, Ginkgo Biloba. Caffeine stimulates your brain indiscriminately and might make it harder to concentrate, and also builds up tolerance.
Cynefin
See more at https://en.wikipedia.org/wiki/Cynefin_framework

Cynefin (Welsh for 'habitat', pronounced like if you take the name Kevin and make it keh-nev-in... i think) is a framework usually used for crisis management and decision making. However, you can use it to aid your learning, to help make sense of situations like production incidents, or when refining tasks during planning meetings.
One use is to look at the 5 domains and figuring out which of them are you comfortable with, and where is your current task located. The names might not be what they seem at first though. They don't represent how long will a task take.
Let's start from bottom right and then move counter-clockwise.
(1) The bottom-right domain is called Clear or Obvious or Simple or Known - it's easy to think of it as tasks like CRUD, BO page with pagination. Generally something that can be easily unit tested.
However, even more complex tasks like placing an order - where there's a lot to keep in mind, many branched pathways, legal requirements, asynchronous calls, etc, something you’d cover with a bunch of integration tests - is still considered “clear” in this framework. If there are defined rules leading to defined results, it's "Clear".
(2) Top right corner is Complicated or Knowable - e.g. an incident in production - a bug that we haven’t found, or an unidentified performance issue. The approach for these is “Sense - analyze - respond” or maybe for tasks that are not burning, “have a meetings and discuss and split the tasks". If you're feeling overwhelmed by a task, it's maybe because it's in the Complicated domain, and you need to find a way to move it to the Clear domain.
(3) Complex domain - investigating an incident where you don’t know what’s wrong and what causes it (untestable, impossible to replicate). Most likely, this is a production incident when you don't even know what's going on. Instead of looking at a dashboard and seeing "oh this endpoint is slow", it's something like "something is slow sometimes but we don't know what caused it and what is a side effect". In this domain, you would probably add more logging, create new Grafana graphs, dive deep into Kibana logs, etc.
Definitely not a domain that should be a part of feature development, unless you're way out of your depth and completely misunderstood how a given technology works.
(4) Chaos domain is not a good place to be. The cause and effect are unclear, e.g. fighting off a hacking attack. It's never happened before, there are no best practices, no playbook, best action is any action. "Have you tried turning it off and on again" style approach, but it might work on some occasions - it's better than nothing. Generally you want to move out of this domain asap.
Example 1: Improving a performance by adding an SQL index can be Simple/Clear/Obvious, but adding redis caching with invalidation to endpoints can be Complicated, if you don't know until you try, and it can be Complex, if you have cache that isn't invalidated immediately, and the impact of having an outdated cache and inconsistent data might be difficult to understand.
If you mess it up and wrong data starts showing to wrong customers, you might feel like it's chaotic because it's stressful, but you're really in Simple or Complicated situation, because you either you know you messed up the caching rules, or you don't know exactly, but have a way to measure it and find out.
(5) Confusion in the middle of the illustration - when you don’t know which one you have, best to split the problem and try to assign parts into different 4 domains.
Remember that for any situation, the domains are individual - a non-programmer can see BO acting weird (Chaotic domain or Confusion), junior dev can see slowness without an obvious cause (Complicated domain) DBA can see a missing index (Simple).
Possibly the most important thing to remember is that you can keep moving the problem between the domains.
Example 2:
implementing an existing compression algorithm is Simple.
developing a new disassembly tool, DRM, or compression is Complicated (trial and error to work around more and more tricks)
developing an algorithm that does open heart surgeries is impossible Complex
Trying to crack a brand new cipher is Chaotic because you don't know what's the content, what's the cipher, what information is there in what format, how many layers of compression, encryption and encoding are there
Example 3:
developing an illegal, unlicensed Tetris™️ prototype is simple, and there are plenty of tutorials available
developing a PvP multiplayer game is Complicated, because you'll have to measure many different unpredictable situations, strategies, and combinations to balance it
developing an MMORPG like EVE Online is Complex because there's no easy, orderly way to have 5'000 players shoot lasers at each other for 12 hours.
developing any game is Chaotic if you're an overconfident noob
Example 4:
making a fake sportsbook website without any real money is Simple
making a real sportsbook website with real money and wallet and 3rd party odds is Simple, even if it will take months
managing odds is both Complicated and Complex
making good UI for both FO and BO is Complex
making a sportsbook website that performs well under a very high load with very fast resolving is Complex because there is never any realistic load testing tool
Example 5:
fixing a bug in logic in a feature that's otherwise behaving correctly and has clean code is usually Simple
fixing a bug in a horrible spaghetti code is Complicated
fixing a bug in an OS kernel on some specific hardware that exhibits undocumented behavior is Complex
trying to fix a software bug when you actually have physical memory corruption is Chaotic
Figuring out how to use Cynefin is up to you. If nothing else, remember to try to take a step back, have a fresh look at a task that's stumping you, and figuring out why isn't the task "Simple". Usually it's one of the three - either you're lacking some technical knowledge (read the manual; Complicated -> Simple), or you're not sure how exactly it is used in our company (ask questions; Complex -> Complicated -> Simple), or you're overwhelmed by a task that's otherwise in your capacity (split the task; Complicated -> Simple).
#programming#software engineering#learning#long post#cynefin#a guy who never shuts up about cynefin be like let's make a short post about learning programming#2000 words later
6 notes
·
View notes
Note
Do you have any recommendations for a small project to build using c++? I've been interested in learning c++ for gamedev in godot. I already have programming experience so I woudn't be starting from the basics (and I own A Tour of C++ by Stroustrup), but at this point I'm wondering whether I should just go through A Tour and then just get stuck into some sort of game idea.
I am not familiar with godot (It is on the list... might honestly look into it in a weeks time) I will steal some advice from Jason Turner. Pick a project you think you can do. Because it will be harder than you think. That is just how it is until you get more experienced. In the meantime, as soon as you have the basics (Writing and calling functions, and classes ) I would start doing something that will require Architecture. Not a lot, but something that requires several distinct parts. Thinking gamedev, maybe a character on screen moving. If it seems like a lot to do, then try figuring out how automated tests works in godot. And then write a program that writes basic ZOMBIE tests for a function. You will learn a lot, and will help you write tests for your code later. Try making a very simple BDD diagram before you start. Simply to force you to think about what it is you want. Keep them simple. Here is mine for my robot PROTO:
Simple boxes, arrows, and explanations for myself to keep things clear. And PROTO is a complex system with many moving parts. Yours should be way way simpler. Arrows and boxes makes everything clearer. And then start coding! When classes or functions get too big, split them up. If you have trouble splitting them up without everything being dependent on everything, try drawing the diagrams again, and ask yourself what you are really trying to do with that chunk of code, and see if there are any software patterns that fits your needs. Refactor your code after you get it to work, make it easier to change and read. Ignore efficiency. pre-mature optimization is how projects die. Make the code easy to read and easy to change. If you run into efficiency issues later then it will be easy to fix. And keep making the simple diagrams. They will help you become better, by having you think about your plan, and how you are coming along. I hope this was helpful ^~^
20 notes
·
View notes
Text
When "Clean" Code is Hard to Read
Never mind that "clean" code can be slow.
Off the top of my head, I could give you several examples of software projects that were deliberately designed to be didactic examples for beginners, but are unreasonably hard to read and difficult to understand, especially for beginners.
Some projects are like that because they are the equivalent of GNU Hello World: They are using all the bells and whistles and and best practices and design patterns and architecture and software development ceremony to demonstrate how to software engineering is supposed to work in the big leagues. There is a lot of validity to that idea. Not every project needs microservices, load balancing, RDBMS and a worker queue, but a project that does need all those things might not be a good "hello, world" example. Not every project needs continuous integration, acceptance testing, unit tests, integration tests, code reviews, an official branching and merging procedure document, and test coverage metrics. Some projects can just be two people who collaborate via git and push to master, with one shell script to run the tests and one shell script to build or deploy the application.
So what about those other projects that aren't like GNU Hello World?
There are projects out there that go out of their way to make the code simple and well-factored to be easier for beginners to grasp, and they fail spectacularly. Instead of having a main() that reads input, does things, and prints the result, these projects define an object-oriented framework. The main file loads the framework, the framework calls the CLI argument parser, which then calls the interactive input reader, which then calls the business logic. All this complexity happens in the name of writing short, easy to understand functions and classes.
None of those things - the parser, the interactive part, the calculation - are in the same file, module, or even directory. They are all strewn about in a large directory hierarchy, and if you don't have an IDE configured to go to the definition of a class with a shortcut, you'll have trouble figuring out what is happening, how, and where.
The smaller you make your functions, the less they do individually. They can still do the same amount of work, but in more places. The smaller you make your classes, the more is-a and as-a relationships you have between classes and objects. The result is not Spaghetti Code, but Ravioli Code: Little enclosed bits floating in sauce, with no obvious connections.
Ravioli Code makes it hard to see what the code actually does, how it does it, and where is does stuff. This is a general problem with code documentation: Do you just document what a function does, do you document how it works, does the documentation include what it should and shouldn't be used for and how to use it? The "how it works" part should be easy to figure out by reading the code, but the more you split up things that don't need splitting up - sometimes over multiple files - the harder you make it to understand what the code actually does just by looking at it.
To put it succinctly: Information hiding and encapsulation can obscure control flow and make it harder to find out how things work.
This is not just a problem for beginner programmers. It's an invisible problem for existing developers and a barrier to entry for new developers, because the existing developers wrote the code and know where everything is. The existing developers also have knowledge about what kinds of types, subclasses, or just special cases exist, might be added in the future, or are out of scope. If there is a limited and known number of cases for a code base to handle, and no plan for downstream users to extend the functionality, then the downside to a "switch" statement is limited, and the upside is the ability to make changes that affect all special cases without the risk of missing a subclass that is hiding somewhere in the code base.
Up until now, I have focused on OOP foundations like polymorphism/encapsulation/inheritance and principles like the single responsibility principle and separation of concerns, mainly because that video by Casey Muratori on the performance cost of "Clean Code" and OOP focused on those. I think these problems can occur in the large just as they do in the small, in distributed software architectures, overly abstract types in functional programming, dependency injection, inversion of control, the model/view/controller pattern, client/server architectures, and similar abstractions.
It's not always just performance or readability/discoverability that suffer from certain abstractions and architectural patterns. Adding indirections or extracting certain functions into micro-services can also hamper debugging and error handling. If everything is polymorphic, then everything must either raise and handle the same exceptions, or failure conditions must be dealt with where they arise, and not raised. If an application is consists of a part written in a high-level interpreted language like Python, a library written in Rust, and a bunch of external utility programs that are run as child processes, the developer needs to figure out which process to attach the debugger to, and which debugger to attach. And then, the developer must manually step through a method called something like FrameWorkManager.orchestrate_objects() thirty times.
108 notes
·
View notes
Text
DeepSeek-R1: A New Era in AI Reasoning
A Chinese AI lab that has continuously been known to bring in groundbreaking innovations is what the world of artificial intelligence sees with DeepSeek. Having already tasted recent success with its free and open-source model, DeepSeek-V3, the lab now comes out with DeepSeek-R1, which is a super-strong reasoning LLM. While it’s an extremely good model in performance, the same reason which sets DeepSeek-R1 apart from other models in the AI landscape is the one which brings down its cost: it’s really cheap and accessible.
What is DeepSeek-R1?
DeepSeek-R1 is the next-generation AI model, created specifically to take on complex reasoning tasks. The model uses a mixture-of-experts architecture and possesses human-like problem-solving capabilities. Its capabilities are rivaled by the OpenAI o1 model, which is impressive in mathematics, coding, and general knowledge, among other things. The sole highlight of the proposed model is its development approach. Unlike existing models, which rely upon supervised fine-tuning alone, DeepSeek-R1 applies reinforcement learning from the outset. Its base version, DeepSeek-R1-Zero, was fully trained with RL. This helps in removing the extensive need of labeled data for such models and allows it to develop abilities like the following:
Self-verification: The ability to cross-check its own produced output with correctness.
Reflection: Learnings and improvements by its mistakes
Chain-of-thought (CoT) reasoning: Logical as well as Efficient solution of the multi-step problem
This proof-of-concept shows that end-to-end RL only is enough for achieving the rational capabilities of reasoning in AI.
Performance Benchmarks
DeepSeek-R1 has successfully demonstrated its superiority in multiple benchmarks, and at times even better than the others: 1. Mathematics
AIME 2024: Scored 79.8% (Pass@1) similar to the OpenAI o1.
MATH-500: Got a whopping 93% accuracy; it was one of the benchmarks that set new standards for solving mathematical problems.
2.Coding
Codeforces Benchmark: Rank in the 96.3rd percentile of the human participants with expert-level coding abilities.
3. General Knowledge
MMLU: Accurate at 90.8%, demonstrating expertise in general knowledge.
GPQA Diamond: Obtained 71.5% success rate, topping the list on complex question answering.
4.Writing and Question-Answering
AlpacaEval 2.0: Accrued 87.6% win, indicating sophisticated ability to comprehend and answer questions.
Use Cases of DeepSeek-R1
The multifaceted use of DeepSeek-R1 in the different sectors and fields includes: 1. Education and Tutoring With the ability of DeepSeek-R1 to solve problems with great reasoning skills, it can be utilized for educational sites and tutoring software. DeepSeek-R1 will assist the students in solving tough mathematical and logical problems for a better learning process. 2. Software Development Its strong performance in coding benchmarks makes the model a robust code generation assistant in debugging and optimization tasks. It can save time for developers while maximizing productivity. 3. Research and Academia DeepSeek-R1 shines in long-context understanding and question answering. The model will prove to be helpful for researchers and academics for analysis, testing of hypotheses, and literature review. 4.Model Development DeepSeek-R1 helps to generate high-quality reasoning data that helps in developing the smaller distilled models. The distilled models have more advanced reasoning capabilities but are less computationally intensive, thereby creating opportunities for smaller organizations with more limited resources.
Revolutionary Training Pipeline
DeepSeek, one of the innovations of this structured and efficient training pipeline, includes the following: 1.Two RL Stages These stages are focused on improved reasoning patterns and aligning the model’s outputs with human preferences. 2. Two SFT Stages These are the basic reasoning and non-reasoning capabilities. The model is so versatile and well-rounded.
This approach makes DeepSeek-R1 outperform existing models, especially in reason-based tasks, while still being cost-effective.
Open Source: Democratizing AI
As a commitment to collaboration and transparency, DeepSeek has made DeepSeek-R1 open source. Researchers and developers can thus look at, modify, or deploy the model for their needs. Moreover, the APIs help make it easier for the incorporation into any application.
Why DeepSeek-R1 is a Game-Changer
DeepSeek-R1 is more than just an AI model; it’s a step forward in the development of AI reasoning. It offers performance, cost-effectiveness, and scalability to change the world and democratize access to advanced AI tools. As a coding assistant for developers, a reliable tutoring tool for educators, or a powerful analytical tool for researchers, DeepSeek-R1 is for everyone. DeepSeek-R1, with its pioneering approach and remarkable results, has set a new standard for AI innovation in the pursuit of a more intelligent and accessible future.
3 notes
·
View notes