c# is a good way to learn c

G

Greg Cox

=?iso-8859-1?Q? said:
Back By Demand poked his little head through the XP firewall and said:


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?

It wasn't even true about Office - at least when I wrote some code for
Exchange Server in 1997-1998 that was also incorporated in Office. At
that time Office, as well as Exchange Server, used the stock MS Visual
C++ version 6 compiler. In fact, at one point, the Exchange Server team
"ate its own dogfood" by using a beta version of the Visual C++ compiler
to help out the compiler development team. Some Exchange developers
also used the stock MS Visual C++ IDE for editing though I personally
used CodeWright.
 
S

Sean Hederman

Jeff_Relf said:
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.

What is that bug exactly?
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.

Ummm, actually I was headhunted *because* of my code.
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 know Modula-2 well thanks. If you want to write Modula-2 then do so. My
point about the differentiating on casing is not whether *you* understand it
or not, but whether anyone else might get confused. It seems a brilliant
example of deliberately trying to confuse a casual reader.
I never used Basic,
but Basic is what started MicroSoft, I'd never talk ill of it.

Strange, you #define C to be like Basic/Modula-2 and then you say you don't
like Basic. A little cognitive dissonance there I see.
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.
Hah!

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.

I shouldn't have to spend hours poring over your code to find out what it
does. Good code is more like an essay. Clear, commented, and well laid out.
Yours is quite clearly none of those things.
 
S

Sean Hederman

Jeff_Relf said:
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:

Report it then.

[Snip]
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.

You've obviously never worked in a team environment.
As for your claim that my examples aren't readable,
...I won't be blamed for your lack of effort.

Code should *not* require an effort. It should be easy, well commented and
concise, except in the few occasions when a performance analysis has found
an area requiring optimization. In that case, it should be even more well
commented. It should not attempt to make use of strange #defines that change
the structure of the language.

Oh, and chrisv, I agree wholeheartedly with you about Jeff, so...

Cheers Jeff.

And no, I'm not running away, it's not worth my time to try and educate
someone without the ability to see their mistakes. Carry on in your happy
world, assured that you're the greatest programmer the world has ever seen.
And those of us who can actually write *useful* and easily maintainable
programs will continue to get better jobs, whilst you sit in your safe
little 13 year tenure.

*plonk*
 
S

Sean Hederman

Linønut said:
Back By Demand poked his little head through the XP firewall and said: [Snip]
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?

They do, but not neccesarily other divisions dog-food. So, for example, VC++
is compiled in VC++, and much of the .NET Framework is written in .NET. IIRC
the Office compiler does compile itself. I'm also pretty sure that I read
that they either have ported or are going to port Office to VC++.
 
J

Jeff_Relf

Hi Greg_Cox ( and Linonut ), Re: If MS_Office had it's own compiler,
Ya writ: << It wasn't even true about Office - at least when I wrote some
code for Exchange Server in 1997-1998 that was also incorporated in Office.
At that time Office, as well as Exchange Server,
used the stock MS Visual C++ version 6 compiler.
In fact, at one point, the Exchange Server team
" ate its own dogfood " by using a beta version
of the Visual C++ compiler to help out the compiler development team.
Some Exchange developers also used the stock MS Visual C++ IDE
for editing though I personally used CodeWright. >>

Thanks for clearing that up for me,
there's been much confusion on that topic.

What do you like about CodeWright's debugger ? Editor ?
 
E

Eran Kampf

Craftsman attached to his tools?
If you were a real craftsman you'd know how to use the appropriate tool for
each task you encounter.
C# is an excellent language for most desktop application and infact using
the .NET framework saves you alot of time in the process.
If you are working on real-time application you will probably require more
system control and use C++.
You want full control? use assembler...

Funny thing is, 10 years ago there were assembly developers talking about C
and C++ the same way you take about C#...
 
M

Montrose...

Jeff_Relf said:
Hi Greg_Cox ( and Linonut ), Re: If MS_Office had it's own compiler,
Ya writ: << It wasn't even true about Office - at least when I wrote some
code for Exchange Server in 1997-1998 that was also incorporated in Office.
At that time Office, as well as Exchange Server,
used the stock MS Visual C++ version 6 compiler.
In fact, at one point, the Exchange Server team
" ate its own dogfood " by using a beta version

Sounds like the next step is for these groups to write Office in c#.

Thanks for clearing that up for me.
 
M

Montrose...

Greg said:
It wasn't even true about Office - at least when I wrote some code for
Exchange Server in 1997-1998 that was also incorporated in Office. At
that time Office, as well as Exchange Server, used the stock MS Visual
C++ version 6 compiler. In fact, at one point, the Exchange Server team
"ate its own dogfood" by using a beta version of the Visual C++ compiler
to help out the compiler development team. Some Exchange developers
also used the stock MS Visual C++ IDE for editing though I personally
used CodeWright.

There should be plenty of people at M$ right now working to port
everything to .Net/Indigo and so on then...making all their products in c#
 
M

Montrose...

Greg said:
"ate its own dogfood" by using a beta version of the Visual C++ compiler
to help out the compiler development team. Some Exchange developers
also used the stock MS Visual C++ IDE for editing though I personally
used CodeWright.

http://www.winsupersite.com/showcase/office_ngo_preview.asp

Office .NET Revealed?
Is Office NGO really the next version of Office?

