The World According to Nick
My take on Software, Technology, Politics, and anything else I feel like talking about.
Friday, February 27, 2004

They Are Illegal... and They Are Aliens 

Georgia Latinos Object to 'Illegal Aliens' Label


"We do find that term very offensive and liken it to the 'n' word as well," GALEO Executive Director Kerry Gonzalez said, referring to the derogatory term used to describe black people.

Gonzalez is urging Georgia lawmakers to use the term "undocumented workers" when referring to foreigners who enter the United States.


Illegal at Dictionary.com (emphasis added):

il·le·gal
adj.
Prohibited by law.
Prohibited by official rules: an illegal pass in football.
Unacceptable to or not performable by a computer: an illegal operation.

n.
An illegal immigrant.


Immigrant at Dictionary.com

im·mi·grant
n.
A person who leaves one country to settle permanently in another.
A plant or animal that establishes itself in an area where it previously did not exist.

adj.
Of or relating to immigrants or the act of immigrating.


Now... put the two together and an illegal immigrant is a person who leaves one country to settle permanently in another and in doing so breaks the law. Now what exactly is offensive about that? Maybe the fact that its incredibly accurate is what offends them. That must be it.

Why Isn't Anyone Asking Her to Resign? 

If I had done this... I'm sure every minority group in the country would be demanding my immediate resignation. I'm sure her "apology" will be considered just fine in this case however. More hypocracy in action.

Rep. Brown Apologizes for 'White Men' Comment

She said Republican leaders were "racist" in their policies toward the Caribbean nation, which is almost entirely black, and called the president's representatives "a bunch of white men."

"I sincerely did not mean to offend Secretary Noriega or anyone in the room. Rather, my comments, as they relate to 'white men,' were aimed at the policies of the Bush administration as they pertain to Haiti, which I do consider to be racist," Brown said in a statement on Thursday.
...
After the dressing down, which sent a hush over the hour-long meeting, Noriega responded that he would relay her comments to Secretary of State Colin Powell and National Security Adviser Condoleezza Rice, both high-level African-American members of the Bush administration.
...
Noriega also pointed to Rep. Lincoln Diaz-Balart, a Republican member of the delegation who was born in Cuba, and asked whether he appeared to be a white man. Diaz-Balart's brother, Rep. Mario Diaz-Balart, is also a congressional member from the state.

Brown's response, according to witnesses, was: "You all look alike to me."


One more thing... this sort of gets me...

Participants in the meeting said Noriega later told Brown: "As a Mexican-American, I deeply resent being called a racist and branded a white man."


Does that mean that Mexican-Americans can't be racist? Does that mean all white men are racists? And I'm not sure being being called white is the same as being branded. Maybe its just me, but the term branded brings up all sorts of negative connotations that I don't think are appropriate here.

Thursday, February 26, 2004

Guarantee This Won't Change... I'm Sorry... I const Do It 

This will probably be my last software rant for a little while... but this is an important one. I posted a couple days ago on how I really wanted a Deterministic Finalizer in .NET... as part of a list of other desired features in C#. One of the other wishes I had was for a construct similar to passing an argument as a const reference in C++.

void PassByConstRef( const MyClass& foo )
{
   // Do something with foo
}

Why do this? First of all, if my MyClass is large, you don't incur the overhead of creating a new instance of MyClass and copying the contents. However, you also get the safety of passing by value since the foo instance is const (can't be modifed within the scope of the function).

What does C# have? Well... it behaves differently depending on whether the parameter is a value type (int, float, etc.) or a reference type (anything that derives from object). Value types are passed by value by default, so any changes done within the scope of the function are lost. This is good. You can also pass by reference if you wish by placing ref in front of the parameter. This means that any changes made to the parameter are made to the callers version as well. Fine. After all, you specifically declare you wish to have it be reference.

public void PassByVal( int n )
{
   n = 5; // This change is lost to the caller
}
public void PassByRef( ref int n )
{
   n = 5; // This change affects the caller
}


By reference arguments are treated very differently. There is no way to pass by value as above:

public void PassByVal( MyClass foo ) // This is by value right? Wrong!
{
   foo.SomeProperty = 5; // This change affects the caller... doh!
}
public void PassByRef( ref MyClass foo )
{
   foo.SomeProperty = 5; // This change affects the caller
}

