<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Chris J. on Medium]]></title>
        <description><![CDATA[Stories by Chris J. on Medium]]></description>
        <link>https://medium.com/@Fish_AndCustard?source=rss-a92ec8aaf7fe------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*e9CpjexzmOhaauOONV0Eeg.jpeg</url>
            <title>Stories by Chris J. on Medium</title>
            <link>https://medium.com/@Fish_AndCustard?source=rss-a92ec8aaf7fe------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 16:36:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Fish_AndCustard/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Beats Studio 3: an honest farewell]]></title>
            <link>https://medium.com/macoclock/beats-studio-3-a-honest-farewell-sony-wh-1000xm3-a-warm-welcome-4cd6925fa107?source=rss-a92ec8aaf7fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/4cd6925fa107</guid>
            <category><![CDATA[headphones]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[sony]]></category>
            <category><![CDATA[music]]></category>
            <category><![CDATA[beats]]></category>
            <dc:creator><![CDATA[Chris J.]]></dc:creator>
            <pubDate>Mon, 05 Apr 2021 11:20:03 GMT</pubDate>
            <atom:updated>2021-04-12T21:18:27.402Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iyJ5NmE7s_t0lhwi8eshzw.jpeg" /></figure><p>About two years ago, I bought my first MacBook. Thanks to the Student Partner Program, I could be able to get an interesting discount, as well as having, <strong>for free, a pair of Beats Studio 3</strong>. I later <strong>had to buy </strong>a pair of <strong>Sony WH-1000XM3 </strong>for reasons I’ll explain later.</p><p>I always was, indeed, a fan of headphones. My best EDM-lover memories as a teenager were with the Skullcandy Hesh 2, a wonderful device with a spherical design and a deep sound. Unfortunately, stuff happens. And someday, all suddenly, when I plugged out the cable, they stopped working.</p><p>Even if the arrival of these new, Beats-branded wireless headphones were welcome at the time, I was very skeptical about them. First of all, I didn’t want to believe that wireless sound was as great as cabled sound. And also, I was reticent about the overuse of radio waves in my daily life. But that’s for another debate.</p><p>Let’s just compare these two headphones from an amateur audiophile point of view, shall we ?</p><h3>Beats Studio : the honest review</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FMHJs8Jg9BLlJsD5gZrz_w.jpeg" /><figcaption>You bought Beats headphones ? Cry me a river. A Seine river, to be more precise.</figcaption></figure><p>When I first put the Beats Studio on, I was astonished by the <strong>comfort</strong> the ear pads provide. This soft,<strong> comfy memory foam</strong> literally complimented my ears and my head skull (Skullcandy, I see you). Perfect for a helmet that you put on at work for hours.</p><p>As I turned on the music, I did not feel disappointed. I mean, I know Beats has a <strong>bad reputation</strong> when it comes to audio quality, but, remember that I didn’t pay for these headphones.</p><p>Plus, as reviewers say, the bass-ey kind-of sound quality that Beats devices used to embody eventually <strong>polished itself</strong> over time. And my listening experience<strong> confirmed it</strong>: the tracks I listened to sounded pretty solid. But that’s all it was. <strong>Solid</strong> (Or at least I thought). Nothing less, nothing more.</p><p>The noise cancellation feature was completely new for me. How great it feels to be able to cancel one’s noisy AirPods in public transportation, just by pressing one button. How satisfying it is to be able to work in an office — or at home — with a complete focus on my C# code.</p><p>As an Apple User, it’s great to have the <strong>U1 chip</strong> present in the headphones, so that they interconnect easily to my Apple ecosystem.</p><p>Unfortunately, the Beats Studio comes with more downsides.</p><p>First of all, <strong>cabled usage</strong>. I know. In 2021, and the arrival of the jack-less AirPods Max, using an audio-jack for listening to music feels out-of-time.</p><p>But I found out there are still cases where <strong>I needed a cable</strong>. For example: using headphones with my <strong>TV</strong> — When I want to watch WandaVision without being disturbed — or my <strong>Nintendo Switch</strong> — When I want to fully enjoy the funky soundtrack of Sonic Mania.</p><p>Also, with the rise of the <strong>pandemic</strong>, It has become essential for me to have a good quality mic and headphones at work. With the version of Windows on my work laptop, it’s very often impossible to connect with any bluetooth headphones.</p><p>In addition, the built-in mic of the Beats headphones <strong>isn’t always great</strong> to my interlocutors. I had better feedbacks switching to the wired one.</p><p>So that’s why I need a cable. The Beats Studio suited this need with ease, because their box <strong>includes a cable with a mic</strong>. And a good one.</p><p>But the cabled experience ended whenever there was no battery left. You just can’t use them at all when there’s no battery. How absurd! I’m not an electrician, but isn’t the cable supposed to give the helmet enough power to play music without charging it ?</p><p>Oh, they wanted to keep the noise cancellation feature turned on, and it needs power. Then… why didn’t they just turn it off ? This question has no answer.</p><p>The second problem with these headphones is their <strong>solidity</strong>. Not the one of their sound, as I mentioned earlier, but rather the one of their body.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pZHwjnL41SGIF9tB0GnScA.jpeg" /><figcaption>My broken pair of Beats By Dre.</figcaption></figure><p>Yes, unfortunately, one day these Beats headphones <strong>broke</strong>. <strong>By themselves</strong>. At some point, during <strong>normal usage</strong>, the headband <strong>disconnected itself from one ear pad</strong>. In addition with making the headphones unusable, they were impossible to repair, nor replace, since they were not under warranty anymore.</p><p>In fact, one headphone repairer in Paris told me the only way to repair the headphones was to insert <strong>8 screws on a plastic plate</strong> on the broken headband, in order to lock the ear pad back in place. Something inconceivable for me, as I didn’t want to affect the aesthetics of my headphones. And also because it would have costed me <strong>€90</strong>.</p><p>At the end of the day, <strong>I’m happy I did not spend a buck</strong> on these Beats headphones on the first place.</p><p>Then, the only way to have headphones again was to <strong>buy new ones</strong>. After reviewing a lot of tech sites, and listening to my colleagues, I decided to take the <strong>Sony WH-1000XM3</strong>. And oh boy was I surprised.</p><h3>Sony WH-1000XM3 : just better.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ykxPSBeB72zg6Rp4CYtEDQ.jpeg" /><figcaption>On that pic, I’m listening to Gust of Wind by Pharrell Williams. While receiving a gust of wind on my face.</figcaption></figure><p>If there’s one problem to remember about the Sony WH-1000XM3, it’s <strong>their name</strong>. I never understood Sony’s odd naming habits. First with the MDR-1000X — Which name resembles the French equivalent to LMAO — , then with the Sony Xperia One II.</p><p>Same goes with the WH-1000XM3. Even Jabra — the main competitor in this category — manages to use letter and numbers to identify their product line, without making the name sound like <strong>a serial number</strong> (ex: Elite 85t, Elite 85h).</p><p>Jokes aside, let’s talk about the sound. It feels a lot better. <strong>Way better</strong>. <strong>Wider</strong>, more precise, and yet very powerful.</p><p>I’m an eclectic kind of listener. For that test, I listened to EDM, Dubstep, Chill Hop, but also Rap and Hip Hop, and even <strong>Hungarian Metal</strong>.</p><p>Especially with that last genre (the tune is Viszlát Nyár — AWS for those wondering) each instrument of the tune felt <strong>right at its place</strong>, and <strong>far more detailed</strong> than the solid sound of the Beats Studio.</p><p>For example, when an acoustic guitar plays a rock ballad (Viszlàt Nyár [Acoustic Version] — AWS for those wondering), you feel the guitar so <strong>crispy</strong> it’s like the musician plays near your ear.</p><p>And that’s thanks to the perfect implementation of the AAC codec by these headphones. But not only.</p><p>You see, Sony wanted to give the user a personalized experience. So they incorporated a feature that <strong>scans your ear</strong> in order to deliver sound waves that correspond to your anatomy.</p><p>All of that gave me an <strong>incredible impression of sound fidelity</strong>, while just streaming encoded music with an online service.</p><p>Though, because my ears are sensitive, I couldn’t keep that ear-profiled sound delivery feature turned on all the time. Using it for a long time was giving me ear aches. I decided to disable it permanently.</p><p>As you noticed, I’m talking about the wireless audio experience. Thanks to these headphones, I realized that wireless audio listening competes toughly with the cable experience, to a point it’s almost impossible to differentiate them. Something I could not realize with the <strong>Beats Studio</strong>, and that’s because <strong>the sound</strong> <strong>was not as detailed</strong> as it is on the Sony WH-1000XM3.</p><p>For a wired experience, the Sony headphones are, again, the winners. Just because <strong>they continue to work with a wire when they are turned off</strong>. And that’s a game changer.</p><p>For the microphone, there is one built in the helmet, of course. That mic, from personal experience, just like the Beats,<strong> isn’t great for calls</strong>, voice messages or audio recording.</p><p>Classic move from Sony, there is no microphone built in the furnished cable. So I just borrowed that one cable from my Beats. And it works fine !</p><p>Also, there are <strong>touch control</strong>s on the Sony WH-1000XM3. Regardless of the device, I was never a fan of this tech. I thought that these controls were hard to master, complicated to learn, and easy to mess with.</p><p>So far, these controls are <strong>a lot more easy to manipulate</strong>. And very convenient. Swipe right and you move to the next guitar riff of Random Access Memories. Tap twice at the center and you paused “Touch” by Daft Punk and Paul Williams.</p><p>But they cannot make the difference between a knee and a finger. Just put the right earphone on your knee with leggings and you paused the music. Maybe the AirPods Max’s Digital Crown is a superior experience. Didn’t test that yet.</p><p>There are other many <strong>smart features</strong> on the Sony WH-1000XM3. Things like <strong>ambient sound hearing</strong>, that one <strong>ear-centric sound personalization</strong>, on-the-fly MP3 and AAC sound <strong>stream enhancement</strong>, built-in Alexa and Google Assistant support… Features that are in fact a bit gadget for a normal usage, but that are great additions that can justify its price.</p><p>Nothing to say about the noise cancellation. It works fine, and seems to be as efficient as the Beats.</p><p>Finally, the comfort. The Sony’s ear pads feel, in fact, a bit less soft than their Beats counterpart, but the ear pads are wider. This results in a comparable, if not better, comfort experience.<strong> Less cushion on my ears, but more space for them</strong>.</p><p>And they also look more <strong>reliable</strong>. While being rotative, these ear pads don’t look like they can break any second.</p><h3>So… what’s the best you can get for the money?</h3><p>That one question you want to hear the answer of. If you compare the prices on Amazon — that are, in fact, the prices in Western Europe, as I did not have the time to compare all countries and shops, sorry not sorry — , you can see that:</p><p>● Beats Studio 3 cost <strong>€349</strong> at their recommended price. Now, on Amazon, due to a recent discount (1 month prior to the writing of that story), they now cost <strong>€249</strong>. With <strong>Amazon Warehouse</strong>, Amazon’s refurbished product service, they can cost <strong>€150</strong>.</p><p>● Sony WH-1000XM3 cost €380 at their recommended price. But it has been a while (more than a year) that this price has been brought down to <strong>€269</strong>. With the arrival of the Sony WH-1000XM4 (naming…), <strong>this price tag is here to stay</strong>. Not to mention Amazon Warehouse, with which you can have them for €190.</p><p>Personally,<strong> I obviously recommend the Sony WH-1000XM3</strong> over the Beats Studio 3. It is the <strong>perfect replacement</strong> for broken Beats headphones. For an extra 20 bucks, you get a way better sound quality, while not having a microphone on your jack cable (What do you mean you don’t care about jack wires ?).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4cd6925fa107" width="1" height="1" alt=""><hr><p><a href="https://medium.com/macoclock/beats-studio-3-a-honest-farewell-sony-wh-1000xm3-a-warm-welcome-4cd6925fa107">Beats Studio 3: an honest farewell</a> was originally published in <a href="https://medium.com/macoclock">Mac O’Clock</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[.NET 5 :  5 New Features … and Apple M1?]]></title>
            <link>https://medium.com/swlh/discover-net-5-13718fd7a99c?source=rss-a92ec8aaf7fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/13718fd7a99c</guid>
            <category><![CDATA[apple-silicon]]></category>
            <category><![CDATA[dotnet-core]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[microsoft]]></category>
            <dc:creator><![CDATA[Chris J.]]></dc:creator>
            <pubDate>Thu, 26 Nov 2020 19:33:11 GMT</pubDate>
            <atom:updated>2020-12-11T12:03:34.759Z</atom:updated>
            <content:encoded><![CDATA[<h3>Discover .NET 5 Through 5 New Features and a Vision of the Future</h3><figure><img alt=".NET 5 : 5 new features… and M1 ?" src="https://cdn-images-1.medium.com/max/1024/1*BWrhbKcKgiYdmw--hKpv4A.jpeg" /></figure><p>.NET 5 hit the developer world a few days ago. One of the most major evolutions in the framework’s history, it confirms Microsoft’s strategy in terms of <strong>open-source</strong> and <strong>cross-platform development</strong>.</p><p>In fact, most of the features of this new framework were either developed, enhanced or suggested by the passionate .NET community. This drives Microsoft into building <strong>better products</strong>, responding directly to their users needs.</p><p>With .NET 5, they unified .NET 4.6 and .NET Core into<strong> a single vision</strong> <strong>for</strong> <strong>.NET</strong>. Their goal is to use the same platform in order to <strong>build</strong> <strong>any kind of dynamic application</strong>.</p><p><em>Literally</em> any kind. From mobile and desktop apps (Xamarin/WPF), to front-end web development (Blazor), including REST (ASP.NET), gRPC and web sockets (SignalR). Oh, and they also have machine learning (ML.NET) and quantic programming (Q#).</p><p>Now, really, <strong>what’s new in .NET 5 ?</strong> Why is this going to change the lives of thousands of .NET developers ? What’s next in<strong> .NET 6 ?</strong></p><p>That’s what we will find out.</p><h3>Records</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZAOxTHOS8am1A5iHM2Xskw.gif" /></figure><p>Records are a feature that’s actually borrowed from Kotlin and its data classes.</p><p>Records are basically classes that behave <strong>like</strong> <strong>a reference type</strong>, which means there is no copy when you pass them as parameters to your member functions.</p><p>But they also behave <strong>like a value type</strong> in a sense that they implement a <strong>default member equality</strong>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1bafbbc6f5a00793b05bcf284d921cec/href">https://medium.com/media/1bafbbc6f5a00793b05bcf284d921cec/href</a></iframe><p>That means you don’t have to implement IEquatable yourself when you want to compare reference types. Now, that’s time saving!</p><p>With records, there’s also a new with keyword that permits you to specify values to fresh copies of records with a new fancy syntax.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b2c8129214309ab60774f10631663c4f/href">https://medium.com/media/b2c8129214309ab60774f10631663c4f/href</a></iframe><p>Records are perfect for people working with <strong>data</strong>. The <strong>flexibility</strong> <strong>of a </strong><strong>class</strong>, and the <strong>pragmatism of a </strong><strong>struct</strong>. What a beautiful baby !</p><p>Also, I’ve been testing records with <strong>Dapper</strong> and it works like a charm.</p><h3>Pattern matching improvements</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rHqZG2fyn17lN1XLvdB6gA.gif" /></figure><p>C#9 introduces new keywords <strong>and</strong>, <strong>or</strong> and <strong>not</strong>.</p><p>Combined with a new syntax you can do things like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/23f296e615c799fad47f954ccdc0b6d6/href">https://medium.com/media/23f296e615c799fad47f954ccdc0b6d6/href</a></iframe><p>You see, in the above example, you compare the string with the constants null and empty string. This replaces the tedious use of string.IsNullOrEmpty() .</p><p>You can also check if something is not null by writing a code like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bee6a53634c4c54f7c52a482aac60746/href">https://medium.com/media/bee6a53634c4c54f7c52a482aac60746/href</a></iframe><p>And it also works with numbers, and inside switch expressions for more <strong>advanced use cases</strong>. But I’ll let you experiment that by yourself.</p><h3>Top-level programs</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PiE_GKIrHgQSlGctZ4u38g.gif" /></figure><p>With that feature, C#9 almost becomes a scripting language just like Python.</p><p>Just like this, you can basically write C# code <strong>outside of the scope</strong> of a method or a class.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2701c4e31f58a01d4b4525d36f03e91a/href">https://medium.com/media/2701c4e31f58a01d4b4525d36f03e91a/href</a></iframe><p>Yes, <strong>the above C# code compiles</strong> with a simple dotnet build.</p><p>This is very good for C# beginners, and can be useful for Unity developers, manipulating C# scripts all the time.</p><p>I’m curious about the future advanced uses of such a feature. I see that as a <strong>replacement</strong> to the use of Main function for configuration code. Typically while configuring a WebHost for ASP.NET.</p><p>This will allow C# developers to publish microservices that consists of <strong>just one C# file</strong>. That can be <strong>time saving</strong> for proof-of-concept apps or small apps like a chatbot or an AWS Lambda.</p><h3>Json Enhancements</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QcsBHSJAF_awlXTEvYYO8Q.gif" /></figure><p>Now let’s talk about the framework itself. With .NET 5, Newtonsoft.Json has been replaced with System.Text.Json.</p><p>By doing that, Microsoft makes the .NET framework more <strong>independent</strong> and closely tied with <strong>framework evolutions</strong>.</p><p>In fact, that JSON framework migration had already started with .NET Core 3.1. With .NET 5, that evolution anchors itself even more into the framework with performance improvements and feature enhancements.</p><p>Such migration can also <strong>break</strong> existing code, as the engine of ASP.NET Core 2.0 was based on Newtonsoft.Json. Be careful when you migrate, especially if you used JsonPropertyAttribute. It’s now being replaced by JsonPropertyNameAttribute.</p><h3>Docker</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EE7-JT9pym9l0Zxi-gXf6A.gif" /></figure><p>When we think about <a href="http://asp.net/">ASP.NET</a> deployed in the cloud, it is common to think about Docker. With .NET 5, Microsoft removed a build pack dependency called buildpack-deps.</p><p>By doing that, they could decrease the docker image file by <strong>40%</strong> on Debian Linux.</p><p>Just take a look at the below chart. That’s very good news.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NNCOIZu5XntRl4cQ4k_DDQ.png" /><figcaption>Docker whale was on a diet for a while.</figcaption></figure><p>This basically means that every docker pull will be faster, resulting in <strong>faster deployments</strong>. Gotta go fast !</p><h3>.NET 6 … and Apple Silicon ?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*KPhZ4c9VdP3yKsFE9iHN1g.gif" /><figcaption>The announcement of the M1 chip (© Apple)</figcaption></figure><p>Finally, I want to talk about the next release of .NET, which is .NET 6.</p><p>As you may know, Apple announced in november new Mac computers with their own processors based on the <strong>ARM architecture</strong>. These processors are called M1. Their main advantage is that they are blazing fast compared to their Intel counterparts.</p><p>But transitioning to a hardware that’s <strong>so different from Intel</strong> infers that the software has to <strong>adapt</strong> to it. A thing that Microsoft didn’t do with .NET 5. <em>Yet</em>.</p><p>In this next release, Microsoft <strong>announced</strong> via a GitHub <a href="https://github.com/orgs/dotnet/projects/18">project</a> that they will <strong>enable</strong> .NET support on <strong>Macs with Apple Silicon</strong>.</p><p>I personally think that this move is <strong>crucial</strong> for Microsoft, as it is a needed step to build a solid <strong>cross-platform development ecosystem</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13718fd7a99c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/discover-net-5-13718fd7a99c">.NET 5 :  5 New Features … and Apple M1?</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to: Configure Azure Web App Logging With .NET 5]]></title>
            <link>https://medium.com/swlh/how-to-configure-azure-web-app-logging-with-net-5-786918eb2ff3?source=rss-a92ec8aaf7fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/786918eb2ff3</guid>
            <category><![CDATA[dotnet-core]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Chris J.]]></dc:creator>
            <pubDate>Sun, 15 Nov 2020 15:17:02 GMT</pubDate>
            <atom:updated>2020-11-30T16:27:05.435Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to: Configure Azure Web App Logging With .NET 5</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OViNXHtJqbHIq9VxvOUZKw.png" /><figcaption>dotnet-bot © .NET Foundation</figcaption></figure><p>Azure Web App Diagnostics are a set of tools provided by Microsoft which purpose is to provide logging capabilities for ASP.NET Apps deployed to Azure. The logs are typically stored in the filesystem of the Azure App Service.</p><p>While developing a Web App or an API, this can be very useful in order to debug it.</p><p>Prior to <a href="http://asp.net/">ASP.NET</a> Core 2.1, logging on Azure was pretty straightforward. The logs wrote by an Microsoft.Extensions.Logging.ILogger were defaulted to be logged in a file accessible via Azure.</p><p>But starting with <strong>.NET 5</strong> (and maybe .NET Core 3.1), <strong>logging configuration</strong> <strong>has to be more explicit</strong> in order to enable it.</p><p>The goal of this article is to guide you through configuring Azure logging with .NET 5, and then to show you where to find them quickly.</p><h3>Step 1 : Enable the filesystem logs on Azure Portal</h3><p>In order to enable the logs, just go to your app’s settings and scroll until you see <em>App Service Logs</em>.</p><p>The most important setting to enable is the <strong><em>Application Logging (Filesystem)</em></strong>. Then put the <em>Verbose</em> level to be sure to not miss any log.</p><p>Just<strong> follow the above figure</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gG98PgWGxNppZ07OvgkJDQ.png" /></figure><h3>Step 2 : Write the configuration code</h3><p>From .NET Core 3.1 to .NET 5, the logging configuration code takes place <strong>inside the </strong><strong>Program class</strong>, right while configuring the web host.</p><p>First, install the package Microsoft.Extensions.Logging.AzureAppServicesusing <a href="https://www.nuget.org/packages/Microsoft.Extensions.Logging.AzureAppServices">this nuget</a>.</p><p>Then, add the following code while you configure your web host:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/576fa682cfc91790fc71cc5832c84845/href">https://medium.com/media/576fa682cfc91790fc71cc5832c84845/href</a></iframe><h3>Step 3 : Eventually, log !</h3><p>From a controller, or anywhere else, acquire the logger via IoC and start logging.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e949df78ed97216ed35857076355d613/href">https://medium.com/media/e949df78ed97216ed35857076355d613/href</a></iframe><h3>Step 4 : See the logs quickly</h3><p>On the Azure portal, there is a log stash where you can stream the logs right from your web browser. It is called the <strong><em>Log stream</em></strong>.</p><p>Just navigate to the <strong><em>Log stream</em></strong> settings pane, and admire your<strong> very own</strong> logs !</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GU7e3y9Rla0uqnyTiwQp5A.png" /></figure><h3>Conclusion</h3><p>Et voilà ! You successfully added logs to your Azure App service.</p><p>You can learn more about logging with .NET 5 <a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/logging/?view=aspnetcore-5.0">here</a>.</p><p>For example, you can configure your logs with file-based app-settings, instead of using code like we just did.</p><p>Have a pleasant day ! 😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=786918eb2ff3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/how-to-configure-azure-web-app-logging-with-net-5-786918eb2ff3">How to: Configure Azure Web App Logging With .NET 5</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why building Safari App Extensions is a nightmare in 2020]]></title>
            <link>https://medium.com/swlh/why-building-safari-app-extensions-is-a-nightmare-in-2020-48cb1a79c8db?source=rss-a92ec8aaf7fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/48cb1a79c8db</guid>
            <category><![CDATA[safari]]></category>
            <category><![CDATA[browser-extension]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[mac]]></category>
            <dc:creator><![CDATA[Chris J.]]></dc:creator>
            <pubDate>Fri, 01 May 2020 14:34:04 GMT</pubDate>
            <atom:updated>2020-05-01T20:01:19.144Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZEVjI3hy8vlNlc-b1N6NSQ.png" /><figcaption>Vladimir Cauchemar and Clara Safari</figcaption></figure><p>Safari App Extensions is the new way of Apple to develop Safari Extensions along with Cocoa Mac apps. Integrated into the App Extensions environment, it was a logical step to harmonize the ways to extend your Mac apps’ functionalities.</p><p>It came with a promising and <strong><em>innovative</em></strong> tech stack for a browser extension: a Swift/Javascript combination rather than a full Javascript experience.</p><p>With this in mind, I was pretty excited. I mean: <em>develop for the web with Swift</em> ? This is the best news since the release of Vapor !… Right ?</p><p>Or so I thought. I decided to give it a shot, and I discovered how <em>unstable</em> the development experience was.</p><p>Why though ? I’ll explain.</p><h3>The Debugger kills your process abruptly</h3><p>Yes, you heard me. While you run the “hello world” example that Xcode provides, after 1 or 3 minutes, Safari closes itself, and so does your extension.</p><p>You might think that’s a Safari crash, but that’s in fact a part of the dev process. From what I have seen, the Xcode debugger <em>kills the browser</em> if no interaction/messaging is found during a certain lapse of time.</p><p>So to avoid this, what you have to do is to write that code inside your injected script :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9bdf44a98916bbd4d72fe8e0b90443f6/href">https://medium.com/media/9bdf44a98916bbd4d72fe8e0b90443f6/href</a></iframe><p>This will send a ping to the app every second, just like a keep-alive, begging the debugger not to kill your process. <em>However</em>, this should be done only while <em>debugging</em> and <em>not for production code</em>.</p><p>Also, under <em>release</em> configuration, this does not apply, and the Safari App Extension runs without killing the browser.</p><p>In addition, the docs do not mention this debugger behavior at any time. Well <em>almost</em>, as this <a href="https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/ExtensionCreation.html#//apple_ref/doc/uid/TP40014214-CH5-SW1">archive paper</a> proves that an App Extension can be killed anytime by the system if it takes long to load.</p><h3>The extension sometimes fails to install to Safari</h3><p>When you’re developing Safari App Extensions, you might run into that error in Xcode’s debug console :</p><blockquote><em>Computing the code signing dictionary failed for extension with identifier com.developer.myapp</em></blockquote><p>This might happen more often when your extension’s certificate is self-signed.</p><p>To avoid this, you have to:</p><ol><li>Close and <strong>quit all instances of Safari</strong></li><li>Click Product → <strong>Clean</strong> build folder</li><li>Run your <strong>Cocoa Mac App</strong> <strong><em>first</em></strong> by changing the scheme in Xcode’s toolbar.</li><li>Run the <strong>Safari Extension</strong> by changing the scheme in Xcode’s toolbar.</li></ol><p>My theory is this happens because self-signed app certificates might expire sooner than Developer Program Certificates. And that’s why we have to rebuild the app almost every time we run the project: to renew the local certificate.</p><h3>Recommended articles</h3><p>Being totally honest, those frustrations were a bit <em>legitimate</em>.</p><p>I believe it is a common developer behavior to start digging into the code without really understanding how everything works.</p><p>Great programming guides from Apple explain the interactions between a Safari App Extension and the Containing App. Reading them toned down my anger and made me understand the overall functioning.</p><p>So, I highly recommend to read:</p><ul><li><a href="https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/ExtensionOverview.html#//apple_ref/doc/uid/TP40014214-CH2-SW2">App Extension Programming Guide: Understand How an App Extension Works</a> : The guide that explains it all. The Why, the When and the How.</li><li><a href="https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/ExtensionCreation.html#//apple_ref/doc/uid/TP40014214-CH5-SW1">App Extension Programming Guide: Creating an App Extension</a></li><li><a href="https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/ExtensionScenarios.html#//apple_ref/doc/uid/TP40014214-CH21-SW1">App Extension Programming Guide: Handling Common Scenarios</a></li><li><a href="https://developer.apple.com/documentation/safariservices/safari_app_extensions">Safari App Extensions | Apple Developer Documentation</a></li><li><a href="https://developer.apple.com/documentation/safariservices/safari_app_extensions/building_a_safari_app_extension">Building a Safari App Extension | Apple Developer Documentation</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48cb1a79c8db" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/why-building-safari-app-extensions-is-a-nightmare-in-2020-48cb1a79c8db">Why building Safari App Extensions is a nightmare in 2020</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to : launch an AppleScript from AppKit on Catalina with Swift]]></title>
            <link>https://medium.com/macoclock/everything-you-need-to-do-to-launch-an-applescript-from-appkit-on-macos-catalina-with-swift-1ba82537f7c3?source=rss-a92ec8aaf7fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ba82537f7c3</guid>
            <category><![CDATA[macos]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[applescript]]></category>
            <dc:creator><![CDATA[Chris J.]]></dc:creator>
            <pubDate>Mon, 20 Apr 2020 16:05:44 GMT</pubDate>
            <atom:updated>2020-04-29T05:36:33.987Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to launch an AppleScript from AppKit on Catalina with Swift</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*eApfm5zEuMu0Io8DXqeKsQ.jpeg" /></figure><p>AppleScript is a scripting language for Apple platforms that allows interactions with macOS apps you use every day. With its human-readable syntax, it is a useful language for inter-process communication on macOS. You can, for example, open a tab on Safari, make it browse a certain URL, or even (I believe) display stuff on the Touch Bar.</p><p>AppleEvents is a system in macOS that allows inter-process communication with AppleScripts to work properly.</p><p>Good thing is that Cocoa/AppKit apps you build yourself can run an AppleScript with a simple Cocoa class. Before macOS Catalina, just a call to NSAppleScript.executeAndReturnError could do the trick for you.</p><p>Unfortunately, Catalina came with its batch of security patches that made the development of AppleScript-based Cocoa apps less easy. Entitlements, self-authorization, all of that stuff is needed to be able to run AppleScripts.</p><p>This article will help you through the needed steps to call an AppleScript from a Cocoa App on macOS Catalina.</p><h3>Modify the Entitlements</h3><p>Before you dig into the Swift code to run the AppleScript, you need to configure the entitlements. You actually need to add two fields to it. The entitlements are contained in the file &lt;your-app-name&gt;.entitilements.</p><ol><li>One of type Boolean named <strong>Apple Events</strong>. Set the value to <strong>YES</strong>.</li><li>One of type Array named <strong>com.apple.security.temporary-exception.apple-events</strong>. Set its value to a certain number of items of type String . Their values are <strong>the ids of the applications you want to interact with</strong> using AppleScript. Each time you want to script an app, add its id in there.</li></ol><p>Here’s an example:</p><figure><img alt="A picture that shows everything to modify the Entitlements" src="https://cdn-images-1.medium.com/max/898/1*sanKeHJwFZxIqTDGYOmRUQ.png" /></figure><h3>Modify the Info.plist</h3><p>You need to add a key-value pair in the Info.plist file. Specifically, you need to add the line named <strong>Privacy — AppleEvents Sending Usage Description</strong>. The value is a sentence that is specific to your business, like so:</p><figure><img alt="Do you allow automation for this app ?" src="https://cdn-images-1.medium.com/max/1024/1*0OOemWDN1c3MU2zgBejKLg.png" /></figure><p>Also, the <strong>first time</strong> you will <em>run</em> your app, <strong>you will be prompted with a window</strong> that will ask you if you allow your app to interact with that other app on your computer. And the sentence I mentioned above will be written inside that prompt. The users of your app will also be prompted with that window. Of course, answer yes to that prompt.</p><h3>Safari-specific manoeuvre</h3><p>If you wish to control Safari from AppleScripts, there’s one more step to be added. You will need to :</p><ul><li>Enable the Develop menu in Safari if not already enabled in Safari’s Advanced preferences.</li><li>Enable <em>Allow JavaScript from Apple Events</em> in the Develop menu.</li></ul><h3>Finally: the code!</h3><p>If you successfully configured your app like below, you’re ready to type on some Swift! <em>Allons-y!</em></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/63d1b63398c04667068adead3adec854/href">https://medium.com/media/63d1b63398c04667068adead3adec854/href</a></iframe><p>That’s pretty straightforward. You initialize the NSAppleScript and you execute it. You then get back the error if any inside an NSDictionary. You can then call that function wherever in your view controller.</p><p>Here, the script pauses Apple TV. But you can do anything else with any scriptable app as long as you declared that app in the entitlements.</p><h3>Conclusion</h3><p><em>Et voilà</em>! You successfully ran AppleScripts from your Cocoa App.</p><p>After I did that little experiment, I realized that the best option to control Safari remained the Safari extensions. Just because of that Safari-specific manoeuvre that is a feature killer for non-developer users.</p><p>But to control everything else from your own app, this can be a galvanizing path to take.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ba82537f7c3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/macoclock/everything-you-need-to-do-to-launch-an-applescript-from-appkit-on-macos-catalina-with-swift-1ba82537f7c3">How to : launch an AppleScript from AppKit on Catalina with Swift</a> was originally published in <a href="https://medium.com/macoclock">Mac O’Clock</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to: publish a Hugo static website to Heroku]]></title>
            <link>https://medium.com/@Fish_AndCustard/how-to-publish-a-hugo-static-website-to-heroku-c22eb2ae69af?source=rss-a92ec8aaf7fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/c22eb2ae69af</guid>
            <category><![CDATA[hugo]]></category>
            <category><![CDATA[static-site-generator]]></category>
            <category><![CDATA[heroku]]></category>
            <dc:creator><![CDATA[Chris J.]]></dc:creator>
            <pubDate>Sun, 15 Mar 2020 23:11:09 GMT</pubDate>
            <atom:updated>2020-03-18T10:37:01.464Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dhEcwncDGJdrp_sv" /><figcaption>Photo by <a href="https://unsplash.com/@helloimnik?utm_source=medium&amp;utm_medium=referral">Hello I&#39;m Nik 🎞</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Hugo is that new hot static site generator written with Go that makes being a webmaster<strong> fun again</strong>. If you don’t know it yet, you should <a href="https://gohugo.io/">check it out</a>. I might be writing an article about that anytime soon.</p><p>Heroku is certainly not the place of choice to host static websites. In fact, it is meant to be a powerful cloud hosting service for web apps of all sizes.</p><p><em>But let’s say the truth</em>: it is easy to learn and configure. And its free plan has a wide-range of advantages for hobbyists like me. It is also insanely easy to deploy static websites with just a little trick that involves a simple index.php file and a composer.json.</p><p>That’s the reason why Heroku might be your choice to host your Hugo website.</p><p>To deploy a Hugo website, a buildpack exists. You can look for it on GitHub. But let’s again say the truth:<strong> <em>you ain’t gonna need it</em></strong>. To quote them :</p><blockquote>Because Hugo renders static websites, you can host your new Hugo website virtually <strong>anywhere</strong>.</blockquote><p><strong>Anywhere ? I see. Let’s go.</strong></p><p>If you’re a good person, your Hugo project is already under source control.</p><p>Here’s what you need to deploy a Hugo website on Heroku :</p><ul><li>One more git repository</li><li>Good git understanding</li><li>Basic heroku understanding</li><li>A Heroku Dyno</li></ul><p>I also assume your Hugo project is <strong><em>already under git source control</em></strong>. If not, run a simple git init at the root of it.</p><p>All right ? Let’s begin.</p><h3>What will we do ?</h3><p>We will create a <strong>small local pipeline</strong> that will help us deploy the contents of the public folder, which contains the &quot;compiled&quot; html of our static site.</p><p>Plus, <strong>every time</strong> you are going to compile your site with the hugo command, you will be able to deploy it to heroku.</p><p>In order to do that, we will initialize a git <em>submodule</em> that will be just that compiled code, that will be deployed to Heroku. With a few tweaks to make it work with an Heroku app.</p><h3>Step 1 : Initialize the submodule</h3><p>At the root of your Hugo project, run the following command:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/22d023f17eb1ad1e0130485a35869eef/href">https://medium.com/media/22d023f17eb1ad1e0130485a35869eef/href</a></iframe><blockquote><em>This will remove the public folder form the index. As we will create a submodule from that folder, we need to take this repository out of the index. This won’t actually remove the files ! :)</em></blockquote><p>Go to your favourite online code host (GitHub, Bitbucket…) and create a repository at there. Name the repository my_awesome_website.public , or any other name that fits to you. <strong><em>Create a</em> </strong><strong>README.md <em>file in it</em></strong>.</p><p>Go back to your Hugo public directory and type the following:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b01c2b28aa3b11dcbe9be0c3fee51ca9/href">https://medium.com/media/b01c2b28aa3b11dcbe9be0c3fee51ca9/href</a></iframe><p>Inside the public folder of the Hugo project, create an index.php file. Put the following code inside of it:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/24692b0cbe23f35a1c4ec536bdf958ee/href">https://medium.com/media/24692b0cbe23f35a1c4ec536bdf958ee/href</a></iframe><p>Similarly, create a composer.json file. Put the following code inside of it:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b3e90b151fa62f065bfb50abbf5379ca/href">https://medium.com/media/b3e90b151fa62f065bfb50abbf5379ca/href</a></iframe><p>At the <em>root</em> of the Hugo project, type the following:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f5190c4b967618ec280f5b5e4ee9ecd1/href">https://medium.com/media/f5190c4b967618ec280f5b5e4ee9ecd1/href</a></iframe><h3>Step 2 : Deploy !</h3><p>With a terminal, go to another directory. Somewhere else than your Hugo project. Let’s say for example ~/projects.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/075be121a9ae7d49a8f66e8ffd45e17f/href">https://medium.com/media/075be121a9ae7d49a8f66e8ffd45e17f/href</a></iframe><p>Inside this folder, run the following command:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/02174b3a427185014fb9c03c369dfa1c/href">https://medium.com/media/02174b3a427185014fb9c03c369dfa1c/href</a></iframe><p>From the my_awesome_website.public repository, create your Heroku app if it does not exist already, or associate your repo to an existing one:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9aea58c14d622bbc83e1c42ff3a9d462/href">https://medium.com/media/9aea58c14d622bbc83e1c42ff3a9d462/href</a></iframe><p>Then, deploy to the Heroku app with:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/036b96e1823b96cad6a5688bdd3e1e08/href">https://medium.com/media/036b96e1823b96cad6a5688bdd3e1e08/href</a></iframe><p>And <em>voilà</em> ! Your site should be deployed accordingly to that Heroku app.</p><h3>What happens when you update your site ?</h3><p>If you update your site, let’s say you add a blog post or you modify the files in the data folder, and you want do deploy it, you&#39;ll have to run this from the <em>root</em> folder of your Hugo project.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1a69568ac05251436542b463119229ac/href">https://medium.com/media/1a69568ac05251436542b463119229ac/href</a></iframe><p>Then, in the other folder that is somewhere else than your Hugo project (In our case ~/projects/my_awesome_website.public, do the following:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3e1edc923b9b1e032035623eba98f0de/href">https://medium.com/media/3e1edc923b9b1e032035623eba98f0de/href</a></iframe><p>It should be done !</p><p>Also, you would see that the submodule changelog at the root of the Hugo project is gathering changes as soon as you commit new code to it. Like:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d656007227b589e14c190254939a77d0/href">https://medium.com/media/d656007227b589e14c190254939a77d0/href</a></iframe><p>It’s your choice to commit them or not :). Personally, I would do it to keep the repository clean.</p><h3>Improvement Ideas</h3><p>You could make a script that would take care of compiling the site (with hugo) that you would run with a git hook&#39;s pre-push scripts.</p><h3>What I’ve learned</h3><p>While developing <a href="http://christopher.science/">my showcase website</a> using Hugo, I learned about git submodules.</p><p>I see there is a true interest to use them as a dependency resolver, especially when you modify the code of the module, and you want to merge it with updates.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c22eb2ae69af" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>