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

04-23-2015 , 02:17 PM
Quote:
Originally Posted by Anais
This is for Netflix you say?
No. And even if it was, we're not gonna mention the company name cuz of the googles and such.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-23-2015 , 03:19 PM
Let's just call it hooli instead
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-23-2015 , 03:33 PM
I was leaning towards FetNlix
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-23-2015 , 04:01 PM
Quote:
Originally Posted by adios
You hung in there and got through it, good job. I think it will be valuable. Changing gears from C++ to Java also good experience in my view. The grade doesn't matter very much, what you learned does matter.

Think about this, what if your project had actually taken an approach that was more inline with Agile. Daily scrum meetings, short term sprints, scrum master etc. I am guessing the problems such as those with the sprite approach would have revealed themselves a lot earlier.
Yea, we would have figured out this issue like 6 weeks ago, when we needed to.

Fitting that I just bought and have been reading this for the last few weeks:

** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-23-2015 , 04:06 PM
I now have a homework assignment. Looks pretty straightforward. They don't want me to use Angular or other two-way data binding though, so I can "show off my chops". Let's see - how the hell do you code an event in vanilla JS again...?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-23-2015 , 04:10 PM
if it helps, codecademy never mentioned that events exist in javascript, so they probably don't.



Spoiler:
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-23-2015 , 04:19 PM
You can use browserify and extend node's core events module.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-23-2015 , 04:44 PM
I didn't realize custom events were browser-specific (at least until recently). jQuery and underscore are ok to use. So I'll just go with that.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-23-2015 , 05:00 PM
Quote:
Originally Posted by candybar
If X is going to be small (as in video game top scores), pretty much anything works. If X is going to grow large, you probably want to use a priority queue where lowest score has the highest priority.

http://en.wikipedia.org/wiki/Priority_queue

Edit: note that if the scores change and you're not notified of the changes, you pretty much have to process the entire list every time. also, you may have to implement locking yourself you're not using concurrent data structures.
Yes, X is going to be fairly small.

There is not going to be enough processing time to go through the entire list of candidates each time. It is going to be more of a best effort based on our current knowledge of the world thing. The use case is selecting data sets for garbage collection.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-23-2015 , 05:55 PM
Quote:
Originally Posted by KatoKrazy
Yes, X is going to be fairly small.

There is not going to be enough processing time to go through the entire list of candidates each time. It is going to be more of a best effort based on our current knowledge of the world thing. The use case is selecting data sets for garbage collection.
You're looking at heuristic algorithms then and details like the statistical shape of the actual data are going to dominate your decision making. Tough to offer much more without those details.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-23-2015 , 06:21 PM
Kato: Sounds like a heuristic to me.
With severe runtime limitations and aiming for an as-good-as-feasible solution, I'd start with a "greedy" approach and see if there's a low-cost way to improve on that afterwards.

The structure for the X candidates isn't that important, as long as insertion, deletion and re-ordering aren't ridiculously expensive. I'd personally probably go with an unordered binary tree. It will occasionally rebalance parts of it when inserting or updating scores. And I'd keep track of the lowest score separately (most elements will score below, so that comparison is important).
When inserting, you obviously cut off the lowest score.

The key is going to be choosing the elements to check for for insertion/updates from the big list. Obviously, unknowns would have first priority - so the latest additions first.

If there is no discernible pattern to changes, go with the greedy effort.
This means partially traversing the list, keeping track of where you ended up last time, then continue from there in the next iteration (obviously after inspecting the latest additions/unknowns first.)

There may be patterns to how scores change over time that allow you to improve on sequentially traversing the big list.
Say, for example older scores tend to change more, then focus more on the front part of the big list. If younger scores are more volatile, focus on the tail end.
You could then keep track of two points in the list and spend more time in the front or back part while inspecting elements.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-23-2015 , 08:49 PM
Quote:
Originally Posted by KatoKrazy
Looking for some algorithm and data structure feedback. My task is to design a reentrant routine that periodically gets run time and must maintain an approximate list of the top X candidates out of a larger ever changing list (order of the big list will always be the same except for new items being added at the end or me removing one of them but scores will change constantly...however scores will only increase)

Is there going to be a more efficient way to do this than maintaining a sorted array of size X, and checking the next item in the bigger list against the lowest score? If it is higher than the lowest score first check to see if it is already in the array and update the score, then place it in the corrrect spot?

Sorry if this is a bit hard to follow typing this on my phone over lunch.
Why is reentrent a requirement? From your description if this callback gets reentered then the function took too long to process the data.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-23-2015 , 09:12 PM
44% thru odin project

turns out, hate jquery equally as much as css/html

sad there wasn't exactly a tutorial on how to use javascript with jquery. just kinda let you figure that out for yourself. seems like a huge leak in the educational plan.

on to ruby!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-23-2015 , 09:23 PM
Quote:
Originally Posted by candybar
You're looking at heuristic algorithms then and details like the statistical shape of the actual data are going to dominate your decision making. Tough to offer much more without those details.
Quote:
Originally Posted by kazana
Kato: Sounds like a heuristic to me.
With severe runtime limitations and aiming for an as-good-as-feasible solution, I'd start with a "greedy" approach and see if there's a low-cost way to improve on that afterwards.