So what's the difference between the two. Well, this will illustrate the difference more clearly:

public void PassByVal( MyClass foo )
{
   foo = new MyClass(); // Caller doesn't get the new MyClass object
}
public void PassByRef( ref MyClass foo )
{
   foo = new MyClass(); // Caller does get the new MyClass object
}


But what if we want to prevent the first case, where the function attempts to change a property... and not overwrite the entire object? You can't. You're only recourse is to implement ICloneable, Clone your object, and pass the Clone to the function, then throw away the Clone. Basically you're doing what a C++ copy constructor does. That can be a lot of overhead for a large object. Not to mention the effort of implementing ICloneable where you normally wouldn't need it.

Why should we care? After all, all you have to do is write your function so you don't modify the object right? Wrong. First of all, what happens if you're using a 3rd party library where you don't have the source? Wouldn't it be nice to have some sort of warm fuzzy feeling when you call that function... knowing that the black box of the library isn't going to do something strange to you? And even if you aren't using a 3rd party library... I like the fact that the compiler is watching my back when I write functions. Declaring my intention to not change a variable and then letting the compiler keep me honest simply reduces possible bugs.

So why is this construct missing? I don't know frankly. I suspect it was an effort to "simplify" the language. But in their effort to simplify things, they've made things a lot less safe... when safety was one of their primary selling points.

O'Reilly Launches WindowsDevCenter.com 

Thats O'Reilly... the popular publisher of books on Programming Languages and Operating Systems... not Bill O'Reilly the host of the Fox News show "The No Spin Zone" which my mother is hooked on like a heroin addict.

WindowsDevCenter.com is devoted to the operating system that I thought O'Reilly didn't like to talk about... most of their books have concentrated on Linux, and languages that run on those platforms... but I have seen a wider variety of books on .NET and Windows from them... and so it's only natural that they should have a website devoted to it as well.

If you've ever programmed on Linux platforms, then you've definitely read the books published by O'Reilly like I have. They are always excellent resources, and I'm glad that they're finally coming to the dark side. :D There are a wide variety of articles on Windows programming, as well as tips and tricks to improving your Windows experience.

Wednesday, February 25, 2004

I'm Voting for Bush Because Kerry Says He'll Create Jobs 

Wait... what? Don't you mean you're voting for Kerry because Bush hasn't created jobs? No... you heard (read, whatever) me right. I'm absolutely amazed at how many people think that there is some sort of switch that the president can flip that will magically create jobs. If such a switch existed... what president in their right mind wouldn't flip it. For more on that read A Phony Jobs Debate at WashingtonPost.com.

We are having a ferocious jobs debate, most of it fraudulent. If presidents could easily create jobs, the unemployment rate would rarely exceed 3.5 percent. But all they can usually do is influence the economy through taxes, spending and regulatory decisions -- and hope that job growth follows. In our market system, private employers play the pivotal role. They will add jobs only if: (a) demand justifies new workers; (b) labor costs aren't at unprofitable levels; and (c) they think healthy economic conditions will last. Electing a president based on job creation makes as much sense as selecting a doctor based on palm reading.

Facing a weak economy, a government can do three things: cut interest rates; run a budget deficit; and allow -- or cause -- its currency to depreciate. The first two promote borrowing and spending; the last makes a country's exports cheaper and its imports costlier. All these weapons have been deployed. Bush's policies are mostly standard economics; based on past patterns, these policies should have produced stronger job growth. But private employers have resisted hiring. "Economists are scratching their heads," says Randell Moore, editor of the monthly Blue Chip Economic Indicators, which surveys 50 economic forecasters.


What's even worse then Kerry trying to pretend like he has a magic bullet that he can use to solve our economic woe's... is the fact his campaign, and the media right with him is lying about the unemployment rate.

Here's a Badger State sample:

  • Madison Capital Times: "In Wisconsin alone, 84,000 manufacturing jobs have been lost since Bush became president."
  • San Francisco Chronicle: "... a state that has lost 80,000 manufacturing jobs since President Bush took office."
  • Chicago Tribune: "The state has lost 90,000 manufacturing jobs since 1999."
  • UPI: "Trade policy and jobs are major issues in Wisconsin, which has lost more than 75,000 manufacturing jobs since 2000."
  • Newsday: "Employment is a major focus in this state where more than 70,000 manufacturing jobs were lost in the past three years."
  • Knight Ridder: " Wisconsin has lost 84,000 manufacturing jobs since 2001.”
  • Charlotte Observer: "Wisconsin has lost 85,000 manufacturing jobs over the last four years."


