Measure amount of WTFs per package or project

I created a library that measures amount of WTFs per package or project. This library is a by-product that derived from what I was doing few days ago:

I was dabbling with Java and decided to take a break. I came across a well know image that depicts code review session behind closed doors. The image called “The only valid measurement of code quality: WTF/minute”. I decided to make an extension to the latter concept.

This library brings you the ability to mark code smells in your source code (Classes, methods, fields etc.) with ‘WTF’ annotation. The WTF annotation accepts an arbitary message, if none provided, the default message ‘Dude.. WTF?!’ is used instead. When source compiles, the compiler generates a warning using the message from the detected annotation(s) and information about annotated element. The following is a sample output from compiling a class containing WTF annotations:

Warning: : In CLASS [wtf.per.project.model.DummyPojoImpl] :CLASS level => WTF?! Are you for real?! This naming convention is bad!
Warning: : In CLASS [wtf.per.project.model.DummyPojoImpl] : FIELD ‘SOME_CONSTANT’ => WTF?! What is this non-descriptive name?
Warning: : In CLASS [wtf.per.project.model.DummyPojoImpl] : CONSTRUCTOR ‘DummyPojoImpl(java.lang.String)’ => WTF?! Dude.. WTF?!

The library also provides a custom JUnit test runner class. The runner consumes package name, annotation class and search filter through @Grep annotation (used in conjunction with @RunWith). The runner scans .class files under the given package, its sub-packages and JARs for the given annotation (for example WTF.class) occurrences. If String regex pattern provided in @Grep, classes are filtered out from being scanned based on the filter. The runner uses a test class internally to assert whether the code is still infested with WTFs (or any other annotation class set in @Grep).

The analysis of .class files within given package, its sub-packages and any JAR files found is done using reflection. At first I was using third party library called ‘Reflections’ for this task (which is a very good tool btw!), but I ended up not using it anymore. I did not want to have third party dependencies and implemented my own meta data analysis in order to keep the library size small and lean. In the near future, I will extract the metadata analysis logic into a separate library. It should be quite flexible since there different .class file scanners in place. For example, scanner for constructors only or for method parameters, fields only etc.

So, if runner’s test assertion fails (given annotation like @WTF found present in the code), the test class generates metrics about how many WTFs are there and where. These metrics appended to the assertion failure message. For example, the following is the example of the custom JUnit runner:

@Grep(packageName = "wtf.per.project.model", 
classNameFilter = ".*", annotationClass = WTF.class) 
public final class WTFsPerProjectRunner { }

I have few POJOs marked with WTF annoation, the following is the produced output after running the above runner:

Another example of the custom JUnit runner:

//Grep only inner classes 
@Grep(packageName = "wtf.per.project.model", 
classNameFilter = ".*[$].*", annotationClass = WTF.class) 
public final class WTFsPerProjectRunner { }


I created this library for fun. Nothing more. If someone actually decides to use it – great.

If you want you can fork it on Github

Please report if you experience any problems :)

I Have Joined the ThoughtWorks Camp

I have some good news: I am going to be a ThoughtWorker. After two or three weeks of interviews, I have recently accepted their offer and going to start with the company in August.

I am really looking forward to it, since many bright, passionate and talented people work for ThoughtWorks. The company is known for its cutting-edge technology development and being one of the global leaders in enterprise Agile development services. In other words, I am really happy :)

I will keep writing updates from time to time about my experience at ThoughtWorks. Stay tuned.

CrowdSauce is Live!

This is one of the coolest ideas that I have seen since Facebook became a hit. CrowdSauce is a new location based application that allows you to harness the power of the people to get discounts from businesses. CrowdSauce was born out of the idea that, the people, have the power to put pressure on businesses by using the power of the crowd. What is most important – its really fun :)

You get medals as you make requests for rewards from businesses, and you get promoted in rank. They have this army system going on. I am a second lieutenant now :))

What Is The Best Workplace For a Fresh Graduate?

