CouchDB – Hyper-V

Tiny, little tip coming. If you as me, are setting up CouchDB on e.g Hyper-V on your local computer at home, you need to fix a three settings. Two of them are obvious, the third is a bit less obvious.

Read More

Simple JavaScript slugify

I confess. Me and regular expressions aren’t buddy, buddies. So it took some trial and error before reaching this point with something useful in the context of generating slugs. There are probably tons of scripts like these, but here we go.

Read More

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

Follow

Get every new post delivered to your Inbox.