Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!

Monica Shiralkar

Ranch Foreman
+ Follow
since Jul 07, 2012
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Monica Shiralkar

fred rosenberger wrote:I generally list the companies i've worked for, not the projects.  so

Company B - April 2011 - Feb 2012
  a few details about what i did for this company

Company A - April 2010 - Feb 2011
  a few details about what i did for this company

No real gap.

Understood for the details about what I did for company.But what about project details .If not here then whether will it come
1 hour ago
In resume some people mention each and every project whereas others mention only selective limited number of projects which they want to emphasize or are realavent and omit others.(e.g either less realavent ones or old ones )

However , omitting may produce some gap durations in resume. For example in company A ,I worked on project1 from Jan 2010 to March 2011 and in company B ,I worked in 2 projects, project2 from April 2011 to Feb 2012 and project3 from March 2012 to Jan 2013.

Now if I want to emphasize project 1 and Project 3 but want to omit project 2,then it would look like below

Project1 - Duration Jan 2010 to March 2011
Project 3- Duration  March 2012 to Jan 2013.
And so on ..

But between these there will look a gap.How to deal with such situations. ?
11 hours ago

Paul Clapham wrote:

Monica Shiralkar wrote:I have heard a common interview question "have you worked on data structures ".Seeing what's mentioned in this thread each and every candidate would have worked on String atleast which is also a data structure .

And you should also ask what is meant by "worked on". I have been working in Java for many years and I don't believe I ever "worked on" a data structure. If you want to limit yourself to sets and maps and lists and things like that, I never "worked on" any of them. I just chose a suitable data structure for my data and went on with the actual work. Those are wheels which do not need to be re-invented.

1 day ago

Junilu Lacar wrote:If the spec says the expected behavior is to display text

and the implementation has the actual behavior of playing a sound file instead (and NOT displaying text)

do you not think this is unexpected and inconsistent???

I'm not sure why this seems so hard to understand.  

Thanks. I understood this.Also, I will come up with a simple but better example than the one I had come up with to confirm that I have understood correctly.
3 days ago

Junilu Lacar wrote:

Monica Shiralkar wrote:
But will it give me error? What problem exactly will I encounter during runtime at line

All it has to do is behave inconsistently or unexpectedly. .

What would be the inconsistent/unexpected behaviour in case of my program ?
4 days ago
I was tying to create list in Scala for which I would have used ArrayList. I can see that in Scala , List is immutable and ListBuffer is mutable. Is ListBuffer to be used for cases where one would use ArrayList in Java?
4 days ago

Junilu Lacar wrote:

In your example, if the contract defined by the makeSound() method in the superclass states that it will display a String then all subclasses must display a String if they override makeSound(). If there is a subclass that does not display a String but say only plays a sound file instead, then it has broken the contract. In that case, LSP will have been violated.

I understand that in the above example, as per Liskov principle we should not do
But will it give me error? What problem exactly will I encounter during runtime at line

(Ofcourse after the implementation of the TODO in the line for  )
4 days ago
so in the comments over the method and class.
4 days ago
Thanks all.

All these years, I was thinking that during overriding one can give any new implementation just that we have to use the same signature. Now I have come to know that during overriding , one has to be careful that one does not break the contract of the original method.  

I wonder why this does not get mentioned in the documentation of Overriding that you can give any new implementation but without breaking Liskov principle.

While implementing, where exactly can one check the contract of the original method?
4 days ago
I have understood what Liskov principle is saying.
I also understand what is overriding.

I am trying to understand how both can happen at same time.

Liskov principle says if a method contract guarantees something , then that guarantee must also be made by the overriding method in subclass.

Overriding says that subclass can give different implementation by using the same signature.


Super class Animal has method makeSound.

Now, subclass Pig can give it new implementation and display Grunt sound.
Similarily, dog can also give new implementation and display Bark sound.
The subclass method (makeSound) has the right to do so in this example.So what right does the subclass method not have in this example ?
4 days ago

Campbell Ritchie wrote:What distinguishes a library from a book?

Library is a group of jars to do something whereas book is for reading to get some knowledge.
4 days ago
Does that mean that everytime overriding takes place (by the sub class ), Liskov principle gets violated.

If not ,then what would be a case where subclass does overriding but does not violate Liskov's Principe.
4 days ago
As per Liskov principle ,objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.

As per my understanding this will always happen unless the subclass overrides that method and either changes that implementation or throws some exception.Is that correct ?

Is yes, then but any subclass in Java has the right to override and change the implementation.

So, I am confused that how can the 2 things above be true at the same time.
4 days ago

Junilu Lacar wrote: What part of "code that uses references to a superclass should still work correctly when operating on instances of a subclass" don't you understand?

What I was unable to understand was the reverse of this,that is the violation.
4 days ago

Tim Holloway wrote:In short as a general rule, you might define one or more re-usable Components in a Library.

Does that mean that if library will be consisted of a number of jars, then some of these jars may constitute a reusable component ? What exactly differentiates a library from reusable component?
4 days ago