I’m sorry if you are an English spoken reader but this very post is published in Polish only. The reason for that is it describes issues related to Google Adsense and Polish tax law.
This blog is still supposed to be maintained in English so please do not get discouraged.
Wiadomym jest, że to osoba która zarabia w programie Google Adsense jest odpowiedzialna za sprawy podatkowe. W moim przypadku nie są to duże pieniądze, ale zacząłem się zastanawiać w jaki sposób mam postępować by nie mieć problemu z Urzędem Skarbowym.
Znalazłem ciekawy post Google Adsense – Podatki i jego kontynuację. Autor tego bloga wspomina dwa utarte schematy: (po szczegóły zapraszam do lektury tych dwóch postów, bo autor się postarał; ja tylko w skrócie):
- jeśli w danym miesiącu dostaniesz przelew z Google Adsense, masz czas do 20. dnia następnego miesiąca na zapłacenie podatku od tej transakcji; do końca kwietnia następnego roku wypełniasz PIT-36 (bo miałeś dochody z tzw. innych źródeł)
- wypełniasz PIT-36 (bo miałeś dochody z tzw. innych źródeł) i płacisz podatek od wypłaty z Google Adsense tylko raz, dopiero podczas składania deklaracji podatkowej za rok poprzedni
Continue reading ‘Jak zapłacić podatek za Google Adsense?’
Recently I’ve read a kind of summary post of my friend where he described his blog in numbers. I thought this is a great idea – those who follow a blog get more background on its existence.
Let me describe my blog in numbers, if you like:
- 27 months – first post was published on April 14th, 2007
- 148 posts
- 435 comments
- I started tracing visitors (with Google Analytics) on March 16th, 2008 (a year after first post) – 210,000 visitors ever since
- best referring sites: google search (172k visitors), dzone.com (3k), reddit.com (2.6k), bing search (2.5k), yahoo search (2.2k), stackoverflow.com (1.2k)
- 1 DZone Big Link: Exeptions and Errors in Java
- I have been invited to DZone?s Most Valuable Blogger lodge (more details)
Many thanks to all that have helped achieving these results. Thanks for thank-you comments, crutial remarks and suggestions to what I’ve published, and just visting my site.
Published on
August 18, 2010 in
books.
Tags: books.
Some time ago, DZone has introduced an interesting feature – DZone Refcardz. This is a collection of cheat sheets (111 items by now) on different topics, e.g. programming languages, developer tools and IDEs, development approaches and trends.

Cheat sheets will never replace books, full time trainings or tutorials – they are meant to be short and brief; supply the reader with the basics and summary; simple enough. You won’t learn the subject in details but DZone refcardz are worth giving a try.
I can see several usage models: (i) get a general meaning on a subject new to me (if I like it, then I go for it in details), (ii) refresh something, (iii) get back to it when in need of checking something quickly.
DZone Refcardz homepage: http://refcardz.dzone.com
Sending emails in C# is easy; for basic use cases you don’t need external resources to send a note because .NET BCL already ships it. On .Net Developer Center, there’s a short description how to do it.
Now, how to fetch the email? It turns out it is not that easy – it’s not supported by .Net BCL. I spent a while researching for the best library that matched my purposes and I want to share my views on a couple of components I looked at.
Note: Please bear in mind I was interested only in a small piece of functionality such library could provide. My need was only to fetch an email (in plain text) with attachments. That was supposed to be done via POP3. I was not really interested in features like advanced sending emails (e.g. email templates), request and delivery receipts, support for iCalendar, email in HTML, etc. To sum up, I did not test libraries from that angle and therefore this comparison will not suit needs of all developers.
Continue reading ‘Comparison of .Net libraries for fetching emails via POP3′
Visual Studio provides solid support for unit testing. One of the features are VSMDI files – test meta data file. The file is not much readable but Visual Studio comes with easy to use GUI for managing tests (grouping them in test lists, filtering, etc.).
All in all, VSMDI files are really helpful but…
- After a while there are several VSMDI files (MySolutionName1.vsmdi, MySolutionName2.vsmdi, MySolutionName3.vsmdi, …) in your project although only one is in use (and therefore added to source control). This is a known bug discovered in Visual Studio 2005. More information can be found there.
- Painful merging. Merging can be smooth or really painful. It is the latter with VSMDI. Sorry, with VSMDI there’s no such thing like merging. If you discover someone else has changed and checked in VSMDI file (conflict), just replace your local changes with server version and repeat your changes.
The reason for the mess here is each test is given ID which is a GUID which tends to change once in a while.
- Not runnable tests. This doesn’t happen too often but I’ve experienced it several times already. When you try to run some tests you are told they are not runnable because there are multiple tests with the same ID (again, IDs…) – see below. Of course you haven’t played with IDs…
At least this is an easy one (but not when you see that for the first time). Just refresh the whole test list view – select List of Tests in Test List Editor window and click refresh.
Ok, so that’s my list. Any points to add here?
A while ago, on April 6th, one of my posts, Exeptions and Errors in Java, became a DZone Big Link. As a result, the link was tweeted automatically and is available at DZone’s Twitter. I was really happy to be noticed in Web
But today I got pleased even more! I was noticed again; I received invitation to join DZone’s Most Valuable Blogger program. What it is, according to DZone:
DZone’s Most Valuable Blogger program brings together a group of highly talented bloggers, authors, and technologists actively writing about topics of interest to the developer community. These people are recognized in the industry for their contributions and deep technical knowledge on subjects ranging from software design and architecture to programming on a range of platforms including Java, .NET, Ruby and others.
You can see the list of MVBs at Meet the DZone MVBs. At the moment there are about 200 people listed and, as far as I have noticed, only a couple of them lives in Poland.
Update, 2010-07-12
I am now officially an MVB!
Update, 2010-07-23
Just got an MVB t-shirt too