Recently I was invited to do a presentation in-front of soon-to-be graduates at my university where I have obtained my qualification in Computer Science.  Myself and a few other of my fellow ex-classmates were suppose to give students a talk on what to expect after graduation, and what it is like working in the industry.

After my presentation, one of the soon-to-be graduates asked me a question: “What type of companies should the fresh graduate look for, and what jobs should be avoided?

Although it may sound simple, this question was not an easy one to answer. Sure, as an ex-grad my self, I remember our lecturers telling us to take any professional job, to grab any opportunity and just to get a foot in the door. Not a bad advise after all, and many including myself have followed this  path, and I am sure many still are. At the time, I was  told not to worry too much, as at the first job I will be taught everything I need to start my career path.

But only after a few years, I understood how important the first job really is. The first job can shape a graduate into a good or an average IT professional. The first job either can teach the grad the logical approach and how to be meticulous about little details or how to look for shortcuts. Also, the first job will dictate what technologies and tools the grad may use in the future, whether he or a she will become proprietary or an open source IT professional.

Off course, when applying for jobs and attending job interviews, as a  fresh graduate you are not in a position to bargain and demand the best (whatever “the best” means). Simply because the grad does not have the experience and skills to support the demands. Therefore, around the first two years, a graduate has be satisfied with the first job he got, in a hope that the experience gained will help in the professional future endeavors. The graduate hopes that the first company he got into, is a good one and considers him self very lucky to be there. But really, is the first company a good one?

One of the types of companies that I would advise for a fresh graduate to avoid is consultancy firms. Having said that, I want to say that there is nothing wrong in working for a consultancy firm (I am working for one now), it is just as a fresh grad it is not the best place in my opinion to get shaped as a strong IT professional. I will try to elaborate on this.

As a consultant, you are assigned to a different projects, usually on the clients’ site. For a fresh grad, this experience can be similar to a jump into the ocean from a plane high in the sky. One may say there is nothing wrong with that, this experience will force you to learn.

I am not sure that I fully agree here. Sure, this experience will force you to learn, learn something, definitely. Will force you to learn to do what the client needs, to follow the clients’ way. Which is often can be not entirely the right way. A consultant usually costs a client a lot of money, which is why clients want to see results delivered and delivered fast. Therefore this type of environment, is not very good for learning the skills and building a strong foundation nor the client is interested in spending the big bucks for teaching fresh grads.

Another type of companies that I don’t favor as the first job, are the big corporations (for example lets say banks). Working for a corporation at the beginning of your career, your freedom and creativity as IT professional are often restricted. You are forced to use tools that are in place and most probably cannot use other tools to get the job done, even if the other tools are better. In corporation, the fresh grad can start feeling very small, a little screw in a huge apparatus, without a clear understanding why he does what he does.

When I was hunting for jobs after Uni, I was quite skeptical about graduate programs run by some big banks or insurance companies. Usually they teach their own way to do things, which is not necessary the right way. They teach you what they need you to know for them. Corporation can be a big place, and often people don’t have time to teach you, they are there to do their job, get paid and go home. The corporations are lacking human touch, and often not having around a supervisor or a mentor who can be available when you need them, can be a real minus.

Having a mentor. I cannot stress enough when I say, how important is to have a good mentor who is there to give you a “slap” on the head and a “kick” in the right direction. Someone who really cares and have a  passion for what he does. One may say: yeah, having mentor is a good thing, but I don’t really need a “baby sitter”, I am capable learning by my self, Google is full of tutorials.

Sure, we all should (and must) be able to know how to improve ourselves through self learning. I am not saying that a lack of mentoring can be the crucial factor in failing to become a good IT professional. No, not at all. Mentor is just a person that simply has more hands on experience than you, and can explain you things in person, face to face which is sometimes much better than just reading a tutorial on the web.

How many of us, IT professionals are lucky to say that “yes, I have had a good mentor that helped when I began my career path”? I personally can say, that I was lucky. I have had two mentors. Each and every one of them have contributed in their own way to my development as an IT professional I am today. I am still drawing on those experiences and trying to improve my self on a daily basis.

