Sign up

Websites and blogs of people that attended a Homebrew Website Club Düsseldorf.

A public list by dan.

lennybacon.com Valid

If time is an issue, the lack of reading might be the root cause

Look at the following code: var x = new Date('2016-01-29T14:00:00'); console.log(x.getTime()); Running it in different browsers is surprising 1454076000000 // Chrome | FF | Opera 1454072400000 // IE | Edge MDN says: The getTime() method returns the numeric value corresponding to the time for the specified date according to universal time. I repeat according to universal time! ECMA Script Spec says: Time is measured in ECMAScript in milliseconds since 01 January, 1970 UTC

lennybacon.com Valid

The only thing you can trust is your trace output!

The Visual Studio Team is in the process of switching the debugging engine (at least since VS 2013). Today I experienced a really scary behavior. Here is a screenshot of the legacy engine and the new one – both failing to show me that the List contains 75 items, but in different ways. Lesson learned: The only thing you can trust is your trace output!

lennybacon.com Valid

Data Lake WTF

After an Update of Visual Studio 2015 (14) I wanted to use my usual keyboard short cut ([ALT] + [D]) to expand the “Debug”-menu and … Two menu entries listening to [D] now? For this ridiculous amount of 4 (in words four) menu entries? Seriously? Just delete the folder. And voila: Back. Productive. Done. Dear Microsoft, please stop that kind of marketing making developers every day life harder. I know you can do much better!

lennybacon.com Valid

Junctions with PowerShell

Junctions are really useful. It pretty easy to create them inside a command shell on windows: But as it is a command inside cmd.exe and not a executable you cannot use mklink from PowerShell without calling cmd.exe BUT: the *New-Item *cmdlet supports options to achieve the same since Windows Management Framework v.5.

lennybacon.com Valid

Magdeburger Developer Days 2016

Hier gehts zur Anmeldung…

lennybacon.com Valid

Update all ArgumentNullExceptions to nameof syntax

