Details
-
AboutJust another geek... nothing to see here :-)
-
SkillsMainly Java, HTML, CSS, JS, SQL but used many more
-
LocationBucharest, Romania
Joined devRant on 12/20/2016
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
As an interviewer I have to say that what interests me most is the approach you take to solving the challenge. The questions you ask (if you do), how long do you think about the task, can you identify the corner cases or you just take the happy path, etc tell me more about the candidate than the code.
The resulting code is, however, a filter for those that try to cheat by learning 'common interview questions' but can't in fact code. -
Hmm... Didn't Id Software release the source code for Quake 3?
That one might qualify 😀 -
Too bad the penguins in the picture are not Gentoos.
-
7 years ago ExtJS was quite good compared to the alternatives. The fact that the process of rewriting the monstruosity about 3 years ago is a completely different topic 😀
-
It's a duck. It just happens to be the size of a skyscraper and breathe fire... but it does walk and quack like a duck
-
Original picture needs more tentacles or deformed limbs.
-
I feel your pain. I had a job were we were implementing ELO. From a developer's perspective, that thing is an abomination.
-
fsck -afyA
Yep, it's gone!... -
Zombie whale. Big, slow(ish), rotten and wants to eat developer brains.
-
@netikras Well, there is some housekeeping in the case of List<String>. The fact that string literals and interned string do not get GC'd is intended behaviour and not a mistake. All other strings will be treated as any other object would.
The List<String> is a bit contrived here since String is a bit of a. To be honest, I would be quite annoyed if a List<Object> would not get proper housekeeping after it is no longer in use.
I believe that intent matters. If it doesn't, a cache and a memory leak are the same thing, right?
Also, in the case of pooled threads, there's a bit of inconsistency - if I instantiate a thread by hand, use it, use its ThreadLocal and then remove any reference to the thread, everything will be cleaned; however, if the same thread is part of a pool, when I remove all my explicit references it will just go back in the pool without any cleanup. The problem here is that I have no indication on the behavior of the pool - will it sanitize the thread or not? -
@netikras for me a memory leak is something that happens contrary to expectations. In the ThreadLocal example, the expectation would be that the upon releasing the thread, the data you saved would get deleted. Since the classes involved are part of the SDK and not custom code, you do not have control over the behavior and unless you know in advance of that particular gotcha, you would not expect it.
In your example, the code is designed specifically to keep data in memory, so in my book it qualifies as a "Stupidity Leak".
I know that technically they are the same thing, but I do believe that code intent makes a difference. Otherwise, what's the difference between objects you normally create and leaks? -
@noyb If on Java 8+, try the new Date API. It went from batshit crazy to decent.
-
Easiest way to create a true memory leak is to use ThreadLocal in a thread from a thread pool and store stuff then reuse the tread without first performing cleanup. You will no longer have references to the stored data but they will not be garbage collected.
Also, nested classloaders can do the trick. -
@netikras not really a leak since the object holding thar memory is still accessible and never freed.
-
For me the answer is no.
I always refused to do something that I found wrong/stupid/un-proffesional/etc. Sometimes the fallout from such a refusal was quite serious (escalation to management, warnings) but I would rather go job hunting than producing something that I could consider defendable. -
Do you have a twin sister? 😇
-
Get rid of NPEs, use Optional<Girlfriend>.
-
I think the main problem in your case is the performance of the storage device the files reside in. Depending on the use case, one solution would be to wrap the files in a container filesystem (iso or something else) and then mount them as a ramdrive (if enough memory is available). Then use a limited number of threads to do the reading - 1 per processor core should be enough.
-
Me: And now you get to tell them that it will take more than a month.
I did that once or twice. 😈 -
That is a great sight to see.
-
The neat trick about dolphins is that they only half-sleep. Only one part of their brain goes "offline" while the other keeps working normally. :)
-
Most of the time the answer is yes.
There are days when I think that being a shepherd or a baker would me more rewarding . Today was one of those with its 6 hours of stupid meetings, but it is not the norm.
I am selective enough with my jobs that I only take the ones where I get a challenge (even if the project is not glamorous or cutting edge). When that stops being the case it is time to change the client and/or employer. -
@RustyCookie what do you mean with "compiled to c++"?
Also, when I said critical piece of infrastructure I meant something like Electrical power distribution, Air Traffic Control, Gas pipeline control, Emergency Services Dispatch, etc.
If your company does something like that then I hope they do not do business in my country. -
I think I will stick to a nice bottle of Singleton Whisky instead :)
-
Do laugh. I mean, what are the odds of some critical piece of infrastructure relying on a Javascript backend code?
-
Do not forget about Windows Millennium 😀
-
@EDWCode Thank you!
Looking forward to hear about yours. -
Looks a bit like Trump.
-
@irene your comment about Romania :)
-
@irene isn't that cute?...