So what is the right place to start working, in my opinion? I think starting in a small company (6-10 employees) is the best option for a fresh grad to get hands on experience and build a solid foundation. Usually small companies are more versatile in their choice of technologies and tools used, and there is a lot of space for creativity and for learning some basic concepts. Small companies have a lot of human interaction between the senior and junior developers, something that can only positively contribute towards professional development.

I admit, that now it is easy for me to sit and contemplate what is good and what is not so good. Many fresh grads, don’t really think that far, they just want to get out there after 3-4 years of University and start making some money.

In summary, I want to say, that the decisions one makes at the beginning of his/her career can really decide his/her professional future. The highest paying job is not necessary the best job, when starting a career. Gaining valuable skills is much more important. Therefore, the first few years of boot camp, are very important in the process of becoming a good, passionate IT professional , instead of someone who takes it as just another nine-to-five job. The latter lacks of creativity and unfortunately modern workplaces are full of them.

Are There No Other Developing Platforms?

I came across a video called Java 4-Ever Trailer. Produced by guys at Java Zone.  Its a trailer about supposedly upcoming movie about an average family living in .NET world.  Their son grows up to be rebellious by starting to experiment with Java as a teenager. I think it is absolutely hilarious. I had to remove a link to the video on Youtube, because its no longer available there.

My favorite moment is when father screams on his last breath “… They actually enable us to send XML messages through SOAP… Through SOAP!! … ”


Social Networking: The Next Big Thing?

I came across a new social site couple of days ago. This happened purely by accident – I was trying to book a cafe shop or a bar for a company’s lunch out and was searching for some cheap bargains for a group booking.

The Google search has led me to The first thought that I had was “Oooh, another site of Facebook type”. But by looking a bit closer I saw that the site has a twist:

Apart from being a social networking online community, also allows you to search for coupons and bargains from local businesses, communities & online stores worldwide (This is why I ended up on as I was searching for bowling bargains).

I think the idea is very simple, yet brilliant – help businesses to offer bargains and discounts to people across the world through social networking. At the end of the day, the one who is benefiting here is the end user, the consumer. Simply put – very cool.

On the Hunt Again and Need Your Help

Well, I have decided – its time for me to move on… Although my current company was/is a good home for over two years, it is time for me to look for another job. I was hired as a J2EE developer by my current company, but after the Java project has finished, I ended up as a PHP developer (Not that there is something wrong with PHP).

As much as it was good to get some hands on PHP experience, I want to pursue a different career path, to do what I really have passion for – Java/J2EE.

I started by updating my resume, which can be viewed here and my LinkedIn profile. I met with my manager for a chat and told him about my future plans and explained him my reasons. He showed understanding and totally supported my decision.

I want to point out that I really enjoy working for a premium SMS aggregator and SMS/MMS area in general, I think its great fun. It would be nice to have my next job related to Telecom too. I responded to several job advertisements that I found on, and even got a few phone calls from two recruiters.

This is already good, it means that people show interest. Having said that, I want to provide some information about my self where I clarify why someone should or should not hire me.

So yeah … why should we hire you?
Well, I can start talking now how with my knowledge and skills I can contribute and help your business grow. But to make it simple – I love programming and I love what I do. I am not saying that I am brilliant at programming, but I think that I am good enough (I am not sure whether it is fair to rate my self).

As an example, I remember times when I managed to find a working solution to the problem that I had during the day while getting a night sleep and dreaming. (Hence the idiom “sleep on it”)

What kind of company are you looking for?
From what I have learned about my self, I enjoy working in more casual and less corporate environment. I feel less productive and less creative in an environment where people make tech decisions according to internal politics. I do not like it, its distracting. I can get frustrated when I need to get signatures of N people to install some software package on my workstation.

I prefer working for open source oriented company and don’t fancy an idea getting stuck in proprietary software house (ie. Microsoft). Not that there is something wrong with Microsoft, yeah?

Having said all that, I want to say that I can work for any type of company, its just from a working culture point of view, corporations are not the highest priority for me.

