As silly as this sounds (a calculus teacher used to suggest this approach), it gets me through many trying days at work. When I feel overwhelmed by the complexity of huge amounts of code (especially when it's written by someone else), I just try to break it down to its most basic pieces.
I ask myself: "what is this library/app trying to do?"
If I can't answer that, then I break it down again: "what is this class/function trying to do?"
And if that gets me nowhere: "what is this line of code trying to do?"
Then I'll make some notes and draw some pictures of my ideas (that way I feel like I'm doing something!), and before I know it, I'll see a method to the madness. Patterns form in the chaos.
Put another way, the whole system is often too much for a programmer to take in at once, and trying to figure out everything at once leads to frustration and "hacker's block". So don't try to figure it all out -- take a piece and figure that out, then another, and so on. Confidence and comprehension will grow as more and more pieces are tackled.
As obvious as this sounds, I see many developers trying to handle everything at once and get frustrated. It really works!
Re:Java-bastardizing-then-dumping bastards....
on
Microsoft PDC Journal
·
· Score: 1
Point well taken. However, my company, which makes 3D analysis software (and leads its sector), is betting its future on Java (where I have my experience with Swing). The results so far are very promising.
Interestingly, we tried COM a couple years back, with disasterous results.
So I'd say that perhaps Java has come into its own now.
Re:Java-bastardizing-then-dumping bastards....
on
Microsoft PDC Journal
·
· Score: 1
Yeah, talk about an unbiased, objective article (wink, wink). It's not like Sessions has anything to gain with this Microsoft brown-nosing. Here's a quote:
Java is not the first time the industry has been promised a WO/RE solution. In fact, this has been a recurrent theme since the dawn of software. Unix, CORBA, and C++ are just a few examples of the many products that originally made similar claims.
George Santayana said, "Those who cannot remember the past are condemned to repeat it." Unfortunately, the collective memory of our industry seems particularly poor. WO/RE has never worked and it seems unlikely to me that it ever will. And we appear to be caught in an endless cycle of relearning this lesson.
Huh? How many architectures does Windows NT run on? One, since even Alpha support was dropped recently. How about NetBSD? 29. Maybe not WO/RE [Write Once/Run Anywhere] but you get the point.
How about C++? I've run the same exact C++ code on Solaris, Linux, and Windows NT. I'm sure it would run on any other OS with a C++ compiler.
Vim, written in C, runs on about 50 different operating systems.
It's irritating that the author suggests that portability (recompiling -- admittedly a weaker form of WO/RE) just doesn't work. Obviously, it does. But then why would Roger Sessions (a very good author, and I liked his COM book) misrepresent the true state of affairs?
Oh, yeah, Microsoft is threatened by WO/RE, so it must be a failure. Shame, shame!
I can't resist this quote, either:
So Microsoft did an about-face, and threw its full strength behind Java the language. I see no evidence that this support has slacked off in the slightest. Microsoft seems fully committed to providing the best tools available for creating components using Java. Although Microsoft will always support other component development languages, I believe Java is Microsoft's language of choice for implementing the software that will run on the component tier.
Yes, I know. It's mean old Sun's fault for suing those innocent Microsoft engineers, who were only trying to innovate for customers. That's why Microsoft dropped support for Java. After all, as Sessions says, the Java UI pales in comparison to the sophisticated stuff Microsoft offers.
I've programmed in Win32 and MFC a great deal. Swing is vastly superior, in functionality, design, and simplicity (that's just my opinion, of course). I know he wrote this article three years ago, so I'll cut him some slack. But don't quote it like it's still true.
Re:IDE's a convenient crutch today, a thorn tommor
on
Why Develop On Linux?
·
· Score: 1
Amen.
> Now, undoubtably someone will argue that this > is doing the hypothetical company and developer > a favor, that 30 year old code should be > disgarded and rewritten anyway.
Let me address this. I've had the misfortune of having to support old code (around ten years old) in many settings for many companies, as have many developers at large companies.
The fact is, managers are often idiots. They will not allow a rewrite because deadlines have to be met (they never are, because of the vicious cycle of fixing crappy code, but that's beside the point).
The result is that poor maintenance developers like me have to pay a huge price for the shortcuts and laziness of the original developers.
I have often been forced to modify *generated* code, which is in source control, because the IDE's are gone or no longer work with the generated code. Horrible, I know. Welcome to my world.
The ironic part is that the supposed time savings of using wizards, etc., actually leads to massive time and productivity losses over the long run.
The point is that MFC, ATL, and all that other auto-generated/wizard-driven junk from Microsoft will, in the long run, make even the most simple bug fixes a nightmarish headache.
I use both CVS (on Linux and NT, 2 users) and SourceSafe (on NT, 40 users) constantly. I've also used ClearCase (on Solaris and NT, 20 users) for two years.
I also maintain and administer CVS (for a project a buddy and me are working on).
ClearCase is extremely powerful, but is has its own filesystem and is so complex, my group had many problems with it. I also found the performance, even over a high-speed LAN, crummy. I know there are snapshot views, but we found them problematic. ClearCase is probably well-suited to huge legacy systems supporting multiple concurrent releases, but it's expensive (I hear > 100,000 per year for my company) and very difficult to administer (probably need a person who does nothing else). Distributed development over many cities seems unlikely.
SourceSafe is easy to use and better than most Microsoft products (of course, they bought it rather than develop it in-house), and even supports distributed development through an add-on called Source OffSite. But it's not cross platform, can't be administered remotely and is primarily GUI-driven (although I hear some things can be done from the command line). The biggest complaints, which I haven't seen myself yet, are that it doesn't scale well, nor does it properly support multiple branches well -- which ClearCase does.
CVS has been an absolute pleasure, and I administer it myself from 600 miles away where it is hosted on an old Pentium 200 running Linux. The online chapters of the CVS book have been extremely helpful. Even a newcomer like myself has been able to set it up. Plus, with the wonderful web front-end, CVSweb, as well as TkCVS, it's as easy to use on the client side as SourceSafe. I can't speak to the scalability or branching management personally (although large projects that use CVS do), I find it offers the best of both worlds -- configurability and ease-of-use.
Please read the findings of fact, so that you can understand Microsoft's real reason for *free* www support.
Consider Microsoft VP Jim "Demomaster" Allchin, who said:
I don't understand how IE is going to win. The current path is simply to copy everything that Netscape does packaging and product wise. Let's [suppose] IE is as good as Navigator/Communicator. Who wins? The one with 80% market share. Maybe being free helps us, but once people are used to a product it is hard to change them. Consider Office. We are more expensive today and we're still winning. My conclusion is that we must leverage Windows more. Treating IE as just an add-on to Windows which is cross-platform [means] losing our biggest advantage -- Windows marketshare. We should dedicate a cross group team to come up with ways to leverage Windows technically more. . . . We should think about an integrated solution -- that is our strength.
and also
You see browser share as job 1. . . . I do not feel we are going to win on our current path. We are not leveraging Windows from a marketing perspective and we are trying to copy Netscape and make IE into a platform. We do not use our strength -- which is that we have an installed base of Windows and we have a strong OEM shipment channel for Windows. Pitting browser against browser is hard since Netscape has 80% marketshare and we have less than 20%. . . . I am convinced we have to use Windows -- this is the one thing they don't have. . . . We have to be competitive with features, but we need something more -- Windows integration.
Hmmm. Doesn't sound sound like the purest of intentions to me.
Here is a nice article.
As silly as this sounds (a calculus teacher used to suggest this approach), it gets me through many trying days at work. When I feel overwhelmed by the complexity of huge amounts of code (especially when it's written by someone else), I just try to break it down to its most basic pieces.
I ask myself: "what is this library/app trying to do?"
If I can't answer that, then I break it down again: "what is this class/function trying to do?"
And if that gets me nowhere: "what is this line of code trying to do?"
Then I'll make some notes and draw some pictures of my ideas (that way I feel like I'm doing something!), and before I know it, I'll see a method to the madness. Patterns form in the chaos.
Put another way, the whole system is often too much for a programmer to take in at once, and trying to figure out everything at once leads to frustration and "hacker's block". So don't try to figure it all out -- take a piece and figure that out, then another, and so on. Confidence and comprehension will grow as more and more pieces are tackled.
As obvious as this sounds, I see many developers trying to handle everything at once and get frustrated. It really works!
Point well taken. However, my company, which makes 3D analysis software (and leads its sector), is betting its future on Java (where I have my experience with Swing). The results so far are very promising.
Interestingly, we tried COM a couple years back, with disasterous results.
So I'd say that perhaps Java has come into its own now.
Yeah, talk about an unbiased, objective article (wink, wink). It's not like Sessions has anything to gain with this Microsoft brown-nosing. Here's a quote:
Huh? How many architectures does Windows NT run on? One, since even Alpha support was dropped recently. How about NetBSD? 29. Maybe not WO/RE [Write Once/Run Anywhere] but you get the point.How about C++? I've run the same exact C++ code on Solaris, Linux, and Windows NT. I'm sure it would run on any other OS with a C++ compiler.
Vim, written in C, runs on about 50 different operating systems.
It's irritating that the author suggests that portability (recompiling -- admittedly a weaker form of WO/RE) just doesn't work. Obviously, it does. But then why would Roger Sessions (a very good author, and I liked his COM book) misrepresent the true state of affairs?
Oh, yeah, Microsoft is threatened by WO/RE, so it must be a failure. Shame, shame!
I can't resist this quote, either:
Yes, I know. It's mean old Sun's fault for suing those innocent Microsoft engineers, who were only trying to innovate for customers. That's why Microsoft dropped support for Java. After all, as Sessions says, the Java UI pales in comparison to the sophisticated stuff Microsoft offers.I've programmed in Win32 and MFC a great deal. Swing is vastly superior, in functionality, design, and simplicity (that's just my opinion, of course). I know he wrote this article three years ago, so I'll cut him some slack. But don't quote it like it's still true.
I like the voice-over as well. So there are two of us, at least.
I could look it up, but maybe someone else is interested, too; any experts out there care to comment on the state of support for IPv6 in Linux?
How about *BSD?
searches for a spec
and hopes of a URL
ending in failure
can you share knowledge
that would correct assumptions
you claim are not right?
yet another kludge
old ideas becoming new
through # defining
c# -- a wrap of
15 year old libraries
macros everywhere
Microsoft again
finding more ways to abuse
the preprocessor
CreatePipe
returns TRUE for success and FALSE on error.
CreateFile
returns a handle to the file object on success and the INVALID_HANDLE_VALUE constant on error.
CreateFileMapping
returns a handle to the mapping object on success and NULL on error.
CreateTapePartition
returns NO_ERROR on success and one of 15 constants (ERROR_BEGINNING_OF_MEDIA to ERROR_WRITE_PROTECT) on error.
CreateHalftonePalette
returns a handle to the palette object on success and zero on error.
You can find it here
Amen.
> Now, undoubtably someone will argue that this
> is doing the hypothetical company and developer
> a favor, that 30 year old code should be
> disgarded and rewritten anyway.
Let me address this. I've had the misfortune of
having to support old code (around ten years old)
in many settings for many companies, as have many
developers at large companies.
The fact is, managers are often idiots. They will
not allow a rewrite because deadlines have to be
met (they never are, because of the vicious cycle
of fixing crappy code, but that's beside the
point).
The result is that poor maintenance developers
like me have to pay a huge price for the shortcuts
and laziness of the original developers.
I have often been forced to modify *generated*
code, which is in source control, because the
IDE's are gone or no longer work with the
generated code. Horrible, I know. Welcome to
my world.
The ironic part is that the supposed time savings
of using wizards, etc., actually leads to massive
time and productivity losses over the long run.
The point is that MFC, ATL, and all that other
auto-generated/wizard-driven junk from Microsoft
will, in the long run, make even the most simple
bug fixes a nightmarish headache.
Deadline is looming
Yet I read silly haikus
Time slipping away
My life is sucking
Glad for laugh at 2 AM
Thank God for Slashdot
Back to work I go
Will my code even compile?
If not, more Slashdot
But don't you lose the revision history for the file when you do that?
I'll chime in here and share my experience.
I use both CVS (on Linux and NT, 2 users) and SourceSafe (on NT, 40 users) constantly. I've also used ClearCase (on Solaris and NT, 20 users) for two years.
I also maintain and administer CVS (for a project a buddy and me are working on).
ClearCase is extremely powerful, but is has its own filesystem and is so complex, my group had many problems with it. I also found the performance, even over a high-speed LAN, crummy. I know there are snapshot views, but we found them problematic. ClearCase is probably well-suited to
huge legacy systems supporting multiple concurrent
releases, but it's expensive (I hear > 100,000 per year for my company) and very difficult to administer (probably need a person who does nothing else). Distributed development over many cities seems unlikely.
SourceSafe is easy to use and better than most Microsoft products (of course, they bought it rather than develop it in-house), and even supports distributed development through an add-on
called Source OffSite. But it's not cross platform, can't be administered remotely and is primarily GUI-driven (although I hear some things can be done from the command line). The biggest complaints, which I haven't seen myself yet, are that it doesn't scale well, nor does it properly support multiple branches well -- which ClearCase does.
CVS has been an absolute pleasure, and I administer it myself from 600 miles away where it is hosted on an old Pentium 200 running Linux. The online chapters of the CVS book have been extremely helpful. Even a newcomer like myself has been able to set it up. Plus, with the wonderful web front-end, CVSweb, as well as TkCVS, it's as easy to use on the client side as SourceSafe. I can't speak to the scalability or branching management personally (although large projects that use CVS do), I find it offers the best of both worlds -- configurability and ease-of-use.
Dear Mr. Microsoft Apologist,
Please read the findings of fact, so that you can understand Microsoft's real reason for *free* www support.
Consider Microsoft VP Jim "Demomaster" Allchin, who said:
and alsoHmmm. Doesn't sound sound like the purest of intentions to me.