So who's right? Read the article about Where do we get jobless stats for more information. So why make a big deal about this? Isn't this all just political rhetoric that we should be expecting? A lot of people may say yes. I say no.

Either John Kerry is so stupid that he thinks there really is a magic switch he can throw, in which case I don't want him elected because he's liable to f*** things up even worse, or he's lying through his teeth and he knows it, which means he's someone you can't trust. Seeing as how I don't like either version of John Kerry... especially in light of his flip flopping on his views depending on who he's talking to, I'll vote for Bush. For those of you who really know me... this should come as absolutely no surprise. :D

So who can create jobs? How about the businesses that will actually hire people. If anything, Kerry and his liberal policies will only make things worse by adding more stupid regulations on businesses, encouraging more of them to move jobs out of the country.

I Don't Dream of Jeannie... or Why I Hate Wizards 

I briefly mentioned this in an earlier post about Component Based programming... but I really don't like Wizards. Why? Aren't Wizards a great tool to speed up development? Don't you use Visual Studio .NET and love it because it provides RAD capabilities? (RAD being Rapid Application Development... not a slang word from the 80's that nobody uses anymore.) I like VS.NET a lot. I like RAD features. I really hate Wizards. Maybe its the type of programmer I am... I refered to a post ealier about who the typical C# programmer is... where Rick Spencer found the following:

When we talk about "code focused" this meant a couple of things to us. First, the users we watched were very persnickety about their code. For example, they would spend a lot of time formatting their code the way they wanted. They would write a block of code, and then go back and indent it the way they wanted. They would copy code from somewhere, and then format it in their editor before they even read it. There just seems to be a sense that the code itself can be beautiful, and code that was ugly, and here I mean was formatted in the wrong way, was fixed up.


Wizards write ugly code. Its impersonal... its not formatted the way I want it. It uses variable names like "i" and "pI" and such. Have you ever tried to edit Wizard code? You end up renaming everything just so you can make heads or tails of it... which ends up taking you longer then had you started from scratch. Not only that, but Wizards write code for 75% of cases... but my cases always seem to fit in the 25% the Wizards don't cover. They never seem to ask the questions that I needed them to ask.

But Nick you say... what about the times when you never plan on editing the Wizard code? The Wizard code that gets written is perfect. Are you sure? How do you know? Have you looked at the Wizard code? Do you know what the Wizard did for you? Most people who say they've never edited Wizard code don't even know what the Wizard did for them... and thats dangerous in my mind. You should always know what a tool is doing for you. What happens if you need to undo something a Wizard did? Do you even know where to look for the code the Wizard wrote?

