Friday, October 17, 2008

Does Miller's experiment prove evolution?

After reading this link about Miller's experiment, I decided to respond to it:
Miller's Experiment

In Miller's experiment the earth's atmosphere was assumed to be without oxygen. The problem is with no oxygen, there is no shield from harmful UV rays. This would have killed the "soup". Has anyone come up with a solution to this problem?

In the experiment both L and D stereotype amino acids were formed. Life only uses L stereotype amino acids. Does anyone know why that is?

What process combined the amino acids into DNA strands in the proper sequence? Does anyone know?

What process created the cell micro-machines that perform the translation of sections of DNA into messenger RNA? Does anyone know?

What process created the cellular protein regulation process? Does anyone know?

Some microbiologists spend their entire lives trying to understand the complex processes and information of cells. In the past, scientists believed that the cell was as simple as gelatin. The current understanding of the inner workings of a single cell is that it is equivalent to the complexity of the factories of General Motors and all of its part manufacturers. We still don't understand the main control process of the cell (when the cell is told to start making a protein and to stop making a protein). This is equivalent to the the inventory department at GM deciding to create more Chevy Cobalt Cars because those are in demand and stopping Chevy Suburban SUV production. What is staggering is the amount of information contained in the RNA to make a single protein. Similarly the design plans for a single General Motors car and the processes to create one are overwhelmingly complex.

To think that all the factories and processes of General Motors could be created accidentally is utter nonsense. In the Miller experiment essentially what they have created in General Motors terms is raw steel. Steel by itself doesn't create the design blueprint for the car (equivalent to an RNA section for a specific protein). Steel by itself doesn't create processes to build assembly line robots that build cars (equivalent to cell micro machines). Steel by itself doesn't create the transformers that convert the AC into DC to power the robots (cell glucose conversion into energy). Steel by itself can't create the process to create a new assembly plant (cellular mitosis; cell division).

Just as it is obvious that someone designed and built that car you are driving; it is obvious that someone designed and built proteins. Just as it is obvious that someone designed and created the processes of General Motors, it is obvious that someone designed and created the processes of cells. Each cell in your body has a specific purpose and works together with other cells. Doctor's still don't understand how everything works in the human body because it is so complex. There are around 300 cell categories. At this level, imagine a company 300 times the size and complexity of General Motors all working together. There is an estimated 10 million species on earth. At this level imagine a company 3 trillion times the size and complexity of General Motors.

Consider the biological process complexity. The processes and interactions between the processes are incomprehensible. Consider your job. Whether you flip burgers or are Joe the Plumber; processes don't happen by accident. At any level, you had some kind of training or education to do your job. Processes are designed.

But couldn't over millions of years the amino acids combine to create the DNA chains? Couldn't the processes be created by accident by the environment? Let's take that same argument to our GM example. Over millions of years, couldn't the raw steel create blueprints to create assembly line robots? Couldn't the raw steel create the assembly line robots? Couldn't the raw steel create the hardware programs and processes for the robots to create the cars? As silly as that sounds, the equivalent comparison is what evolutionists are claiming about amino acids. By itself, raw steel does nothing. By itself, amino acids do nothing.

Someone had to make the banana so you could eat it. Someone had to create the processes in your body to digest it. Someone had to make the bacteria in your intestine to break it down.

That someone is God.

Tuesday, October 7, 2008

Search & Replace SQL Characters

Here is how to replace m-dash characters with a dash character:


UPDATE Customer
SET CompanyName= REPLACE(CompanyName,CHAR(150),CHAR(45))
WHERE CompanyName Like '%' + CHAR(150) + '%'

Friday, August 8, 2008

SQL Server Object Dependencies

Paul Montgomery was kind enough to pass this one on. This is great for seeing what function or stored procedure is used by.


SELECT DISTINCT
o.name AS UsedBy
FROM Sys.sysdepends j
JOIN sys.objects o on o.object_id = j.id
JOIN sys.objects d on d.object_id = j.depid
WHERE d.name = 'MyFunctionOrStoredProcedureName'

Friday, August 1, 2008

