10,290 reputation
43650
bio website programmers.stackexchange.com/…
location Bad Rappenau, Germany
age 44
visits member for 4 years, 4 months
seen 32 mins ago

writes code

ruby (on rails), c++, python, pascal, vb, ti-basic, sql, js, jquery, html, xml, qt

find me on Google+


9h
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'.
1d
comment Coding application which need huge data!
A few thousand rows are not considered a huge amount of data. Also without knowing what processing you do on it it's difficult to say what's the better way. For your average application you will just read and process the data as needed. For really heavy processing there are various ways to do this, preprocessing being one of them, aggregation another (like calculating sums for recent months of time series data). Would also depend on how often this data changes, if multiple users work concurrently and many more factors.
May
31
comment High level programming language to combine images into one
Python or Ruby, possibly with a graphics library like GraphicsMagick
May
30
comment Server Image Handling
Depends. Basically it seems that GraphicsMagick became the better option. But for certain tasks like converting PSD files ImageMagick seems better. For what you want to do I would go with GraphicsMagick. Though if you do something more complex than what you mentioned you could compare yourself. Both have a command line utility so you can do tests rather easy without having to write code (though once you have the basic code to work with them it's easy enough to modify and run against a few hundred files)
May
30
comment Server Image Handling
Questions for tools and resources are off topic. ImageMagick and GraphicsMagick are commonly used for such tasks. Those can be used as command line tools and also provide API interfaces for some languages. So integration into a project should be simple enough. (Also they are widely used, so there is a lot of documentation)
May
27
comment Understanding multi-threadiing PHP (pthreads)
After skimming through it this seems not to be a good introduction text, more about PHP specific parts for people already knowing the basics of multi threading. It should be easy enough to find a more introductory tutorial with some good examples how threads are created and how to use mutexes to protect data from concurrent access.
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
22
comment Should I remove logging statements on production?
Primarly opionion based also possible duplicate: stackoverflow.com/questions/8002116/… or stackoverflow.com/questions/1114187/… or stackoverflow.com/questions/7042611/…
May
21
awarded  Enlightened
May
21
awarded  Nice Answer
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.
May
18
comment How do I structure a URL with several querystring items?
Doesn't look too great to me. Could become very confusing soon. Have a look at RESTful routing.