A number of readers alerted me this week to a fascinating Shockwave
animation that purports to demonstrate some of the online/subscription
features of the next version of Microsoft Office, which will be called
Office .NET. Code-named Office NGO ("Next Generation Office") in the
animation, this Office version will include links to a number of of
online services, including a secure My Office Web site; a consolidated
email account with Web-based Inbox; Office .NET Notifications; online
scheduling with a sharable calendar; Meeting Workspaces for viewing
agendas, pending tasks, and related documents, SharePoint Team
Services-based Team Workspace for sharing information with team members;
and a set of online content such as templates, online training,
communities, and the like.
 
M

Montrose...

Jeff_Relf said:
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 ? >>

Jeff,

Your code is fat and wasteful.

Check this out:

#include <stdio.h>

main(t,_,a)
char *a;
{return!0<t?t<3?main(-79,-13,a+main(-87,1-_,
main(-86, 0, a+1 )+a)):1,t<_?main(t+1, _, a ):3,main ( -94, -27+t, a
)&&t == 2 ?_<13 ?main ( 2, _+1, "%s %d %d\n" ):9:16:t<0?t<-72?main(_,
t,"@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l,+,/n{n+\
,/+#n+,/#;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l q#'+d'K#!/\
+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# ){n\
l]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#\
n'wk nw' iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c \
;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;\
#'rdq#w! nr'/ ') }+}{rl#'{n' ')# }'+}##(!!/")
:t<-50?_==*a ?putchar(a[31]):main(-65,_,a+1):main((*a == '/')+t,_,a\
+1 ):0<t?main ( 2, 2 , "%s"):*a=='/'||main(0,main(-61,*a, "!ek;dc \
i@bK'(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry"),a+1);}
 
T

tab

Big deal. They sound like doofuses. They problem don't even know how
to
use the STL. You could probably beat them just as well if you used straight
C.

In your dreams you one language twit.
 
T

tab

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 are a guy that wants to debate which flavor M & M tastes better.
You think "your way" is the BEST way. I am the guy cleaning up your
death march project that failed, and trashing your crap that took
10 times as long to code, with 30X more bugs,

I guess you live in a world were money is flowing like a river into
your department, and can spend decades getting that crap to work.
 
M

Michael A. Covington

Eran Kampf said:
Craftsman attached to his tools?
If you were a real craftsman you'd know how to use the appropriate tool
for each task you encounter.
C# is an excellent language for most desktop application and infact using
the .NET framework saves you alot of time in the process.
If you are working on real-time application you will probably require more
system control and use C++.
You want full control? use assembler...

Funny thing is, 10 years ago there were assembly developers talking about
C and C++ the same way you take about C#...

Hear, hear! And in 1959 there were people talking that way about Fortran.

BTW, I have no idea about telling Picasso what kind of paint to use. But
Leonardo da Vinci, a much greater artist, eagerly tested any kind of paint
he could get his hands on. As I recall, frescoes came out of his
experiments, or were much improved by them.
 
A

Alvin Bruney [MVP - ASP.NET]

Leonardo da Vinci, a much greater artist,
Is that opinion? fact? general consensus? blind guess? ...

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc
 
M

Michael A. Covington

Alvin Bruney said:
Is that opinion? fact? general consensus? blind guess? ...

Opinion, of course, but widely held among art historians. I've just asked
my wife, who has a degree in art.
 
A

Alex O.

Linønutlinø[email protected] said:
Alex poked his little head through the XP firewall and said:


I don't have any source myself, but google for "Visual COBOL". Or
"object-oriented COBOL".

There is a bit of a difference between "still exists" and "still being
used for *a lot* of new development" (emphasis mine).

I am not aware of any signifigant amout of *new* development done in
COBOL.
Of course, maintenance is a whole different story.
 
G

Greg Cox

Hi Greg_Cox ( and Linonut ), Re: If MS_Office had it's own compiler,
Ya writ: << It wasn't even true about Office - at least when I wrote some
code for Exchange Server in 1997-1998 that was also incorporated in Office.
At that time Office, as well as Exchange Server,
used the stock MS Visual C++ version 6 compiler.
In fact, at one point, the Exchange Server team
" ate its own dogfood " by using a beta version
of the Visual C++ compiler to help out the compiler development team.
Some Exchange developers also used the stock MS Visual C++ IDE
for editing though I personally used CodeWright. >>

Thanks for clearing that up for me,
there's been much confusion on that topic.

What do you like about CodeWright's debugger ? Editor ?

I used CodeWright for many years simply because I loved how it allowed
me to completely customize the keyboard and write custom commands in C.
One of the things I used most was a copy/cut/paste that was columnar
instead of stream based. With a simple mouse click I could copy the
text in columns 20-34 of lines 200-300 and paste them in columns 30-44
of lines 410-510. It's amazing how often I used that functionality. It
also allowed me to easily create and use on-the-fly macros. I ended up
with a keyboard map so customized nobody but me could use it...

I'm unfamiliar with a debugger by them so I can't comment.
 
G

Greg Cox

Sounds like the next step is for these groups to write Office in c#.

I'm not sure what that would get them. You're talking about hundreds of
thousands to millions of lines of existing C/C++ code. Why would they
want to dump that and start over?
 
M

Michael A. Covington

Michael A. Covington said:
Opinion, of course, but widely held among art historians. I've just asked
my wife, who has a degree in art.

I should add that I asked her what the experts think, not what she thinks...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top