It's my blog!

4 Terrible Questions Job Interviewers Should Never Ask Again

I have been interviewed a lot of time until now, and I can confirm, in some case, the interviewer did something really bad like asking me “Where do you see yourself in three years?” or reading my cv for first time or sending sms and smiling reading them during the interview. I read this article and I found it really interesting and, in particular, I love this:

4. “Out of all the other candidates, why should we hire you?”
Hmm. Since a candidate cannot compare herself with people she doesn’t know, all she can do is describe her incredible passion and desire and commitment and… well, basically beg for the job. (Way too many interviewers ask the question and then sit back, arms folded, as if to say, “Go ahead. I’m listening. Try and convince me.”)

And you learn nothing of substance.

Probably my answer would be: I can’t compare me with other candidates… don’t know them.. maybe Steve Wozniak is a candidate for this position: you should be dumbass to don’t hire him! Take him! Right now!

You can find the entire post here: Terrible Questions Job Interviewers – by @jeff_haden – btw, this article is pure gold!

Nuclear plant vs bikeshedding

From OpenMRS developer guide: “Although we encourage public discussions about our software design, it’s also important to avoid non-productive conversations about trivial details. This type of anti-pattern best described by the concept of bikeshedding, which gets its name from a 1960s book about management. In the book, C. Northcote Parkinson described how it might be often easier to get approval for an expensive nuclear power plant than it could be to discuss what color to paint a bike shed. Everyone feels they have a valid opinion of what color to paint the bike shed, but only certain qualified people can comment on the design of a reactor. Don’t let yourself fall into this trap — avoid these wasteful conversations on trivial topics”.

Kim Jong Un situation

That’s the situation on which you are doing a complicate change in production and the management is waiting (and in the worst case watching you) behind your chair.

“Hey dude, any update about the production deployment??”
“Sorry, can’t talk, Kim Jong Un situation here”

by Andrea Girardi – Fri 19, 2014

Kim Jong Un situation

PS: if you like it please, click on the banner :)


…e poi guardi il video di Samantha Cristoforetti e almeno oggi non ti fa proprio schifo essere italiano. Emozionante il saluto della mamma perché si sa, per gli italiani la mamma è sacra!

Query date based using milliseconds time on MongoDB

I need to search all records that match a date condition. On MongoDB I’ve a bunch of data like this:

    "_id" : "9ed3b937-0f43-4613-bd58-cb739a8c5bf6",
    "userModels" : {
        "5080" : {
            "generated_date_timestamp" : NumberLong(1413382499442),
            "model_id" : 5080,
    "values" : {}

With this query, is possible to do date / time based search:

   "userModels.5080.generated_date_timestamp" : { "$gte" : ISODate("2013-10-01T00:00:00.000Z").getTime() }

Multiple COUNT select from same table

I fixed the issue in this way:

SELECT R.id_request,
        WHERE F.id_request = R.id_request AND processStatus = 1) AS flowTotal,
        WHERE F.id_request = R.id_request AND processStatus = 2) AS flowApproved
FROM Request R

Dynamic for with Spring MVC using a HashMap

Sometime you need to dynamically generate a form without knowing how many fields it will be required (i.e. when your form is driven by a configuration or by some properties). The problem is to draw the form and, return the values to the Controller, and recognize the couples Field name / Field value after the submit..

You can easily get solve this problem just adding HashMap which will hold the key-value pair data to the DataModel.

Supposing your configuration says: you have to draw two fields and these are the name, you UI will be something like*:

<c:forEach items="${newRequest.fields}" var="field">
	<f:input type="text" path="rawFields['${field.field_id}']" class="form-control validate[groupRequired[mandatoryField]]" /> (R)

When you submit the form, the values and the key for the dynamic fields will be filled.

* newRequest is the DataModel you are passing and fields is the list of Fields that user will fill with data, like that:

public class Request {
	/** Request type */
	private int templateRequest;
	// ***** Input field ***** 
	List<RequestField> fields = new ArrayList<RequestField>();
	private HashMap<String, Object> rawFields = new HashMap<String, Object>();
	[Setters and getters]

Apply jQuery datepicker to multiple instances

To add multiple instance of jQuery datepicker (or timepicker), it is possible to use class instead of the ID to initialize the widget in particular when the form is generated from the backend and the exact number of field is not known.

The html code will be:

<input type="text" class="datepicker" id="date1" />
<input type="text" class="datepicker" id="date2" />
<input type="text" class="datepicker" id="date3" />

The jQuery script will be:


Remember to include jquery and jquery-ui scripts to the page.

« Older posts

Copyright © 2015 It's my blog!

Theme by Anders NorenUp ↑