Since we came to France four years ago we’ve been adjusting to normal way of life, which includes declaring and paying taxes every year. I say “normal way” because in Serbia most of the taxes people end up paying are the taxes on the salary, and that is paid immediately before you receive your pay-check. Other taxes are mostly evaded, this way or another, and state fonds are therefore generally empty, which leads to poor social security and no money for the army, schools or pensions (all the money comes more or less from the same place).
It took a bit to adjust to the fact that taxes need to be declared, even if you pay for it monthly (so you can’t forget to pay and be penalized for it). Each year there is a different date limit (this year the end of may) by which you have to declare it. The process is unfortunately such that first you get a form by post from your local tax authorities and then you fill it in and send. The first year we never got the form, ended up not declaring taxes and paid penalty of 10% 
Since then I take care and declare on time. French government has been quite loud in announcing the possibility to declare taxes online and has been offering a small money incentive of 20 Euros. Since I practically live online, year after year I’ve been trying to declare online but there’s always been some kind of problem. The latest stupidity from last year was that once you start the process online you actually have to wait for about 2 weeks to get your “certificate” by snail mail and then can proceed with the declaration?!?
This year the government finally got it right – based on several very long numbers that can only be found on my tax declaration form (that I still receive by snail mail) they generated a personal certificate for me on the fly. I can then proceed to “sign” the electronic declaration and do the whole process in a matter of minutes. The certificate was automatically imported into Firefox (all popular browsers are supported and there are detailed instructions for non-techies online) certificate store and I was able to successfully export it and import it into Internet Explorer 6. Great stuff!
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
I have about 3 hours to burn here at the Zurich airport and what better way to spend it than with my trusty laptop? I was a bit surprised to find very few signs mentioning any kind of wireless Internet access. Of course, there are enough hot-spots and even 5–6 Internet providers to choose from.
The prices are still quite uneven and the access is generally expensive. In the end I found one provider that charged about 6 Euros for 3 hours of access. The others generally asked for 4 Euros for half an hour.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
I have recently run into a few performance problems with my (code name) NTorrent app – it simply ate too much processor time even though most of the time it did nothing (that’s what I thought at least).
Since I had a lot of time to design it, I did not expect the design to be an issue and jumped straight into the profiler. I downloaded JetBrains’s dotTrace trial because I expected the problem to be quickly found.
Since I’m writing this, you can for sure guess I was wrong – took me a few days of on and off profiling until I finally figured it out. In the end, profiler did not help me, but it did point in the right direction, if only I was able to see the forest from the trees (or is it the other way around, I always forget).
Take the following snippet of code for example:
internal static int TotalSpace(List<List<byte>> list)
{
int total = 0;
list.ForEach(delegate(List<byte> buf) { total += buf.Count; });
return total;
}
According to the profiler, quite a lot of time was spent in this little function. Now, I looked at the places this code was called from and the frequency of calls and all that – everything looked fine. Probably out of despair and frustration I concluded that the problem must have been in the fact that I am using anonymous delegate instead of straightforward solution like this one:
internal static int TotalSpace(List<List<byte>> list)
{
int total = 0;
foreach (List<byte> bytes in list)
total += bytes.Count;
return total;
}
This of course helped improve performance exactly 0%
Why would an anonymous delegate be significantly slower anyway? It must be me… and it was me.
I did not take into account the size of list that this code was going through. I assumed the size is very low, but I never checked, until I finally put a breakpoint and just looked at the list’s size. Turns out that because of a trivial issue I knew about and ignored for a few months another piece of code that maintained the list degenerated it into thousands of elements, growing over time.
About 5 lines of code later, and a few minutes of testing, my performance problem went away. This is yet another example how even the best tools out there will not help your bad design decisions. Most of the time the performance problems are architectural, and if you’re lucky, trivially solvable.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
Yeah, like you didn’t know that already. But I am still surprised how version after version something new and good comes up. New features, however small, get added all the time.
In one of the latest few point revisions, Sysinternals guys added something that will help me particularly well – I/O bytes history graph. What you can see on the right is the screen shot of all three interesting graphs while the current version of NTorrent (code name) is running. The I/O bytes is useful in my scenario because I still do not do any caching and would like to know if under normal circumstances it matters or not. Other BitTorrent clients seem to agree that it matters and mostly all implement some kind of caching.
Yes, I know I can probably see the same using some of the performance counters, but more often than not I just need a quick and dirty overview of what’s going on – with memory, processor time, I/O activity and sockets (yes, Process Explorer can even list all the socket connections you have open).
If your app is .NET based, you can also find quite detailed .NET related information for your process. Finally, the bug where a Process Explorer would trigger handle leaks while inspecting .NET processes has been fixed, so you can leave it open all the time.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
Yesterday I tried to download Serbian UI language pack to do some testing on a partially localized Windows. The download is free, but requires a Genuine Windows Advantage validity check – essentially, Microsoft wants to make sure your Windows copy is legal.
My copy is legal, so I just clicked the button, completely forgetting that I am using Firefox. Well, it turns out you don’t need Internet Explorer and ActiveX any more – there is a special plug-in (installer has about 500KB) that will enable the validity check straight from the Firefox.
This just goes to show that when Microsoft has an interest to wants to support Firefox, they can 
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
ReSharper 2.0 is finally out. After months of waiting and numerous alpha releases (mostly highly unstable and slow) we got a final release that works reasonably well.
Its installation is still painfully long (relative to its size) and it does slow down the loading times of Visual Studio 2005 considerably. Once loaded though it works just fine, assuming you don’t run into configuration issues.
At least on my machine, I installed the final version over a beta (there was only one). As far as I can see, the installer first uninstalled the beta and then installed the final version. It looked like all of the settings were preserved but in order to get color coding to work I still had to go to Tools->Options->Fonts and Colors, notice that settings are OK (but not applied to the code windows at the moment), press OK and then find the color coding working.
Only to discover that something is slowing down the code windows to the point that scrolling would choke if I would try to scroll up/down too fast. It felt sluggish, exactly what you don’t want your editing experience to be.
Tried several things, restarting Visual Studio, changing more Visual Studio settings, nothing worked. Then I went to ReSharper’s settings and tweaked a few more things and voila – everything works now. Note that none of the settings I changed should have influenced the speed (none of them put more or less burden on ReSharper’s parsing of your code).
So if you run into this problem try resetting the settings or tweaking them a bit…
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
I’ve been playing Serious Sam II on the XBox for the last couple of weeks. As expected, the game is a great fun. The same cool big open environments, lots of strong colors, sunshine and tons of enemies just like in the first part are all present here. Jokes are still over the top and a bit crude (raw) and there are several references to other famous games and movies. In short, this is the game that does not take itself seriously
(pun intended).
But the highlight of the game is a phrase or two that a few of the monsters scream occasionally. Have in mind that this is a fictional world you’re fighting in and most of the enemies are crazy cartoon-ish creatures. The authors, a company called Croteam, are from Croatia and they speak, well, Croatian (which is for all intents and purposes almost the same as Serbian). So instead of inventing an artificial language that creatures would use, they decided to use Croatian. Imagine my surprise when I heard a deep, deep voice threatening “Sad si nastrad’o!” (“You’re done now!”, liberally translated) coming from a monster. I get a kick every time I hear “Boli me!” (“It hurts!”) while emptying a machine gun into a red devil giant 
Knowing the language monsters use makes this game so much more fun
, I’d say even hilarious.
P.S. On a related note, I am ashamed to admit that I still haven't properly absorbed French, even after 4 years of living here. I made an on-the-fly resolution to make this year the year of the French language and have been seriously working on it for a month now, at least twice a week. We’ll see what comes out of it.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
Well, it depends
on which one you use the most I guess… But some people obviously don’t think so. After using a particular language and only that language for a really long time it becomes a second nature to use constructs from that language. So when we switch to another, even if basically very similar language, we still type wrong constructs by inertia.
I have that problem with VB.NET – while helping my wife with her ASP.NET project I had to use VB.NET but I would constantly start typing in C#. Last time I used VB-like language was in the days of Microsoft Access 2.0, circa 1996 – and I only used a VBA derivative then.
Then the other day I needed to write a hex constant and I didn’t know how to do that. While searching the Internet, I ran into a post where a guy had exactly the reverse problem – he was trying to read C# code and couldn’t figure out the way hex constants were written.
He said how the problem was that (I paraphrase) there is a problem with the hex constants in C# because they are not written in a natural way like in VB.NET.
It didn’t occur to him that natural is different for developers who primarily use other languages 
P.S. C# and C++ (probably Java too) use 0x2F, while VB.NET uses &H2F to denote a hex constant 2F. So, C# – prefix with 0x, VB.NET – prefix with &H.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
For years I was hearing from my brother and other Web developers how crappy Internet Explorer’s CSS support has been. Broken box model, extra margins and paddings, wrong font sizes… All this time I thought – so what's the fuss? A few broken rules here and there, so what?
Well, after building a relatively small database driven site in ASP.NET 2.0 and having to style it too (not just do the coding) I can finally understand these people. I wouldn’t want anyone to have to face the struggle with Internet Explorer to respect your CSS. It is absolutely unbelievable how many small things do not work properly. It’s all minor if taken in isolation, but together… it’s a nightmare.
I can’t wait for Internet Explorer 7 to clean most of these things up and I pity all those poor souls who had to endure this madness over the years, especially in the early days. At least we have Firefox today to verify our sanity and understanding of the standards…
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
With the risk of sounding like a language zealot, here’s my reasoning what went better with C# than with Java… Before I begin, let’s clear this out of the way – I can only assume that some of the reasons that follow are due to historical perspective and Microsoft learning from Sun’s mistakes.
First of all, after looking into a relatively large Java application (Azureus, a BitTorrent client) it is perfectly clear how much delegates and properties clean up the syntax in C# vs Java. There is a shit-load of thin interfaces and classes in Java that simply help implement event sources/listeners, where in C# we have delegates. There are so many get/set methods in Java that you can’t see real functionality. This mostly looked like a syntactic sugar to me (and to a certain extent it is) until I saw how much cleaner the code looks with and without it. Delegates in C# also have asynchronous support which is even better – instead of everyone making their own, we can all just use the built-in one.
Due to high number of interfaces everywhere, Java projects seem to be over-engineered more often than not (but I have seen C# projects with useless interfaces everywhere too). Mostly everything has an interface and an implementation – do we really have a need to reuse all of the classes??
C# libraries seem to favor consumer (developer) convenience over API purity, while with Java it’s all about canonical and minimalistic interface (see previous post).
There are other things that don’t work with Java (no ValueTypes, faking generics support instead of changing the VM in the latest incarnation) but I wanted to point out just a few that you’d normally never take issue with.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5