Reputation
10,279
Top tag
Next privilege 15,000 Rep.
Protect questions
Badges
4 36 50
Newest
 Enlightened
Impact
~235k people reached

2d
comment Options for DB to use to store object with 200+ *searchable* attributes and ~500M records
Elasticsearch or Solr could work.
Jun
22
comment php - design: database operations
yes, a framework would be a good idea. Once you worked with one you will get the idea. At least for tasks like those it will give you all you need (beyond that you would have to look into 'design patterns' and OOP but this is a larger thing.). Confusing to me is that if some of those if conditions fail, you still do return $row while no value was assigned to it (which happens only deeper inside those nested if/then).
Jun
22
comment php - design: database operations
Hmm, something model-view-controller would be the way to go I guess. What you describe would be a very simplified approach to a model layer which would already be a step ahead to separate your business and database model from the rest of the app. (Also unrelated: I am no PHP dev, but those functions look quite confusing and seem to return $row in various situation without assigning a value to this variable. Maybe guard clauses would help clean that up a bit by avoiding to nest if/then statements too deep)
Jun
19
comment Client and access to Github history
We do have access to the repositories of our outsourced projects. So that's definitely nothing like 'no developer would ever...'. But to be true, we learned the hard way to make this part of all agreements. From a legal point in your case this may be a matter of interpretation of the actual contract, 'all material' may be seen as 'results only' or really everything. In any case if it's needed as evidence for a law suit a lawyer may be able to get it even if it's not seen as part of the contract.
Jun
16
comment Web apps for enterprise
We did a prototype like that with something called Phonegap. The storage as such worked well enough. Syncing is tricky but can be solved (depending on complexity of the data). But for our case we run in some usability and performance trouble and finally decided for native (which was an easy decisions, since our employees all used the same product). There are limits with html, especially things like background synch and native features like push notifications or whatever are missing.
Jun
16
comment better idiom for selecting id of single record matched using alternative primary key?
You should look into scopes. While you can't reduce the query as such (you have conditions that need to be defined), you can put that whole thing into the Foo model with a scope. Then you get a nice name and can do something like Foo.first_active.
Jun
13
comment Best way to handle blank dates
This really may depend on your application. In some cases it may work or make sense to set an arbitrary date for unknown (say 31.12.1799) in others this may lead to difficult to track errors, like if you need to decide if somebody is of full age to make a purchase.
Jun
10
comment API call to login from a link in email
yes, that would be one of the main problems here. Not only the email provider but also inside the company the IT department and potentially many other people may have access to emails. I have rarely or actually never seen pages doing autologin features like this. I order a lot of stuff online and if they sent you a link for whatever reason it will always require login (unless you are already logged in and the site remembers logins which is much more common). Also allowing to login with facebook, google etc makes login easy and fast.
Jun
10
comment API call to login from a link in email
This would totally depend on the tools you use. Basically: Yes, you could use something like a unique generated ID that is part of the link and your authorization system should be able to accept this (once) instead of the full login. (There are various security implications to take care of). That said: The moment you send me unrequested emails your service would be blacklisted by me and I would never purchase from you again (most likely anyway, this may depend on what exactly you sell). So maybe think twice if this is something your customers want or would find annoying.
Jun
3
comment Database design for linking parent & child relationship
Tables have id fields and children fields that point to this id. But your naming would be somewhat wrong here, since child2 would be a child of child1 not parent1. So basically since this is linear there are just forms following each other. So 'parent' would be 'head' or 'start' which is simply defined by the fact that the field 'parent_id' is null. So first form with id 1 has parent_id=null, first 'child' with id 2 has 'parent_id=1' and second 'child' has 'parent_id=2'.
May
26
comment REST - Recommendation route: POST or GET?
No, if you make a GET on a product and somebody else changes that product your next GET will not return the same product. It's not as if a GET would expect 100% identical results for each call. Ok, in this case the call itself has some kind of 'randomizing' side effect maybe (is this somehow stored on the server to ensure that no results are duplicate? This would be some kind of data manipulation at least). It makes it a bit tricky to decide but it seems not to change the resource as such and just have random effects.
May
26
comment REST - Recommendation route: POST or GET?
If it's reading data and not changing it then it should normally be GET. Using POST would maybe keep crawlers from following it if that's what you want though you could do this with robots.txt I guess (if this is used on websites at all?). Also GET /resource/recommendations, so plural since several items are returned? (Personally I break the singular/plural rules sometimes e.g. when implementing a controller like /search).
May
23
comment Do common relational database systems work 'out of the box'?
Installation of those systems is mostly straightforward (assuming basic systems knowledge). Just use what gets your job done, you are right that most of the advanced features are for larger problems. But so what? Ignore them. Also the more commonly used something is the easier you find help and tools. Though lately we have some move towards various NoSQL databases in Web development for different reasons. Maybe have a look at MongoDB, though you will find the same amount of features you do not actually use.
May
22
comment How should an API or server respond when a device connects with a different account than it is bound to?
Would depend maybe. Why do devices need binding to begin with? How do you find out a device is 'bound'? (Cookies?) Are there possible errors? What are the user patterns? In our company it would be quite common that hardware is moved around between users, so if several of our employees would use your service they would have to 'rebind' once in a while at least.
May
20
comment Hardware for a team of programmers (iOS / Android / Web developers)
Those machines are cheap trash for home use or at best for secretary work. 250G HDD? That's just good for the first two VMs I run on my dev machine. Your devs will have to emulate servers on VMs if they do professional work and use databases. Those specs will lead too low compile times for and slow work in general. If you would ask me to work with this equipment I would start looking for a new job immediately.
May
19
comment How do I structure a URL with several querystring items?
No, just the same. If you post a form from the browser that is where all the form fields data goes for example.
May
19
comment Pushing data into chunks from server to mobile client
200 records doesn't sound like much data (unless those records are very large). Are you sure you can't send them in one go? Or zip them into a file and send this? If I assume a 'normal' record with something like product data (title, long description, prices) that should be only bytes and near to nothing compared for example to sending images.
May
19
comment How do I structure a URL with several querystring items?
Yes, the stuff behind the question mark. That's where all the additional params go. Stuff that's not directly related to address the resource. But of course some details may depend on what framework to use. For example in Ruby on Rails your method would be a big pain and lots of additional work to setup the routes.
May
18
comment How do I structure a URL with several querystring items?
It also addresses 'resources' which can be nested and structuring the variables into the URL like this could become a pain. Not necessarily, since most likely names of resources would be different from parameter/variable names. But still... Personally I would always prefer a 'cleaner' approach where the path part locates the resource and additional params that are key/value pairs go into the query string.
May
18
comment Memcache queries run on a cron job?
Would be called warmup query in other systems. It's quite common. Alternately you could trigger it when the underlying data changes if that doesn't happen too often.