Stored Proc that Runs Slow The 2nd Time

Recently we had a weird situation where we had a stored procedure that was being called twice with the same parameters. The first time, it executed in 3 seconds. The second time it actually timed out the ADO.NET connection because it took longer than 30 seconds. We were very puzzled by this and it took a long time to solve so I wanted to pass this information on.

Here is what was happening. SQL Server stores an execution plan for each combination of SET commands. We had the command SET ARITHABORT ON inside the stored procedure. The default for ARITHABORT is off for SQL Server. Basically when the connection logged in, the ARITHABORT was turned off. When the stored procedure ran, it was switched on. This switching forced SQL Server to use a different execution plan which was super slow.

The fix was to set the ARITHABORT on for the application user. You can set the ARITHABORT for the user or the database but not in a connection string. You can also set it right before the sproc is called.

Example:
SET ARITHABORT ON exec dbo.[MyGiantSproc]

See these other links for more information:
Set Database Options
Query Execution Plan Problems

Thursday, July 31, 2008

Programmatically Viewing/Adding References in Access

When your Access application is distributed to end users, they may have different versions of COM components. You can programmatically add references to resolve broken references due to differing versions. Here is how to get a list of all the current references in MS Access using VBA:


Public Sub PrintOutCurrentReferences()
Dim iIndex As Integer

For iIndex = 1 To application.References.Count
Debug.Print application.References(iIndex).name _
& ", " & application.References(iIndex).GUID _
& ", " & application.References(iIndex).Major _
& ", " & application.References(iIndex).Minor
Next
End Sub



Example of adding a reference going from the latest version to the oldest version of the ADO Extension Library:

'Add Microsoft ADO Ext for 2007, 2003, 2000
If (AddReference("ADOX", "{00000600-0000-0010-8000-00AA006D2EA4}", 6, 0) = False) Then
If (AddReference("ADOX", "{00000600-0000-0010-8000-00AA006D2EA4}", 2, 8) = False) Then
Call AddReference("ADOX", "{00000600-0000-0010-8000-00AA006D2EA4}", 2, 5)
End If
End If


Below is the code to perform the action:

Private Function AddReference(sReferenceName As String, sReferenceGUID As String, iMajorVersion As Integer, iMinorVersion As Integer) As Boolean
Dim bFound As Boolean
Dim iIndex As Integer

bFound = False
'Try to find an existing reference
For iIndex = 1 To application.References.Count
If application.References(iIndex).name = sReferenceName Then
bFound = True
'Remove the reference if it is broken
If application.References(iIndex).IsBroken Then
application.References.Remove application.References(iIndex)
bFound = False
End If
Exit For
End If
Next


'If the reference was not found, or it was broken, add it
If bFound = False Then
On Error Resume Next
application.References.AddFromGuid sReferenceGUID, iMajorVersion, iMinorVersion
If Err.Number = 0 Then
bFound = True
Else
Err.Clear
End If
End If

AddReference = bFound

End Function

Monday, July 21, 2008

Automated Build Tools

Automated Build Tools

Here are the options that I have found so far to automate .NET builds:

TFS (Team Foundation Server) - This is Microsoft's answer to automated builds. Difficult to set up but it integrates well with Visual Studio and Defect Tracking.

CruiseControl – This tool basically runs a NAnt configuration file. There are a lot of pre-defined tasks that NAnt can perform such as getting the latest version from source control, building, and FTPing a file. The config files for NAnt are not that fun to set up.

MSDOS Batch File – If you don’t want to buy anything or mess with the convoluted NAnt config files, you can certainly build your own batch file and use windows task scheduler to schedule the build. There are many free command line programs available to email the log file, ftp files etc.

Commercial Automated Build Tools
Automated Build Studio
Final Builder
Visual Build Pro
TeamCity

Compact and Repair an Access Database using VBA

Below is some useful code to compact and repair the current Access Database using VBA:


Public Sub CompactAndRepair()
CommandBars("Menu Bar"). _
Controls("Tools"). _
Controls("Database utilities"). _
Controls("Compact and repair database..."). _
accDoDefaultAction
End Sub