tangara goh

Ranch Hand
+ Follow
since Dec 27, 2009
I am a beginner in Java and hope to pick up the trade secrets so that I can move on to Android development
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
3
Received in last 30 days
0
Total given
175
Given in last 30 days
9
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by tangara goh

Piet Souris wrote:

@Jesse
I've never been involved as a professional programmer, albeit I used things like Basic, C and Java at home, and Excel, VBA and R in my job. So I am not hindered by any professional standard there may be, I am as free as a bird to follow any convention I like, even self-made conventions!



@Piet Souris,

After I read your comments, I feel like really if I am not suitable in this field.
You know, I have been failing interviews after interviews...they either asked me question that I had never done in Hyperskill like the other day there was this guy with more than 25 years experience so he asked me one question which requires continue statement and out of the 360 plus questions I did at that point, there is none that covers continue and then he deemed me as not a good coder and asked me to enrol in a school.

But, after that unfortunate incident happened to me, I could not get a job and I focused on building projects to show employers only to realise the importance of able to do DSA coding test.

After that, I need to settle bread and butter issue ...(anyway, sorry about the rant)

Maybe I am not suitable at all, after you mentioned that you only do this as a hobbyist.  Actually, I have studied Streams before and really I hated the nested loops things but i can't remember all I had studied simply because I had no chance to touch on Streams after I entered a company that the PM any how deligate jobs even though I told them I have not touch front end for 10 years.

So, to keep my job I studied Angular and luckily I managed to do it.  Only to be landed in a shit job where they gave me a 1 week task to do React-Redux unit test when I completely don't have.  And this guy who is earning tonnes of money, really like $25k per month is asking me to leave only the 2nd day saying I can't do it.  One week becomes 1 day.

So, they were using Stored Procedure my god.

I feel like I am damn unlucky in jobs and I can't handle all the people like that.

Seriously, I feel like I am not cut out to do computing...I am like being unrealistic and then I am so old already.

6 days ago

Piet Souris wrote:A Matrix can only be symmetric if that Matrix is square. And in that case you can avoid all those nested ifs with:



Hi Piet,

The requirements need us to print "Yes" if it is Symmetric and "No" if it is not.

Your method which I tried out in eclipse would required me to create a getColumn method and I am not familiar with Streams ....

Could you explain is there an advantage on using Streams in this case?
6 days ago

Carey Brown wrote:I don't know why Eclipse complained. I don't see anything wrong with the first code.

There is an optimization you could make where only half of the matrix needs to be tested. Loop through ALL rows but only loop through columns up to but not including the current row number.



I need to highlight that I did not use Scanner in Eclipse, just called up the method.  But, I noticed the n is the same in the 1st code.  So, I recreated one in Eclipse where what if the n is not the same...
1 week ago
Hi experts,

I hope to get some advice regarding this Diagonal Matrix question.

So, I did the below and got a passed in the test platform:



but when, I did it in Eclipse, I got errors like index out of bound so I refactored the code to array.length -1 which works find.

The part that puzzle me is this test case :



So only I add in additional line of code then it got passed



But, I am not sure why I got thru the test platform with the 1st code.

I would like to further seek how to make the code better.

Tks.
1 week ago
Hi guys,

I have been spending 2 weeks doing a 2D 90 clockwise rotation and only able to do it after seeing the answer in Stackoverflow.

But, still I am not really able to grasp the concept on a specific part :



The specific part that I don't get it is :



This line of code could appear in the outer or inner loops.

Could someone kindly explain things to me ?

Tks a millioin.
2 weeks ago
Sorry guys, I managed to enable the IDE to run 2 versions inside.  Please help me to delete this post.
2 weeks ago
Hi guys,

I am now trying out a hyperskill developer solution which uses var which means I have to use a higher version of JDK.

Thus, I installed openJDK 10 in Eclipse.  The Oracle one just could not be downloaded.


OS : Window 10