I was able to take a week long class a couple years ago taught by Doug Boling... who is the guru of Windows CE programming and author of Programming Windows CE. He talked about when he would interview people who said that they were experts on MFC... he would ask them one question, which he asked us. How does MFC work? (Think about it for a while and I'll tell you the answer I gave Boling at the end of the post). Invariably people he interviewed would talk about starting the New Application Wizard and choosing this or that, and boom you have an application. So for example if you are writing an Air Traffic Control Application... do you look for the New Air Traffic Control Application wizard and go from there. Select the number of runways, click Next. Choose the size of the airspace that you will cover, click Next. Accck!

When I was interviewing for a new job last year... the interviewer asked me what seemed to be an overly simple question. You have a COM interface that you want to add a method to. How do you do it? Of course being the good COM programmer I said... you don't. He raised an eyebrow. Published COM interfaces should NEVER be changed... thats one of biggest rules in COM! You create a new interface that inherits from the old one. Fine... its not published yet, how do you do it? I thought... this is too easy, its got to be a trick question. Well... you write the IDL for the new method, then implement the method in the class that implements the interface... right? What am I missing here? Of course that was correct, and he just wanted to make sure I didn't say... run the Add Method Wizard. Why? Because the damn Wizard hardly ever worked! Of course they ended up giving me some computer test from some website where half the questions talked about running this Wizard or that... and I was screwed.

So if you're going to use a Wizard despite all I've said... fine. I just ask one simple thing. Know what the Wizard does. Look at the code. Understand the code it wrote. Even if the Wizard wrote it, its still yours. If there's a bug because of it, your boss isn't going to care that a Wizard wrote it, not you. And if you can, go one step further. Edit the Wizard code. Add meaningful comments to the code (which Wizards never do... which is yet another reason I hate them). Rename some variables so the next guy reading your code will understand what the Wizard did. So thats enough for today's rant.

Oh yeah... and the answer to Boling's question (which he thought was right on by the way)...

while ( GetMessage( &msg, NULL, 0, 0 ) )
{
   TranslateMessage( &msg );
   DispatchMessage( &msg );
}

Even MFC programmers should read Petzold.

Tuesday, February 24, 2004

When John Kerry's Courage Went M.I.A. 

The Village Voice: Features: When John Kerry's Courage Went M.I.A. by Sydney H. Schanberg. Yeah... that's right. The Village Voice. Not exactly the place where you'd expect to see Anti-Kerry information... but this article shocked me.


The Massachusetts senator, now seeking the presidency, carried out this subterfuge a little over a decade ago— shredding documents, suppressing testimony, and sanitizing the committee's final report—when he was chairman of the Senate Select Committee on P.O.W./ M.I.A. Affairs.

What was the body of evidence that prisoners were held back? A short list would include more than 1,600 firsthand sightings of live U.S. prisoners; nearly 14,000 secondhand reports; numerous intercepted Communist radio messages from within Vietnam and Laos about American prisoners being moved by their captors from one site to another; a series of satellite photos that continued into the 1990s showing clear prisoner rescue signals carved into the ground in Laos and Vietnam, all labeled inconclusive by the Pentagon; multiple reports about unacknowledged prisoners from North Vietnamese informants working for U.S. intelligence agencies, all ignored or declared unreliable; persistent complaints by senior U.S. intelligence officials (some of them made publicly) that live-prisoner evidence was being suppressed; and clear proof that the Pentagon and other keepers of the "secret" destroyed a variety of files over the years to keep the P.O.W./M.I.A. families and the public from finding out and possibly setting off a major public outcry.


So much for Kerry's glorious Vietnam Record. He may have served bravely during the war, but it looks like he was a coward to his fallen comrades years later.

Security Patches Released For Trillian 

If you use Trillian for Instant Messaging, you'll want to download the latest Security Patches. If you don't use Trillian for Instant Messaging... you should consider it.

Trillian is an Instant Messaging client that allows you to interoperate between all major instant messaging networks. That means that if you have friends/family/co-workers on mulitple networks, you only need one program running! Trillian supports AIM, Yahoo, MSN, ICQ, IRC and if you have the Pro version, then you can get plugins to support other networks like Jabber or Lotus SameTime. What more could you ask for?

FBI Shuts Down Web Host 

So how fast are you supposed to be able to go through a couple TERA Bytes of data without the FBI getting upset?

CIT Hosting, also known as FooNet, markets itself as "the leader in the IRC and DDoS protection business for the last 5 years." The company posted a web page informing customers that its data center was shut down, and instructing customers to contact the FBI if they needed access to their files.

"After several hours of attempting to track down, inspect and audit the terabytes of data that we host, the FBI determined that it was more efficient (from their point of view) to remove all of our servers and transport them to the FBI local laboratories for inspection," the statement continued. "The FBI has assured us that as soon as the data has been safely copied and inspected, the equipment will be promptly returned. Unfortunately, the FBI has not been able to tell us when they will be completed with their inspection."

Read On...

Democrats Crushing Dissent? 

Could it be true that Democrats are Crushing Dissent? InstaPundit.com is quoting a Boston.com Article on the Democratic National Convention:

Protesters at this summer's Democratic National Convention in Boston may be confined to a cozy triangle of land off Haymarket Square, blocked off from the FleetCenter and convention delegates by a maze of Central Artery service roads, MBTA train tracks, and a temporary parking lot holding scores of buses and media trucks

Under a preliminary plan floated by convention organizers, the "free-speech zone" would be a small plot bounded by Green Line tracks and North Washington Street, in an area that until recently was given over to the elevated artery. The zone would hold as few as 400 of the several thousand protesters who are expected in Boston in late July.


I didn't realize that in America you had to designate a "Free-Speech Zone". I thought Free Speech was allowed everywhere. Silly me.

Monday, February 23, 2004

And the Bush/Gore Elections were Undemocratic? 

Michael Ledeen on Iran & Elections on National Review Online talks about what really happened in Iran during their recent "elections", if you can call them that.

Of course if you were to read any articles on a Major Media source, you'd be left with the impression that the Iranian elections were quite fair, and that the people spoke. And George W. Bush is the fascist right?

Don't Miss a Sec 

Don't Miss a Sec. is a new "art exhibit" in London. If you spend so much time in the bathroom that you need this sort of thing, then we need to talk.

Finalize This! 

Anyone who has been programming for long enough, will rack up a fair number of languages that they can say they've mastered. When you've done this as I have, then you can't help but have your list of favorites... and then the inevitable comparisons soon follow. You start saying to yourself... God I love this language... but if it only had this or that.

For me I can't help compare C# to C++. I've been programming in C++ since roughly 1996... and have been programming C# since roughly June of last year. Being a full time C# programmer now, I have three main things that I wish I had in C# that existed in C++. Here they are in my order of imporance:
1. Templates. I have to mention this since it doesn't exist in any released form of C#. However, it is coming to C# in the form of Generics with the Whidbey release. Wahoo!
2. const reference parameters. You know... the good old const MyClass& foo construct. I'll probably talk about this in a later post, but I think it is extremely important to any object oriented language, and I'm very upset that this type of construct is missing from C# and probably will continue to be MIA for some time.
3. Deterministic Finalization. Thats what this post is really all about.

.NET doesn't have it. Instead .NET has a garbage collection system that essentially walks the stack whenever memory is low and determines what objects are "unreachable". At that point, those objects are determined to be unreferenced, and are collected, returning their allocated memory back into the pool. This is a very high level view of the process which is quite a bit more complicated. For more details take a look at Inside the Managed Heap on CodeGuru.

What are the implications of this implementation? There are several. First of all, programmers don't have to worry themselves about manually freeing memory with something like the C++ delete operator. Great! However, this comes at a price. We no longer know when our memory will be freed. For those of us who grew up in C++ programming releasing ALL resources in our destructor, this comes as a huge blow. After all, memory is NOT THE ONLY SYSTEM RESOURCE THERE IS! What about database connections? File handles? Windows Handles? What about every other non-managed resources that we may interact with?

Enter IDisposable. Ok, so implement IDisposable.Dispose, and then when you are finished with an object, call Dispose. Problem solved. NOT! How is this any better then delete? Well, if you call Dispose in your finalizer, then you get guaranteed disposal at some time in the future if you forget to do it. So I guess its at least an improvement. However, if you have any high-contention resources... you are still pretty much screwed because you have to depend on a programmer to do something... and we all know how unreliable programmers can be. :)

