Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

01-17-2019 , 10:34 AM
Does anyone care how real-time the like count is? Why?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-17-2019 , 10:48 AM
Quote:
Originally Posted by kerowo
Does anyone care how real-time the like count is? Why?


I was about to ask this.

I’m probably biased because of where i work but meh @ relational database schemes.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-17-2019 , 11:10 AM
Quote:
Originally Posted by kerowo
Does anyone care how real-time the like count is? Why?
This will probably just end up being an educational project for me and no one else will ever care about it at all, but in theory I think people want to see the total number of likes advance right when they click it.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-17-2019 , 11:20 AM
Hi to all in the thread....

I am going for java associate exam(1z0-808) towards the end of this month and I'm wondering if anyone has any hints/tips in regards to how to approach code questions and how they analyse the questions.

Any insight at all from others could be a huge help

Thanks
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-17-2019 , 11:26 AM
I don't think that expectation exists anymore because it's very rarely the case that you see individual likes. Most examples I can think of only show the ones place for the first thousand votes. YMMV but there is probably some wiggle room there between click and the counter goes up to click and the next time the page loads the counter goes up. Neither of which matter until you find a way to stress test the app.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-17-2019 , 11:38 AM
Quote:
Originally Posted by microbet
This will probably just end up being an educational project for me and no one else will ever care about it at all, but in theory I think people want to see the total number of likes advance right when they click it.
I started to write a response, but then deleted it, but now I'm going to write it again!

Like you mention here, UI interactions like this are more complicated then just caring about total number of likes.

Almost nobody really cares if that number is right -> Especially as that number increases in size.

However, people will still want (or will be turned off by not having) an interface that is responsive and consistent. So it's probably important that the count increases by 1 immediately after a user clicks like. And if you show other metadata (like who liked something) its probably important that the number of likes you have matches the list of people that you list beside it. And if the current user has liked something, they should definitely show up in that list.


Edit: Like Kerowo mentions, there are lots of tricks to help keep an app responsive and consistent. So if you don't display the 1s digit of a like count the user no longer has an expectation of seeing it increment with their click.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-17-2019 , 12:21 PM
For an item which is going viral I would periodically publish the current count and a rate. Then the client can keep the number spinning fast with local approximations.

I'd use the number of subscribers to classify an item as viral.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-17-2019 , 12:56 PM
Quote:
Originally Posted by Chips Ahoy
For an item which is going viral I would periodically publish the current count and a rate. Then the client can keep the number spinning fast with local approximations.

I'd use the number of subscribers to classify an item as viral.
IIRC youtube kind of does the opposite. If a videos number of views increases dramatically in a short period of time, it freezes them, I guess to check and see if it's being done via scripting or something. It sometimes leads to visible weirdness, like a video having 1000 likes but like 80 views.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-17-2019 , 03:14 PM
Quote:
Originally Posted by PJo336
You react guys, how much testing do you actually have in production apps? We hired a couple front end devs back in May to make a new ui for a large internal part of our app.

We're starting our own new ui project and went to figure out how they do tests. Spoiler: they do not
I'm working on two different products daily. One has about 600 unit tests and the other has over 4000. We also have functional tests, but don't know the exact numbers by heart.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-17-2019 , 05:02 PM
Hopefully some genius can help me with some insane issue i'm having that makes no sense.

I have a JUnit suit of tests that I run with maven. One test does a lot of insertions into a database and then checks something. It's a 1 million object insert, but without fail, I get to about ~300k items and it goes from like 300k ops/sec down to 10.

Troubleshot this all day yesterday. Figured out that running tests in this fashion with JUnit/maven that it can use a completely different JVM configuration than whatever you have set. I figure ok, maybe I am approaching some kind of limit in the heap and there's a slowdown because of that, my client program does hold a ****load of stuff in memory.

I use surefire plugin in my pom.xml file and set the args so that I am running with a ****load of memory. I set it to 4gb just to nuke it and hopefully fix my problem.

VOILA! it works now at normal speeds. Ok great.

Now the problem is - if I run IDENTICAL CODE with identical everything, same machine, same home directory, COPY the ****ing folder into a new location, and try to run the EXACT same test - i experience the same slowdown in the new location but not the old. What. the. ****. I can't even begin to figure out what it could be.

I even took the working directory to an ENTIRELY different VM and it worked. Copy it to a new spot, doesnt work on the same VM.

