Implementing design sprint on a scrum methodology

We’re a startup company. I and my team are planning to implement a design sprint during a sprint cycle. But we have changed some minimal aspect of GVs Design sprint and make our own style. Since that we have all user stories ready. Our approach would be:

enter image description here

We create this process to oversee the potential problems in early-stage and generate solutions from time to time. To achieve users goals effectively

Note:

  • We already started creating User Story Mapping and we have Use stories ready

I will really appreciate your feedback or comments about this. I’m very open to gain new knowledge in this industry since I’m new with UX design.

Thanks!

Implementing DNS over TLS on 18.04

I am not very familiar with Linux, as I have predominantly been involved with everything Microsoft for the majority of my IT life, but I am just looking at the possibility of implementing a pair of Ubuntu DNS Servers that will perform external lookups using Cloudflare’s DNS over TLS.

I have read some articles saying that you can use:

  • Stubby
  • Bind9 with stunnel
  • nginx as a TLS proxy

However, I am not sure of the best and easiest method and just wondered if anyone had an opinion on what I should be using and if there is any documentation on how to setup and configure.

Implementing N-tier with Entity framework and repo pattern

I’m trying to clean up this code but can’t figure out the best way to go about it.

The UI will access the business layer and shouldn’t know about EFContext in doing this I end up with an almost exact copy of the EFContext class in my RepoBase class. If I need a entity specific method, I’m creating a entity specific repo and deriving from the RepoBase

MS examples seem to skip the RepoBase and just implement each CRUD method in each and every entity, this seems like even more code duplication.

RepoBase does provide separation but at the cost of duplication. I would like to know if there’s a better way.

Data Access Layer

public interface IDataContext {     T GetById<T>(int id);     void Delete<T>(T entity); }  public class EFContext : DbContext, IDataContext {     public virtual DbSet<Student> Student { get; set; }      public T GetById<T>(int id)     {         ...     }      public void Delete<T>(T entity)     {         ...     }  } 

Business Logic Layer

// Generic repo public class RepoBase {     private IDataContext _context;      public RepoBase(IDataContext context)     {         _context = context;     }      public T GetById<T>(int id)     {         return _context.GetById<T>(id);     } }  // Specific repo public class StudentRepo : RepoBase {     public Student GetByStudentId(int studentId)     {         ...     } } 

Implementing a better algorithm for calculation of bacterial growth

I am working on a mathematical model that describes the growth of 4 different bacterial populations and immune system cells under certain conditions. The model is governed by the equations below.

POPULATION 1:

$ {\underbrace{\frac{dN_{PS}}{dt}}_{\text{ Population change rate }}=\underbrace{r N_{PS}}_{\text{ Exponential growth }}\cdot\underbrace{\left(1-\frac{N_{PS}+N_{PR}}{K}\right)}_{\text{ Growth limitation }}-\underbrace{\theta_{PS}N_{PS}}_{\text{ Natural death }}-\underbrace{A_{PS}N_{PS}}_{\text{Biofilm formation}}+\underbrace{D_{BS}N_{BS}}_{\text{Biofilm dispersion}}-\underbrace{\phi_{PS}N_{PS}}_{\text{Mutation rate}}-\underbrace{\eta\delta_{PS}A_{m}N_{PS}}_{\text{Antibiotic inhibition}}-\left\{ \underbrace{\Gamma N_{PS}I}_{\text{Immune system}}\right\} }$

POPULATION 2:

$ {\frac{dN_{BS}}{dt}=(r-c_{b})N_{BS}\cdot\left(1-\frac{N_{BS}+N_{BR}}{K}\right)-\theta_{BS}N_{BS}+A_{PS}N_{PS}-D_{BS}N_{BS}-\phi_{BS}N_{BS}-\eta\delta_{BS}A_{m}N_{BS}-\left\{ \Gamma N_{BS}I\right\} }$

POPULATION 3:

$ {\frac{dN_{PR}}{dt}=(r-c_{r})N_{PR}\cdot\left(1-\frac{N_{PS}+N_{PR}}{K}\right)-\theta_{PR}N_{PR}-A_{PR}N_{PR}+D_{BR}N_{BR}+\phi_{PS}N_{PS}-\eta\delta_{PR}A_{m}N_{PR}-\left\{ \Gamma N_{PR}I\right\} }$

POPULATION 4:

$ {\frac{dN_{BR}}{dt}=(r-(c_{b}+c_{r}))N_{BR}\cdot\left(1-\frac{N_{BS}+N_{BR}}{K}\right)-\theta_{BR}N_{BR}+A_{PR}N_{PR}-D_{BR}N_{BR}+\phi_{BS}N_{BS}-\eta\delta_{BR}A_{m}N_{BR}-\left\{ \Gamma N_{BR}I\right\} }$

