Reputation
518
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
1 4 18
Newest
 Teacher
Impact
~23k people reached

Jun
21
comment Why should I use lookup tables at all?
I have tried to read your answer five times and still didn't catch your point. No, I'm not mixing all these things. I'm simply asking, why should I store my lookup / dictionary data in database, instead of keeping it in a file. I'm suggesting, that keeping this kind of static data in file is much faster then reading it from database and would like to know, if I'm not mistaken? That's all.
Jun
21
comment At which point using string-based enums can become a real problem?
I, of course, made a pure mistake and false base assumption, due to my lack on knowledge. Therefore, I'm totally and completely grateful to all of you for all the fixes, that made this question "valid". Free edits is one of the most fabulous feature of SE. Thank you!
Jun
11
comment How to acquire data and render page in context of REST/API application?
I HAVE a REST API. My mobile apps are using it. Now, I'm building a website (name it frontend, if you wish). I'm asking, if frontend (written in the same language, PHP, and run on the same server as API) should access data directly (models / PDO / MySQL) or if it also should be a client, that is accessing data only through API calls?
May
29
comment How to store data that is recorded with different frequency?
Well... quite an interesting point of view on the matter, that I never thought about. I don't know, if I'm going to push this the way you suggest, but the idea of storing only stats info (min, max, avg etc.) instead of real values for 1/10th values really need further examination. I'm accepting your answer as very interesting one. However, I might unaccept it, if something better ever arrives.
May
28
comment How to store data that is recorded with different frequency?
@MarekGrzenkowicz That's an interesting idea to evaluate. I must admit, that I haven't thought about such solution. Thanks!
May
22
comment How to store data that is recorded with different frequency?
@Euphoric I'm completely fine with post-processing of data retrieved from database before it is actually rendered as a graph. This is even necessary in this case, as data will be provided by API means and rendered into graph by an end-point client, after whatever post-processing it needs.
May
22
comment How should an API or server respond when a device connects with a different account than it is bound to?
I do use pre-existing hardware identification to identify devices, so second scenario occurs. However, please note, that we're talking about non-computer devices. Dropbox is just an example. I'm talking about scenario, where 95% of devices is always used by one and the same user and are not shared among others. And described situation could (per assumption) only occurs as an result of error or intentional, but non-standard actions (hacking, checking what will happen, if, etc.).
May
22
comment How should an API or server respond when a device connects with a different account than it is bound to?
Well, I tried to make it as simple and clear as possible. Try to take the Dropbox example and do not go far beyond it. Let's say that entire system design enforces what is given in first three points -- each device must be strictly bind to any user account, and always one account per moment. And any rebind is treated as non-normal situation. Please, let's not try to turn this question into wide discussion on whether my system design is correct or not. I'm mainly looking for an inspiration, how this system should respond in this precisely described situation. Thanks.
May
22
comment How to store data that is recorded with different frequency?
Nope, I don't think so. Data will be recorded with 1/s or 10/s freq. by a mobile reader, but it will be pushed to server and recorded into database with frequency around 1 write per 5-10 seconds.
Mar
24
comment Recurring database migration
Yes, you're right. And sorry. In Yii, the migration system works like this: each successfully applied migration is added to internal migration table in database, which assures, that each migration wil be applied only once. This, of course does not cover migrations, that fails at any point. Therefore, to implement, what I was suggested, such recurring migration would have to tamper with timestamp in that internal migration table, to make itself "always on top". Hope, that clears some doubts.
Mar
24
comment Recurring database migration
I'm using database migrations in Yii and Yii2 PHP frameworks. However, that shouldn't matter (?) as I'm asking for a general rule of a thumb here (that's why posting on Programmers, not on SO).
Dec
19
comment Why do we have to use break in switch?
Thanks for a great answer with a lot of examples.
Dec
19
comment Why do we have to use break in switch?
Thanks for the Duff's Device example (+1). I was not aware of that.
Sep
25
comment Is the KISS principle more important than utilizing OOP to solve a problem?
+1 for a good answer and a great fun, though an obsessive-compulsive code reviewer with a gun, that knows where you live is worth at least +5! :>
Sep
25
comment Is the KISS principle more important than utilizing OOP to solve a problem?
While I agree with you in general (+1), in this particular example (logic already known, to plans for future re-use), class seems to be a little bit overkill IMHO.
Sep
25
comment Is the KISS principle more important than utilizing OOP to solve a problem?
@gnat As I said, this is question to feed my curriosity. No one is actually pushing me to anything. :]
Sep
25
comment Are value converters more trouble than they're worth?
This is the longest question, I've ever seen in the entire SE! :]
Jun
28
comment Translating views in MVC
I don't know, if I can expect better, more professional and straight-to-the-point answer. Thank you.
Jun
22
comment MVC Best practices (view acquiring data directly from model) and Yii Framework
I have just realized, that I based my question on completely wrong assumption and therefore I made myself an complete idiot! :]
Jun
22
comment MVC Best practices (view acquiring data directly from model) and Yii Framework
Thank you for your effort in trying to answer my question, however I have just realized, that I based my question on completely wrong assumption and therefore I made myself an complete idiot! :] Voting to close/delete my own question.