Monday, October 12, 2009
The History of Visual Studio
Ah. Nostalgia. I loved this video, and I look forward to the rest of the series! I have been working with Microsoft development tools since GWBASIC made its appearance in DOS 4. If you'd like to see how software development and the Windows platform have evolved over the past 30 years, go watch it! It's a fun way to spend a half-hour walking down memory lane.
Tuesday, October 6, 2009
Shroud of Turin Debunked?
Wednesday, September 16, 2009
Twenty Minutes?!
I've noticed this with a lot of applications lately. Things take forever to install when they're really not doing much. My server application installs about a half-gigabyte of data and over 300 registry entries for various components. It takes about 40 seconds from start to finish to install. I'm using an MSI installer, just like SQL Server does internally...
I don't get it.
Saturday, September 12, 2009
Why I Love To Cook
I think it's good for a guy to know how to cook. Not only does it impress women, it comes in handy when you want a steak dinner but don't want to shell out $35 bucks for something you can cook at home for $8.
Sunday, September 6, 2009
Is Capitalism Evil?
Michael Moore recently released a new documentary titled Capitalism: A Love Story. His thesis is basically that capitalism is evil and needs to be replaced with something that better supports the people. It’s easy to sympathize with the evidence that he presents, especially given the current economic woes America is facing. But is Capitalism really to blame?
The economic theory proposed by Adam Smith in The Wealth of Nations basically proposed the idea that human greed could be used as an “invisible hand” to guide people to ultimately do what is best for society. He proposed a trickle-down theory of wage earning; the more money a company earns, the more capital it has available for paying workers to perform the labor required. Contrary to popular opinion, Smith did not propose the exploitation of the proletariat. In fact, he wrote that any person who performs the same sort of repetitive tasks over the course of his life will inevitably become “as stupid and ignorant as it is possible for the human creature to become.” He advocated the development of industrial technology to replace these repetitive tasks and envisioned competition among skilled laborers resulting in wages that are competitively priced across the marketplace. The goal was to turn a traditionally terrible human trait (greed) into something ultimately beneficial to society.
My opinion is that capitalism is not the source of our troubles. There are several issues we need to deal with before we can fully recover from the economic crisis we currently face. One of the main issues is outsourcing. We have, for various environmental and political reasons, outsourced much of our manufacturing and service capacity to foreign territories. Adam Smith warned about this – the short-term benefits are far outweighed by the long-term damage that will inevitably come to any nation that sacrifices its self-reliance. We also need to bring some balance back to the wages offered to the bourgeoisie. When the CEO of a company makes two-thousand times the salary of the highest paid employee something is obviously wrong. The position of CEO is important, but to be honest it is much easier to find a business major capable of leading a corporation than it is to find a nuclear physicist. Anyone who disagrees with that statement needs to read this. I am so sick of hearing about corporations that post multi-billion dollar losses and yet continue to offer their CEO and board of directors hundreds of millions in bonuses and perks. I think even Adam Smith would have these people executed as traitors.
Michael Moore is a great film maker, and I whole-heartedly support his freedom to create whatever films he wants. I appreciate debate in the political and social arena, and I wish we could all actually debate the issues without becoming so emotionally involved that we begin attacking each other. Democracy and capitalism can work together to produce a country beneficial to all of us if we have the courage to work together and stamp out the problem areas as they arise. I don’t believe Socialism is the answer, but it is a necessary step if the market is unable to moderate itself from the inside out.
Finally, to make this blog entry suitable for posting on my “technical” blog, here is some programming advice: If you program, learn C# and then learn LINQ. If not, try out Phrogram.
My next entry will be on LINQ. It’s time to get back to the world of development for a while. :)
Saturday, September 5, 2009
Zen and the Art of Motorcycle Maintenance
This is a post from my other blog (the one that I no longer have; see below). I wanted to preserve this one since I feel this book has changed my perception of life in a significant way…
If you've never read Zen and the Art of Motorcycle Maintenance, grab a copy and read it. It's one of the most profound modern books on philosophy I've read yet it's written in such an accessible manner that you can think about the content without getting lost in the words. The book is also a great story about the adventures of a father and his son as they cross the country on a motorcycle. This morning was a very Zen morning for my daughter and I -- we were over an hour early for an appointment downtown, so I decided to take her on a short adventure around town just to see where the streets would take us.
First, we found a quaint little neighborhood with a small electronics shop on the corner. The whole area looked like something straight out of the 1940's. I commented on how peaceful it all looked, and in the midst of taking it in my daughter shouted out something about doughnuts. There was a little doughnut shop on the corner and we could occasionally catch the scent of sweet delight when the wind shifted in our direction. Not wanting her to go to her appointment on an empty stomach (I am a good father, after all) I felt it was only right to stop in and see what they had.
They had every kind of doughnut imaginable. It took us nearly twenty minutes to choose the two we wanted from the dozens of flavors available. I chose a Bavarian cream-filled maple, she chose a small strawberry-infused cake doughnut with cream frosting. Both were quite good when paired with appropriate beverages (chocolate milk for her, coffee for me). As we sat in the shop and took in the sights of the street and smells from the kitchen, she looked at me with eyes that said, "I love you, daddy." I knew immediately that this was a moment of Quality, one of those moments that pass by in a twinkle of an eye but survive as a happy memory for decades. What a wonderful morning... Phaedrus would have been proud.
A Single Blog
I need to simplify my life. I spend way too much time working on things that are just clutter. As part of this effort, I am reducing my online presence to this blog, my Facebook page, and ericr.org. Keeping up with Twitter, Facebook, MySpace, Blogger, Wordpress, and my own web sites is just too much.
Besides, given that I am turning old it only makes sense that I would begin to have less interest in purely technical areas of study and have more interest in history, philosophy, and the human condition.
This does not mean I won’t be blogging on technical matters; I am still a geek, just a geek who wants to spend more time programming and less time managing. :)
Windows Live Writer
I like Blogger, and their in-browser editor is pretty good. But I started blogging with Windows Live Writer last year and fell in love with it. There is an undocumented step you have to take to make it work with Blogger (or, more specifically, the Google XML-RPC service).
First you need to download Live Writer. Here’s the link: Live Writer download page
Next, you need to create an album in Picasa named “Windows Live Writer”. Log in to Picasa using the web interface and click on the “Upload” button. When the window for uploading photos pops up, click on “create a new album”. Name the album “Windows Live Writer” (without the quotes).
Finally, start Live Writer and configure it for your blog. It will ask you for the blog URL (mine is http://oldmaneric.blogspot.com) and your login information. It will detect your blog theme so when you add a new post it will look very similar to how it will actually look when it’s published. There is also a “Preview” tab that allows you to preview what the post will actually look like when it’s published. Uploading photos, resizing them, adjusting the layout, and so on are much easier with Live Writer than the Blogger interface. Give it a try, I think you will like it!
A Geek in Heaven
My love of computers started when I was around nine years old. It started with a Commodore Plus-4 my parents bought for me from some home shopping network ad. It was an interesting system (it had a CP/M mode, which was sort of like an early DOS) but it did not have enough memory to really do much. A few months later, my parents bought me a Commodore 128. While I enjoyed some of the games, I found a passion in creating my own little games. With the help of the book Kids and the Commodore 128 (my favorite Christmas present from 1986) I learned how to program the computer using Commodore BASIC.
Around two years later, home PCs from IBM and Compaq started to appear in stores like Sears and Montgomery Ward. I had done just about all I could do with the Commodore (including programming it directly in machine code using the listings at the end of Byte magazine) and it started to freeze randomly. So I was blessed with my very first PC, a 12MHz 80286 with DOS 3.3. My lifelong journey into the world of PCs had begun.
This weekend Sara is hosting a “Blog Camp” at our house. People from all over who read her blog are staying here for the weekend. We’re enjoying the company of our visitors, and I love the fact that each person came with their own computer. We have eight computers running in the house right now, all connected to our network and several of them contributing to blogs at this very moment. There was even a mini HTML training session last night. Could it get any better? :)
Tuesday, August 11, 2009
SQLite.NET
Optimization requires you to look at a problem from all sorts of different angles so you can be sure you understand exactly what you're dealing with. The goal is to take a program (or a piece of a program) and somehow make it better. Perhaps you want to make it smaller by cutting out all of the useless cruft. Maybe you need it to run faster. Sometimes you need to change it so that it is easier to understand and maintain later on. All of these fall under the general heading "Optimization".
The project I'm working on now has me dealing with many large files (hundreds of files that are each at least 10 megabytes in size). These files contain information that has to be updated at an astounding pace. At its peak, my program must perform close to 20,000 updates per second. Just finding the correct information in each file to update is a challenge. Maintaining this level of speed adds a whole lot more to the challenge. Doing all of this in C# (on top of .NET) adds another level of excitement. Eight months ago, I was not sure it could be done without lots of computers working together as one big virtual computer. Now, I'm watching it run on my home PC with close to 40,000 updates per second. Amazing.
Eash file uses a database engine, SQLite, as its maintainer. I chose SQLite for three main reasons: Transactions, speed, and encryption. Since there are several changes that need to be made to each file as part of one sequence, I wanted to make sure that either everything happened correctly or no changes were made at all. This is called "atomic" behavior, and requires transactions to work correctly. Obviously, I needed it to be very fast and one of SQLite's primary features is its speed. I had to take that claim on trust until I built a prototype system. Finally, I needed each one of these files to be encrypted - nobody else should be able to see what is inside the file unless they know the complicated password.
Everything in this project is written on top of Microsoft's .NET framework. Thus, to use SQLite, I had to use SQLite.NET from Robert Simpson. I was concerned that the .NET version would not be able to keep up with my speed requirements, but it turns out that this was not a problem at all. Each file individually can be accessed, updated, and checked close to 50,000 times per second on my home PC. I find this amazing, especially given that the files are encrypted with RC2 data encryption.
I am left both happy and sad with the results I've seen. I'm happy because SQLite.NET has done everything I've asked of it better than I expected. I'm sad because there's no reason to optimize anything any further than the prototype. For something that took me a few weeks to build, I'm impressed. Consider this post a glowing review of SQLite.NET specifically and the SQLite database generally.