|
Nobody gets it right the first time; design is an iterative process. A good designer is curious and tries to think of alternatives.
In your case, if you're in the habit of increasing or decreasing "everyone's" welfare by a certain % or fixed amount, you might consider adding a "static" % or amount to the Person class that is always used to affect the HungerLevel, but only if it has a value set by a game rule (in order words, it functions as a global weighing factor).
static float ExtraPain {get;set;} = .1f;
..
float _hunger = 10f;
float HungerLevel { get { return _hunger * (1f + ExtraPain);}}
|
|
|
|
|
hpjchobbes wrote: but is that what most programmers do at the designing stage
Yes.
hpjchobbes wrote: so I don't know if this would be something that is covered in a more structured training environment
I doubt it. Vast majority of business problems cannot be taught because by the time you teach it then you have created the solution anyways and there are just too many to do that.
If you are interested I suggest the following site to get a real idea of how big projects actually got big. It is always via iteration over time.
highscalability[^]
hpjchobbes wrote: I would imagine that the second option is more efficient
Based on your original description and your examples I would use neither.
First you must load the actual 'algorithm' via some mechanism. And that can fail. So you certainly can't load all of them and then process each. And some of them might fail as your process it - then what?
So presuming that you want to process as many as possible.
1. Loop
a. Attempt to load current one. If fail log error so it can be identified then proceed to next
b. Process it. If fail log it. If necessary rollback.
c. Continue looping on next one until done.
Variations on the above.
1. If you need to do this once a day and each item is in your control logging an error might be relevant. But if doing it once a minute then you need to tag items that fail with a flag(s) to indicate that you do not process them until flag(s) cleared (manually by someone that fixed the problem.)
2. Might want to provide notifications of failures, perhaps owners of each item.
3. Might want to have an error that indicates if a 'large' percentage failed since it might indicate a problem with the system and not the items.
4. What if the system is done for a period of time? Do you need to catch up? If so how?
|
|
|
|
|
I hope this is the right forum to ask my question, so I'm posting here.
At the moment for all the software deliverables I used msi packaging (using Flexera InstallShield). So that for each new release I've create a new InstallShield and distribute. Looking for a possibility of distribution over the air.
To do that I've do some changes to the software logic in-order to poll a server may be and download the latest binaries. What I've in my mind is similar design of Windows update, where my application will shows when a new version is available.
My question is, what's the best way to archive new binaries to download. I mean on a single server for example, and what if server down in case?
Feedback and comments really appreciates. Thanks in advance.
If you've never failed... You've never lived...
|
|
|
|
|
Honestly, it depends entirely on the criticality of the updates. How severe of a negative impact will users suffer from not being able to update immediately on update release? Will an update server uptime of less than 100% drive consumers away from your product to alternatives?
That said, static space is very cheap, and by setting up a mirror or two that your update service can point at wouldn't hurt, it would just cost a little money.
Versioning for a single application can be pretty easy, just make sure that you have a "current" folder that is consistent across mirrors.
mirror1.myapp.com
|
|-/myAppDataComponent
|-/current
|-/1
|-/1/1 //version 1.1
|-/1/2 //version 1.2
|-...
|-2
...
|-/myAppBusinessComponent
|-/current
...
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
Out of all, I've one application which is a core layer of others. So that's critical.
There can be a situation application in use, and and the underlying layer has an update. That's a critical situation in my case.
My thought of, I need a separate agent to monitor the states of applications and update.
If you've never failed... You've never lived...
|
|
|
|
|
You might want to look at Squirrel[^] - "It's like ClickOnce but Works".
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
We use clickonce behind the firewall and it works reasonably well.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
That's something new for me. Thanks for the comment, will have a look.
If you've never failed... You've never lived...
|
|
|
|
|
IIRC, there is an option within the (paid version of) InstallShield to generate code that will check for an update when you run a program, and notify the user. Have you looked into that?
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
I've licensed version of InstallShield 2011. Hope that feature support in their.
I didn't knew that and never tried. Isn't it GUI maker for the installer?
If you've never failed... You've never lived...
|
|
|
|
|
I've never had to use it myself, but I seem to remember seeing something about it in the documentation of the 2013 release.
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
Seems my version not supporting that.
For the moment I'm working on a software solution to evaluate. Third agent running all the time to manage all the updates, interacting with serves.
If you've never failed... You've never lived...
|
|
|
|
|
I use a separate service to monitor the "health" of the main app (kiosk) and communicate with a server for "checking in", downloading updates (new installs), restarting / communicating (shutdown) with the main app. (Service can email that the server is down; and vise-versa).
Adding this logic to the "main app" itself gets a little mind-mending for someone not familiar with the app.
|
|
|
|
|
That's what I exactly thought of. Develop a separate agent to monitor all the applications as well as the new updates on the server. It'll download/copy new binaries to relevant locations and manage the applications accordingly.
If you've never failed... You've never lived...
|
|
|
|
|
anyone can give me idea like how to design good architecture for web api project ?
i have to design a web api project which will give data in xml or json format to our customer.
i just plan to design it like this way....i have a web api layer and web api layer will interact with repository layer to do the CRUD operation. i will use HMAC auth.
but hence i am new in web api so i do not know my thinking is good or not. so any one experience developer please share the idea like how to design a good architecture for web api project. thanks
tbhattacharjee
|
|
|
|
|
|
I would attempt to "categorize" the intended application first; e.g. CRM; Blog; Forum; etc.
Chances are, there's a "template" out there that can help you; at least through the initial stages.
|
|
|
|
|
After unsuccessful attempt to get video into Arduino Due ( problems debugging interrupts and descriptors) I am going back to the real world.
I did some work using OpenCV few years back ( in Windows) , now I need to master getting the video from USB WEB CAM as "image" for OpenCV to work on in Linux / Ubuntu.
Checked libuvc and v4l2.
Which one to use?
I do not need high definition video nor streaming video.
I like to start with simple edge recognition on single frame.
Thanks for your time.
Vaclav
|
|
|
|
|
Vaclav_Sal wrote: I need to master getting the video from USB WEB CAM as "image" for OpenCV to work on in Linux / Ubuntu. OpenCV is cross-platform, so you just need to learn it; forget about the particular platform or arch. Since you are a beginner, you need to learn it day-by-day. I would suggest, learn it using their tutorials then understand their API and objects.
Vaclav_Sal wrote: I like to start with simple edge recognition on single frame. Most of the modules, examples are provided as samples. Try them out first. You may also access them here, OpenCV: Examples[^]
Finally here at GitHub, you need to build this, opencv/samples at master · opencv/opencv · GitHub[^]
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Thanks for the encouragement, this is becoming rare on this site.
I feel pretty comfortable using OpenCV, but it seems still to have same issues as about four years back - lack of continuity between versions and no references to pre-compiled libraries.
It just gives the impression that there are couple of "in charge " developers and they do not talk to each other. AT least it looks that way to newcomer.
|
|
|
|
|
It is not like that — I was once a beginner, we all were, but we don't hate beginners, only when they try to be lazy and not do their work. Google search is a work that beginners are asked to do, so we don't like searching for them. Nothing else.
Yes, and in such cases I recommend using a book as a guide. The book outlines most of the areas of the framework. You can get one book easily for nearest book shop, or online.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Well there is a difference between lazy and being told with each question one asks to "this is basic , start with..."
The Internet created new kind of bullies called different names - such as "administrators" who spend their time monitoring each post and than whining about "wasting their time".
My favorite is - "this has been asked before - don't bother us ".
I have learn to ignore those "know it all" as the only sensible way to handle such characters.
But the sad part is - wast majority of these unpleasant folks are true experts in some subjects.
Enough whining. Just had to vent. Back to learning.
|
|
|
|
|
I am developing an "additional factor" for a login system. So the user needs their username/password, regular 2 factor text/app generated passcode etc. and then a location based factor that I am working on. The idea behind it is that it isn't a full blown factor (or a replacement for regular 2factor), it is just meant to be provide a small amount of extra security on top of other measures.
Anyway, my problem is that I feel like the extra security my app provides could be broken down to the same level of security that was present before.
For example, here is kind of how I am visualizing it:
Third Party Service:
- You need your password
- Then you need your generated code
- Then you need to be authenticated by my app by being in the right location
My Apps Login:
- You need your password
- Then you need your generated code
The third party service is secured by the extra factor but my own apps login system isn't, so essentially the weakest point is my app where if they can break in they can disable my extra factor for the other app (essentially returning it to the same security level before my factor). Of course the user could have a different password + generated code on my app which would help somewhat.
Any thoughts? Please let me know if you have any questions
modified 8-Oct-16 18:22pm.
|
|
|
|
|
If you can modify the existing system, database table for example, then you can easily add the column for this. Otherwise we have no idea, since you don't share the details about the system.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
I like to modify / patch open source code.
I used to patch binary code by inserting calls to patch, but that was eons ago.
Could I get some advise on how to learn patching in higher level language - C++ preferred.
I hope it can be done without major recompile of the source code, likes using "service packs" or configuration files?
Thanks four your time
Vaclav
|
|
|
|