The structure for the X candidates isn't that important, as long as insertion, deletion and re-ordering aren't ridiculously expensive. I'd personally probably go with an unordered binary tree. It will occasionally rebalance parts of it when inserting or updating scores. And I'd keep track of the lowest score separately (most elements will score below, so that comparison is important).
When inserting, you obviously cut off the lowest score.

The key is going to be choosing the elements to check for for insertion/updates from the big list. Obviously, unknowns would have first priority - so the latest additions first.

If there is no discernible pattern to changes, go with the greedy effort.
This means partially traversing the list, keeping track of where you ended up last time, then continue from there in the next iteration (obviously after inspecting the latest additions/unknowns first.)

There may be patterns to how scores change over time that allow you to improve on sequentially traversing the big list.
Say, for example older scores tend to change more, then focus more on the front part of the big list. If younger scores are more volatile, focus on the tail end.
You could then keep track of two points in the list and spend more time in the front or back part while inspecting elements.
Great feedback, close to what my initial design looks like. It is likely that items earlier in the list (meaning they closed longer ago) will more often be the best candidates as they have both aged longer and had more time to be invalidated (the two largest parts making up the "score"). I like the idea about having two different pointers into the list, and maybe choosing the one deeper into the list only every "x" runs or something.

Quote:
Originally Posted by adios
Why is reentrent a requirement? From your description if this callback gets reentered then the function took too long to process the data.
There is pretty much zero chance that we will be able to process all the data during one runtime. It looks like we are going to have it process a few entries each time it wakes and then have it go back to sleep and wait to be scheduled by the RTOS again, making the list of "best" candidates truly just best effort at any given time.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-23-2015 , 10:13 PM
Quote:
Originally Posted by KatoKrazy
....


There is pretty much zero chance that we will be able to process all the data during one runtime. It looks like we are going to have it process a few entries each time it wakes and then have it go back to sleep and wait to be scheduled by the RTOS again, making the list of "best" candidates truly just best effort at any given time.
This is pretty much a prescription for not making it reenterent. If your callback constantly takes more time to process the data such that your callback is being re-entered before it is finished, thus not exiting, I hope you can see that this will blow up your stack.

Reentrency is important for things like dynamically linked libraries. I would think a reentrancy requirement would make sense if you had more than one list with more than one timer event triggering the callback.

If your solution is maintaining state variables between callback invocations to determine where you are at in the processing your solution is probably not going to be reentrent.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-23-2015 , 10:54 PM
Anyone know anything about the inner workings of the iOS objective C reachability class?

What triggers host reachability change notifications?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2015 , 01:18 AM
Quote:
Originally Posted by Anais
44% thru odin project

turns out, hate jquery equally as much as css/html

sad there wasn't exactly a tutorial on how to use javascript with jquery. just kinda let you figure that out for yourself. seems like a huge leak in the educational plan.

on to ruby!
If you don't like plain old html you could use something else in your projects which turns into html like handlebars, jade, etc.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2015 , 02:04 AM
I don't think the complaint against HTML and CSS is the look of it.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2015 , 04:38 AM
Quote:
Originally Posted by kazana
The structure for the X candidates isn't that important, as long as insertion, deletion and re-ordering aren't ridiculously expensive. I'd personally probably go with an unordered binary tree. It will occasionally rebalance parts of it when inserting or updating scores.
Only now noticed the earlier error there. What I meant is an unbalanced binary tree.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2015 , 01:36 PM
My employer just announced they will no longer be tracking vacation and will be paying out all accrued hours as of 5/22. Most people here are excited but the cynic in me expects this to actually be a bad thing.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2015 , 01:49 PM
so... will people just not get paid on vacation?

Quote:
Originally Posted by daveT
I don't think the complaint against HTML and CSS is the look of it.
finger_touching_nose.jpg

really enjoying ruby so far.

really glad it didn't take long to figure this out:

faveNum = (faveNum.to_i + 1).to_s
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2015 , 01:58 PM
Theoretically it is paid vacation whenever you want to take it...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2015 , 02:09 PM
It's definitely worse, imo.

Even when you work for a company that genuinely cares about work/life balance - its crappy. Its basically a way for a company to appear that they're free with benefits without actually having to back it up. It relies on peer pressure and internal managers to keep people from taking too much vacation (and it does it effectively).

Edit: My current job is 'take what you need vacation' and my last job was also, but at my last job I had explicitly stated how much vacation I was going to take each year and so it worked ok.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2015 , 03:44 PM
I don't think the answer is so binary.

We've been over this before, but my last company was "unlimited vacation" and then switched to "2 week minimum" because people were not being allowed to take vacation. I had a co-worker request the Monday after Thanksgiving break and be denied, and he provided a month's notice for the single day off.

Now I technically get something like 3.5 weeks and a few personal days, basically a month. Everyone has something pretty similar, and we encourage taking it and recharging, I don't think we are really tracking it though, so its basically a "take as much as you need, within reason" policy. For people who report to me, I am not tracking it anywhere, I just always say yes and have never felt I was being taken advantage of.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-24-2015 , 04:13 PM
Fair point. I could see an "untracked" vacation policy with rough guidelines on 'appropriate' amounts being a good solution.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m