After working in c# for a year, the only conclusion I can come to is
that I wish I knew c.
All I need is Linux, the gnu c compiler and I can do anything.
Web services are just open sockets hooked up to interfaces.
The Gtk is more than enough gui.
Jul 21 '05
354 14643
Hi Soren_Reinke, Function is the only measure of code, not whitespace.
I leave it to the reader to invest the time it takes to read my code,
and, hopefully, change the whitespace to his tastes.
> You showed: << int swapped=(((byte) iOriginal)) << 24 | ((byte) (iOriginal >> 8)) << 16
| ((byte) (iOriginal >> 16)) << 8 | ((byte) (iOriginal >> 24)); >>
Good work, but you can't inline that in C#, C++ allows me to inline select functions ( using __inline ) even when I'm debugging ( using the complier's /Ob1 switch ).
As a function no, as far as I know.
That is why I showed the static method version too and tried to show what
the assembler code would looks like.
Did you try my version in C#... and did it work ? :
The one above? Sure, I didn't daret to put here stuff that are not based on
real testing.
I hope this evening/night when I install C++ at home to see what the C++
code will create for assembler code.
But it should be very close to the one I shown.
typedef unsigned char * uint_8_P ;
int Swap_32 ( int X ) { uint_8_P P = ( uint_8_P ) & X + 4 ; return * -- P << 24 | * -- P << 16 | * -- P << 8 | * -- P ; }
main() { printf( "%x", Swap_32( 0x84838281 ) ); }
I ask because the above code does not work in MS_C_7_1, and I think it's a bug... it doesn't evaluate the four -- P decrements left to right like it should... it decrements them all at once, like P -=
4 ;
Try "(" and ")" this might solve the problem.
Re: The way Outlook wrapped your code,
40tude_Dialog lets you marks lines you don't want wrapped. My hyper-custom newsreader, X.EXE, never automatically wraps anything... as a rule. ( all wrapping must be done manually )
I know it. Outlook express is not very good in sending code samples.
But right now I am very interested in trying another news reader, maybe if I
can find more time.
Very interesting... thanks. But as I said above, only macros give me the flexibility/readability that I demand, ...I'm not so concerned about speed.
I am not going to discuss about macros or not, because everybody should use
the techniques that works best for them.
I tried macro's but I am coming back from them because I lose track what the
code does and hides bugs. It becomes too abstract for my taste.
>> Use some {}'s and don't put them on the same line as any code. That would make your code a lot more friendly towards other developers. Yes but that slows down the compiler, because it has to process all the blanks and CR and LF characters. And it is less performant because you need additional bytes to store these addtional blinks and CR and LF chracters too, so you have less memory, less disk space, and that would be not a proof that you be able to create fast code. ;-)
Hahaha that was a good one, i'll remember that one :)
Have a nice weekend.
Best regards
Søren Reinke
> The way I use whitespace is the most readable to me, of course, and I expect you to change it to taste too.
Yes I understand. :-)
I also put my "{" at the end of the line of the if/for/... function.
This way I can seem more code and less white spaces, so I have one big
overview of my working of the function without need to scroll. It is a
matter of tast.
Hi Bikini_Pope, Re: My comment that
no one here produced anything half as good as my HTM_TXT.CPP code,
Ya told me: << Man, you really have created your own little fantasy here,
haven't you ? >>
Kelsey was the only one who even tried, and he trashed my home page,
falsely claimed that HTM_TXT.EXE didn't work ( refusing to provide proof ),
He also couldn't handle tags like   .
So you tell me... who did a better job of it ?
You can read about those events here ( April_Fools day, no less ):
news:Je***********************@Cotse.NET
> > The way I use whitespace is the most readable to me, of course, and I expect you to change it to taste too. Yes I understand. :-) I also put my "{" at the end of the line of the if/for/... function. This way I can seem more code and less white spaces, so I have one big overview of my working of the function without need to scroll. It is a matter of tast.
There is one thing I do, if I have to touch someone leses code, is that I
try to keep the coding style as much as I can of the orignal person. But
normally I will go and ask this person to change his code himself is he is
available. If not I change, and send the changes, so when he has time to fix
it , he can send back the code and I overwrite my verison with the official
verison.
Hi Olaf, Re: Readability and whitespace preferences, You told me: <<
I also put my "{" at the end of the line of the if/for/... function.
This way I can seem more code and less white spaces, so I have
one big overview of my working of the function without need to scroll.
It is a matter of taste. >>
Wow... finally, some agreed with me about something... wonders never cease.
> Hi Olaf, Re: Readability and whitespace preferences, You told me: << I also put my "{" at the end of the line of the if/for/... function. This way I can seem more code and less white spaces, so I have one big overview of my working of the function without need to scroll. It is a matter of taste. >>
Wow... finally, some agreed with me about something... wonders never
cease.
It is not that we are in discussion that I do not repect you. ;-)
I also listen and learn. You do have valid reasoning. And I see that you are
experienced and actually know what you say. :-)
On 08 Apr 2005 09:05:20 GMT, Jeff_Relf <Me@Privacy.NET> wrote: From showing my code, for example my HTM_TXT.CPP, which demos how my X.CPP converts HTML files into plain_text files: http://www.Cotse.NET/users/jeffrelf/HTM_TXT.CPP
Hey - thats something Ive been looking for, hence why I took a look.
I found that no one here was willing to take the time to learn my standard methods... which is totally understandable.
Standard methods? # defining common language constructs to something
that youre familiar with...yuk! Id hate to have to maintain a large
code base written by someone who did that....
But I also found that no one here could produce anything half as good.
Good? There are many people here who could produce something that
would produce the same results. Some might make something more
efficient, some might make something more maintainable, some might
make something with more functionality, some might make something more
portable, some might make something with fewer bugs....I personally
did NOT consider the code that I saw to be "good".
I think that's because the STL and C# make people lazy, they tend to rely on the built-in stuff too much.
<chortle> We're ALL dependent on our libs these days (in whatever
shape or form they take) and have been for a loooooong time. In fact,
let me rewrite that statement for you:-
"I think that's because header files and C make people lazy, they tend
to rely on the built-in stuff too much."
Im prity sure I read/heard a similar statement by an asm programmer
back in...ooohhh '89.
Anywyas, laziness is the entire reason I program in C# these days
rather than C++ - I code faster and end up with fewer bugs. Sure Id
LIKE the portability and speed of C++ - fact of the matter is though
that its cheaper to throw more hardware at most projects than it is to
write effiecient code. In fact those are the exact reasons I moved
from Basic to C, to C++, to Java, to C# etc. It isnt JUST a matter of
speed.....
Anyways - I looked at your code and decided to stick to
strHTML = Regex.Replace(strHTML,@"(<[^>]+>)",string.Empty);
Regards
Hi Olaf, Re: My amazement that someone agreed with my comments on
readability and whitespace preferences, You told me: <<
It is not that we are in discussion that I do not repect you. ;-)
I also listen and learn. You do have valid reasoning.
And I see that you are experienced and actually know what you say. :-) >>
Wow... People in Comp.OS.Linux.Advocacy usually just insult me.
Comp.OS.Linux.Advocacy is really Comp.Ha.Ha, nothing is serious here.
Hi Lee_Jackson, HTM_TXT.CPP should be judged by what it does,
not by how hard it is for you to learn it,
You concluded: << Anyways - I looked at your code and decided to stick to
strHTML = Regex.Replace(strHTML,@"(<[^>]+>)",string.Empty); >>
From news:Je***********************@Cotse.NET <<
These are tags:   <! Comment --> <Alpha> </Alpha>
But, due to the leading space, < Alpha> is not.
&Unknown is also sent throug untranslated, for obvious reasons. >>
See ! ? C#'s RegEX has made you lazy.
Further, HTM_TXT.CPP simply demos what's in my hyper_custom newsreader,
X.CPP, the parsing it does is very extensive, RegEx wouldn't cut it.
> Wow... People in Comp.OS.Linux.Advocacy usually just insult me. Comp.OS.Linux.Advocacy is really Comp.Ha.Ha, nothing is serious here.
I always thought that using insults is a way to hide that you are insecure
and have no clue what you are talking about. ;-)
Hi Olaf, Re: The code below not working in MS_C_7_1
because it doesn't evaluate the four -- P decrements left to right,
instead, it decrements them all at once, like P -= 4, <<
typedef unsigned char * uint_8_P ;
int Swap_32 ( int X ) { uint_8_P P = ( uint_8_P ) & X + 4 ;
return * -- P << 24 | * -- P << 16 | * -- P << 8 | * -- P ; }
main() { printf( "%x", Swap_32( 0x84838281 ) ); } >>
You suggested: << Try "(" and ")" this might solve the problem. >>
No, I tried that ( * -- P << 24 ) | ( * -- P << 16 ) fails
but ( rv = * -- P << 24 ) | ( rv = * -- P << 16 ) works ( rv is an int ).
You concluded: << I am not going to discuss about macros or not,
because everybody should use the techniques that works best for them.
I tried macro's but I am coming back from them
because I lose track what the code does and hides bugs.
It becomes too abstract for my taste. >>
I like you Olaf... anyone else would've said I was wrong to use macros.
I wrote Loop() twelve years ago, and it's in all of my code everywhere:
#define Loop( N ) int J = - 1, LLL = N ; while ( ++ J < LLL )
So it's as tangible as a rock to me.
Hi Olaf, You commented: <<
I always thought that using insults is a way to hide that you are insecure
and have no clue what you are talking about. ;-) >>
Very true, it's a weakness... and I too am weak sometimes.
I know a tiny bit about a few things,
others know little bits of other things,
but no one knows much of anything... so why get upset ?
"Jeff_Relf" <Me@Privacy.NET> wrote in message
news:Je***********************@Cotse.NET... Hi Lee_Jackson, HTM_TXT.CPP should be judged by what it does, not by how hard it is for you to learn it,
You concluded: << Anyways - I looked at your code and decided to stick to strHTML = Regex.Replace(strHTML,@"(<[^>]+>)",string.Empty); >>
From news:Je***********************@Cotse.NET << These are tags:   <! Comment --> <Alpha> </Alpha> But, due to the leading space, < Alpha> is not. &Unknown is also sent throug untranslated, for obvious reasons. >>
See ! ? C#'s RegEX has made you lazy.
Jeff did you or did Lee use most time writing the code ? The same goes for
debugging the code by 3. party.
Have you also written your own OS, and every tool you use ? Or are you also
a bit lazy and use stuff other people have made ? :-)
If C# makes you lazy, so does C compared to assembler, and again assembler
compared to just entering mnemonics.
It is always a matter of choice and personal preferences, i would rather get
my job done fast, and hopefully less full of bugs, than writing everything
myself.
/Søren
Jeff_Relf wrote: Hi Bruce_Wood, Re: The kind of code you want,
What programs do you have that run too slow ? None, I'll bet.
And even if you did have speed concerns, they probably could be solved by just upgrading your LAN, internet connection, hard drive, DVD burner, printer, etc.
I also bet that you don't spend endless years/money perfecting GUIs, ...second, or even third class, will do, so C#'s dialog/forms editors are quite good enough for you.
As far as maintaining code... upgrades, bug fixes, etc., there's always a learning curve, even with C#.
From showing my code, for example my HTM_TXT.CPP, which demos how my X.CPP converts HTML files into plain_text files: http://www.Cotse.NET/users/jeffrelf/HTM_TXT.CPP I found that no one here was willing to take the time to learn my standard methods... which is totally understandable.
But I also found that no one here could produce anything half as good. I think that's because the STL and C# make people lazy, they tend to rely on the built-in stuff too much.
Do you light your candles by rubbing two dry sticks together as well?
The more effective way is to use an electric light fixture, Jeff.
Certainly all that tight, efficient code is locked away in the
infrastructure and legions of dweebs are hard at work optimizing
sections that implement this built-in stuff. The rest of the world is
out solving real problems at a higher level.
On 08 Apr 2005 12:32:32 GMT, Jeff_Relf <Me@Privacy.NET> wrote: Hi Lee_Jackson, HTM_TXT.CPP should be judged by what it does, not by how hard it is for you to learn it,
I dont want to learn it - its un-natural!!!! You concluded: << Anyways - I looked at your code and decided to stick to strHTML = Regex.Replace(strHTML,@"(<[^>]+>)",string.Empty); >>
From news:Je***********************@Cotse.NET << These are tags:   <! Comment --> <Alpha> </Alpha> But, due to the leading space, < Alpha> is not.
Hrrrmm Yes it is, and I just tested it to verify.
&Unknown is also sent throug untranslated, for obvious reasons. >>
*shrug* (<[^>]+>|&.{0,8};) then - I was just throwing a lazy
example :) See ! ? C#'s RegEX has made you lazy.
Nope, Im naturally lazy. And regex is regex...dont be giving Microsoft
patent department ideas.... Further, HTM_TXT.CPP simply demos what's in my hyper_custom newsreader, X.CPP, the parsing it does is very extensive, RegEx wouldn't cut it.
And youre hyper custom news reading is creating new threads every time
you change the topic and post - its creating a LOT of clutter in the
NG for me (with freeAgent) and making it difficult to follow what
actually might be interesting threads. PLEASE either fix it or
something
Regarding .NET groups it's likely off topic. Try one of the
microsoft.public.vc.* group instead.
TIA.
Patrice
--
"Jeff_Relf" <Me@Privacy.NET> a écrit dans le message de
news:Je***********************@Cotse.NET... Hi Olaf, Re: The code below not working in MS_C_7_1 because it doesn't evaluate the four -- P decrements left to right, instead, it decrements them all at once, like P -= 4, << typedef unsigned char * uint_8_P ; int Swap_32 ( int X ) { uint_8_P P = ( uint_8_P ) & X + 4 ; return * -- P << 24 | * -- P << 16 | * -- P << 8 | * -- P ; } main() { printf( "%x", Swap_32( 0x84838281 ) ); } >>
You suggested: << Try "(" and ")" this might solve the problem. >>
No, I tried that ( * -- P << 24 ) | ( * -- P << 16 ) fails but ( rv = * -- P << 24 ) | ( rv = * -- P << 16 ) works ( rv is an
int ). You concluded: << I am not going to discuss about macros or not, because everybody should use the techniques that works best for them. I tried macro's but I am coming back from them because I lose track what the code does and hides bugs. It becomes too abstract for my taste. >>
I like you Olaf... anyone else would've said I was wrong to use macros. I wrote Loop() twelve years ago, and it's in all of my code everywhere: #define Loop( N ) int J = - 1, LLL = N ; while ( ++ J < LLL )
So it's as tangible as a rock to me.
Hi Soren_Reinke ( and Lee_Jackson ),
Re: How I create plain text from HTML vs C#'s RegEx,
You asked me: <<
Jeff did you or did Lee [ require more time to write ] the code ?
The same goes for debugging the code by 3. party.
Have you also written your own OS, and every tool you use ?
Or are you also a bit lazy and use stuff other people have made ? :-)
If C# makes you lazy, so does C compared to assembler,
and again assembler compared to just entering mnemonics.
It is always a matter of choice and personal preferences,
I would rather get my job done fast, and hopefully less full of bugs,
than writing everything myself. >>
Writing C++ code is not the same thing as manufacturing a CPU.
As you say, it's whatever I want, and I want LoopTo()'s parsing.
My hyper_custom e-mail.news client. X.CPP, has to decode to 8 bit,
remove automated spam like PGP sigs, vcards and multi_level_quoting, >>,
it has to extract attachments and convert Hotmail.COM's HTML_Only e-mails.
So general purpose, low level parsing, like LoopTo(), is what I prefer.
Hi Lee_Jackson, < br> is passed through as a literal,
it is not a valid HTML tag ( because of the space ),
You wrote: << Hrrrmm Yes it is, and I just tested it to verify. >>
I think you're mistaken, I too tested it, and again just now.
You wrote: << shrug (<[^>]+>|&.{0,8};) then
- I was just throwing a lazy example :) >>
Nice try, now use that to translate this correctly:
< &Monkey &#o40; <br>   & &Reg_Ex_Sucks < What>
And don't forget to remove lines that contained nothing but HTML tags.
You told me: << And youre hyper custom news reading
is creating new threads every time you change the topic and post
- its creating a LOT of clutter in the NG for me (with freeAgent )
and making it difficult to follow what actually might be interesting threads.
PLEASE either fix it or something >>
Fix your Forte_Free problem if you want, I don't care.
Forte_Free might have an option to not start threads on topic changes,
but I wouldn't bother looking for it, I'd switch to 40tude_Dialog instead.
Hi billwg ( and Bruce_Wood ),
Re: Why I wrote LoopTo(), a general purpose, low level parser,
You asked me: <<
Do you light your candles by rubbing two dry sticks together as well ?
The more effective way is to use an electric light fixture, Jeff.
Certainly all that tight, efficient code is locked away in the
infrastructure and legions of dweebs are hard at work optimizing
sections that implement this built-in stuff.
The rest of the world is out solving real problems at a higher level. >>
I wrote X.CPP because there is nothing the comes even close to being as good.
You're the one using the candle, I'm using the light saber.
LoopTo() is just my preferred parser.
On 08 Apr 2005 13:51:50 GMT, Jeff_Relf <Me@Privacy.NET> wrote: Hi Lee_Jackson, < br> is passed through as a literal, it is not a valid HTML tag ( because of the space ),
You wrote: << Hrrrmm Yes it is, and I just tested it to verify. >>
I think you're mistaken, I too tested it, and again just now.
You wrote: << shrug (<[^>]+>|&.{0,8};) then - I was just throwing a lazy example :) >>
Nice try, now use that to translate this correctly: < &Monkey &#o40; <br>   & &Reg_Ex_Sucks < What>
&Monkey of course is not a valid entity- my regex works fine thankyou
(but yes it is lazy - I cant recall what the max length is for a html
character entity).
Iif you choose to strip such tags from html &loose parts of sentances
then thats your business.
And don't forget to remove lines that contained nothing but HTML tags.
You told me: << And youre hyper custom news reading is creating new threads every time you change the topic and post - its creating a LOT of clutter in the NG for me (with freeAgent ) and making it difficult to follow what actually might be interesting threads. PLEASE either fix it or something >>
Fix your Forte_Free problem if you want, I don't care. Forte_Free might have an option to not start threads on topic changes, but I wouldn't bother looking for it, I'd switch to 40tude_Dialog instead.
Guess what Jeff? I dont care either.
PLONK!
Bruce Wood poked his little head through the XP firewall and said: There are myriad problems with this.
1. There is only a limited number of gurus to go around. 2. Most gurus don't like writing boring business software. 3. This presumes that the hiring managers can tell which hires are 4. Today's stock-and-trade tools are yesterday's "snake oil." I 5. One of those very, very smart gurus can write me up a business
Some guy who writes elegant C code would be utterly useless to us, apart from his basic thinking skills and attention to detail.
Similarly, the aforementioned MS guru would completely suck writing code in my old job, where picky attention to tiny details was the order of the day, and you built every line of code by hand, counting CPU cycles as you went. As I said: different domains, different skill sets.
The only point I disagree on is the attention to detail aspect. I think it
is necessary every step of the way.
But otherwise, we got some great real-world posts here, I think.
--
When all you have is a jackhammer, everything looks like concrete.
American Pope poked his little head through the XP firewall and said: Olaf Baeyens wrote:
Is your name really 'Olaf' ?
class clown
{
private:
clown ();
public:
void troll (bool intelligent = false);
};
Ku Karlovsky poked his little head through the XP firewall and said: Tried a couple of other newsreaders, didn't like them. Got any good suggestions that run on Windows?
Graphical: SuperGravity (formerly: Gravity from Microplanet). Console: SLRN (not to be outfeatured by anyone)
But, but, slrn is one of those damn beta apps with a zero version number
that those Win trolls are always yakking about!
--
When all you have is a GUI, everything looks easy.
Olaf Baeyens poked his little head through the XP firewall and said: The way I use whitespace is the most readable to me, of course, and I expect you to change it to taste too. Yes I understand. :-) I also put my "{" at the end of the line of the if/for/... function. This way I can seem more code and less white spaces, so I have one big overview of my working of the function without need to scroll. It is a matter of tast.
I believe in { coming on the next line. I solve the scrolling problem in
two ways:
1. Shorter functions.
2. Text so small it makes passers-by wonder why I'm not blind yet.
Oh, there's a third way:
3. Ignore the IDE and just use a bunch of console windows.
Olaf Baeyens poked his little head through the XP firewall and said: Wow... People in Comp.OS.Linux.Advocacy usually just insult me. Comp.OS.Linux.Advocacy is really Comp.Ha.Ha, nothing is serious here. I always thought that using insults is a way to hide that you are insecure and have no clue what you are talking about. ;-)
Relf, however, is most a "class clown" troll.
Sort of like this guy, though not as flashy: http://redwing.hutman.net/%7Emreed/w...rovocateur.htm
--
When all you have is a hammer, everything looks like a nail.
When all you have is Microsoft software, everything looks like Windows.
Linønut wrote: Olaf Baeyens poked his little head through the XP firewall and said:
Wow... People in Comp.OS.Linux.Advocacy usually just insult me. Comp.OS.Linux.Advocacy is really Comp.Ha.Ha, nothing is serious here.
I always thought that using insults is a way to hide that you are insecure and have no clue what you are talking about. ;-)
Relf, however, is most a "class clown" troll.
Sort of like this guy, though not as flashy:
http://redwing.hutman.net/%7Emreed/w...rovocateur.htm
Could this be K-Man? http://redwing.hutman.net/%7Emreed/w...m/godzilla.htm
Linønut wrote: Olaf Baeyens poked his little head through the XP firewall and said:
Wow... People in Comp.OS.Linux.Advocacy usually just insult me. Comp.OS.Linux.Advocacy is really Comp.Ha.Ha, nothing is serious here.
I always thought that using insults is a way to hide that you are insecure and have no clue what you are talking about. ;-)
Relf, however, is most a "class clown" troll.
Sort of like this guy, though not as flashy:
http://redwing.hutman.net/%7Emreed/w...rovocateur.htm
Peter Kohlmann: http://redwing.hutman.net/%7Emreed/w...tm/grunter.htm
In comp.os.linux.advocacy, Linønut
<linønu*@bone.com>
wrote
on Fri, 08 Apr 2005 10:13:53 -0500
<wP********************@comcast.com>: Olaf Baeyens poked his little head through the XP firewall and said:
The way I use whitespace is the most readable to me, of course, and I expect you to change it to taste too. Yes I understand. :-) I also put my "{" at the end of the line of the if/for/... function. This way I can seem more code and less white spaces, so I have one big overview of my working of the function without need to scroll. It is a matter of tast.
I believe in { coming on the next line. I solve the scrolling problem in two ways:
1. Shorter functions.
2. Text so small it makes passers-by wonder why I'm not blind yet.
Heh. Join the club. :-) Oh, there's a third way:
3. Ignore the IDE and just use a bunch of console windows.
I'll admit I'm of two minds about that, though at this point I've
not seen a good C++ IDE on Linux that has Visual Studio's
capability of autocompletion of function calls.
Not that I've really been looking, admittedly. KDevelop might but
I don't like it too much (I don't like Qt/KDE generally). Glade
is exclusively an interface builder, which makes some sense.
--
#191, ew****@earthlink.net
It's still legal to go .sigless.
Lee Jackson wrote: Guess what Jeff? I dont care either.
PLONK!
Good move. That's all the Relf troll deserves, the antisocial prick
that he is.
It never ceases to amaze, how more people are always coming-along to
feed the troll, to tell him his quoting sucks, to tell him that his
cross-posting sucks, to tell him his coding sucks, etc, as if they
think they're the first person to inform the troll that he sucks.
["Followup-To:" header set to comp.os.linux.advocacy.]
The Ghost In The Machine poked his little head through the XP firewall and said: 3. Ignore the IDE and just use a bunch of console windows.
I'll admit I'm of two minds about that, though at this point I've not seen a good C++ IDE on Linux that has Visual Studio's capability of autocompletion of function calls.
Apparently, vim already has auto-completion, and this site purports to
provide Vim "Intellisense": http://insenvim.sourceforge.net/
"Welcome to the website of Vim Intellisense. This site provides you the
information about the intellisense for Vim, documentation and on how to
enable intellisense for new languages.
Needless to say intellisense is very helpful while developing the
programs. While developing Java or in .NET (C#) it is not possible to
remember all the interfaces and its methods, APIs etc. The IDE or editor
should help in a way to build programs. Vim helps in so many ways, and
especially the auto-completion is provided by Vim, by default. But it
does not give the intellisense which is beyond auto-completion. I think
most of us know what is intellisense, which is provided by Visual Studio.
It is also called CodeInsight. Intellisense in a broad sense means more.
It can be listing methods, attributes, classes, interfaces, member
variables, local variables, etc, provide online help and may be inline
compilation. But we are not looking into building inline compilation."
--
When all you have is a hammer, everything looks like a nail.
When all you have is Microsoft software, everything looks like Windows.
"Alex" <in******@online.nospam> writes: "Tukla Ratte" <tu*********@tukla.net> wrote in message news:m2************@stitch.tukla.net...
After all, COBOL is still being used for a lot of new development.
Source?
My experience.
Other people's experience.
Seminars.
Conventions.
Industry magazines and newspapers.
Were you hoping for an URL? Too bad. Use your head, instead.
You can write object-oriented COBOL. You can write GUIs in COBOL.
You can communicate XML across the Internet in COBOL. You can
get COBOL for friggin' .NET! Do you really think businesses are
buying these products just to maintain 20-year-old legacy code?
--
Tukla, Squeaker of Chew Toys
Official Mascot of Alt.Atheism
>> 5. One of those very, very smart gurus can write me up a business report in C that is a model of beautiful design, all in only a
couple of days. Some jackass fresh out of college can cook up the same
thing in VB in two hours, and it interoperates neatly with all of MS's
stuff, to boot. Yes, the code is crap (I hate VB), yes, it could be much
more efficient (.NET practically guarantees bloat), but I'm going to
throw it away next month and ask for a different one. Who should I hire,
do you think? Different skill sets and languages lend themselves to different problems. (I wouldn't hire the VB jackass to program a CAT
scanner, for example.)
The issue is the 'next time'. The c guy would find a way to
abstract and reuse his methods -- so he would constantly decrease his
programming turnaround time, and increase program speed and efficiency.
The VB would be static -- it will always take 2 hours and it will
never run any faster...
Your second statement is true. The VB programmer would always take 2
hours to build his application, and it would always be slow and
piggish.
Unfortunately, your first statement is a common fallacy of the C
programming world (in which I lived for 15 years, by the way). Building
a framework for efficient production of software requires two things: a
smart programmer (let's assume we already have that), and the ability
to anticipate the needs of the business, which means you have to be a
domain expert, too. This is what many C gurus forget: it's not enough
to be a programming whiz. In order to produce a sound architecture for
a system you must also be a business analysis whiz. If you get the
programming right but the business analysis wrong, you produce a
beautiful, elegant application that your users will hate (and
ultimately not use) because it's not what they want. It won't adapt to
future needs, either.
"Architecture is a risk." If you've never heard that phrase before, you
need to read "The Big Ball of Mud" by Foote and Yoder. http://www.laputan.org/mud/mud.html
Unfortunately, the Big Ball of Mud was "academized" years back to
appeal more to the "powers that be" at the University of Illionois. At
least I assume so because I have a photocopy of the original version,
and it was much kinder to in-the-trenches business developers and much
more jarring to academic sensibilities. Nonetheless, it's still a good
read.
So, point #1 is that it's not enough to be a smart programmer. If
you're a C guru who works 5pm to 4am and doesn't like talking to people
then you're going to end up producing elegant crap that _doesn't_ stand
the test of time because you didn't understand the problem domain well
enough.
Point #2 is that the VB hack, for all of his faults, is standing on the
shoulders of giants, as it were. As dumb as it is,
drag-drop-point-click and he's integrated Windows drag-and-drop, export
to Excel, export to PDF, and myriad other bells and whistles into his
app. Yes, it's a bloated monster, but it allows his business users to
work seamlessly between his little (fat, bloated) app and the rest of
the system they know and understand. The C guy says, "Hey, I can do
that, too! Just give me 3 weeks of sleepless nights to write the 10,000
lines of code to add all of those features...."
As I said, I thank God for C gurus. particularly when I go into a
hospital and put myself inside a CAT scanner, or when I get on board a
fly-by-wire AirBus. However, I wouldn't hire one to write business
software; it's just not he same skill set.
As well, my real-time, picky-detail embedded programming background
makes me vaguely uncomfortable with the VB guy who really has no idea
what's going on under the hood. Nonetheless, I must grudgingly admit
that he can crank out business-ready software that _gets the job done_
and that _his users love_ far faster than I can. If I see him monkeying
with hospital equipment, though, I'm making a hasty exit.
As a further note on this topic, a war story from my past.
I spent four years working for a large company (that will remain
nameless), maintaining their billing system. The billing system was
written in C. It processed millions of records in minutes, not hours.
In other words, it ran like spit. Unfortunately, it was a bit difficult
to adapt it to new business requirements, but we were working on that.
While I was there I rewrote the accounting posting engines (also in C)
because the old versions had been written by one of those guys who sold
himself as a C guru but really had no clue (the ones I talked about in
a previous post).
It galled me that every time there was a new business problem, the VP
of systems would always choose the cheapest, nastiest solution to the
problem. The poor system, as creaky was it was, was gradually decaying
even further. "With a bit more manpower and some backing from
management, we could turn this into a really good system," I used to
say to anyone who would listen. The "powers that be" didn't pay the
least heed.
One year before I left they dumped the whole thing and bought a new
system. In effect, they did a radical technology shift.
The object lesson for me was that the VP's strategy was exactly right:
run the old system into the ground. By the time it was ready to fall
over and die, there would be something much newer and much better on
the market. Buy that and dump the old system.
It was a real eye-opener for me. I had never considered that writing
bad software (or badly maintaining software) could be a good idea.
Being a technician at heart, I always wanted to upgrade the existing
stuff to bring it up to current standards. Sometimes, however, "current
standards" race ahead faster than anyone can fix old systems. That's
when you let them tank and save up for a new one. Being a technician, I
had never imagined that there could be a meta-level of software
maintenance: the business management / asset management level, from
which things might look very different.
Now, as I said before, I wouldn't want a hospital running things like
that. ("We'll buy a new system when an unacceptable number of patients
start dying. In the mean time, just hack that sucker!") However, we
weren't in the life-and-death business.
So, there's more to software maintenance and development than simply
writing good code... in any language.
> But I also found that no one here could produce anything half as
good.
How do you measure "good"?
"Fast"? Perhaps nobody else could produce anything half as fast. I
don't know, but I'll give you at least that much.
"Readable"? Your code is impenetrable. I know C; I'm not bad at C++;
I'm not bad at Java. Your code is hard to read, and therefore hard to
maintain. It's exactly the kind of stuff that I would toss out and
rewrite, not because it didn't work, but because nobody else could
maintain it, which makes it a business risk. Gone.
"Adaptable"? Again, not sure. However, if I can't hire someone who can
understand it after you're gone, it doesn't matter how good your design
was.
As far as speed goes, sometimes throwing hardware at a problem is the
right thing to do. However, (and this comes from my real-time, embedded
programming days) the _right_ way to tune a program for speed is to
design it well, then write it clearly, _then_ profile it and find out
where the problems are. Fix just those parts that are sucking memory
and CPU. Fix the SQL queries that take too long. Leave everything else
alone.
I've seen more programmers waste more time tweaking apps to death to
make them "faster" when in fact they're fixing O(k) code that doesn't
affect resource usage at all. (The worst example being someone who
tweaked program initialization code to "use less CPU" in an app that
spent 1% of its time in the CPU and 95% of its time waiting on database
queries. Talk about a waste of time.)
Again, your code may be great code for certain problem domains.
However, if you're the only one who knows how it works then that makes
it a risk, and I would replace it with slower, less efficient code that
anyone can understand. A bigger box to run it on costs me $10K. A bug
that takes my business down and that nobody can fix because the only
guy who understood the program left two years ago can cost me $1M. You
do the math.
Bruce Wood wrote: Again, your code may be great code for certain problem domains. However, if you're the only one who knows how it works then that makes it a risk, and I would replace it with slower, less efficient code that anyone can understand. A bigger box to run it on costs me $10K. A bug that takes my business down and that nobody can fix because the only guy who understood the program left two years ago can cost me $1M. You do the math.
Bruce,
This is where I thoroughly disagree with you.
If the cost of something is $1M, then the cost of something is $1M.
A solution that is not a solution that costs $10K is a waste of $10K.
Slow, buggy, cumbersome application servers, that can never be used to
create a production application, are worth $0 dollars, but IT Management
spends billions in the hopes of avoiding paying a programmer $1M.
This is the basic and most fundamental argument of the OSS community at
heart.
OSS is labor.
CSS is capital.
The CSS people will always want to write a centralized model to devalue
the programmer and give management more power.
The OSS people will always want to create a developer centric paradigm.
After 20 years of the Microsoft's, the Oracle's and BEAs' and all the
rest, I am more convinced then ever that the OSS model, which is people
dependent and which increases the value of the guru as well as the basic
application developer, is a /better/ model than the "throw hardware at
it", the "wait until Longhorn ships" model or the "hire a bunch of low
level guys and let them program VB model".
Yahoo! is written in c on BSD.
Google is written in c on linux.
Microsoft Office is built with it's own compiler -- not .NET, not VC++.
Even the companies that create these "platforms" don't use their own
stuff to create these platforms.
Hi Bruce_Wood, Re: How my Simple HTM_to_plain_text challenge went unmet,
with only my code producing anything of any quality,
You asked me: << How do you measure good ? >>
Although it would be nice if the code didn't continually free up
a buffer the size of the entire HTML file, like Kelsey's did,
thousands of times ( yes, this makes it slower than hell on ice )...
And it'd also be nice if it understood even the simplest HTML syntax,
it's unforgivable that Kelsey's code totally trashed my homepage.
....something that Firefox, IE, my code,
and any other code that understands HTML... would never do.
Further, Kelsey continually refuses, day after day,
to provide support for his claim that my HTM_TXT.EXE does not work: http://www.Cotse.NET/users/jeffrelf/HTM_TXT.EXE http://www.Cotse.NET/users/jeffrelf/HTM_TXT.CPP http://www.Cotse.NET/users/jeffrelf/HTM_TXT.VCPROJ
No one else, none of the countless Experts here could produce
workable code... despite how trivial the conversion is.
HTM_TXT.CPP just demos a tiny portion of my hyper_custom newsreader, X.CPP .
You concluded: <<
Again, your code may be great code for certain problem domains.
However, if you're the only one who knows how it works then that makes
it a risk, and I would replace it with slower, less efficient code that
anyone can understand. A bigger box to run it on costs me $10K.
A bug that takes my business down and that nobody can fix
because the only guy who understood the program left two years ago
can cost me $1M. You do the math. >>
How many hours/days did you invest in learning my Trite_Tiny code ?
Ten minutes, you say ? Five ? And that's my fault ?
You obviously know nothing about what it takes to code.
Hi Spooky ( and Linønut, Olaf )
I used to use 128 colums when writing code and 64 columns when writing here,
all on a maximized window, of course
I now use 80 columns both places, so I don't have to rewrap code I post.
Like this: http://www.Cotse.NET/users/jeffrelf/X_CPP.PNG
By the way, an IDE is, at it's heart, a debugger and an editor,
neither of which can be adequately addressed by the shell.
By the way,
Your love of auto_completion and auto_formatting makes me want to puke.
Whitespace should be hand_coded, I maintain,
and I don't want suggestions popping out at me while I'm writing.
"Jeff_Relf" <Me@Privacy.NET> wrote in message
news:Je***********************@Cotse.NET...
[Snip] By the way, Your love of auto_completion and auto_formatting makes me want to puke.
Whitespace should be hand_coded, I maintain, and I don't want suggestions popping out at me while I'm writing.
Since there is a large disparity between what you think is readable code and
what others think is readable, surely you can accept that there could be a
similar disparity between your concept of good IDE features? Your main aim
seems to be to tweak spaghetti code so that it runs incredibly fast (albeit
with a few bugs here and there), whilst others seem to have the main aim of
producing easily maintainable code in the shortest space of time. Thus auto
completion and auto formatting are not something you want, and are something
others want.
BTW, why have you not yet responded on the bug I found in your code?
Hi Sean_Hederman, Sorry about my late reply,
but there are only so many hours in a day, ya know.
The following code Should work in MS_CPP_7_1,
but it doesn't due to a ( ¿ unreported ) bug in MS_CPP_7_1:
typedef unsigned __int8 * uint_8_P ;
__int32 Swap_32 ( __int32 X ) { uint_8_P P = ( uint_8_P ) & X + 4 ;
return * -- P << 24 | * -- P << 16 | * -- P << 8 | * -- P ; }
As I said in another post,
the execution should go left to right but it doesn't
instead it does a P -= 4 first thing.
An interesting anomaly is how this works ( rv is an int ):
( rv = * -- P << 24 ) | ( rv = * -- P << 16 )
but this does not: ( * -- P << 24 ) | ( * -- P << 16 )
As for your:
int swapped = System.Net.IPAddress.NetworkToHostOrder( unswapped );
X.CPP does it like this:
Host_IP.sin_port = htons( Port = Serv->Port );
But that's not what I'd use to convert a .WAV file.
At any rate, it was just a trivial quiz.
By the way, you keep insisting that I care only about fast code,
and I keep insisting that I care only about results.
Code is what it does. Are you projecting ? I imagine so.
As for your claim that my examples aren't readable,
....I won't be blamed for your lack of effort.
Hi Bellow,
Re: Me telling Hederman that I prefer Loop() over for(;;),
#define Loop( N ) int J = - 1, LLL = N ; while ( ++ J < LLL )
You told me: << You're certainly winning this debate in my estimation.
The bottom line, after experimenting with Regex, is that the .Net
assemblies cannot be trusted -- as is.
What is .NET really about ?
It's really a business relationship. Microsoft must provide
the trust that a person can use the .Net assemblies and convert to c#
and still get all the speed that would be part of a lower level language.
And if they can't -- then I see no reason to convert !
For example, how can I possibly trust their "automatic garbage collection"
-- how do I know if it's doing the job ? Show us the facts ! >>
I like Loop() because of it's sheer elegance, flexibility and power,
....C# kiddies can't be trusted with power tools like that.
It's as you said, they don't trust You with memory management,
....Why, then, should you trust Them ! ?
Hi Back_Of_My_Hand ( and Tom )
Re: How much faster... and flexible... and readable,
my LoopTo(), LoopXx() macros are compared to RegEx,
You told Tom: << C'mon...let's not be sophomoric.
If Relf can write code that is faster than the built in Regex object in
.NET and Microsoft is offering the .Net system as an alternative to
c/c++ programming...then the whole exercise is ridiculous.
It condemns all code written in c# to being substandard.
How can I create a production site or app that uses Regex if I can't be
guaranteed of fast text search ?
And why should I trust any assembly ?
Do I have to vet each and every one of them
to make sure that they do not have defects or faults ?
At least with mono I can see the source
to know what text search algorithm they're using,
I can't even do that with .Net ! >>
Lower level code, like C++ macros, will always be more flexible/powerful.
....in a word... more disciplined.
C#'s dialog and forms editors don't scale well to different screens,
the fonts are sometimes too small or too large,
and the text often doesn't fit into the buttons and dialogs.
What about accessiblity... for people with handicaps ?
What about 30 inch Wide_Screen monitors ?
What about auto-wrapping that never works ?
What about the excessive use of Read_Only text ?
What about endlessly badgering pop-ups ( a.k.a. dialogs ) ?
What about 80 columns of monospaced fonts on a black background, maximized ?
What about dark on dark text ?
The solution is more intelligent, lower level coding,
but few are in a position to pay the price.
Those who do pay the price win my trust, those who don't should be ignored.
Hi Hederman, Sorry about the late reply,
Re: typedef unsigned __int8 * uint_8_P ;
__int32 Swap_32 ( __int32 X ) { uint_8_P P = ( uint_8_P ) & X + 4 ;
return * -- P << 24 | * -- P << 16 | * -- P << 8 | * -- P ; }
You wrote: << Ummm, actually it does nothing of the sort.
Swapping the high and low bytes of the number 32 gives me 536870912,
and your result is 538976288. >>
Ever heard of Hex ? 0x81828384 is a better test.
As I've since said in a later post to you,
the code above doesn't work because of a bug in MS_CPP_7_1.
Re: My comment that I've held the same job since mid 1993,
and if you're record was as good.
You replied: << Nope, been headhunted 4 times in that period though. >>
Hmmm... so that's it then, you don't code anything yourself,
you're just a salesman who takes credit for the work of others.
You wrote: << Coding is my sole means of support,
has been since I left varsity, and I live a very comfortable life,
if that's what you're asking. >>
What do you mean by coding ?
Pounding keys or pounding beers with clients ? I think the latter.
Re: #define LOOP while ( 1 )
#define Loop( N ) int J = - 1, LLL = N ; while ( ++ J < LLL )
You asked me: << Um, and having LOOP and Loop defined ?
You don't think that's a bad idea ?
Look, if you want to write BASIC, it's much easier just
to get a BASIC compiler than to try to #define C++ into it. >>
I have no problems differentiating between LOOP and Loop(),
LOOP in fact, does what it does in Modula-2, an early OOP language.
I never used Basic,
but Basic is what started MicroSoft, I'd never talk ill of it.
You asked me: << You honestly believe that drek is readable ?
No comments, spaghetti code,
#define abuse that should be criminal, and non-semantic variable names. >>
Yes, my code is the Most readible.
Learning anyone's code is hard, and few, especially you,
are willing to spend more than a few seconds to learn it,
so your opinions carry no weight.
Bruce Wood poked his little head through the XP firewall and said: As well, my real-time, picky-detail embedded programming background makes me vaguely uncomfortable with the VB guy who really has no idea what's going on under the hood. Nonetheless, I must grudgingly admit that he can crank out business-ready software that _gets the job done_ and that _his users love_ far faster than I can. If I see him monkeying with hospital equipment, though, I'm making a hasty exit.
The problem with the VB guy is that he makes the pointy-haired bosses think
that all software should get written as fast. And, when it doesn't, they
start pressuring you to use things like VB or LabView.
--
When all you have is a hammer, everything looks like a nail.
When all you have is Microsoft software, everything looks like Windows.
Back By Demand poked his little head through the XP firewall and said: Yahoo! is written in c on BSD.
Google is written in c on linux.
Microsoft Office is built with it's own compiler -- not .NET, not VC++.
Even the companies that create these "platforms" don't use their own stuff to create these platforms.
I thought Jim McCarthy (MS C++ team leader years ago and author of "The
Dynamics of Software Development") said that Microsoft ate its own dog-food?
Is what you said about MS Office true about all of their software?
--
When all you have is a hammer, everything looks like a nail.
When all you have is Microsoft software, everything looks like Windows.
Hi Hederman, Re: What to do when C# fails you, You told me: <<
Report it as a bug and/or write your own high-level routine
using low-level C# ( i.e. unsafe code/interop/pinvoke )
just like you would in any programming language. >>
Ha, ha, ha ! ! Without #define ? Not a chance. I wouldn't do it.
Re: My comment that C#'s high level routines are compromises,
where people say: A-a-aw, hell, it's good enough, I'll just go with it.
You replied: << Really ?
Which of the developers of those libraries told you that ? >>
What ! ? You think I can't reject code that I didn't write ?
Re: My comment that C, with it's #define, has stood the test of time,
and will continue to do so long after C# is forgotten,
You told me: << I thought the quality of code was independent of the language.
I can write better code in VB.NET than many people can in C++.
The best language for the job depends on the job,
and frankly I've written business systems in many languages,
and I've found C# to be more than adequate for the job,
and it gives me more productivity than C++. >>
Are you overseeing the coders, or is it you there... twiddling the bits ?
I think it's the former.
I never said that VB.NET wasn't useful to many,
I'm just saying it's not the optimal solution, it's not a tool I'd ever use.
You asked me: << Please, do you really believe that
the more experienced you are the more you tie yourself to one solution ?
Are you trying to assert that
C# developers by definition have less experience than C++ developers ?
Keep in mind that many C# developers come from a C++ background.
I'd say that having a religious devotion to one programming language
is the surest sign of a developers immaturity,
not which language they happen to use. >>
Not being a craftsman yourself,
you don't understand the attachment he gets for his tools.
You don't tell Picasso what type of paint to use.
Hi Linonut, Re: Bailo's claim that MicroSoft doesn't use MS_CPP,
You told her: << I thought Jim McCarthy
( MS C++ team leader years ago and author of
" The Dynamics of Software Development " )
said that Microsoft ate its own dog-food ?
Is what you said about MS Office true about all of their software ? >>
Tom Shelton, who has more credibility than Bailo, I'm afraid,
said that the MS_Office team does use MS_CPP,
and, I for one, believe Tom, not Bailo.
There was a time when they didn't, maybe 10 years ago, when Bailo was there.
I know that Visual_Studio and Office, for example, have much code in common.
Using your previous compiler to create your next compiler is a bit weird,
I think, at some point a total rewrite in assembly would be in order,
I assume.
"Jeff_Relf" <Me@Privacy.NET> wrote in message
news:Je***********************@Cotse.NET... Hi Hederman, Re: What to do when C# fails you, You told me: << Report it as a bug and/or write your own high-level routine using low-level C# ( i.e. unsafe code/interop/pinvoke ) just like you would in any programming language. >>
Ha, ha, ha ! ! Without #define ? Not a chance. I wouldn't do it.
Just because *you* wouldn't do it, doesn't mean it can't be done.
Re: My comment that C#'s high level routines are compromises, where people say: A-a-aw, hell, it's good enough, I'll just go with it.
You replied: << Really ? Which of the developers of those libraries told you that ? >>
What ! ? You think I can't reject code that I didn't write ?
Huh? I'm not sure what you mean here.
Re: My comment that C, with it's #define, has stood the test of time, and will continue to do so long after C# is forgotten,
You told me: << I thought the quality of code was independent of the language. I can write better code in VB.NET than many people can in C++. The best language for the job depends on the job, and frankly I've written business systems in many languages, and I've found C# to be more than adequate for the job, and it gives me more productivity than C++. >>
Are you overseeing the coders, or is it you there... twiddling the bits ? I think it's the former.
Both actually.
I never said that VB.NET wasn't useful to many, I'm just saying it's not the optimal solution, it's not a tool I'd ever use.
You asked me: << Please, do you really believe that the more experienced you are the more you tie yourself to one solution ? Are you trying to assert that C# developers by definition have less experience than C++ developers ? Keep in mind that many C# developers come from a C++ background. I'd say that having a religious devotion to one programming language is the surest sign of a developers immaturity, not which language they happen to use. >>
Not being a craftsman yourself, you don't understand the attachment he gets for his tools. You don't tell Picasso what type of paint to use.
I like this "Not being a craftsman yourself" business. I'm perfectly aware
of the attachment that a "craftsman" gets for his tools, and I wouldn't
presume to tell you to change yours. What I do object to is your assertion
that your tools are better. As I've pointed out before I've found your code
to be well-nigh unreadable (as have many others), completely abusing #define
in the most horriffic ways, and buggy.
Now you're welcome to do that on your projects, my point is that I doubt
many programmers would want your kind of code in their projects. Please, by
all means carry on programming the way you want, just stop trying to punt
that stuff as a better way of doing things. It's not. It *may* be better in
certain very limited edge cases, but definately not in most cases. This discussion thread is closed Replies have been disabled for this discussion. Similar topics
7 posts
views
Thread by tada991 |
last post: by
|
29 posts
views
Thread by RAY |
last post: by
|
22 posts
views
Thread by Ramzy Darwish |
last post: by
|
11 posts
views
Thread by Sam |
last post: by
|
59 posts
views
Thread by Alan Silver |
last post: by
|
269 posts
views
Thread by Montrose... |
last post: by
|
15 posts
views
Thread by Alex L Pavluck |
last post: by
|
6 posts
views
Thread by Jamiil |
last post: by
|
5 posts
views
Thread by vinnie |
last post: by
| | | | | | | | | | |