Monday, April 1, 2013
Async and Parallel Programming in .NET 4
I spent some time recently on some of the latest features of .Net. One area I overlooked a while back was Async and parallel programming. I've done mostly web development and it hasn't always been beneficial to me. Lately I've expanded my talents, and this has come into play.
Essentially the Task Parallel Library (TPL) helps add parallelism to your application without having to worry too much about your thread pool or exceptions. You have to worry about these things, but the TPL has really helped out in the simplification of these areas. This is important because as technology advances, our applications need to be more snappy. For example, on the Windows Store applications, you may have multiple threads happening, but you cannot lose responsiveness to your application. Microsoft will reject your application if it does not respond.
Tasks are the fundamental building block. I think of tasks as function that will consume a large number of CPU cycles or require information from a third party. If we had a single threaded application, we'll be forced to wait for these functions to complete. However, we can create a task that will start up another thread and we can go on our doing other things.
As always with multi threading, there is additional complexity versus having a single threaded application. The TPL helps handle these issues. Each task will have a status, a result, and an exception that can be checked for processing. How variables are passed into tasks will impact your results. The order of execution can also be impacted because of multiple threads running at the same time. The TPL helps you handle it all.
I'm going to spend some time focusing on a few different areas of the TPL and show how they may be able to help you out in development.
Friday, February 22, 2013
Securing Information In Your Database - Introduction
As a security precaution, it is important to not save any
sort of sensitive information in clear text in your database. This can be
information such as an email address, a social security number, answers to
secret questions – or anything that would be considered sensitive data for the
user.
For most people, it is surprising how a little bit of
information can lead to malicious attacks. They use the same account names,
emails, passwords, and secret questions for all of their accounts, so if you get
one, you probably have them all.
I’ve seen an unfortunate amount of sensitive information
stored in clear text from applications I have worked on. When I ask why it is
done this way, no one has an answer. The response is always “it is just always
the way it has been.” I don’t find this to be an acceptable answer as when you
do your initial design, you know it needs to be done.
My next few posts will talk about encryption, hashing, and
security in general.
Subscribe to:
Posts (Atom)