This side up please

by DotNetNerd 5. March 2020 11:29

On my current project we started seeing issues with images, especially when taken using an IPhone, that were shown as being rotated. Reading up on it I found that this is due to IOS using EXIF orientation, which is not always handled the same way on eg. Windows.

I found a couple of functions, that I modified to work with our TypeScript codebase, so that it utilizes async/await and has a minimum of type information. I suspect they might be useful for others, or myself later on, so here they are.

More...

Build: What’s new in TypeScript

by DotNetNerd 9. May 2018 19:41

So Build is well underway, and I finally got around to diving into some of the talks that are online. One of my early favorites is Anders Hejlsbergs talk on news in TypeScript.  Anders gives a good run through of the TypeScript typesystem, starting with the basics and covering why it is so different from other type systems, and in many ways ground breaking work even for a language designer like him. More...

2017 review

by DotNetNerd 20. December 2017 10:30

Another year has flown by, and it has been quite a change of pace for me. With my daughter being born last year, I have had to prioritise more than ever. Not really a surprise, but when you are going into it you don’t really know what will be possible. Looking back it has definitely changed my every day life for the better, although I have had to cut down on some spare time activities.

More...

Type(Script)Ahead

by dotnetnerd 14. December 2017 07:48

Recently I ran into a task that I had encountered less than a year ago with another client. In both cases the client was using Bootstrap CSS for their grid layout, but didn’t have much need for the Bootstrap JavaScript bits. After a while the need for type ahead functionality arose, so the first time around we agreed to include the Bootstrap JavaScript so we could use the Bootstrap Typeahead plugin.

However having to include jQuery, Bootstrap JavaScript and a plugin, which still required me to make some tweeks to work properly, didn’t sit well with me. So the second time around I opted to implement type ahead on my own. More...

Template for TypeScript, Handlebars and Webpack architecture

by dotnetnerd 5. October 2017 12:05

I recently started a new project, based on my own medicine of not using a framework, but building a simple architecture, that can grow and change freely based on needs as they arise. It is coming along very nicely, and has allowed us to have a pretty clean architecture.

For this project we chose to base the solution on TypeScript, and use handlebars for views along with a few other small libraries. As a clientside build tool we wanted to use webpack, because it is fast, has a lot of plugins that we can use, and is well suited for working with css modules. More...

TypeScript patterns: Lazy

by DotNetNerd 12. July 2017 08:48

I have been working with TypeScript for quite a while now, and I really enjoy how the strong typing enables better tooling, as well as more understandable code, where the patterns of old look more like themselves, than they do in plain JavaScript. With the adoptation that TypeScript has seen in the last couple of years, I think it is safe to say that it is a good bet going forward, so if you are not already on board I highly recommend it. I will bet your time is better spent with languages and patterns, than they are learning the framework flavour of the day – although they do in themselves provide inspiration for patterns.

More...

TypeScript 2 – full speed ahead!

by DotNetNerd 1. May 2017 10:30

I have been happy working with TypeScript for quite a while now, and I am happy to say that things are moving ahead with the language quite well. It is not that long ago that TypeScript version 2.0 was realeased, and with steady releases we are now at version 2.3.

One of the big things that came to TypeScript in version 2.0 was discriminated union types and the option to do strict null checks, which combine quite nicely. Discriminated unions are simply done using the pipe operator, and the compiler will do strict null checks if you use the --strictNullChecks switch. More...

TypeScript 2.0 beta non-nullable types

by DotNetNerd 13. July 2016 07:19

tsOne of the nice features of functional programming languages like F# is the lack of null. Not having to check for null every where makes code a lot less errorprone. As the saying goes "What can C# do that F# cannot?" NullReferenceException". Tony Hoare who introduced null references in ALGOL even calls it his billion-dollar mistake. The thing is that although this is quite a known problem, it is not trivial to introduce non nullable types into an existing language, as Anders Hejlsberg talked about when I interviewed him at GOTO back in 2012.

With version 2.0 of TypeScript we do get non-nullable types, which has been implemented as a compiler switch --strictNullChecks. More...

Initial thoughts on Angular 2

by dotnetnerd 31. May 2015 16:29

I was asked to do a talk about Single Page Applications and Angular 2 in a couple of weeks. At first I was a little sceptical, because Angular 2 is far from a finished product yet. After agreeing that the main points could be around SPA architecture, TypeScript and how you can build these kinds of applications without using a framework I said yes. So lately I have been working on the talk and the first part has been quite easy to do. Yesterday I got started on demoes, and dived into Angular 2 for real.

More...

Is TypeScript taking hold?

by DotNetNerd 7. April 2015 13:08

Fantastic times! I just got back from a week off around easter, summer is almost here and I was awarded Microsoft MVP for ASP.NET/IIS for the first time. So all I that is missing is getting some blogging done.

At the moment I am really enjoying TypeScript, and I am feeling really good abouts future with the recent collaboration between the TypeScript and AnguarJS teams. I still argue that in most cases where you want your solution to live long, you should avoid the SPA frameworks. However I concede that they are popular, so it is a good step for TypeScript, which I think will help the adoption. I also think it will be good for Angular 2.0, to avoid introducing their own new language, and instead get the benefits of the good work done on TypeScript itself as well as tooling.

More...

Who am I?

My name is Christian Holm Diget, and I work as an independent consultant, in Denmark, where I write code, give advice on architecture and help with training. On the side I get to do a bit of speaking and help with miscellaneous community events.

Some of my primary focus areas are code quality, programming languages and using new technologies to provide value.

Microsoft Certified Professional Developer

Microsoft Most Valuable Professional

Month List

bedava tv izle