|
v1nce posted:What are you making? Does the underpants-burning speed provided by LevelDB justify the annoying to work with "database" you're about to build? I work at high school in Sydney, Australia. Our teachers are required to 'buddy up' with another teacher and observe a few of their lessons each term and provide feedback. I'm building an application for our teachers to allow them to record their feedback about the lessons that they observe. It needs to be only accessible to users within our Google Apps hosted domain - I'm making use of Passport to handle Google auth for that. After they've logged in, they can either: record a new lesson observation, review previously recorded observations, review observations that other teachers have recorded about them. Ideally they would also be able to edit observations they've recorded in the past. I also need to provide an admin 'dashboard' for a shortlist of managerial staff that allows them to view all recorded observations, as well as some nice graphs, etc. At the moment I'm using the following naming structure for my keys: code:
With all that said, the application is not going to generate a huge amount of intense traffic/db activity. Since getting stuck into learning LevelDB I've really come to like it - being able to have the DB installed just with a 'npm install' and configured by my application is a big plus.
|
# ? Jul 14, 2014 05:47 |
|
|
# ? Jun 5, 2024 19:32 |
|
What are you doing to get all the observations made by a particular person? Your data set is inherently relational, you almost certainly want a relational database for it. (As to why there's a sudden proliferation of key/value stores - the cynical answer is that it's easy for an amateur to write one that's "faster" than a real database for some trivial problem, and hence they become motivated to polish that turd until it shines. There are some legitimate uses for a key/value store, but I would always recommend starting with a real database and only consider switching to a key/value store once you've got a feature-complete implementation, and you know that a key/value store is going up be sufficient.)
|
# ? Jul 14, 2014 06:16 |
|
leveldb is pretty amazing 1. Written by Jeff Dean. 2. Used as the backend of Chrome's IndexedDb implementation. 3. Ordered Keys However it is obvious that the structure of the data is way better suited by a relational database. But if you're going to use it you should at least know what the point of using leveldb is, which is that it has ordered keys. So if you set your key as observer!observed~date.now() And you want to find all the people observer has observed you just specify a start and end key name and leveldb will return all the key items between start and end. So in levelup it is JavaScript code:
|
# ? Jul 14, 2014 06:52 |
|
Jabor posted:What are you doing to get all the observations made by a particular person? Strong Sauce posted:But if you're going to use it you should at least know what the point of using leveldb is, which is that it has ordered keys. Of course. I'm currently using this approach to find all observations created by 'author': JavaScript code:
JavaScript code:
My primary source of experience with relational databases is limited to querying DB2 in RazorSQL all day and a bit of MySQL via phpMyAdmin back in the day. neurotech fucked around with this message at 07:46 on Jul 14, 2014 |
# ? Jul 14, 2014 07:43 |
|
neurotech posted:After they've logged in, they can either: record a new lesson observation, review previously recorded observations, review observations that other teachers have recorded about them. Ideally they would also be able to edit observations they've recorded in the past. Why not just have the teachers sit down and write a paragraph on paper, or as a word doc, and then file it? Why do you need to build a complicated web app for this? I'm hesitant that your web app is actually going to be used.
|
# ? Jul 14, 2014 13:13 |
|
Suspicious Dish posted:Why not just have the teachers sit down and write a paragraph on paper, or as a word doc, and then file it? Why do you need to build a complicated web app for this? Good question. They're being made to do this already in an existing system that is less than satisfying. I'm trying to build something to make the experience a bit better for them.
|
# ? Jul 14, 2014 14:00 |
|
Chenghiz posted:Why is it that every new hot database seems to be key/value? Are relational databases like postgresql and mssql just that perfected/done?
|
# ? Jul 14, 2014 14:11 |
|
Chenghiz posted:Why is it that every new hot database seems to be key/value? Are relational databases like postgresql and mssql just that perfected/done?
|
# ? Jul 14, 2014 14:26 |
|
neurotech posted:Good question. They're being made to do this already in an existing system that is less than satisfying. I'm trying to build something to make the experience a bit better for them. Have you talked to them about why they hate the experience and what they'd really like? Replacing one overcomplicated, terrible web app with another isn't going to solve the problem.
|
# ? Jul 14, 2014 14:46 |
Suspicious Dish posted:Have you talked to them about why they hate the experience and what they'd really like? In my experience your teachers are going to keep writing their notes in paper and then they'll transcribe them to the system one by one.
|
|
# ? Jul 14, 2014 14:49 |
|
I personally still keep all my notes in pen and paper, because all digital note-taking apps suck. I don't see what's wrong with saying that teachers take notes in the medium they prefer.
|
# ? Jul 14, 2014 14:53 |
|
Misogynist posted:Most of the features of traditional relational databases (joins, multi-table transactions, etc.) become totally useless (as in they don't work anymore) when you need to start sharding your dataset across multiple server instances. Depends very much on how you shard things. Scalebase has one set of tools that is basically transparent, as an example, and we shard with internal tools (which might be coming to webscalesql soon? I forget) while preserving the relational properties we need. If you need corpus-wide joins and transactionality, it's not like you'll get them with a key-value store either...
|
# ? Jul 14, 2014 15:38 |
|
Subjunctive posted:Depends very much on how you shard things. Scalebase has one set of tools that is basically transparent, as an example, and we shard with internal tools (which might be coming to webscalesql soon? I forget) while preserving the relational properties we need. ...b-but web scale?
|
# ? Jul 14, 2014 15:48 |
|
Wheany posted:...b-but web scale? Turns out!
|
# ? Jul 14, 2014 15:58 |
|
I'm stumped on a weird problem. I'm using jstree with the alternative JSON format. I'm manually building an object, because I do not want to modify my backend just for this one little thing.code:
I'm not a big front-end developer. Is there a way to debug jstree and discover why it's not rendering the child nodes? It's equally possible there is some bit of syntax sugar I'm missing.
|
# ? Jul 14, 2014 18:51 |
|
Subjunctive posted:Please help me find my stupid Fabric.js error. I'm trying to center things in a group, which AFAICT is the default behaviour, and it's not happening. Yet another silent 1.4.0-vs-later silent incompatibility. It is joy.
|
# ? Jul 14, 2014 19:04 |
|
Suspicious Dish posted:Have you talked to them about why they hate the experience and what they'd really like? Yes, I have. Hence the whole motivation to build this thing. I take offence to your assumption that the replacement I'm building will be 'overcomplicated' and 'terrible', though. Low blow! neurotech fucked around with this message at 23:22 on Jul 14, 2014 |
# ? Jul 14, 2014 23:11 |
|
Sorry, but I've seen many people eagerly rush to computer-ify a problem when a simpler solution would be much better, and I want to make sure you're not making the same mistakes. The fact that you're doing this for a single high school in some random county doesn't increase my confidence.
|
# ? Jul 15, 2014 00:08 |
|
Suspicious Dish posted:The fact that you're doing this for a single high school in some random county doesn't increase my confidence. Why is that relevant to whether it will be a better experience than the current situation? LOB software is usually pretty narrowly targeted, and aiming at a known audience you can talk to is a good way to start with most anything.
|
# ? Jul 15, 2014 00:34 |
|
Just the fact that it seems like a lone IT guy going "I know how to make it better! Computers!!" and building some system nobody actually really likes.
|
# ? Jul 15, 2014 00:42 |
|
Suspicious Dish posted:Just the fact that it seems like a lone IT guy going "I know how to make it better! Computers!!" and building some system nobody actually really likes.
|
# ? Jul 15, 2014 01:07 |
|
Suspicious Dish posted:Just the fact that it seems like a lone IT guy going "I know how to make it better! Computers!!" and building some system nobody actually really likes. Huh. I hadn't seen evidence of that, that I noticed. Don't know if people will really like it, I guess, but it sounds like he's connected to the people who have the problem, so the odds seem as good as any program's out of the gate. I mean, the fact that he's asking for advice on how to do a good job puts him on the right half of the bell curve IMO. It's not like the scope is huge or anything. Not really getting the pessimism. Sorry you're having a bad day.
|
# ? Jul 15, 2014 01:12 |
|
That sure is a whole lot of assumptions, Dish! I'm aware of the phenomena that you're describing. I've been working in schools for the last 11 years and have seen it, and worse, happen before. With that said, I'm trying my best to make sure that the tool I'm building for our staff is actually beneficial and not just an instance of "Solve this problem by making a computer thing for it!". I'm not sure what you're implying with your "single high school in some random county" (country?) comment. In your reply to Subjunctive you dodged the question. You're coming off in a very condescending manner posting stuff like that.
|
# ? Jul 15, 2014 01:14 |
|
Suspicious Dish does have some valid concerns, we've all been on the receiving end of some godawful "our IT guy made this" systems, however I think neurotech's given sufficient justification for what he's doing, and rather than just poo-poo his approach, maybe we should be helping him to not gently caress it up? Besides, being paid to make one-off pieces of crap is how a lot of us got into this business Suspicious Dish posted:Why not just have the teachers sit down and write a paragraph on paper, or as a word doc, and then file it? Why do you need to build a complicated web app for this? Besides neurotech's own answer, the usual reason for this is "automated reporting", which is the be-all desire for most managers who have large chunks of data placed in front of them. Plus it can be backed up, can be improved, and it's standardised by being a system and not paper/word document. neurotech posted:If I were to go for a relational database, what should I consider? You want a relational database because this kind of system has a lot of room for additional features, which if you're going to be implementing even basic reporting, seems like something managers will want. For instance, they might want to be able to attach a star rating to every report, or a star rating for individual aspects of how they educate. They then might want the reports to take into account the reviewer bias, by looking up all reports by that reviewer and calculating the min/max scores they give. Under a key/value store that's a huge pain in the rear end, especially as to get those kind of aggregated data points you need to fetch everything into memory from the store and then process it, rather than have the database do the legwork. Justification aside, I really can't help you pick something that's easy for NodeJS, but all things web development are "tool for a job" - don't use something that's not entirely suitable because someone, if not yourself, will hate you for it later on. If I were to go relational I'd probably go with MySQL, but that's because of where my experience lies, and should be perfectly adequate. Most of the dev threads should be able to help you with any SQL troubles you run into.
|
# ? Jul 15, 2014 02:32 |
|
v1nce posted:Database stuff Thanks for the insight, v1nce. I am going to put a bit more time into researching relational DB options for node.
|
# ? Jul 15, 2014 02:47 |
|
neurotech posted:That sure is a whole lot of assumptions, Dish! Yep. I'm aware. neurotech posted:I'm aware of the phenomena that you're describing. I've been working in schools for the last 11 years and have seen it, and worse, happen before. With that said, I'm trying my best to make sure that the tool I'm building for our staff is actually beneficial and not just an instance of "Solve this problem by making a computer thing for it!". Cool, that makes me happy to see. Having been on both sides of this for a long time, I just wanted to make sure that there wasn't an easier solution you were aware of. I'm trying to help you, not put you down. neurotech posted:I'm not sure what you're implying with your "single high school in some random county" (country?) comment. In your reply to Subjunctive you dodged the question. You're coming off in a very condescending manner posting stuff like that. I actually meant county. Perhaps you don't have counties in Australia? I'm a dumb American, I have no idea about that sort of thing, excuse my ignorance. There's a bunch of different dumb stereotypes that I've seen over the course of my life that contribute to this. The first is that I've seen IT workers build complex, homegrown systems simply because it's fun and help them avoid actually dealing with the more boring parts of their job, and dealing with people. You're also not using an off-the-stock solution and customizing it. This is a custom-built web-app you're making here. You're using LevelDB and other "fun modern" tech, which means that it's skewed more towards the "pet project" side of things than "stable and in production", at least from my biased judgment. I've also seen lots of solutions get implemented that even with the best of intentions, the staff aren't really happy with it. Who's going to train the staff? Is it you? For a high school in a large city like Sydney, can you be sure that all of your staff are comfortable with the system if it's forced on them? What about the twenty or so of them that have been writing their notes on pen and paper, since that's the way that they've done it for the past 30 years of their career? Who's going to answer tech support and feature requests? Is it you? What if you get hit by a bus tomorrow? Who's going to maintain this custom node.js web app now? If this was a project you were selling, or being consulted for, I'd feel a bit better, because either you sell it and live (and thus actually have to sell it), or you get your specs handed to you and it's not your job to come up with better solutions. Really, I'm not trying to put you down, I'm just worried about these things. Because 50% of the time, the answer could have very well been "oh, I didn't think about that! I guess pen and paper make more sense considering the age and technical experience of our staff".
|
# ? Jul 15, 2014 04:02 |
|
Suspicious Dish posted:I actually meant county. Perhaps you don't have counties in Australia? I'm a dumb American, I have no idea about that sort of thing, excuse my ignorance. I think we technically do have counties but nobody in Australia really uses that term. Suspicious Dish posted:There's a bunch of different dumb stereotypes that I've seen over the course of my life that contribute to this. I am training the staff, yes. I admit that I can't be sure that all staff will be comfortable with the system - there's always a portion that will take issue. I'm hoping to make that portion as small as possible with my project. I'll also admit that this is on the pet project side of things. I'm using this project for my own professional development as well as value-adding to the school. Without going into too much detail, the 'Mentoring' program that's behind the 'lesson observation' app is a relatively new addition to the school's professional development plans. We don't really have any staff who are that deep in the 'pen and paper' mindset (all staff are given a laptop from day one). Suspicious Dish posted:Who's going to answer tech support and feature requests? Is it you? What if you get hit by a bus tomorrow? Who's going to maintain this custom node.js web app now? Me again. The 'hit by a bus' is a problem, for sure. It's also a problem that is not unique to this project, or even me in my role in the school. This is getting beyond the scope of this discussion, I think. Edit: In my defence, I got a lot out of this Workplace post: http://workplace.stackexchange.com/questions/9128/how-can-i-prepare-for-getting-hit-by-a-bus and am slowly trying to implement some of the ideas proposed. Suspicious Dish posted:If this was a project you were selling, or being consulted for, I'd feel a bit better, because either you sell it and live (and thus actually have to sell it), or you get your specs handed to you and it's not your job to come up with better solutions. It's cool. I understand the frustration. My dinky little office is ensuite to the staffroom, so I get full access to the entire spectrum of complaints, criticisms, and annoyances that come from staff trying to use tech in their teaching. neurotech fucked around with this message at 04:48 on Jul 15, 2014 |
# ? Jul 15, 2014 04:45 |
|
I'm way late on the conversation, was meaning to post a day ago, but anyway I'd just like to add that in my admittedly short career I've never seen a project that has been vindicated by their decision to use semantic primary keys. If you develop and build something for long enough, you'll hit that point where you need unique identification and you just can't provide it due to that design decision. As a result, something that would be trivial, now becomes days of work re-factoring and migrating, and it's even worse if you're in production at that point. I'm not keen on dogma guiding software development, but sticking to surrogate keys with no semantic meaning is a no-brainer for my mind. Unless you throw away your project in three months, someone will ask for something eventually that will break semantic keys and require way more effort than that feature warranted. Use a key value store that can support indexing fields, or use SQL.
|
# ? Jul 15, 2014 06:15 |
|
What's a good way of getting the absolute position of an element besides getBoundingClientRect()? I've been trying to place buttons relative to an x number of elements on a page. It works okay in most browsers but Safari for iOS doesn't work correctly most of the time. I've tried setting the button positions using getBoundingClientRect and returning the top and left positions of the elements and placing the buttons relative to that on window.onload and even tried updating the positions with setInterval and some placements are totally off.
|
# ? Jul 15, 2014 16:58 |
|
What about the standard hack?JavaScript code:
|
# ? Jul 15, 2014 17:01 |
|
Suspicious Dish posted:What about the standard hack? I tried that with the same results. I narrowed it down by copying over the resulting html. It looks like it's being caused by the article tags above with text content inside and a specified width. Again, looks normal in OS X browsers, but not Safari for iPhone. Looks okay on iPad but I haven't always had it behave correctly. HTML: http://pastebin.com/X6K3KhbJ CSS: http://pastebin.com/6tTApQMr edit: JSFiddle http://jsfiddle.net/CZSW9/ I know at this point this really isn't Javascript, but I don't think there is an HTML thread. The screen is of course thinner too on the iPhone so the actual button positions would be offset differently, but even if I use a function to find the position of the element, it positions incorrectly. edit 2: I can't get this happen using Javascript to place the buttons! Argh... There must be something different than my script and using JSFiddle? So what are the huge differences between these? The one with the Javascript works on iPhone and the html one doesn't. HTML: http://jsfiddle.net/CZSW9/ With java script: http://jsfiddle.net/CZSW9/21/ LP0 ON FIRE fucked around with this message at 19:51 on Jul 15, 2014 |
# ? Jul 15, 2014 17:31 |
|
I am using the InfoBox plugin to create custom interactive info-windows in google maps. From these infowindows users can scroll through a list and click on an image to invoke some script. Everything works, the issue is when enableEventPropagation is enabled I can click through the infobox to other markers which causes another infobox to pop up. does anyone have experience solving this problem? code:
code:
code:
|
# ? Jul 15, 2014 22:03 |
|
excidium posted:Need some ideas on how the best way to tackle this issue. I'm using an API call to get back all of the data on a page. The data is returned in an array of objects containing properties about the field including the name, value, caption, format, data type, read only, required and show condition. Now all of this would be easy to just spit out on the page in the order it appears in the API response but I would like to introduce a way to "design" a page layout. I'm using AngularJS so the idea is to create a template view for each page type that lays out the data and then uses the response to populate all of the values/attributes that make up the page. So I basically told the API designers that the way they were throwing the controls into an array was crippling any ability to create layouts besides those that just dump the data straight down the page through an array loop and output. I hope that the feedback can shift towards a better JSON structure to which I proposed the following format: code:
|
# ? Jul 15, 2014 22:04 |
|
LP0 ON FIRE posted:getBoundingClientRect [...] works okay in most browsers but Safari for iOS doesn't work correctly most of the time That really should just work, so it sounds like some other bug. Did you add scroll position to the getBoundingClientRect().top? code:
N.Z.'s Champion fucked around with this message at 23:24 on Jul 15, 2014 |
# ? Jul 15, 2014 22:40 |
|
I don't know much javascript or jquery. I mean, I can modify and get things to work, but i'm not comfortable writing it from scratch. Does anyone have any great solid teaching resources? I don't mind paying for video tutorials, or online classes. I can't seem to find any community college scripting programs, and i figured the net is the best way to go about it. if any are highly recommended, I'd appreciate.
|
# ? Jul 16, 2014 16:02 |
|
N.Z.'s Champion posted:That really should just work, so it sounds like some other bug. Did you add scroll position to the getBoundingClientRect().top? Thanks for showing me that code, but I tried adding the scroll positions like that and it doesn't make any difference! I'm so stumped. It works fine if there is one element, but not two. My code reports the same y position it should go to if the 2nd element is omitted, but yet the button y positions go up. It's like it's lying about the y positions it reports. wtf..
|
# ? Jul 16, 2014 16:10 |
|
stoops posted:I don't know much javascript or jquery. I mean, I can modify and get things to work, but i'm not comfortable writing it from scratch. http://www.lynda.com/ is well worth the monthly fee for good video tutorials. But before you do anything with jquery, go through the javascript lessons at http://www.codecademy.com/. Trying to jump into jquery before learning the core basics of javascript was one of the biggest mistakes I made starting out.
|
# ? Jul 16, 2014 16:21 |
|
stoops posted:I don't know much javascript or jquery. I mean, I can modify and get things to work, but i'm not comfortable writing it from scratch. I really like this one: http://eloquentjavascript.net/
|
# ? Jul 16, 2014 16:37 |
|
stoops posted:I don't know much javascript or jquery. I mean, I can modify and get things to work, but i'm not comfortable writing it from scratch. http://www.bento.io/javascript
|
# ? Jul 16, 2014 17:03 |
|
|
# ? Jun 5, 2024 19:32 |
|
stoops posted:I don't know much javascript or jquery. I mean, I can modify and get things to work, but i'm not comfortable writing it from scratch.. Do you have any programming experience in other languages?
|
# ? Jul 16, 2014 17:16 |