Are you a die hard geek?
Hm… not a die hard geek, but a geek. Being a programmer for me is not 9 – 5 job. I do like programming and like to tinker with code when I have some free time. I do have other hobbies apart from programming and some of them include my gf and sport. Ok, ok … my gf is not a hobby ;) I like have a few drinks with friends, play a bit of soccer (never really got into Footy) and I box sometimes.

Can you work under pressure, do you manage stress well?
Hey, that is two questions in one. I can work under pressure if I have a deadline. Generally I do manage stress well, and when I am not, I just need to remember to walk away from the computer and go for a walk to clear my mind. Also, bright ideas do not come into my mind when I stare at the screen.

Are you a team player?

Yes, definitely … I get along well with people from various cultural backgrounds and have a lot of experience working in small teams. I think one of the keys to be a good team player is communication skills and ability to compromise.

Do you have experience in managing projects or people?
Nope, never managed a project nor people. Not that I refused, its just never happened. I would not mind to try my self out in managing a small project with one or two developers.

In what area would you like to improve?

Hm… I really want to improve my software design skills. To be able to manipulate well different design patterns and come up with really smart and efficient software solutions. Sometimes I really feel lack of experience in this department.

Well, that’s pretty much it :) I think I have finally managed to paint a scary portrait of my self. I hope my job search wont be a very long one.

If you would like to comment on anything I have wrote here – please do so. Your comments/suggestions/flames are always welcomed.



Работать будучи студентом в Австралии

В последнее время участились вопросы по этой теме: А могу ли я то… а могу ли я это… а что можно… и так далее.

Я попытаюсь описать реальность поиска работы будучи студентом в Австралии. Я сам был студентом здесь и у меня есть/было много друзей студентов, так что считаю что мое мнение довольно обьективное. В конце концов моё дело написать – ваше дело прочитать. Tакже я хотел бы чтоб некоторые студенты в Австралии здесь поделились бы похожим.

Сколько часов можно мне работать?
Работать можно не более 20 часов в неделю. Не важно сколько работаешь в день, главное чтоб не более 20 часов в неделю.

А что и как в плане налогов для интернациональных студентов?

Интернациональные студенты как платильщеки налогов, считаются обладателями ПМЖ в целях уплаты налогов, если(!) ваш курс/обучение длится шесть (6) месяцев или дольше. То есть плотите налоги как Австралы. Поэтому когда будете заполнять форму для налогов на работе, укажите там что вы “Australian residents for tax purposes”, если ваш курс/обучение длится шесть (6) месяцев или дольше.

“… Generally, you are an Australian resident for tax purposes if you have:
1. always lived in Australia
2. moved to Australia and live here permanently
3. been in Australia continuously for six months or more and for most of the time you have been
3.a in the one job, and

3.b living in the same place …”

From Residency – overview (Australian Taxation Office)

В связи с кризисом, стало ли меньше подработок?
Да, конечно… В какой то степени да

Я у себя в стране был(а) супер-пупер специалист по радио-технике/ мэнэджмэнту/ маркетингу/ коммуникациям/программированию,
смогу ли я устроиться по проффесии на время обучения?

Почти с уверенностью скажу что не сможете. Почему “почти”? Потому что вдруг вам жутко жутко жутко повезёт и вам кто-то поможет по знакомству, что бывает крайне редко. Почему всё таки не сможете? Ну давайте посмотрим на вас со стороны:

  1. ПМЖ нет (самая главная причина). Никого также не интересует что оно (ПМЖ), может быть будет у вас через пару лет
  2. Работать можете не более 20 часов
  3. Наверняка ваш уровень English оставляет о себе желать лучшего

Подумайте, ну зачем работодателю морочиться с вами? Ему нужны работники на полную ставку, а не те с которыми надо возиться пол-недели и которые скорее всего уедут домой через какое-то количество времени.

Также не забывайте что тут уже есть конкуренция на серьёзные работы в лице местных студентов у которых English родной язык, и которых нет ограничения в часах. Всё равно даже этим студентам практически невозможно устроиться, так как они студенты… а тут ещё вы без ПМЖ, и с ограниченим на работу … понимаете ситуацию?

