| Gregory's profileStop Making SensePhotosBlogNetwork | Help |
|
July 01 The Need to RefactorThere are times when you look at code and you know it has to be retooled. Yesterday was one of those times. I want you to look at a bit of code. The following routine was written by a group of programmers from offshore. One theory amongst my peers is this code was purposefully written this way to get more billable hours. Another theory is the developers just don’t know any better. I am not here to worry about the reasons the code is the way it is, but rather to take you through an exercise in maintaining difficult code. First, here is the original code: private void WriteDiscoverFile() writer.WriteLine(this.GetFileHeaderRec().ToUpper()); try while (enumerator.MoveNext()) IEnumerator enumerator2 = null; try while (enumerator2.MoveNext()) finally writer.WriteLine(current.GetBatchTrailerRec().ToUpper()); writer.WriteLine(this.Group.GetGroupTrailerRec().ToUpper()); When you first see this code, you probably wonder what is going on? How can I maintain this? But a closer look at the code gives some hints to what is happening. Let’s break it down, in English. Here are the steps:
Let’s go step by step. First, the signature leaves us where we cannot easily unit test the code. There is too much magic being pulled from the object at hand, so we change this to get rid of the magic. The result is the following signature: private void WriteDiscoverFile(string fullFileName, bool append, Encoding encoding, Group group) { } Although I am only passing the information from within the class, this allows me to mock the Group object so I can test the code in a predictable manner rather than running the production file and then examining for mistakes. The next few lines are nearly equivalent, although I have removed the My object, as it was a bit of overkill. In addition, the original code was magically pulling the value from the My object. This was not a huge problem, as the code was all contained in the UI project, but I am now separating out tiers, so pulling from My, which is essentially a .config wrapper in this case, broke encapsulation. That is bad, largely unmaintainable (or at least difficult to maintain) and fairly messy to work with. I won’t go further on this aside. Here are the next few lines: SortedList<string, Batch> batches = group.Batches; I did pull the SortedList for batches, which was magically pulled from the object earlier. There was nothing wrong with the initial implementation, except it required spinning up the object and exposing a Set method on batches (which should be read only, as they are pulled from the database and calculated). By inverting the code a bit and allowing the method that calls WriteDiscoverFile() to send in the group, I can isolate the WriteDiscoverFile() method and test it. The writer lines, as mentioned are pretty much the same as before. The enumerators are just a way to loop. Another fine loop (and cleaner in this case) is the for loop. Here is the bulk of the routine: foreach (Batch batch in batches.Values) foreach (Transaction transaction in transactions.Values) writer.WriteLine(batch.GetBatchTrailerRecord()); This is much cleaner and the intent is very clear, making this much easier to maintain. I then finish off writing out the trailers and get rid of the Writer, as follows: writer.WriteLine(group.GetGroupTrailerRecord()); Here is the entire routine: private void WriteDiscoverFile(string fullFileName, bool append, Encoding encoding, Group group) { SortedList<string, Batch> batches = group.Batches; StreamWriter writer = new StreamWriter(fullFileName, append, encoding); writer.WriteLine(GetFileHeaderRecord()); writer.WriteLine(group.GetGroupHeaderRecord()); foreach (Batch batch in batches.Values) { string batchHeader = batch.GetBatchHeaderRecord(); SortedList<string, Transaction> transactions = batch.Transactions; writer.WriteLine(batch.GetBatchHeaderRecord()); foreach (Transaction transaction in transactions.Values) { writer.WriteLine(transaction.ToString()); } writer.WriteLine(batch.GetBatchTrailerRecord()); } writer.WriteLine(group.GetGroupTrailerRecord()); writer.WriteLine(GetFileTrailerRecord()); writer.Close(); } Which would you rather maintain? SummaryWhat have we done here? Here is a list
In the end, we have 14 lines of code (getting rid of the braces) versus 30 (many of which would never be hit or were always true). There is one question that might come to mind. Why did I remove the error handling bits? The main reason is I did not see them as necessary, as the process has run in the same location for ages. But, if I were to feel it was needed, rather than have a bunch of nested tries, I would simply surround the instantiation of the StreamWriter, as that is the only point I can see failure occurring. It would look like this: try Note that we can also use a using statement if we do not wish to log, and allow the failure to create file error to bubble up to the UI. It really depends on whether or not we have a true user interface or not. My vote is not, as this should be an automated process, but that is a topic for another day. Peace and Grace, Twitter: @gbworld June 26 IT Adding Value to BusinessI have been working on a nightmare (yes, it is reporting – isn’t that always a nightmare? ;-0). One of the biggest issues, however, is the processes in place do not accurately reflect the business process. This got me thinking about how IT can add value to business by creating proper processes. That is the purpose of this blog entry. To make it more real world, I am going to show the concepts in the form of case studies. Case StudiesCase Study #1: Programming GPS UnitsA GPS tracking company had a need to program units. Initially, this was done by using a terminal program and a script. One of the engineers (equipment engineer, not software engineer) created a program to more quickly push the script to multiple units. The IT department inherited this program and was asked to make it more flexible. The task at hand was to program the unit and track which script the unit was programmed with. In the process of programming, IT noticed two things:
Lesson 1: Storing Data and MetadataWhen the system was envisioned, the unit scripts were “tokenized” and the metadata for each unit was stored in a database. While this was not seen as important at the time, it became an invaluable in troubleshooting units that were sent out. In some cases, the unit was programmed weeks before being shipped out and had an older script. In the interim between programming and shipping, a bug fix was introduced. Prior to instituting this system, units would have to be pulled from vehicles and shipped back to the company, creating an expense for the company. With the script being tracked, along with the metadata, engineering could send out an over the air command to update the “firmware” to the latest specs. Another benefit to storing this metadata was being able to proactively set up a fix on units shipped out in bulk that had bugs. Since the unit numbers could be easily identified, the system could be set up with a “when this unit first reports in, send out a fix” type of command. What IT was doing, in this case, was refactoring out duplication. The main difference between the normal refactoring out duplications, is the duplications here were not in the code. It is a fairly common practice, in good IT shops, to refactor out duplicates in code. For example, if you find two routines that contain data access code, you create a new routine that both of the original routines call. One quick example is when you edit data on a web form. The original bits will end up looking this this: protected void Page_Load(object sender, EventArgs e) protected void EditButton_Click(object sender, EventArgs e) The fix is moving out the binding bits, more like this: protected void Page_Load(object sender, EventArgs e) protected void EditButton_Click(object sender, EventArgs e) protected void BindPage() The scripts were a bit different in the fact they were just AT commands send to a unit, but the original might look like this: AT$Friend = 10.0.0.2 Refactored it would look like this: AT$Friend = {IP_Address} The process is the same as refactoring code, but the metadata is then stored as a set in a database and the unit number is tagged with that set. Summary of lesson: Refactoring is as important for business processes and data as it is for code. NOTE: I will have to cover IT that does not refactor code on another day. ;-) Lesson 2: Store Information Returned From Other SystemsWhen a unit was programmed, it returned certain data, such as the manufacturer’s revision number, manufacturer’s firmware set, etc. Prior to IT working on the programmer, none of this data was stored. And, it was not considered important, for some reason. After the programmer application was coded to store the data, the manufacturer discovered a problem with their own firmware that had to be fixed. Units on the shelf could then be identified as needing the fix and upgraded selectively, rather than attempt to upgrade firmware on all units. It also allowed the company to selectively recall units based on firmware revision, rather than recall all units of that type purchased within a certain time period (the only other way of determining faulty units). Summary of lesson: One thing I have learned in my 15 years of IT is business often does not realize what it is getting from other systems. Data is often flagged as not important without fully ascertaining the business value of the data. I am not suggesting you go around business and store data they have demanded you not store, but rather that you do the following:
Case Study #2: Financial ReportingA credit card processing company needed some financial data to help market their portfolio. The data came from end of month processes. In the process of reporting, the numbers were found to be off in many cases. Looking further, it was discovered that there was no firm way to track what had been reported, making it nearly impossible to get a completely accurate set of numbers. Lesson #1: Flag Data Used in ReportingTransactional data and reporting data are two different things. An individual transaction is stored to make sure every process related to the transaction can be repeated. But, when one reports from transactional data, there is a potential of not being able to repeat a report. In financial reporting, one potential issue is inherent in the process. NOTE: I probably have the names of the bits wrong here, but I am looking at this as a non-financial expert.
This is a bit of an oversimplification of the process. Now, at the end of the month, all of the processing companies send out bills. The terminal processor has to bill the merchant (which is done via ACH from the merchant account, but that is not really important). What is important is that the monthly bill be sent out to the merchant. What is normally done is records between X and Y dates are processed to make up the bills for the merchants. The problem with this approach is a merchant can forget to settle a batch at night. If the batch was created on 6/30 and he comes in on the morning of 7/1, the monthly process may have already been run for billing prior to the records entering the system. If you rerun the report, it will include these records, however. The solution to this problem is to add some type of flag to the system to indicate it has been run on a particular month’s month end process. This makes a for a repeatable process, as you report off records flag, not the date range. This means on the first reporting cycle, you have a pre-process that flags the records to be included. If business asks for a re-run to completely recalculate the numbers, you reflag the records to include any the merchant has processed late. But if they just want the numbers rerun for other reports, you respect the original flag. You now have a repeatable process. Summary of Lesson: It is up to IT to include flags in processes that have consolidated reports. This ensures the same transactions can be used to repeat the reporting process, as well as report other numbers back to business. Once again, if business states this is not important, make sure you document the statements, as this one will come back to bite you some day. Create reset scriptsI have a particular case in mind for this, but I am not sure setting this one up as a case study makes sense. Here is the background: I am currently setting up some financial reports based on month end data (consolidated data, not the original transactions). There are some numbers that are run from other data points. In particular, I have to determine the expenses related to transactions. To make things easier, I have pulled the data from a variety of Access databases (don’t ask) into a single SQL Server table. I then added some columns to store the calculated data. Example: As numerous scripts are run to get the totals, I have set up the following script so I can start back at square one when the calculations are revised. The X, Y and Z are obfuscations of the actual column names, as is EndOfMonthTable (no need giving away any secret sauce ;-0): /* ALTER TABLE EndOfMonthTable update EndOfMonthTable In this case, I have multiple ways of resetting. I can completely delete the columns, rebuild them. Or I can simply zero out the columns. The point here is I have multiple ways to go back in time, depending on my needs. The actual names are obfuscated here, but the process is what is important, not how my employer does business. This is very similar to the rule “you must use source control” and in the case of the actual code I have it stored in SourceSafe (not my choice, I might add, but it is better than no source control). SummaryHere is a quick summary of the lessons learned from the case studies:
Hope this helps! Peace and Grace, Twitter: @gbworld June 12 Back to Basics: The ABCs of Development A = AlgorithmI have been grousing lately about how ill prepared today’s developers are. In particular, I have been ranting about how developers today do not know the basics of development. Rather than simply bitch, I decided to put my foot into the water and start teaching people. This particular article stems from a book idea I have that I will likely be writing soon (really this time). The ABCs I am going to cover over the next few days are: A = Algorithms (this article) From an logical architecture standpoint, C is the most important. From a physical architecture standpoint, B is the most important. But from a developer competency standpoint, it could be argued A is the most important, so here we go. AlgorithmMerriam Websters defines algorithm as:
: a procedure for solving a mathematical problem (as of finding the greatest common divisor) in a finite number of steps that frequently involves repetition of an operation ; broadly : a step-by-step procedure for solving a problem or accomplishing some end especially by a computer We will use the last part of that definition and see an algorithm as a step-by-step procedure for solving a problem or accomplishing some end. As computers only see 0s and 1s, the rest of the definition technically fits, but it leads to confusion as we deal on a higher level of abstraction in our daily work. A Sample AlgorithmSo, let’s suppose our “problem” is multiplying two numbers together, which we will call factorA and factorB. The signature for this method will end up something like the following:
The guts of this method is the algorithm. I assume we all know that this can be resolved rather easily by returning factorA * factorB, but knowing multiplication is simply continuing to add the first factor until we do it factorB number of times. In other words 5*5 is simply 5+5+5+5+5 or five added five times. Following this logic, we might do something like this:
What is wrong with this algorithm? For the consumer of the class? Nothing. They do not see the internals. We could place this code out into production and it would deliver the correct answer. The code is well encapsulated, which means it is completely contained and “hidden” from the consumer. ASIDE: Encapsulation is one of the fundamental concepts of Object Oriented Programming per Wikipedia, which defines it as “Encapsulation conceals the functional details of a class from objects that send messages to it.” There are two problems, from our standpoint.
We will now drift a bit from algorithms to refactoring. Refactoring the AlgorithmRefactoring is altering the code base to improve it. In our code, the do loop is not the best performer. But it has an even larger problem. The intent of the code is not clear. A do loop is generally used to indicate the need to continue to perform a task (or tasks) until a certain condition is met. For example, we might have a do loop that checks to see if a file transfer is completed and when it is, it does work (yes, I know there are better ways of doing this in event driven programming, but roll with me until I think of a better reason for the do loop). If we want to make the intent clearer, we use a for loop, as in the following code snippet:
We now can see that the intent here is 5*5 = 5+5+5+5, as a for loop is terminated after a set number of loops (in this case, 5, as factor B is 5). This solves the clarity problem, but the first time I coded this, I found it actually ran slower. We will get back to this in a moment. Here is a simple test for looping.
We have solved the clarity problem, but we can still improve the algorithm even more. In fact, the end algorithm is likely the one most of us would have started with in the first place, as shown below:
Before moving into the next section, I need to write an aside. It should be noted that refactoring without tests is not a good idea. With small bits like this, we are probably safe. But most of the algorithms we write are a bit more complex and deal with less concrete problems. In addition, we often have routines calling other routines, creating very complex interactions. I have actually written a simple test surrounding this routine, which looks like this:
The test here uses a bastardized form of BDD (Behavior Driven Development), so don’t get caught up in the naming. I can cover TDD versus BDD (and my own bastardized attempt using a unit test framework for BDD, but that will be later). The takeaway with this test is I can verify that each of the algorithms works correctly. Just keep this in mind: refactoring without tests is a dangerous endeavor. And, since so few have tests surrounding their code, perhaps that is why so few people actually spend time refactoring? I am sure there are other dynamics, like management’s thinking that refactoring is paying twice for code, etc. , but that will have to wait for another day and another blog entry. Choosing an AlgorithmWhen I look at Microsoft forums, I generally see people asking questions like this: Which works faster, a FileStream or BinaryStream? ASIDE: The answer, is “it depends”. In general, if you can use binary, it will be faster. But if you are converting to text, you may find binary streaming plus conversion is slower than just using a file stream. The entire conversation surrounds performance. But there are other considerations when choosing an algorithm. In our multiplication example, we refactored primarily for clarity, with the added benefit of greater performance. But, there are instances where you actually lose some performance for clarity. Many years ago, I was tasked with determining the best path to go with a company’s web development efforts. The idea was to focus on the web first and then possibly apply the standardize all types of development to the same standard. I looked at a variety of factors, including the following:
There were other factors, as well, but you get the idea. In the end, I determined Visual Basic, using COM, was our best bet, with ASP as the UI technology. This sparked a debate with another programmer, who favored C++. His primary argument was C++ runs faster than VB. I could not argue against the performance characteristics, as C++ is noticeably faster than VB COM. I did, however, argue that VB, in our testing, was well below the bar in terms of maximum time to complete tasks. His insistence that performance was king led the company to spend around $50,000 to have a consulting firm reach the same conclusion. From a personal standpoint, I think you should try to learn what performs the best. Finding ways to get better performance makes you a better developer. You should also learn many different algorithms for the same problem and when to use each one. This brings us to the second point on algorithms: From a practical standpoint, however, maintenance costs business far more money than performance. Why? If the code base is not maintainable, you have to hire all rock stars, which come with a big price tag. As rock stars are not fond of maintenance, you also have a bit of a revolving door problem, which cost the company even more. If the code is easy to maintain, you can hire rock stars for the hard parts and hire mid-level developers for the other work. There are exceptions to this rule, of course. If you are working for Google, high performing algorithms will win as long as they are scalable. But most of us do not work for Google, or a company that does anything near their level of scale. If you can create a highly maintainable system with high performance algorithms (very possible when using framework classes to perform work), then you have a win-win. But, when you must make a decision, maintainability should win the day more often than performance. This is not a hard, fast rule, of course, but I have found it is true in most places where I have worked or consulted. SummaryIn this blog entry, I covered algorithms, the A in our development ABCs. In the process, I touched on a couple of other topics:
In the future, I will hit Boundaries and Contracts. I am not sure whether I will choose B or C first, as Contracts are extremely important in my world. Here are some future ideas for the Back to Basics blog entries:
if you search my blog, you will see I have already covered string concatenation versus a StringBuilder (better performing and more maintainable). Peace and Grace, Twitter: @gbworld June 05 The Case Against Homeschooling – A ResponseThis is a response to a blog entry entitle The Case Against Homeschooling. For the record, so you can try to determine where my bias might lie, my wife and I decided two years ago to homeschool our children. We have a list of reasons, but our primary reasons were as follows:
The article listed 10 items the author felt made a case against homeschooling. I have copied the blog entry, in toto, with my comments added. The original is in red and my comments are in green. Homeschooling: great for self-aggrandizing, society-phobic mother…… but not quite so good for the kid. I tend to discount any argument that begins with an ad hominem, as any argument based on a logical fallacy is a fallacious argument. In forums, the ad hominem is generally a sign that the person presenting the argument has lost and is resorting to name-calling. Considering your stated education level, you might want to consider the use of logical fallacy in any follow up post. Here are my top ten reasons why homeschooling parents are doing the wrong thing: 10. “You were totally home schooled” is an insult college kids use when mocking the geeky kid in the dorm (whether or not the offender was home schooled or not). And… say what you will… but it doesn’t feel nice to be considered an outsider, a natural outcropping of being homeschooled. This item makes a hasty generalization. There is an underlying assumption that homeschooled children, as a rule, are not socialized, making “geekhood” a “natural outcropping” of their schooling. As the author has shown disdain for homeschooling (item #5), I would question how many homeschooled children the author has queried to make this assumption. I would argue we are dealing with a biased sample, which is another logical fallacy. In my experience, this is not the case. While homeschooled students do not get day-to-day socialization with public school children, homeschooled children do participate in a wide variety of activities. As an example, my own children have the following activities throughout the year:
Other homeschooled parents have children that participate in organized sports, either through city leagues or through umbrella school programs. But, destroying the underlying assumption that homeschooled children are not socialized (which you use in other items in your list) is not sufficient to completely destroy the point. There is also the underlying assumption that parents should shield their children from anything that might get them mocked. While I risk making a slippery slope argument here, it is impossible to shield your children from all mockery. And, I would state, that an attempt to do so would reduce the richness that makes life worth living. Imagine if we stopped our children from taking music, as they might be mocked as band geeks. Or if we stopped them from engaging in computers, as they might be called computer geeks. Or, going to the more base nature of man, imagine if we stopped our minority children from attending any activity in which some child might call out a racial slur. If increasing my child’s likelihood of excelling at life means they might be called names by crass people, then it is a risk worth taking. Schooling, even college, lasts for such a short time that it should not be a major factor in any decision about schooling, homeschooling or otherwise. it would be better to mitigate the risk by adding activities than to put a child in public school merely so they can avoid being called a “geek”. 9. Call me old-fashioned, but a students’ classroom shouldn’t also be where they eat Fruit Loops and meat loaf (not at the same time I hope). It also shouldn’t be where the family gathers to watch American Idol or to play Wii. Students–from little ones to teens–deserve a learning-focused place to study. In modern society, we call them schools. If the case is being made that a student should not learn in a building where lunch is served or there are activities other than learning, then all schools, including traditional schools, are being argued against, as lunch, phys ed, computer labs and playgrounds exist in every school in the nation. If the case is that students should not eat or play in the same room they learn in, the author is once again using a biased sample. Most, if not all, of the credible homeschool sources suggest homeschooling in a separate space from the living or dining room. And while not every parent I know has the luxury of setting aside a separate room, a great majority of parents I know do have a separate space for homeschooling, even if it is a specific side of a room that is used for other activities. Even when this is not the case, the child has a separate time for learning that does not involve eating or playing Wii, even by siblings who have completed their daily learning activities. 8. Homeschooling is selfish. According to this article in USA Today, students who get homeschooled are increasingly from wealthy and well-educated families. To take these (I’m assuming) high achieving students out of our schools is a disservice to our less fortunate public school kids. Poorer students with less literate parents are more reliant on peer support and motivation, and they greatly benefit from the focus and commitment of their richer and higher achieving classmates. The underlying assumption here is highly educated students have a big impact on those less fortunate. According to studies, this is possible, but only when the school engages in peer learning activities. Conversely, there are many studies that show parental involvement is a much greater factor in success of the student, as it helps in the areas that make the biggest impact (according to the review Family, School, and Community Influences on Children’s Learning):
In my own experience, my children are currently above grade level in every subject. My oldest is reading 3 grade levels above her current grade and is a grade or two above her level in every other subject. Even if I were to take the argument at face value, I wonder if it would be wise to have her live up to less than her full potential for the “good of the many”. As the assumption is only fully valid in learning environments that include student collaboration (which is more common at college level than grade school level), I question whether removing my child is selfish at all. Furthermore, the decision to homeschool requires a huge sacrifice on the part of the parent. While the action might be selfish to others (not established), it is certainly not selfish when viewed in the light of economic and time sacrifices necessary to properly homeschool one’s own children. 7. God hates homeschooling. The study, done by the National Center for Education Statistics, notes that the most common reason parents gave as the most important was a desire to provide religious or moral instruction. To the homeschooling Believers out there, didn’t God say “Go therefore and make disciples of all nations”? Didn’t he command, “Ye shall be witnesses unto me”? From my side, to take your faithful children out of schools is to miss an opportunity to spread the grace, power and beauty of the Lord to the common people. (Personally I’m agnostic, but I’m just saying…) According to the 2003 study (Homeschooling in the United States, 2003. table 4), the most common reason for homeschooling was “concern about environment of other schools”, with 85.4% of respondents stating this reason. Religious reasons was number 2, with 72.3%, followed closely by "dissatisfaction with academic instruction at other schools". The most important reason in this study was “concern about environment of other schools”, at 31.2%, with religious or moral instruction at 29.8%. While religious/moral reasons were a concern, they were not, as you have stated, “the most common reason”. According to the 1999 study (Homeschooling in the United States, 1999, table 4 - p11), the most common reason for homeschooling was “can give a child better education at home), with 48.9% of respondents stating this reason. Religious reasons was not even close at 38.4%. Even including the standard error, religious/moral reasons cannot be stated as “the most common reason”. I am not sure why you stated religious/moral training was the most common reason, as it is not supported by the studies. I would assume a bit of ignorance on your part, as the other option is you willfully ignored the facts to make your point. 6. Homeschooling parent/teachers are arrogant to the point of lunacy. For real! My qualifications to teach English include a double major in English and education, two master’s degrees (education and journalism), a student teaching semester and multiple internship terms, real world experience as a writer, and years in the classroom dealing with different learning styles. So, first of all, homeschooling parent, you think you can teach English as well as me? Well, maybe you can. I’ll give you that. But there’s no way that you can teach English as well as me, and biology as well as a trained professional, and history… and Spanish… and art… and counsel for college as well as a school’s guidance counselor… and… and… The fallacy here is known as argumentum ad verecundiam, or an appeal to authority. While credentials are useful in determining a person’s qualifications to perform an action, they do not mean that the person is particularly good at performing the action. There is also three unproven underlying assumptions:
I will cover each of these assumptions in order. On assumption #1: In general, homeschooling is focused on curriculums that encourage students learning to teach themselves. While there is a lot of hands on learning in the early years, the student becomes more independent over time. The parent, like any other teacher, must prepare for lessons, to be able to properly grade the assignments. But, most homeschoolers use some form of formalized curriculum, especially in subjects where they are not an expert. On assumption #2: I have already covered this a bit in the last paragraph. The curriculums used by most homeschoolers are formalized and created by experts. Many of the curriculums used in homeschooling are also used in traditional schools, although the layout of the lessons is different due to difference in environment and teaching methods (homeschooling is one-on-one, while traditional school contains more lecture time). On assumption #3: While professors in colleges are required to be experts in the field they teach, the legal requirements for grade school are generally focused more on education coursework than expertise in their field. I can name many cases, locally, where the teacher has a strong interest in the subject rather than formalized teaching. As such, your argument runs against you on the grade level, at least in some cases.. 5. As a teacher, homeschooling kind of pisses me off. (That’s good enough for #5.) This sounds more like your problem than an argument, as it is an appeal to emotion, at best. 4. Homeschooling could breed intolerance, and maybe even racism. Unless the student is being homeschooled at the MTV Real World house, there’s probably only one race/sexuality/background in the room. How can a young person learn to appreciate other cultures if he or she doesn’t live among them? There are two assumptions here
On point #2: While it is true public school children do come in contact with more races and sexual orientations, this does not mean they become more tolerant or less racist. Racism is still a huge problem in our traditional schools, as is intolerance. The one potential benefit to traditional schools, in this regard, is the students are more readily subject to public punishment for expressing racism or intolerance. The word “public” is very important in my last statement. My experience, however, has been that my children’s activities in her homeschooling career have the same racial mixture as they did in their public school career. This may not be true for all parts of the country, however. 3. And don’t give me this “they still participate in activities with public school kids” garbage. Socialization in our grand multi-cultural experiment we call America is a process that takes more than an hour a day, a few times a week. Homeschooling, undoubtedly, leaves the child unprepared socially. I will agree with you that this is just a few hours a week for most homeschooled children, but you have provided no evidence that this leaves a child “unprepared socially”. In fact, there are numerous studies showing that homeschooled children, despite only a “few hours” of socialization, "gained the necessary skills, knowledge, and attitudes needed to function in society...at a rate similar to that of conventionally schooled children". In fact, one study of adults who had been homeschooled found their “socialization was often better than that of their [traditionally] schooled peers”. 2. Homeschooling parents are arrogant, Part 2. According to Henry Cate, who runs the Why Homeschool blog, many highly educated, high-income parents are “probably people who are a little bit more comfortable in taking risks” in choosing a college or line of work. “The attributes that facilitate that might also facilitate them being more comfortable with home-schooling.” More comfortable taking risks with their child’s education? Gamble on, I don’t know, the Superbowl, not your child’s future. We all take risks in life. Not all of the risks involve gambling; the majority, in fact, are reasoned, calculated risks. When one examines homeschooling versus public education, the numbers show that homeschooled children do as well, if not better, in nearly every metric used to grade differences. 1. And finally… have you met someone homeschooled? Not to hate, but they do tend to be pretty geeky***. *** Please see the comments for thoughts on the word ‘geeky.’ But, in general, to be geeky connotes a certain inability to integrate and communicate in diverse social situations. Which, I would argue, is a likely result of being educated in an environment without peers. It’s hard to get by in such a diverse world as ours! And the more people you can hang out with the more likely you are to succeed, both in work life and real life. I have found there are homeschool geeks, as well as traditionally schooled geeks. Barring some study that shows a higher level of geekiness in homeschooled children, I will take this point for what it is worth: Nothing. One last note, to those homeschooling parents out there: it’s clear from the number and passion of your responses that TeacherRevised is missing an important voice in the teaching community. If any of you are interesting in writing for us, send me an email: jessescaccia@gmail.com. I would love to have you as part of our conversation. Based on your rant here, I am not sure you really want to hear a homeschool parents voice. If you would really like to hear one, I have given you my email so you can respond. Hopefully your response will be better researched and thought out than this long-winded ad hominem. If you want a conversation, I would entertain it. If you want to make me a butt of a joke, as you seem to have attempted here, I would rather bow out. Overall, homeschooling is working. So well that more and more states are opening public school facilities to homeschoolers to help in the education of these children. So well that more and more colleges are not only allowing homeschooled students to join their ranks, but are seeking them out. So well that more and more parents are turning to homeschooling as an option (estimated 850,000 in the 1999 study, 1.1 million in the 2003 study and 1.5 by 2007 – perhaps double by the time the numbers are calculated for 2009). While I respect the author’s zeal for traditional education, there is no evidence shown that any of the assertions made in the “case” are correct and the liberal use of logical fallacy makes me wonder whether this was truly an attempt to make a point or merely a chance to rant against something the author did not like. Peace and Grace, Twitter: @gbworld June 01 Immunotherapy working against cancerI just read this article and see that boosting the immune system is working against cancer. It appears we are finally making headway with the idea that boosting the immune system will kill cancer. And I think this is a great thing. But I am a bit pissed off about the way it is being handled. I am going to cover quite a few topics, and this one may ramble a bit, but I think it is very important to have these conversations. BackgroundFor those who are not aware, my daughter Miranda (now 5) was diagnosed with Ewing’s Sarcoma, a rare childhood cancer, in September of 2007. We opted for standard treatment. Ewing’s has about 250 victims each year, most boys between the age of 10 and 19. Miranda had an Askin’s tumor, which is a soft tissue form of Ewing’s, which normally appears in the bone. Her form of Ewing’s only hits about 25 people per year. During our treatment, we opted for a few complementary treatments. Examples:
This is not science, however, as a case study of one is anecdotal. I will get back to this in the next section. The Daniel Hauser CaseIf you are not aware, Daniel Hauser is the child who is being forced to take chemo. Daniel was diagnosed with non-Hodgkins lymphoma and completed one round of chemo. Then he and his parents decided they wanted to try alternative methods. Child services stepped in and got a court to force chemo on Daniel, so he and his mother fled, with a desire to go to Mexico for alternative treatments. I am a bit torn on this one, as I would personally opt for conventional treatments, as Hodgkins is very survivable using them. But, I think they should have the option of choosing their medical care. What ticks me off is the media’s statements that Daniel has a 95% chance of survival with chemo and a 5% chance of survival with alternative treatments. I am not arguing the 95% number, as that stat is correct. I am arguing against the 5% number, however, as they have no freaking clue what the true percentage is. I will get back to this after the next section. The family was stuck between the proverbial rock and a hard place. Here is the matrix: Conventional Treatment (chemo)
Alternative Treatment
Now, let’s look at alternative treatments. Science and Alternative TreatmentsFor the most part alternative treatments are not scientifically tested. There are numerous reasons for this, some of which are iterated below:
Let’s examine garlic for a moment. The glio link with cancer was found a few years ago. Doing research, I found research as early as the 1980s on the chemical pathways for garlic fighting cancer. I believe it was missed due to the prejudice against alternative treatments. In science, garlic is largely being tested only for heart disease, and this is primarily due to years of evidence that people eating more garlic have less incidence of heart disease. The glio link was published in 2007, but did not get much traction in the media until this year. It was an in vitro study (testtube) and there is no definitive proof it will work in vivo (in the body). I have found no evidence of studies in mice yet, but there may be some going on. There are no human trials with garlic yet. I would imagine it will be years, if not decades, before there are any. One problem with garlic against glio is the DAS, DADS, and especially DATS may not cross the blood-brain barrier. But, one of the newer treatments for operable glio is to introduce a chemo wafer after the tumor is removed. Why could we not make a garlic wafer and do the same thing? There is an issue with garlic causing bleeding, but I am sure that can be overcome if someone would do the research. My theory is they want to be able to patent artificially DAS, DADS and DATS before they attempt to trial garlic as a treatment for glio. If it is eventually used, and is successful, the lives of so many would have been lost looking for a profit motive. Please note that I am not taking potshots at the scientific community. There are many hurdles to research, including legal battles (both lawsuits and the FDA). I believe, however, that the patient, who has an almost certain death sentence, should be able to decide. As you cannot go to an alternative treatment center for brain surgery, the option is not available elsewhere. 5% chance of survivalBack to Daniel for a bit. Where did they get the 5% number? The best I can figure, if not just pulled out of thin air, they are using stats on people that survive in alternative treatment centers. The problem with this number is most people only try alternatives after the doctors tell them there is nothing more they can do. This is after years of chemo (aka poisoning) and/or radiation (also poisoning). That 5% survive after their bodies have been so abused is a promising number, if you ask me. What would the percentage be if people went alternative from the start? There might be a clue in people like Michael Gearin-Tosh and David Servan-Schreiber. Geran-Tosh was diagnosed with multiple myeloma in 1992, a cancer with a rather short median survival. Gearin-Tosh refused chemo and went to radical alternative treatments. he finally died in 2004, but not from cancer. Servan-Schreiber was diagnosed with a deadly brain cancer. He went conventional, but eventually radically altered his diet and environment and took efforts to control his stress. he is still alive today, despite a low median survival for his form of cancer. Both of these men are anecdotal evidence, however, as two do not make a scientifically significant case for the success of alternative treatment. You can read their stories in the books Living Proof (Gearin-Tosh) and Anticancer (Servan-Schreiber). What is Cancer? How is it Caused?The truth is we do not completely know the answers to these questions. We do know they are human cells that are out of control that have been genetically altered to avoid the normal cell death pattern. We also know that cancer has the ability to “create” its own blood supply, a process known as angiogenesis. The current “consensus” is cancer is caused by inflammatory processes out of control. We know that some cancers are caused by viruses or bacteria. For example, many GI cancers are known to start from viral or bacterial infections. They have also found that there is a virus association in glioblastoma cells – the HCMV (Human cytomegalovirus). They are not sure what the link is in glio, but the idea of parasites causing cancer is well established in the alternative treatment community, even if the scientific community accepts it for only some cancers. Then again, the science guys might be right on this one. There are a couple of things we know (or at least have shown to a high degree of certainty):
Given what we “know”, it only makes sense that a change in diet, which many alternative therapies focus on, is a good step in increasing survival during cancer treatment and perhaps preventing cancer. ImmunotherapyThe article that prompted this blog entry was about using therapies to help the immune system to fight cancer. Within the past month, a clinical trial on certain types of antibodies proved so effective in neuroblastoma that the therapy has been approved for use in neuroblastoma patients outside of the study. There were six children in the study that developed allergenic reactions that were very serious, but the survival increase potential outweigh the potential of life threatening allergies. What if boosting the immune system with proper nutrition works? The problem is we don’t know. And, this is why the media is reporting a 5% survival potential with alternative therapies for Daniel Hauser, despite the fact there is very little science to support that number. SummaryI am not hacked off with the medical community, per se, but a system that so focuses on pharmaceuticals that it spends precious little money on alternative treatments like food. I do not expect the drug companies to become altruistic on this, as the are businesses. I would, however, like to see more government money spent on determining if alternative therapies hold any promise. This is a sticky situation, however, for a number of reasons.
One potential way of getting real numbers is to take patients who are out of chemo and trying therapies like immunotherapy and comparing them to those going alternative. This would at least give us some real numbers. If the immunotherapy has a 1% survival after the doctors have “given up” on chemo/radiation due to body loads, then alternatives show promise, even at 5%, as they are four times more effective. This might solve some of the ethical dilemma. I am not sure how we will solve this. What if alternative therapies, despite some anecdotal evidence, do not work effectively enough to warrant them? Then again, what if they do? If we could use food as a pharmacy, it would change the medical world as we know it. And humans, in general, resist change. I know this has been a long one, and I thank you for sticking in. For my family, we have greatly altered our lifestyle after my daughter was diagnosed. We have had whole house filtering since long before her diagnosis. But we have gone more to fruits and veggies and eliminated most bagged and boxed foods. The few we do buy are largely organic and we strongly avoid foods with added sugars, especially foods from high omega-6 sources. We do not bring “juices” in the house with any form of added sugars and my children do not drink sodas or kool aid type mixes (including lemonade, gatorade, etc.) in the house, except on very rare occasions. We also have standing “orders” for people outside the home not to give them candy, etc. Is it enough? I don’t know. One thing I am certain of is people in areas of the world without processed foods see less incidence of the cancers plaguing the industrialized world. They do see more GI cancers, which are caused by infections. I will write another entry about Immunotherapy at some time, as the science there is fascinating. If you read the book anticancer, you will see some interesting info on how cancer works to make the immune system not see it as an invader, which is part of what they are working on. Peace and Grace. Twitter: @gbworld May 28 Sotomayor not fit to be a Supreme Court Justice?After receiving a few emails expressing outrage over the “liberal” nominee for the Supreme Court, I decided that I needed to read up a bit on the issues that were brought up by various talking heads, emails, etc. Here is my two cents on a couple of issues I have seen raised. The "Latina Women are better than White Men" commentLooking at the actual snippet, the comment is far less inflammatory than is being expressed. I would hope that a wise Latina woman, with the richness of her experiences, would more often than not reach a better conclusion than a white male who hasn't lived that life The above comment was part of a speech given at the University of California, Berkeley for a conference entitled Raising the Bar: Latino and Latina Presence in the Judiciary and the Struggle for Representation. Given the context, I am not overly concerned with the comment, as it was specifically tailored for a particular group and was given in response to the comment “a wise old man and wise old woman will reach the same conclusion in deciding cases”. Do questions need to be asked about her feelings on racial issues? Certainly, as the answers the questions may, in fact, reveal that the above comment is part of her overall feelings on Latina women versus white men and may cloud her judgment on issues. But, it should be only to establish her thoughts on this issue and then taken as part of the entire line of questioning. Extended focus on this particular comment is ridiculous. I would certainly hope this does not become the major focus of the upcoming dog and pony show, as it distracts. The New Haven Fire Department FiascoI agree with the sentiment being expressed over this one, but it is not Sotomayor’s fault. Title VII states that discrimination is illegal when it comes to hiring practices. It, unfortunately, does not iterate what discrimination is, leaving plenty of room open for interpretation. Specifically, it does not iterate what disparate discrimination is, or when there is unintentional discrimination. The sad part is the New Haven fire department heads knee jerked when they found 60% of white test takers passing and only 30% of black and hispanic takers passing the Lieutenant’s and Captain’s exams. The knee jerk was further justified by looking at the passing candidates and whether they would actually get one of the slots. No black individual would have been promoted, due to the number of slots. The first legal precedent is Griggs v. Duke Power Company, where the company stopped overt racist practices, but added a high school diploma and IQ test to the requirements for higher positions. The decision was further spelled out in Albemarle Paper Co. v. Moody, which concluded their tests unfairly excluded blacks from higher paying jobs, and Washington v. Davis, which concluded the Washington DC police force’s verbal tests were failed disproportionately by black applicants. The nail in the coffin was Connecticut v. Teal, which found that adverse impact at any stage in a promotion process constitutes discrimination. The crux of the law is it is illegal to have a process that has disparate impact on hiring and promotion unless one can prove the process is a "reasonable measure of job performance". The main argument I can see against Sotomayor’s decision is whether or not she correctly decided against the plaintiffs as precedence allows for adjusting scores of minority applications and not throwing out the results of an exam altogether. If this is the worst this woman has done, it seems like thin ice to me. SummaryThe best two arguments against Sotomayor, at this point, are rather trivial, unless one can show evidence that they shows a trend in favoritism against the majority. At present, this is not firmly evident. Peace and Grace, Twitter: @gbworld May 22 How to do simple recursion (XCopy in C# (and VB))Yesterday, I saw the following question in the C# NNTP group (microsoft.public.dotnet.languages.csharp): I need to get a listing of all folders and subfolders paths using C# .net
2.0. Simple recursion problem. The writer wrote back and stated he want to copy all files from a CD, using C#, into an equivalent directory structure on the drive. Now, I might choose to solve this by making a P/Invoke call to the API method that does xcopy or wrap XCopy in a Process object, but we can also solve this through simple recursion. Here is the follow up: Ok, so I've got a CD that has folders and files on that media. I'm
creating Now, suppose we create a simple class library with a single class to do this move. I will leave the method as static, as it really does nothing more than read the directory, move files and then check for subdirectories. The entire class is represented below (this is a rough draft, of course): using System.IO; The yellow highlighted part is where we are using recursion. The orange highlighted section helps this work, as it ensures the new directory is created. And the green highlighted section copies the files from the directory. To call this, you can do something as simple as this console application:using GBWorld.RecursiveCopy.Business; namespace GBWorld.RecursiveCopy.UI.Console { class Program { static void Main(string[] args) { string oldDir = "C:\\temp\\test1"; string newDir = "C:\\temp\\test2"; DirectoryCopier.CopyDirectory(oldDir, newDir); System.Console.WriteLine("Done"); System.Console.Read(); } } } Pretty Simple, eh? There is definitely more that can be done here for a production app. I should, for example, check if the original directory exists. I might also break down the new directory and make sure parent directories exists, as a call to create c:\temp\test2 will fail if c:\temp does not exist. And we could add some instrumentation and logging to help when things fail. But, this is just a simple example. BTW, this is a layered app. The UI is completely separate from the "business" code that holds the actual behavior. If you read this blog often, you will find I like to do this, as it makes it easy for me to change out user interfaces without rewriting application code. Here is how the projects look in the entire :application": For those of you who are into VB, there is an easier way to copy directories using the My object. But, here is the recursion exercise in VB, with the same highlights (I copied this from Reflector rather than rewrite it): Public Class DirectoryCopierReflector is not as concise, so feel free to edit as needed to make it cleaner. I was not interested in writing VB code right this second, so Reflector made things easier for me. Peace and Grace, Greg Twitter: @gbworld May 21 Visual Studio Beta 1 For EveryoneEven if you do not have an MSDN subscription, you are in luck. Visual Studio 2010, beta 1, is now available on Microsoft download. Here is a list of public links I was sent just recently. The downloads are all on Microsoft download. You will also want to join Microsoft connect for feedback. VS 2010 Beta · MSDN Library: What’s New in Visual Studio 2010 · IronPython 2.6 CTP for .NET 4.0 Beta1
· Samples · Visual C# 2010 Resources page This is great news for those of you who like to stay on the bleeding edge of technology. Thus far, I have enjoyed playing with the beta. It is still a bit slow, especially in a VPC environment, but far less so than the betas of Visual Studio 2008, so I am happy. I will be posting some tutorials soon, so you can learn how to use the new technology. Peace and Grace, Twitter: @gbworld May 19 More About RecruitersI posted yesterday 7 Things Recruiters do That Irritates me. I then got a call from Scott Gordon (one of my recruiter friends in Nashville) asking if he could use my blog post on his site, the Anti Pimp. I am sure I will see it some time today (he had some questions and we have not yet linked up). In terms of value, it goes like this:
The idea behind professional recruiting is this:
The above is the professional recruiter, who earns his paycheck. But, like any field, someone comes along and tries to find ways to maximize profit, while minimizing work. This is what the lazy idiot did yesterday. Here is how this works:
The problem here is the lazy recruiter ends up calling numerous times and sends out numerous emails to each candidate. He offers no value to the company, as he is not really screening candidates. He is also wasting a lot of everyone’s time. And he gives all recruiters a bad name, as he paints the picture of recruiters being lazy, non-professional asses. The guy who called me numerous times in a row yesterday was a lazy recruiter, if we can call “pond scum” a recruiter. He then emailed me three times for the same position, as he is too lazy to even see if he is SPAMMING the same candidates on the three boards. But, he does not care. What makes it worse is when the lazy recruiter speaks marginal English at best, as this guy did. And, to make things even worse, many of these jerks are rude on the phone. I think they truly believe they are doing me a favor wasting my time on low paying positions. Just in case you have not bought a clue lately: You are NOT helping me out; you are just driving up my cell phone bill. For those of you who are professionals, keep doing what you are doing. For those of you who are human search engines spamming the world, I suggest spending some time and getting to know the business or get out. You are making the guys who treat recruiting as a career look bad and ticking so many of your potential customers off. Peace and Grace, Visual Studio 2010 Beta 1 on MSDNMicrosoft released Visual Studio 2010 Beta 1 on MSDN yesterday. If you have an MSDN account, you can find the following on your subscriber downloads:
If you have a Team Subscription, you will also find team Foundation Server beta 1 (x86 – 2,272.80 MB), Team Suite beta 1 (x86 – 1,258.76 MB), Test Load Agent beta 1 (x86) – 181.59 MB and Test Load Controller beta 1 (x86 – 584.97 MB). Peace and Grace, Twitter: @gbworld May 18 7 Things Recruiters Do that Irritate MeBefore getting into this post, I think I should state that there are recruiters I truly respect and like and recruiters that I do not respect and probably would not like even if I knew them. This post is about the later category, which I feel are the lazy recruiters who add no value to the candidate-employer relationship. I got a call today from a recruiter who I would have loved to strangle, if it was only possible to do so over the phone. So here is my list of the top things that irritate me, which I am sure also irritate others. The first three come from my caller this morning, who I will affectionally call Mr. Lazy so i do not post his name here.
On point #7, the email today had the following questions and answers, most of which can be determined by READING my resume. 1) Full Name: 2) Present location: 3) Contact Details: 4) INS Status: 5) Availability: 6) Total IT Experience: 7) Total US Experience: 8) Ready to Relocate (Yes / NO): 9) Expected Compensation: 10) Comfort levels (on a scale of 1[Least] to 10[High]) § OO Design and Analysis § .Net § C# § SharePoint § Silverlight § Web Services $ Messaging Framework § PL/SQL (Oracle) § UML § Design Patterns 11) Interview Preferred Timings : 12) Do you bear the needed years experienced § OO Design and Analysis 5 § .Net (C#, Sharepopint) 3 § Silverlight 1+ § Web Services & Messaging Framework 2 § PL/SQL (Oracle) 2 § UML 2 § XML 2 BTW, this is not the worst one I have seen. I had one that actually read like a job application (in bad english, of course) and would have me copy almost my entire resume into the email. Do I look desperate? I was asked by a friend, who is a recruiter, why so many developers hate recruiters. I told him it was because recruiters were not earning their keep. This is not true of all of them, but there are some who are absolutely wasting my time, and the time of others, to try to make a quick buck. If you want to place me, and do not have a dream job, then you should at least take a few minutes to figure out if I am even qualified or would be remotely interested. For the recruiter friends I have in the Nashville area (and some outside the area), I am not talking about you here. Yes, there are some developers that view all every recruiter as scum, but you know I am not one of them. I do have a problem, however, with recruiters that are nothing more than human search engines, as they take way too much of my money for no added value. Peace and Grace, Twitter: @gbworld May 11 Announcements from TechEdAs always, Microsoft likes to wait until conferences to make big announcements. This year, at Tech Ed, the news is:
I am more interested in SQL Server at this point in time, although the spec sheet does not show a huge amount that I am likely to get overly excited about right now. Here are the new features;
Greg Twitter: @gbworld May 07 Star Trek ReviewI just got back from watching Star Trek, aka Star Trek 2009, aka Star Trek Reboot. In many ways, I think Reboot is the most proper name of the three. Perhaps that is why so many sites are using that word. The movie starts out in a manner very similar to Lethal Weapon 3. Very few credits and right into the action. In the first few minutes, an interesting plot device allows Abrams to both respect and reinvent the Star Trek universe. I am certain this will be the first film in a set of films and I would be happy to see them continue the story line. I firmly believe this film has finally broken the curse of the odd numbered Star Trek films. The film starts out with the childhoods of both Kirk and Spock. As you have most likely seen the trailers for the film, these moments will contain very few surprises. Kirk, a troubled youth, is the genius repeat offender of small town Iowa. Spock, the child of human a Vulcan parents, is an outcast. A sense of duty and a bar fight send them off to Starfleet Academy and starts the ball rolling. Thus ends act 1. One by one, familiar characters are introduced, from the paranoid Doctor Leonard “Bones” McCoy to the “pull it out at the last second’ engineer Montgomery Scott, we have characters that are familiar and yet new. And each, in his own way, stays true to the character, at least enough old style Trekkies will enjoy the movie, and adds their own take on the characters. Each character has a pivotal moment in the film where their unique skills provide much needed aid. For fans of the old show, there are plenty of one liners in the film. I found myself laughing out loud at some of the lines, much to the chagrin of the twenty-some-odds sitting near me. Perhaps they have not purchased the DVD set? One tragedy of the film is it never allows Nero, the Romulan character played by Eric Bana, to fully explore the character. While it might have made the film a bit longer, I think the film could have been better allowing a bit more depth to his character. It would have also been nice to give a bit more depth to the character of Scotty, played by Simon Pegg, who delivers some of the best one liners of the movie. The film is a nice blend of action and character development. I think it will play well with audiences that are fans of the original series, as well as those who have never experienced it. I give credit to the screenwriters for pulling this off. Grade? I would give the movie a solid B, perhaps even a B+. With a bit more development of the bad guy, and a bit more time spent on the conflict facing Scotty in his first scene, I would have given it an A. When it is finally released on DVD, I will definitely purchase a copy. Here’s to the hope that removing the curse of the odd Star Trek films does not come back with the next even film. Peace and Grace, Windows 7 RC for EverybodyMicrosoft is banking on an RC now. As I mentioned last week, the RC was made available for TechNet and MSDN subscribers. On Tuesday, Windows 7 RC was made available for download for everybody. Click here for the info. The RC will expire on June 1, 2010, so you have time to play before it expires. You can download from now until some time in July of this year, so there is no need to rush. If you are unsure of whether Windows 7 is for you, I have a taste here. Peace and Grace, May 05 The C# using statementI had a talk with a colleague today about the using statement. It had come up in a job interview and he was thinking about the using statement at the top of the file. If I were asked about using, I would probably answer “you mean try … finally with a Dispose”. The following code is nearly identical, when taken from an IL standpoint: Code sample 1: private static void GetData(string connectionString) Code sample 2: private static void GetData(string connectionString) Need proof? When reverse engineering file 1 to C#, you end up with the following: private static void GetData(string connectionString) Looks just like example 2. .method private hidebysig static void GetData(string connectionString) cil managed EXTRA LINES: L_0014: ldloc.0 When do you use using and when do you use a try?
Peace and Grace, May 01 OMG, It’s Swine FluIn the realm of non-news, I am getting a real kick out of the recent brouhaha over the swine flu. So far, there are 331 confirmed cases of Swine Flu in the world, a “pandemic” that started about 3 weeks ago in Mexico. Thus far there are 28 confirmed deaths in Mexico, 1 in the United States (although I have heard of another death from a person coming back sick from Mexico, so it may be 2 in the US – unfortunately, the man was not tested before he was buried). Someone has a Google map of cases: http://snurl.com/h5whe This “pandemic” has a lot of people freaking out, but let’s take a reasonable look at the “pandemic”.
Don’t get me wrong. This version of the swine flu (H1N1) appears to cause respiratory distress and can be serious if contracted. But we are going crazy. On a positive note, the focus on swine flu has the media far less obsessed with their new 100 day old king and the economy. Still it reminds me of the panic over shark attacks a few years ago. I guess we need something to obsess about. Peace and Grace, April 30 Windows 7 RCPC Installed on: Windows Media Center PC n1270m (HP): Pentium 4 3.0 GHz with 2 GB RAM. I downloaded the Windows 7 RC from MSDN today and I am in the process of installing it to my home computer. So far I am much more impressed with the install than I was with the betas. They have obviously added some compatibility for the machinery I have to the mix, as I had to install XP and then upgrade with previous builds. With this build, I put in the disk, toasted the hard drive, and it is installed without issue. It took about 20 minutes, which is a great improvement over both the Vista install and previous builds of Windows 7. Immediately on install, it found my TV tuner card, which is quite impressive. In previous builds, I had to go searching for the driver, which was a royal pain in the rear. Put in a key and I am up and running in less than 1/2 hour. That is nice. The rest of this entry are random thoughts, as I go through the install. Media CenterThe Media Center set up took about 4 minutes to set up. The setup of the local directory took a few more minutes, but I am overall impressed compared to the betas. And it realized I cannot get above channel 99 with this tuner, so I chopped off the channels I can’t get. Much smarter than earlier versions of Media Center, including the beta versions of Windows 7 Ultimate. Then, I hit my first snag. The sound is not working in Windows Media Center. Going out into Windows proper, I had no problems whatsoever with tests, but then I noticed the speakers were not a “default” device. Turning that on, the sound came through fine. This sounds much better than both Vista and the betas. Another positive step. It also reacts much faster when expanding or contracting. I had a lot of video skipping during the beta, but it is running smooth in the RC. The only skip I have seen thus far was when the background changed (one of the new options on with some of the themes. I am not sure whether I like the changing background or not. Yeah, it is cool, but is it really practical to have a bunch of pictures in queue that change every hour. As I generally have the background covered up with other programs, I am not sure it is worth the cycles. Windows ExperienceI, unfortunately, do not have a rating here yet, as the computer BSODed while I tried to have it tested. I am going to try again when I have nothing open and see if there was a conflict between programs i was playing with or it is going to be an ongoing problem. I will post my findings here with an update. General FeelingsWith Internet Explorer and Media Center opened, Windows 7 is consuming about 1 GB of memory, so this is not a windows for low end computers. Then again, it runs on my Pentium 4 just fine, so I guess as long as you have memory, you will be fine. Windows 7 runs a lot faster than Windows Vista. It also has a cleaner look and is much easier to navigate around. It still feels a lot like Vista. I do like the fact you can move the Sidebar items anywhere on the screen, but this is only marginally better than the Vista implementation, as you generally cover the Sidebar gadgets with real programs anyway. Speaking of the sidebar, it is rather funny how it has been used for largely useless widgets. The demos Microsoft showed a few years ago gave some neat ideas of what it might become when it grows up, but with many companies still using XP, it never took off. Perhaps with Windows 7, but I am not holding my breath. Startup and shut down are faster now. With the beta, it felt more like a ME experience, where Microsoft merely moved some of the visual elements earlier in the boot cycle. This meant it looked like you could use your computer faster than you actually could. Of course, ME was considered Windows Bob by many people, so I am glad they did not follow the same path when coding Windows 7. GamesWindows installed games are not usually a strong point, and I see the standard stuff here. Chess titans, FreeCell, Hearts, Internet Backgammon, Internet Checkers, Internet Spades, Majong Titans, Minesweeper, Purble Place (children’s game), Solataire and Spider Solitaire. Not sure why they have not included Tinker (a Vista Ultimate strategy game), as it was the best of the lot. FeaturesI like the fact I can use the Windows keys to open programs I used most often. Drag them on the toolbar and you can Windows key shortcut to them by pressing Windows Key + the number of the item. On the snippet below, that means:
This makes it much nicer. In addition, you can right click on the items on the toolbar and get a shortcut menu. With Internet Explorer, you get the option of opening a new window, opening a new tab or even going back through history. There is also an option called In Private, which allows you to use Internet Explorer without leaving a bunch of traces (I can see both good and bad uses for this option). I can click any item on the toolbar and get previews (note the hover causes a full screen preview, as well) … or right click and get a menu. I also think this magnifier might come in handy for demos. Overall, I believe this is what Vista should have been. Peace and Grace, Windows 7 RC ReleasedIf you have an MSDN or TechNet subscription, you can now download the RC for Windows 7. The sites are experiencing heavy loads right now and I have seen some issues. Best of luck. Peace and Grace, April 29 Getting rid of some nasty malware (xnev.exe and lsass.exe)NOTE: Using CNET links so you feel safe downloading the software I have chosen. Many link back to the manufacturer page anyway, but you will see that CNET, a trusted source, is the starting point. This does not guarantee safety, but it sure increases your chances. NOTE: This post deals with Vundo (aka, Virtumonde) and the xneve.exe/lsass.exe virus (not sure the actual name, nor do I care at this time (will research logs later and see if I have a name). The steps here are not guaranteed to get rid of all viruses and malware. Yesterday, I got a nasty version of Vundo, aka Virtumonde, on my computer at work. I am not sure where it came from, as we are pretty heavily filtered, but I can state that our Trend Micro at work did not catch it. (Please note this should not be taken as a reason not to buy Trend Micro, as virii and other malcontents are being developed all the time and NO product catches everything all the time). Rather than take the chance of not having a computer for a few days, I figured I would take a crack at the malware first and see if I could irradicate it. My first shot was with Spybot – Search and Destroy, which you can find on CNET’s download.com. The main reason for downloading this program was finding a deleted folder with the name, indicating the company had installed it at one time. Spybot – S&D has a neat tool that installs with it called TeaTimer, which allows you to stop the malware from making Registry changes. This is the theory, but the varient of Vundo I had was making changes so fast I could not guarantee I killed all refs prior to reboot. I then shredded any files with what is now yesterday’s date in my system32 directory and at the root of my drive, etc. Not every file, but every file with a strange name. Looking back, killing every file might have worked. For this, I used Search and Destroy’s file shredder. I did do some damage, and when I started shredding the files that were not started (using the file shredder in Spybot – Search and Destroy), the malware went into overdrive and started installing other malcontents. This is when xnev.exe and lsass.exe showed up at the root. Here is how I killed xnev and lsass (or at least how I feel I killed them. The first thing was getting the computer off the network completely. Any network means the malware can call home for reinforcements. I started with Search and Destroy, which missed them on reboot, although it killed other baddies on the machine. My nextshot was with Malwarebyte’s Anti-Malware. It caught the malware and destroyed it, but it did not destroy the browser objects it installs, so the malware came back. I am sure with some seeking for the root files that caused the problems. I then used Spyware Doctor (CNET download.com launch page). I did have to connect to the network to download the latest patches for the product, so I did it at the same time as Malwarebyte’s Anti-Malware (next step), so I only connnected once. If you go this route, you have two options:
I chose the later. This got rid of the browser plug in that was making it hard to kill all this garbage. I then ran Malwarebyte’s Anti-Malware, which removed the xnev.exe and lsass.exe that were running from C:. After reboot, I got into the registry and deleted the key for xnev.exe in HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run. The machine was now running normally again, but I was not satisfied all the baddies were dead. Running Anti-Malware again, I see 2 Objects infected using a full scan. It is a system restore point, so it is turn off system restore and kill off the remaining baddies. I will edit this once I have fully clean scans. Here are the steps I would recommend, from my experience:
You should do this as soon as you find malware on your computer, which is normally noticed by slow downs of the machine and possibly popups. If you start getting popups to strange places (porn sites, sites advertising anti-virus/malware products), you are probably infected. The quicker you find it, the better, as you can see the files the malware installed. Peace and Grace, April 17 Review: Artisteer - CSS templates made easyEvery once is a blue moon, I find an offer to try a product that I am really interested in. The other day, I was examining offers for Microsoft MVPs and I came across Artisteer, a product that creates website templates, for lack of a better short description. I contacted Artisteer and got a license key within the hour. I then got a chance last night to sit down and play with the product. I am going to go through the good and bad of the product. When you first stoke up Artisteer, you are greeted with a menu that gives you choices for what kinds of templates you would like to work with. These choices are not binding, as you have complete flexibility over your final design, but choose wisely, as you can paint yourself into a bit of a corner. The opening screen looks like this: I tried a couple of the templates, and there are a few restrictions on building for things like WordPress, but that is simply because you to fit within the WordPress model. Templates:There is a bit of good and bad with templates. I like the fact that I can keep mashing the Suggest button to roll through the templates, but it would be nice to see some of these starting designs in a chooser, like the other elements. I realize things might be created "on the fly", but I eventually get tired of mashing suggest to change the look and feel. On the other hand, I like a great deal of the design decisions. Below is a template I created: CustomizationWhile I am not completely sold on the starting point mechanism, you have complete control over the templates you design. For example, the following screenshot is the template above after only 3 mouse clicks on different menus, starting with the Suggest Design button. If I liked the original fonts and colors, I could have hit it with 1 click. What can you customize?
There are some other customizations, as well. Saving Your WorkWhen you are done, you can export your project. One of the options is a .NET project. The resulting project contains the following tree structure. Notice that everything is very modular, which is nice. I am not sure I like the placement of the CSS files, personally, but this can be adjusted. I do like the use of a master page. One update I would like to see is an ASP.NET MVC output, but it is not too difficult to output to HTML and create my own MVC site from the template. Rendering in BrowsersI have not tested every browser yet, but the first site I created seems to work fine in IE (v 7), safari, opera and firefox. I have not tested IE 8 yet, which may be interesting. One nice thing is the entire site is rendered using CSS. I like this standards based approach to creating sites. There is a separate style sheet for IE6 (which I did not test), so they have thought about the disparity of IE pre 7 days (when standards meant "Microsoft standards"?). ThoughtsOverall the product is rather intuitive and easy to play with. You will find that is mostly what you are doing is playing. There is an undo button, so you can go back if a change munges up something you like. And, it produces a nice site. I will get time for more full featured investigation as I create an actual site with the product. I only have two "negative" comments, neither of which is extremely negative.
Suggestions for future enhancements:
There is one other thing that nags at me a bit and it is my questioning whether or not the sites, as varied as they are, are a bit too similar to every other site created by this tool. The lack of a liquid layout option (mentioned in my list) may also limit its usefulness for some readers. I will play around for awhile and see if I change my mind on this. Side note: Every software product paints you into some type of box, especially products designed to do boilerplate work for you. One question you have to ask is whether or not the box is too tight for your needs. Should You Buy This?This is the big question for many people when they see a review. Here is my feelings on this. The price is not bad for what the product does. The standard version is only $129, so it is not a budget breaker. if you are only designing a single site, it is probably overkill and not worth the price, but if you design for clients, it is a good starting point and I would say worth the price. It sure beats running out the one of the free CSS sites and searching, as my time is worth something (at least in my opinion You can download a trial if you wish to play with the product before buying. It will stamp all the graphics with trial, so it is literally a trial only version. It will allow you to determine if the product is right for you, however. If you are a student or home user, you can buy a $49 version, but I see enough limitations in the student/home version to plunk down the extra money for the full version. Your mileage may vary. Peace and Grace, Twitter: @gbworld |
|
|