|
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. |
I feel like I'm not getting the programmer humour or culture in here.
Are you really upset because I didn't use gender neutral language? Why is it so awful that I did a Javascript course? I didn't know where to start and Khan advertises this as a beginning point for programming...
I suppose Javascript is like the Wonderwall of programming? Well, you gotta start somewhere...
|
Any language is fine. Just make sure you actually work on a project and learn programming on the side instead of going through courses. For example, a simple project would be a vocabulary trainer to learn Russian.
|
|
On June 25 2015 23:08 SixStrings wrote: I feel like I'm not getting the programmer humour or culture in here.
Are you really upset because I didn't use gender neutral language? Why is it so awful that I did a Javascript course? I didn't know where to start and Khan advertises this as a beginning point for programming...
I suppose Javascript is like the Wonderwall of programming? Well, you gotta start somewhere... It was more that, given the way you seem to treat girls, your address of "Hi girls", seems to be you not taking this community very seriously, which is not a good signal to send if you are asking it for advice.
Anyway, javascript has a special place in hell reserved for it (next to php and perl which are legitimately awful programming languages), not because it is terrible, but because it is omnipresent and SHOULD NOT BE.
Javascript is acceptable, and pretty good at what it does AS LONG AS IT STAYS CLIENT SIDE AND RUNS IN A BROWSER. I have a passionate hatred for Node.JS, Tizen, and all other frameworks that try to drag Javascript to places it doesn't belong, when there are FAR better languages for each of those areas (Python, Ruby and even LUA come to mind) There is too much wrong with it to want it to be prevalent.
|
On June 25 2015 23:20 Nesserev wrote:Show nested quote +On June 25 2015 23:08 SixStrings wrote: I feel like I'm not getting the programmer humour or culture in here.
Are you really upset because I didn't use gender neutral language? Why is it so awful that I did a Javascript course? I didn't know where to start and Khan advertises this as a beginning point for programming... When I said "that's awful", I was referring to the part where the girl is giving you a blowjob while calling her boyfriend. Did that really happen, lol? Anyway, wrong thread for that... There's nothing wrong with starting out with javascript. But I think the next logical step is to stick with a scripting language like Python (take a look at the source that I linked above)... and maybe later, when you're comfortable with programming, pick up a C language, like C++ or C#.
Yeah, that happened but that's not the whole story. He's really oversimplifying it.
Anyway, I'm just waiting for the office to be empty and then I'll print out the document you linked and have a thorough read.
I'd love to do something outside of a browser, and I think Python would be splendid for that. Apparently you can just throw Python commands at Terminal, can't wait to fuck around with that.
Thanks for the advice!
On June 25 2015 23:36 Acrofales wrote:Show nested quote +On June 25 2015 23:08 SixStrings wrote: I feel like I'm not getting the programmer humour or culture in here.
Are you really upset because I didn't use gender neutral language? Why is it so awful that I did a Javascript course? I didn't know where to start and Khan advertises this as a beginning point for programming...
I suppose Javascript is like the Wonderwall of programming? Well, you gotta start somewhere... It was more that, given the way you seem to treat girls, your address of "Hi girls", seems to be you not taking this community very seriously, which is not a good signal to send if you are asking it for advice. Anyway, javascript has a special place in hell reserved for it (next to php and perl which are legitimately awful programming languages), not because it is terrible, but because it is omnipresent and SHOULD NOT BE. Javascript is acceptable, and pretty good at what it does AS LONG AS IT STAYS CLIENT SIDE AND RUNS IN A BROWSER. I have a passionate hatred for Node.JS, Tizen, and all other frameworks that try to drag Javascript to places it doesn't belong, when there are FAR better languages for each of those areas (Python, Ruby and even LUA come to mind) There is too much wrong with it to want it to be prevalent.
Well, you certainly have put much more thought into that than I ever did.
|
On June 25 2015 12:52 phar wrote: Ok back up, I am confused. You are or aren't running out of memory? The initial post mentioned something about your data set getting paged out, yet you say you have only 10M edges, which should trivially fit in memory (like honestly 10M int is only 40MB or something). Where are you getting 8GB from?? I was under the impression that the data is so large that it doesn't fully fit into the cpu caches (seems likely but should be verified). If you want to get anything out of your caches, you have to keep your data in the cache for as long as possible. If you iterate 1,000 times over a sequence of 1,000,000 objects (assuming they don't fit into the cache as a whole) you will perform a lot worse than if you iterate 1,000 times over chunks of 1,000 objects each.
|
On June 26 2015 01:02 spinesheath wrote:Show nested quote +On June 25 2015 12:52 phar wrote: Ok back up, I am confused. You are or aren't running out of memory? The initial post mentioned something about your data set getting paged out, yet you say you have only 10M edges, which should trivially fit in memory (like honestly 10M int is only 40MB or something). Where are you getting 8GB from?? I was under the impression that the data is so large that it doesn't fully fit into the cpu caches (seems likely but should be verified). If you want to get anything out of your caches, you have to keep your data in the cache for as long as possible. If you iterate 1,000 times over a sequence of 1,000,000 objects (assuming they don't fit into the cache as a whole) you will perform a lot worse than if you iterate 1,000 times over chunks of 1,000 objects each. Yea but there's a fucking immense gap between "doesn't fit entirely in CPU cache" and "lookup takes 5 whole milliseconds". That's like almost on the order of disk access, which sounds very wrong. A memory access should take 50~100ns. Even if you've got crazy java objects inside objects inside objects, a dozen memory accesses should still be like a microsecond.
|
I didn't say it takes 5ms. I said somewhere < 5ms. I never definitively timed an access, I just did a really poor division apparently. Been busy with exams this week and I don't think there's any more optimizations possible unless I find better algorithms. Going to switch to BitSet and see if that helps with space. The numbers probably closer to 600M contains operations divided by 35 seconds to run, so like 20 us? Is that a reasonable number?
I'm not running out of memory. I'm pretty sure somehow I'm using up more RAM than I can keep in memory at once because the random accesses from the large-ish ArrayList means the parts of the list have to be swapped out too much. I have 1GB of RAM available per user from the server but my usage when I run it is about 5~8GB. It seems like the set is smaller enough to fit, but I don't know why it bloated up to 5~8GB. I'll get more up-to-date numbers later.
|
Ok wait back up, why are you doing random access to a large array list? That right there is slow, because it's a linear time operation.
|
I'm not doing random access, the edges in the graph are random so I have to retrieve the row for that edge randomly.
|
Sorry, I mean this (my terminology is probably off):
Fast:
ArrayList<Bar> foo;
for (Bar b : foo) { something(b); }
Fast (this is probably what you would also call random access, my fault for using wrong word sorry):
ArrayList<Bar> foo;
Bar b = foo.get(index);
Slow:
ArrayList<Bar> foo; Bar b;
if (foo.contains(b)) { something(b); }
This may be easier if you just post your code, I think we're having a hard time understanding exactly what your issue is because we're just guessing as to what it is you're doing exactly. In particular that high of memory usage seems wrong if your algorithm is supposed to be linaer space (it is linear space, yea? you're not using one of those crazy node^2.4 time / node^2 space complexity algorithms, right?)
20 microseconds for a single access into a HashSet or ImmutableSet still sounds kinda high. Though, for example, if you're using ImmutableSet and on an old version, there are some hilariously degenerate cases where a contains could take ~ms.
|
I might be wrong here, but since arraylist is an implemented list in java, the get method shouldnt really be faster than contains depending on which element in the list you want to retrieve.
|
contains on arraylist is linear, get is constant
I think Blisse's .contains calls are on HashSet or ImmutableSet or something, which should be constant (though for some cases it can be linear, which leads to all sorts of craziness). But, hard to say without seeing the code.
|
Well i was wrong , I looked it up and youre right. Get is constant time for arraylists.
|
On June 25 2015 23:36 Acrofales wrote: Anyway, javascript has a special place in hell reserved for it (next to php and perl which are legitimately awful programming languages), not because it is terrible, but because it is omnipresent and SHOULD NOT BE.
Javascript is acceptable, and pretty good at what it does AS LONG AS IT STAYS CLIENT SIDE AND RUNS IN A BROWSER. I have a passionate hatred for Node.JS, Tizen, and all other frameworks that try to drag Javascript to places it doesn't belong, when there are FAR better languages for each of those areas (Python, Ruby and even LUA come to mind) There is too much wrong with it to want it to be prevalent.
I would totally give you a high five if I saw you in person.
Seriously, why do people seem to think Javascript needs to be used for everything? Are they just lazy? Dumb? Both? Learning another programming language is not a difficult thing to do.
|
On June 28 2015 11:42 Ben... wrote:Show nested quote +On June 25 2015 23:36 Acrofales wrote: Anyway, javascript has a special place in hell reserved for it (next to php and perl which are legitimately awful programming languages), not because it is terrible, but because it is omnipresent and SHOULD NOT BE.
Javascript is acceptable, and pretty good at what it does AS LONG AS IT STAYS CLIENT SIDE AND RUNS IN A BROWSER. I have a passionate hatred for Node.JS, Tizen, and all other frameworks that try to drag Javascript to places it doesn't belong, when there are FAR better languages for each of those areas (Python, Ruby and even LUA come to mind) There is too much wrong with it to want it to be prevalent.
I would totally give you a high five if I saw you in person. Seriously, why do people seem to think Javascript needs to be used for everything? Are they just lazy? Dumb? Both? Learning another programming language is not a difficult thing to do.
Most people think that if something "can" be used in a certain way, then it definitely "should".
And jus adding personal, unrelated rant:
Work planned to take 2 weeks with 6 people on the team. 4 people get transferred to final bugfixing for other critical project release. End up with 2 people (me and one other dude) and 1 week to get it all done. We almost made it, but I feel like a zombie right now after having spent 7 days working hard each day of the week. Still, 90% of the stuff was done and I am damn proud we managed to pull off that much.
|
On June 28 2015 23:50 Manit0u wrote:Show nested quote +On June 28 2015 11:42 Ben... wrote:On June 25 2015 23:36 Acrofales wrote: Anyway, javascript has a special place in hell reserved for it (next to php and perl which are legitimately awful programming languages), not because it is terrible, but because it is omnipresent and SHOULD NOT BE.
Javascript is acceptable, and pretty good at what it does AS LONG AS IT STAYS CLIENT SIDE AND RUNS IN A BROWSER. I have a passionate hatred for Node.JS, Tizen, and all other frameworks that try to drag Javascript to places it doesn't belong, when there are FAR better languages for each of those areas (Python, Ruby and even LUA come to mind) There is too much wrong with it to want it to be prevalent.
I would totally give you a high five if I saw you in person. Seriously, why do people seem to think Javascript needs to be used for everything? Are they just lazy? Dumb? Both? Learning another programming language is not a difficult thing to do. Most people think that if something "can" be used in a certain way, then it definitely "should". And jus adding personal, unrelated rant: Work planned to take 2 weeks with 6 people on the team. 4 people get transferred to final bugfixing for other critical project release. End up with 2 people (me and one other dude) and 1 week to get it all done. We almost made it, but I feel like a zombie right now after having spent 7 days working hard each day of the week. Still, 90% of the stuff was done and I am damn proud we managed to pull off that much. wow wtf, you didnt got extra time for that stuff even while 75% of your teams capacity was pulled out?
|
On June 29 2015 19:37 sabas123 wrote:Show nested quote +On June 28 2015 23:50 Manit0u wrote: And jus adding personal, unrelated rant:
Work planned to take 2 weeks with 6 people on the team. 4 people get transferred to final bugfixing for other critical project release. End up with 2 people (me and one other dude) and 1 week to get it all done. We almost made it, but I feel like a zombie right now after having spent 7 days working hard each day of the week. Still, 90% of the stuff was done and I am damn proud we managed to pull off that much. wow wtf, you didnt got extra time for that stuff even while 75% of your teams capacity was pulled out?
Life's not a fairy tale
|
On June 29 2015 19:37 sabas123 wrote:Show nested quote +On June 28 2015 23:50 Manit0u wrote:On June 28 2015 11:42 Ben... wrote:On June 25 2015 23:36 Acrofales wrote: Anyway, javascript has a special place in hell reserved for it (next to php and perl which are legitimately awful programming languages), not because it is terrible, but because it is omnipresent and SHOULD NOT BE.
Javascript is acceptable, and pretty good at what it does AS LONG AS IT STAYS CLIENT SIDE AND RUNS IN A BROWSER. I have a passionate hatred for Node.JS, Tizen, and all other frameworks that try to drag Javascript to places it doesn't belong, when there are FAR better languages for each of those areas (Python, Ruby and even LUA come to mind) There is too much wrong with it to want it to be prevalent.
I would totally give you a high five if I saw you in person. Seriously, why do people seem to think Javascript needs to be used for everything? Are they just lazy? Dumb? Both? Learning another programming language is not a difficult thing to do. Most people think that if something "can" be used in a certain way, then it definitely "should". And jus adding personal, unrelated rant: Work planned to take 2 weeks with 6 people on the team. 4 people get transferred to final bugfixing for other critical project release. End up with 2 people (me and one other dude) and 1 week to get it all done. We almost made it, but I feel like a zombie right now after having spent 7 days working hard each day of the week. Still, 90% of the stuff was done and I am damn proud we managed to pull off that much. wow wtf, you didnt got extra time for that stuff even while 75% of your teams capacity was pulled out?
Welcome to the real world.
|
Meh - software engineering and computer science has this thing, where if you only work for the 40 hours you're supposed to and request actual overtime payment for your overtime. You're not a real programmer.
I'm very content with not being a real programmer
|
|
|
|