NAIVE CELLS (IMMUNE SYSTEM):

$ {\frac{dV}{dt}=\frac{-\sigma VB}{\pi+B}}$

EFFECTOR CELLS (IMMUNE SYSTEM):

$ {{\frac{dE}{dt}=(2\sigma V+\sigma E)\cdot\frac{B}{\pi+B}-hE\left(1-\frac{B}{\pi+B}\right)}}$

MEMORY CELLS (IMMUNE SYSTEM):

$ {{\frac{dM}{dt}=fEh\left(1-\frac{B}{\pi+B}\right)}}$

TOTAL BACTERIAL DENSITY:

$ {\frac{dB}{dt}=N_{PS}+N_{PR}+N_{BS}+N_{BR}}$

IMMUNE SYSTEM DENSITY:

$ {\frac{dI}{dt}=V+E+M}$

ANTIBIOTIC UPTAKE 1:

$ {{\eta}=\begin{cases} 1 & t_{1}\leq t\leq t_{1}+t_{2}\ 0 & t_{1}>t\:or\:t>t_{1}+t_{2} \end{cases}}$

ANTIBIOTIC UPTAKE 2:

$ {{\eta}=\begin{cases} 1 & B\geq\varOmega\ 0 & B<\varOmega \end{cases}}$

I am interested in how $ N_{PS}, N_{PR}, N_{BS}, N_{BR}, V, E, M $ change over time for which I implemented an algorithm in Python to solve the equations. Greek letters and other undescribed parameters (e.g. r, K, etc.) are mainly constants that are set at the beginning of the execution of the program.

One example of the functions used is shown below. Currently as you can also see from the code I’m using an Euler method to solve the equations, however I’d like to implement at least Heun’s method or even some higher order Runge-Kutta method to solve them.

I’m stuck already with Heun’s method and don’t know how to implement it. I ask for help with how to modify the following code and change it to for example Heun’s if that’s even possible with those equations.

def sensitive_bacteria_PS(previous_density, growth_rate, density_PR, maximum_density_P, death_rate_PS, attachment_rate_PS, mutation_rate_PS, antibiotic_uptake, antibiotic_inhibition_PS, antibiotic_concentration, lymphocyte_inhibition, total_immune_cells, detachment_rate_BS, density_BS, time_step):      return previous_density + ((previous_density * (growth_rate * (1 - (previous_density + density_PR) / maximum_density_P) - death_rate_PS - attachment_rate_PS - mutation_rate_PS - antibiotic_uptake * antibiotic_inhibition_PS * antibiotic_concentration - lymphocyte_inhibition * total_immune_cells) + detachment_rate_BS * density_BS) * time_step) 

Practices for implementing multiple visual themes/styles

I’m wondering how you would go about implementing multiple, chooseable and configurable visual themes in a project.

In my case I would be trying it in a WPF application, but my question is more general.

I was thinking, every used color will be loaded from a .json or .xaml, grouped by the theme. The user would have the option to choose from two or three predefinied themes. The user also has the option to create a copy of an exisiting theme, and edit the colors.

Are these saved individually? Are they loaded whenever the program start? Will these colors be updating live or just when they get changed? What about image instead of colors? Would I still use a .json/.xaml and just specify the URL? Do I need somekind of parser(?) in my sourcecode to read these files? Are there Nuget packages which are made for this kind of task (I did not find any)?

Trouble implementing lazy loaded feature module Angular 8

So basically I am trying to create a lazy loaded feature module in my application I have been following the official angular docs – but for some reason its not working.

I have set up my feature module DashboardModule as shown below

import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common';  // MODULES import { DashboardRoutingModule } from './dashboard-routing.module';  // COMPONENTS import { DashboardComponent } from './dashboard/dashboard.component'; import { DashboardAlertComponent } from './dashboard-alert/dashboard-alert.component'; import { DashboardSummaryComponent } from './dashboard-summary/dashboard-summary.component'; import { DashboardTasksComponent } from './dashboard-tasks/dashboard-tasks.component'; import { HoldingPageComponent } from './holding-page/holding-page.component';  @NgModule({     imports: [CommonModule, DashboardRoutingModule],     declarations: [         DashboardComponent,         DashboardAlertComponent,         DashboardSummaryComponent,         DashboardTasksComponent,         HoldingPageComponent,     ] }) export class DashboardModule {} 

then in my DashboardRoutingModule

