ChatGPT and Code

In my previous blog post about ChatGPT and Simics, I tested it on its knowledge and abilities with a fairly niche subject. Not unsurprisingly it did not do all that well. However, one area where ChatGPT appears to really work well is when dealing with program code. This seems more practically useful as well, especially as a generator of starting points and boiler-plate code. It can also sometimes do a decent job explaining code, subject to quite common bizarre mistakes and errors.

Continue reading “ChatGPT and Code”

ChatGPT and Simics

It is an understatement to say that ChatGPT has been a hot topic since it was launched a few months back. Everyone seems to be seeing what it can do in their favorite domain, so I had to try it on what I work with, Simics and virtual platforms. The results did not live up to the hype some people think the technology deserves, but it was very impressive and a little scary nevertheless. This is the first post in what looks like it will be a series about ChatGPT. Update: Part 2, ChatGPT and Code, is now out.

Continue reading “ChatGPT and Simics”

The NUC12 Enthusiast

Right when our old NUC5 died, its replacement had been delivered and brought online – a new Intel NUC12 Enthusiast, also known as the NUC12SNKi72 (I work at Intel, but even I find that name a bit obtuse). This is a seriously fast machine in a fairly compact package, even though admittedly not as small as the old NUC5. On the other hand, as a machine with an ambition to be a replacement for a dedicated gaming PC, it sports a dedicated graphics card and not just the integrated graphics typical for the classic NUCs.  

Continue reading “The NUC12 Enthusiast”

This NUC is Dead

Computers can wear out given enough time. I just had an old NUC basically fall apart – on the very day it was being replaced by a new one. The timing is rather too good to be believed, but basically the machine stopped working just when we transitioned to a new NUC. The old one still booted… but running it was questionable due to its many concurrent failure modes.

Continue reading “This NUC is Dead”

Setting the Font in Windows 11 “Terminal”

I finally got updated to Windows 11 on my work machine, and suddenly I have to figure out how to use Windows 11 for real work. The redesigned start menu is terribly bad compared to the Windows 10 variant. What is nice though is the new Terminal app, along with the quite pleasing Cascadia font. However, I found the default size of Cascadia to be a tad big. Which lead to the question: “just how on earth are you supposed to control the font on this thing?” The font adjustment is probably the least logical I have ever found, and without some help from the Internet I would never have figured out. So here is how you do it.

Continue reading “Setting the Font in Windows 11 “Terminal””

Finding the Cursor on Windows…

In the last year, I noticed that my Windows machines started to grey the screen and show a highlight around the cursor when I accidentally hit the CTRL key twice. At first, I had no idea what was going on, but then I figured out it was connected to CTRL. So I assumed that this was a brilliant new feature added by Microsoft in some recent Windows update (to both Windows 10 and 11, thank you very much!). However, then I tried to help a colleague find the function and realized it was missing on his machine. What was going on?

Continue reading “Finding the Cursor on Windows…”

What’s in a Kilowatt Hour?

The current price spikes for electricity in Europe has driven a new interest in saving energy, and part of doing that is to understand just how much energy different things use. I realized while I knew that modern LED lights are magically efficient, just how much electricity is used by other machines? No idea! So, I set out to find some examples the utility you get from a one kilowatt hour of electricity.

Updated in November 2022 with additional data.

Continue reading “What’s in a Kilowatt Hour?”

USS Massachusetts and Battleship Cove

I recently made a trip to the US to look at some interesting things like the USS Intrepid, the architecture or New York City, and Battleship Cove.  Battleship Cove is located in Fall River, Massachusetts, and hosts the South Dakota-class battleship USS Massachusetts. Additionally, the site holds the destroyer USS Joseph P Kennedy, the submarine USS Lionfish, and the East German missile corvette Hiddensee. Given that I only had an afternoon there, I ended up only looking at the battleship with a brief run through the submarine. It was that good, especially in company with an old friend who also had read up on how the ship worked.

Entry to Battleship Cove
Continue reading “USS Massachusetts and Battleship Cove”

Was this a UTF-8 WTF?

Today I observed something very odd in Powerpoint. I was pasting in some text from the Simics command-line interface into a text box in Powerpoint to show the output of some commands. Commands whose output relied on box-drawing characters to produce nice tables. But for some reason… it did not work in Powerpoint. Weird.

Continue reading “Was this a UTF-8 WTF?”

Easy to Assemble, just like Lego – Right…

When discussing the design and integration of systems on chip and models of systems on chip, the Lego analogy is often brought up. The idea being that with Lego, anyone can put together anything and every component can be combined with all other components. Right. My recent building of Lego set 21327, Typewriter, makes me wonder if the people who talk about Lego-like construction have actually built anything from Legos in the past few decades.

Continue reading “Easy to Assemble, just like Lego – Right…”

Minimum Viable (Replacement) Product – The Teams Example