Pretty simple with the search and replace of Visual Studio using Regular Expressions: Find what: throw new ArgumentNullException\(\"([a-z|A-Z]*)\"\); Replace with: throw new ArgumentNullException(nameof($1));

lennybacon.com Valid

Why Microsoft's Browser Developer Tools suck

Ok, this is kind of a rant post. I acknowledge that Microsoft is really really doing a good job at certain (developer) spots (ASP.NET, Visual Studio, IIS, SQL Server, …). But NOT at the browser developer tools – I’m listing my issues here, hoping the IE-Team will listen and make the world better for everybody. Dev Tools Pinning Location Why can’t I pin the developer toolbar on the right side as in every other browser.

lennybacon.com Valid

Handling Request too large and identify limits in ASP.NET

For security reasons request sizes are limited by default. This is configurable in the web.config file through the httpRuntime sections maxRequestLength attribute. The value is an integer and it’s default value is 4096 (KB) and therefor is 4,153,344 bytes or 4 MB. The configured values can easily be read using the .NET configuration API: If an request is larger than this value a HttpException is thrown when the HttpRequest properties Forms, Files or InputStream are accessed.

lennybacon.com Valid

Updating the .NET target framework for many projects

I do component based development. Meaning I have 30+ repos, builds and each of them has 1-10 projects – The main library project, tests, samples and so on. The news about the support end for the .NET Framework 4, 4.5 and 4.5.1 was the motivation to update ALL of my projects. I know this is not neccessary because… .NET 4.5.2, 4.6 and 4.6.1 are compatible, in-place updates on top of .

lennybacon.com Valid

NRW Conf 2015

Since more than a decade just community (a non commercial organization that I co-founded) organizes the NRW Conf. This year the attendee numbers increased again slightly which means we cannot grow anymore (because of fire prevention the upper limit is fixed) as long as we stay in the same location (die Börse). But the attendees love it and so do we. I’d like to thank all sponsors, attendees, speakers and stuff for making it such a great event!

lennybacon.com Valid

NET Developer Days 2015, PL

Last time I was in Poland was 2006 for the Microsoft Technical Summit. This years October I was invited by the amazing Maciej Pilecki and his company DataMaster who organize the .NET Developer Days Poland. They did an amazing event with an international speaker line up. They got two Scotts (Hanselman and Hunter) and even managed to bring me and my former boss Clemens together (warning the distance between our home places is about 60 Km!

lennybacon.com Valid

Basta 2015

It felt great to be and speak at Basta! again. Thanks to the organization and the audience. Here are my slides and samples: Defensive programming, resilience patterns & antifragility http://www.slideshare.net/lennybacon/2015-basta-2015-de-defensive-programming-resilience-patterns-antifragility https://github.com/lennybacon/resilience-patterns-js https://github.com/lennybacon/resilience-patterns-ts JavaScript & Build http://www.slideshare.net/lennybacon/2015-basta-2015-de-javascript-und-build

lennybacon.com Valid

Network 2015, UA

It had been ten years ago, since I was the last time in the Ukraine. Back then in Kiew I held an architects workshop together with Michael teaching Service Oriented Architectures with the Microsoft .NET Framework 3.0, Windows Communication Foundation (WCF) and Windows Workflow (WF). I can remember that I lost my luggage (bad) and the nice people, good questions and superb feedback we received (definitely good). Nataly Potapova, of Sigma Software, contacted me to ask If I would like to become one of the speakers for the Network conference.

lennybacon.com Valid

.NET Framework 4.6 Release

The new framework version is out. As with every new release it seems to me that the search indexes on Microsoft downloads have not been rebuilt yet. So I abuse this blog post and note the download links to myself… Microsoft .NET Framework 4.6 (Offline Installer) for Windows Vista SP2, Windows 7 SP1, Windows 8, Windows 8.1, Windows Server 2008 SP2 Windows Server 2008 R2 SP1, Windows Server 2012 and Windows Server 2012 R2

lennybacon.com Valid

Maven Archetypes in IntelliJ

IntelliJ has the ability to use Maven as build and project system. The concept of an archetype is a predefined project or project template. When “File | New project” is used to create a new project and “Maven” is selected the following dialog is displayed: IntelliJ comes with a few archetypes but of course custom ones can be added. On the MVN Repository for example several archetypes for Wildfly are available: http://mvnrepository.

lennybacon.com Valid

Code Snippets in IntelliJ

Code snippets can be helpful. Otherwise the can lead to code duplicates – so use them with wisely. In JetBrains IntelliJ the code snipptes are called Live Templates. They are stored in files saved in C:\Users\{UserName}\.IntelliJIdea{Version}\config\templates on Windows and ~/.IntelliJIdea{Version}/config/templates on Linux. To create a live template open IntelliJ and open the Settings from the File menu. In the Settings dialog you can use the search text box to quickly access the Live Templates section.

lennybacon.com Valid

Get the public key for the InternalsVisibleTo attribute

Get the public key for the InternalsVisibleTo attribute from a string name key pair file: Get the public key for the InternalsVisibleTo attribute from a strong named assembly:

lennybacon.com Valid

Enable or disable FxCop Code Analysis solution wide in Visual Studio Package Manager Console

I really like FxCop. But in a debugging session it can be useful to save time by temporarily disabling the code analysis. Sadly there is no global switch to turn it off and on again. So here is my approach: Create a new text file in the directory C:\Users\{your user}\Documents\WindowsPowerShell named NuGet_profile.ps1 and add the following code: Restart Visual Studio. Click the menu View | Other Windows | Package Manager Console.

lennybacon.com Valid

Using credentials based on a SecureString that is disposed

Today I was building a credential store API. One implementation against the Windows Credentials Manager (CredMan), the other one persisting information in a database. Of course the data is not persisted in clear text. I use either the MachineKey functionality or a RSA certificate based encryption. So far so good, but I want the passwords to be secure in memory to. The .NET Framework already has a Type built in for that purpose: SecureString

lennybacon.com Valid

Speed up Firefox: Manage Cache

Open Firefox Type about:config into the address bar Search for browser.cache Set browser.cache.disk.enable = false Right-click | New | Integer | disk.cache.memory.capacity = 65536