import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router';  import { ActivityComponent } from '../activity-components/activity/activity.component'; import { IsLockedRouteGuard } from '@app/shared/common/auth/is-locked-route-guard'; import { DashboardSummaryComponent } from './dashboard-summary/dashboard-summary.component'; import { SyncComponent } from '@app/popup-components/sync/sync.component'; import { DashboardAlertComponent } from './dashboard-alert/dashboard-alert.component'; import { ChartContainerComponent } from '../chart-components/chart-container/chart-container.component'; import { DashboardTasksComponent } from './dashboard-tasks/dashboard-tasks.component';   @NgModule({     imports: [         RouterModule.forChild([             { path: 'activity', component: ActivityComponent, canActivate: [IsLockedRouteGuard] },             { path: 'snapshot', component: DashboardSummaryComponent },             { path: 'sync', component: SyncComponent },             {                 path: 'alerts',                 component: DashboardAlertComponent,                 canActivate: [IsLockedRouteGuard]             },             { path: 'charts', component: ChartContainerComponent, canActivate: [IsLockedRouteGuard] },             { path: 'tasks/:sort', component: DashboardTasksComponent, canActivate: [IsLockedRouteGuard] },         ])     ],     exports: [RouterModule] }) export class DashboardRoutingModule {}  

so as per the angular docs this has been set up correctly..

now in my AppRoutingModule

import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { AppComponent } from './app.component'; import { AppRouteGuard } from './shared/common/auth/auth-route-guard';  @NgModule({     imports: [         RouterModule.forChild([             {                 path: 'app',                 component: AppComponent,                 children: [                     {                         path: '',                         children: [{ path: '', redirectTo: '/dashboard/alerts', pathMatch: 'full' }]                     },                     {                         path: 'main',                         canActivate: [AppRouteGuard],                         loadChildren: () => import('./main/main.module').then(m => m.MainModule),                         data: { preload: true }                     },                     {                         path: 'dashboard',                         loadChildren: () => import('./main/dashboard/dashboard.module').then(m => m.DashboardModule)                     },                 ]             }         ])     ],     exports: [RouterModule] }) export class AppRoutingModule {} 

but whats happening is when I try and go to /dashboard.. I get this error

Component HoldingPageComponent is not part of any NgModule or the module has not been imported into your module.

but I am clearly importing it in the DashboardModule as shown above.. what am I doing wrong??

Thanks

Implementing PLC “Timer Pulse” function block in C++

I have been implementing a library of the PLC function blocks. One of the function blocks is the “Timer Pulse” function block which behavior is following: enter image description here

I have implemented this function block in this manner

Tpulse.h:

#include <stdint.h> #include "LogicBlk.h"  namespace LogicBlocks {  // Timer Pulse i.e. logic one at the output for specified time as soon as 0->1 at the input class Tpulse : public LogicBlk{ public:     Tpulse(uint32_t*, uint32_t, uint32_t, uint32_t);     virtual ~Tpulse();      void Update(void);  private:      uint32_t *m_BitsArray;     uint32_t m_Input;     uint32_t m_Output;     uint32_t m_PulseTime;     uint32_t m_StartTime;     uint32_t m_ElapsedTime;     uint32_t m_CurrentTime;  };  } 

Tpulse.cpp:

LogicBlocks::Tpulse::Tpulse(uint32_t *bitsArray, uint32_t input, uint32_t output, uint32_t pulseTime):                             m_BitsArray{bitsArray}, m_Input{input}, m_Output{output}, m_PulseTime{pulseTime}{                                 m_StartTime     = 0;                                 m_ElapsedTime   = 0;                                 m_CurrentTime   = 0; }  LogicBlocks::Tpulse::~Tpulse(){ }  void LogicBlocks::Tpulse::Update(void){      if(Utils::TestBitSet(m_BitsArray, m_Input) && Utils::TestBitClr(m_BitsArray, m_Output) && !m_ElapsedTime){          m_StartTime = GetTick();         SetBit(m_BitsArray, m_Output);      }else if(Utils::TestBitSet(m_BitsArray, m_Output)){          m_CurrentTime = GetTick();         m_ElapsedTime = m_CurrentTime - m_StartTime;          if(m_ElapsedTime >= m_PulseTime){              ClrBit(m_BitsArray, m_Output);             if(TestBitClr(m_BitsArray, m_Input)){                  m_ElapsedTime = 0;             }         }      }else if(TestBitClr(m_BitsArray, m_Input) && TestBitClr(m_BitsArray, m_Output)){          m_ElapsedTime = 0;      }  } 

LogicBlk.h

namespace LogicBlocks {  class LogicBlk { public:      virtual void Update(void) = 0;  private:  };  } 

Based on the tests which I have already done it seems to me that it works fine but I am not sure. Please can anybody assess my code from functional and programming style point of view? Thank you in advance for any suggestions.

A tiny library implementing the Elm Architecture in C++

