By default ASP.NET core API methods operate on JSON: they deserialize JSON from request/response body to model type and back. JSON is everywhere and works well… unless you have very high throughput requirements. There are many alternative formats, but Google’s serialization format Protocol Buffers is one of the most used. It has overgone some changes recently: the old proto2 syntax is replaced with proto3. The latter even has an official C# support.
Today I had some 20 minutes spare time and I wanted to try games my co-workers had recommended for me.
I use VS Team Services for some of my repositories. I use the Git repository type, and most of the time everything works fine. Until today I reorganized some of my Go code to be more idiomatic, meaning that I leverage the native Go package system as it is designed: the only way to reference packages is by their full repository URL:
I changed some of my websites deployment to use different deployment slots on a single Azure web site instead of having different web sites for different staging areas. I deploy all my staging areas automatically from TFS (using the GitContinuousDeploymentTemplate.12.xaml process), each area from different Git branch. Works for my setup.
Since Office 2013 was launched, I’ve had some problems with Outlook and account settings: I can set up all the accounts, but Outlook refuses to display my default Exchange calendar on the todo-pane, and instead shows an empty calendar from one of the other accounts that I use for email only. I like the todo-pane as its easy to glance whats coming with it. I’ve searched for resolution a couple of times, and most Microsoft community answers suggest to change the default data file on via Outlook > Account Settings:
I visited my local pharmacy last Friday to get some prescription drug. I sat in front of the pharmacist, who gave me very thorough guidance about the usage. At the time of payment - before she handed me the boxes - she suddenly said:
OWIN stands for the “Open web interface for .NET”. Basically it is a reasonably simple specification that defines how data goes through the request pipeline, and how to attach to that pipeline. It is a specification for both the server and the application (middleware on OWIN’s terms) part.
I have touched this subject already twice: first I I blogged about forcing site rendering to be done with Internet Explorer’s latest engine. Then I faced a situation where separate intranet zone (bad idea, Microsoft!) fallbacks to compatibility mode and does not respect the IE=edge meta tag as internet zone web sites do.
I’ve always been a music fan. Not a die-hard-fan, but one with lots of music and decent equipment. During the era of CD’s, I routinely bought new discs, and they accumulated in hundreds. And then hard disk prices fell and network speeds grew, and I wanted to digitize all I had. This was years ago, maybe around year 2004. I wanted everything in lossless format, as digitizing was slow and I was not going to do it again. “Alternative” media format (.flac, .ogg) support was poor in Windows world, and I chose lossless windows media audio (WMA). I spent many evenings changing the disc on my laptop, and typing album and track names when they were not automatically found from media info databases.
I already blogged about the original platform Orchard I used to host this blog. I needed a new blogging platform, and after all the complexity I wanted something simpler and easier to upgrade.
When I originally started this blog I had two options: use some readymade blogging platform, or host one of the blogging platforms myself. I wanted a complete control of everything, and decided to build the blog to my own hosting. As .NET was (and partly still is) my thing, I wanted the platform to be .NET based. Sadly, none of the available platforms pleased me: dasBlog was aging and was not updated, DNN was too complex and written in Visual Basic. Luckily there was one new emerging platform called Orchard that was exactly what I wanted.
A while ago I blogged about a recurring problem in my laptop: event log was filling with Software protection service scheduling errors, and the fix was to change one system folder’s permissions. I ended up re-installing my laptop from scratch (to Windows 8.1), and again after I joined the machine to our company domain and installed Symantec Endpoint Protection the problem re-appeared. I still do not know which - domain or SEP or both together - is the root cause, but as the problem emerged over and over again, I gave up and automatized the change. I created one batch file:
I have had some weird problems on my Windows 8 laptop, and while fixing those I noticed a recurring Error event on my event log:
It is again winter holiday time here in Finland, and as our land is mostly flat, you need to travel a long way to reach any hills suitable for real downhill skiing. For me that means ~12 hour drive from my home town Lohja to Finnish Lapland, more specifically Ylläs ski resort. You can get there by train or with an airplane, but as some of our friends live half way there we usually end up driving the whole way.
A week ago we had Microsoft TechDays 2013 at Finlandia Hall, Helsinki. For me this was fifth year in a row talking at Finnish Techdays; once I have talked about Azure, all the other talks have been about web technologies and trends. This time was no exception: I talked about real time web need and patterns, and about SignalR as one implementation tool. I enjoyed talking, and I hope I provoked at least some of the 200 listeners to think beyond the traditional HTTP Request/Response pattern we use to build web apps.
Last year, when my kids got interested in learning to read and write, I decided to do what I tend to do: bring technology to the table. I created a simple web site that narrates input text, and shows navigable history of the given input on the page.
I visited NDC 2012 and enjoyed the conference a lot. Again. Awesome speaker lineup without too much product group advertisements. Lots of thought provoking lessons. Lots of fun tongue-in-the-cheek style stuff in between. Like Damian Edwards and Rob Conery “fighting” each other with SignalR and Socket.io, respectively (video here). On that cage match Rob used a cool narrator from command line (they used narrators since Damian had lost his voice), and for some reason that fascinated me.
I know I’m late to the game but I received my Lumia only yesterday. I’ve had a Windows Phone 7 LG E900 a.k.a LG Optimus 7 for 16 months now and I’ve generally been very happy with it. Even though the Lumia is so much newer, spec-wise it does not add much to my old LG: slightly faster HSPA network, faster processor, and some Nokia software, that’s all. Below I’ve listed some pros and cons of Lumia over LG.
A while ago I blogged about forcing site rendering to be done with Internet Explorer’s latest engine. This feature is very well documented by Microsoft. Not that well documented is that adding the X-UA-Compatible header with value “IE=edge” does only half of the job: it overrides document mode, but not browser mode, and therefore you might end with situation like below - even if you carefully tried to avoid it by placing the meta tag (I know, I just did).
I guess this is a common problem: you need to have different web site layout for unauthenticated users. In simple cases this is very easy: just use masterPageFile attribute on views. But it gets more complex when you have views that are used in both authenticated and unauthenticated context. Luckily MVC lets you plug into almost anything, and this can be solved with an action filter like this:
Recently I encountered a bug that only some users saw, and which did not reproduce locally on development environment. The setup was:
New Internet Explorers have a necessary (?) but annoying feature called “Compatibility view”. I do not need that in my sites since I try to keep my HTML in good shape. Therefore on all projects I want to disable the feature since usually it breaks the layout. Disabling compatibility view can be done by adding a meta tag to HTML head:
I have been an ASP.NET developer since it was invented, and a legacy ASP developer before that. For long I spent most of my time doing ASP.NET Web Forms and it was OK: I remember lots of weird problems that needed extensive trial and error –debugging, but things weren’t that bad.
Lately I have done too much work and too little play. I decided to fix the situation a bit by starting to go through my never ending list: “TODO: Try these technologies or services”. Since I had one site that needed relocation to new hosting I decided to finally try AppHarbor. The service is a no friction cloud hosting with a tagline “Azure done right”.
I’m building a site that will mainly be used with mobile browsers (> 60 %), and so I decided to build it mobile first and then adapt to desktop browser widths with CSS media queries. Natural framework choice for easy mobile development is jQuery mobile; now I’ve been playing a couple of nights with it already and mostly have liked the experience: this framework is very convention based, and at least as long as you follow the conventions everything is remarkably easy.
Blog archives part not working when blog is the site home page
When the Mango update was released with all the warnings about backups of backups, I decided not to go for it. But then, only half a day later, I was in a process of installing the update. Couldn’t resist. It took long but I succeeded not to brick my phone, and now I’m running Mango and mostly like what I see. Here is a list of some of the improvements that I value and see on my daily use from an end user point of view (i.e. not developer). I expect to see even more when applications start to support Mango, and Microsoft polishes the OS before RTM.
I had a very common requirement to fill: when user clicks form submit button (or enter on keyboard) the button needs to be disabled in order to prevent double submits. Double submits could of course be filtered at server side with various timestamp mechanisms, but this was not what I was after this time.
Ever faced this situation: You have nice and easy controller method, say:
Yesterday I blogged about using form button names to select action methods on an ASP.NET MVC controller. After using that attribute for a while I realized that I can make a generalization out of that: why not use any form value in the action method selection process? This way I can avoid code like this:
Very common problem in form-heavy solutions is to be able to have one HTML form, but two different submit buttons for it. Think “Save” and “Delete”:
I find myself searching for this information over and over again for each web site I develop, so I guess I must blog this topic to remember it from now on.
A small but annoying bug I found today (and seems that someone else is having the same problem): when using jQuery.tablesorter) plugin together with tablesorterPager, applying the pager clears some properties from the table; In this case namely zebra striping. After initialization first table page is not striped, but next ones are after the first table page change.
In the project I recently worked for our solution’s web interface froze every now and then. This problem had been going on for a while, but every time the problem went away by itself without any intervention. No problem, until the issue escalated even to developer workstations, making them slow.
I started to actively follow blogs about 6 years ago. I still remember the first blog I regularly followed was Brad Abrams’s blog. I followed blogs because they were interesting, they showed me a world outside my current company, and they contained lots of technical tidbits. Also, at that time they were the fastest way to spread information and helped to understand what’s cool right now.