Now, the problem is that in the workspace, the rest of the codes are all written using Java 8 JDK from oracle.

How can I make Eclipse toggle between Java 8 JDK if I want the codes to run in Java 8 and this particular code which needs to run in OpenJDK 10 in Eclipse.

So, there was some errors occurred and I as usual hastily deleted the Java 8 compiler from build path.

And now I am ended up with this screen which I had no idea how to make things work.

https://i.imgur.com/HCi6nk7.png

Hope to get some tips here.

Tks.
2 weeks ago
Sorry guys, it is my mistake : I left out a thread.start() at the public void main there and this is right after myThread.start()
;

1 month ago

Tim Holloway wrote:Stored procedures are something that I recommend avoiding where possible regardless of the framework you are using. Stored procedures tend to lock you into a particular database vendor plus they make it harder to determine where business data logic resides - on the DBMS server or in application code, thus raising time and cost of system maintenance. Plus it's generally harder to keep version control over stored logic than it is for application code.

The main reasons for using stored procedures would be in cases where performance was prohibitively worse when doing database logic in application code or the same logic needed to be shared between multiple applications. Both conditions are typically pretty rare.

Spring Boot really doesn't impact this. If Hibernate is being inefficient, then it's Hibernate you need to tune and that process is the same for Spring Boot as for regular Spring or even non-Spring apps.



Thank you so much for answering my question because this is the exact thought in my mind, even though I was still very green in this field 4 years back.  Unfortunately, I was deem a failure by the school and refused to give me my cert after clearing all my exams.

Now, I am subjected to all kinds of coding tests which I doubt I can pass.

Sorry for the rant again.
1 month ago
Hi experts,

I was questioning someone of using Stored procedure vs SpringBoot JPA which uses Hibernate under the hood?

So, now since SpringBoot naturally advocates its own goodness but I heard in reality that Hibernate would fetch unneeded data and thus not achieving optimisation.

How is this kind of problem handled ?
1 month ago

Norm Radder wrote:

1. Prints: MyThread: run() followed by MyRunnable: start()


Do you mean this is what the output should look like:
1. Prints:
MyThread: run()
MyRunnable: start()


Add @Override before the start methods to see which ones actually are overriding a  class method.



At which start method should I add the @Override ?

1 month ago

Liutauras Vilda wrote:I'm not sure whether the code is copied exactly as it should, but none of the answers are inline with an existing code.



I have double check and it is indeed the same.  In fact, before I posted, I was worried that I have copied wrongly.

And I did make sure it is really the same cos I could not get any answer and was abit doubtful.
1 month ago

Liutauras Vilda wrote:1. You can't have two public classes in the same source file. You have MyThread and myTest.
2. Source filename should match the public class's name.

Try to fix those and see how it goes then.



I did put myTest in another class under the same package in the IDE but when it doesn't give me any answer listed in the 4 choices I wanted to find out more, hence this post.

1 month ago
I need help to get the answer for this MCQ :


The question asked what is the output of the following codes?


So, I am suppose to choose 1 correct answer but I can't even make it run.  I would like to verify if there is something wrong with the code the question is set?


Here are the 4 choices:

1. Prints: MyThread: run() followed by MyRunnable: start()
2. Prints: MyThread: start() followed by MyRunnable:start()
3. Prints: MyThread: run() followed by MyRunnable:run()
4. Prints: MyThread: start() followed by MyRunnable:run()

Please let me know which is the correct answer and if there is something wrong with the code.

Tks.
1 month ago
Hi,

I will be taking another coding test soon but this time round in another platform - CodeSignal.

So, now I am only practising the 3rd question - very slow progress.

And in this question : I notice there is a line that states :

Please see attached the full question


guranteed constraint :

2 ≤ m ≤ 100.



What is this constraint all about?

What if it is not <= 100 and not 2 but some other numbers, will it make a difference to the algorithms when calculating the distribution of the candies?

1 month ago