It happened to me after connection to TFS was dropped. and I was moved to offline work mode. Default VSTS settings say whenever you start editing a file it will be automatically checked out and it will appear on Pending Changes window. However, after those connection problems I no longer experienced that behavior.
Solution
First of all it’s worth checking VSTS Source Control related settings according to this article. In my case everything was fine there.
The problem on my side was somewhere else. After I had gone offline I had to go online again (what a surprise?!). I was expecting that to happen after reconnecting to TFS, but that is not entirely true. What I had to do as well was use ‘Go online’ button at the top of solution explorer. Once pressed it listed all the files I had modified while in offline mode and VSTS started working as before.
Note: I assume you can rebuild the program you are having problems with because changes in its configuration settings are required.
If you are struggling with this problem you are probably running 64bit OS and executing 64bit exe that loads 32bit dll, or the other way – 32bit OS on which 32bit exe tries loading 64bit dll. For the sake of this post, let’s assume this is the former matter.
Solution
You need to assure that 32bit dll is loaded by the program with the same bittness, even if it’s running on 64bit platform.
In order to achieve that you need to change the configuration settings of the project whose outcome is that exe so that platform target is always x86, disregarding configuration platform. Let’s assume that program is written in C#.
Open project’s properties, go to Build tab and make change as below:

Microsoft Foundation Classes (MFC) library provides CButton which, according to MSDN, can be used for creating a check box, a radio button, and a pushbutton.
There are two events CButton supports: (i) ON_BN_CLICKED (single click), (ii) ON_BN_DOUBLECLICKED (double click). Let’s assume you provide a meaningful implementation for a single click and do nothing in the event handler for the double click (empty method’s body). The result if a single click is obvious, but what will happen if user double clicks the check box (or the other CButton representation)? There are two possible answers (assuming the check box was unchecked initially):
- Check box will be checked, and then unchecked – a simulation of a double (single) click
- Check box will be checked only – one action takes place now
Continue reading ‘MFC: CButton and how ON_BN_DOUBLECLICKED message map works’
I’ve been using both Subversion and Team Foundation Server (TFS). Because I first used Subversion and started using TFS afterwards, I had to get used to TFS flavors. I think TFS is great but to be honest there were a few things I missed from Subversion and a few things that really annoyed me when I started using TFS.
So, this is a list of strong and weak points of TFS from the perspective of a developer who switched to it after using Subversion.
Weak points
- Subversion promotes a very clear view (similar to CVS) on the files tree on the server: trunk, branches, tags. In TFS everything is in one bag – branches are simple directories among the other content of ‘the trunk’. It still looks messy to me.
- If you want to edit a file you need to check it out for edit so that it’s listed in Pending Changes window after it’s changed. If you edit a file directly in Visual Studio it checks it out for edit automatically; however, if you make the changes outside Visual Studio (you need to change Read-only property prior to that) and forget to check it out for edit in Visual Studio the file is not listed in Pending Changes window. Consequently, the risk of not including that item while making a check-in increases (I personally experienced that a couple of times….)
- It’s dedicated to Windows platforms only, but this is hardly a problem for a team who uses Visual Studio
- Weak support for reverting changes – read more
- It’s not a free tool
- Complex installation
- Update, 2010-08-22 Lack of switching feature. With Subversion I could easily switch between trunk and branches / tags, still using the same source directory. The action was straightforward and quick. On TFS you need to make a full check out of the other branch, which is longer and requires additional actions (e.g. IIS settings for new virtual directories)
Strong points
- Integration with Visual Studio
- Integration with work items (bugs, tasks, scenarios, test cases, etc.) – in other words your team needs only one tool (Visual Studio Team System) for all project chores. This actually promotes TFS to be a more powerful tool that a source control only.
- Shelving changes – ability to set aside pending changes temporarily in order to switch to another task – read more
- SQL Server backend (e.g. backups)
To sum up, both Subversion and TFS are powerful. There’s not an easy answer which tool is better. Despite not giving a direct judgment, it really seems to me TFS is better for bigger projects – one tool needed for all kind of project tasks (work items, source control, bug tracking, planning). What are your thoughts?
P.S. Probably the list above would look differently if I first used TFS instead of Subversion