uml – Which approach is better suited for analyzing a basic manual ongoing system? Structured Analysis or Object Oriented Analysis?

You want to produce a high-level description of the roles & their responsibilities, which interact by providing and consuming (mostly information) with each other to accomplish work of the business.  I don’t think you need to follow a formal methodology for that, but if I had to choose between those two, I’d pick SA since it focuses more on components, their kinds, and flow; I don’t think you’ll need to detail classes and encapsulation for this initial analysis.  There are many others, such as DDD, but again, I don’t think you need this level of formalism to get started, and further, there is a layer of analysis above what DDD addresses that will be helpful, namely, the role & responsibility-based description of how the business accomplishes work.

Such an analysis would describe who accepts/approves orders, who maintains orders, who processes orders, maintains customer records, supplier contracts, etc.. Along with what information flows between these roles to accomplish work of the business.

What are some good SQL Server Performance Metrics from System Views?

From memory perspective I guess

Should be memory reservation, ballooning and swapping

From CPU perspective I think CPU ready time

There are some additional in terms of storage like disk latencies and usage.

Also it would be great to monitor host as well in addition to guest machines.

I do not recall but Jonathan from sqlskills or sqlperformance blogs has some of these listed as well

domain name system – Why don’t I get the TXT records I was expecting?

I’m using Google Domains to manage DNS of a domain I own. In Google Domains, I’ve configured a TXT record _acme-challenge with a specific value. I was expecting to see this value when doing:

dig -t TXT

but instead I get:

; <<>> DiG 9.11.3-... <<>> -t TXT
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19716
;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; WARNING: recursion requested but not available

; EDNS: version: 0, flags:; udp: 512
;         IN  TXT

;; AUTHORITY SECTION:      300 IN  SOA 20 21600 3600 259200 300

;; Query time: 16 msec
;; WHEN: Thu Aug 06 22:12:23 CEST 2020
;; MSG SIZE  rcvd: 132

Why don’t I see the TXT record? What am I doing wrong?

API / System Design [Flexible Authentication / Authorization]?


We’re a smaller shop that puts out a number of products that require
authentication and authorization. We’re currently using a 3rd party
service to “spin up new auth APIs” for each application. However, I
would like to investigate potential designs for doing this ourselves
in-house due to additional security requirements that may be needed in
the future. I’ve included information below and would appreciate any
design or support as I’m relatively fresh with designs of this scale.

Summary of goals:

An interface that allows a developer to create and manage
authentication APIs for multiple applications via a webpage. This
includes the mostly automated process of spinning up new auth APIs,
and ideally the ability to do some form of RBAC / ABAC changes via
this page.

Acceptable ‘Limitations’:

  1. All APIs can expose the same common-auth endpoints, so they’re basically just “Images” of one another. (I.e. Login / Register / etc.)

  2. While this would ideally be entirely automated, some parts I’ve thought of being manual are:
    * Domain configuration (pointing subdomains to new endpoints)
    * Spinning up additional VMs (needed?)
    * Spinning up additional DBs or tables?
    * Minor configuration changes
    * others I haven’t thought of?

User Stories:

  • As a Developer, I want to login to a web portal so that I can manage auth APIs.
  • As a Developer, I want to create a new API in the web UI, so that I can then integrate it to new applications.
  • As a Developer, I want to manage users in the web UI, so I can oversee access to our applications.
  • As a Developer, I want to **…

Future Considerations:

Each new API for the applications should likely have the user stores
(table containing user information) segregated into different
databases stored on separate hardware to minimize attack vectors and
improve security/scaling. For now, I’m thinking of different
subdomains or maybe request parameters to separate the APIs?


I feel like there may be some solution that involves building a
template/image of an Auth API on Azure and just duplicating the VM or
image, but I’m not too sure of this route either. Obviously
management, maintenance, updates, etc. to these would be more
hands-on, but feel free to provide feedback on this as well.

Thanks in advance!

beginner – PowerShell Script to Harvest System Inventory

I’ve written a ‘fast & dirty’ PowerShell script to harvest a system inventory of Windows client andor server operating systems to streamline case note documentation.

$NewLine = "`n"
$FileName = Join-Path $Env:USERPROFILE 'DesktopSystem Inventory.txt'

# Current Date

$TimeStamp = Get-Date -Format F 
$SystemInventory = "# Current Date", $NewLine, $TimeStamp, $NewLine

# Detailed System Information

$OS = systeminfo.exe
$SystemInventory = $SystemInventory + "# Operating System", $OS, $NewLine

# PowerShell 

$PoSh = $PSVersionTable.PSVersion 
$SystemInventory = $SystemInventory + "# PowerShell", $PoSh, $NewLine 

# .Net Framework

