What is the difference between this code

using (var fileStream = new FileStream(settingsFilename,
                                       FileMode.Open))
{
    return ReadSettings(fileStream);
}
And this code
using (var fileStream = new FileStream(settingsFilename,
                                       FileMode.Open,
                                       FileAccess.Read))
{
    return ReadSettings(fileStream);
}

Almost nothing, just a little FileAccess.Read !

But this little thing makes a big difference when you run your software in a secured environment.

The application with this piece of code was deployed to a customer reporting that the application was crashing at a the point of reading the settings. Weird, really weird. After getting back the log and I finally discovered that using juste FileMode.Open needs modify rights and that’s was the issue because the customer deploy the settings file on a folder in which the user doesn’t have the modify rights.

Comment and share

A couple of month ago I was introduced by a colleague to f.lux.

At first I thought, hum ok another software that will just eat some memory for nothing. But after 2 days, in fact 2 evening, yeah I work a lot in front of monitors, I was conquered and I recommend this tool to all like me that spend their days and nights in front of monitors!

Continue reading

The other day I posted about “Automated functional tests using Watin and MSpec” which we do at Jobping as a spike to automate our functional tests on our ASP.NET MVC 2 site.

Yesterday evening I was facing an issue in my base class WebBaseSpec which led to really strange side effects. Basically when I was running one unit test alone it was Green, running all or more than one unit test will fail miserably with the well known STA issue of Watin.

Continue reading

We have updated our url shortener for Jobping. jobp.in has moved along to Version 0.5. While maintaining as little features as possible!

Since the initial version we have placed a restriction(web.configurable) on the domain names that the shortener will shorten. We did this so only domains under jobping.com would be processed by the shortener. We wanted to maintain the integrity of the jobp.in domain. With this in place you can be sure that if you click a link shortened by http://jobp.in  it will always go to our site www.jobping.com site.

Continue reading

Day after day I find little gems in IntelliJ 9 that just make me more productive and give me more time to deal with the real interesting things.

Today for example I had to change a web.xml file which I was said that I should take care not to commit because if this file would go to our customer than we would have a problem.

Continue reading
  • page 1 of 1
Author's picture

Laurent Kempé

I am an experienced Team Leader & Distinguished Solution Architect with a passion for shipping high-quality products by empowering development team and culture toward an agile mindset. I bring technical vision and strategy, leading engineering teams to move product, processes and architecture forward.


Team Leader, Distinguished Solutions Architect


Illzach, France