There is a nice article over at Simple-Talk on Ten Common SQL Programming Mistakes. This tip, “Functions on indexed columns in predicates”, crops up a lot in production code, as the consequence of non-searchargs is not always obvious (until you know, of course!).
Uncategorized
Free PowerShell ebook
It’s old news by now, but this PowerShell ebook is free to download as a pdf: Mastering-PowerShell.pdf (thanks to Piers Williams for pointing this out).
Books, Books, Booko!
If like me, you buy a lot of technical books each year, the opportunity to save a few dollars here and there really adds up. In the past, I have used Amazon(US) pretty much exclusively as it was always possible to save considerably on most (if at all) books in an order compared to the local retailers in Perth. And as a bonus, Amazon usually delivered them faster (from the US)!
Recently, a colleague let me know about Booko:
Booko is a site with a very simple goal – to find the cheapest place to buy books & DVDs
I’ve purchased 5 books in the last 4 weeks via Booko from 4 different sellers in 3 different countries. It’s a great way to save money on books. It is now my first stop, whereas before, I simply used Amazon.
Next time you need to buy a technical book, give Booko a go.
PDB Files: What Every Developer Must Know
I’m a long time fan of John Robbins’ work, and over the years I’ve followed his blog, MSDN column and purchased several of his excellent debugging books.
He posted a must read blog entry that I meant to mention a while back: PDB Files: What Every Developer Must Know.
Here’s a snippet:
The most important thing all developers need to know: PDB files are as important as source code! …
At a minimum, every development shop must set up a Symbol Server … Briefly, a Symbol Server stores the PDBs and binaries for all your public builds. That way no matter what build someone reports a crash or problem, you have the exact matching PDB file for that public build the debugger can access. Both Visual Studio and WinDBG know how to access Symbol Servers and if the binary is from a public build, the debugger will get the matching PDB file automatically.
Windows 7 Just keeps Getting Better
As most people are aware, Windows 7 went RTM and is now available to TechNet Subscribers (and many of those that took part in the Beta program). First impressions are that it feels even faster than the RC release! It installed flawlessly. Easy as.
This is simply, the best OS Microsoft have ever released.
I re-ran the Windows experience index:
Interestingly, my disk score has fallen 0.1 points, which is shame as it’s the slowest component. Rather surprising, given that it’s an SSD (and one with a reasonably high performance). I feel a bit of tweaking coming on…
So never mind your poser laptop with the nerdy cover light! Can it compete with a real PC? 😉
SQL Server 2008: ETL Data Load: 1 TB in 30 Minutes!
I came across this excellent article on MSDN: We Loaded 1TB in 30 Minutes with SSIS, and So Can You, detailing the design and implementation of a large data load using SSIS. The work was actually done back in February 2008.
Summary: In February 2008, Microsoft announced a record-breaking data load using Microsoft® SQL Server® Integration Services (SSIS): 1 TB of data in less than 30 minutes. That data load, using SQL Server Integration Services, was 30% faster than the previous best time using a commercial ETL tool. This paper outlines what it took: the software, hardware, and configuration used. We will describe what we did to achieve that result, and offer suggestions for how to relate these techniques to typical scenarios. Even for customers who don’t have needs quite like this benchmark, such efforts can teach a lot about getting optimal performance.
SQL Server 2008: Script Data as Inserts
I expect many people know this already but just in case you don’t: in addition to scripting your database schema as TSQL, you can also generate data insert scripts directly from SQL Server 2008 Management Studio. Right-click on your database in SSMS, select Tasks –> Generate Scripts, ensure your database is highlighted and click next. Scroll down the options list to the “Table/View Options” section, and change “Script Data” to True.
(I’m not sure if this was also present in SQL Server 2005, as I don’t have an instance to hand).
.NET: Determine Whether You Are Running in a 32-bit or 64-bit Process
Saw this excellent tip on StackOverflow today: You can use IntPtr.Size to determine whether you are running in a 32-bit or 64-bit process, as it will be 4 or 8 bytes respectively.
ASP.NET 2.0 Security Practices
Just so I have this excellent article link to hand: ASP.NET 2.0 Security Practices at a Glance
Book Review: The Computer as Crucible: An Introduction to Experimental Mathematics
Keith Devlin and Jonathan Borwein. AK Peters, 2008, ISBN-13: 978-1568813431
Whenever a book’s preface states its aims, a natural question to ask is whether it succeeds in meeting them. Keith Devlin and Jonathan Borwein, two mathematicians with expertise in different mathematical fields but with a common interest in experimental mathematics, begin this book by saying:
“Our aim in writing this book was to provide a short, readable account of experimental mathematics. It is not intended as a textbook to accompany a course…In particular, we do not aim for comprehensive coverage of the field; rather, we pick and choose topics and examples to give the reader a good sense of the current state of play in the rapidly growing field of experimental mathematics”
The sleuth-like style and lucid writing certainly make this book an enjoyable read. Many explanations are framed by relevant historical context and tales of mathematicians whose use of experimental mathematics helped them gain insights into difficult problems. Although it was never intended to be a course textbook, it could be used as a supplementary text. Many of the chapters are short, and should be viewed as aperitifs.
Chapter 1 deals with the important question “What is Experimental Mathematics?”. In the authors’ own words,
“Experimental mathematics is the use of a computer to run computations – sometimes no more than trial-and-error tests – to look for patterns, to identify particular numbers and sequences, to gather evidence in support of specific mathematical assertions that may themselves arise by computational means, including search”.
Broadly speaking, it is the use of computers in mathematics as tools in their own right, not simply as numerical calculation aids, “…experimentation is regarded as a significant part of mathematics in its own right…”.
What kind of experimentation? Here are some of the things described in this book:
- Symbolic computation using a computer algebra system such as Maple or Mathematica
- Data Visualisation
- Integer-relation algorithms like PSLQ
- High precision integer and floating point arithmetic
- High precision evaluation of integrals and summation of infinite series
- Identification of functions based on their graph characteristics
It would be very easy to fall into the belief that great mathematicians pluck profound and deep results out of thin air, but some of the mathematical greats (Gauss, Euler, Fermet, Riemann…) were confirmed experimenters who would spend many hours carrying out calculations in order to discover new mathematical avenues worth pursuing. The 72 year old Gauss recounted in a letter to the astronomer, Johann Encke, that as a young boy of 15, armed with a table of logarithms he ‘frequently spent an idle quarter of an hour to count another chiliad here and there’ [3], which led to his estimate of the density of prime numbers; “..Gauss was very clearly an ‘experimental mathematician’ of the first order.”
Chapter 2 gives a brief introduction to the PSLQ algorithm, an integer relation algorithm developed by Helaman Ferguson. Given any real coefficients a0, a1 ,…, an and a precision ε, an integer relation algorithm uses high-precision arithmetic to find integer coefficients λ0, λ1, λ2, …, λn such that λ0 ≠ 0 and
|λ0a0 + λ1a1 + … + λnan| < ε
or else it tells you such expression exists within a ball of a given radius about the origin.
Chapter 3 (What Is That Number?) introduces Inverse Symbolic Calculators as tools to recognise numbers, and combined with Sloane’s online Encyclopedia of Integer Sequences, describes a technique for determining closed forms of sequences.
I have more than a passing interest in Riemann’s zeta function, the topic of Chapter 4 (The Most Important Function in Mathematics); I found it interesting though perhaps a little short. I particularly liked the quote about British soccer player, Wayne Rooney, contrasting him with David Beckham: “There is more chance of him [Rooney] proving Riemann’s Hypothesis than wearing a sarong”!
I’m certain physicists will find chapter 5 (Evaluate the Following Integral) interesting, especially given the authors’ collaborations in computing closed forms of definite integrals arising in physics.
Chapter 9 (Take It to the Limit) contains 3 worked examples of finding closed forms for infinite sums, and Chapter 10 (Danger! Always Exercise Caution When Using the Computer) contains sobering stories and examples of some of the pitfalls faced by experimental mathematicians. Here is one:
A computer algebra system (CAS) will discover that I1 = I2 = I3 = … = I7 = π/2 but I8 = 0.499999999992646π
On finding this, the authors suspected a bug in the CAS software. But there is no bug!
The book provides tantalising examples and suggestions to whet the reader’s appetite in the form of an ‘Explorations’ section at the end of each chapter, not exactly exercises but there is a corresponding ‘Answers and Reflections’ chapter at the end of the book. Interested readers will find many of these topics expanded upon in [1].
I thoroughly enjoyed reading this short introduction to experimental mathematics. It will no doubt appeal to a broad mathematical audience, both professional and amateur alike. If I have one complaint, well more of a request, it would be a much longer chapter on evaluating definite integrals! But then, in the words of G. H. Hardy, “I could never resist a definite integral” [2].
References
[1] David Bailey et al. (2007). Experimental Mathematics in Action. AK Peters, MA.
[2] Macdonald, H. S. (1999). The Beauty of Geometry: Twelve Essays. Dover Publications.
[3] Havil, J. (2003). Gamma: Exploring Euler’s Constant. Princeton UP.
[This review appeared in the July 2009 issue of the Australian Mathematical Society’s Gazette.]