world design – Castlevania development process after mechanics are written

So I’ve been working on a game idea for the last several months. I’m a professional programmer so reworking my physics/game controller/mechanics from this jam demo went rather smoothly. It’s a Metroidvania game where you play as this little goblin. The issue is after writing the movement mechanics I have no idea how to start the actual development. Should I work on the overall story? It feels hard to start designing environments for an interconnected, large world but I need to start somewhere. I have lots of ideas, but no foothold. Any advice?

How do I construct a terminal process that displays lines as they are added to a log file?

I’m needed to monitor a log file while I’m doing some debugging. The script I’m debugging writes to the terminal (STDIO) so having debugging info mixed in with that is annoying and I miss things.

What I would like to do is write my debugging info to a log file, simply appending each entry, and have a separate terminal window that is monitoring that file and displaying each entry as it is added.

Could I do something like:

echo << "=-EOF-="

where that somehow reads from the file and echoes each line until it encounters the magic termination string?

I have a feeling that this is possible, but I don’t really know where to begin.

Any suggestions?


I’m on 10.14 Mojave, so I’m using Bash

In a Data Flow Diagram, can 2 entities use the same process (with the same incoming data flow)?

For a school project, I need to make a DFD for an educational game, where both students and teachers need to be able to view the game’s leaderboard.

Currently in my diagram, “Student” and “Teacher” are seperate external entities, “View leaderboard” is a process, and the leaderboard data is stored in a data store called “Leaderboard”.

To represent this, can I use the same process for both entities:
enter image description here

or must I create separate processes for each entity like this:
enter image description here

PostgreSQL 11 – Tuning of the background writer process (maxwritten_clean)

I notice that the metric maxwritten_clean in the table pg_stat_bgwriter increases (for example going from 0 to 1000 in several seconds). I guess this is understandable as it happens while there are some spikes of writes in the database. According to the documentation, this behavior is driven by the parameter bgwriter_lru_maxpages but I can’t find any recommendations/best practices on how to set this parameter.

Therefore, I’ve several questions:

  1. Is it bad to see this counter increasing?
  2. Do you have any ratio to share to have some kind of alerting on it?
  3. Is it a good idea to update the parameter bgwriter_lru_maxpages in order to reduce the number of occurrences of maxwritten_clean?

Thanks a lot for your help,

netstat – Nginx worker process CPU utilization reaching 100% due to hung TCP connection in ESTAB state

Nginx Ver: 1.15.2

I am facing issue where i am not able to find the cause of Nginx CPU utilization to 100% for almost all of the 8 cores of the system.

From netstat i can see lots of hung TCP connections as below and RECQ queue is too much

tcp 1422 0 ESTABLISHED
tcp 1420 0 ESTABLISHED
tcp 1454 0 ESTABLISHED
tcp 1422 0 ESTABLISHED
tcp 1422 0 ESTABLISHED

8 – How to know if a batch process is still running?

I have a form with 5 buttons and each button run a different batch, some batch processes take several minutes. I want to block the button if the batch processes is already running, because other user admin can access to the same form and try to run the batch that is already running at this moment for other user.

How can i know what batch processes is running? i try using batch_get(); but every time this function return an empty array.

composer – What is the proper process to customize htaccess files?

Depending on level of customization, there are two strategies you could employ.

  • Patch drupal/core with a modified htaccess file including your customization.
  • Override the htaccess file via scaffolding.

If you choose the first option here is a really easy way to do it.

  1. Checkout the version of Drupal you are using to a folder.
  2. Adjust the htaccess file in assets/scaffold.
  3. Run git diff > htaccess.patch.
  4. Go back to your project and create a patches folder, place the new file inside.
  5. Add the following to composer.json extra section (make sure you have installed cweagans/composer-patches):
"patches": {
  "drupal/core": {
    "Add redirects": "patches/htaccess.patch"

If you choose option two:

  1. Create an assets/scaffold folder(s) in your project.
  2. Copy the htaccess file inside of it.
  3. Make your adjustments to the file.
  4. Add the following to composer.json extra section:
"drupal-scaffold": {
  "locations": {
    "web-root": "web/"
  "file-mapping": {
    "(web-root)/.htaccess": "assets/scaffold/.htaccess"

development process – Having software release pages without github

I want to introduce my company to the concept of release pages.
To be clear, for me, a release must includes

  • The released binaries (zip file)
  • A release note
  • A link to a git versioning tag
  • A list of fixes and features added

If it sounds familiar, it’s probably because I’m describing Github releases.
Here’s a good example from the famous ripgrep project.

The problem is, we are using bitbucket, which lacks this functionality.

What are you using to create clear and useful releases? Is there a standalone alternative?

linux – Unable to detach PCI device from running virtual machine (“Device is already in the process of unplug”)

I’m forwarding a host USB hub using this virsh config:

<hostdev mode='subsystem' type='pci' managed='yes'>
    <address domain='0x0000' bus='0x13' slot='0x00' function='0x3'/>
  <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>

This works perfectly. However, I want to be able to hot attach/detach this USB hub from the VM at any time. In theory this should work:

$ virsh detach-device my-vm-name pci-root-usb-hub.xml
Device detached successfully

Ok, looks promising, however the PCI device hasn’t actually been detached. I can still see my webcam and move my mouse around inside the VM. If I run the command again:

$ virsh detach-device my-vm-name pci-root-usb-hub.xml
error: Failed to detach device from pci-root-usb-hub.xml
error: internal error: unable to execute QEMU command 'device_del': Device hostdev2 is already in the process of unplug

And it seems to be frozen there. I’m unable to actually detach the PCI device from the VM without shutting the VM down.

I’m unable to find any errors in libvirtd.log or qemu/my-vm-name.log. Is there an obvious reason why this is not working?

  • Host OS: Arch Linux (kernel 5.13.12)
  • Guest OS: Windows 10

python – I want to automate the manual process of extracting data from PDF to excel

I have hundreds of PDFs and all of them have exact same format (mostly tabular). I have an excelsheet where I pick values from tables (PDF) and paste them to specific location in excel (also in table) to analyse the data. I have been through hell : powershell, itextsharp, acrobat forms, export data etc etc but so far I have been unlucky. Is there anyway I can automate this manual process of picking data from PDF and putting them into excel. Again all PDFs are of exact same format (only value differs).