marcelpetrick

Dell Precision 3351: performance spikes on GPU0 for dwm.exe/csrss.exe (win10)

Written by  on October 15, 2020

Starting point: so, I have a brand-new laptop with a fresh Win10 and the apps lag while I move windows around the desktop. Great!

The first recommendations were already checked: Win is up to date; graphics driver for the integrated Intel GPU and for the Nvidia one as well. No, I won’t roll back the system and no, a “clean start” won’t fix this either.
Of course, I was also suspicious if the virusscanner or the dockingstation-three-monitor-setup is the issue. But come one: that are just 6 mio pixel and the hardware is top notch.

Mitigation:
0. open the “Dell Power Manager” and set the “Temperaturverwaltung” to “Optimiert” (before “Ruhig”)
1. configure via the Nvidia that their GPU shall be the preferred one for apps: “Grundprofil” = “Hochleistungs-GPU”; check as well if any app has preset the integrated GPU (change this!)
2. disable automatic scaling of applications: System > Display. Under the scaling drop-down, select the Advanced scaling settings link. Disable “fix blurry ..”
3. change the display settings to Performance: run “sysdm.cpl” and then “Advanced (Erweitert)” > “Performance (Leistung)” and then put everything to performance (radio button) and just enable “smooth font rendering”
4. change the graphic settings to “High Performance” for all “classic” and “universal” apps:
Problem is, that the dwm.exe and the csrss.exe use GPU0 no matter what you configure.

Note:
The idea to disable the integrated Intel GPU via UEFI/BIOS is not possible, because the Nvidia GPU is not a full replacement card, but relies on the iGPU ..

Outlook: prevent that meeting-requests get auto-deleted after processing

Written by  on October 8, 2020

Options > Mail > “Send messages”-block > uncheck “Delete meeting requests and ..”.

For the German version:

simple webscraper for last.fm with BeautifulSoup

Written by  on September 29, 2020

tl;dr:
Simple webscraper with Python and BeautifulSoup for one user’s favorite tracks (‘loved songs’) at last.fm.
Repository: github

full text:
Looks like last.fm is shutting down its services (one feature at at time, lol). They started this process more or less ten years ago.
I’ve realized that I would miss my curated list of favorite tracks and I am also very bad at remembering, so … let’s automate the process of grabbing that information from their public page. I know, they offer a REST API, but I wanted to use once BS4.
Since I had somehow two free hours fourteen days ago, I went full-speed to some tutorials, played with the get-requests and how to parse. And then spent the last minutes parsing the received “artist+track”-string into something usable. Alltogether four hours were spent and I am amazed by the result. Of course, by leveraging three quite powerful libraries (beautifulsoup4, requests, lxml) and skipping TDD (;) I’ve reached the goal quite fast. And since the script works (my 1500 loved songs are scraped in less than 60 seconds), I will also not spend additional effort to make it “pretty”.

“[Full Day Workshop] Kubeflow + BERT + GPU + TensorFlow + Keras + SageMaker”

Written by  on September 27, 2020

I’ve just spent the last eight hours attending a workshop about #SageMaker, #AutoPilot, #BERT, #Athena, #TensorFlow, #Spark, [..] and I am feeling a bit light-headed.
Of course, the talk and guidance given by @AntjeBarth and @ChrisFregly was really well prepared, but if you’re just a ML-beginner (like me) and if then over 9000 of new technologies drop, you have to work hard to follow the fast paced event.
Of course, I started my ML-journey in the summer of 2019, but it was more focussed on image-processing, not #NLP. I worked before with #Python, #Jupyter notebooks, TensorFlow and #Keras, but that whole SageMaker-thing was new to me.
And I see the potential: instead of running the stuff locally, you prepare, prototype and run your ML-app inside Amazon’s infrastructure. And that AutoPilot, which helps to quickstart the prototyping by trying several preprocessing-steps and models for you on your data, looks promising. Will definitely give it a second look.
Notes can be found at: https://github.com/marcelpetrick/KubeFlow_BERT_GPU_TensorFlow_Keras_SageMaker_Workshop (need lots of polishing, as always)

Crazy times we live in! And I am thankful for this block of time on a weekend 🙏

current workplace IV

Written by  on September 26, 2020