function Get-NetFramework {

    $Lookup = @{
        378389 = (version)'4.5'
        378675 = (version)'4.5.1'
        378758 = (version)'4.5.1'
        379893 = (version)'4.5.2'
        393295 = (version)'4.6'
        393297 = (version)'4.6'
        394254 = (version)'4.6.1'
        394271 = (version)'4.6.1'
        394802 = (version)'4.6.2'
        394806 = (version)'4.6.2'
        460798 = (version)'4.7'
        460805 = (version)'4.7'
        461308 = (version)'4.7.1'
        461310 = (version)'4.7.1'
        461808 = (version)'4.7.2'
        461814 = (version)'4.7.2'
        528040 = (version)'4.8'
Get-ChildItem 'HKLM:SOFTWAREMicrosoftNET Framework SetupNDP' -Recurse | `
        Get-ItemProperty -Name Version, Release -EA 0 | Where-Object { $_.PSChildName -eq "Full" } | `
            Select-Object @{ Name = ".NET Framework"; expression = { $_.PSChildName } }, Version, Release
$NetFrmWrk = Get-NetFramework | Format-Table -AutoSize
$SystemInventory = $SystemInventory + "# .Net Framework", $NetFrmWrk 

# Storage Capacity

function Get-FreeSpace {
    Get-WmiObject Win32_LogicalDisk -Filter "DriveType=3" -Computer . |
        Select-Object SystemName, DeviceID, VolumeName,
        @{ Name = "Total Size (GB)"; expression = { "{0:N1}" -f ($_.Size / 1GB) } },
        @{ Name = "Free Space (GB)"; expression = { "{0:N1}" -f ($_.Freespace / 1GB) } },
        @{ Name = "Free Space %"; expression = { "{0:N1}" -f (($_.Freespace / $_.Size) * 100) } } | Format-Table -AutoSize
$Storage = Get-FreeSpace 
$SystemInventory = $SystemInventory + "# Storage", $Storage

# WindowsUpdateHistory 
$Session = (activator)::CreateInstance((type)::GetTypeFromProgID('Microsoft.Update.Session'))
$Search = $Session.CreateUpdateSearcher()
$Count = $Search.GetTotalHistoryCount()
$Patch = $Search.QueryHistory(0, $Count)
$Updates = @()
foreach ($Update in $Patch) {
    if ($Update.Operation -eq 1 -and $Update.ResultCode -eq 2 -and $Update.Title -notlike '*KB2267602*'-and $Update.Title -notlike '*KB4052623*') {
        $Updates += New-Object -Type PSObject -Property @{            
            'KB'          = (regex)::match($Update.Title, 'KB(d+)')
            'Date'        = $Update.Date
            'Title'       = $Update.Title
            'Description' = $Update.Description
$UpdateHistory = $Updates | Sort-Object Date -Descending | Format-Table KB, Date, Title -AutoSize 
$SystemInventory = $SystemInventory + "# Updates & Hotfixes", $UpdateHistory
# Roles & Features

$CimOsInfo = Get-CimInstance -ClassName Win32_OperatingSystem
$CimSysType = $CimOsInfo.ProductType

if ($CimSysType -eq 1) {
    Function ClientFeatures {
        Get-WindowsOptionalFeature -Online | Where-Object State -EQ 'Enabled' | Select-Object FeatureName | Sort-Object FeatureName
$ClientFeatures = ClientFeatures
$SystemInventory = $SystemInventory + "# Roles & Features - Windows Client Platform", $ClientFeatures
else { 
    Function ServerFeatures {
        Get-WindowsFeature | Where-Object Installed | Format-Table -Autosize -Wrap
$ServerFeatures = ServerFeatures
$SystemInventory = $SystemInventory + "# Roles & Features - Windows Server Platform", $ServerFeatures    

# Save & Display Results

Write-Host "Hard copy saved as" $FileName; Write-Host
$SystemInventory | Out-File -FilePath $FileName -Encoding ascii
Get-Content -Path $FileName
Write-Host "Hard copy saved as" $FileName; Write-Host

The results when run against my current system: System Inventory – Results.

I have tested and validated this code’s performance against remote systems within an active directory environment a few months back but have made several changes since then. As things stand right now, I currently do not have the resources to validate my code’s performance against systems within an Active Directory environment. Real basic, I ran my script using the following sequence:

  1. Launch PowerShell (Admin)
  2. & ‘.System Inventory.ps1’ <remote system
    name, e.g. AUPP-DC01>

Would very much appreciate the community’s thoughts relative to this routine’s performance and overall utility.

Thank you so much!

neural networks – In a machine learning system, why use differentially private SGD if our input data is already perturbed by a DP mechanism?

I’m trying to implement my own version of a deep neural network with differential privacy to preserve the privacy of the parties involved in the training dataset.

I’m using the method by Abadi et al. proposed in their seminal paper Deep Learning with Differential Privacy as the basis of my implementation. Now I have trouble understanding one thing in this paper. In their method, they propose a differentially private SGD optimisation function and they use an accountant to keep their privacy budget expenditure during each iteration. All of this makes sense: every time you query the data, you need to add controlled noise to it to mitigate the risk of leakage. But before they begin the training process, they add a differentially private PCA layer and filter their data through it.

My confusion is about why we do need to have DP-SGD after this (or the other way around, why DP-PCA when we’re already ensuring DP with our DP-SDG method). I mean, based on post-processing principle, if a mechanism is say (epsilon)-DP, any function performed on the output of that mechanism is also (epsilon)-DP. Now since we’re already applying an (epsilon)-differentially private PCA mechanism on our data, why do we need to have the whole DP-SGD process after that? I understand the problem with local DP and why it’s much more efficient to do global DP on the model instead of the training data, but I’m wondering if we’re already applying DP during the training phase, is it really necessary for the PCA to be DP as well or could we have just used normal DP or another dimensionality reduction method?

c – What is the name of this kind of (intra-process, inter-thread, queue-based) event system?


Espressif’s embedded development libraries for the ESP32 microcontroller contain an event system based on FreeRTOS.

The event system handles connectivity, interrupts and other IO activity, but it’s also extensible by the user. It’s the latter part I’m interested in.

How is this extensible architectural pattern named?

How is this extendible event management architectural pattern named, in which the set of events can be extended, incorporated into my own API, and handled by the existing event loop (and its thread/task handling, integration, etc.)?

More details

With the current architectural design of that library, I can for example declare a new “class” of events and use them as part of my own code’s APIs. In other code I can register event handlers and asynchronously receive these events, along with a payload of relevant data. My own code can then post events eg. on state changes, interrupts, or IO activity.

It is extremely simple in its interface eg. to declare a set of events for users of my library to listen for:


typedef enum {
} mylib_event_t;

To listen for events:


To post events:

  args, size_of_args,
  /* maybe timeout, priority, etc. */

The most useful thing for me by far is being able to extend the set of events, incorporate them into my own API, and let the existing event loop (and its thread/task handling, integration, etc.) handle it all. I’m not as concerned with the IO side of things, what I really want the events for is interaction between libraries within a single process.

Why I need the terminology?

Espressif’s library is written for the ESP32 using FreeRTOS. I would like to have a similar library for POSIX systems (still in C). I could roll my own with threads and synchronisation primitives, but using an established library is always preferable.

The problem is, I don’t know what that is typically called, so I have no idea what to look for:

  • Searching for “event loop” or “event library” brings me to eg. libevent, libev, libuv. These do the event-based IO side of things, but aren’t designed to be extended.

  • Searching for “library” + any of: “message passing”, “message queue”, “publish subscriber or “pubsub” etc. brings me to eg. zeromq, nng (ex. nanomsg). Again, these handle the IO but aren’t easy to extend. Where message serialisation APIs are provided they is nowhere near as simple and transparent as the above.

Knowing the commonly accepted name of that kind of architecture would help me finding existing libraries, or advices to develop my own.

8 – How to send system mails in html format (with Swift Mailer)?

At Account settings page (/admin/config/people/accounts) I can edit system mails Drupal is sending (Welcome, Account activated, Account blocked and so on).

I also installed and configured Swift Mailer module. At Message settings page (admin/config/swiftmailer/messages) I selected HTML for message format.

Then I edit some message template and enter html content there like:

<!DOCTYPE html>
    <title>Your account at (site:name) has been activated.</title>

Your account at (site:name) has been activated.

You may now log in by clicking this link or copying and pasting it into your browser:


This link can only be used once to log in and will lead you to a page where you can set your password.

After setting your password, you will be able to log in at (site:login-url) in the future using:

username: (user:account-name)
password: Your password

--  (site:name) team

However in mail I receive I still got Content-Type: text/plain; and I see it as plain text.

At that Swift Mail Message settings page it says:

“You can set the default message format which should be applied to e-mail messages.”

But I don’t see that option anywhere? How to change this default message format (to “text/html”)?

(Root) Is there any way we can block internet accessfrom a specific app, not a whole system firewall or VPN that always run in the background?

Is there any way that can block also foreground internet access permanently?
Not a VPN or similar that affects the whole connection and keep running the background.

information – Different styles for tooltip and infotips in the same system?

I have a question about using different styles for tooltips in the same system. We’re creating a new platform so the styles are not all the way defined, talking to the front end developer he insists all the tooltips should have the same style (So they all need to have same colors and same text structure).

I on the other side think that Label tooltips (so the ones that specify only the label for an icon) should have a different style than the Informational Tooltips that have more documentation to educate the user, since both of them play a different role on the experience and therefore the user interacts different with it.

But at the same I’m divided, there are many platforms that use different styles (Stackexchange i.e.) but there are many other that don’t (slack i.e.)

what do you guys think?enter image description here