Google PowerMeter and sample C# .Net API usage

Update 2011-06-25A lot of people still contact me about this project. I received this mail today, just in case you’re getting interested by the project, you should know that it will die pretty soon: Dear PowerMeter User, We first launched Google PowerMeter as a Google.org project to raise awareness about the importance of giving people access to their energy information. Since our launch, there’s been more attention brought to this issue, and we’re excited that PowerMeter has helped demonstrate the importance of access to energy data....

May 29, 2010 · Florent Clairambault

Solving BSOD using crash dump files (.dmp)

Blue Screen Of Death are the most annoying things that can happen on Windows. Most of the people just think “my stupid windows just crashed” and sometimes they even get reinstalling it (what a waste of time). But in fact the windows kernel itself never crashes, the drivers do. And from a general point of view, I think it’s better to understand the problems before solving them. It sometimes takes a little bit more time but it makes you save a lot of time in the long run (and everything in life is about time)....

May 14, 2010 · Florent Clairambault

Six Sigma

There’s a definition on wikipedia. It’s much much wider than my tiny vision of this business management strategy. But basically this strategy says : Fix the source of every problem and not each problem. In a factory, it means that have to change the production process to reduce the probability of making defective pieces instead of fixing pieces faster. That means you have to spend time on fixing the problem. So this stategy also means : Spend time to save time....

March 10, 2010 · Florent Clairambault

Linux prioritization : do more with less

I find the concept of prioritization very interesting. It just enables you to do more with less. Doesn’t that sound great ? Let’s say you want to be able to respond to user requests as fast as possible but update your data in a low priority manner : You can set the process CPU priority from -20 (high priority) to 19 (low priority) by using the command : nice -n <priority> <command> You can set the process IO priority in 4 classes (0: none, 1: realtime, 2: best-effort, 3: idle) with some priorities within these classes (0-7, lower being higher prio)....

March 7, 2010 · Florent Clairambault

Stupid C++ vs C# performance comparison

I found out that there is real test than the little one I did here. The core of the post is this spreadsheet : I recently did a basic comparison test between C++ (g++) and C# .Net (mono). My point is to show that the .Net framework has performances close to the C++ ones. It allows automatic hardware-specific optimization. The only real drawback you have in the .Net framework is the garbage collector....

February 26, 2010 · Florent Clairambault

D language

This is just a very short post about this language I recently discovered : the D language. As described on its little website : “D is a systems programming language. Its focus is on combining the power and high performance of C and C++ with the programmer productivity of modern languages like Ruby and Python. Special attention is given to the needs of quality assurance, documentation, management, portability and reliability.”....

February 25, 2010 · Florent Clairambault

SPSecurity.RunWithElevatedPrivileges

If like me you’re wondering what exactly does SPSecurity.RunWithElevatedPrivileges, this is what I understand of it : SPSecurity.RunWithElevatedPrivileges( () => { using( var newSite = new SPSite( site.Url ) ) { // your stuff } }); Is equivalent to : using( var newSite = new SPSite( site.Url, site.SystemAccount.Token ) ) { // your stuff } So if this is just to open an elevated privilege SPSite, it will be equivalent....

February 22, 2010 · Florent Clairambault

Threads and Sharepoint

When you are using threads on sharepoint, you should take care of some little things : The method used to launch the thread must have the “[STAThread]” attribute, it avoids some huge memory leaks. If you need to use an SPSite from the calling site, you should copy its URL and UserToken to build a new SPSite in the new thread. If you’re not using that “design pattern”, things will get really wrong....

February 20, 2010 · Florent Clairambault

FBSL – Freestyle Basic Script Language

I met Gerôme Guillemin at work (well yes his personal page is totally outdated, he now has long hairs). He invented and supported FBSL, its surrounding development tools and some sample programs. What is quite amazing with this script language is that it only requires a simple 450 KB exe file to run the FSBL scripts and all scripts perform very well (even with the OpenGL samples). The executed programs look like they are some native Win32 applications....

February 18, 2010 · Florent Clairambault

Dirty WordPress APC caching

One or two weeks ago, I made a simple AB benchmarking test on a PHP site I built, it was ok. Then I did the same test on this blog and well… It was freaking slow… On 100 pages with 10 concurrent access, it took 3.5 to 10s to render. Well, I thought I should remove all these plugins I installed to make me and my blog famous (they didn’t perform well)....

February 13, 2010 · Florent Clairambault