Reputation
292
Top tag
Next privilege 300 Rep.
Create new tags
Badges
3 11
Impact
~5k people reached

  • 0 posts edited
  • 2 helpful flags
  • 7 votes cast
Mar
6
comment Tracking time users spend on my website
Correction: if it does impose a heavy server load, then look into what can be changed (MongoDB would be one option, but never the first one). Never make assumptions about performance ... in many situations MongoDB is slower/more resource heavy than MySQL.
Mar
6
comment Tracking time users spend on my website
@Jules auto increment is slow because it's necessary to avoid duplicates somehow, which is problematic in multithreaded situations (like a web server) and can easily result in a simple insert taking 5 minutes. You should instead use a "version 4" UUID - which is designed to be able to handle trillions of inserts per second spread across as many threads as you want (avoid "version 1" UUIDs since they have similar multithreading performance issues just like auto increment). stackoverflow.com/questions/2040240/…
Mar
6
comment Tracking time users spend on my website
Your simple solution is the best one - just make sure the log is written to a separate machine from the one used to show the website... and make sure the communication layer between those machines is fast (for example, your web server should send an entry to the log server without waiting for confirmation - use insert delayed for example). This way if there are performance problems, nothing bad happens - you'll just miss out on stats for a day or two until the problem is fixed.
Mar
6
comment Which data store is best for my scenario?
@Jugs switching to a different type of database is not going to help you here - if anything, it's likely to get worse. "Throwing more hardware" at it is also not very sensible (unless it's an easy change, like increasing the amount of RAM cache your database has). You need to restructure things so that it does not take 500ms per user... the target should be less than 1ms per user. Without knowing more there's nothing we can do to help reach that goal.
Mar
6
revised Why does integer division result in an integer?
added 293 characters in body
Mar
6
comment Why does integer division result in an integer?
@5gon12eder there's no need to nit pick, I'm just trying to describe a complex problem in simple terms. The entire point of supporting non-integer values is to have decimal places (which can be done using integers by simply multiplying everything by the number of decimal places you want as I demsonstraed).
Mar
6
answered Why does integer division result in an integer?
Apr
27
awarded  Notable Question
Jan
27
answered Would one use a 2D Gaming Engine for a desktop application?
Jan
27
comment What causes floating point rounding errors?
Floating points aren't just useful for a lot of decimal places. 32 bit integers can only count up to about 4 billion, but a 32 bit float can be almost infinitely large.
Jan
27
comment Displaying copyright notice for OSS in closed source Android app
This. Just make sure the license is readily available and easy to find. Since the license is not crystal clear, you cannot be held responsible for having a different opinion to the copyright holder as to how the license should be interpreted. However if the copyright holder does ask you to do things differently you should comply with the new request promptly. A good example is when Apple did not attribute Open Street Maps the way OSM wanted to be attributed. There was no lawsuit, just a complaint, and Apple immediately promised to resolve the issue and a few weeks later did as OSM had asked.
Jan
27
comment Displaying copyright notice for OSS in closed source Android app
Whenever possible, I always send an email to the project author (or mailing list/issue tracker for large projects) and ask what attribution they prefer. For my own projects, I choose a license that does not require any notice at all. People usually still give notice but that's their choice.
Jan
27
comment Should an Http API always return a body?
This. When I send a request to a JSON API server the first thing I do is check if the response is valid JSON. If it's not valid, then I assume the request failed even if I got a 200 response. A blank response/string is not valid JSON.
Jan
27
comment Open source code with no license… can I fork it?
allowing others to hit a fork button so they can modify the code and perhaps send a pull request is one thing - I agree adding code to github implicitly allows others to do that, but it doesn't give anybody the right to start redistributing the code elsewhere or upload it to the iOS app store and start selling it for example. That would require a license file explicitly permitting it.
Jan
20
awarded  Quorum
Jan
17
comment Open source code with no license… can I fork it?
Since they're contradictory you'd have to ask a jury, not a lawyer. But I don't think GitHub's terms of service will override copyright law. GitHub does not own copyright to the code, therefore they have no right whatsoever to decide who can do what with it. The terms of service will protect GitHub but doesn't protect the person who makes a fork - they could be found guilty of criminal copyright infringement if they use the code without permission.
Sep
25
awarded  Nice Question
Nov
14
awarded  Popular Question
Mar
21
awarded  Yearling
Feb
28
awarded  Caucus