Ok... so now we've defined the problem. What about a solution? I will have to admit I just thought that the people at Microsoft were a bunch of morons who didn't think about these things. I figured that the CLR guys were all VB programmers or something. As it turns out they did think about it (and as it turns out, a lot of the decision to not implement deterministic finalization was tied to VB - go figure).

However there is hope. Chris Sells (a .NET guru who I have grown to admire more and more every time I read something of his) has been working with ROTOR (the open source CLR implementation released by Microsoft to port to Linux and other platforms) in an attempt to bring deterministic finalization to .NET! Unfortunately they've hit a stumbling block with major performance issues. So if you have the time, stop by Sells Brothers and volunteer to help out. Its a worthy cause!

And You're Surprised? 

FOXNews.com - Foxlife - Out There - One's Disrobing Leads to Another's Dismissal.


As part of a demonstration of American cultural values, the unnamed professor offered an 'A' to any student who would get up before the class and take off all his or her clothes.

Much to his dismay, one student, whose name and gender were not released, did just that.


Why this particular professor is surprised this happened... I don't have a clue. I know someone who teaches at a local college... and have heard some interesting stories of the things that students will do to increase their GPA.

Read on... there are some other stories there too...

Why Don't I Get Those Keywords? 

Why Don't I Get Those Keywords? is a good article by Kate Gregory on Code Guru about how to define Properties and Delegates in Managed C++ despite the lack of those facilities in the base language. This is another article in her running series on Code Guru called Using VC++ .NET.