elm-architecture-cpp github link

Elm is a pure functional language for the front-end. It enforces an architecture that allows programs to stay pure in an event-based setting.

This simple header-only library implements a variant of the the Elm Architecture for C++17, its small footprint and simplicity makes it easy to understand and its quick to get started.

Features

The architecture supports running commands in parallel as asynchronous tasks, aswell as in a immediate fashion.

Example Program

This example utilizes both direct and deferred action modes. It initializes by immediately increasing a conuter, then it manipulates the counter at a later time by deferring commands for later execution. To demonstrate the asynchronicity of the library the user can also enter a number in order to increase or decrease the counter.

#include "elm-architecture/elm-architecture.hpp"  #include <iostream>  namespace elm = elm_architecture;  // Model  struct model_type {     int counter = 0; };  // Msg  struct increase {};  struct decrease {};  struct user_increase {     int value; };  using message_type = std::variant<increase, decrease, user_increase>;  std::shared_future<message_type> delayed_increase(std::chrono::milliseconds delay) {     return std::async(                std::launch::async,                [delay]( ) -> message_type {                    std::this_thread::sleep_for(delay);                    return increase {};                })         .share( ); }  std::shared_future<message_type> delayed_decrease(std::chrono::milliseconds delay) {     return std::async(                std::launch::async,                [delay]( ) -> message_type {                    std::this_thread::sleep_for(delay);                    return decrease {};                })         .share( ); }  std::shared_future<message_type> ask_user( ) {     return std::async(                std::launch::async,                []( ) -> message_type {                    int amount = 0;                    std::cin >> amount;                    return user_increase {amount};                })         .share( ); }  // Update  struct update_fn {     using return_type = elm::return_type<model_type, message_type>;      static auto     update(const model_type& mod, const increase&) -> return_type {         auto next = mod;         next.counter += 1;         std::cout << "Increasing counter from " << mod.counter << " to " << next.counter << std::endl;         return {next, {}};     }      static auto     update(const model_type& mod, const decrease&) -> return_type {         auto next = mod;         next.counter -= 1;         std::cout << "Decreasing counter from " << mod.counter << " to " << next.counter << std::endl;         return {next, {}};     }      static auto     update(const model_type& mod, const user_increase& msg) -> return_type {         auto next = mod;         next.counter += msg.value;         std::cout << "User increasing counter from " << mod.counter << " to " << next.counter << std::endl;         return {next, {ask_user( )}};     } };  // Event Loop  int main( ) {     elm::start_eventloop<model_type, message_type, update_fn>({         increase {},         delayed_increase(std::chrono::milliseconds {1500}),         delayed_decrease(std::chrono::milliseconds {1000}),         delayed_increase(std::chrono::milliseconds {400}),         ask_user( ),     }); } 

The library

#pragma once #include <deque> #include <future> #include <variant> #include <vector>  namespace elm_architecture {  // A command can either be a deferred command (shared_future) or // invoked directly. template <typename Model, typename Msg> using command_type = std::variant<std::shared_future<Msg>, Msg>;  // The return type for the update functions, a new model and a // list of actions to take after. template <typename Model, typename Msg> using return_type = std::tuple<Model, std::vector<command_type<Model, Msg>>>;  // Start the eventloop with a given list of initial actions to take template <typename Model, typename Msg, typename Update> auto start_eventloop(const std::vector<command_type<Model, Msg>>& init = {}) {     auto                                 model = Model {};     std::deque<command_type<Model, Msg>> pending{init.begin(), init.end()};     std::vector<std::shared_future<Msg>> in_progress;      while(pending.size( ) > 0 || in_progress.size( ) > 0) {         // Step One: Apply all pending events and remove them         while(pending.size( ) > 0) {             const auto& item = pending.front( );             if(std::holds_alternative<std::shared_future<Msg>>(item)) {                 in_progress.push_back(std::get<std::shared_future<Msg>>(item));             } else {                 const auto& msg             = std::get<Msg>(item);                 const auto  visitor         = [&model](const auto& msg) { return Update::update(model, msg); };                 auto [next_model, commands] = std::visit(visitor, msg);                 std::copy(commands.begin( ), commands.end( ), std::back_inserter(pending));                 model = next_model;             }             pending.pop_front( );         }          // Step Two: Pause the loop, the only way we get more events now is by polling         // until one of the pending events finishes.         {             for(auto future = in_progress.begin( ); future != in_progress.end( ); ++future) {                 if(future->wait_for(std::chrono::milliseconds {1}) == std::future_status::ready) {                     pending.push_back(future->get( ));                     in_progress.erase(future);                     break;                 }             }         }     } } } // namespace elm_architecture