I was recently reading the Forerunner 920XT review. The 920XT apparently does not allow you to charge the watch while in activity. I’m wondering who approved that? Even the old and cheaper series 410 allowed to do that as I wrote. I know the watch is aimed at triathletes and the battery life is enough for even an Ironman triathlon if you’re a bit trained, but there are longer races. Races I like participating in - ultra running (or ultra marathons if you wish).
About a week ago I needed to wait on all tasks to complete and also do some side processing as any completes. Sure I could wrap it using
ContinueWith or something like that, but I made it from other way around.
I called my method
WhenAllOnAny for lack of better ideas. The method ended up pretty straightforward. I’m doing
WhenAny as long as there’s at least one task still running. When one completes I fire the event.
New 18.104.22.168 version of ADO.NET provider for Firebird is ready for download. As you can spot from version number change it’s not a huge release, but contains some useful changes.
Klávesnice je programátorova lopata. Nebo tak něco. No a Visual Studio může být třeba násada. :) Na lopatu nepotřebujete navěsit hromadu ozdob. Potřebujete se jen naučit ji pořádně používat.
Takže 22.1.2015 od 17:30 na WUGu ve Zlíně vám ukážu co všechno se dá rychle dělat, aniž by bylo třeba myší, touchpadů nebo třeba velkých pluginů.
The requirement seemed simple. Get a stream of data and upload it using HTTP to server. The stream might be possibly large so complete buffering is is not an option. Nothing special.
But I was banging my head for last day (actually two times half of the day) solving it. The problem was I had to (and wanted to) use
HttpClient because that was what I was using in the rest of the code I have for talking to my API. And
HttpClient was fighting a little.
Maybe a bit late with Christmas gift. But better late than never, right? Also just before end of the year because what’s a better plan than to update your production software last day of year. Go for it. :-P
Anyway, new 22.214.171.124 version of ADO.NET provider for Firebird is ready for download.
Simply speaking it works without a glitch. Plug in, boot, set up Wi-Fi network and done. Now it runs days without crashing, freezing or something like that.
I’m writing a tool that has, at the core, only one task. Upload file or files to the Azure blob as fast and as efficiently as possible. Nothing special overall. The devil is in details. As usual.
In Injecting dynamic logging as if it was in original class (NLog, Castle Dynamic Proxies) I created simple helpers for logging to be injected into proxy classes used as actual implementation. This “aspects” work great until you start using
Before Entity Framework 6 was finalized I wrote posts ( and ) showing how with the help of conventions you can save yourself some tedious typing for databases following strictly SQL standard in respect to upper case and (not)quoting (see previous posts for details).
But that was pre-EF6 era and some API changed. In fact it’s now even way easier to do that.
Version 126.96.36.199 of ADO.NET provider for Firebird is ready for download.
When I wrote the AsyncPrioritySemaphore few months ago I quickly found how the continuations are processed once “unleashed”. Lately I was using the same class again and I was monitoring the behavior. That made me think about what could be done and how.
After measuring the
lock statement compared to naked
Monitor calls I got some remarks about my code not being equivalent. Of course it’s not. If it would be equivalent the time would be (should be) same. I wrote it as I did because I think there are some problems with the
When I’m teaching my “parallel-threading-asynchronous-locking-synchronization” course I discuss the
lock statement a lot. Not only because it’s probably the most widely used “lock”, but also because it’s pretty easy to fall into a trap if you don’t know what’s going on behind the scenes and around you.
Anyway. I often show how the
lock is translated into
finally block and that it does not come for free. And among other things I’m trying to get into the brains of the people I’m teaching is that you should spent as less time as possible inside
lock (of course, with some exceptions) - less contention equals less waiting hence more resources used for real work.
In last couple of weeks I was again confronted number of times with something “asynchronous”. In this post I don’t want to argue about CPU-bound and IO-bound operations with respect to “asynchronous” word. What I’ll talk about is the
async keyword. Because it looks like there’s still confusion.
I have to say I’m bit obsessed by writing as less code as possible and having compiler of language do the work. I don’t like cryptic code, though. It needs to read easily. My problem today was simple. I needed simplify the code that sets new value into property, does something and sets back the original value.
Maybe you remember this from good old Delphi or WinForms days. Set the title of button to “Working…”, do the work, put back whatever was on that button before.
Last week I was working with pretty bad library that from time to time got stuck. No progress. Given the library was fairly young and supported asynchronous methods I suspect there was a deadlock/livelock somewhere. Although the code was open source I had no time (or intention) to debug it. I just needed quick fix.
Po Brně a Praze si “Asynchronní a paralelní programování v .NETu” střihneme v Olomouci. Jsem rád, že lidi toto zajímá. Je to téma co mě baví a rád o něm povídám. Klidně bych povídal a programoval a přemýšlel nad problémy co lidé přinesou hodiny. A když mě někdo poslouchá… :)
Asynchronní proramování nabralo za posledních pár let na obrátkách a dostalo se do povědomí mnoha vývojářů. Ačkoli ve své podstatě se nejedná o nic nového, alespoň v systému Windows. Nicméně příchod C# 5 a, jistě nyní známých, klíčových slov
awaitumožnil použití asynchronní programování bez dřiny.
Pokud vás zajímají detaily od křemíku až po kód, přijďte 13.10.2014 od 17:30 na WUG do Olomouce.
Two years ago I first hiked the Kreuzspitze. The Kreuzspitze in Ötztal Alps – kreu means cross in German and spitze could be translated as peak and as there’s a lot of peaks in (not only) Alps with cross on top, it’s also bunch of peaks with same name in Austria, Italy, Germany and maybe somewhere else. The trail from closest village Vent is not extra difficult (you don’t need to climb) although it’s steep in some sections and the final part being a bit exposed ridge. Later I discovered the concept of FKTs or Fastest Known Times and after a while it clicked me. This could be a great peak to try to summit (and get back down) in record time.