* development with C++ 17; Qt 5.12; CMake 3.16; Gradle as build-configurator and extool-packages for external dependencies
* product built for Win (10) and macOS (10.15); one graphical UI and two SDK (C and C#)
* TeamCity for CI; Gerrit (code-review); JIRA, Confluence, Rainbow & Outlook (communication)
* team-size fluctuates: 5 to 11 developers, PO, PM, ScrumMaster, 3 testers
* external stakeholders inside the company; medium company size; global distribution

* development happens in sprints of 4 weeks; DoR (Definition of ready) and DoD (Definition of done) are enforced for tickets; root-cause-analysis is done for bugs; capacity is evaluted before each sprint
* releases are created roundabout four times per year
* additionally to my role as SW-engineer I did the job of the “release responsible” in the last year (documentation preparation, test-management, release-creation, RC-handling)

GammaRay – another debugger for Qt

Written by  on September 24, 2020

Small OpenSource-tool from KDAB which can be used to alter the runtime-state of Qt-based programs. I’ve just used it (so far) with Qt for C++ and wonder if it would work with PyQt as well (TODO).
Changed parameters, layouts, styles, sizes, values are immediately applied and helpful to fine-tune especially layouts. It is some sophisticate debugger. Of course, with gdb you can alter values as well, but this Qt-aware tool offers for certain types (or layouts) just valid entries and ranges!

Code can be found here: https://github.com/KDAB/GammaRay/wiki/Getting-GammaRay
Some more documentation can be found here: https://www.kdab.com/development-resources/qt-tools/gammaray/
———————————————
Quick-start guide:
First of all: the Qt-version of the GammaRay and of the UUT (unit under test; the program) should match. If not, then runtime-issues up to crash are possible 🙂

As said: almost everything can be influenced, so for a limited task, I’ll show how to alter some style of ‘Cullendula’. Let’s set for it nice blue outlines for each widget!

0. start Cullendula
1. start GammaRay (bin/gammaray.exe for Win)
2. attach GammaRay to Cullendula via selecting it [1] and then switching (if not done automatically) to the proper build-version & -type of Qt [2]

———————————————
3. in the next window search for “stylesheet” (best done via the search-box)

———————————————
4. Now insert for styleSheet: “QWidget { border : 2px solid blue}” (without quotation marks!) and confirm with . The changes are applied immediately.

The same workflow can be applied almost everywhere to manipulate other properties .. good luck.
It’s a quite useful tool for layout-debugging. Also the measurement-tool can help to fine-tune margins .. or discuss color-values with stakeholders ..

Qt6: preview is available and usable

Written by  on September 8, 2020

After reading this blog-entry https://www.qt.io/blog/qt-6.0-feature-freeze-milestone-reached I wanted to give it a try and see how much effort it would make to transition from Qt 5 (5.12 or 5.15) to 6.
Hands on-approach: installed Qt6 via the maintenance tool (1 hr and 39 GiByte later ..), took my Cullendula-app and added a new target within QtCreator 4.12.

First clean build with MSVC2019_64bit gave a weird warning about
qtmaind.lib(qtmain_win.cpp.obj) : warning LNK4099: PDB 'WinMain.pdb' was not found with 'qtmaind.lib(qtmain_win.cpp.obj)' or at 'C:\Users\husband-boy\Desktop\coding\Cullendula\debug\WinMain.pdb'; linking object as if no debug info
where I still found no solution. But it works. Not a single line of code had to be changed 🙂 If anyone ever transitioned from 3 to 4 (big ugh), or 4 to 5 (small ugh), you know the pain.

Bravo, I am positively impressed. Nothing worse than stagnation.

PyQt: GroundSpace

Written by  on September 4, 2020

Over the past weeks I’ve worked on a small project to combine the best of the Qt and Python domains. It was time to put both together. I knew about the PyQt- (Riverbank) and PySide- (Qt) bindings for years, but never really dipped my feet into those water. It was time to fix this.

GroundSpace (wordplay) is a small tool to fill your hard-disk (SSD ..) with arbitrary content. To test the speed of writing and to create big chonks of data.

What was learnt?
* creating an ui-file with QtDesigner (jk, I knew this) and how to pre-compile it for PyQt-usage
* loading that uic-file and creating connections
* progress-callback
* how evil the ‘eval()’ function in Python is

Next stop: I want a proper web-scraper in Python.

ISAQB CPSA FL: seminar & exam

Written by  on August 25, 2020

Passed the exam successfully :party: Proof can be found here: https://www.certible.com/de/verify/fc832c0524c8711b8871e1c645944583
I’d like to thank Stephan Christmann for the preparation and my dear wife for the support.

Strive for quality incrementally and iteratively 🙂
#isaqb #cpsa #softwarearchitecture #youliveandlearn

Certible page with the proof.

Some of the profits from this seminar ‘practive acting before an issue would turn into a problem’, ‘strong cohesion, loose coupling’, ‘the biggest leverage for guaranteed quality after software engineering and testing is done properly: requirements engineering and software architecture’.

20200827 – day 4
Long recapitulation of the lecture from yesterday, then the last chapter about support tools and static code analysis. Afterwards some discussion about a real world example from one of the participants.
The early closure left enough time to prepare for the exam (scheduled friday 12:00).
The exam took place online, I had to prepare a totally clean desk, proof by moving the camera that there is no one else in the room and then solved 41 questions within a maximum time limit of 75 minutes.

20200826 – day 3
Sadly, I haven’t written about that day directly afterwards, so the summary will a bit shorter: recap of day 2, then we learnt about metrics and FMEA and risk-evaluation. Then we solved and sicsussed 37 test-questions for the exam. Of course, they were not identical to the official questions. But came quite close 😉

20200825 – day 2
Day started with the homework-questions we had to prepare and some recapitulation. Works well, but I am already a bit overwhelmed of how much is there to learn. The more you see, the more you know, you know nothing. For my whole life I’ve done monoliths on different OS and with different technologies, ok, twice some message-based architecture. But there is so much more. I should definitely get myself more invested in server-architecture, REST and microservices. Today we covered architecture patterns and approaches, how to reduce dependencies, .. and did several exercises. BTW: I’ve forgotten to mention that I take digital notes as Markdown (see github). Again homework and much to learn and read. And my book “Zertifizierung für Software-Architekten” from Starke/Hruschka arrived.

20200824 – day 1
The seminar takes solely place in Zoom, trainer is Stephan Christmann and he does his job quite well. We are just a bunch of four apprentices, which is ok, because then the exercises (and there are some) are not crowded and we can utter questions whenever we like. Of course, the first day is loaded with definitions after some “soft” start into the topic. Looks like a software architect (abbreviated SA later on) needs more or less the same personality traits like a requirements engineer (see IREB) or a test engineer (see ISTQB): resilience, curiosity and communicative skils and a proactive mindset. We even got homework, yay!

20200823 – before the seminar
in the past, ive not done this. that i recapitulated much about everx seminar or workshop. if i did, then it was most of the time areview of the successful participation. but, reality is different. before something starts, there is the tesnion and the fear of not being well prepared, while doing there is the fun to lear some new insights, see your capabilities grow, learning stress, befor he test the testion is almost a t maximum and then the release. after seein a successfuly test rulst. htherefore i want to cover the following four days of this chapter of my learning journy.

Is this a bug?

Written by  on August 25, 2020

Let’s assume the following situation: in the past a feature was implemented, a full DoD (code review, manual test, stakeholder approval, ..) was done and the ticket successfully closed.
Suddenly someone realizes that a second feature, which is closely related to the first one, should have that behaviour as well. The circle of people cavilling about the lack of functionality is identical with the people writing the requirements and doing the validation of the implementation of feature one.

So, is this a bug?
No, this is a new task!

It is devaluating the efforts of all people involved in first place, because the work was delivered like ordered. Nobody complained – until now.
Let me explain, because this sounds like nitpicking and fussing about the wording. But the inner problem is, when stakeholder and requirement engineers couldn’t capture all use-cases or had implicit, inner expectations and did not note them down before (or while) development, then you can’t suddenly name the lack of some additonal change a bug.
Or you can. If you want to piss of your developers :>

Another aspect: at the end of sprints or releases reviews are done. And at this very moment only numbers matter. You won’t dive into the details of each tickets – so only the binning of the types of solved issues matter. And mislabelling the aforementioned tasks as bugs can make a good-team result appear like a “barely made it over the finishing line”.