My brother in law (also a Christian) recently forwarded me a video on YouTube about Laminin. My wife is a Micro Biologist so it always peaks my interest to see something cool that God has created at the molecular level.
Laminin is great not only because it is evidence of God; but that God is an awesome coder. Only God is awesome. Laminin is only one protein in the body. As a coder myself, I am especially impressed with some other code God has written. There is a cell process to translate RNA into protein molecules. RNA is basically a subset of DNA. What is happening in this process is you have a section of RNA code copying another section of RNA code. My current project is a smart client application with a WCF back end. I can't help but think of the similarity between RNA translation and performing translations of proxy objects to client objects. Not long ago scientists used to believe that cells were no more complicated than Jello. It just goes to show you how dumb we are and how incredible God is. Anyone looking at the application that we developed can see comments with our names. Laminin is God's code comment.
Read Colossians 1:16-17 below.
Colossians 1:16-17
For by him all things were created: things in heaven and on earth, visible and invisible, whether thrones or powers or rulers or authorities; all things were created by him and for him. He is before all things, and in him all things hold together.
It is funny how my mind works, but when I see this verse I think of the Stephen Wright joke "What do batteries run on?" Being a software engineer if one of my kids asked that question I would explain that there is a chemical reaction that produces a flow of electrons from the positive terminal to the negative terminal. The problem is, now I am stuck because I can't explain what electrons run on. At the atomic level, electrons circle the nucleus in an electron cloud. What gives electrons the power to circle the nucleus? I believe that God is present even at the atomic level. He is the one that keeps the electrons circling the nucleus and holding everything together. After seeing the Laminin video it is clear that God put molecular processes in place to hold things together as well.
Friday, July 11, 2008
Thursday, July 10, 2008
I'm running for President
I am not to fond of either candidate so I am going out on my own. I would appreciate your vote.
Wednesday, July 9, 2008
Retrieve a Private Member Variable using Reflection
Despite the private scope modifier, you can still get to a private member variable using Reflection.
Our Example Customer Class:
public class Customer
{
private int _myPrivateVar = 6;
}
The code to get the private member variable:
using System.Reflection;
public void test()
{
Customer myCustomer = new Customer();
object value =
typeof(Customer).InvokeMember("_myPrivateVar",
BindingFlags.GetField
| BindingFlags.NonPublic
| BindingFlags.Instance, null, myCustomer, null);
Console.WriteLine(value.ToString());
}
Get the current version of Access using VBA
Sometimes it is useful to know what version of Access your Access application is running under. Below is a function that will return the current running version of Access.
'Return a string according to the current access version
Public Function GetAccessVersion() As String
Dim sVersion As String
sVersion = SysCmd(acSysCmdAccessVer)
Select Case sVersion
Case "8.0"
GetAccessVersion = "97"
Case "9.0"
GetAccessVersion = "2000"
Case "10.0"
GetAccessVersion = "2002"
Case "11.0"
GetAccessVersion = "2003"
Case "12.0"
GetAccessVersion = "2007"
Case Else
GetAccessVersion = "Future Version: " & sVersion
End Select
End Function
Tuesday, July 8, 2008
Regular Expression Groups in .NET
Regular Expressions are a great way of querying and replacing text. A while ago I stumbled upon a feature in the .NET framework for regular expressions: groups. Groups are not supported in browsers but they can be used for back end code in .NET. Breaking expressions into groups makes it easier to parse text. Here is a line of text from a standard FTP directory listing:
string directoryLine= "drwxr-xr-- dds grp 0 Feb 23 2002 data";
Here is the regular expression that we can use to parse the FTP directory line:
string mask = @"^(?<dir>[\-d])(?<permission>([\-rwxt]+))\s+\d+\s+\w+\s+\w+\s+(?<size>\d+)\s+(?<timestamp>\w+\s+\d+\s+\d{1,2}:\d{2})\s+(?<name>.+)"
The group names are prefixed by a question mark and then the group name in <name>.
Some example code to pull out the groups:
Regex regEx = new Regex(mask);
Match match = regEx.Match(directoryLine);
if (match.Success)
{
string fileName= match.Groups["name"].Value;
if (match.Groups["dir"].Value == "d")
{
//Do Something
}
}
string directoryLine= "drwxr-xr-- dds grp 0 Feb 23 2002 data";
Here is the regular expression that we can use to parse the FTP directory line:
string mask = @"^(?<dir>[\-d])(?<permission>([\-rwxt]+))\s+\d+\s+\w+\s+\w+\s+(?<size>\d+)\s+(?<timestamp>\w+\s+\d+\s+\d{1,2}:\d{2})\s+(?<name>.+)"
The group names are prefixed by a question mark and then the group name in <name>.
Some example code to pull out the groups:
Regex regEx = new Regex(mask);
Match match = regEx.Match(directoryLine);
if (match.Success)
{
string fileName= match.Groups["name"].Value;
if (match.Groups["dir"].Value == "d")
{
//Do Something
}
}
Be Thankful For What You Have
As I go from assignment to assignment as a consultant, I am amazed at how different the offerings at each facility.
A couple assignments ago, there was one toilet for 30 guys and no air freshener in the bathroom. That was really bad after lunch. However there was free pop. That was really great.
On my last assignment there were no beverages at all. However it was bathroom heaven. There were six individually designed bathrooms.
On my current assignment, there are no office supplies. I have had pens stolen that I have brought from home too. Also, there is no working printer. However there is tea and three different kinds of coffee.
Arnulfo made me blog today. :)
A couple assignments ago, there was one toilet for 30 guys and no air freshener in the bathroom. That was really bad after lunch. However there was free pop. That was really great.
On my last assignment there were no beverages at all. However it was bathroom heaven. There were six individually designed bathrooms.
On my current assignment, there are no office supplies. I have had pens stolen that I have brought from home too. Also, there is no working printer. However there is tea and three different kinds of coffee.
Arnulfo made me blog today. :)
Sunday, April 27, 2008
When will the stimulus package arrive from the IRS?
I just found the link for when the economic stimulus checks will arrive from the government. The send date is determined by the last two digits of your SSN.
http://www.irs.gov/irs/article/0,,id=180250,00.html
http://www.irs.gov/irs/article/0,,id=180250,00.html
Subscribe to:
Posts (Atom)