During 2020 and 2021, Intel switched from using Microsoft Skype for Business (also known as Lync) to Microsoft Teams as the primary internal calling, chatting, and conferencing tool. While (finally) Teams has turned into quite a decent communications tool, the transition started a bit too early from a feature completeness perspective. Microsoft in essence gave us an enterprise Minimum Viable Product (MVP). Not a proper Replacement Product (RP). Teams left out many rather important and useful features, degrading the user experience and value, and making my life harder. I don’t think that was particularly well handled. I can understand it as a product manager, but as a user, I don’t like it all.

Continue reading “Minimum Viable (Replacement) Product – The Teams Example”

Cancer Part 4: All’s Well that Ends Well

I last blogged about my experience with thyroid cancer in early 2020. Back then, I said that I felt pretty much normal. That has indeed continued to be the case, and recently I was declared as having formally recovered from the cancer. The guideline is apparently that after two years with no sign of a cancer resurgence, you are considered fully recovered. Future follow-ups are the responsibility of the primary care system instead of the hospital, with something like yearly or bi-yearly follow-up tests. Not so much to look out for the cancer, but to keep the Levaxin prescription correct.

Continue reading “Cancer Part 4: All’s Well that Ends Well”

Oljeön – The World’s Oldest Preserved Oil Refinery

With Covid-19 still a bit of an issue, the summer of 2021 is yet another one for “svemester” (Sverige-semester, or Sweden-vacation). There are plenty of things to see, and one place that I finally got to visit was the old oil refinery at Oljeön in Ängelsberg, home to Engelsbergs oljefabrik and the world’s oldest preserved oil refinery dating back to the mid-1870s. It is a beautiful piece of industrial history, well-preserved and with good guided tours.

View of Oljeön from the mainland. The refinery is the yellow building on the right, the darker building on the left is the one remaining oil storage shed
Continue reading “Oljeön – The World’s Oldest Preserved Oil Refinery”

Microsoft Windows memset Optimization – Stores are Free

I recently stumbled on a blog post called Building Faster AMD64 Memset Routines, written by Joe Bialek of the Microsoft Security Response Center (MSRC). The blog describes his efforts to improve the performance of the Windows kernel memset() function, across all sizes of memory to set. The reported optimizations are quite fascinating, and could be summed by avoiding branches even at the cost of doing redundant stores. Basically, stores are free while branches are expensive.

Continue reading “Microsoft Windows memset Optimization – Stores are Free”

Renovations and Software

Last year, we spent a significant part of the fall and early winter renovating some aspects of our apartment*. Things like (finally) updating the flooring in the living room, updating the wallpapers, painting the interior staircase white, and changing out all doors. The renovation process provides some interesting analogies to the process or updating an existing software code base – especially in discovering the design decisions of the past and unearthing the layers of legacy that underlies why things look like they do today.

Continue reading “Renovations and Software”

Corsair K83 – Living-Room Keyboard

I have had a PC in the living room connected to the family TV for a few years now, and in the past we used a wired Corsair K65 keyboard with it. The point of the machine was at least in part to play games, and for that a mechanical wired keyboard is de-rigeur (and I do love RGB backlighting). However, some recent changes to the computer fleet made the living-room PC into more of a media machine, and it was time to move to a wireless keyboard. Preferably one that also made the mouse superfluous. After some research, I ended up with the Corsair K83. I am rather happy with the keyboard overall, even though it is rather small and lacks RGB.

The Corsair K83 on a holiday-themed tablecloth
Continue reading “Corsair K83 – Living-Room Keyboard”

The First Swedish Programmer (1790s)?

The history show (and podcast) of Sverige Radio, Vetenskapsradion Historia, is one of the shows that I subscribe to and listen to regularly. In their look back at 2020, they reminded me of an episode from back in the summer that indirectly introduces what I believe to be the first programmer in Sweden.  

Continue reading “The First Swedish Programmer (1790s)?”

USB-C Works, but how would you Know?

Using USB-C to charge a laptop while simultaneously providing display and other IO traffic sounds a little bit too good to be true in practice.  Maybe it would work for a set of devices from a single manufacturer (like a Thunderbolt-based USB-C-attached dock from the same vendor as a laptop). However, recently I was surprised (in a good way) when it turned out that I had accidentally got myself a USB-C-based single-cable-to-the-laptop setup. USB-C promises a lot, in this case it delivers perfectly, but what bothers me is the fact that there is really no way I could have figured this out ahead of time.

Continue reading “USB-C Works, but how would you Know?”

Going Norrland

This year’s vacation trip was a roadtrip into Norrland, the northern part of Sweden. With the ongoing Covid-19 pandemic, it seemed safer and fairer to the healthcare system to stay in our own country.  It was also an opportunity, since I have wanted to and look at some places up north for quite a while now (such as Bodens Fästning and Hemsö Fästning).

Continue reading “Going Norrland”

Hemsö Fästning – Coastal Defense from the 1950s

Continuing on my blog posts about our Hemester (part 1 covered Bodens Fästning), this blog post will cover Hemsö Fästning. Both are fascinating places, but also rather different, and clearly demonstrate the changes from the early 1900s to the Cold War of the 1950s.

Continue reading “Hemsö Fästning – Coastal Defense from the 1950s”