Ещё один важный фактор:
На серьёзные работы здесь рассылаются резюме через email. Эти резюме скорее всего попадут к агенство по работе нанятым компанией, или просто в отдел кадров самой компании, служащие которых и там и там, поспешат отложить/стереть/выкинуть ваше резюме интернационального студента.

Если вы решите не указывать статусы интернационального студента и ПМЖ в резюме, это всё проясниться когда к вам перезвонять (если к вам перезвонять).

Не подумайте что я вас отговориваю здесь – пытайтесь, дерзайте, рассылайте резюме … а вдруг? :)

На какие работы дествительно можно расчитывать?

Пабы, рестораны, клубы, магазины, супермаркеты и так далее. Можно сделать taxi license и подрабатывать таксистом. Можно сделать security guard license и подрабатывать охранником(ицей) в торговых центрах. Оссобо здоровые ребята могут попасть в охрану клубов. Попробовать также всякие заводики в плане физ-работы. Работа по подсчёту пассажиров в электричках и автобусах.

У девчонок не много опций (во всяком случае, много я не вижу): продавщица, оффициантка, горничными в гостиницах/мотелях и также любая не физ-работа. Более смелые девчонки работают как exotic dancers, но таких немного.

А как насчёт работать на “наших”?

Через “своих” работу найти быстрее всего. Не буду всех чесать под одни грабли – есть хорошие люди на этом свете. Но обычно “свои” “своих” эксплуатируют: платят мало, долгие часы работы и дают понять что это было вааще одолжение, и так как у вас безвыходное положение вы должны быть только благодарны.

Собираюсь ехать учиться на пару месяцев, могу ли в течении обучения найти работу по быстрячку?

Несколько месяцев уйдут только на адаптацию к стране и языку, и самому поиску работы. Не забывайте что вам надо учиться, и у вас не будет куча свободного времени искать работу (да и пока что-то “прострелит”) … так что думаю по быстрячку не получиться, разве что если повезёт.

Ну блин, так можно будет найти работу или нет?
Можно будет. Надо не лениться и обивать пороги/раздавать резюме … Займет время (будьте готовы на несколько месяцев), но что-то где-то “прострелит”

Ну хорошо, есть работа … На что можно расчитывать в плане зарплаты, и на что этого хватит?
Хороший вопрос. Предположим что вам очень повезло и вы нашли работу на ВСЕ 20 часов в неделю (а ведь бывает что найдешь работу на меньше), по 20(!) баков в час (это очень классная подработка – 400 баков в неделю студентом, но заметьте: я взял один из оптимальных вариантов с хорошей зарплатой).

После вычета налогов останется где-то 360 баков. Учёбу этим не оплатишь, но зато хватит сполна на недельный рент (shared accommodation, скажем 200 баков в неделю, это будет хороший sharing), на еду на неделю (100 баков на одного в неделю это выше крыши, готовить дома и несколько раз в неделю кушать в ресторанчиках/кафешках) и ещё осталось 60 баков на всякое. Вот так примерно, я думаю теперь сможете немного прицениться …

А что насчёт работ по чёрному?
Ну, я не по этой части … Знаю ребята работают на стройках, гипсовые стенки, рестораны, но это уже со “своими” надо дело иметь (иногда с местными тоже). Также знаю что хорошо имеют на продаже картин от двери до двери …

Happy Chinese New Year

I have been inactive for the past several months and haven’t posted anything. There were some transitions going on lately in my company, so I have not felt like posting anything nor I was involved in any interesting projects.

These days, I am traveling through South East Asia with my girlfriend. I have been exploring Malaysia and what this country has to offer, especially the amazing local cuisine. I think I am very lucky to have local people to take me around to all those wonderful places where Western tourists do not visit (or hardly ever visit). Few days ago we came back from Thailand, we have spent there four days. Now, as I am writing the current post, I am relaxing at my girlfriend’s house, in Shah Alam, Selangor, Malaysia.

With this post I want to start the year 2010 by wishing you all a Happy Chinese New Year. May this year will be a prosperous year to you all.

Gong Xi Fa Cai :D