6,336 reputation
31929
bio website marjanvenema.com
location Netherlands
age 52
visits member for 3 years, 7 months
seen 3 hours ago

Software developer since 1985. Started in Cobol, moved via Clipper/VB to Delphi. Delphi developer since 1998. Sniffing at C# and playing around with javascript and some php for websites. Coaching new employees and less experienced developers. Focused on software architecture and SOLID design. Keenly interested in user experience and usability.

Questions

When you ask a question, show your effort, provide all the details that will help someone to help you and be precise.

Answers

When you answer a question, don't just paste your code. Your answers will be much better when you explain why your code is doing what it does and how it achieves the asker's goal. It makes it a whole lot easier to follow along. As it is I am much more inclined to up-vote answers that have explanatory text about what the code is doing and why it is written as it is.

Answers that just contain links aren't likely to get an up-vote from me either

Other

Obligatory link whenever someone thinks they are improving security by imposing all sorts of rules on password composition: Password strength


Nov
4
comment What is meant by, “A user shouldn't decide whether it is an Admin or not. The Privileges or Security system should.”
@GlenPeterson: Nope, users can very well exist without security. What about my name, my display name, my address, my e-mail address etc. Where would you put those? Identification (authentication) and authorization are different beasts altogether.
Nov
4
comment What is meant by, “A user shouldn't decide whether it is an Admin or not. The Privileges or Security system should.”
@GlenPeterson: not necessarily, just that classes <> tables and usually there are a lot more classes to be discerned than tables. Being data-oriented does lead to defining sublists on classes though, when many times these lists should be defined on another "ledger" (orders) or some such class passing in the user (or the order) for which to retrieve the... It is more a matter of responsibilities than of verbs and nouns.
Nov
4
comment Should you always pass the bare minimum data needed into a function
@MSalters: No, why should a user class be aware of permissions? I am pretty sure a user instance can exist very well without ever being aware of being allowed to do something or not.
Nov
4
comment What is meant by, “A user shouldn't decide whether it is an Admin or not. The Privileges or Security system should.”
Yup, SRP certainly plays a role here!
Nov
4
comment What is meant by, “A user shouldn't decide whether it is an Admin or not. The Privileges or Security system should.”
@Arian: because user.hasPermissions puts too many responsibilities into the user class. It necessitates the user knowing about permissions, while a user (class) should be able to exists without such knowledge. You don't want a user class knowing about how to print or display (build a form) itself either, you leave that to a printer renderer/builder or display renderer/builder class.
Nov
4
comment What is meant by, “A user shouldn't decide whether it is an Admin or not. The Privileges or Security system should.”
Ouch (it was my comment), but you do put it a lot better than I did.
Nov
4
comment Should you always pass the bare minimum data needed into a function
Well spotted (the difference in perspective). Upvoted the question you linked (very well written up). Refraining from answering as I see you already got several ones that are expressing my views better than I was in my comment.
Nov
4
comment Should you always pass the bare minimum data needed into a function
@GlenPeterson: are you deliberately misunderstanding me? When I said user, I of course meant the user class.
Nov
3
comment Should you always pass the bare minimum data needed into a function
@Anders: no it shouldn't. A user shouldn't decide whether it is an Admin or not. The Privileges or Security system should. Something being tightly coupled to a class doesn't mean it is a good idea to make it part of that class
Nov
3
comment Should you always pass the bare minimum data needed into a function
A user shouldn't decide whether it is an Admin or not. The Privileges or Security system should. Something being tightly coupled to a class doesn't mean it is a good idea to make it part of that class.
Nov
2
comment Where do we put “asking the world” code when we separate computation from side effects?
If that is your worry, your computation simply is not finegrained enough. You need to abstract out the decision making as to what other data/steps are needed. So split the full computation in steps based on where decisions are made as to what data is needed. Then have some kind of "director" that manages the workflow for the full computation: starting each step, getting back information from each step, using that to decide the next step and the data needed, starting a fetching process to get it and then passing the fetched data to the next step in the computation.
Nov
2
comment Where do we put “asking the world” code when we separate computation from side effects?
That's where the concepts of callbacks comes in. If you don't know in advance what data may be needed, provide a callback to the computational code where it can specify what data it needs, and have the other layers do the actual fetching and providing. If it needs to be asynchronous, the callback could even specify another function to call with the fetched data when it has become available.
Nov
2
comment How do I set up pairing email addresses?
I'd simply set up a few inbox processing rules to trash any mail addressed to dev+ but without my name in the to, so that only mails to dev+ that also includes james+ in the "to" mail account remain in my inbox. Something that should easily be done by all developers. Most mail servers allow for these kinds of rules server side as well so you can set up the distribution centrally on the server.
Nov
1
comment Naming a release
@Mike Yet Intel was indeed denied the trademark on 586 (en.wikipedia.org/wiki/Trademark). Curiously though, as the Pentium processors were introduced earlier, that happened before the 737 trademark was awarded. My initial guess was that people had wisened up and made it impossible to award trademarks on number sequences. But it seems to be the other way around? Interesting.
Oct
30
awarded  Nice Answer
Oct
29
comment Initiating processing in a RESTful manner
What is the result of the processing? Sounds like that may be another resource? In that case POST to the new resource (collection) with the resource and identifier of the stuff to be processed in the body of the post request. Use POST to /resources if the server determines the identification of the new resource, use PUT to /resources/myidentifier if the caller determines the identification of the new resource.
Oct
27
comment How should a non-IT manager secure the long-term maintenance and development of essential legacy software?
@user105977: I understand. Yes a rewrite is risky, but not always avoidable and sometimes the best way forward despite the risk. To me keeping the old system(s), relying on a skillset that even now is not exactly readily available, is a business risk that may be greater than the risk of a rewrite and one that increases with time as the pool of available developers keeps decreasing. But I am not in your position and cannot judge their relative risk.
Oct
26
comment Database model for keeping track of likes/shares/comments on blog posts over time
I think you are trying to accommodate too much up front. While I am a proponent of think before you leap (especially about stuff you can foresee), you need to limit yourself to keep from over analysing. Turn YAGNI to your advantage. I'd start with either your first or second design and restructure it as needed as you progress. You may have to do conversions of already collected data, but conversions are unavoidable during the lifetime of software anyway. Just ensure that you collect all data you may want later on, but don't worry too much yet about where to put it.
Oct
25
comment I need to create an employee schedule/appointments program, but I don't know how to set it up
@robz228: so program an Outlook plugin and start by learning the Outlook Object Model which is pretty well documented on MSDN.
Oct
25
comment I need to create an employee schedule/appointments program, but I don't know how to set it up
@RobertHarvey Aww, com'on. Can't be that bad... :) No, intuitive they aren't, but they are pretty well documented and the Outlook Model is one of the best documented and is designed in a pretty consistent manner.