|
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. |
On September 16 2015 06:34 Birdie wrote: Y = Z is invalid as you didn't use an operation (other than assignment). Solution to 3 looks correct, although there's another way to do it which is slightly different (but same thought process). oops
fixed and found another solution
|
|
Donald Knuth's Art of Computer Programming are supposed to be the best books on comp sci algorithms. I haven't had a chance to get my hands on them yet though.
|
|
|
|
On September 17 2015 20:29 Nesserev wrote:Would it be possible to compare the calls to 'last_write_time()' with an 'ltrace'-like program for the different versions of windows? If the calls are the same for all platforms, then the problem is probably the .dll; if not, it's probably Warcraft 3. Seems like a nullptr is referenced, so it might be warcraft 3; but my bet is still on Microsoft. Actually none of the parameters are used in the function(they're there so that it can be loaded by WC3 for testing), I hardcoded the path to War3.exe and ensured that the file exists and it's a regular file before calling last_write_time(). The Runtime Library option is set to Multi-threaded (/MT) so the code shouldn't rely on external DLL's. I have no idea how to compare calls though
I don't think we can blame the problem on Microsoft since I wrote a test program which was able to successfully call CheckRevision()(and last_write_time()).
|
I'm trying to program a series of for loops that will take an inputted series of text and output it in single lines 60 characters long with an asterisk on the left and ride side of each line. Leaving the text centered in the middle.
This feels like it should be really simple but I can't remember/figure out(took a long break from programming, this was a challenge to myself as a starter to get back into it) how to find a space character, cut off the string, and then add the necessary surrounding spaces and asterisks. This is to prevent the problem of an awkwardly cut off word.
edit: language is Java.
Also, if someone wants to actually do it and post a full solution, I would be happy to see one spoiler'd so I can go back when I finish and see how someone else would've done it.
|
I feel like its some sort of permission error, which is why the result is to point to nothing. Maybe it just can't access the file's last write time while you're running the file, and in later version's of windows its more lenient and lets you/accommodates that functionality.
|
On September 18 2015 10:27 3FFA wrote: I'm trying to program a series of for loops that will take an inputted series of text and output it in single lines 60 characters long with an asterisk on the left and ride side of each line. Leaving the text centered in the middle.
This feels like it should be really simple but I can't remember/figure out(took a long break from programming, this was a challenge to myself as a starter to get back into it) how to find a space character, cut off the string, and then add the necessary surrounding spaces and asterisks. This is to prevent the problem of an awkwardly cut off word.
edit: language is Java.
Also, if someone wants to actually do it and post a full solution, I would be happy to see one spoiler'd so I can go back when I finish and see how someone else would've done it.
https://gist.github.com/Blisse/e68b99719c8e035a31f1
could use comments and a couple places could be done better but it's supposed to be rough
|
On September 18 2015 12:59 killa_robot wrote:I feel like its some sort of permission error, which is why the result is to point to nothing. Maybe it just can't access the file's last write time while you're running the file, and in later version's of windows its more lenient and lets you/accommodates that functionality. Microsoft's documentation of last_write_time() says that the function returns file_time_type(-1) on error, no mentions of throwing any exceptions, though the overload of the function I'm using is not marked as noexcept. I had also tested my test program with WarCraft 3 open as well with no errors.
|
Can someone give me a very general and brief explanation as to when it's better to use a NoSQL backend opposed to a standard relational SQL backend?
I am going to start working on an application that will forecast pricing on residential real estate and we will be working with a lot of data, I was wondering if it was a good time to hop on the NoSQL choo choo train.
|
Zurich15313 Posts
On September 18 2015 23:25 Days wrote: Can someone give me a very general and brief explanation as to when it's better to use a NoSQL backend opposed to a standard relational SQL backend?
I am going to start working on an application that will forecast pricing on residential real estate and we will be working with a lot of data, I was wondering if it was a good time to hop on the NoSQL choo choo train. Going from just that one sentence description, it doesn't sound like a good idea at all to ditch a proven relational DB for that. That's exactly the kind of application relational databases are great for.
|
On September 18 2015 23:56 zatic wrote:Show nested quote +On September 18 2015 23:25 Days wrote: Can someone give me a very general and brief explanation as to when it's better to use a NoSQL backend opposed to a standard relational SQL backend?
I am going to start working on an application that will forecast pricing on residential real estate and we will be working with a lot of data, I was wondering if it was a good time to hop on the NoSQL choo choo train. Going from just that one sentence description, it doesn't sound like a good idea at all to ditch a proven relational DB for that. That's exactly the kind of application relational databases are great for.
True, and what type of applications are NoSQL databases great for?
EDIT: To be more specific, I know NoSQL is a broad term. I am looking to use and implement MongoDB. I am wondering what would be the pros/cons of choosing MongoDB over standard SQL
|
|
On September 19 2015 02:55 Nesserev wrote: Question: Are you going to be the next facebook/youtube/twitter/... ?
It's both a joke answer and the simple truth. The pro's of using NoSQL are: + horizontal scaling of your database to multiple machines is a lot easier than RDBMS + partially faster in the hands of someone who knows what he/she is doing: more control is given over the actual actions of your query, with potentially massive speed-ups, or slow-downs.
So, basically; will you have to dedicate at least a small datacenter to your application, and do you have the expert backing? Also, keep in mind that NoSQL systems generally don't adhere to the ACID properties, so prepare for potential data loss; and fun features that you take for granted when using the relational data model will be a slow pain when using NoSQL.
General advice: stick to RDBMS
Yes we do have a dedicated data center for our application. I am working alongside an experienced SQL dev, but only so far as RDBMS stands. I am fairly familiar with SQL, not an expert but I can defend myself. I have 0 knowledge of NoSQL, only from my hipster friends who have used MongoDB before and they have told me it's the next big thing.
This part
On September 19 2015 02:55 Nesserev wrote: + partially faster in the hands of someone who knows what he/she is doing: more control is given over the actual actions of your query, with potentially massive speed-ups, or slow-downs.
Is the biggest selling point for me, because we will be doing a LARGE amount of querying.
We can sacrifice some time to learn NoSQL, time is not a problem for us, but efficiency and scalability is an absolute must.
|
On September 19 2015 03:36 Days wrote:Show nested quote +On September 19 2015 02:55 Nesserev wrote: Question: Are you going to be the next facebook/youtube/twitter/... ?
It's both a joke answer and the simple truth. The pro's of using NoSQL are: + horizontal scaling of your database to multiple machines is a lot easier than RDBMS + partially faster in the hands of someone who knows what he/she is doing: more control is given over the actual actions of your query, with potentially massive speed-ups, or slow-downs.
So, basically; will you have to dedicate at least a small datacenter to your application, and do you have the expert backing? Also, keep in mind that NoSQL systems generally don't adhere to the ACID properties, so prepare for potential data loss; and fun features that you take for granted when using the relational data model will be a slow pain when using NoSQL.
General advice: stick to RDBMS Yes we do have a dedicated data center for our application. I am working alongside an experienced SQL dev, but only so far as RDBMS stands. I am fairly familiar with SQL, not an expert but I can defend myself. I have 0 knowledge of NoSQL, only from my hipster friends who have used MongoDB before and they have told me it's the next big thing. This part Show nested quote +On September 19 2015 02:55 Nesserev wrote: + partially faster in the hands of someone who knows what he/she is doing: more control is given over the actual actions of your query, with potentially massive speed-ups, or slow-downs.
Is the biggest selling point for me, because we will be doing a LARGE amount of querying. We can sacrifice some time to learn NoSQL, time is not a problem for us, but efficiency and scalability is an absolute must.
Firstly, the choice for NoSQL is not as plain as it sounds. NoSQL is not a single homogenic thing. It'd be like asking whether you should program your software in Java or in NoJava. Lets say the advantages of Java don't really entice you, you have not yet made a positive choice for something else yet, you have just rejected Java as your programming language.
Similarly, rejecting SQL is not a choice for anything. The most basic version of NoSQL is to save everything in a file on disk. Scalability is a bit shitty. Ability to retrieve data fast is absolutely awful. Ability to add new stuff is fucking fast as lightning. Integrity is not good, but if you want, you can write to two files simultaneously with negligible performance hits and that improves integrity something awesome. Concurrency is non-existent without some controller (see below)
Therefore, if all you want is a log of the past, and to compute some dynamically changing statistics based on the latest data, saving your data to a file is a fucking amazing solution.
But it's not very practical, and there are various different NoSQL solutions that add different functionalities. For instance, CouchDB focuses on the distribution of a DB: it is incredibly fast at replicating the DB to somewhere else. Once your query is indexed, it is also incredibly fast at querying. However, indexing itself is fairly slow. However, adding data without indexing, and also updates, are blazing fast. Note that updates are not actual updates, but simply addition of new data with the same key, but a newer "revision number".
Now CouchDB is just the NoSQL flavour I am most familiar with. Others like Mongo or Cassandra will offer different advantages and disadvantages. NONE of them are ACID, but imho ACID is overrated for most things anyway.
What they all have in common is that their toolset is FAR smaller than your standard SQL solutions. For instance, you want something like foreign keys? You had better just pray that the data introduced is sane, or write your own server-side code to guarantee that, because it won't be given out of the box. Hell, any kind of JOIN query is going to be a mess. I have done stuff that emulates joins in CouchDB, but the map-reduce paradigm is just really not meant for that kinda stuff, and if you go beyond map-reduce you are basically limited to your own code (CouchDB calls these CouchApps, but lets face it, it boils down to querying a FAR larger amount of data than you need and performing complex operations to manipulate it into getting the data that you want). I believe MongoDB is a lot better in this latter respect, but has other quirks.
So when you are evaluating whether you want NoSQL or SQL, your main question should be: what are my performance bottlenecks, and what are my requirements? If doing money transactions or dealing with other sensitive data, you need ACID, and NoSQL is a terrible idea. NoSQL is great for things where missing one or two events is unimportant. Facebook likes, for instance: if on the backend a like is only registered hours later, nobody cares. Same with web searches in Google: as long as it's approximately correct, that will be fine in virtually all cases. In the IoT: registering all the events that all the devices are sending: don't worry if some get saved in the wrong order.
Note that NoSQL don't have ACID, but they do ascribe to Eventually Consistency. Data won't magically go missing. Just a query might give outdated information.
|
From what i've heard, different NoSQL technology cuts different "letters" of ACID.
The I guess the thing that you should take is comparing SQL to NoSQL is like comparing Java to NoJava. NoSQL is pretty much everything that isn't traditional SQL systems. So you should compare a RDBMS to Cassandra or Couch, just like you compare Java to C# or Python.
|
any good job sites that you guys recommend?
i got duped by this consulting company. i'm doing IT duties instead of programming. i feel a bit bummed. (at least I have a good start on C and shell scripting with ksh and bash)
edit: i'm in the US
|
Without a location nobody can help you. There is no universal job site for the whole world...
|
|
|
|