Bodens Fästning – A Fortress in the North of Sweden

Due to Covid-19, this year’s summer vacation involved a “staycation”, or “hemester” as we say in Swedish. We went up north in Sweden, and took the chance to visit some military museums. In particular, the fortresses at Hemsön and Boden (fästning means fortress). Both are fascinating places, but also rather different, and clearly demonstrate the developments from the early 1900s to the Cold War of the 1950s. This post covers Boden, with a separate post for Hemsö released a few days after this post.

Continue reading “Bodens Fästning – A Fortress in the North of Sweden”

Recalling the Beginning of Covid-19 and Work-from-Home

Recently, we had a discussion at work (in our daily virtual team “fika”) where we reflected on just how many weeks we had been working from home due to the Covid-19 pandemic. It has been quite a few; I last saw the office in week 11, and week 19 is beginning… so I am looking at eight weeks personally. Just how did it all begin? I thought it useful to go back and try to remember how we got to this point. In hindsight, I never thought it would be this huge.

Continue reading “Recalling the Beginning of Covid-19 and Work-from-Home”

Adjusting to Work-from-Home: Remote Live Simics Training

In the current world-wide lockdown due to Covid-19, many things that were done in-person in the past have to become virtual. The Simics® New User Training that we run at Intel and with our customers and partners is no different. In normal times, we run in-person classes around the world, but that is not an option right now.  Thus, we shifted to running remote live classes as a substitute for the time being. This blog shares some of my experience from running remote live classes.

We changed the cover page of the Simics training to symbolize the change.
Continue reading “Adjusting to Work-from-Home: Remote Live Simics Training”

Cancer Part 3: So Far So Good

It has been a bit more than six months after my radiotherapy treatment for thyroid cancer, and I feel pretty much normal. Several times over the past few months, I have talked to people I have not seen in a while and they have asked me how I am doing. At first I just say “fine”… and I then realize that they are asking about the cancer. It’s not top-of-mind for me since I have been living with it for almost a year now, and it feels (currently) like it is “done”. Of course, it will be years before I am formally considered to have fully recovered, but right now I feel like I am functioning mostly normally (except a small side-effect from the medication).

Continue reading “Cancer Part 3: So Far So Good”

The Benefit of Live Teachers (Applied to Myself)

I have been spending quite a bit of time in recent years developing training materials and doing trainings for Simics. There is always a discussion on how best to do training, in particular between live sessions with actual trainers and offline video and other self-study resources. I am a firm believer in the value of live training, and during our recent winter vacation up in the Swedish mountains I made myself provide a perfect example of the value of a teacher. I took a skiing lesson.

Continue reading “The Benefit of Live Teachers (Applied to Myself)”

Cancer Part 2: Going Radioactive

As I chronicled earlier this year (see “A Sudden Case of Cancer”), I got a Thyroid Cancer diagnosis back in May of this year. In June I went through surgery which went very well. After only three weeks, I was sufficiently recovered to travel to Greece and give a keynote presentation at the SAMOS conference. My scar prevented me from taking as much as advantage as I could have of the sun and pool, but it was possible to do at least a little bit of bathing towards the end. Now, I have reached part two of the treatment, radioiodine therapy to knock out any lingering cancer cells. Basically, I am going radioactive for a few days.

Continue reading “Cancer Part 2: Going Radioactive”

Failing to See WiFi Login Page [Captive Portal] / Solved

I have had some annoying problems in recent months with my work laptop refusing to connect to certain WiFi login pages (more technically known as Captive Portals), essentially locking me out of the WiFi in certain places. Here is how I solved it.

Continue reading “Failing to See WiFi Login Page [Captive Portal] / Solved”

Intel Blog: Simics 6 Device Register Coverage

I have a new blog post out on the Intel Developer Zone, about the Simics 6 device register coverage feature. I use device register coverage to look at how different operating systems use the same hardware. The differences are significant, demonstrating the (rather expected) observation that different software stacks use the same hardware in different ways.

Continue reading “Intel Blog: Simics 6 Device Register Coverage”

Excel 2016 & CSV Import – Hilariously Broken

I just started using Office 365 at work, and almost immediately I hit a hilariously bad problem in the core simple “import CSV” functionality. Basically, the Excel 2016 that I got (it is 2016, not the latest 365 that my home machine all use) does not understand Windows line endings or decimal numbers.

Continue reading “Excel 2016 & CSV Import – Hilariously Broken”

Using FPGAs to Simulate old Game Consoles

A while ago, Ars Technica reviewed the Mega Sg, a modern clone of the old Sega Genesis gaming system. I stumbled on this review recently and realized that this is a fascinating piece of hardware. The Mega Sg is produced by a company called Analogue (https://www.analogue.co/), presumably named thus because they create analogues to old gaming consoles. The way this is done is different from most current “revive the old consoles” products that simply use software emulation to run old games. Instead, Analogue seems to have settled on using FPGA (Field-Programmable Gate Array) technology to basically build new hardware that is functionally equivalent to the old console hardware.

Continue reading “Using FPGAs to Simulate old Game Consoles”