I personally haven't touched C++ in some time, deciding to make the full switch in heart and mind to C#... but in this series of articles she makes a very good argument for using Managed C++ for writing .NET interop libraries. Having had my share of headaches trying to make C# deal with unmanaged types... and dealing with Marshalling... maybe she has a point. But I guess I like the advantages that C# offers more then writing Managed C++ would help me with Interop code.

In short... get real used to the double underscore in Managed C++. You'll be using it a lot.

Sunday, February 22, 2004

Humidor CL Server 



So... who wants to guess what this is? A humidor? A clock? How about a Wireless Proxy Server and Firewall? That's right. The Humidor CL Server was a project done by a regular on Mini-ITX.

He was actually sponsered by VIA, which is a chipset manufacturer that is leading the way in the Mini-ITX standard. Mini-ITX is an ultra small motherboard form factor that makes use of very sweet fanless processors to make all sorts of things, like firewalls, set top multimedia platforms, and anything else you can imagine. Mini-ITX.com features a whole bunch of different projects people have done to fit Mini-ITX computers in all sorts of odd packages, like Ammo Boxes, 8-Bit Nintendos, and anything else you can think of. Take a look at the cool geeky stuff there.

Saturday, February 21, 2004

Some thoughts on the Clarett Decision 

I know its been a couple weeks since the Federal District court ordered the NFL to make Clarett eligible for the NFL draft... but I finally got around to reading the actual Text of the Decision.

Its actually quite long... but its an interesting read. I'm not a lawyer, but I've read enough legal decisions to realize that they actually are written in non-legalize... which is very good I think. However, now that I've read the entire thing, I can definitely say that this Judge is nuts.

One of the more interesting parts of the decision is where she explains the fact that the Collective Bargaining Agreement terms regarding the three year rule are not exempt from Anti-Trust law:


In sum, none of the cases cited by the NFL involve job eligibility. The league provisions addressed in Wood, Williams, and Caldwell govern the terms by which those who are drafted are employed. The Rule, on the other hand, precludes players from entering the labor market altogether, and thus affects wages only in the sense that a player subject to the Rule will earn none. But the Rule itself, for the reasons just discussed, does not concern wages, hours, or conditions of employment and is therefore not covered by the nonstatutory labor exemption.


Forgive me for asking stupid questions... but isn't the rule directly related to conditions of employment? A condition of employment is that you are out of high school for three years. Eligibility for the draft is essentially a condition to employment... but for some reason she refuses to draw that obvious connection.

The NFL says that there are four reasons that the rule is reasonable:


The purposes of the eligibility rule include [1] protecting younger and/or less experienced players — that is, players who are less mature physically and psychologically — from heightened risks of injury in NFL games; [2] protecting the NFL’s entertainment product from the adverse consequences associated with such injuries; [3] protecting the NFL clubs from the costs and potential liability entailed by such injuries; and [4] protecting from injury and self-abuse other adolescents who would over-train — and use steroids — in the misguided hope of developing prematurely the strength and speed required to play in the NFL.


In making her decision, the Judge throws out these very good reasons... stating:


All of the League’s justifications for the Rule boil down to the same basic concern: younger players are not physically or mentally ready to play in the NFL. But as the NFL’s own affiant concedes, he “timeframe” for a player’s physical and psychological maturation “varies from individual to individual.” That being so, age is obviously a poor proxy for NFL-readiness, as is a restriction based solely on height or weight.


Age is a poor proxy huh? Yet we use age as a proxy for eligibility in a whole matter of issues in our daily lives. You have to be 16 to drive, 18 to smoke, vote, join the armed force, and enter into a binding contract. You even have to wait until you're are 21 to drink. What does age have to do with any of these activities? Absolutely none. We use age as a proxy judgement on maturity for all of these. So shouldn't all these laws be struck down then? You should be able to drive whenever you can pass the driving test. You should have to take a test before you can vote (oh wait... they tried that in the South to prevent blacks from voting... and that was rightly struck down).

