Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: Programmers, Programmers, Programmers, ...

__/ [ Ian Hilliard ] on Saturday 08 July 2006 14:53 \__

> As Steve Balmer correctly stated, while making his monkey dance, it is
> applications and hence programmers that make a platform. The fact though is
> that if you want to do professional programming, then Linux is the platform
> for you. I know that this statement will get the heckels up on a lot of
> trolls in C.O.L.A, but I have a recent experience that proves this.


Actually, the infamous Monkey Dance scene (quite a display of insanity!)
involves just yelping and some loud cheers of "yeah". The scene you are
thinking of is sweaty Ballmer saying "developers" 14 times. See the
following:

http://www.ntk.net/ballmer/mirrors.html

Speaking of loud cheering (and even screaming)...

,----[ Quote ]
| Public Persona
| 
| Ballmer's tendency to loudly and enthusiastically express himself is
| well known. A famous 1991 incident left his vocal cords requiring
| repairative surgery after he screamed "Windows, Windows, Windows"
| continuously during a meeting in Japan[1]. With the advent of internet
| video, such incidents have become increasingly infamous.
`----

                        http://en.wikipedia.org/wiki/Ballmer



> I am currently working for a Windows only house producing a system that
> receives and transmits around 1000 telegrams per second in each direction
> on a UDP socket, translates them into a different format and creates a log
> entry for each telegram so that it can be processed off-line and receives
> and sends the data to another application over a TCP/IP socket. The program
> is multi-threaded and is written in C++. This is perhaps not the ideal
> language, but it was a requirement that came down from on high, when the
> original project was initiated.


This sounds like an intersting project. Judging from what I read, home
automation and DIY robotics is better managed by GNU/Linux.


> I had been in charge of the original production of this code, but a bunch
> of monkeys had been working on the code for a couple years and had made a
> complete mess of the program.


Never trust a code monkey in a cubicle. Uninspired programmers produce buggy
and undependable code. Compare with Google's lenient working conditions, for
instance.


> I have a couple of firm rules:
> 1) All code is to be generic. Code that works on only one platform does not
> belong to you, it belongs to the platform.
> 
> 2) All external interfaces have only one point of access. This includes API
> calls to the OS. I have an abstraction layer that provides an interface
> based on functional objects. It also provides a set of low level string
> handling functions and a set of standard objects for things like thread
> creation, synchronisation and inter-thread / inter-process communications.
> 
> The first thing I did when taking on the project is ran a number of
> different compilers over the code to find where non-standards coding had
> been used. I find that GCC 4.x is the most picky about coding errors.


"Errors" or "warning"? Verbose compilers can make miserable programmers,
especially if they refuse to compile. Testing software can compensate for an
overly permissive compiler.


> Microsoft compilers are very willing to accept coding errors and in many
> cases do a reasonable job of interpreting the code. The problem is that all
> the compiler can do with non-standard code is attempt to guess what the
> programmer had in mind. The compiler may or may not get it correct.


Perhaps it's Microsoft's way of encouraging you to use the Visual Studio
debugger, which I hear is rather valuable. Or maybe they want you to but
some extra testing software that is pricey. It's a bit like spam filtering
(or lack thereof )in Outlook Express and Outlook (same rubbish; one work
less).


> This analysis together with a restructuring of the poorly designed sections
> fixed a lot of the problems in the code. It was then possible to put the
> new functionality into the project.
> 
> Around a month ago we finished programming and started putting the system
> through its paces. We found that there was a bug in the code that would
> cause cataclysmic failure of the program. At least with Windows 2003, the
> OS did not crash with application. We were not able to find the cause of
> the problem. The company, being an all Microsoft house has hundreds of
> thousands of dollars worth of tools like Rational Quantify/Purify and
> Bounds checker. It is really easy to spend a fortune on Windows programming
> tools, because they are so expensive. e.g. US$5000 for a single
> Quantify/Purify license.
> 
> We tried to find the cause of the failure with the large set of tools
> available to us. The problem always came back to the same thing. The
> program was gone and there was no way to know what state it was in when it
> died. Even running the program within Visual studio would cause Visual
> Studio to fail.
> 
> I finally gave up on the Windows tools and I ported the abstraction layer
> to Linux. I started by trying to port the solaris version of the
> abstraction layer, but then discovered that there is a really good site at
> www-128.ibm.com/developerworks that gives some easy steps to port Windows
> code to Linux. After a weekend of porting the abstraction library, it was a
> trivial task to compile the application and get it running under Linux. The
> only real catch in the whole process was with select. The rfds to be passed
> in is the the highest socket ID plus 1. That is a little different to the
> unix versions I've used, where the number of entries in the fd_set is
> passed in and very different to Windows, where -1 is always passed in.
> 
> The next step was to put a second partition onto the test machine. That is
> an easy task these days. We compiled the application with -g and started
> running it under gdb. GDB was very quick at picking up a few errors, which
> were able to fix up. We then left the application running over night. An
> interesting thing that we noted, was that we needed to send 50% more
> telegrams per second to give the same percentage CPU usage loading on the
> application. The application simply runs much faster under Linux. A later
> test of the application compiled with the -O3 gave another 10% improvement
> in performance.


My experience is that Visual Studio produces binaries (from C) that are
several times slower than these which GCC generates. Same libraries,
somewhat different modularity (conjoining code).


> By the morning, we had a nice core dump and it was then trivial to find the
> offending code. I have read the Wintrolls write that it is possible to have
> a core dump produced by Windows, but I haven't been able to find how to do
> it. Maybe one of the trolls will actually explain how this is done. I
> suspect that this is just hot air.
> 
> Once we had the main problem cured, we then linked in electric fence and
> this found a few errors that Purify had not found. Most recently we have
> been running the application in valgrind and it has found even more errors.
> 
> Pretty well every Linux distro gives you all the tools required to develop
> professional programs. The equivalent tools for Windows would set you back
> thousands of dollars and they don't seem to work as well as the free tools
> you get with Linux.
> 
> If you want to produce professional code, Linux is the way to go. Now all
> that has to happen is the PHB's have to realize that the Microsoft FUD is
> pure lies and we will see a real sea change in the computer industry.


Did you actually believe that pricey software is indicative of quality? I
never did. The software I use in Linux is more stable than Windows
equivalents that I have experience with. Some of the best programmers are
those who wish to demonstrate their skills through Open Source projects such
as Apache. Other drop out and join that company in Redmond, which gives them
dim lights and towels, in exchange for VB code.

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index