• Language doesn’t matter

    My father is a land-surveyor (geodesist if you will). Nowadays he uses a notebook for his field measurements, but there was a time when he used a scientific calculator. Recently he’s notebook went dead, so he wanted to move back to his Casio scientific calculator. But, ups! Not in use for a while the battery ran out and the geodetical programs are gone. So I have to type my old programs back to the small computer. I thought I’ll share one of them as a example that programming language does not matter. What matters is how you use it and how well others could use your work. So let my…

  • It’s not magic – it’s floating point math

    Please remember that 3 / 12 is not always 0.25! 😉 Take this example: int i = 3; Console.WriteLine(i / 12); You will get 0. I admit it could by a little confusing at first but I assure you, there is nothing wrong in the way JIT thinks. We dividing an integer over a… integer. What we are getting? Well, of course an integer! Is it not what you expected? How to fix this? Well the easiest way is to: int i = 3; Console.WriteLine(i / 12.0); You will get 0.25. Why? Well 12.0 is a double so the whole equation will by a double. You can check this easily…

  • ClickOnce i Continuous Integration

    Od wielu lat współpracowałem z wydawnictwem Software. Mój pierwszy artykuł opublikowałem gdzieś około 2003 roku. Publikowałem w Software 2.0, i w Software Developers Journal. Pisałem artykuły do PHP Solutions i dodatków Extra. Współpraca układała się całkiem dobrze i wszystko trwałoby pewnie jeszcze latami gdyby nie to jedno „ale”. Za mój pierwszy tekst otrzymałem największe honorarium w historii mojej współpracy z Software Wydawnictwo. Później z tekstu na tekst otrzymywałem coraz mniej. Najpierw „stroną maszynopisu” było 3800 znaków wraz z kodami, później, 3800 znaków bez spacji, później i bez kodów. Do tego widełki za „nakład pracy redakcyjnej” / naturalnie o ile zastosowane to tylko na minus. Nie wspominając już o tym, że…