We use age as a proxy because we can define a very clear demarkation line on eligibility that prevents abuse of more subjective testing means (like the voting example). Sure some younger people may be mature enough to vote before 18 for example... but the point is... its not permanent. Wait a couple years. The same goes for Clarett. Wait a year like everyone else. But of course for him... he screwed up his life so much that he probably won't be able to play college ball next year, which is his real motivation. However, thats his fault, not the NFL's.

Wow... this post ended up being a lot longer than I intended... oh well.

Friday, February 20, 2004

Front-Wheel Drive Cars are like Bad Sex. Rear-Wheel Drive Cars are like Good Sex 

I was talking to someone recently about their rear wheel drive car... and was suddenly reminded of this thing I had read some time ago... and amazingly enough when I looked in my Favorites, I had kept a link to it. Why Front-Wheel Drive Sucks - And why rear-wheel drive is coming back. Its actually a very good discussion on the differences between the two types... and why Rear-Wheel drive is getting a bad rap given the large number of Front-Wheel drive cars on the market.

Besides... it compares cars to sex... and sex sells right? So just read it.

Random Thoughts on Component Based Programming 

If you're not aware, I've become quite active in the GotDotNet forums, answering a lot of questions for people are having random issues with programming in .NET. (My username there is schweitn in case you're wondering... go figure). Of late, I've seen a lot of discussions and issues centered around different features of a component, or usually a group of similar components... not understanding the difference between them, or even caring that there are differences in the first place. One example of this is with the usage of Data Structures. People often times only use one or two different data structures, but probably have no clue how they are implemented underneath, and what the advantages or disadvantages are of a specific one.

Another example of this phenomena can be found at CodeGuru: Performance Matters: Choose Your Library Wisely. I would just like to mention that that article has a lot to do with VB 6 libraries... and from my personal experience it is the VB programmers who are most guilty of this.

So some of you may ask... why does this matter? Isn't the beauty of component based programming the fact that you can use a lot of off the shelf software, plug them together with some Elmers, and not care about how they're implemented underneath? Isn't this what C++, then COM, then .NET all have been working toward? What are you... some sort of heretic? Of course not. I love components. I WRITE components. But I think what is being lost is the fine art of understanding a concept called "Theory of Operation". People are so busy throwing components into their software, that they're not looking at whether this is the right component to use in the first place.

One area where this is especially clear is in the lack of variety by some people in their use of Data Structures. Most programmers in the C++ world (and now in C#) will stick to about 3. Built in arrays, some form of vector (re-dimensionable array like STL Vectors or the ArrayList in .NET) and some form of Linked List (Once again like those offered in STL). Those are great. But do you understand when you should use one and when to use the other? What about Queue's, and Stacks, and Hash Tables, and Binary Trees and Skip Lists and Sets!? They all have different advantages and disadvantes depending on your purpose. Do you need random access? Do you need high performance searches? Are you going to know the size of the structure ahead of time? Do you need good insertion performance? There are many questions to ask, and depending on your answer, your structure of choice may radically change.

Components are great at abstracting away details so that you don't have to worry about them. But before you go and and use that component, have an understanding of those details. I know it sounds contradictory... but you should always know what something is doing for you. That of course is why Wizards and I have never been in good standing... but thats for another post.

A First Look at ObjectSpaces in Visual Studio "Whidbey" (ADO.NET Technical Articles) 

Here is another one from the Where is Whidbey Already Archives. A First Look at ObjectSpaces in Visual Studio "Whidbey" (ADO.NET Technical Articles) is an article on MSDN about a brand new feature in Whidbey.

For anyone who has written way too much code, and way too many stored procedures purely for the purpose of mapping your relational database tables to your business object structure... this is going to be for you. These sorts of frameworks have existed before from third party developers... but only if you could afford the heavy price tag that they bring with them.

Here is an interesting tag line form the article:

An O/RM system allows you to persist an existing object model to a given storage medium. You should use an O/RM system because you have an object model to persist. You shouldn't create an object model in order to use an O/RM system.


Why is that? Well I think you will find that using an O/RM system for just about everything will add more overhead then you will be happy with. It will be interesting to play around with. I know the project I'm working on at my current employer devotes a good amount of people resources to the maintanence of a DAL.

Exploring New WinForm Controls in VS .NET Whidbey 

If you're a huge .NET programmer like I am, then you are eagerly awaiting the next version of Visual Studio .NET and the associated changes to the CLR (collectively known as Whidbey). Exploring New WinForm Controls in VS .NET Whidbey is a nice wrap-up aricle on DevX that gives a glimpse at some of the new WinForm controls that will be available out of the box with Whidbey. Excuse me while I get a sponge to clean up this drool.

Building a Better Binary Search Tree 

If you haven't been keeping track of this running series of articles on MSDN by Scott Mitchell, then you are really missing out. Building a Better Binary Search Tree is Part 4 in an excellent series of articles on Data Structures in .NET.

Part 1 introduces the very basic data structures. Part 2 talks about the Queue, Stack and Hashtable classes built into .NET. Part 3 discusses Binary Trees and Binary Search Trees (which are not built into .NET) and gives example code for your own implementation.

This latest article in the series improves on the Binary Search Tree from Part 3, by discussing self-balancing binary search trees, and then goes on to discuss skip lists. For anyone who had a really crappy prof in college for your Data Structures course, this is a must read series.

Got a new Cell Phone 

I got a new cell phone last night... a Sanyo SCP-5400. Its amazing the kind of deal you can get on a new phone when you go to your wireless carrier and tell them that you're out of contract, and are about to leave them.

Its got better reception than my old Samsung N200 (which I loved because of how insanely easy to use it was). It has all the features I had with the old phone, plus this one has a speaker phone... so maybe I can be safer when I'm talking on the cell while I drive... only time will tell. And amazingly enough, this phone doesn't make toast! Did you even know that such a phone existed? I thought they only made camera phones these days. I was so happy to see that they made some phones without them.

I have a very nice digital camera... why the hell do I want one on my phone? I've seen the kinds of cameras they put on phones... the picture sucks. I want my phone to be good at making phone calls, and my camera to be good at taking pictures. Does that make me some kind of freak?

Who is the "Typical" Visual C# User? 

Who is the "Typical" Visual C# User? This is a hillarious blog post by one of the Usability Specialists at Microsoft who works on Visual Studio. When I started reading this I never thought I would end up fitting this mold... but by the time I was done I realized he had nailed me on almost every single point. Go figure.

I have to admit that I don't consider myself "Battle Scarred" by C++... but I don't think I can go back either. Personally I thought it was part of my job to worry about deletes... and I am proud to say that I rarely ever had memory leak on me. But I also realize that a lot of people did have issues with memory leaking on them. My belief is that if you had memory leak on you using C++... then you weren't programming using good object oriented techniques.

Enjoy this post, I did.

Thursday, February 19, 2004

Introduction to Anonymous Methods and Higher-Order Procedures in C# 

Introduction to Anonymous Methods and Higher-Order Procedures in C# is an excellent article from MSDN Academic Alliance on how to use the new anonymous delegates and closers to create Higher-Order procedures in C# 2.0 (Whidbey).

Welcome to the World According to Nick 

Welcome to the window on what I'm thinking... amazingly enough... when you get the chance to say whatever you want to... you can hardly think of anything to say.

Over time I hope you all enjoy the things I find to talk about, and will come back often.

Do you realize that at almost any time during the day you can see an episode of Friends? I think thats one of the signs of the apocolypse.

About Me



Name: Nick
Home: Wauwatosa, WI, United States

I'm a Software Consultant in the Milwaukee area. Among various geeky pursuits, I'm also an amateur triathlete, and enjoy rock climbing. I also like to think I'm a political pundit.


 View My Profile

Archives
 Home Page

Subscribe to this Feed

Search Archives
Personal Links
Carnival of the Badger
The Coding Monkey
del.icio.us Links
Flickr Photos
Blog Critics Reviews





Blogroll Me!

music
books
video
culture
politics
sports
gaming

www.flickr.com
This is a Flickr badge showing public photos from Nick_Schweitzer. Make your own badge here.

Credits

Blogcritics: news and reviews







This page is powered by Blogger. Isn't yours?

Weblog Commenting and Trackback by HaloScan.com

RSS-to-JavaScript.com

Listed on BlogShares

Design By maystar