[{"content":" The presentation is a very quick introduction on how display ads works online, an overview of the challenges we\u0026rsquo;re facing in the industry + some data \u0026amp; case studies.\nPresented at the \u0026ldquo;pre-event\u0026rdquo; performance.sync(), sponsored by Mozilla. The main goal was to invite to \u0026amp; spark conversations during the conference days at performance.now() - but hopefully it might still give you some value :-)\n","permalink":"https://gernberg.com/posts/2025/rectangle-delivery-how-hard-can-it-be/","summary":"A fast-paced talk from performance.sync() on how display ads are delivered online, the performance challenges the ad industry faces, and data and case studies.","title":"Rectangle Delivery: How hard can it be?"},{"content":"This boom box survived for a much longer period of time than the Boom in da box – v1.0 and Chill out box 2011. It was alive and kicking between 2012-2019\nCreated from sturdy 13mm plywood paired with 6x9\u0026quot; JBL speakers this thing was a beast, design inspired by the black boxes in airplanes for some reason. Total operational weight: 20-30kg depending on battery :-)\nDuring the years it survived some abuse and a couple of incidents and only needed minor repairs (like a new battery\nRight before midsummer 2019 the lead acid battery died for the second time. This time, instead of fixing it I opted to buy the JBL Boombox since it was: a) available, b) lightweight, c) bluetooth enabled, d) had great sound.\nIt took another 3 years to mentally let go of this memory filled beauty, but in 2022 - it was finally time for it to be retired and recycled for real.\nThe end.\n","permalink":"https://gernberg.com/2024/04/boom-in-da-box-3-0-black-box-edition/","summary":"A 20–30 kg boom box built from 13 mm plywood with 6x9\u0026quot; JBL speakers, inspired by aircraft black boxes and in use from 2012 to 2019.","title":"Boom in da Box 3.0 - Black Box Edition"},{"content":"Cleaning out old hard drives can mean that sometimes you come across old treasures.\nBack in 2011, for the music festival Peace and Love I wanted to bring my trusty home built \u0026ldquo;boom-in-da-box\u0026rdquo; (see previous post). However, the rules for the festival camping stated that no lead-acid batteries were allowed into the area and the \u0026ldquo;boom-in-da-box\u0026rdquo; ran on a car battery + 600W car-amplifier.\nTo fix this I needed two things:\nMore energy efficient 12V amplifier. Smaller speakers. A box to build in. I opted to build the speaker inside of an empty wine box, a \u0026ldquo;chill out\u0026rdquo; boom box was born. It lasted the festival, but mono-sound and the hassle of AA\u0026rsquo;s meant this box eventually died.\nHere\u0026rsquo;s the pictures from the project, enjoy :)\nThat\u0026rsquo;s it for now - likely there\u0026rsquo;ll be a post about the other boom boxes if I find any interesting pictures :-)\n","permalink":"https://gernberg.com/2024/03/chill-out-box-2011/","summary":"Building a battery-powered speaker inside an empty wine box for the Peace and Love festival in 2011, where car batteries weren\u0026rsquo;t allowed.","title":"Boom in da box 2.0 - Chill out box"},{"content":"Below is a first version of the boom in the box, anno 2011.\nIt was built to play music outdoors, engineered to be cheap and loud (and with surprisingly high quality if you didn\u0026rsquo;t max out the poor old Volvo V40 car speakers from 1998).\nThis box was active for about 1-2 years and repaired a few times after it had had too much dancing ( it fell of bikes more than once, you can see the boxes changing color and style in the pictures).\nBelow you can see the boom-in-da-box v.1 in it\u0026rsquo;s natural habitat, surrounded by loud friends, alcohol and plastic boxes.\nFor some reason the amplifier was outside of the box itself, I\u0026rsquo;m guessing to allow for cooling in the hot Swedish summer sun (April 30th). The smiley-face ventilation on the back apparently wasn\u0026rsquo;t enough\u0026hellip;\nBelow is a sound test during the creation of the box.\nCell phones back in 2011 recorded sound \u0026hellip; differently :)\nListen at your own risk, you have been warned!\nYour browser does not support the video element. More from this category:\nChill out box 2011 ","permalink":"https://gernberg.com/2024/01/boom-in-da-box-v1-0/","summary":"The first homemade boom box from 2011: old Volvo car speakers, a car battery and an amplifier in a plastic box, built to be cheap and loud.","title":"Boom in da box 1.0"},{"content":" ","permalink":"https://gernberg.com/2024/01/photos-nye-food-prep/","summary":"Photos from preparing food for a New Year\u0026rsquo;s Eve dinner.","title":"Photos: NYE food prep"},{"content":" Note: This blogpost was originally published on web.dev/fast-ads-matter.\nAuthors: Gustav Ernberg von Heijne, Jonathon Imperiosi, Rob Hazan, Beng Eu\nLicense CC-BY Attribution 4.0 International\nIf you\u0026rsquo;re like most publishers on the web, your business offers a simple value exchange: you provide content that users find valuable, and in the process present them with relevant ads to generate revenue. But if those ads slow down the content, are you really upholding your end of the bargain?\nThis post explains how fast ads benefit everyone, and how to start investigating and improving ad speed on your sites.\nWhy do fast ads matter? Fast ads improve the user experience Users come to your site to be entertained, get informed, or learn something new, and they expect your site to load quickly, with minimal interruption. If your site helps users do that well, they tend to return more often. While ads may be necessary for your business, if they\u0026rsquo;re slowing down your site they can create a tension with the user\u0026rsquo;s purpose.\nThe browser has limited resources to work with—memory, CPU, and network bandwidth. The more of these resources your ads consume, the longer it takes for your page to become visually complete and interactive. This can be a drag on user experience metrics like session length and bounce rate. You can improve these metrics by serving the most lightweight ads possible and loading them at the right time (which is not always right away).\nFor many e-commerce publishers, display ads are a secondary source of revenue. If you\u0026rsquo;re one of these publishers, you know that any ads you place on the page have some negative impact on your primary business metrics (sales, subscriptions, and more). Fast ads, by getting out of the page\u0026rsquo;s way, give your primary business metrics a boost as well.\n{% Aside %} When asked about their reasons for installing ad blockers, many users cited \u0026ldquo;interruption\u0026rdquo; and \u0026ldquo;speed\u0026rdquo; as primary motivators. Since fast ads result in improved user experience metrics, a focus on improving ad speed may decrease the incentive for users to install ad blockers. {% endAside %}\nFast ads make you more money Another way to think about this topic is from an advertiser\u0026rsquo;s point of view. The sooner an ad appears on the page, the longer it will be visible on the screen, meaning it\u0026rsquo;s more likely to be seen and interacted with. As views and interactions increase, so does the value of your ad slots in the eyes of advertisers.\nConversely, impressions and viewable impressions decrease the longer an ad takes to appear on the page. To provide a sense of the magnitude of this problem, the charts below show aggregated data from an experiment where a delay between 100 ms and 1 s was injected before each ad response, across 4 billion impressions on websites with the Google Publisher Tag in multi-request mode. The dotted lines are extrapolations to visualize how improving ad speed could increase impressions and viewability rate.\nWith 1s of added delay, impressions decreased by 1.1% for mobile traffic and 1.9% for desktop traffic:\nSource: Google Internal Data, December 2016 to January 2017. With 1s of added delay, viewability rate decreased by 3.6% for mobile traffic and 2.9% for desktop traffic:\nSource: Google Internal Data, December 2016 to January 2017. A framework for thinking about ad speed Modern websites tend to have complex and diverse ad serving setups, which means there\u0026rsquo;s no one-size-fits-all method of making ads fast. Instead, the following sections give you a framework for thinking about ad speed. Some points are specific to Google Ad Manager, but the principles apply even if you\u0026rsquo;re using a different ad server.\nKnow why you want to improve ad speed Before you start working to improve ad speed, you should be clear on what your goals are. Is it to improve the user experience? To increase viewability? Both?\nWhatever your specific goals are, it\u0026rsquo;s important to identify the metrics you can use to measure and track progress towards them over time. Having the right metrics in place allows you to:\nKnow if the changes you\u0026rsquo;re making are moving you in the right direction. Run experiments, such as A/B tests, to evaluate the effectiveness of specific changes. Once you\u0026rsquo;ve decided on the metrics that make sense for you, be sure to configure reporting so you can easily keep track of them. A dashboard you can check periodically or scheduled reports sent to you by email work well for that.\nKnow your inventory and dependencies To identify opportunities for improving ad speed, you first need to understand the types of inventory your site supports and the technical dependencies of each.\nAs an example, suppose a site supports the following inventory types:\nDesktop leaderboard Mobile banner To load and display ads, the example site uses the following:\nA consent management platform Audience scripts Header bidding scripts A rendering framework First, create a flowchart for each inventory type to visualize how the various dependencies interact in order to load and display an ad. Desktop leaderboard inventory may look like this:\nAn example workflow for the desktop leaderboard inventory type. While a more complex inventory type, such as mobile banner, may look like this:\nAn example workflow for the mobile banner inventory type. Then, use this information to create a simple table like the one below, which maps each inventory type to its dependencies in an easily digestible format.\nType of inventory Consent management platform Audience script Header bidding script Rendering framework Desktop leaderboard ✔ ✔ (X) ✔ (A) - Mobile banner ✔ ✔ (X and Y) ✔ (A and B) ✔ Creating an overview of inventory types and dependencies like this helps to identify critical paths and areas for optimization. For example, you may find that some dependencies are included unnecessarily and can be removed for a quick speed improvement. This information is especially useful to have when analyzing ad loading times.\nKnow where you want to improve A good way to approach improving ad speed is to focus on reducing the amount of time it takes for the first ad on your page to load. This time can be broken down into three main intervals:\nTime to load ad libraries\nThe time it takes to load all ad libraries necessary to issue the first ad request. May be improved by removing or delaying the loading of scripts that are not related to making ad requests.\nTime to first ad request\nThe time elapsed from ad library load to the first ad request being made. May be improved by parallelizing header bidding requests and avoiding tasks that block the main thread.\nTime to render first ad\nThe time elapsed from the first ad request being made to the first ad being rendered. May be improved by reducing ad complexity and creative file size.\nBefore you start making any changes, you need to decide which of these metrics to focus on. While the ultimate goal is to minimize them all, the relative importance of improving each (and the methods you use to do so) will greatly depend on your specific setup.\nYou can use a tool like Publisher Ads Audits for Lighthouse to help you analyze your site, identify bottlenecks, and make an informed decision about what to focus your efforts on.\nConclusion Now that you understand the importance of ad speed and have a framework for thinking about it, it\u0026rsquo;s time to identify areas for improvement in your sites and make your ads fast. Finally, consider authoring your ads in AMP, a format that reliably produces fast ads.\n","permalink":"https://gernberg.com/posts/2019/fast-ads-matter/","summary":"Slow ads don\u0026rsquo;t just frustrate users—they hurt your bottom line. Every second of delay reduces impressions, viewability, and user retention. Here is a clear framework to help you diagnose ad speed bottlenecks and deliver faster, more profitable ad experiences.","title":"Fast Ads Matter"},{"content":"I really like fog it seems\u0026hellip; Here are some more pictures :-)\n","permalink":"https://gernberg.com/2018/12/fog-again/","summary":"More fog photography: a gallery of misty Swedish winter scenes from December 2018.","title":"Fog... again"},{"content":"I am currently in the process of (perhaps) buying a new camera. Currently I have a Sony A6000 with one standard zoom lens that has a focal length that goes from 18-50mm (or 24-75mm if you translate to 35mm sensors).\nThe cameras I’m looking at currently are full-format cameras, and the lenses for those cameras can get quite expensive - so I’m wondering if I can get away in the beginning just buying a fixed lens for the camera (cheaper).\nThe structured approach would of course be to analyze my photos taken with the zoom lens and see which focal length I use the most - since I want to get better at Python I decided that writing a Python script for this was the way forward. The script turned out to be quite short - the only dependency I didn’t already have installed was pillow.\nThe programming part First we need to see if we can get the focal length easily, searching the spec for suitable EXIF information I found that 41989 is the key with the descriptive name “FocalLengthIn35mmFilm” – let’s try that!\nimport PIL.Image import matplotlib.pyplot as plt FocalLengthIn35mmFilm = 41989 img = PIL.Image.open(\u0026#34;image.JPG\u0026#34;) exif_data = img._getexif() print exif_data[FocalLengthIn35mmFilm] It seems to work for most of my images, lets loop through all images in the folder and try it out\nimport PIL.Image import matplotlib.pyplot as plt import glob, os for file in glob.glob(\u0026#34;./**/*.JPG\u0026#34;): FocalLengthIn35mmFilm = 41989 img = PIL.Image.open(\u0026#34;image.JPG\u0026#34;) exif_data = img._getexif() print exif_data[FocalLengthIn35mmFilm] This appears to be working for most of my pictures - some images doesn’t contain any FocalLengthIn35mmFilm parameter so I’m skipping those images for now with a try/except and logging to stdout.\nInstead of printing the sizes I need to add it to an array to visualize it with a histogram - check below for finished script.\nFinished script import glob, os import PIL.Image import matplotlib.pyplot as plt focal_length_35 = [] FocalLengthIn35mmFilm = 41989 # Go through all JPG-files in all folders for file in glob.glob(\u0026#34;./**/*.JPG\u0026#34;): img = PIL.Image.open(file) exif_data = img._getexif() try: focal_length_35.append(int(exif_data[FocalLengthIn35mmFilm])) except: print \u0026#34;ERROR in file %s\u0026#34; % (file) # Show histogram plt.hist(focal_length_35) plt.show() Running the script above in a folder with some pictures gave me the following histogram\nIt seems that I’m a clear fan of focal length 24mm (at least for the folder I ran this on), something to think about at least. Now I probably need to go through all photos and separate the ones I like the most so I know which focal length I’m most happy with (the above script only gives me quantity, not the quality).\n","permalink":"https://gernberg.com/2018/10/visualizing-favourite-focal-lengths/","summary":"Choosing a prime lens by data: a short Python script using Pillow that reads EXIF data from my photos and charts which focal lengths I actually use.","title":"Visualizing focal lengths used in photos"},{"content":"Wonderful morning today, sunshine and some fog.\n","permalink":"https://gernberg.com/2018/10/foggy-morning/","summary":"Sunshine breaking through the fog on a wonderful autumn morning. Two photos from October 2018.","title":"Foggy morning"},{"content":"A comment on my instagram sparked a long running debate in my head - is carrying a real camera worth it?\nI\u0026rsquo;ve felt that the need for a \u0026ldquo;real\u0026rdquo; camera is disappearing more and more with smartphones really stepping up the game.\n","permalink":"https://gernberg.com/2018/10/pixel-2-vs-a6000/","summary":"Is carrying a real camera still worth it? Comparing photos from a Google Pixel 2 smartphone with a Sony A6000 mirrorless camera.","title":"Pixel 2 vs A6000"},{"content":"Let’s start off with a quick question!\nCan you spot the difference between the two rows below?\n/images/räksmörgås.jpg /images/räksmörgås.jpg I couldn’t.\nMy browser however insisted that there was no “räksmörgås.jpg” on the webserver – a file that from my point of view clearly was there.\nSince the error only occurred with filenames containing the letters å,ä \u0026amp; ö I at first suspected that there was an issue with mixing up UTF-8 and ISO-8859-1, however, this wasn’t the case.\nMy next course of action was to urlencode the requested filename and the filename from the server, and this is when I found something interesting!\nra%CC%88ksmo%CC%88rga%CC%8As r%C3%A4ksm%C3%B6rg%C3%A5s Now you see the difference, right?\nDon\u0026rsquo;t believe me?\nSee it in action on cyberchef here and here.\nThe reason behind the difference is that there are multiple ways to represent the common Swedish letters å, ä and ö (and other non-ascii letters aswell - but for readabiltiy, let’s keep it short).\nIf we look at the char codes for three letters that were causing trouble in my case:\nLetter | Mac OSX | Linux -------+-----------+------ å | 97 + 778 | 228 ä | 97 + 776 | 229 ö | 111 + 776 | 246 Notice the pattern?\nMac uses ”a” (97) and ”o” (111) and then adds the circle (778) or the dots (776). Linux however has a diffrent char entirely.\nThere are multiple standards for representing characters in unicode, the competing normal forms here are ”Canonical Decomposition” (NFD) and ”Canonical Composition” (NFC) – and I needed to convert between the two.\nMy solution I had this error on a server where files had been stored on a Mac and then re-uploaded to a Linux server. I didn’t have shell access to the server so I fixed it by using the following PHP-code that looped through all affected files and updated their names:\n\u0026lt;?php // Normalizes all filenames in folder foreach(glob(\u0026#34;*\u0026#34;, 2) as $file){ $after = Normalizer::normalize($file, Normalizer::FORM_C); if($file !== $after){ rename($file, $after); } } You could probably use iconv or similar tools to achieve the same thing easier if you’ve got shell-access (or php exec is enabled).\nFun fact: Räksmörgås is a commonly used Swedish word used for testing that the non-ascii ÅÄÖ is working correctly.\n","permalink":"https://gernberg.com/2018/05/raksmorgas/","summary":"Two filenames that look identical but aren\u0026rsquo;t: how Unicode normalization (NFC vs NFD) of å, ä and ö caused mysterious 404s, and how to spot it.","title":"Filenames with non-ascii letters"},{"content":"\n","permalink":"https://gernberg.com/2018/01/fog-danderyd/","summary":"Photos of a foggy landscape in Danderyd, Sweden.","title":"Fog, Danderyd"},{"content":"\n","permalink":"https://gernberg.com/2018/01/arc-de-triomphe-montpellier/","summary":"A photo of the Arc de Triomphe in Montpellier, France.","title":"Arc de triomphe, Montpellier"},{"content":"\n","permalink":"https://gernberg.com/2018/01/animal-crossing-linkoping/","summary":"Photos of animals crossing the road in Linköping, Sweden.","title":"Animal crossing, Linköping"},{"content":"Update 2016-10-20: Microsoft finally fixed this issue.\nTL;DR; The shorten URL feature does not use encryption.\nI am currently working as a software engineer developing with a web based B2B solution when I came across something interesting when performing some security analysis of the application.\nA part of the application is to enable people within an organization to share information with each other and this will naturally lead to users linking to external resources. The application is HTTPS/TLS secured and all the external resources used at the moment resides on HTTPS/TLS secured servers. However, examining the links added by users I discovered somthing unsettling: Microsoft is not using SSL on their OneDrive URL-shortening service.\nWhat this means in practice is that an even though OneDrive (Office 365) resides on a secure server, we break the encrypted chain when using the short link service. How this happens in practice is the following scenario:\nA user chooses to share a document to other users via a hyperlink. OneDrive generates a link: **https://**onedrive.live.com/redir?resid=9B82C44181D3283B!1225\u0026amp;authkey=!AJY4AVrqk4enjZU\u0026amp;ithint=file%2cxl s The user thinks the link is to long and clicks \u0026ldquo;shorten URL\u0026rdquo; Microsofts generates the short link: http:// 1drv.ms/1LHw83B If the link is opened on an insecure network, for instance an open WiFi on a train or bus, anyone able to observe network requests can capture the URL \u0026quot; http:// 1drv.ms/1LHw83B\u0026quot; which will lead to the document. I think Microsoft needs to be more clear about the security implications of using the shorten URL feature since this is a security concern for every organization using OneDrive and the shorten URL feature. The solution in order to fix this problem is very simple and straight forward for Microsoft: ”Implement HTTPS on 1drv.ms”.\nThe solution for the rest of us is to not use the shortened URLs from Microsoft for anything sensitive for the time being.\n","permalink":"https://gernberg.com/2015/02/why-you-should-not-use-the-onedrive-shorten-url-feature-right-now/","summary":"OneDrive\u0026rsquo;s URL shortener served links over plain HTTP, breaking the encrypted chain and exposing shared Office 365 documents. Here is why that matters.","title":"Why You Should Not Use the OneDrive Shorten Url Feature Right Now"},{"content":"Since I haven\u0026rsquo;t decided what I should use this blog for I though I might aswell use it as a public library of stuff that I\u0026rsquo;ve written.\nThe first paper I will publish here is summarizing research and previous work trying to find out how Scrum affects maintainability and usability.\nScrums effects on software maintainability and usability\n","permalink":"https://gernberg.com/2015/01/how-does-scrum-affect-maintainability-and-usability/","summary":"A paper summarizing research on how the Scrum development process affects software maintainability and usability, available as a PDF.","title":"How Does Scrum Affect Maintainability and Usability?"},{"content":"The blog has just moved to a brand new server since the old one had to be \u0026ldquo;sent to the farm\u0026rdquo;, stay tuned for updates :)\nSince the old blog had so many no-so-interesting and / or outdated blog posts containing a mixed variety of Swedish and English I decided to clear the blog and give it a new consistent lifestyle.\nHopefully for the better, the future will tell :-)\n","permalink":"https://gernberg.com/2014/11/relaunching-the-blog/","summary":"The blog has moved to a new server and been wiped clean, making room for a fresh start with consistent English-language posts.","title":"Relaunching the Blog"}]