An oldies week – stored procedures

This week has been a bit of a surprise. First I got some questions about NHibernate, which I realized I have been blessed from using since around 2011, then today I got into a small discussion about stored procedures and that it’s viable to let it contain logic. I’m well aware that this is a religious question and that you probably find your self in on camp or the other. Me, I’m more in the camp of no business logic in SPs, but I can see an use-case for it as well. But then again, I’m flexible and try to look at each situation objectively.

Read More

MyCouch – New fix release & some words about meta-data

I usually don’t blog about when I do a new release of MyCouch – THE async .Net driver for CouchDB and Cloudant; so why this time? Well, because it’s a rather embarrassing little fix, in the sense:

Why did I not support this earlier?

Yeah, why didn’t I? Let me try and explain why but first, lets look at what the fix actually solves.

Read More

Uri behaves differently in .Net4.0 vs .Net4.5

Got a bug report this week, that MyCouch didn’t support id’s formatted with e.g. a slash person\1. So, I was missing an encode of the segment in the Uri. Quite an easy fix. Just identified the few spots where the encode and decode was needed, e.g in my UrlSegment. Added a call to Uri.EscapeDataString running my newly added integration tests. Seeing them become green in .Net4.5 but red in .Net4.0. What!?!?

Read More

Honored to have become a tag in someone else’s blog

I’m actually honored to have become an actual tag in someone else’s blog. Thanks “David Zych”, kudos to you. Thanks for questioning my previous post.

a made it to become a tag 02

To be clear, I just wanted to highlight the difference in performance of it as I find these kind of stuff interesting. I emphasized on the relational value 400x as it’s generally more easy for people to grasp. The numbers are there as well so that people, like you did, could come to their own conclusions. But I’m not saying anyone should mindlessly switch. More know about it and reflect over it, maybe in cases where it’s used as a tuple list. Is that what they are for? Or more for usage of bit flags?

Read More

C# – SomeEnum.ToString measured to be 400x slower

Every LOB application within .NET seems to consist of two things: 100000000000000000 if( x != null) { ... } and 32456783 SomeEnum.ToString()executions. Lets leave the if-case and instead focus on the 400x slower SomeEnum.ToString(). Yes. You read “400x slower”, but slower than what? And does it matter?

Today, I overheard discussions about Enums and ToString and performance considerations of using it. I know what you are thinking right now. You are thinking about Donald Knuths quote: “Premature optimization is the root of all evil”. But I had to know. Was this true? So as soon as I got home I had to try. Yes it seems to be true. And if SomeEnum.ToString() is heavily used as part of your “algorithm”, maybe you should re-consider changing your design, as it might be rather simple.

Read More

Stockholm – Use the technology of today to get more focus on quality and fair prices

I’m living in Stockholm in Sweden, and as many others I commute everyday to work. I think the system is working OK, but I do believe the technology used to charge for travels is used in the wrong way. There has to be a change in the pricing model as it’s outdated. It does not reflect the year of 2014 and it doesn’t make use of the possibilities that technology today brings. We could have something that is more fair and puts focus on delivering a higher quality service for daily travelling.

Read More

CouchDB – many-to-many relations

CouchDB is one of those databases that is super simple to get started with and then has its not so obvious “tricks” how to accomplish things that might have felt super natural in another DB. Now, first lets pause right here and think of what I just said:

…might have felt super natural in another DB.

CouchDB is a document oriented database where you query on simple or complex keys, which are produced by you using a secondary-index defined by a map-function (as in map-reduce). It is not a database designed for relational data as graph databases (e.g. Neo4j, OrientDB) or RDBMS. CouchDB is not optimized for handling relations. You can mimic it, but be aware that it can come back and bite you in … ..

Read More

Aerospike for a C# developer – Day 1

Just started evaluating Aerospike as a potential key-value store. So far I really like the experience and the product. How-ever, as a C# developer, life could be a bit happier with some small adjustments from Aerospike. Let me pinpoint the ones I stumbled upon during my first hours with it. But please. Don’t get intimidated by this post. Look at the below as small tips to ease the getting started process.

Read More

Follow

Get every new post delivered to your Inbox.