HELP. It's not even worth chasing down because i've ruled out it being my software that's the problem, it's something else that's weird. But it's driving me actually insane.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-17-2019 , 05:17 PM
Maybe the extra memory is somehow still allocated for the old app/folder and not available to the new one? What happens if you just rename the folder? What happens if you reboot or move to a new VM and run from the copied folder first?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-17-2019 , 05:39 PM
None of that matters. same behavior. I just found a different pom in a lower directory that's using a different surefire plugin version and commands - I don't know if maybe my fix accidentally broke something that helped my program. Idk how these poms even ****ing work tbh. I have a build and run script I was already provided but Im sure it was written by someone with even less knowledge than me.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-17-2019 , 06:24 PM
How does the new VM know which dir was copied to it and which dir was copied from within its dir structure? If you copy the dir to the VM from it's original source twice - do the tests work both times?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-17-2019 , 07:12 PM
Ok update i have successfully cloned a new project and ran it. But it seems nondeterministic. Sometimes the same steps work and sometimes they dont. My suspicion, after looking at the maven project structure, pom files, and build script, is that whoever made it had nfi what they were doing. I think there are some conflicting dependencies somewhere. Different versions of stuff all over the place. It definitely is building things differently each time.

So now im so frustrated by this im gonna go home, grab a beer, and try to reorganize the project and see if that fixes something.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-17-2019 , 07:14 PM
I have also successfully copied the entire project to a new location and ran successfully. Idk why it wasnt working earlier. Probably was in the wrong dir or had some path set incorrectly.

Java is REALLY annoying
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-17-2019 , 07:18 PM
Oh and I’ve taken the test and put it in its own file,, compiled with java the old-school way, and ran it and it’s fine. So it isn’t my code or the source at all. It has to be the project configuration
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-17-2019 , 07:45 PM
Quote:
Originally Posted by toots babos
Hi to all in the thread....

I am going for java associate exam(1z0-808) towards the end of this month and I'm wondering if anyone has any hints/tips in regards to how to approach code questions and how they analyse the questions.

Any insight at all from others could be a huge help

Thanks
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-17-2019 , 08:31 PM
jmakin,

Typically your tests shouldn't be inserting anything into an actual database. You would mock that part and just test your code.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-17-2019 , 08:31 PM
The database is the product so it is tested
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-17-2019 , 09:09 PM
I am beaten. This makes no sense whatsoever.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-17-2019 , 09:10 PM
How hard would it be to just start over from scratch and add one thing in at a time?

We had a weird testing bug where it was throwing a "stack size exceeded" error (which is apparently at the OS level). The tests would pass on our local machines, which had a larger stack size, but fail on our RHEL 6.5 build server. Our DevOps guys never could figure out how to increase the native stack size.

But obviously underneath that something was very wrong with our tests which was causing some kind of event/callback loop to spin out of control in the background. This also caused all kinds of weird debugging issues in that the tests would fail in different places with different configurations (but always the exact same place with the exact same configuration).

So even though I was trying to debug, on the RHEL server, by commenting out the failing tests - it just caused failures in other places.

You might have something like this going on.

Ultimately they just commented out enough tests that the problem went away, or they may even have commented out the run test command in the build server. We weren't really doing serious testing anyway so no one cared. We could still say we were testing in presentations, which is all that mattered to everyone but me. I spent like a week on this thing as my white whale and finally gave up.

Last edited by suzzer99; 01-17-2019 at 09:19 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-17-2019 , 09:31 PM
I ruled out the other tests causing a problem- that was one of the first things I tried yesterday. I still saw this issue even if it was the only test in the suite that was running. Right before i wrote this post i tried running that test on a different device than the other tests and got the same results.

I emailed my boss and told him basically that I give up because this is so low reward and I have a lot of other things I can work on. But he’s really paranoid that something is wrong with our software so he wants me to chase it down - i already wasted like an hour of his time today with this. The dev in me wants to spend another 16 hours chasing this but the PM in me is saying it’s just really not worth the time.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-17-2019 , 09:45 PM
It would bug me to no end not to figure it out.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-17-2019 , 09:46 PM
Yea i was on top of the world when i went home yesterday and thought id solved it, and now i feel like an idiot and super frustrated about it
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
01-17-2019 , 10:38 PM
Have you tried profiling the machine and the code to see if you can identify what the bottleneck is when you hit the problem?

Feels like you need to narrow down likely causes.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m